@syncfusion/ej2-navigations 22.1.34 → 22.1.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/CHANGELOG.md +22 -0
- 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 +32 -16
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +33 -16
- 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 +10 -10
- package/src/carousel/carousel.js +3 -1
- package/src/tab/tab.d.ts +3 -1
- package/src/tab/tab.js +12 -8
- package/src/toolbar/toolbar.d.ts +2 -0
- package/src/toolbar/toolbar.js +18 -7
- package/src/treeview/treeview-model.d.ts +1 -0
- package/src/treeview/treeview.d.ts +1 -0
- package/styles/bootstrap.css +10 -10
- package/styles/toolbar/_bootstrap-definition.scss +5 -5
- package/styles/toolbar/bootstrap.css +10 -10
|
@@ -3387,6 +3387,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3387
3387
|
constructor(options, element) {
|
|
3388
3388
|
super(options, element);
|
|
3389
3389
|
this.resizeContext = this.resize.bind(this);
|
|
3390
|
+
this.orientationChangeContext = this.orientationChange.bind(this);
|
|
3390
3391
|
/**
|
|
3391
3392
|
* Contains the keyboard configuration of the Toolbar.
|
|
3392
3393
|
*/
|
|
@@ -3475,6 +3476,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3475
3476
|
wireEvents() {
|
|
3476
3477
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
3477
3478
|
window.addEventListener('resize', this.resizeContext);
|
|
3479
|
+
window.addEventListener('orientationchange', this.orientationChangeContext);
|
|
3478
3480
|
if (this.allowKeyboard) {
|
|
3479
3481
|
this.wireKeyboardEvent();
|
|
3480
3482
|
}
|
|
@@ -3521,6 +3523,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
3521
3523
|
this.destroyScroll();
|
|
3522
3524
|
this.unwireKeyboardEvent();
|
|
3523
3525
|
window.removeEventListener('resize', this.resizeContext);
|
|
3526
|
+
window.removeEventListener('orientationchange', this.orientationChangeContext);
|
|
3524
3527
|
EventHandler.remove(document, 'scroll', this.docEvent);
|
|
3525
3528
|
EventHandler.remove(document, 'click', this.docEvent);
|
|
3526
3529
|
}
|
|
@@ -4240,8 +4243,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4240
4243
|
let sepHeight;
|
|
4241
4244
|
let sepItem;
|
|
4242
4245
|
if (this.overflowMode === 'Extended') {
|
|
4243
|
-
sepItem = element.querySelector('.' + CLS_SEPARATOR
|
|
4244
|
-
sepHeight =
|
|
4246
|
+
sepItem = element.querySelector('.' + CLS_SEPARATOR);
|
|
4247
|
+
sepHeight =
|
|
4248
|
+
(element.style.height === 'auto' || element.style.height === '') ? null : (sepItem && sepItem.offsetHeight);
|
|
4245
4249
|
}
|
|
4246
4250
|
const eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');
|
|
4247
4251
|
const eleHeight = (element.style.height === 'auto' || element.style.height === '') ? null : (eleItem && eleItem.offsetHeight);
|
|
@@ -4493,7 +4497,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4493
4497
|
nav.setAttribute('role', 'button');
|
|
4494
4498
|
element.appendChild(nav);
|
|
4495
4499
|
}
|
|
4496
|
-
tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig) {
|
|
4500
|
+
tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {
|
|
4497
4501
|
const ignoreCount = ig;
|
|
4498
4502
|
const popEle = this.popObj.element;
|
|
4499
4503
|
const query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
|
|
@@ -4505,8 +4509,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4505
4509
|
const eleSep = inEle.children[indx - (indx - sepPri) - 1];
|
|
4506
4510
|
const ignoreCheck = (!isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));
|
|
4507
4511
|
if ((!isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {
|
|
4508
|
-
|
|
4509
|
-
eleSep.style.display = 'inherit';
|
|
4512
|
+
eleSep.style.display = 'unset';
|
|
4510
4513
|
const eleSepWidth = eleSep.offsetWidth + (parseFloat(window.getComputedStyle(eleSep).marginRight) * 2);
|
|
4511
4514
|
const prevSep = eleSep.previousElementSibling;
|
|
4512
4515
|
if ((elWid + eleSepWidth) < wid || des) {
|
|
@@ -4516,8 +4519,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4516
4519
|
}
|
|
4517
4520
|
}
|
|
4518
4521
|
else {
|
|
4522
|
+
setStyleAttribute(el, eleStyles);
|
|
4519
4523
|
if (prevSep.classList.contains(CLS_SEPARATOR)) {
|
|
4520
|
-
prevSep.style.display =
|
|
4524
|
+
prevSep.style.display = 'none';
|
|
4521
4525
|
}
|
|
4522
4526
|
}
|
|
4523
4527
|
eleSep.style.display = '';
|
|
@@ -4635,6 +4639,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4635
4639
|
}
|
|
4636
4640
|
el.style.position = '';
|
|
4637
4641
|
if (elWidth < width || destroy) {
|
|
4642
|
+
const inlineStyles = { minWidth: el.style.minWidth, height: el.style.height, minHeight: el.style.minHeight };
|
|
4638
4643
|
setStyleAttribute(el, { minWidth: '', height: '', minHeight: '' });
|
|
4639
4644
|
if (!el.classList.contains(CLS_POPOVERFLOW)) {
|
|
4640
4645
|
el.classList.remove(CLS_POPUP);
|
|
@@ -4660,7 +4665,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4660
4665
|
}
|
|
4661
4666
|
ignoreCount = this.ignoreEleFetch(index, innerEle);
|
|
4662
4667
|
if (el.classList.contains(CLS_TBAROVERFLOW)) {
|
|
4663
|
-
this.tbarPriRef(innerEle, index, sepBeforePri, el, destroy, elWidth, width, ignoreCount);
|
|
4668
|
+
this.tbarPriRef(innerEle, index, sepBeforePri, el, destroy, elWidth, width, ignoreCount, inlineStyles);
|
|
4664
4669
|
width -= el.offsetWidth;
|
|
4665
4670
|
}
|
|
4666
4671
|
else if (index === 0) {
|
|
@@ -5305,6 +5310,11 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5305
5310
|
this.tbResize = false;
|
|
5306
5311
|
this.separator();
|
|
5307
5312
|
}
|
|
5313
|
+
orientationChange() {
|
|
5314
|
+
setTimeout(() => {
|
|
5315
|
+
this.resize();
|
|
5316
|
+
}, 500);
|
|
5317
|
+
}
|
|
5308
5318
|
extendedOpen() {
|
|
5309
5319
|
const sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
|
|
5310
5320
|
if (this.overflowMode === 'Extended' && sib) {
|
|
@@ -7521,7 +7531,7 @@ let Tab = class Tab extends Component {
|
|
|
7521
7531
|
this.isNested = false;
|
|
7522
7532
|
this.isPopup = false;
|
|
7523
7533
|
this.initRender = true;
|
|
7524
|
-
this.
|
|
7534
|
+
this.isSwiped = false;
|
|
7525
7535
|
this.itemIndexArray = [];
|
|
7526
7536
|
this.templateEle = [];
|
|
7527
7537
|
if (this.allowDragAndDrop) {
|
|
@@ -8363,17 +8373,21 @@ let Tab = class Tab extends Component {
|
|
|
8363
8373
|
this.setActiveBorder();
|
|
8364
8374
|
this.refreshItemVisibility(trg);
|
|
8365
8375
|
if (!this.initRender && !skipDataBind) {
|
|
8366
|
-
trg.firstElementChild.focus();
|
|
8367
8376
|
const eventArg = {
|
|
8368
8377
|
previousItem: this.prevItem,
|
|
8369
8378
|
previousIndex: this.prevIndex,
|
|
8370
8379
|
selectedItem: trg,
|
|
8371
8380
|
selectedIndex: value,
|
|
8372
8381
|
selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
|
|
8373
|
-
isSwiped: this.
|
|
8374
|
-
isInteracted: isInteracted
|
|
8382
|
+
isSwiped: this.isSwiped,
|
|
8383
|
+
isInteracted: isInteracted,
|
|
8384
|
+
preventFocus: false
|
|
8375
8385
|
};
|
|
8376
|
-
this.trigger('selected', eventArg)
|
|
8386
|
+
this.trigger('selected', eventArg, (selectEventArgs) => {
|
|
8387
|
+
if (!selectEventArgs.preventFocus) {
|
|
8388
|
+
trg.firstElementChild.focus();
|
|
8389
|
+
}
|
|
8390
|
+
});
|
|
8377
8391
|
}
|
|
8378
8392
|
}
|
|
8379
8393
|
setItems(items) {
|
|
@@ -8477,7 +8491,7 @@ let Tab = class Tab extends Component {
|
|
|
8477
8491
|
nestedTab.removeAttribute('data-swipe');
|
|
8478
8492
|
return;
|
|
8479
8493
|
}
|
|
8480
|
-
this.
|
|
8494
|
+
this.isSwiped = true;
|
|
8481
8495
|
if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
|
|
8482
8496
|
for (let k = this.selectedItem - 1; k >= 0; k--) {
|
|
8483
8497
|
if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
|
|
@@ -8494,7 +8508,7 @@ let Tab = class Tab extends Component {
|
|
|
8494
8508
|
}
|
|
8495
8509
|
}
|
|
8496
8510
|
}
|
|
8497
|
-
this.
|
|
8511
|
+
this.isSwiped = false;
|
|
8498
8512
|
}
|
|
8499
8513
|
spaceKeyDown(e) {
|
|
8500
8514
|
if ((e.keyCode === 32 && e.which === 32) || (e.keyCode === 35 && e.which === 35)) {
|
|
@@ -9234,7 +9248,7 @@ let Tab = class Tab extends Component {
|
|
|
9234
9248
|
selectingIndex: args,
|
|
9235
9249
|
selectingContent: !isNullOrUndefined(this.content) ?
|
|
9236
9250
|
select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
|
|
9237
|
-
isSwiped: this.
|
|
9251
|
+
isSwiped: this.isSwiped,
|
|
9238
9252
|
isInteracted: this.isInteracted,
|
|
9239
9253
|
cancel: false
|
|
9240
9254
|
};
|
|
@@ -17305,6 +17319,7 @@ let Carousel = class Carousel extends Component {
|
|
|
17305
17319
|
EventHandler.remove(this.element.firstElementChild, 'animationend', this.onTransitionEnd);
|
|
17306
17320
|
EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
|
|
17307
17321
|
EventHandler.clearEvents(this.element);
|
|
17322
|
+
EventHandler.clearEvents(this.itemsContainer);
|
|
17308
17323
|
}
|
|
17309
17324
|
/**
|
|
17310
17325
|
* Method to transit from the current slide to the previous slide.
|
|
@@ -17404,8 +17419,9 @@ let Carousel = class Carousel extends Component {
|
|
|
17404
17419
|
this.destroyButtons();
|
|
17405
17420
|
this.unWireEvents();
|
|
17406
17421
|
[].slice.call(this.element.children).forEach((ele) => { this.element.removeChild(ele); });
|
|
17407
|
-
removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5]);
|
|
17422
|
+
removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5, CLS_SWIPE]);
|
|
17408
17423
|
['tabindex', 'role', 'style'].forEach((attr) => { this.element.removeAttribute(attr); });
|
|
17424
|
+
this.itemsContainer = null;
|
|
17409
17425
|
super.destroy();
|
|
17410
17426
|
}
|
|
17411
17427
|
};
|