@syncfusion/ej2-layouts 19.2.60 → 19.3.53
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 +1 -1
- package/CHANGELOG.md +10 -0
- 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 +84 -164
- package/dist/es6/ej2-layouts.es2015.js.map +1 -1
- package/dist/es6/ej2-layouts.es5.js +84 -165
- 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/helpers/e2e/dashboardHelper.d.ts +63 -0
- package/helpers/e2e/dashboardHelper.js +97 -0
- package/helpers/e2e/index.d.ts +1 -0
- package/helpers/e2e/index.js +1 -0
- package/package.json +6 -6
- package/src/dashboard-layout/dashboard-layout.js +0 -6
- package/src/splitter/splitter-model.d.ts +1 -1
- package/src/splitter/splitter.d.ts +5 -1
- package/src/splitter/splitter.js +84 -158
- package/styles/avatar/_bootstrap5-dark-definition.scss +1 -0
- package/styles/avatar/_bootstrap5-definition.scss +25 -0
- package/styles/avatar/_layout.scss +5 -5
- package/styles/avatar/_tailwind-dark-definition.scss +1 -25
- package/styles/avatar/bootstrap5-dark.css +61 -0
- package/styles/avatar/bootstrap5-dark.scss +3 -0
- package/styles/avatar/bootstrap5.css +61 -0
- package/styles/avatar/bootstrap5.scss +3 -0
- package/styles/bootstrap-dark.css +8 -0
- package/styles/bootstrap.css +8 -0
- package/styles/bootstrap4.css +8 -0
- package/styles/bootstrap5-dark.css +1618 -0
- package/styles/bootstrap5-dark.scss +4 -0
- package/styles/bootstrap5.css +1618 -0
- package/styles/bootstrap5.scss +4 -0
- package/styles/card/_bootstrap5-dark-definition.scss +1 -0
- package/styles/card/_bootstrap5-definition.scss +119 -0
- package/styles/card/_fabric-dark-definition.scss +5 -18
- package/styles/card/_layout.scss +2 -2
- package/styles/card/_tailwind-dark-definition.scss +1 -122
- package/styles/card/_tailwind-definition.scss +5 -9
- package/styles/card/bootstrap5-dark.css +593 -0
- package/styles/card/bootstrap5-dark.scss +3 -0
- package/styles/card/bootstrap5.css +593 -0
- package/styles/card/bootstrap5.scss +3 -0
- package/styles/card/fabric-dark.css +12 -12
- package/styles/card/tailwind-dark.css +2 -3
- package/styles/card/tailwind.css +0 -1
- package/styles/dashboard-layout/_bootstrap5-dark-definition.scss +1 -0
- package/styles/dashboard-layout/_bootstrap5-definition.scss +109 -0
- package/styles/dashboard-layout/_layout.scss +14 -5
- package/styles/dashboard-layout/_tailwind-dark-definition.scss +1 -109
- package/styles/dashboard-layout/_tailwind-definition.scss +27 -28
- package/styles/dashboard-layout/_theme.scss +4 -4
- package/styles/dashboard-layout/bootstrap5-dark.css +393 -0
- package/styles/dashboard-layout/bootstrap5-dark.scss +4 -0
- package/styles/dashboard-layout/bootstrap5.css +393 -0
- package/styles/dashboard-layout/bootstrap5.scss +4 -0
- package/styles/dashboard-layout/icons/_bootstrap5-dark.scss +1 -0
- package/styles/dashboard-layout/icons/_bootstrap5.scss +81 -0
- package/styles/dashboard-layout/material-dark.css +3 -3
- package/styles/dashboard-layout/tailwind-dark.css +10 -8
- package/styles/dashboard-layout/tailwind.css +5 -3
- package/styles/fabric-dark.css +20 -12
- package/styles/fabric.css +8 -0
- package/styles/highcontrast-light.css +8 -0
- package/styles/highcontrast.css +8 -0
- package/styles/material-dark.css +19 -11
- package/styles/material.css +8 -0
- package/styles/splitter/_bootstrap5-dark-definition.scss +1 -0
- package/styles/splitter/_bootstrap5-definition.scss +26 -0
- package/styles/splitter/_tailwind-dark-definition.scss +1 -23
- package/styles/splitter/_tailwind-definition.scss +14 -11
- package/styles/splitter/bootstrap-dark.css +8 -0
- package/styles/splitter/bootstrap.css +8 -0
- package/styles/splitter/bootstrap4.css +8 -0
- package/styles/splitter/bootstrap5-dark.css +568 -0
- package/styles/splitter/bootstrap5-dark.scss +4 -0
- package/styles/splitter/bootstrap5.css +568 -0
- package/styles/splitter/bootstrap5.scss +4 -0
- package/styles/splitter/fabric-dark.css +8 -0
- package/styles/splitter/fabric.css +8 -0
- package/styles/splitter/highcontrast-light.css +8 -0
- package/styles/splitter/highcontrast.css +8 -0
- package/styles/splitter/icons/_bootstrap-dark.scss +12 -0
- package/styles/splitter/icons/_bootstrap.scss +12 -0
- package/styles/splitter/icons/_bootstrap4.scss +12 -0
- package/styles/splitter/icons/_bootstrap5-dark.scss +1 -0
- package/styles/splitter/icons/_bootstrap5.scss +39 -0
- package/styles/splitter/icons/_fabric-dark.scss +12 -0
- package/styles/splitter/icons/_fabric.scss +12 -0
- package/styles/splitter/icons/_highcontrast-light.scss +12 -0
- package/styles/splitter/icons/_highcontrast.scss +12 -0
- package/styles/splitter/icons/_material-dark.scss +12 -0
- package/styles/splitter/icons/_material.scss +12 -0
- package/styles/splitter/icons/_tailwind-dark.scss +1 -39
- package/styles/splitter/icons/_tailwind.scss +12 -0
- package/styles/splitter/material-dark.css +16 -8
- package/styles/splitter/material.css +8 -0
- package/styles/splitter/tailwind-dark.css +14 -7
- package/styles/splitter/tailwind.css +8 -1
- package/styles/tailwind-dark.css +26 -18
- package/styles/tailwind.css +13 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Browser, ChildProperty, Collection, Component, Draggable, Event, EventHandler, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, closest, compile, detach, extend, formatUnit, getValue,
|
1
|
+
import { Browser, ChildProperty, Collection, Component, Draggable, Event, EventHandler, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, closest, compile, detach, extend, formatUnit, getValue, isNullOrUndefined, isUndefined, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
2
2
|
|
3
3
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -237,13 +237,15 @@ let Splitter = class Splitter extends Component {
|
|
237
237
|
}
|
238
238
|
preRender() {
|
239
239
|
this.onReportWindowSize = this.reportWindowSize.bind(this);
|
240
|
+
this.onMouseMoveHandler = this.onMouseMove.bind(this);
|
241
|
+
this.onMouseUpHandler = this.onMouseUp.bind(this);
|
242
|
+
this.onTouchMoveHandler = this.onMouseMove.bind(this);
|
243
|
+
this.onTouchEndHandler = this.onMouseUp.bind(this);
|
240
244
|
this.wrapper = this.element.cloneNode(true);
|
241
245
|
this.wrapperParent = this.element.parentElement;
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
addClass([this.element], orientation);
|
246
|
-
}
|
246
|
+
removeClass([this.wrapper], ['e-control', 'e-lib', ROOT]);
|
247
|
+
const orientation = this.orientation === 'Horizontal' ? HORIZONTAL_PANE : VERTICAL_PANE;
|
248
|
+
addClass([this.element], orientation);
|
247
249
|
const name = Browser.info.name;
|
248
250
|
const css = (name === 'msie') ? 'e-ie' : '';
|
249
251
|
this.setCssClass(this.element, css);
|
@@ -270,19 +272,15 @@ let Splitter = class Splitter extends Component {
|
|
270
272
|
* @private
|
271
273
|
*/
|
272
274
|
render() {
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
this.setDimension(this.getHeight(this.element), this.getWidth(this.element));
|
278
|
-
}
|
275
|
+
this.checkDataAttributes();
|
276
|
+
this.setCssClass(this.element, this.cssClass);
|
277
|
+
this.isEnabled(this.enabled);
|
278
|
+
this.setDimension(this.getHeight(this.element), this.getWidth(this.element));
|
279
279
|
this.createSplitPane(this.element);
|
280
280
|
this.addSeparator(this.element);
|
281
281
|
this.getPanesDimensions();
|
282
282
|
this.setPaneSettings();
|
283
|
-
|
284
|
-
this.setRTL(this.enableRtl);
|
285
|
-
}
|
283
|
+
this.setRTL(this.enableRtl);
|
286
284
|
if (this.enableReversePanes) {
|
287
285
|
this.setReversePane();
|
288
286
|
}
|
@@ -310,11 +308,15 @@ let Splitter = class Splitter extends Component {
|
|
310
308
|
this.totalPercent = previousFlexBasis + nextFlexBasis;
|
311
309
|
this.totalWidth = this.convertPercentageToPixel(this.totalPercent + '%');
|
312
310
|
if (e.type === 'keydown' && (!isNullOrUndefined(e.keyCode))) {
|
313
|
-
if ((e.keyCode === 39 || (e.keyCode === 40)) && nextPaneSize > 0
|
311
|
+
if ((e.keyCode === 39 || (e.keyCode === 40)) && nextPaneSize > 0 &&
|
312
|
+
(this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min) <
|
313
|
+
this.convertPercentageToPixel((nextFlexBasis - 1) + '%'))) {
|
314
314
|
this.previousPane.style.flexBasis = (previousFlexBasis + 1) + '%';
|
315
315
|
this.nextPane.style.flexBasis = (nextFlexBasis - 1) + '%';
|
316
316
|
}
|
317
|
-
else if ((e.keyCode === 37 || (e.keyCode === 38)) && prePaneSize > 0
|
317
|
+
else if ((e.keyCode === 37 || (e.keyCode === 38)) && prePaneSize > 0 &&
|
318
|
+
(this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min) <
|
319
|
+
this.convertPercentageToPixel((previousFlexBasis - 1) + '%'))) {
|
318
320
|
this.previousPane.style.flexBasis = (previousFlexBasis - 1) + '%';
|
319
321
|
this.nextPane.style.flexBasis = (nextFlexBasis + 1) + '%';
|
320
322
|
}
|
@@ -324,13 +326,15 @@ let Splitter = class Splitter extends Component {
|
|
324
326
|
this.totalWidth = (this.orientation === 'Horizontal') ? this.previousPane.offsetWidth + this.nextPane.offsetWidth :
|
325
327
|
this.previousPane.offsetHeight + this.nextPane.offsetHeight;
|
326
328
|
if (e.type === 'keydown' && (!isNullOrUndefined(e.keyCode))) {
|
327
|
-
if ((e.keyCode === 39 || (e.keyCode === 40)) && nextPaneSize > 0
|
329
|
+
if ((e.keyCode === 39 || (e.keyCode === 40)) && nextPaneSize > 0 &&
|
330
|
+
(this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min) < (nextPaneSize + splitBarSize))) {
|
328
331
|
this.addStaticPaneClass();
|
329
332
|
this.previousPane.style.flexBasis = (prePaneSize + splitBarSize) + 'px';
|
330
333
|
this.nextPane.style.flexBasis = (nextPaneSize < splitBarSize) ? '0px' :
|
331
334
|
(nextPaneSize - splitBarSize) + 'px';
|
332
335
|
}
|
333
|
-
else if ((e.keyCode === 37 || (e.keyCode === 38)) && prePaneSize > 0
|
336
|
+
else if ((e.keyCode === 37 || (e.keyCode === 38)) && prePaneSize > 0 &&
|
337
|
+
(this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min) < (prePaneSize - splitBarSize))) {
|
334
338
|
this.addStaticPaneClass();
|
335
339
|
this.previousPane.style.flexBasis = (prePaneSize < splitBarSize) ? '0px' :
|
336
340
|
(prePaneSize - splitBarSize) + 'px';
|
@@ -351,11 +355,12 @@ let Splitter = class Splitter extends Component {
|
|
351
355
|
&& (!isPrevpaneExpanded && !isNextpaneCollapsed && !isPrevpaneCollapsed || (isPrevpaneExpanded) && !isNextpaneCollapsed) &&
|
352
356
|
document.activeElement.classList.contains(SPLIT_BAR) && (this.paneSettings[index].resizable &&
|
353
357
|
this.paneSettings[index + 1].resizable)) {
|
358
|
+
event.preventDefault();
|
354
359
|
this.checkPaneSize(event);
|
355
360
|
this.triggerResizing(event);
|
356
361
|
}
|
357
362
|
else if (event.keyCode === 13 && this.paneSettings[index].collapsible &&
|
358
|
-
document.activeElement.classList.contains(SPLIT_BAR)) {
|
363
|
+
document.activeElement.classList.contains(SPLIT_BAR) && this.currentSeparator.classList.contains(SPLIT_BAR_ACTIVE)) {
|
359
364
|
if (!this.previousPane.classList.contains(COLLAPSE_PANE)) {
|
360
365
|
this.collapse(index);
|
361
366
|
addClass([this.currentSeparator], SPLIT_BAR_ACTIVE);
|
@@ -367,6 +372,18 @@ let Splitter = class Splitter extends Component {
|
|
367
372
|
}
|
368
373
|
}
|
369
374
|
}
|
375
|
+
getMinInPixel(minValue) {
|
376
|
+
let min;
|
377
|
+
if (isNullOrUndefined(minValue)) {
|
378
|
+
return 0;
|
379
|
+
}
|
380
|
+
let paneMinRange = this.convertPixelToNumber(minValue.toString());
|
381
|
+
if (minValue.indexOf('%') > 0) {
|
382
|
+
paneMinRange = this.convertPercentageToPixel(minValue);
|
383
|
+
}
|
384
|
+
min = this.convertPixelToNumber((paneMinRange).toString());
|
385
|
+
return min;
|
386
|
+
}
|
370
387
|
/**
|
371
388
|
* @param {string} value - specifies the string value
|
372
389
|
* @returns {string} returns the string
|
@@ -440,9 +457,6 @@ let Splitter = class Splitter extends Component {
|
|
440
457
|
});
|
441
458
|
this.restoreElem();
|
442
459
|
}
|
443
|
-
checkBlazor() {
|
444
|
-
return isBlazor() && this.isServerRendered;
|
445
|
-
}
|
446
460
|
setPaneSettings() {
|
447
461
|
const childCount = this.allPanes.length;
|
448
462
|
const paneCollection = [];
|
@@ -844,48 +858,16 @@ let Splitter = class Splitter extends Component {
|
|
844
858
|
const childCount = this.allPanes.length;
|
845
859
|
const clonedEle = target.children;
|
846
860
|
let separator;
|
847
|
-
let proxy;
|
848
|
-
if (this.checkBlazor()) {
|
849
|
-
for (let j = 0; j < this.element.children.length; j++) {
|
850
|
-
if (this.element.children[j].classList.contains(SPLIT_BAR)) {
|
851
|
-
this.allBars.push(this.element.children[j]);
|
852
|
-
}
|
853
|
-
}
|
854
|
-
}
|
855
861
|
for (let i = 0; i < childCount; i++) {
|
856
862
|
if (i < childCount - 1) {
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
}
|
866
|
-
if (this.checkBlazor()) {
|
867
|
-
proxy = this;
|
868
|
-
separator = this.allBars[i];
|
869
|
-
this.updateIconClass();
|
870
|
-
}
|
871
|
-
if (!this.checkBlazor()) {
|
872
|
-
this.wireClickEvents();
|
873
|
-
}
|
874
|
-
if (this.checkBlazor() && !isNullOrUndefined(separator)) {
|
875
|
-
this.currentSeparator = separator;
|
876
|
-
this.addMouseActions(separator);
|
877
|
-
this.wireClickEvents();
|
878
|
-
separator.addEventListener('focus', () => {
|
879
|
-
if (document.activeElement.classList.contains('e-split-bar')) {
|
880
|
-
proxy.currentSeparator = document.activeElement;
|
881
|
-
proxy.currentSeparator.classList.add(SPLIT_BAR_ACTIVE);
|
882
|
-
}
|
883
|
-
this.getPaneDetails();
|
884
|
-
});
|
885
|
-
separator.addEventListener('blur', () => {
|
886
|
-
proxy.currentSeparator.classList.remove(SPLIT_BAR_ACTIVE);
|
887
|
-
});
|
888
|
-
}
|
863
|
+
separator = this.createSeparator(i);
|
864
|
+
setStyleAttribute(separator, { 'order': (i * 2) + 1 });
|
865
|
+
this.separatorOrder.push((i * 2) + 1);
|
866
|
+
clonedEle[i].parentNode.appendChild(separator);
|
867
|
+
this.currentSeparator = separator;
|
868
|
+
separator.setAttribute('role', 'separator');
|
869
|
+
separator.setAttribute('aria-orientation', this.orientation.toLowerCase());
|
870
|
+
this.wireClickEvents();
|
889
871
|
if (!isNullOrUndefined(separator)) {
|
890
872
|
if (this.isResizable()) {
|
891
873
|
EventHandler.add(separator, 'mousedown', this.onMouseDown, this);
|
@@ -1072,21 +1054,21 @@ let Splitter = class Splitter extends Component {
|
|
1072
1054
|
}
|
1073
1055
|
}
|
1074
1056
|
wireResizeEvents() {
|
1075
|
-
|
1076
|
-
|
1057
|
+
document.addEventListener('mousemove', this.onMouseMoveHandler, true);
|
1058
|
+
document.addEventListener('mouseup', this.onMouseUpHandler, true);
|
1077
1059
|
const touchMoveEvent = (Browser.info.name === 'msie') ? 'pointermove' : 'touchmove';
|
1078
1060
|
const touchEndEvent = (Browser.info.name === 'msie') ? 'pointerup' : 'touchend';
|
1079
|
-
|
1080
|
-
|
1061
|
+
document.addEventListener(touchMoveEvent, this.onTouchMoveHandler, true);
|
1062
|
+
document.addEventListener(touchEndEvent, this.onTouchEndHandler, true);
|
1081
1063
|
}
|
1082
1064
|
unwireResizeEvents() {
|
1083
1065
|
this.element.ownerDocument.defaultView.removeEventListener('resize', this.onReportWindowSize);
|
1084
1066
|
const touchMoveEvent = (Browser.info.name === 'msie') ? 'pointermove' : 'touchmove';
|
1085
1067
|
const touchEndEvent = (Browser.info.name === 'msie') ? 'pointerup' : 'touchend';
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1068
|
+
document.removeEventListener('mousemove', this.onMouseMoveHandler, true);
|
1069
|
+
document.removeEventListener('mouseup', this.onMouseUpHandler, true);
|
1070
|
+
document.removeEventListener(touchMoveEvent, this.onTouchMoveHandler, true);
|
1071
|
+
document.removeEventListener(touchEndEvent, this.onTouchEndHandler, true);
|
1090
1072
|
}
|
1091
1073
|
wireClickEvents() {
|
1092
1074
|
EventHandler.add(this.currentSeparator, 'touchstart click', this.clickHandler, this);
|
@@ -1340,13 +1322,7 @@ let Splitter = class Splitter extends Component {
|
|
1340
1322
|
}
|
1341
1323
|
}
|
1342
1324
|
beforeAction(e) {
|
1343
|
-
const eventArgs =
|
1344
|
-
element: this.element,
|
1345
|
-
event: e,
|
1346
|
-
index: [this.prevPaneIndex, this.nextPaneIndex],
|
1347
|
-
separator: this.currentSeparator,
|
1348
|
-
cancel: false
|
1349
|
-
} : {
|
1325
|
+
const eventArgs = {
|
1350
1326
|
element: this.element,
|
1351
1327
|
event: e,
|
1352
1328
|
pane: [this.previousPane, this.nextPane],
|
@@ -1445,12 +1421,7 @@ let Splitter = class Splitter extends Component {
|
|
1445
1421
|
}
|
1446
1422
|
}
|
1447
1423
|
afterAction(e) {
|
1448
|
-
const eventArgs =
|
1449
|
-
element: this.element,
|
1450
|
-
event: e,
|
1451
|
-
index: [this.prevPaneIndex, this.nextPaneIndex],
|
1452
|
-
separator: this.currentSeparator
|
1453
|
-
} : {
|
1424
|
+
const eventArgs = {
|
1454
1425
|
element: this.element,
|
1455
1426
|
event: e,
|
1456
1427
|
pane: [this.previousPane, this.nextPane],
|
@@ -1463,10 +1434,6 @@ let Splitter = class Splitter extends Component {
|
|
1463
1434
|
this.currentBarIndex = this.getOrderIndex(parseInt(e.target.parentElement.style.order, 10), 'splitbar');
|
1464
1435
|
}
|
1465
1436
|
getSeparatorIndex(target) {
|
1466
|
-
const separator = this.orientation === 'Horizontal' ? SPLIT_H_BAR : SPLIT_V_BAR;
|
1467
|
-
if (this.checkBlazor() && this.allBars.length < 1) {
|
1468
|
-
this.allBars = selectAll('.' + separator, this.element);
|
1469
|
-
}
|
1470
1437
|
let array = [].slice.call(this.allBars);
|
1471
1438
|
array = this.enableReversePanes ? array.reverse() : array;
|
1472
1439
|
return array.indexOf(target);
|
@@ -1496,13 +1463,7 @@ let Splitter = class Splitter extends Component {
|
|
1496
1463
|
this.getPaneDetails();
|
1497
1464
|
}
|
1498
1465
|
triggerResizing(e) {
|
1499
|
-
const eventArgs =
|
1500
|
-
element: this.element,
|
1501
|
-
event: e,
|
1502
|
-
index: [this.prevPaneIndex, this.nextPaneIndex],
|
1503
|
-
paneSize: [this.prePaneDimenson, this.nextPaneDimension],
|
1504
|
-
separator: this.currentSeparator
|
1505
|
-
} : {
|
1466
|
+
const eventArgs = {
|
1506
1467
|
element: this.element,
|
1507
1468
|
event: e,
|
1508
1469
|
pane: [this.previousPane, this.nextPane],
|
@@ -1522,13 +1483,7 @@ let Splitter = class Splitter extends Component {
|
|
1522
1483
|
addClass([this.currentSeparator], SPLIT_BAR_ACTIVE);
|
1523
1484
|
this.updateCursorPosition(e, 'previous');
|
1524
1485
|
this.getPaneDetails();
|
1525
|
-
const eventArgs =
|
1526
|
-
element: this.element,
|
1527
|
-
event: e,
|
1528
|
-
index: [this.getPreviousPaneIndex(), this.getNextPaneIndex()],
|
1529
|
-
separator: this.currentSeparator,
|
1530
|
-
cancel: false
|
1531
|
-
} : {
|
1486
|
+
const eventArgs = {
|
1532
1487
|
element: this.element,
|
1533
1488
|
event: e,
|
1534
1489
|
pane: [this.previousPane, this.nextPane],
|
@@ -1913,13 +1868,7 @@ let Splitter = class Splitter extends Component {
|
|
1913
1868
|
onMouseUp(e) {
|
1914
1869
|
removeClass([this.currentSeparator], SPLIT_BAR_ACTIVE);
|
1915
1870
|
this.unwireResizeEvents();
|
1916
|
-
const eventArgs =
|
1917
|
-
event: e,
|
1918
|
-
element: this.element,
|
1919
|
-
index: [this.prevPaneIndex, this.nextPaneIndex],
|
1920
|
-
separator: this.currentSeparator,
|
1921
|
-
paneSize: [this.prePaneDimenson, this.nextPaneDimension]
|
1922
|
-
} : {
|
1871
|
+
const eventArgs = {
|
1923
1872
|
event: e,
|
1924
1873
|
element: this.element,
|
1925
1874
|
pane: [this.previousPane, this.nextPane],
|
@@ -2021,12 +1970,7 @@ let Splitter = class Splitter extends Component {
|
|
2021
1970
|
}
|
2022
1971
|
let templateFUN;
|
2023
1972
|
if (!isNullOrUndefined(templateFn)) {
|
2024
|
-
|
2025
|
-
templateFUN = templateFn({}, this, prop, this.element.id + 'content' + this.allPanes.length.toString(), this.isStringTemplate);
|
2026
|
-
}
|
2027
|
-
else {
|
2028
|
-
templateFUN = templateFn({}, this, prop, this.element.id + 'content' + this.allPanes.length.toString(), true);
|
2029
|
-
}
|
1973
|
+
templateFUN = templateFn({}, this, prop, this.element.id + 'content' + this.allPanes.length.toString(), true);
|
2030
1974
|
}
|
2031
1975
|
if (!isNullOrUndefined(templateFn) && templateFUN && templateFUN.length > 0) {
|
2032
1976
|
[].slice.call(templateFUN).forEach((el) => {
|
@@ -2040,13 +1984,11 @@ let Splitter = class Splitter extends Component {
|
|
2040
1984
|
}
|
2041
1985
|
createSplitPane(target) {
|
2042
1986
|
let childCount = target.children.length;
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
childCount = childCount + 1;
|
2049
|
-
}
|
1987
|
+
for (let i = 0; i < this.paneSettings.length; i++) {
|
1988
|
+
if (childCount < this.paneSettings.length) {
|
1989
|
+
const childElement = this.createElement('div');
|
1990
|
+
this.element.appendChild(childElement);
|
1991
|
+
childCount = childCount + 1;
|
2050
1992
|
}
|
2051
1993
|
}
|
2052
1994
|
childCount = target.children.length;
|
@@ -2056,30 +1998,23 @@ let Splitter = class Splitter extends Component {
|
|
2056
1998
|
for (let i = 0; i < childCount; i++) {
|
2057
1999
|
// To accept only div and span element as pane
|
2058
2000
|
if (child[i].nodeName === 'DIV' || child[i].nodeName === 'SPAN') {
|
2059
|
-
|
2060
|
-
|
2001
|
+
this.allPanes.push(child[i]);
|
2002
|
+
if (this.orientation === 'Horizontal') {
|
2003
|
+
addClass([child[i]], [PANE, SPLIT_H_PANE, SCROLL_PANE]);
|
2004
|
+
this.panesDimension(i, child);
|
2061
2005
|
}
|
2062
|
-
else
|
2063
|
-
|
2006
|
+
else {
|
2007
|
+
addClass([child[i]], [PANE, SPLIT_V_PANE, SCROLL_PANE]);
|
2008
|
+
this.panesDimension(i, child);
|
2064
2009
|
}
|
2065
|
-
if (!this.
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
}
|
2074
|
-
if (!isNullOrUndefined(this.paneSettings[i]) && !isNullOrUndefined(this.paneSettings[i].content)) {
|
2075
|
-
this.setTemplate(this.paneSettings[i].content, child[i]);
|
2076
|
-
}
|
2077
|
-
if (!isNullOrUndefined(this.paneSettings[i]) && this.paneSettings[i].cssClass) {
|
2078
|
-
this.setCssClass(child[i], this.paneSettings[i].cssClass);
|
2079
|
-
}
|
2080
|
-
if (!isNullOrUndefined(this.paneSettings[i])) {
|
2081
|
-
this.paneCollapsible(child[i], i);
|
2082
|
-
}
|
2010
|
+
if (!isNullOrUndefined(this.paneSettings[i]) && !isNullOrUndefined(this.paneSettings[i].content)) {
|
2011
|
+
this.setTemplate(this.paneSettings[i].content, child[i]);
|
2012
|
+
}
|
2013
|
+
if (!isNullOrUndefined(this.paneSettings[i]) && this.paneSettings[i].cssClass) {
|
2014
|
+
this.setCssClass(child[i], this.paneSettings[i].cssClass);
|
2015
|
+
}
|
2016
|
+
if (!isNullOrUndefined(this.paneSettings[i])) {
|
2017
|
+
this.paneCollapsible(child[i], i);
|
2083
2018
|
}
|
2084
2019
|
}
|
2085
2020
|
}
|
@@ -2112,24 +2047,15 @@ let Splitter = class Splitter extends Component {
|
|
2112
2047
|
*/
|
2113
2048
|
destroy() {
|
2114
2049
|
if (!this.isDestroyed) {
|
2115
|
-
|
2116
|
-
super.destroy();
|
2117
|
-
}
|
2050
|
+
super.destroy();
|
2118
2051
|
EventHandler.remove(document, 'touchstart click', this.onDocumentClick);
|
2052
|
+
this.element.ownerDocument.defaultView.removeEventListener('resize', this.onReportWindowSize, true);
|
2119
2053
|
while (this.element.attributes.length > 0) {
|
2120
2054
|
this.element.removeAttribute(this.element.attributes[0].name);
|
2121
2055
|
}
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
detach(splitNodes[i]);
|
2126
|
-
}
|
2127
|
-
}
|
2128
|
-
else {
|
2129
|
-
this.element.innerHTML = this.wrapper.innerHTML;
|
2130
|
-
for (let i = 0; i < this.wrapper.attributes.length; i++) {
|
2131
|
-
this.element.setAttribute(this.wrapper.attributes[i].name, this.wrapper.attributes[i].value);
|
2132
|
-
}
|
2056
|
+
this.element.innerHTML = this.wrapper.innerHTML;
|
2057
|
+
for (let i = 0; i < this.wrapper.attributes.length; i++) {
|
2058
|
+
this.element.setAttribute(this.wrapper.attributes[i].name, this.wrapper.attributes[i].value);
|
2133
2059
|
}
|
2134
2060
|
if (this.refreshing) {
|
2135
2061
|
addClass([this.element], ['e-control', 'e-lib', ROOT]);
|
@@ -2924,10 +2850,6 @@ let DashboardLayout = class DashboardLayout extends Component {
|
|
2924
2850
|
currentX = this.getMaxWidth(panelModel) - this.elementWidth;
|
2925
2851
|
this.mOffX = dX - currentX;
|
2926
2852
|
}
|
2927
|
-
else if (this.elementX + this.elementWidth + dX > this.maxLeft) {
|
2928
|
-
currentX = this.maxLeft - this.elementX - this.elementWidth;
|
2929
|
-
this.mOffX = dX - currentX;
|
2930
|
-
}
|
2931
2853
|
this.elementWidth += currentX;
|
2932
2854
|
}
|
2933
2855
|
el.style.top = this.elementY + 'px';
|
@@ -3167,7 +3089,6 @@ let DashboardLayout = class DashboardLayout extends Component {
|
|
3167
3089
|
const row = parseInt(ele.getAttribute('data-row'), 10);
|
3168
3090
|
const col = parseInt(ele.getAttribute('data-col'), 10);
|
3169
3091
|
this.panelPropertyChange(cellInstance, { row: row, col: col });
|
3170
|
-
this.updatePanelLayout(ele, cellInstance);
|
3171
3092
|
this.setHeightAndWidth(ele, this.getCellInstance(ele.id));
|
3172
3093
|
this.setPanelPosition(ele, row, col);
|
3173
3094
|
this.updateRowHeight();
|
@@ -4340,7 +4261,6 @@ let DashboardLayout = class DashboardLayout extends Component {
|
|
4340
4261
|
this.onDragStart(args);
|
4341
4262
|
}
|
4342
4263
|
});
|
4343
|
-
this.dragobj.enableScrollHandler = true;
|
4344
4264
|
if (this.dragCollection.indexOf(this.dragobj) === -1) {
|
4345
4265
|
this.dragCollection.push(this.dragobj);
|
4346
4266
|
}
|