@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.
@@ -504,9 +504,9 @@
504
504
  };
505
505
  Object.defineProperty(RADashboardResponsiveService.prototype, "IsDesktopView", {
506
506
  get: function () {
507
- 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";
508
- 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) ||
509
- /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))
507
+ var agent = navigator.userAgent || navigator.vendor || window.opera;
508
+ 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) ||
509
+ /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)))
510
510
  return false;
511
511
  return true;
512
512
  },
@@ -518,7 +518,7 @@
518
518
  var check = false;
519
519
  var agent = navigator.userAgent || navigator.vendor || window.opera;
520
520
  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) ||
521
- /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))
521
+ /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)))
522
522
  check = true;
523
523
  return check;
524
524
  },
@@ -2866,10 +2866,10 @@
2866
2866
  }
2867
2867
  GridsterComponent_1 = GridsterComponent;
2868
2868
  GridsterComponent.checkCollisionTwoItems = function (item, item2) {
2869
- return item.x < item2.x + item2.cols
2870
- && item.x + item.cols > item2.x
2871
- && item.y < item2.y + item2.rows
2872
- && item.y + item.rows > item2.y;
2869
+ return (item.x < item2.x + item2.cols &&
2870
+ item.x + item.cols > item2.x &&
2871
+ item.y < item2.y + item2.rows &&
2872
+ item.y + item.rows > item2.y);
2873
2873
  };
2874
2874
  GridsterComponent.prototype.ngOnInit = function () {
2875
2875
  if (this.options.initCallback) {
@@ -2877,6 +2877,7 @@
2877
2877
  }
2878
2878
  };
2879
2879
  GridsterComponent.prototype.ngOnChanges = function (changes) {
2880
+ console.log(this.$options);
2880
2881
  if (changes.options) {
2881
2882
  this.setOptions();
2882
2883
  this.options.api = {
@@ -2885,7 +2886,7 @@
2885
2886
  getNextPossiblePosition: this.getNextPossiblePosition.bind(this),
2886
2887
  getFirstPossiblePosition: this.getFirstPossiblePosition.bind(this),
2887
2888
  getLastPossiblePosition: this.getLastPossiblePosition.bind(this),
2888
- getCurrentRowHeight: this.getCurrentRowHeight.bind(this)
2889
+ getCurrentRowHeight: this.getCurrentRowHeight.bind(this),
2889
2890
  };
2890
2891
  this.columns = this.$options.minCols;
2891
2892
  this.rows = this.$options.minRows;
@@ -2899,7 +2900,7 @@
2899
2900
  GridsterComponent.prototype.resize = function () {
2900
2901
  var height;
2901
2902
  var width;
2902
- if (this.$options.gridType === 'fit' && !this.mobile) {
2903
+ if (this.$options.gridType === "fit" && !this.mobile) {
2903
2904
  width = this.el.offsetWidth;
2904
2905
  height = this.el.offsetHeight;
2905
2906
  }
@@ -2907,14 +2908,15 @@
2907
2908
  width = this.el.clientWidth;
2908
2909
  height = this.el.clientHeight;
2909
2910
  }
2910
- if ((width !== this.curWidth || height !== this.curHeight) && this.checkIfToResize()) {
2911
+ if ((width !== this.curWidth || height !== this.curHeight) &&
2912
+ this.checkIfToResize()) {
2911
2913
  this.onResize();
2912
2914
  }
2913
2915
  };
2914
2916
  GridsterComponent.prototype.setOptions = function () {
2915
2917
  this.$options = GridsterUtils.merge(this.$options, this.options, this.$options);
2916
2918
  if (!this.$options.disableWindowResize && !this.windowResize) {
2917
- this.windowResize = this.renderer.listen('window', 'resize', this.onResize.bind(this));
2919
+ this.windowResize = this.renderer.listen("window", "resize", this.onResize.bind(this));
2918
2920
  }
2919
2921
  else if (this.$options.disableWindowResize && this.windowResize) {
2920
2922
  this.windowResize();
@@ -2940,9 +2942,9 @@
2940
2942
  }
2941
2943
  //if (this.options.api) {
2942
2944
  /* this.options.api getting undefined for new dashboard load- temp fix
2943
- * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2944
- * ondestroy of current this.options.api instance - needs to investigate further
2945
- */
2945
+ * on new dashboard area load, old dashboard area gets destroyed, but that leads to
2946
+ * ondestroy of current this.options.api instance - needs to investigate further
2947
+ */
2946
2948
  if (false) {
2947
2949
  this.options.api.resize = undefined;
2948
2950
  this.options.api.optionsChanged = undefined;
@@ -2965,10 +2967,12 @@
2965
2967
  var clientHeight = this.el.clientHeight;
2966
2968
  var offsetHeight = this.el.offsetHeight;
2967
2969
  var scrollHeight = this.el.scrollHeight;
2968
- var verticalScrollPresent = clientWidth < offsetWidth && scrollHeight > offsetHeight
2969
- && scrollHeight - offsetHeight < offsetWidth - clientWidth;
2970
- var horizontalScrollPresent = clientHeight < offsetHeight
2971
- && scrollWidth > offsetWidth && scrollWidth - offsetWidth < offsetHeight - clientHeight;
2970
+ var verticalScrollPresent = clientWidth < offsetWidth &&
2971
+ scrollHeight > offsetHeight &&
2972
+ scrollHeight - offsetHeight < offsetWidth - clientWidth;
2973
+ var horizontalScrollPresent = clientHeight < offsetHeight &&
2974
+ scrollWidth > offsetWidth &&
2975
+ scrollWidth - offsetWidth < offsetHeight - clientHeight;
2972
2976
  if (verticalScrollPresent) {
2973
2977
  return false;
2974
2978
  }
@@ -2978,7 +2982,8 @@
2978
2982
  var el = this.el;
2979
2983
  var width = el.clientWidth;
2980
2984
  var height = el.clientHeight;
2981
- if (this.$options.setGridSize || this.$options.gridType === 'fit' && !this.mobile) {
2985
+ if (this.$options.setGridSize ||
2986
+ (this.$options.gridType === "fit" && !this.mobile)) {
2982
2987
  width = el.offsetWidth;
2983
2988
  height = el.offsetHeight;
2984
2989
  }
@@ -2993,11 +2998,11 @@
2993
2998
  this.setGridSize();
2994
2999
  if (!this.mobile && this.$options.mobileBreakpoint > this.curWidth) {
2995
3000
  this.mobile = !this.mobile;
2996
- this.renderer.addClass(this.el, 'mobile');
3001
+ this.renderer.addClass(this.el, "mobile");
2997
3002
  }
2998
3003
  else if (this.mobile && this.$options.mobileBreakpoint < this.curWidth) {
2999
3004
  this.mobile = !this.mobile;
3000
- this.renderer.removeClass(this.el, 'mobile');
3005
+ this.renderer.removeClass(this.el, "mobile");
3001
3006
  }
3002
3007
  var rows = this.$options.minRows, columns = this.$options.minCols;
3003
3008
  var widgetsIndex = this.grid.length - 1, widget;
@@ -3025,57 +3030,57 @@
3025
3030
  var marginWidth = -this.$options.margin;
3026
3031
  if (this.$options.outerMarginLeft !== null) {
3027
3032
  marginWidth += this.$options.outerMarginLeft;
3028
- this.renderer.setStyle(this.el, 'padding-left', this.$options.outerMarginLeft + 'px');
3033
+ this.renderer.setStyle(this.el, "padding-left", this.$options.outerMarginLeft + "px");
3029
3034
  }
3030
3035
  else {
3031
3036
  marginWidth += this.$options.margin;
3032
- this.renderer.setStyle(this.el, 'padding-left', this.$options.margin + 'px');
3037
+ this.renderer.setStyle(this.el, "padding-left", this.$options.margin + "px");
3033
3038
  }
3034
3039
  if (this.$options.outerMarginRight !== null) {
3035
3040
  marginWidth += this.$options.outerMarginRight;
3036
- this.renderer.setStyle(this.el, 'padding-right', this.$options.outerMarginRight + 'px');
3041
+ this.renderer.setStyle(this.el, "padding-right", this.$options.outerMarginRight + "px");
3037
3042
  }
3038
3043
  else {
3039
3044
  marginWidth += this.$options.margin;
3040
- this.renderer.setStyle(this.el, 'padding-right', this.$options.margin + 'px');
3045
+ this.renderer.setStyle(this.el, "padding-right", this.$options.margin + "px");
3041
3046
  }
3042
3047
  this.curColWidth = (this.curWidth - marginWidth) / this.columns;
3043
3048
  var marginHeight = -this.$options.margin;
3044
3049
  if (this.$options.outerMarginTop !== null) {
3045
3050
  marginHeight += this.$options.outerMarginTop;
3046
- this.renderer.setStyle(this.el, 'padding-top', this.$options.outerMarginTop + 'px');
3051
+ this.renderer.setStyle(this.el, "padding-top", this.$options.outerMarginTop + "px");
3047
3052
  }
3048
3053
  else {
3049
3054
  marginHeight += this.$options.margin;
3050
- this.renderer.setStyle(this.el, 'padding-top', this.$options.margin + 'px');
3055
+ this.renderer.setStyle(this.el, "padding-top", this.$options.margin + "px");
3051
3056
  }
3052
3057
  if (this.$options.outerMarginBottom !== null) {
3053
3058
  marginHeight += this.$options.outerMarginBottom;
3054
- this.renderer.setStyle(this.el, 'padding-bottom', this.$options.outerMarginBottom + 'px');
3059
+ this.renderer.setStyle(this.el, "padding-bottom", this.$options.outerMarginBottom + "px");
3055
3060
  }
3056
3061
  else {
3057
3062
  marginHeight += this.$options.margin;
3058
- this.renderer.setStyle(this.el, 'padding-bottom', this.$options.margin + 'px');
3063
+ this.renderer.setStyle(this.el, "padding-bottom", this.$options.margin + "px");
3059
3064
  }
3060
3065
  this.curRowHeight = (this.curHeight - marginHeight) / this.rows;
3061
3066
  }
3062
3067
  else {
3063
3068
  this.curColWidth = (this.curWidth + this.$options.margin) / this.columns;
3064
3069
  this.curRowHeight = (this.curHeight + this.$options.margin) / this.rows;
3065
- this.renderer.setStyle(this.el, 'padding-left', 0 + 'px');
3066
- this.renderer.setStyle(this.el, 'padding-right', 0 + 'px');
3067
- this.renderer.setStyle(this.el, 'padding-top', 0 + 'px');
3068
- this.renderer.setStyle(this.el, 'padding-bottom', 0 + 'px');
3070
+ this.renderer.setStyle(this.el, "padding-left", 0 + "px");
3071
+ this.renderer.setStyle(this.el, "padding-right", 0 + "px");
3072
+ this.renderer.setStyle(this.el, "padding-top", 0 + "px");
3073
+ this.renderer.setStyle(this.el, "padding-bottom", 0 + "px");
3069
3074
  }
3070
3075
  this.gridRenderer.updateGridster();
3071
3076
  this.updateGrid();
3072
3077
  if (this.$options.setGridSize) {
3073
- this.renderer.setStyle(this.el, 'width', (this.columns * this.curColWidth + this.$options.margin) + 'px');
3074
- this.renderer.setStyle(this.el, 'height', (this.rows * this.curRowHeight + this.$options.margin) + 'px');
3078
+ this.renderer.setStyle(this.el, "width", this.columns * this.curColWidth + this.$options.margin + "px");
3079
+ this.renderer.setStyle(this.el, "height", this.rows * this.curRowHeight + this.$options.margin + "px");
3075
3080
  }
3076
3081
  else {
3077
- this.renderer.setStyle(this.el, 'width', '');
3078
- this.renderer.setStyle(this.el, 'height', '');
3082
+ this.renderer.setStyle(this.el, "width", "");
3083
+ this.renderer.setStyle(this.el, "height", "");
3079
3084
  }
3080
3085
  var widgetsIndex = this.grid.length - 1, widget;
3081
3086
  for (; widgetsIndex >= 0; widgetsIndex--) {
@@ -3087,18 +3092,23 @@
3087
3092
  setTimeout(this.resize.bind(this), 100);
3088
3093
  };
3089
3094
  GridsterComponent.prototype.updateGrid = function () {
3090
- if (this.$options.displayGrid === 'always' && !this.mobile) {
3091
- this.renderer.addClass(this.el, 'display-grid');
3095
+ if (this.$options.displayGrid === "always" && !this.mobile) {
3096
+ this.renderer.addClass(this.el, "display-grid");
3092
3097
  }
3093
- else if (this.$options.displayGrid === 'onDrag&Resize' && this.dragInProgress) {
3094
- this.renderer.addClass(this.el, 'display-grid');
3098
+ else if (this.$options.displayGrid === "onDrag&Resize" &&
3099
+ this.dragInProgress) {
3100
+ this.renderer.addClass(this.el, "display-grid");
3095
3101
  }
3096
- else if (this.$options.displayGrid === 'none' || !this.dragInProgress || this.mobile) {
3097
- this.renderer.removeClass(this.el, 'display-grid');
3102
+ else if (this.$options.displayGrid === "none" ||
3103
+ !this.dragInProgress ||
3104
+ this.mobile) {
3105
+ this.renderer.removeClass(this.el, "display-grid");
3098
3106
  }
3099
3107
  this.setGridDimensions();
3100
- this.gridColumns.length = Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
3101
- this.gridRows.length = Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
3108
+ this.gridColumns.length =
3109
+ Math.max(this.columns, Math.floor(this.curWidth / this.curColWidth)) || 0;
3110
+ this.gridRows.length =
3111
+ Math.max(this.rows, Math.floor(this.curHeight / this.curRowHeight)) || 0;
3102
3112
  this.cdRef.markForCheck();
3103
3113
  };
3104
3114
  GridsterComponent.prototype.addItem = function (itemComponent) {
@@ -3118,8 +3128,8 @@
3118
3128
  else if (this.checkCollision(itemComponent.$item)) {
3119
3129
  if (!this.$options.disableWarnings) {
3120
3130
  itemComponent.notPlaced = true;
3121
- console.warn('Can\'t be placed in the bounds of the dashboard, trying to auto position!/n' +
3122
- JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
3131
+ console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n" +
3132
+ JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
3123
3133
  }
3124
3134
  if (!this.$options.disableAutoPositionOnConflict) {
3125
3135
  this.autoPositionItem(itemComponent);
@@ -3158,24 +3168,43 @@
3158
3168
  var noNegativePosition = item.y > -1 && item.x > -1;
3159
3169
  var maxGridCols = item.cols + item.x <= this.$options.maxCols;
3160
3170
  var maxGridRows = item.rows + item.y <= this.$options.maxRows;
3161
- var maxItemCols = item.maxItemCols === undefined ? this.$options.maxItemCols : item.maxItemCols;
3162
- var minItemCols = item.minItemCols === undefined ? this.$options.minItemCols : item.minItemCols;
3163
- var maxItemRows = item.maxItemRows === undefined ? this.$options.maxItemRows : item.maxItemRows;
3164
- var minItemRows = item.minItemRows === undefined ? this.$options.minItemRows : item.minItemRows;
3171
+ var maxItemCols = item.maxItemCols === undefined
3172
+ ? this.$options.maxItemCols
3173
+ : item.maxItemCols;
3174
+ var minItemCols = item.minItemCols === undefined
3175
+ ? this.$options.minItemCols
3176
+ : item.minItemCols;
3177
+ var maxItemRows = item.maxItemRows === undefined
3178
+ ? this.$options.maxItemRows
3179
+ : item.maxItemRows;
3180
+ var minItemRows = item.minItemRows === undefined
3181
+ ? this.$options.minItemRows
3182
+ : item.minItemRows;
3165
3183
  var inColsLimits = item.cols <= maxItemCols && item.cols >= minItemCols;
3166
3184
  var inRowsLimits = item.rows <= maxItemRows && item.rows >= minItemRows;
3167
- var minAreaLimit = item.minItemArea === undefined ? this.$options.minItemArea : item.minItemArea;
3168
- var maxAreaLimit = item.maxItemArea === undefined ? this.$options.maxItemArea : item.maxItemArea;
3185
+ var minAreaLimit = item.minItemArea === undefined
3186
+ ? this.$options.minItemArea
3187
+ : item.minItemArea;
3188
+ var maxAreaLimit = item.maxItemArea === undefined
3189
+ ? this.$options.maxItemArea
3190
+ : item.maxItemArea;
3169
3191
  var area = item.cols * item.rows;
3170
3192
  var inMinArea = minAreaLimit <= area;
3171
3193
  var inMaxArea = maxAreaLimit >= area;
3172
- return !(noNegativePosition && maxGridCols && maxGridRows && inColsLimits && inRowsLimits && inMinArea && inMaxArea);
3194
+ return !(noNegativePosition &&
3195
+ maxGridCols &&
3196
+ maxGridRows &&
3197
+ inColsLimits &&
3198
+ inRowsLimits &&
3199
+ inMinArea &&
3200
+ inMaxArea);
3173
3201
  };
3174
3202
  GridsterComponent.prototype.findItemWithItem = function (item) {
3175
3203
  var widgetsIndex = this.grid.length - 1, widget;
3176
3204
  for (; widgetsIndex > -1; widgetsIndex--) {
3177
3205
  widget = this.grid[widgetsIndex];
3178
- if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
3206
+ if (widget.$item !== item &&
3207
+ GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
3179
3208
  return widget;
3180
3209
  }
3181
3210
  }
@@ -3186,7 +3215,8 @@
3186
3215
  var widgetsIndex = this.grid.length - 1, widget;
3187
3216
  for (; widgetsIndex > -1; widgetsIndex--) {
3188
3217
  widget = this.grid[widgetsIndex];
3189
- if (widget.$item !== item && GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
3218
+ if (widget.$item !== item &&
3219
+ GridsterComponent_1.checkCollisionTwoItems(widget.$item, item)) {
3190
3220
  a.push(widget);
3191
3221
  }
3192
3222
  }
@@ -3202,8 +3232,8 @@
3202
3232
  else {
3203
3233
  itemComponent.notPlaced = true;
3204
3234
  if (!this.$options.disableWarnings) {
3205
- console.warn('Can\'t be placed in the bounds of the dashboard!/n' +
3206
- JSON.stringify(itemComponent.item, ['cols', 'rows', 'x', 'y']));
3235
+ console.warn("Can't be placed in the bounds of the dashboard!/n" +
3236
+ JSON.stringify(itemComponent.item, ["cols", "rows", "x", "y"]));
3207
3237
  }
3208
3238
  }
3209
3239
  };
@@ -3250,7 +3280,10 @@
3250
3280
  GridsterComponent.prototype.getLastPossiblePosition = function (item) {
3251
3281
  var farthestItem = { y: 0, x: 0 };
3252
3282
  farthestItem = this.grid.reduce(function (prev, curr) {
3253
- var currCoords = { y: curr.$item.y + curr.$item.rows - 1, x: curr.$item.x + curr.$item.cols - 1 };
3283
+ var currCoords = {
3284
+ y: curr.$item.y + curr.$item.rows - 1,
3285
+ x: curr.$item.x + curr.$item.cols - 1,
3286
+ };
3254
3287
  if (GridsterUtils.compareItems(prev, currCoords) === 1) {
3255
3288
  return currCoords;
3256
3289
  }
@@ -3299,12 +3332,15 @@
3299
3332
  ], GridsterComponent.prototype, "options", void 0);
3300
3333
  GridsterComponent = GridsterComponent_1 = __decorate([
3301
3334
  core.Component({
3302
- selector: 'gridster',
3335
+ selector: "gridster",
3303
3336
  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",
3304
3337
  encapsulation: core.ViewEncapsulation.None,
3305
3338
  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}"]
3306
3339
  }),
3307
- __metadata("design:paramtypes", [core.ElementRef, core.Renderer2, core.ChangeDetectorRef, core.NgZone])
3340
+ __metadata("design:paramtypes", [core.ElementRef,
3341
+ core.Renderer2,
3342
+ core.ChangeDetectorRef,
3343
+ core.NgZone])
3308
3344
  ], GridsterComponent);
3309
3345
  return GridsterComponent;
3310
3346
  }());