@syncfusion/ej2-navigations 32.2.6 → 32.2.8
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/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +65 -11
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +65 -11
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/common/menu-base.d.ts +2 -0
- package/src/common/menu-base.js +50 -3
- package/src/sidebar/sidebar.js +6 -0
- package/src/tab/tab.js +4 -2
- package/src/treeview/treeview-model.d.ts +12 -0
- package/src/treeview/treeview.d.ts +11 -0
- package/src/treeview/treeview.js +6 -7
|
@@ -1142,6 +1142,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1142
1142
|
this.isOpenCalled = false;
|
|
1143
1143
|
this.isAnimationNone = false;
|
|
1144
1144
|
this.isKBDAction = false;
|
|
1145
|
+
this.skipNextArrowDown = false;
|
|
1145
1146
|
}
|
|
1146
1147
|
/**
|
|
1147
1148
|
* Initialized third party configuration settings.
|
|
@@ -1247,7 +1248,8 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1247
1248
|
this.element.parentElement.insertBefore(wrapper, this.element);
|
|
1248
1249
|
}
|
|
1249
1250
|
else {
|
|
1250
|
-
|
|
1251
|
+
const appendToElement = this.getAppendToElement();
|
|
1252
|
+
appendToElement.appendChild(wrapper);
|
|
1251
1253
|
}
|
|
1252
1254
|
}
|
|
1253
1255
|
if (this.cssClass) {
|
|
@@ -1383,8 +1385,38 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1383
1385
|
e.action = ESCAPE;
|
|
1384
1386
|
this.leftEscKeyHandler(e);
|
|
1385
1387
|
}
|
|
1388
|
+
const isDown = e.key ? (e.key === 'ArrowDown') : e.keyCode === 40;
|
|
1389
|
+
if (!isDown) {
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
const hostPopup = closest(this.element, '.e-popup-open');
|
|
1393
|
+
if (!hostPopup) {
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
if (closest(document.activeElement, '#' + this.element.id)) {
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1399
|
+
const active = document.activeElement;
|
|
1400
|
+
if (!active) {
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
const expanded = active.getAttribute('aria-expanded') === 'true';
|
|
1404
|
+
if (!expanded) {
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
const ul = this.element;
|
|
1408
|
+
const firstItem = select('.e-menu-item', ul);
|
|
1409
|
+
if (firstItem) {
|
|
1410
|
+
ul.focus();
|
|
1411
|
+
firstItem.classList.add('e-focused');
|
|
1412
|
+
this.skipNextArrowDown = true;
|
|
1413
|
+
}
|
|
1386
1414
|
}
|
|
1387
1415
|
keyBoardHandler(e) {
|
|
1416
|
+
if (e.action === DOWNARROW && this.skipNextArrowDown) {
|
|
1417
|
+
this.skipNextArrowDown = false;
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1388
1420
|
let actionName = '';
|
|
1389
1421
|
const trgt = e.target;
|
|
1390
1422
|
let actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains('e-vertical')
|
|
@@ -1484,6 +1516,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1484
1516
|
fliIdx = this.isValidLI(cli, fliIdx, e.action);
|
|
1485
1517
|
cul.children[fliIdx].classList.add(FOCUSED);
|
|
1486
1518
|
cul.children[fliIdx].focus();
|
|
1519
|
+
if (closest(this.element, '.e-popup')) {
|
|
1520
|
+
cul.focus();
|
|
1521
|
+
}
|
|
1487
1522
|
}
|
|
1488
1523
|
isValidLI(cli, index, action) {
|
|
1489
1524
|
const cul = this.getUlByNavIdx();
|
|
@@ -1525,7 +1560,8 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1525
1560
|
return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
|
|
1526
1561
|
}
|
|
1527
1562
|
else {
|
|
1528
|
-
|
|
1563
|
+
const appendToElement = this.getAppendToElement();
|
|
1564
|
+
if (!appendToElement.contains(this.element) && navIdxLen === 0) {
|
|
1529
1565
|
return null;
|
|
1530
1566
|
}
|
|
1531
1567
|
return this.getWrapper().children[navIdxLen];
|
|
@@ -1872,7 +1908,8 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1872
1908
|
li.appendChild(this.popupWrapper);
|
|
1873
1909
|
}
|
|
1874
1910
|
else {
|
|
1875
|
-
|
|
1911
|
+
const appendToElement = this.getAppendToElement();
|
|
1912
|
+
appendToElement.appendChild(this.popupWrapper);
|
|
1876
1913
|
}
|
|
1877
1914
|
this.isNestedOrVertical = this.element.classList.contains('e-vertical') || this.navIdx.length !== 1;
|
|
1878
1915
|
this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);
|
|
@@ -3151,6 +3188,16 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3151
3188
|
}
|
|
3152
3189
|
}
|
|
3153
3190
|
}
|
|
3191
|
+
getAppendToElement() {
|
|
3192
|
+
if (this.isAngular) {
|
|
3193
|
+
const cdkPane = this.element.closest('.cdk-overlay-pane');
|
|
3194
|
+
const popoverEl = this.element.closest('[popover]');
|
|
3195
|
+
if (cdkPane && popoverEl) {
|
|
3196
|
+
return cdkPane;
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
return document.body;
|
|
3200
|
+
}
|
|
3154
3201
|
/**
|
|
3155
3202
|
* Get the properties to be maintained in the persisted state.
|
|
3156
3203
|
*
|
|
@@ -8731,9 +8778,11 @@ let Tab = class Tab extends Component {
|
|
|
8731
8778
|
}
|
|
8732
8779
|
else if (this.heightAdjustMode === 'Fill') {
|
|
8733
8780
|
addClass([this.element], [CLS_FILL]);
|
|
8734
|
-
|
|
8781
|
+
const parent = this.element.parentElement;
|
|
8782
|
+
const heightVal = parent.style.height || parent.getAttribute('height');
|
|
8783
|
+
setStyleAttribute(this.element, { 'height': heightVal != null ? heightVal : '100%' });
|
|
8735
8784
|
this.loadContentElement();
|
|
8736
|
-
this.cntEle.style.height = 'calc(
|
|
8785
|
+
this.cntEle.style.height = heightVal != null ? `calc(${heightVal} - ${this.hdrEle.offsetHeight}px)` : 'calc(100vh - ' + this.hdrEle.offsetHeight + 'px)';
|
|
8737
8786
|
}
|
|
8738
8787
|
else if (this.heightAdjustMode === 'Auto') {
|
|
8739
8788
|
if (this.isTemplate === true) {
|
|
@@ -10500,6 +10549,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
10500
10549
|
this.beforeNodeCreate(e);
|
|
10501
10550
|
},
|
|
10502
10551
|
enableHtmlSanitizer: this.enableHtmlSanitizer,
|
|
10552
|
+
disableHtmlEncode: this.disableHtmlEncode,
|
|
10503
10553
|
itemNavigable: this.fullRowNavigable
|
|
10504
10554
|
};
|
|
10505
10555
|
this.updateListProp(this.fields);
|
|
@@ -13553,12 +13603,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
13553
13603
|
this.renderReactTemplates();
|
|
13554
13604
|
}
|
|
13555
13605
|
else {
|
|
13556
|
-
|
|
13557
|
-
txtEle.innerText = SanitizeHtmlHelper.sanitize(newText);
|
|
13558
|
-
}
|
|
13559
|
-
else {
|
|
13560
|
-
txtEle.innerHTML = newText;
|
|
13561
|
-
}
|
|
13606
|
+
txtEle[ListBase.getDomSetter(this.listBaseOption)] = ListBase.getSanitizedText(newText, this.listBaseOption);
|
|
13562
13607
|
}
|
|
13563
13608
|
if (isInput) {
|
|
13564
13609
|
removeClass([liEle], EDITING);
|
|
@@ -15980,6 +16025,9 @@ __decorate$8([
|
|
|
15980
16025
|
__decorate$8([
|
|
15981
16026
|
Property(true)
|
|
15982
16027
|
], TreeView.prototype, "enableHtmlSanitizer", void 0);
|
|
16028
|
+
__decorate$8([
|
|
16029
|
+
Property(true)
|
|
16030
|
+
], TreeView.prototype, "disableHtmlEncode", void 0);
|
|
15983
16031
|
__decorate$8([
|
|
15984
16032
|
Property(false)
|
|
15985
16033
|
], TreeView.prototype, "enablePersistence", void 0);
|
|
@@ -16636,6 +16684,12 @@ let Sidebar = class Sidebar extends Component {
|
|
|
16636
16684
|
if (!this.getState()) {
|
|
16637
16685
|
this.setDock();
|
|
16638
16686
|
}
|
|
16687
|
+
if (!this.enableDock) {
|
|
16688
|
+
removeClass([this.element], DOCKER);
|
|
16689
|
+
}
|
|
16690
|
+
else {
|
|
16691
|
+
addClass([this.element], DOCKER);
|
|
16692
|
+
}
|
|
16639
16693
|
break;
|
|
16640
16694
|
case 'zIndex':
|
|
16641
16695
|
this.setZindex();
|