@syncfusion/ej2-layouts 29.1.38 → 29.1.39

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 29.1.38
3
+ * version : 29.1.39
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-layouts@*",
3
- "_id": "@syncfusion/ej2-layouts@29.1.35",
3
+ "_id": "@syncfusion/ej2-layouts@29.1.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-F5qhmuwzK8N3F5G4yfFNoFngB8w5ThNNWoYM8QuAhVTKvcv5aqPUkfD9I0+12evlSqGKvsV609sa/atb90/eNQ==",
5
+ "_integrity": "sha512-0A+Q6uHWpDpVxVcQSW2N7ykvaO5O+Xvscd3ajPkKX+r4CUfvMGLo2qMxd+if+g+fXsnQIIRAY8ELnBMi29vlOQ==",
6
6
  "_location": "/@syncfusion/ej2-layouts",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -26,8 +26,8 @@
26
26
  "/@syncfusion/ej2-react-layouts",
27
27
  "/@syncfusion/ej2-vue-layouts"
28
28
  ],
29
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-29.1.35.tgz",
30
- "_shasum": "dfb29f5c1f6943a5b8f1f68fc97491d2d5176542",
29
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-29.1.38.tgz",
30
+ "_shasum": "e917d635e1376056c95e09744742e8c37c8e71ac",
31
31
  "_spec": "@syncfusion/ej2-layouts@*",
32
32
  "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
33
33
  "author": {
@@ -75,7 +75,7 @@
75
75
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/layouts"
76
76
  },
77
77
  "typings": "index.d.ts",
78
- "version": "29.1.38",
78
+ "version": "29.1.39",
79
79
  "sideEffects": false,
80
80
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
81
81
  }
@@ -403,6 +403,7 @@ export declare class DashboardLayout extends Component<HTMLElement> implements I
403
403
  protected touchMoveResizeHandler(e: TouchEvent): void;
404
404
  protected resizingPanel(el: HTMLElement, panelModel: PanelModel, currentX: number, currentY: number): void;
405
405
  protected upResizeHandler(e: MouseEvent | TouchEvent): void;
406
+ private getChangingPanels;
406
407
  protected getResizeRowColumn(item: PanelModel): PanelModel;
407
408
  protected pixelsToColumns(pixels: number, isCeil: boolean): number;
408
409
  protected pixelsToRows(pixels: number, isCeil: boolean): number;
@@ -461,6 +462,7 @@ export declare class DashboardLayout extends Component<HTMLElement> implements I
461
462
  protected setXYDimensions(panelModel: PanelModel): (string | number)[];
462
463
  protected getRowColumnDragValues(args: DragEventArgs): number[];
463
464
  protected checkForChanges(isInteracted: boolean, added?: PanelModel[], removed?: PanelModel[]): void;
465
+ private getChangedPanels;
464
466
  protected enableDraggingContent(collections: HTMLElement[]): void;
465
467
  protected updatePanels(): void;
466
468
  protected updateDragArea(): void;
@@ -645,15 +647,13 @@ export interface DraggedEventArgs {
645
647
  /**
646
648
  * Defines the dragstop event arguments
647
649
  */
648
- export interface DragStopArgs {
650
+ export interface DragStopArgs extends DragEventArgs {
649
651
  /**
650
- * Specifies the original event.
651
- */
652
- event: MouseEvent | TouchEvent;
653
- /**
654
- * Specifies the cell element being dragged.
652
+ * Represents the model values of panels that have been modified.
653
+ * This property retrieves panel data whose positions have changed
654
+ * due to a drag action before the drop action is completed.
655
655
  */
656
- element: HTMLElement;
656
+ panels?: PanelModel[];
657
657
  }
658
658
  /**
659
659
  * Defines the resize event arguments
@@ -671,6 +671,12 @@ export interface ResizeArgs {
671
671
  * Specifies that event has triggered by user interaction.
672
672
  */
673
673
  isInteracted: boolean;
674
+ /**
675
+ * Represents the model values of panels that have been modified.
676
+ * This property retrieves panel data whose positions have changed
677
+ * due to a resize action before the action is completed.
678
+ */
679
+ panels?: PanelModel[];
674
680
  }
675
681
  interface IAttributes {
676
682
  [key: string]: {
@@ -724,6 +724,7 @@ var DashboardLayout = /** @class */ (function (_super) {
724
724
  this.setHeightAndWidth(el, panelModel);
725
725
  }
726
726
  removeClass([el], [dragging]);
727
+ args.panels = this.getChangingPanels();
727
728
  this.trigger('resizeStop', args);
728
729
  this.resizeCalled = false;
729
730
  this.lastMouseX = this.lastMouseY = undefined;
@@ -736,6 +737,12 @@ var DashboardLayout = /** @class */ (function (_super) {
736
737
  this.updateCloneArrayObject();
737
738
  this.checkForChanges(true);
738
739
  };
740
+ DashboardLayout.prototype.getChangingPanels = function () {
741
+ if (!this.resizeCalled) {
742
+ this.updatePanels();
743
+ }
744
+ return this.getChangedPanels();
745
+ };
739
746
  DashboardLayout.prototype.getResizeRowColumn = function (item) {
740
747
  var isChanged = false;
741
748
  var col = item.col;
@@ -2009,6 +2016,16 @@ var DashboardLayout = /** @class */ (function (_super) {
2009
2016
  return value;
2010
2017
  };
2011
2018
  DashboardLayout.prototype.checkForChanges = function (isInteracted, added, removed) {
2019
+ var changedPanels = this.getChangedPanels(removed);
2020
+ if (changedPanels.length > 0 || this.removeAllCalled) {
2021
+ var changedArgs = {
2022
+ changedPanels: changedPanels, isInteracted: isInteracted,
2023
+ addedPanels: !isNullOrUndefined(added) ? added : [], removedPanels: !isNullOrUndefined(removed) ? removed : []
2024
+ };
2025
+ this.trigger('change', changedArgs);
2026
+ }
2027
+ };
2028
+ DashboardLayout.prototype.getChangedPanels = function (removed) {
2012
2029
  var changedPanels = [];
2013
2030
  if (this.removeAllCalled) {
2014
2031
  changedPanels = [];
@@ -2022,13 +2039,7 @@ var DashboardLayout = /** @class */ (function (_super) {
2022
2039
  }
2023
2040
  }
2024
2041
  }
2025
- if (changedPanels.length > 0 || this.removeAllCalled) {
2026
- var changedArgs = {
2027
- changedPanels: changedPanels, isInteracted: isInteracted,
2028
- addedPanels: !isNullOrUndefined(added) ? added : [], removedPanels: !isNullOrUndefined(removed) ? removed : []
2029
- };
2030
- this.trigger('change', changedArgs);
2031
- }
2042
+ return changedPanels;
2032
2043
  };
2033
2044
  DashboardLayout.prototype.enableDraggingContent = function (collections) {
2034
2045
  var _this = this;
@@ -2045,7 +2056,9 @@ var DashboardLayout = /** @class */ (function (_super) {
2045
2056
  abort: abortArray,
2046
2057
  dragStart: this_3.onDraggingStart.bind(this_3),
2047
2058
  dragStop: function (args) {
2048
- _this.trigger('dragStop', args);
2059
+ var dragStopArgs = args;
2060
+ dragStopArgs.panels = _this.getChangingPanels();
2061
+ _this.trigger('dragStop', dragStopArgs);
2049
2062
  if (isNullOrUndefined(args.cancel)) {
2050
2063
  args.cancel = false;
2051
2064
  }
@@ -2695,6 +2708,7 @@ var DashboardLayout = /** @class */ (function (_super) {
2695
2708
  this.updatePanelLayout(ele, panelInstance);
2696
2709
  this.updatePanels();
2697
2710
  this.updateRowHeight();
2711
+ args.panels = this.getChangingPanels();
2698
2712
  this.resizeCalled = false;
2699
2713
  this.trigger('resizeStop', args);
2700
2714
  this.checkForChanges(false);