@syncfusion/ej2-layouts 21.1.37 → 21.2.6

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.
@@ -341,7 +341,7 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
341
341
  var prePaneSize = this.orientation === 'Horizontal' ? this.previousPane.offsetWidth : this.previousPane.offsetHeight;
342
342
  var nextPaneSize = this.orientation === 'Horizontal' ? this.nextPane.offsetWidth : this.nextPane.offsetHeight;
343
343
  var splitBarSize = isNullOrUndefined(this.separatorSize) ? BAR_SIZE_DEFAULT : this.separatorSize;
344
- if ((this.previousPane.style.flexBasis.indexOf('%') > 0 || this.nextPane.style.flexBasis.indexOf('%') > 0)) {
344
+ if ((this.previousPane.style.flexBasis.indexOf('%') > 0 || this.previousPane.style.flexBasis.indexOf('p') > 0 || this.nextPane.style.flexBasis.indexOf('%') > 0)) {
345
345
  var previousFlexBasis = this.updatePaneFlexBasis(this.previousPane);
346
346
  var nextFlexBasis = this.updatePaneFlexBasis(this.nextPane);
347
347
  this.totalPercent = previousFlexBasis + nextFlexBasis;
@@ -1095,8 +1095,10 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1095
1095
  updatePane.style.flexBasis = isPercent ? this.convertPixelToPercentage(updatePaneOffset + sizeDiff) + '%'
1096
1096
  : (updatePaneOffset + sizeDiff) + 'px';
1097
1097
  var flexPaneOffset = this.orientation === 'Horizontal' ? flexPane.offsetWidth : flexPane.offsetHeight;
1098
- flexPane.style.flexBasis = flexPane.style.flexBasis.indexOf('%') > -1 ?
1099
- this.convertPixelToPercentage(flexPaneOffset - sizeDiff) + '%' : (flexPaneOffset - sizeDiff) + 'px';
1098
+ if (flexPane.style.flexBasis !== '') {
1099
+ flexPane.style.flexBasis = flexPane.style.flexBasis.indexOf('%') > -1 ?
1100
+ this.convertPixelToPercentage(flexPaneOffset - sizeDiff) + '%' : (flexPaneOffset - sizeDiff) + 'px';
1101
+ }
1100
1102
  }
1101
1103
  }
1102
1104
  }
@@ -2586,7 +2588,8 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2586
2588
  for (var i = 0; i < this.panels.length; i++) {
2587
2589
  var panelElement = this.element.querySelector('#' + this.panels[i].id);
2588
2590
  this.setMinMaxValues(this.panels[i]);
2589
- if (this.maxColumnValue < this.panels[i].col || this.maxColumnValue < (this.panels[i].col + this.panels[i].sizeX)) {
2591
+ if (this.maxColumnValue < this.panels[i].col ||
2592
+ this.maxColumnValue < (this.panels[i].col + this.panels[i].sizeX)) {
2590
2593
  var colValue = this.maxColumnValue - this.panels[i].sizeX;
2591
2594
  this.panelPropertyChange(this.panels[i], { col: colValue < 0 ? 0 : colValue });
2592
2595
  }
@@ -2690,7 +2693,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2690
2693
  }
2691
2694
  return element;
2692
2695
  };
2693
- // eslint-disable-next-line
2694
2696
  DashboardLayout.prototype.templateParser = function (template) {
2695
2697
  if (template) {
2696
2698
  try {
@@ -2709,7 +2711,6 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
2709
2711
  return undefined;
2710
2712
  };
2711
2713
  DashboardLayout.prototype.renderTemplate = function (content, appendElement, type, isStringTemplate, prop) {
2712
- // eslint-disable-next-line
2713
2714
  var templateFn = this.templateParser(content);
2714
2715
  var templateElements = [];
2715
2716
  if ((content[0] === '.' || content[0] === '#') &&
@@ -3227,6 +3228,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3227
3228
  else {
3228
3229
  if (this.element.classList.contains(responsive)) {
3229
3230
  removeClass([this.element], [responsive]);
3231
+ // eslint-disable-next-line
3230
3232
  var internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
3231
3233
  for (var i = 0; i < internalPanels.length; i++) {
3232
3234
  var ele = internalPanels[i];
@@ -3469,7 +3471,8 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3469
3471
  for (var j = 0; j < cells.length; j++) {
3470
3472
  this.gridPanelCollection.push(cells[j]);
3471
3473
  this.setMinMaxValues(cells[j]);
3472
- if (this.maxColumnValue < cells[j].col || this.maxColumnValue < (cells[j].col + cells[j].sizeX)) {
3474
+ if (this.maxColumnValue < cells[j].col ||
3475
+ this.maxColumnValue < (cells[j].col + cells[j].sizeX)) {
3473
3476
  this.panelPropertyChange(cells[j], { col: this.maxColumnValue - cells[j].sizeX });
3474
3477
  }
3475
3478
  var cell = this.renderCell(cells[j], false, j);
@@ -3933,7 +3936,8 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3933
3936
  }
3934
3937
  var isSwappable = false;
3935
3938
  for (var count1 = 0; count1 < collisions.length; count1++) {
3936
- if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3939
+ if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] &&
3940
+ this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3937
3941
  return false;
3938
3942
  }
3939
3943
  }
@@ -4278,7 +4282,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4278
4282
  };
4279
4283
  DashboardLayout.prototype.setResizingClass = function (ele, container) {
4280
4284
  this.availableClasses = this.resizableHandles;
4281
- if (!ele.querySelector(".e-resize")) {
4285
+ if (!ele.querySelector('.e-resize')) {
4282
4286
  for (var j = 0; j < this.availableClasses.length; j++) {
4283
4287
  var spanEle = this.createElement('span');
4284
4288
  var addClassValue = void 0;
@@ -4346,7 +4350,8 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4346
4350
  for (var i = 0; i < this.panels.length; i++) {
4347
4351
  if (((!isNullOrUndefined(added) ? (this.panels[i].id !== added[0].id) : true) &&
4348
4352
  (!isNullOrUndefined(removed) ? (this.panels[i].id !== removed[0].id) : true)) &&
4349
- (this.panels[i].row !== this.panelsInitialModel[i].row || this.panels[i].col !== this.panelsInitialModel[i].col)) {
4353
+ (this.panels[i].row !== this.panelsInitialModel[i].row ||
4354
+ this.panels[i].col !== this.panelsInitialModel[i].col)) {
4350
4355
  changedPanels.push(this.panels[i]);
4351
4356
  }
4352
4357
  }
@@ -4487,6 +4492,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4487
4492
  };
4488
4493
  DashboardLayout.prototype.onDraggingStart = function (args) {
4489
4494
  var dragArgs = args;
4495
+ // eslint-disable-next-line
4490
4496
  this.trigger('dragStart', dragArgs, function (dragArgs) {
4491
4497
  if (isNullOrUndefined(args.cancel)) {
4492
4498
  args.cancel = false;
@@ -4827,9 +4833,10 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4827
4833
  var customObject = [];
4828
4834
  for (var i = 0; i < cloneModel.length; i++) {
4829
4835
  customObject.push({
4830
- id: cloneModel[i].id, row: cloneModel[i].row, col: cloneModel[i].col, sizeX: cloneModel[i].sizeX,
4831
- sizeY: cloneModel[i].sizeY, minSizeX: cloneModel[i].minSizeX, minSizeY: cloneModel[i].minSizeY,
4832
- maxSizeX: cloneModel[i].maxSizeX, maxSizeY: cloneModel[i].maxSizeY
4836
+ id: cloneModel[i].id, row: cloneModel[i].row, col: cloneModel[i].col,
4837
+ sizeX: cloneModel[i].sizeX, sizeY: cloneModel[i].sizeY, minSizeX: cloneModel[i].minSizeX,
4838
+ minSizeY: cloneModel[i].minSizeY, maxSizeX: cloneModel[i].maxSizeX,
4839
+ maxSizeY: cloneModel[i].maxSizeY
4833
4840
  });
4834
4841
  }
4835
4842
  return (customObject);