@syncfusion/ej2-layouts 20.3.57 → 20.4.38
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/.eslintrc.json +16 -1
- package/CHANGELOG.md +0 -8
- 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 +82 -20
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +80 -18
- 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 +6 -6
- package/src/dashboard-layout/dashboard-layout.js +9 -4
- package/src/splitter/splitter.js +71 -15
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version : 20.
|
3
|
+
* version : 20.4.38
|
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@
|
3
|
+
"_id": "@syncfusion/ej2-layouts@19.9.10",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-jYbKZvwoXqfKIa4IHaLThdZ7R/ueD7KmfqOl993d2OWKf3VnAv+dNfZyxCyThm08XQFdW49eIdWSFq7h1GmSvA==",
|
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-
|
31
|
-
"_shasum": "
|
30
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-layouts/-/ej2-layouts-19.9.10.tgz",
|
31
|
+
"_shasum": "b50cd2037d395d2024faac0076b7123031d59540",
|
32
32
|
"_spec": "@syncfusion/ej2-layouts@*",
|
33
33
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
34
34
|
"author": {
|
@@ -36,7 +36,7 @@
|
|
36
36
|
},
|
37
37
|
"bundleDependencies": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@syncfusion/ej2-base": "~20.
|
39
|
+
"@syncfusion/ej2-base": "~20.4.38"
|
40
40
|
},
|
41
41
|
"deprecated": false,
|
42
42
|
"description": "A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person.",
|
@@ -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.
|
79
|
+
"version": "20.4.38",
|
80
80
|
"sideEffects": false
|
81
81
|
}
|
@@ -641,7 +641,12 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
641
641
|
currentX = this.getMaxWidth(panelModel) - this.elementWidth;
|
642
642
|
this.mOffX = dX - currentX;
|
643
643
|
}
|
644
|
+
var initialWidth = this.elementWidth;
|
644
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
|
+
}
|
645
650
|
}
|
646
651
|
el.style.top = this.elementY + 'px';
|
647
652
|
el.style.left = this.elementX + 'px';
|
@@ -738,8 +743,8 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
738
743
|
sizeY = this.pixelsToRows(this.elementHeight - (sizeY) * this.cellSpacing[0], true);
|
739
744
|
}
|
740
745
|
}
|
741
|
-
if (item.col +
|
742
|
-
item.sizeX =
|
746
|
+
if (item.col + sizeX > this.columns) {
|
747
|
+
item.sizeX = sizeX - 1;
|
743
748
|
}
|
744
749
|
var canOccupy = row > -1 && col > -1 && sizeX + col <= this.maxCol() && sizeY + row <= this.maxRow();
|
745
750
|
if (canOccupy && (this.collisions(row, col, sizeX, sizeY, this.getPanelBase(item.id)).length === 0)
|
@@ -1753,7 +1758,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
1753
1758
|
if (this.collisionChecker[this.panels[i].id] && this.collisionChecker[this.panels[i].id] !== null) {
|
1754
1759
|
this.overlapElement = [this.collisionChecker[this.panels[i].id].ele];
|
1755
1760
|
var key = this.panels[i].id;
|
1756
|
-
this.updateRowColumn(this.collisionChecker[key].row, this.overlapElement, this.collisionChecker[key].srcEle);
|
1761
|
+
this.updateRowColumn(this.collisionChecker["" + key].row, this.overlapElement, this.collisionChecker["" + key].srcEle);
|
1757
1762
|
}
|
1758
1763
|
}
|
1759
1764
|
};
|
@@ -2143,7 +2148,7 @@ var DashboardLayout = /** @class */ (function (_super) {
|
|
2143
2148
|
}
|
2144
2149
|
// eslint-disable-next-line guard-for-in
|
2145
2150
|
for (var k in source[i]) {
|
2146
|
-
target[i][k] = source[i][k];
|
2151
|
+
target[i]["" + k] = source[i]["" + k];
|
2147
2152
|
}
|
2148
2153
|
}
|
2149
2154
|
return target;
|
package/src/splitter/splitter.js
CHANGED
@@ -161,6 +161,19 @@ 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
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
165
|
+
if (this.isReact) {
|
166
|
+
var cPaneCount = 0;
|
167
|
+
for (var k = 0; k < this.paneSettings.length; k++) {
|
168
|
+
if (typeof (this.paneSettings[k].content) === 'function') {
|
169
|
+
cPaneCount = cPaneCount + 1;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
var hasAllContent = cPaneCount === this.paneSettings.length;
|
173
|
+
if (hasAllContent) {
|
174
|
+
this.clearTemplate();
|
175
|
+
}
|
176
|
+
}
|
164
177
|
for (var i = 0; i < paneCounts.length; i++) {
|
165
178
|
var index = parseInt(Object.keys(newProp.paneSettings)[i], 10);
|
166
179
|
var changedPropsCount = Object.keys(newProp.paneSettings[index]).length;
|
@@ -168,7 +181,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
168
181
|
var property = Object.keys(newProp.paneSettings[index])[j];
|
169
182
|
switch (property) {
|
170
183
|
case 'content': {
|
171
|
-
var newValue = Object(newProp.paneSettings[index])[property];
|
184
|
+
var newValue = Object(newProp.paneSettings[index])["" + property];
|
172
185
|
if (!isNullOrUndefined(newValue)) {
|
173
186
|
this.allPanes[index].innerHTML = '';
|
174
187
|
this.setTemplate(newValue, this.allPanes[index]);
|
@@ -176,7 +189,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
176
189
|
break;
|
177
190
|
}
|
178
191
|
case 'resizable': {
|
179
|
-
var newVal = Object(newProp.paneSettings[index])[property];
|
192
|
+
var newVal = Object(newProp.paneSettings[index])["" + property];
|
180
193
|
this.resizableModel(index, newVal);
|
181
194
|
break;
|
182
195
|
}
|
@@ -188,10 +201,11 @@ var Splitter = /** @class */ (function (_super) {
|
|
188
201
|
newProp.paneSettings[index].collapsed ? this.isCollapsed(index) : this.collapsedOnchange(index);
|
189
202
|
break;
|
190
203
|
case 'cssClass':
|
204
|
+
// eslint-disable-next-line max-len
|
191
205
|
this.setCssClass(this.allPanes[index], newProp.paneSettings[index].cssClass);
|
192
206
|
break;
|
193
207
|
case 'size': {
|
194
|
-
var newValSize = Object(newProp.paneSettings[index])[property];
|
208
|
+
var newValSize = Object(newProp.paneSettings[index])["" + property];
|
195
209
|
if (newValSize !== '' && !isNullOrUndefined(newValSize)) {
|
196
210
|
this.updatePaneSize(newValSize, index);
|
197
211
|
}
|
@@ -401,7 +415,6 @@ var Splitter = /** @class */ (function (_super) {
|
|
401
415
|
}
|
402
416
|
};
|
403
417
|
Splitter.prototype.getMinInPixel = function (minValue) {
|
404
|
-
var min;
|
405
418
|
if (isNullOrUndefined(minValue)) {
|
406
419
|
return 0;
|
407
420
|
}
|
@@ -409,7 +422,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
409
422
|
if (minValue.indexOf('%') > 0) {
|
410
423
|
paneMinRange = this.convertPercentageToPixel(minValue);
|
411
424
|
}
|
412
|
-
min = this.convertPixelToNumber((paneMinRange).toString());
|
425
|
+
var min = this.convertPixelToNumber((paneMinRange).toString());
|
413
426
|
return min;
|
414
427
|
};
|
415
428
|
/**
|
@@ -643,6 +656,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
643
656
|
_this.updateIsCollapsed(index, _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
|
644
657
|
for (var i = 0; i < collapsedindex.length; i++) {
|
645
658
|
if (!_this.allPanes[collapsedindex[i]].classList.contains(COLLAPSE_PANE)) {
|
659
|
+
// eslint-disable-next-line max-len
|
646
660
|
_this.updateIsCollapsed(collapsedindex[i], _this.targetArrows().collapseArrow, _this.targetArrows().lastBarArrow);
|
647
661
|
}
|
648
662
|
}
|
@@ -887,7 +901,6 @@ var Splitter = /** @class */ (function (_super) {
|
|
887
901
|
var childCount = this.allPanes.length;
|
888
902
|
var clonedEle = target.children;
|
889
903
|
var separator;
|
890
|
-
var proxy;
|
891
904
|
for (var i = 0; i < childCount; i++) {
|
892
905
|
if (i < childCount - 1) {
|
893
906
|
separator = this.createSeparator(i);
|
@@ -1033,6 +1046,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
1033
1046
|
}
|
1034
1047
|
for (var j = 0, len = this.allBars.length; j < len; j++) {
|
1035
1048
|
totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
|
1049
|
+
// eslint-disable-next-line max-len
|
1036
1050
|
parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
|
1037
1051
|
parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
|
1038
1052
|
}
|
@@ -1048,9 +1062,11 @@ var Splitter = /** @class */ (function (_super) {
|
|
1048
1062
|
}
|
1049
1063
|
var avgDiffWidth = diff / flexPaneIndexes.length;
|
1050
1064
|
for (var j = 0, len = flexPaneIndexes.length; j < len; j++) {
|
1051
|
-
this.allPanes[flexPaneIndexes[j]].style.flexBasis
|
1052
|
-
|
1053
|
-
|
1065
|
+
if (this.allPanes[flexPaneIndexes[j]].style.flexBasis !== '') {
|
1066
|
+
this.allPanes[flexPaneIndexes[j]].style.flexBasis = this.orientation === 'Horizontal' ?
|
1067
|
+
(this.allPanes[flexPaneIndexes[j]].offsetWidth + avgDiffWidth) + 'px' :
|
1068
|
+
(this.allPanes[flexPaneIndexes[j]].offsetHeight + avgDiffWidth) + 'px';
|
1069
|
+
}
|
1054
1070
|
}
|
1055
1071
|
if (this.allPanes.length === 2 && iswindowResize) {
|
1056
1072
|
var paneCount = this.allPanes.length;
|
@@ -1573,6 +1589,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
1573
1589
|
return (value / offsetValue) * 100;
|
1574
1590
|
};
|
1575
1591
|
Splitter.prototype.convertPixelToNumber = function (value) {
|
1592
|
+
value = value.toString();
|
1576
1593
|
if (value.indexOf('p') > -1) {
|
1577
1594
|
return parseFloat(value.slice(0, value.indexOf('p')));
|
1578
1595
|
}
|
@@ -1726,7 +1743,10 @@ var Splitter = /** @class */ (function (_super) {
|
|
1726
1743
|
this.nextPaneHeightWidth =
|
1727
1744
|
(typeof (this.nextPaneHeightWidth) === 'string' && this.nextPaneHeightWidth.indexOf('p') > -1) ?
|
1728
1745
|
this.convertPixelToNumber(this.nextPaneHeightWidth) : parseInt(this.nextPaneHeightWidth, 10);
|
1729
|
-
this.
|
1746
|
+
this.previousPaneHeightWidth =
|
1747
|
+
(typeof (this.previousPaneHeightWidth) === 'string' && this.previousPaneHeightWidth.indexOf('p') > -1) ?
|
1748
|
+
this.convertPixelToNumber(this.previousPaneHeightWidth) : parseInt(this.previousPaneHeightWidth, 10);
|
1749
|
+
this.prevPaneCurrentWidth = separatorNewPosition + this.previousPaneHeightWidth;
|
1730
1750
|
this.nextPaneCurrentWidth = this.nextPaneHeightWidth - separatorNewPosition;
|
1731
1751
|
this.validateMinMaxValues();
|
1732
1752
|
if (this.nextPaneCurrentWidth < 0) {
|
@@ -1753,9 +1773,45 @@ var Splitter = /** @class */ (function (_super) {
|
|
1753
1773
|
}
|
1754
1774
|
this.calculateCurrentDimensions();
|
1755
1775
|
this.addStaticPaneClass();
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1776
|
+
var flexPaneCount = 0;
|
1777
|
+
for (var i = 0; i < this.paneSettings.length; i++) {
|
1778
|
+
if (this.paneSettings[i].size === '') {
|
1779
|
+
flexPaneCount = flexPaneCount + 1;
|
1780
|
+
}
|
1781
|
+
}
|
1782
|
+
var allFlexiblePanes = flexPaneCount === this.allPanes.length;
|
1783
|
+
// Two flexible Pane Case.
|
1784
|
+
if (this.previousPane.style.flexBasis === '' && this.nextPane.style.flexBasis == '' && !allFlexiblePanes) {
|
1785
|
+
var middlePaneIndex = this.allPanes.length % this.allBars.length;
|
1786
|
+
if (this.prevPaneIndex === middlePaneIndex) {
|
1787
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1788
|
+
addClass([this.nextPane], STATIC_PANE);
|
1789
|
+
}
|
1790
|
+
else if (this.nextPaneIndex === middlePaneIndex) {
|
1791
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1792
|
+
addClass([this.previousPane], STATIC_PANE);
|
1793
|
+
}
|
1794
|
+
else {
|
1795
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1796
|
+
addClass([this.nextPane], STATIC_PANE);
|
1797
|
+
}
|
1798
|
+
} // All panes are flexible
|
1799
|
+
else if (allFlexiblePanes) {
|
1800
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1801
|
+
addClass([this.previousPane], STATIC_PANE);
|
1802
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1803
|
+
addClass([this.nextPane], STATIC_PANE);
|
1804
|
+
} // Two Panesa are Static Pane
|
1805
|
+
else {
|
1806
|
+
if (this.previousPane.style.flexBasis !== '' && this.previousPane.classList.contains(STATIC_PANE)) {
|
1807
|
+
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1808
|
+
}
|
1809
|
+
if (this.nextPane.style.flexBasis !== '' && this.nextPane.classList.contains(STATIC_PANE)) {
|
1810
|
+
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1811
|
+
}
|
1812
|
+
}
|
1813
|
+
var isStaticPanes = this.previousPane.style.flexBasis !== '' && this.nextPane.style.flexBasis !== '';
|
1814
|
+
if (!(this.allPanes.length > 2) && isStaticPanes) {
|
1759
1815
|
this.updateSplitterSize();
|
1760
1816
|
}
|
1761
1817
|
};
|
@@ -1859,10 +1915,10 @@ var Splitter = /** @class */ (function (_super) {
|
|
1859
1915
|
}
|
1860
1916
|
};
|
1861
1917
|
Splitter.prototype.addStaticPaneClass = function () {
|
1862
|
-
if (!this.previousPane.classList.contains(STATIC_PANE)) {
|
1918
|
+
if (!this.previousPane.classList.contains(STATIC_PANE) && !(this.previousPane.style.flexBasis === '') && !this.previousPane.classList.contains(EXPAND_PANE)) {
|
1863
1919
|
this.previousPane.classList.add(STATIC_PANE);
|
1864
1920
|
}
|
1865
|
-
if (!this.nextPane.classList.contains(STATIC_PANE)) {
|
1921
|
+
if (!this.nextPane.classList.contains(STATIC_PANE) && !(this.nextPane.style.flexBasis === '') && !this.nextPane.classList.contains(EXPAND_PANE)) {
|
1866
1922
|
this.nextPane.classList.add(STATIC_PANE);
|
1867
1923
|
}
|
1868
1924
|
};
|