@syncfusion/ej2-layouts 21.1.35 → 21.2.3

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.
@@ -2536,7 +2536,8 @@ let DashboardLayout = class DashboardLayout extends Component {
2536
2536
  for (let i = 0; i < this.panels.length; i++) {
2537
2537
  const panelElement = this.element.querySelector('#' + this.panels[i].id);
2538
2538
  this.setMinMaxValues(this.panels[i]);
2539
- if (this.maxColumnValue < this.panels[i].col || this.maxColumnValue < (this.panels[i].col + this.panels[i].sizeX)) {
2539
+ if (this.maxColumnValue < this.panels[i].col ||
2540
+ this.maxColumnValue < (this.panels[i].col + this.panels[i].sizeX)) {
2540
2541
  const colValue = this.maxColumnValue - this.panels[i].sizeX;
2541
2542
  this.panelPropertyChange(this.panels[i], { col: colValue < 0 ? 0 : colValue });
2542
2543
  }
@@ -2640,7 +2641,6 @@ let DashboardLayout = class DashboardLayout extends Component {
2640
2641
  }
2641
2642
  return element;
2642
2643
  }
2643
- // eslint-disable-next-line
2644
2644
  templateParser(template) {
2645
2645
  if (template) {
2646
2646
  try {
@@ -2659,7 +2659,6 @@ let DashboardLayout = class DashboardLayout extends Component {
2659
2659
  return undefined;
2660
2660
  }
2661
2661
  renderTemplate(content, appendElement, type, isStringTemplate, prop) {
2662
- // eslint-disable-next-line
2663
2662
  const templateFn = this.templateParser(content);
2664
2663
  const templateElements = [];
2665
2664
  if ((content[0] === '.' || content[0] === '#') &&
@@ -2938,9 +2937,9 @@ let DashboardLayout = class DashboardLayout extends Component {
2938
2937
  currentX = this.getMaxWidth(panelModel) - this.elementWidth;
2939
2938
  this.mOffX = dX - currentX;
2940
2939
  }
2941
- let initialWidth = this.elementWidth;
2940
+ const initialWidth = this.elementWidth;
2942
2941
  this.elementWidth += currentX;
2943
- let newSizeX = this.pixelsToColumns(this.elementWidth - (panelModel.sizeX) * this.cellSpacing[1], true);
2942
+ const newSizeX = this.pixelsToColumns(this.elementWidth - (panelModel.sizeX) * this.cellSpacing[1], true);
2944
2943
  if (this.columns < panelModel.col + newSizeX) {
2945
2944
  this.elementWidth = initialWidth;
2946
2945
  }
@@ -3176,6 +3175,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3176
3175
  else {
3177
3176
  if (this.element.classList.contains(responsive)) {
3178
3177
  removeClass([this.element], [responsive]);
3178
+ // eslint-disable-next-line
3179
3179
  const internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
3180
3180
  for (let i = 0; i < internalPanels.length; i++) {
3181
3181
  const ele = internalPanels[i];
@@ -3411,7 +3411,8 @@ let DashboardLayout = class DashboardLayout extends Component {
3411
3411
  for (let j = 0; j < cells.length; j++) {
3412
3412
  this.gridPanelCollection.push(cells[j]);
3413
3413
  this.setMinMaxValues(cells[j]);
3414
- if (this.maxColumnValue < cells[j].col || this.maxColumnValue < (cells[j].col + cells[j].sizeX)) {
3414
+ if (this.maxColumnValue < cells[j].col ||
3415
+ this.maxColumnValue < (cells[j].col + cells[j].sizeX)) {
3415
3416
  this.panelPropertyChange(cells[j], { col: this.maxColumnValue - cells[j].sizeX });
3416
3417
  }
3417
3418
  const cell = this.renderCell(cells[j], false, j);
@@ -3865,7 +3866,8 @@ let DashboardLayout = class DashboardLayout extends Component {
3865
3866
  }
3866
3867
  let isSwappable = false;
3867
3868
  for (let count1 = 0; count1 < collisions.length; count1++) {
3868
- if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3869
+ if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] &&
3870
+ this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3869
3871
  return false;
3870
3872
  }
3871
3873
  }
@@ -4205,7 +4207,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4205
4207
  }
4206
4208
  setResizingClass(ele, container) {
4207
4209
  this.availableClasses = this.resizableHandles;
4208
- if (!ele.querySelector(".e-resize")) {
4210
+ if (!ele.querySelector('.e-resize')) {
4209
4211
  for (let j = 0; j < this.availableClasses.length; j++) {
4210
4212
  const spanEle = this.createElement('span');
4211
4213
  let addClassValue;
@@ -4273,7 +4275,8 @@ let DashboardLayout = class DashboardLayout extends Component {
4273
4275
  for (let i = 0; i < this.panels.length; i++) {
4274
4276
  if (((!isNullOrUndefined(added) ? (this.panels[i].id !== added[0].id) : true) &&
4275
4277
  (!isNullOrUndefined(removed) ? (this.panels[i].id !== removed[0].id) : true)) &&
4276
- (this.panels[i].row !== this.panelsInitialModel[i].row || this.panels[i].col !== this.panelsInitialModel[i].col)) {
4278
+ (this.panels[i].row !== this.panelsInitialModel[i].row ||
4279
+ this.panels[i].col !== this.panelsInitialModel[i].col)) {
4277
4280
  changedPanels.push(this.panels[i]);
4278
4281
  }
4279
4282
  }
@@ -4356,7 +4359,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4356
4359
  this.updateDragArea();
4357
4360
  }
4358
4361
  else {
4359
- let currentPanel = this.getCellInstance(this.mainElement.id);
4362
+ const currentPanel = this.getCellInstance(this.mainElement.id);
4360
4363
  for (i = 0; i < this.panels.length; i++) {
4361
4364
  if (this.panels[i].id === currentPanel.id) {
4362
4365
  args.element.setAttribute('data-col', this.panelsInitialModel[i].col.toString());
@@ -4407,6 +4410,7 @@ let DashboardLayout = class DashboardLayout extends Component {
4407
4410
  }
4408
4411
  onDraggingStart(args) {
4409
4412
  const dragArgs = args;
4413
+ // eslint-disable-next-line
4410
4414
  this.trigger('dragStart', dragArgs, (dragArgs) => {
4411
4415
  if (isNullOrUndefined(args.cancel)) {
4412
4416
  args.cancel = false;
@@ -4747,9 +4751,10 @@ let DashboardLayout = class DashboardLayout extends Component {
4747
4751
  const customObject = [];
4748
4752
  for (let i = 0; i < cloneModel.length; i++) {
4749
4753
  customObject.push({
4750
- id: cloneModel[i].id, row: cloneModel[i].row, col: cloneModel[i].col, sizeX: cloneModel[i].sizeX,
4751
- sizeY: cloneModel[i].sizeY, minSizeX: cloneModel[i].minSizeX, minSizeY: cloneModel[i].minSizeY,
4752
- maxSizeX: cloneModel[i].maxSizeX, maxSizeY: cloneModel[i].maxSizeY
4754
+ id: cloneModel[i].id, row: cloneModel[i].row, col: cloneModel[i].col,
4755
+ sizeX: cloneModel[i].sizeX, sizeY: cloneModel[i].sizeY, minSizeX: cloneModel[i].minSizeX,
4756
+ minSizeY: cloneModel[i].minSizeY, maxSizeX: cloneModel[i].maxSizeX,
4757
+ maxSizeY: cloneModel[i].maxSizeY
4753
4758
  });
4754
4759
  }
4755
4760
  return (customObject);