@syncfusion/ej2-layouts 21.2.6 → 22.1.34

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.
Files changed (57) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +16 -0
  3. package/dist/ej2-layouts.min.js +2 -2
  4. package/dist/ej2-layouts.umd.min.js +2 -2
  5. package/dist/ej2-layouts.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-layouts.es2015.js +30 -17
  7. package/dist/es6/ej2-layouts.es2015.js.map +1 -1
  8. package/dist/es6/ej2-layouts.es5.js +30 -17
  9. package/dist/es6/ej2-layouts.es5.js.map +1 -1
  10. package/dist/global/ej2-layouts.min.js +2 -2
  11. package/dist/global/ej2-layouts.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +6 -6
  14. package/src/dashboard-layout/dashboard-layout-model.d.ts +5 -3
  15. package/src/dashboard-layout/dashboard-layout.d.ts +6 -4
  16. package/src/dashboard-layout/dashboard-layout.js +27 -17
  17. package/src/splitter/splitter.js +3 -0
  18. package/styles/avatar/_material3-dark-definition.scss +1 -0
  19. package/styles/avatar/_material3-definition.scss +26 -0
  20. package/styles/avatar/material3-dark.css +114 -0
  21. package/styles/avatar/material3-dark.scss +4 -0
  22. package/styles/avatar/material3.css +170 -0
  23. package/styles/avatar/material3.scss +4 -0
  24. package/styles/bootstrap4.css +3 -2
  25. package/styles/card/_bootstrap4-definition.scss +3 -2
  26. package/styles/card/_layout.scss +2 -2
  27. package/styles/card/_material3-dark-definition.scss +1 -0
  28. package/styles/card/_material3-definition.scss +125 -0
  29. package/styles/card/bootstrap4.css +3 -2
  30. package/styles/card/fabric.css +1 -1
  31. package/styles/card/highcontrast.css +1 -1
  32. package/styles/card/material3-dark.css +567 -0
  33. package/styles/card/material3-dark.scss +4 -0
  34. package/styles/card/material3.css +623 -0
  35. package/styles/card/material3.scss +4 -0
  36. package/styles/dashboard-layout/_layout.scss +1 -1
  37. package/styles/dashboard-layout/_material3-dark-definition.scss +1 -0
  38. package/styles/dashboard-layout/_material3-definition.scss +108 -0
  39. package/styles/dashboard-layout/_theme.scss +1 -1
  40. package/styles/dashboard-layout/icons/_material3-dark.scss +1 -0
  41. package/styles/dashboard-layout/material3-dark.css +357 -0
  42. package/styles/dashboard-layout/material3-dark.scss +5 -0
  43. package/styles/dashboard-layout/material3.css +413 -0
  44. package/styles/dashboard-layout/material3.scss +5 -0
  45. package/styles/fabric.css +1 -1
  46. package/styles/highcontrast.css +1 -1
  47. package/styles/material3-dark.css +1414 -0
  48. package/styles/material3-dark.scss +6 -0
  49. package/styles/material3.css +1470 -0
  50. package/styles/material3.scss +6 -0
  51. package/styles/splitter/_material3-dark-definition.scss +1 -0
  52. package/styles/splitter/_material3-definition.scss +31 -0
  53. package/styles/splitter/icons/_material3-dark.scss +1 -0
  54. package/styles/splitter/material3-dark.css +543 -0
  55. package/styles/splitter/material3-dark.scss +5 -0
  56. package/styles/splitter/material3.css +599 -0
  57. package/styles/splitter/material3.scss +5 -0
@@ -1780,6 +1780,9 @@ let Splitter = class Splitter extends Component {
1780
1780
  if (this.paneSettings[i].size === '') {
1781
1781
  flexPaneCount = flexPaneCount + 1;
1782
1782
  }
1783
+ else if ((!this.isReact) && this.allPanes[i].style.flexBasis !== '') {
1784
+ this.paneSettings[i].size = this.allPanes[i].style.flexBasis;
1785
+ }
1783
1786
  }
1784
1787
  const allFlexiblePanes = flexPaneCount === this.allPanes.length;
1785
1788
  // Two flexible Pane Case.
@@ -2646,7 +2649,7 @@ let DashboardLayout = class DashboardLayout extends Component {
2646
2649
  templateParser(template) {
2647
2650
  if (template) {
2648
2651
  try {
2649
- if (document.querySelectorAll(template).length) {
2652
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
2650
2653
  return compile(document.querySelector(template).innerHTML.trim());
2651
2654
  }
2652
2655
  else {
@@ -2779,18 +2782,23 @@ let DashboardLayout = class DashboardLayout extends Component {
2779
2782
  this.resizeEvents();
2780
2783
  }
2781
2784
  downResizeHandler(e) {
2782
- this.downHandler(e);
2783
- this.lastMouseX = e.pageX;
2784
- this.lastMouseY = e.pageY;
2785
- const moveEventName = (Browser.info.name === 'msie') ? 'mousemove pointermove' : 'mousemove';
2786
- const upEventName = (Browser.info.name === 'msie') ? 'mouseup pointerup' : 'mouseup';
2787
- if (!this.isMouseMoveBound) {
2788
- EventHandler.add(document, moveEventName, this.moveResizeHandler, this);
2789
- this.isMouseMoveBound = true;
2790
- }
2791
- if (!this.isMouseUpBound) {
2792
- EventHandler.add(document, upEventName, this.upResizeHandler, this);
2793
- this.isMouseUpBound = true;
2785
+ const el = closest((e.currentTarget), '.e-panel');
2786
+ for (let i = 0; this.panels.length > i; i++) {
2787
+ if (this.panels[i].enabled && this.panels[i].id === el.id) {
2788
+ this.downHandler(e);
2789
+ this.lastMouseX = e.pageX;
2790
+ this.lastMouseY = e.pageY;
2791
+ const moveEventName = (Browser.info.name === 'msie') ? 'mousemove pointermove' : 'mousemove';
2792
+ const upEventName = (Browser.info.name === 'msie') ? 'mouseup pointerup' : 'mouseup';
2793
+ if (!this.isMouseMoveBound) {
2794
+ EventHandler.add(document, moveEventName, this.moveResizeHandler, this);
2795
+ this.isMouseMoveBound = true;
2796
+ }
2797
+ if (!this.isMouseUpBound) {
2798
+ EventHandler.add(document, upEventName, this.upResizeHandler, this);
2799
+ this.isMouseUpBound = true;
2800
+ }
2801
+ }
2794
2802
  }
2795
2803
  }
2796
2804
  downHandler(e) {
@@ -2955,7 +2963,12 @@ let DashboardLayout = class DashboardLayout extends Component {
2955
2963
  this.panelPropertyChange(item, { sizeX: item.sizeX - 1 });
2956
2964
  }
2957
2965
  this.shadowEle.style.top = ((item.row * this.getCellSize()[1] + (item.row * this.cellSpacing[1]))) + 'px';
2958
- this.shadowEle.style.left = ((item.col * this.getCellSize()[0]) + ((item.col) * this.cellSpacing[0])) + 'px';
2966
+ if (this.handleClass.indexOf('west') >= 0) {
2967
+ this.shadowEle.style.left = ((item.col * this.getCellSize()[0]) + ((item.col - 1) * this.cellSpacing[0])) + 'px';
2968
+ }
2969
+ else {
2970
+ this.shadowEle.style.left = ((item.col * this.getCellSize()[0]) + ((item.col) * this.cellSpacing[0])) + 'px';
2971
+ }
2959
2972
  this.shadowEle.style.height = ((item.sizeY * (this.getCellSize()[1] + (this.cellSpacing[1])))) + 'px';
2960
2973
  this.shadowEle.style.width = ((item.sizeX * (this.getCellSize()[0] + (this.cellSpacing[0])))) + 'px';
2961
2974
  if (oldSizeX !== item.sizeX || oldSizeY !== item.sizeY) {
@@ -2972,6 +2985,7 @@ let DashboardLayout = class DashboardLayout extends Component {
2972
2985
  };
2973
2986
  this.setAttributes(value, el);
2974
2987
  this.mainElement = el;
2988
+ this.checkCollision = [];
2975
2989
  this.updatePanelLayout(el, this.getCellInstance(el.id));
2976
2990
  this.updateOldRowColumn();
2977
2991
  this.sortedPanel();
@@ -3052,12 +3066,11 @@ let DashboardLayout = class DashboardLayout extends Component {
3052
3066
  return item;
3053
3067
  }
3054
3068
  pixelsToColumns(pixels, isCeil) {
3055
- const curColWidth = this.cellSize[0];
3056
3069
  if (isCeil) {
3057
- return Math.ceil(pixels / curColWidth);
3070
+ return Math.ceil(pixels / this.cellSize[0]);
3058
3071
  }
3059
3072
  else {
3060
- return Math.floor(pixels / curColWidth);
3073
+ return Math.floor(pixels / (this.cellSize[0] + this.cellSpacing[0]));
3061
3074
  }
3062
3075
  }
3063
3076
  pixelsToRows(pixels, isCeil) {