@syncfusion/ej2-layouts 20.3.58 → 20.4.40
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 +1 -21
- 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 +28 -16
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +26 -14
- 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 +8 -7
- package/src/dashboard-layout/dashboard-layout.js +2 -2
- package/src/splitter/splitter.js +24 -13
@@ -137,8 +137,18 @@ let Splitter = class Splitter extends Component {
|
|
137
137
|
case 'paneSettings': {
|
138
138
|
if (!(newProp.paneSettings instanceof Array && oldProp.paneSettings instanceof Array)) {
|
139
139
|
const paneCounts = Object.keys(newProp.paneSettings);
|
140
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
140
141
|
if (this.isReact) {
|
141
|
-
|
142
|
+
let cPaneCount = 0;
|
143
|
+
for (let k = 0; k < this.paneSettings.length; k++) {
|
144
|
+
if (typeof (this.paneSettings[k].content) === 'function') {
|
145
|
+
cPaneCount = cPaneCount + 1;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
const hasAllContent = cPaneCount === this.paneSettings.length;
|
149
|
+
if (hasAllContent) {
|
150
|
+
this.clearTemplate();
|
151
|
+
}
|
142
152
|
}
|
143
153
|
for (let i = 0; i < paneCounts.length; i++) {
|
144
154
|
const index = parseInt(Object.keys(newProp.paneSettings)[i], 10);
|
@@ -147,7 +157,7 @@ let Splitter = class Splitter extends Component {
|
|
147
157
|
const property = Object.keys(newProp.paneSettings[index])[j];
|
148
158
|
switch (property) {
|
149
159
|
case 'content': {
|
150
|
-
const newValue = Object(newProp.paneSettings[index])[property];
|
160
|
+
const newValue = Object(newProp.paneSettings[index])[`${property}`];
|
151
161
|
if (!isNullOrUndefined(newValue)) {
|
152
162
|
this.allPanes[index].innerHTML = '';
|
153
163
|
this.setTemplate(newValue, this.allPanes[index]);
|
@@ -155,7 +165,7 @@ let Splitter = class Splitter extends Component {
|
|
155
165
|
break;
|
156
166
|
}
|
157
167
|
case 'resizable': {
|
158
|
-
const newVal = Object(newProp.paneSettings[index])[property];
|
168
|
+
const newVal = Object(newProp.paneSettings[index])[`${property}`];
|
159
169
|
this.resizableModel(index, newVal);
|
160
170
|
break;
|
161
171
|
}
|
@@ -167,10 +177,11 @@ let Splitter = class Splitter extends Component {
|
|
167
177
|
newProp.paneSettings[index].collapsed ? this.isCollapsed(index) : this.collapsedOnchange(index);
|
168
178
|
break;
|
169
179
|
case 'cssClass':
|
180
|
+
// eslint-disable-next-line max-len
|
170
181
|
this.setCssClass(this.allPanes[index], newProp.paneSettings[index].cssClass);
|
171
182
|
break;
|
172
183
|
case 'size': {
|
173
|
-
const newValSize = Object(newProp.paneSettings[index])[property];
|
184
|
+
const newValSize = Object(newProp.paneSettings[index])[`${property}`];
|
174
185
|
if (newValSize !== '' && !isNullOrUndefined(newValSize)) {
|
175
186
|
this.updatePaneSize(newValSize, index);
|
176
187
|
}
|
@@ -380,7 +391,6 @@ let Splitter = class Splitter extends Component {
|
|
380
391
|
}
|
381
392
|
}
|
382
393
|
getMinInPixel(minValue) {
|
383
|
-
let min;
|
384
394
|
if (isNullOrUndefined(minValue)) {
|
385
395
|
return 0;
|
386
396
|
}
|
@@ -388,7 +398,7 @@ let Splitter = class Splitter extends Component {
|
|
388
398
|
if (minValue.indexOf('%') > 0) {
|
389
399
|
paneMinRange = this.convertPercentageToPixel(minValue);
|
390
400
|
}
|
391
|
-
min = this.convertPixelToNumber((paneMinRange).toString());
|
401
|
+
const min = this.convertPixelToNumber((paneMinRange).toString());
|
392
402
|
return min;
|
393
403
|
}
|
394
404
|
/**
|
@@ -621,6 +631,7 @@ let Splitter = class Splitter extends Component {
|
|
621
631
|
this.updateIsCollapsed(index, this.targetArrows().collapseArrow, this.targetArrows().lastBarArrow);
|
622
632
|
for (let i = 0; i < collapsedindex.length; i++) {
|
623
633
|
if (!this.allPanes[collapsedindex[i]].classList.contains(COLLAPSE_PANE)) {
|
634
|
+
// eslint-disable-next-line max-len
|
624
635
|
this.updateIsCollapsed(collapsedindex[i], this.targetArrows().collapseArrow, this.targetArrows().lastBarArrow);
|
625
636
|
}
|
626
637
|
}
|
@@ -1008,6 +1019,7 @@ let Splitter = class Splitter extends Component {
|
|
1008
1019
|
}
|
1009
1020
|
for (let j = 0, len = this.allBars.length; j < len; j++) {
|
1010
1021
|
totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
|
1022
|
+
// eslint-disable-next-line max-len
|
1011
1023
|
parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
|
1012
1024
|
parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
|
1013
1025
|
}
|
@@ -1055,10 +1067,10 @@ let Splitter = class Splitter extends Component {
|
|
1055
1067
|
const sizeDiff = minValue - (this.orientation === 'Horizontal' ?
|
1056
1068
|
this.allPanes[i].offsetWidth : this.allPanes[i].offsetHeight);
|
1057
1069
|
const isPercent = updatePane.style.flexBasis.indexOf('%') > -1;
|
1058
|
-
|
1070
|
+
const updatePaneOffset = this.orientation === 'Horizontal' ? updatePane.offsetWidth : updatePane.offsetHeight;
|
1059
1071
|
updatePane.style.flexBasis = isPercent ? this.convertPixelToPercentage(updatePaneOffset + sizeDiff) + '%'
|
1060
1072
|
: (updatePaneOffset + sizeDiff) + 'px';
|
1061
|
-
|
1073
|
+
const flexPaneOffset = this.orientation === 'Horizontal' ? flexPane.offsetWidth : flexPane.offsetHeight;
|
1062
1074
|
flexPane.style.flexBasis = flexPane.style.flexBasis.indexOf('%') > -1 ?
|
1063
1075
|
this.convertPixelToPercentage(flexPaneOffset - sizeDiff) + '%' : (flexPaneOffset - sizeDiff) + 'px';
|
1064
1076
|
}
|
@@ -1739,13 +1751,13 @@ let Splitter = class Splitter extends Component {
|
|
1739
1751
|
}
|
1740
1752
|
const allFlexiblePanes = flexPaneCount === this.allPanes.length;
|
1741
1753
|
// Two flexible Pane Case.
|
1742
|
-
if (this.previousPane.style.flexBasis
|
1754
|
+
if (this.previousPane.style.flexBasis === '' && this.nextPane.style.flexBasis == '' && !allFlexiblePanes) {
|
1743
1755
|
const middlePaneIndex = this.allPanes.length % this.allBars.length;
|
1744
1756
|
if (this.prevPaneIndex === middlePaneIndex) {
|
1745
1757
|
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1746
1758
|
addClass([this.nextPane], STATIC_PANE);
|
1747
1759
|
}
|
1748
|
-
else if (this.nextPaneIndex
|
1760
|
+
else if (this.nextPaneIndex === middlePaneIndex) {
|
1749
1761
|
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1750
1762
|
addClass([this.previousPane], STATIC_PANE);
|
1751
1763
|
}
|
@@ -1759,16 +1771,16 @@ let Splitter = class Splitter extends Component {
|
|
1759
1771
|
addClass([this.previousPane], STATIC_PANE);
|
1760
1772
|
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1761
1773
|
addClass([this.nextPane], STATIC_PANE);
|
1762
|
-
} // Two Panesa are Static Pane
|
1774
|
+
} // Two Panesa are Static Pane
|
1763
1775
|
else {
|
1764
|
-
if (this.previousPane.style.flexBasis !==
|
1776
|
+
if (this.previousPane.style.flexBasis !== '' && this.previousPane.classList.contains(STATIC_PANE)) {
|
1765
1777
|
this.previousPane.style.flexBasis = this.prevPaneCurrentWidth;
|
1766
1778
|
}
|
1767
|
-
if (this.nextPane.style.flexBasis !==
|
1779
|
+
if (this.nextPane.style.flexBasis !== '' && this.nextPane.classList.contains(STATIC_PANE)) {
|
1768
1780
|
this.nextPane.style.flexBasis = this.nextPaneCurrentWidth;
|
1769
1781
|
}
|
1770
1782
|
}
|
1771
|
-
const isStaticPanes = this.previousPane.style.flexBasis !==
|
1783
|
+
const isStaticPanes = this.previousPane.style.flexBasis !== '' && this.nextPane.style.flexBasis !== '';
|
1772
1784
|
if (!(this.allPanes.length > 2) && isStaticPanes) {
|
1773
1785
|
this.updateSplitterSize();
|
1774
1786
|
}
|
@@ -3994,7 +4006,7 @@ let DashboardLayout = class DashboardLayout extends Component {
|
|
3994
4006
|
if (this.collisionChecker[this.panels[i].id] && this.collisionChecker[this.panels[i].id] !== null) {
|
3995
4007
|
this.overlapElement = [this.collisionChecker[this.panels[i].id].ele];
|
3996
4008
|
const key = this.panels[i].id;
|
3997
|
-
this.updateRowColumn(this.collisionChecker[key].row, this.overlapElement, this.collisionChecker[key].srcEle);
|
4009
|
+
this.updateRowColumn(this.collisionChecker[`${key}`].row, this.overlapElement, this.collisionChecker[`${key}`].srcEle);
|
3998
4010
|
}
|
3999
4011
|
}
|
4000
4012
|
}
|
@@ -4379,7 +4391,7 @@ let DashboardLayout = class DashboardLayout extends Component {
|
|
4379
4391
|
}
|
4380
4392
|
// eslint-disable-next-line guard-for-in
|
4381
4393
|
for (const k in source[i]) {
|
4382
|
-
target[i][k] = source[i][k];
|
4394
|
+
target[i][`${k}`] = source[i][`${k}`];
|
4383
4395
|
}
|
4384
4396
|
}
|
4385
4397
|
return target;
|