@schneideress/dashboardframework 0.0.246 → 0.0.247

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.
@@ -293,9 +293,9 @@ var RADashboardResponsiveService = /** @class */ (function () {
293
293
  };
294
294
  Object.defineProperty(RADashboardResponsiveService.prototype, "IsDesktopView", {
295
295
  get: function () {
296
- var agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36";
297
- if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|realme|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) ||
298
- /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(agent))
296
+ var agent = navigator.userAgent || navigator.vendor || window.opera;
297
+ if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(agent) ||
298
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(agent.substring(0, 4)))
299
299
  return false;
300
300
  return true;
301
301
  },
@@ -307,7 +307,7 @@ var RADashboardResponsiveService = /** @class */ (function () {
307
307
  var check = false;
308
308
  var agent = navigator.userAgent || navigator.vendor || window.opera;
309
309
  if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(agent) ||
310
- /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(agent))
310
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(agent.substring(0, 4)))
311
311
  check = true;
312
312
  return check;
313
313
  },
@@ -2655,10 +2655,10 @@ var GridsterComponent = /** @class */ (function () {
2655
2655
  }
2656
2656
  GridsterComponent_1 = GridsterComponent;
2657
2657
  GridsterComponent.checkCollisionTwoItems = function (item, item2) {
2658
- return item.x < item2.x + item2.cols
2659
- && item.x + item.cols > item2.x
2660
- && item.y < item2.y + item2.rows
2661
- && item.y + item.rows > item2.y;
2658
+ return (item.x < item2.x + item2.cols &&
2659
+ item.x + item.cols > item2.x &&
2660
+ item.y < item2.y + item2.rows &&
2661
+ item.y + item.rows > item2.y);
2662
2662
  };
2663
2663
  GridsterComponent.prototype.ngOnInit = function () {
2664
2664
  if (this.options.initCallback) {
@@ -2666,6 +2666,7 @@ var GridsterComponent = /** @class */ (function () {
2666
2666
  }
2667
2667
  };
2668
2668
  GridsterComponent.prototype.ngOnChanges = function (changes) {
2669
+ console.log(this.$options);
2669
2670
  if (changes.options) {
2670
2671
  this.setOptions();
2671
2672
  this.options.api = {
@@ -2674,7 +2675,7 @@ var GridsterComponent = /** @class */ (function () {
2674
2675
  getNextPossiblePosition: this.getNextPossiblePosition.bind(this),
2675
2676
  getFirstPossiblePosition: this.getFirstPossiblePosition.bind(this),
2676
2677
  getLastPossiblePosition: this.getLastPossiblePosition.bind(this),
2677
- getCurrentRowHeight: this.getCurrentRowHeight.bind(this)
2678
+ getCurrentRowHeight: this.getCurrentRowHeight.bind(this),
2678
2679
  };
2679
2680
  this.columns = this.$options.minCols;
2680
2681
  this.rows = this.$options.minRows;
@@ -2688,7 +2689,7 @@ var GridsterComponent = /** @class */ (function () {
2688
2689
  GridsterComponent.prototype.resize = function () {
2689
2690
  var height;
2690
2691
  var width;
2691
- if (this.$options.gridType === 'fit' && !this.mobile) {
2692
+ if (this.$options.gridType === "fit" && !this.mobile) {
2692
2693
  width = this.el.offsetWidth;
2693
2694
  height = this.el.offsetHeight;
2694
2695
  }
@@ -2696,14 +2697,15 @@ var GridsterComponent = /** @class */ (function () {
2696
2697
  width = this.el.clientWidth;
2697
2698
  height = this.el.clientHeight;
2698
2699
  }
2699
- if ((width !== this.curWidth || height !== this.curHeight) && this.checkIfToResize()) {
2700
+ if ((width !== this.curWidth || height !== this.curHeight) &&
2701
+ this.checkIfToResize()) {
2700
2702
  this.onResize();
2701
2703
  }
2702
2704
  };
2703
2705
  GridsterComponent.prototype.setOptions = function () {
2704
2706
  this.$options = GridsterUtils.merge(this.$options, this.options, this.$options);
2705
2707
  if (!this.$options.disableWindowResize && !this.windowResize) {
2706
- this.windowResize = this.renderer.listen('window', 'resize', this.onResize.bind(this));
2708
+ this.windowResize = this.renderer.listen("window", "resize", this.onResize.bind(this));
2707
2709
  }
2708
2710
  else if (this.$options.disableWindowResize && this.windowResize) {
2709
2711
  this.windowResize();
@@ -2729,9 +2731,9 @@ var GridsterComponent = /** @class */ (function () {
2729
2731
  }
2730
2732
  //if (this.options.api) {
2731
2733
  /* this.options.api getting undefined for new dashboard load- temp fix
2732
- * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2733
- * ondestroy of current this.options.api instance - needs to investigate further
2734
- */
2734
+ * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2735
+ * ondestroy of current this.options.api instance - needs to investigate further
2736
+ */
2735
2737
  if (false) {
2736
2738
  this.options.api.resize = undefined;
2737
2739
  this.options.api.optionsChanged = undefined;
@@ -2754,10 +2756,12 @@ var GridsterComponent = /** @class */ (function () {
2754
2756
  var clientHeight = this.el.clientHeight;
2755
2757
  var offsetHeight = this.el.offsetHeight;
2756
2758
  var scrollHeight = this.el.scrollHeight;
2757
- var verticalScrollPresent = clientWidth < offsetWidth && scrollHeight > offsetHeight
2758
- && scrollHeight - offsetHeight < offsetWidth - clientWidth;
2759
- var horizontalScrollPresent = clientHeight < offsetHeight
2760
- && scrollWidth > offsetWidth && scrollWidth - offsetWidth < offsetHeight - clientHeight;
2759
+ var verticalScrollPresent = clientWidth < offsetWidth &&
2760
+ scrollHeight > offsetHeight &&
2761
+ scrollHeight - offsetHeight < offsetWidth - clientWidth;
2762
+ var horizontalScrollPresent = clientHeight < offsetHeight &&
2763
+ scrollWidth > offsetWidth &&
2764
+ scrollWidth - offsetWidth < offsetHeight - clientHeight;
2761
2765
  if (verticalScrollPresent) {
2762
2766
  return false;
2763
2767
  }
@@ -2767,7 +2771,8 @@ var GridsterComponent = /** @class */ (function () {
2767
2771
  var el = this.el;
2768
2772
  var width = el.clientWidth;
2769
2773
  var height = el.clientHeight;
2770
- if (this.$options.setGridSize || this.$options.gridType === 'fit' && !this.mobile) {
2774
+ if (this.$options.setGridSize ||
2775
+ (this.$options.gridType === "fit" && !this.mobile)) {
2771
2776
  width = el.offsetWidth;
2772
2777
  height = el.offsetHeight;
2773
2778
  }
@@ -2782,11 +2787,11 @@ var GridsterComponent = /** @class */ (function () {
2782
2787
  this.setGridSize();
2783
2788
  if (!this.mobile && this.$options.mobileBreakpoint > this.curWidth) {
2784
2789
  this.mobile = !this.mobile;
2785
- this.renderer.addClass(this.el, 'mobile');
2790
+ this.renderer.addClass(this.el, "mobile");
2786
2791
  }
2787
2792
  else if (this.mobile && this.$options.mobileBreakpoint < this.curWidth) {
2788
2793
  this.mobile = !this.mobile;
2789
- this.renderer.removeClass(this.el, 'mobile');
2794
+ this.renderer.removeClass(this.el, "mobile");
2790
2795
  }
2791
2796
  var rows = this.$options.minRows, columns = this.$options.minCols;
2792
2797
  var widgetsIndex = this.grid.length - 1, widget;
@@ -2814,57 +2819,57 @@ var GridsterComponent = /** @class */ (function () {
2814
2819
  var marginWidth = -this.$options.margin;
2815
2820
  if (this.$options.outerMarginLeft !== null) {
2816
2821
  marginWidth += this.$options.outerMarginLeft;
2817
- this.renderer.setStyle(this.el, 'padding-left', this.$options.outerMarginLeft + 'px');
2822
+ this.renderer.setStyle(this.el, "padding-left", this.$options.outerMarginLeft + "px");
2818
2823
  }
2819
2824
  else {
2820
2825
  marginWidth += this.$options.margin;
2821
- this.renderer.setStyle(this.el, 'padding-left', this.$options.margin + 'px');
2826
+ this.renderer.setStyle(this.el, "padding-left", this.$options.margin + "px");
2822
2827
  }
2823
2828
  if (this.$options.outerMarginRight !== null) {
2824
2829
  marginWidth += this.$options.outerMarginRight;
2825
- this.renderer.setStyle(this.el, 'padding-right', this.$options.outerMarginRight + 'px');
2830
+ this.renderer.setStyle(this.el, "padding-right", this.$options.outerMarginRight + "px");
2826
2831
  }
2827
2832
  else {
2828
2833
  marginWidth += this.$options.margin;
2829
- this.renderer.setStyle(this.el, 'padding-right', this.$options.margin + 'px');
2834
+ this.renderer.setStyle(this.el, "padding-right", this.$options.margin + "px");
2830
2835
  }
2831
2836
  this.curColWidth = (this.curWidth - marginWidth) / this.columns;
2832
2837
  var marginHeight = -this.$options.margin;
2833
2838
  if (this.$options.outerMarginTop !== null) {
2834
2839
  marginHeight += this.$options.outerMarginTop;
2835
- this.renderer.setStyle(this.el, 'padding-top', this.$options.outerMarginTop + 'px');
2840
+ this.renderer.setStyle(this.el, "padding-top", this.$options.outerMarginTop + "px");
2836
2841
  }
2837
2842
  else {
2838
2843
  marginHeight += this.$options.margin;
2839
- this.renderer.setStyle(this.el, 'padding-top', this.$options.margin + 'px');
2844
+ this.renderer.setStyle(this.el, "padding-top", this.$options.margin + "px");
2840
2845
  }
2841
2846
  if (this.$options.outerMarginBottom !== null) {
2842
2847
  marginHeight += this.$options.outerMarginBottom;
2843
- this.renderer.setStyle(this.el, 'padding-bottom', this.$options.outerMarginBottom + 'px');
2848
+ this.renderer.setStyle(this.el, "padding-bottom", this.$options.outerMarginBottom + "px");
2844
2849
  }
2845
2850
  else {
2846
2851
  marginHeight += this.$options.margin;
2847
- this.renderer.setStyle(this.el, 'padding-bottom', this.$options.margin + 'px');
2852
+ this.renderer.setStyle(this.el, "padding-bottom", this.$options.margin + "px");
2848
2853
  }
2849
2854
  this.curRowHeight = (this.curHeight - marginHeight) / this.rows;
2850
2855
  }
2851
2856
  else {
2852
2857
  this.curColWidth = (this.curWidth + this.$options.margin) / this.columns;
2853
2858
  this.curRowHeight = (this.curHeight + this.$options.margin) / this.rows;
2854
- this.renderer.setStyle(this.el, 'padding-left', 0 + 'px');
2855
- this.renderer.setStyle(this.el, 'padding-right', 0 + 'px');
2856
- this.renderer.setStyle(this.el, 'padding-top', 0 + 'px');
2857
- this.renderer.setStyle(this.el, 'padding-bottom', 0 + 'px');
2859
+ this.renderer.setStyle(this.el, "padding-left", 0 + "px");
2860
+ this.renderer.setStyle(this.el, "padding-right", 0 + "px");
2861
+ this.renderer.setStyle(this.el, "padding-top", 0 + "px");
2862
+ this.renderer.setStyle(this.el, "padding-bottom", 0 + "px");
2858
2863
  }
2859
2864
  this.gridRenderer.updateGridster();
2860
2865
  this.updateGrid();
2861
2866
  if (this.$options.setGridSize) {
2862
- this.renderer.setStyle(this.el, 'width', (this.columns * this.curColWidth + this.$options.margin) + 'px');
2863
- this.renderer.setStyle(this.el, 'height', (this.rows * this.curRowHeight + this.$options.margin) + 'px');
2867
+ this.renderer.setStyle(this.el, "width", this.columns * this.curColWidth + this.$options.margin + "px");
2868
+ this.renderer.setStyle(this.el, "height", this.rows * this.curRowHeight + this.$options.margin + "px");
2864
2869
  }
2865
2870
  else {
2866
- this.renderer.setStyle(this.el, 'width', '');
2867
- this.renderer.setStyle(this.el, 'height', '');
2871
+ this.renderer.setStyle(this.el, "width", "");
2872
+ this.renderer.setStyle(this.el, "height", "");
2868
2873
  }
2869
2874
  var widgetsIndex = this.grid.length - 1, widget;
2870
2875
  for (; widgetsIndex >= 0; widgetsIndex--) {
@@ -2876,18 +2881,23 @@ var GridsterComponent = /** @class */ (function () {
2876
2881
  setTimeout(this.resize.bind(this), 100);
2877
2882
  };
2878
2883
  GridsterComponent.prototype.updateGrid = function () {
2879
- if (this.$options.displayGrid === 'always' && !this.mobile) {
2880
- this.renderer.addClass(this.el, 'display-grid');
2884
+ if (this.$options.displayGrid === "always" && !this.mobile) {
2885
+ this.renderer.addClass(this.el, "display-grid");
2881
2886
  }
2882
- else if (this.$options.displayGrid === 'onDrag&Resize' && this.dragInProgress) {
2883
- this.renderer.addClass(this.el, 'display-grid');
2887
+ else if (this.$options.displayGrid === "onDrag&Resize" &&
2888
+ this.dragInProgress) {
2889
+ this.renderer.addClass(this.el, "display-grid");
2884
2890
  }
2885
- else if (this.$options.displayGrid === 'none' || !this.dragInProgress || this.mobile) {
2886
- this.renderer.removeClass(this.el, 'display-grid');
2891
+ else if (this.$options.displayGrid === "none" ||
2892
+ !this.dragInProgress ||
2893
+ this.mobile) {
2894
+ this.renderer.removeClass(this.el, "display-grid");
2887
2895
  }
2888
2896
  this.setGridDimensions();
2889
- this.gridColumns.length = Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
2890
- this.gridRows.length = Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
2897
+ this.gridColumns.length =
2898
+ Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
2899
+ this.gridRows.length =
2900
+ Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
2891
2901
  this.cdRef.markForCheck();
2892
2902
  };
2893
2903
  GridsterComponent.prototype.addItem = function (itemComponent) {
@@ -2907,8 +2917,8 @@ var GridsterComponent = /** @class */ (function () {
2907
2917
  else if (this.checkCollision(itemComponent.$item)) {
2908
2918
  if (!this.$options.disableWarnings) {
2909
2919
  itemComponent.notPlaced = true;
2910
- console.warn('Can\'t be placed in the bounds of the dashboard, trying to auto position!/n' +
2911
- JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
2920
+ console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n" +
2921
+ JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
2912
2922
  }
2913
2923
  if (!this.$options.disableAutoPositionOnConflict) {
2914
2924
  this.autoPositionItem(itemComponent);
@@ -2947,24 +2957,43 @@ var GridsterComponent = /** @class */ (function () {
2947
2957
  var noNegativePosition = item.y > -1 && item.x > -1;
2948
2958
  var maxGridCols = item.cols + item.x <= this.$options.maxCols;
2949
2959
  var maxGridRows = item.rows + item.y <= this.$options.maxRows;
2950
- var maxItemCols = item.maxItemCols === undefined ? this.$options.maxItemCols : item.maxItemCols;
2951
- var minItemCols = item.minItemCols === undefined ? this.$options.minItemCols : item.minItemCols;
2952
- var maxItemRows = item.maxItemRows === undefined ? this.$options.maxItemRows : item.maxItemRows;
2953
- var minItemRows = item.minItemRows === undefined ? this.$options.minItemRows : item.minItemRows;
2960
+ var maxItemCols = item.maxItemCols === undefined
2961
+ ? this.$options.maxItemCols
2962
+ : item.maxItemCols;
2963
+ var minItemCols = item.minItemCols === undefined
2964
+ ? this.$options.minItemCols
2965
+ : item.minItemCols;
2966
+ var maxItemRows = item.maxItemRows === undefined
2967
+ ? this.$options.maxItemRows
2968
+ : item.maxItemRows;
2969
+ var minItemRows = item.minItemRows === undefined
2970
+ ? this.$options.minItemRows
2971
+ : item.minItemRows;
2954
2972
  var inColsLimits = item.cols <= maxItemCols && item.cols >= minItemCols;
2955
2973
  var inRowsLimits = item.rows <= maxItemRows && item.rows >= minItemRows;
2956
- var minAreaLimit = item.minItemArea === undefined ? this.$options.minItemArea : item.minItemArea;
2957
- var maxAreaLimit = item.maxItemArea === undefined ? this.$options.maxItemArea : item.maxItemArea;
2974
+ var minAreaLimit = item.minItemArea === undefined
2975
+ ? this.$options.minItemArea
2976
+ : item.minItemArea;
2977
+ var maxAreaLimit = item.maxItemArea === undefined
2978
+ ? this.$options.maxItemArea
2979
+ : item.maxItemArea;
2958
2980
  var area = item.cols * item.rows;
2959
2981
  var inMinArea = minAreaLimit <= area;
2960
2982
  var inMaxArea = maxAreaLimit >= area;
2961
- return !(noNegativePosition && maxGridCols && maxGridRows && inColsLimits && inRowsLimits && inMinArea && inMaxArea);
2983
+ return !(noNegativePosition &&
2984
+ maxGridCols &&
2985
+ maxGridRows &&
2986
+ inColsLimits &&
2987
+ inRowsLimits &&
2988
+ inMinArea &&
2989
+ inMaxArea);
2962
2990
  };
2963
2991
  GridsterComponent.prototype.findItemWithItem = function (item) {
2964
2992
  var widgetsIndex = this.grid.length - 1, widget;
2965
2993
  for (; widgetsIndex > -1; widgetsIndex--) {
2966
2994
  widget = this.grid[widgetsIndex];
2967
- if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2995
+ if (widget.$item !== item &&
2996
+ GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2968
2997
  return widget;
2969
2998
  }
2970
2999
  }
@@ -2975,7 +3004,8 @@ var GridsterComponent = /** @class */ (function () {
2975
3004
  var widgetsIndex = this.grid.length - 1, widget;
2976
3005
  for (; widgetsIndex > -1; widgetsIndex--) {
2977
3006
  widget = this.grid[widgetsIndex];
2978
- if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
3007
+ if (widget.$item !== item &&
3008
+ GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
2979
3009
  a.push(widget);
2980
3010
  }
2981
3011
  }
@@ -2991,8 +3021,8 @@ var GridsterComponent = /** @class */ (function () {
2991
3021
  else {
2992
3022
  itemComponent.notPlaced = true;
2993
3023
  if (!this.$options.disableWarnings) {
2994
- console.warn('Can\'t be placed in the bounds of the dashboard!/n' +
2995
- JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
3024
+ console.warn("Can't be placed in the bounds of the dashboard!/n" +
3025
+ JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
2996
3026
  }
2997
3027
  }
2998
3028
  };
@@ -3039,7 +3069,10 @@ var GridsterComponent = /** @class */ (function () {
3039
3069
  GridsterComponent.prototype.getLastPossiblePosition = function (item) {
3040
3070
  var farthestItem = { y: 0, x: 0 };
3041
3071
  farthestItem = this.grid.reduce(function (prev, curr) {
3042
- var currCoords = { y: curr.$item.y + curr.$item.rows - 1, x: curr.$item.x + curr.$item.cols - 1 };
3072
+ var currCoords = {
3073
+ y: curr.$item.y + curr.$item.rows - 1,
3074
+ x: curr.$item.x + curr.$item.cols - 1,
3075
+ };
3043
3076
  if (GridsterUtils.compareItems(prev, currCoords) === 1) {
3044
3077
  return currCoords;
3045
3078
  }
@@ -3088,12 +3121,15 @@ var GridsterComponent = /** @class */ (function () {
3088
3121
  ], GridsterComponent.prototype, "options", void 0);
3089
3122
  GridsterComponent = GridsterComponent_1 = __decorate([
3090
3123
  Component({
3091
- selector: 'gridster',
3124
+ selector: "gridster",
3092
3125
  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",
3093
3126
  encapsulation: ViewEncapsulation.None,
3094
3127
  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}"]
3095
3128
  }),
3096
- __metadata("design:paramtypes", [ElementRef, Renderer2, ChangeDetectorRef, NgZone])
3129
+ __metadata("design:paramtypes", [ElementRef,
3130
+ Renderer2,
3131
+ ChangeDetectorRef,
3132
+ NgZone])
3097
3133
  ], GridsterComponent);
3098
3134
  return GridsterComponent;
3099
3135
  }());