@syncfusion/ej2-layouts 20.3.56 → 20.3.58
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.
- package/CHANGELOG.md +20 -0
- package/dist/ej2-layouts.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js +2 -2
- package/dist/ej2-layouts.umd.min.js.map +1 -1
- package/dist/es6/ej2-layouts.es2015.js +64 -11
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +64 -11
- package/dist/es6/ej2-layouts.es5.js.map +1 -1
- package/dist/global/ej2-layouts.min.js +2 -2
- package/dist/global/ej2-layouts.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/dashboard-layout/dashboard-layout.js +10 -2
- package/src/splitter/splitter.js +54 -9
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version : 20.3.
|
3
|
+
* version : 20.3.58
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.3.
|
3
|
+
"_id": "@syncfusion/ej2-layouts@20.3.57",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-Two7Z8n8/p2BiIxVO4cbgi/Cd35E4i3eJRcYqjIdVI1LWpoldBAHN0SYOoD+1dOVtMdyb+c6aYYFs1oJ8NrmTA==",
|
6
6
|
"_location": "/@syncfusion/ej2-layouts",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -27,8 +27,8 @@
|
|
27
27
|
"/@syncfusion/ej2-react-layouts",
|
28
28
|
"/@syncfusion/ej2-vue-layouts"
|
29
29
|
],
|
30
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-20.3.
|
31
|
-
"_shasum": "
|
30
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-layouts/-/ej2-layouts-20.3.57.tgz",
|
31
|
+
"_shasum": "9c5c343bf3efce05613807a577b02459ab499ff3",
|
32
32
|
"_spec": "@syncfusion/ej2-layouts@*",
|
33
33
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
34
34
|
"author": {
|
@@ -76,6 +76,6 @@
|
|
76
76
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/layouts"
|
77
77
|
},
|
78
78
|
"typings": "index.d.ts",
|
79
|
-
"version": "20.3.
|
79
|
+
"version": "20.3.58",
|
80
80
|
"sideEffects": false
|
81
81
|
}
|
@@ -349,6 +349,9 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
349
349
|
if (document.querySelectorAll(template).length) {
|
350
350
|
return compile(document.querySelector(template).innerHTML.trim());
|
351
351
|
}
|
352
|
+
else {
|
353
|
+
return compile(template);
|
354
|
+
}
|
352
355
|
}
|
353
356
|
catch (error) {
|
354
357
|
var sanitizedValue = SanitizeHtmlHelper.sanitize(template);
|
@@ -638,7 +641,12 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
638
641
|
currentX = this.getMaxWidth(panelModel) - this.elementWidth;
|
639
642
|
this.mOffX = dX - currentX;
|
640
643
|
}
|
644
|
+
var initialWidth = this.elementWidth;
|
641
645
|
this.elementWidth += currentX;
|
646
|
+
var newSizeX = this.pixelsToColumns(this.elementWidth - (panelModel.sizeX) * this.cellSpacing[1], true);
|
647
|
+
if (this.columns < panelModel.col + newSizeX) {
|
648
|
+
this.elementWidth = initialWidth;
|
649
|
+
}
|
642
650
|
}
|
643
651
|
el.style.top = this.elementY + 'px';
|
644
652
|
el.style.left = this.elementX + 'px';
|
@@ -735,8 +743,8 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
735
743
|
sizeY = this.pixelsToRows(this.elementHeight - (sizeY) * this.cellSpacing[0], true);
|
736
744
|
}
|
737
745
|
}
|
738
|
-
if (item.col +
|
739
|
-
item.sizeX =
|
746
|
+
if (item.col + sizeX > this.columns) {
|
747
|
+
item.sizeX = sizeX - 1;
|
740
748
|
}
|
741
749
|
var canOccupy = row > -1 && col > -1 && sizeX + col <= this.maxCol() && sizeY + row <= this.maxRow();
|
742
750
|
if (canOccupy && (this.collisions(row, col, sizeX, sizeY, this.getPanelBase(item.id)).length === 0)
|
package/src/splitter/splitter.js
CHANGED
@@ -161,6 +161,9 @@ var Splitter = /** @class */ (function (_super) {
|
|
161
161
|
case 'paneSettings': {
|
162
162
|
if (!(newProp.paneSettings instanceof Array && oldProp.paneSettings instanceof Array)) {
|
163
163
|
var paneCounts = Object.keys(newProp.paneSettings);
|
164
|
+
if (this.isReact) {
|
165
|
+
this.clearTemplate();
|
166
|
+
}
|
164
167
|
for (var i = 0; i < paneCounts.length; i++) {
|
165
168
|
var index = parseInt(Object.keys(newProp.paneSettings)[i], 10);
|
166
169
|
var changedPropsCount = Object.keys(newProp.paneSettings[index]).length;
|
@@ -1048,9 +1051,11 @@ var Splitter = /** @class */ (function (_super) {
|
|
1048
1051
|
}
|
1049
1052
|
var avgDiffWidth = diff / flexPaneIndexes.length;
|
1050
1053
|
for (var j = 0, len = flexPaneIndexes.length; j < len; j++) {
|
1051
|
-
this.allPanes[flexPaneIndexes[j]].style.flexBasis
|
1052
|
-
|
1053
|
-
|
1054
|
+
if (this.allPanes[flexPaneIndexes[j]].style.flexBasis !== '') {
|
1055
|
+
this.allPanes[flexPaneIndexes[j]].style.flexBasis = this.orientation === 'Horizontal' ?
|
1056
|
+
(this.allPanes[flexPaneIndexes[j]].offsetWidth + avgDiffWidth) + 'px' :
|
1057
|
+
(this.allPanes[flexPaneIndexes[j]].offsetHeight + avgDiffWidth) + 'px';
|
1058
|
+
}
|
1054
1059
|
}
|
1055
1060
|
if (this.allPanes.length === 2 && iswindowResize) {
|
1056
1061
|
var paneCount = this.allPanes.length;
|
@@ -1573,6 +1578,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
1573
1578
|
return (value / offsetValue) * 100;
|
1574
1579
|
};
|
1575
1580
|
Splitter.prototype.convertPixelToNumber = function (value) {
|
1581
|
+
value = value.toString();
|
1576
1582
|
if (value.indexOf('p') > -1) {
|
1577
1583
|
return parseFloat(value.slice(0, value.indexOf('p')));
|
1578
1584
|
}
|
@@ -1726,7 +1732,10 @@ var Splitter = /** @class */ (function (_super) {
|
|
1726
1732
|
this.nextPaneHeightWidth =
|
1727
1733
|
(typeof (this.nextPaneHeightWidth) === 'string' && this.nextPaneHeightWidth.indexOf('p') > -1) ?
|
1728
1734
|
this.convertPixelToNumber(this.nextPaneHeightWidth) : parseInt(this.nextPaneHeightWidth, 10);
|
1729
|
-
this.
|
1735
|
+
this.previousPaneHeightWidth =
|
1736
|
+
(typeof (this.previousPaneHeightWidth) === 'string' && this.previousPaneHeightWidth.indexOf('p') > -1) ?
|
1737
|
+
this.convertPixelToNumber(this.previousPaneHeightWidth) : parseInt(this.previousPaneHeightWidth, 10);
|
1738
|
+
this.prevPaneCurrentWidth = separatorNewPosition + this.previousPaneHeightWidth;
|
1730
1739
|
this.nextPaneCurrentWidth = this.nextPaneHeightWidth - separatorNewPosition;
|
1731
1740
|
this.validateMinMaxValues();
|
1732
1741
|
if (this.nextPaneCurrentWidth < 0) {
|
@@ -1753,9 +1762,45 @@ var Splitter = /** @class */ (function (_super) {
|
|
1753
1762
|
}
|
1754
1763
|
this.calculateCurrentDimensions();
|
1755
1764
|
this.addStaticPaneClass();
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1765
|
+
var flexPaneCount = 0;
|
1766
|
+
for (var i = 0; i < this.paneSettings.length; i++) {
|
1767
|
+
if (this.paneSettings[i].size === '') {
|
1768
|
+
flexPaneCount = flexPaneCount + 1;
|
1769
|
+
}
|
1770
|
+
}
|
1771
|
+
var allFlexiblePanes = flexPaneCount === this.allPanes.length;
|
1772
|
+
// Two flexible Pane Case.
|
1773
|
+
if (this.previousPane.style.flexBasis == '' && this.nextPane.style.flexBasis == '' && !allFlexiblePanes) {
|
1774
|
+
var middlePaneIndex = this.allPanes.length % this.allBars.length;
|
1775
|
+
if (this.prevPaneIndex === middlePaneIndex) {
|
1776
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1777
|
+
addClass([this.nextPane], STATIC_PANE);
|
1778
|
+
}
|
1779
|
+
else if (this.nextPaneIndex == middlePaneIndex) {
|
1780
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1781
|
+
addClass([this.previousPane], STATIC_PANE);
|
1782
|
+
}
|
1783
|
+
else {
|
1784
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1785
|
+
addClass([this.nextPane], STATIC_PANE);
|
1786
|
+
}
|
1787
|
+
} // All panes are flexible
|
1788
|
+
else if (allFlexiblePanes) {
|
1789
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1790
|
+
addClass([this.previousPane], STATIC_PANE);
|
1791
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1792
|
+
addClass([this.nextPane], STATIC_PANE);
|
1793
|
+
} // Two Panesa are Static Pane
|
1794
|
+
else {
|
1795
|
+
if (this.previousPane.style.flexBasis !== "" && this.previousPane.classList.contains(STATIC_PANE)) {
|
1796
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1797
|
+
}
|
1798
|
+
if (this.nextPane.style.flexBasis !== "" && this.nextPane.classList.contains(STATIC_PANE)) {
|
1799
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1800
|
+
}
|
1801
|
+
}
|
1802
|
+
var isStaticPanes = this.previousPane.style.flexBasis !== "" && this.nextPane.style.flexBasis !== "";
|
1803
|
+
if (!(this.allPanes.length > 2) && isStaticPanes) {
|
1759
1804
|
this.updateSplitterSize();
|
1760
1805
|
}
|
1761
1806
|
};
|
@@ -1859,10 +1904,10 @@ var Splitter = /** @class */ (function (_super) {
|
|
1859
1904
|
}
|
1860
1905
|
};
|
1861
1906
|
Splitter.prototype.addStaticPaneClass = function () {
|
1862
|
-
if (!this.previousPane.classList.contains(STATIC_PANE)) {
|
1907
|
+
if (!this.previousPane.classList.contains(STATIC_PANE) && !(this.previousPane.style.flexBasis === '') && !this.previousPane.classList.contains(EXPAND_PANE)) {
|
1863
1908
|
this.previousPane.classList.add(STATIC_PANE);
|
1864
1909
|
}
|
1865
|
-
if (!this.nextPane.classList.contains(STATIC_PANE)) {
|
1910
|
+
if (!this.nextPane.classList.contains(STATIC_PANE) && !(this.nextPane.style.flexBasis === '') && !this.nextPane.classList.contains(EXPAND_PANE)) {
|
1866
1911
|
this.nextPane.classList.add(STATIC_PANE);
|
1867
1912
|
}
|
1868
1913
|
};
|