@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
|
@@ -3522,6 +3522,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
3522
3522
|
function Toolbar(options, element) {
|
|
3523
3523
|
var _this = _super.call(this, options, element) || this;
|
|
3524
3524
|
_this.resizeContext = _this.resize.bind(_this);
|
|
3525
|
+
_this.orientationChangeContext = _this.orientationChange.bind(_this);
|
|
3525
3526
|
/**
|
|
3526
3527
|
* Contains the keyboard configuration of the Toolbar.
|
|
3527
3528
|
*/
|
|
@@ -3614,6 +3615,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
3614
3615
|
Toolbar.prototype.wireEvents = function () {
|
|
3615
3616
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
3616
3617
|
window.addEventListener('resize', this.resizeContext);
|
|
3618
|
+
window.addEventListener('orientationchange', this.orientationChangeContext);
|
|
3617
3619
|
if (this.allowKeyboard) {
|
|
3618
3620
|
this.wireKeyboardEvent();
|
|
3619
3621
|
}
|
|
@@ -3660,6 +3662,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
3660
3662
|
this.destroyScroll();
|
|
3661
3663
|
this.unwireKeyboardEvent();
|
|
3662
3664
|
window.removeEventListener('resize', this.resizeContext);
|
|
3665
|
+
window.removeEventListener('orientationchange', this.orientationChangeContext);
|
|
3663
3666
|
EventHandler.remove(document, 'scroll', this.docEvent);
|
|
3664
3667
|
EventHandler.remove(document, 'click', this.docEvent);
|
|
3665
3668
|
};
|
|
@@ -4381,8 +4384,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4381
4384
|
var sepHeight;
|
|
4382
4385
|
var sepItem;
|
|
4383
4386
|
if (this.overflowMode === 'Extended') {
|
|
4384
|
-
sepItem = element.querySelector('.' + CLS_SEPARATOR
|
|
4385
|
-
sepHeight =
|
|
4387
|
+
sepItem = element.querySelector('.' + CLS_SEPARATOR);
|
|
4388
|
+
sepHeight =
|
|
4389
|
+
(element.style.height === 'auto' || element.style.height === '') ? null : (sepItem && sepItem.offsetHeight);
|
|
4386
4390
|
}
|
|
4387
4391
|
var eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');
|
|
4388
4392
|
var eleHeight = (element.style.height === 'auto' || element.style.height === '') ? null : (eleItem && eleItem.offsetHeight);
|
|
@@ -4634,7 +4638,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4634
4638
|
nav.setAttribute('role', 'button');
|
|
4635
4639
|
element.appendChild(nav);
|
|
4636
4640
|
};
|
|
4637
|
-
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig) {
|
|
4641
|
+
Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {
|
|
4638
4642
|
var ignoreCount = ig;
|
|
4639
4643
|
var popEle = this.popObj.element;
|
|
4640
4644
|
var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
|
|
@@ -4646,8 +4650,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4646
4650
|
var eleSep = inEle.children[indx - (indx - sepPri) - 1];
|
|
4647
4651
|
var ignoreCheck = (!isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));
|
|
4648
4652
|
if ((!isNullOrUndefined(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {
|
|
4649
|
-
|
|
4650
|
-
eleSep.style.display = 'inherit';
|
|
4653
|
+
eleSep.style.display = 'unset';
|
|
4651
4654
|
var eleSepWidth = eleSep.offsetWidth + (parseFloat(window.getComputedStyle(eleSep).marginRight) * 2);
|
|
4652
4655
|
var prevSep = eleSep.previousElementSibling;
|
|
4653
4656
|
if ((elWid + eleSepWidth) < wid || des) {
|
|
@@ -4657,8 +4660,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4657
4660
|
}
|
|
4658
4661
|
}
|
|
4659
4662
|
else {
|
|
4663
|
+
setStyleAttribute(el, eleStyles);
|
|
4660
4664
|
if (prevSep.classList.contains(CLS_SEPARATOR)) {
|
|
4661
|
-
prevSep.style.display =
|
|
4665
|
+
prevSep.style.display = 'none';
|
|
4662
4666
|
}
|
|
4663
4667
|
}
|
|
4664
4668
|
eleSep.style.display = '';
|
|
@@ -4777,6 +4781,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4777
4781
|
}
|
|
4778
4782
|
el.style.position = '';
|
|
4779
4783
|
if (elWidth < width || destroy) {
|
|
4784
|
+
var inlineStyles = { minWidth: el.style.minWidth, height: el.style.height, minHeight: el.style.minHeight };
|
|
4780
4785
|
setStyleAttribute(el, { minWidth: '', height: '', minHeight: '' });
|
|
4781
4786
|
if (!el.classList.contains(CLS_POPOVERFLOW)) {
|
|
4782
4787
|
el.classList.remove(CLS_POPUP);
|
|
@@ -4802,7 +4807,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4802
4807
|
}
|
|
4803
4808
|
ignoreCount = this_1.ignoreEleFetch(index, innerEle);
|
|
4804
4809
|
if (el.classList.contains(CLS_TBAROVERFLOW)) {
|
|
4805
|
-
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount);
|
|
4810
|
+
this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount, inlineStyles);
|
|
4806
4811
|
width -= el.offsetWidth;
|
|
4807
4812
|
}
|
|
4808
4813
|
else if (index === 0) {
|
|
@@ -5458,6 +5463,12 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5458
5463
|
this.tbResize = false;
|
|
5459
5464
|
this.separator();
|
|
5460
5465
|
};
|
|
5466
|
+
Toolbar.prototype.orientationChange = function () {
|
|
5467
|
+
var _this = this;
|
|
5468
|
+
setTimeout(function () {
|
|
5469
|
+
_this.resize();
|
|
5470
|
+
}, 500);
|
|
5471
|
+
};
|
|
5461
5472
|
Toolbar.prototype.extendedOpen = function () {
|
|
5462
5473
|
var sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);
|
|
5463
5474
|
if (this.overflowMode === 'Extended' && sib) {
|
|
@@ -7788,7 +7799,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
7788
7799
|
this.isNested = false;
|
|
7789
7800
|
this.isPopup = false;
|
|
7790
7801
|
this.initRender = true;
|
|
7791
|
-
this.
|
|
7802
|
+
this.isSwiped = false;
|
|
7792
7803
|
this.itemIndexArray = [];
|
|
7793
7804
|
this.templateEle = [];
|
|
7794
7805
|
if (this.allowDragAndDrop) {
|
|
@@ -8637,17 +8648,21 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
8637
8648
|
this.setActiveBorder();
|
|
8638
8649
|
this.refreshItemVisibility(trg);
|
|
8639
8650
|
if (!this.initRender && !skipDataBind) {
|
|
8640
|
-
trg.firstElementChild.focus();
|
|
8641
8651
|
var eventArg = {
|
|
8642
8652
|
previousItem: this.prevItem,
|
|
8643
8653
|
previousIndex: this.prevIndex,
|
|
8644
8654
|
selectedItem: trg,
|
|
8645
8655
|
selectedIndex: value,
|
|
8646
8656
|
selectedContent: select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
|
|
8647
|
-
isSwiped: this.
|
|
8648
|
-
isInteracted: isInteracted
|
|
8657
|
+
isSwiped: this.isSwiped,
|
|
8658
|
+
isInteracted: isInteracted,
|
|
8659
|
+
preventFocus: false
|
|
8649
8660
|
};
|
|
8650
|
-
this.trigger('selected', eventArg)
|
|
8661
|
+
this.trigger('selected', eventArg, function (selectEventArgs) {
|
|
8662
|
+
if (!selectEventArgs.preventFocus) {
|
|
8663
|
+
trg.firstElementChild.focus();
|
|
8664
|
+
}
|
|
8665
|
+
});
|
|
8651
8666
|
}
|
|
8652
8667
|
};
|
|
8653
8668
|
Tab.prototype.setItems = function (items) {
|
|
@@ -8752,7 +8767,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
8752
8767
|
nestedTab.removeAttribute('data-swipe');
|
|
8753
8768
|
return;
|
|
8754
8769
|
}
|
|
8755
|
-
this.
|
|
8770
|
+
this.isSwiped = true;
|
|
8756
8771
|
if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
|
|
8757
8772
|
for (var k = this.selectedItem - 1; k >= 0; k--) {
|
|
8758
8773
|
if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
|
|
@@ -8769,7 +8784,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
8769
8784
|
}
|
|
8770
8785
|
}
|
|
8771
8786
|
}
|
|
8772
|
-
this.
|
|
8787
|
+
this.isSwiped = false;
|
|
8773
8788
|
};
|
|
8774
8789
|
Tab.prototype.spaceKeyDown = function (e) {
|
|
8775
8790
|
if ((e.keyCode === 32 && e.which === 32) || (e.keyCode === 35 && e.which === 35)) {
|
|
@@ -9518,7 +9533,7 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
9518
9533
|
selectingIndex: args,
|
|
9519
9534
|
selectingContent: !isNullOrUndefined(this.content) ?
|
|
9520
9535
|
select('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
|
|
9521
|
-
isSwiped: this.
|
|
9536
|
+
isSwiped: this.isSwiped,
|
|
9522
9537
|
isInteracted: this.isInteracted,
|
|
9523
9538
|
cancel: false
|
|
9524
9539
|
};
|
|
@@ -17731,6 +17746,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17731
17746
|
EventHandler.remove(this.element.firstElementChild, 'animationend', this.onTransitionEnd);
|
|
17732
17747
|
EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
|
|
17733
17748
|
EventHandler.clearEvents(this.element);
|
|
17749
|
+
EventHandler.clearEvents(this.itemsContainer);
|
|
17734
17750
|
};
|
|
17735
17751
|
/**
|
|
17736
17752
|
* Method to transit from the current slide to the previous slide.
|
|
@@ -17831,8 +17847,9 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17831
17847
|
this.destroyButtons();
|
|
17832
17848
|
this.unWireEvents();
|
|
17833
17849
|
[].slice.call(this.element.children).forEach(function (ele) { _this.element.removeChild(ele); });
|
|
17834
|
-
removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5]);
|
|
17850
|
+
removeClass([this.element], [CLS_CAROUSEL, this.cssClass, CLS_RTL$5, CLS_SWIPE]);
|
|
17835
17851
|
['tabindex', 'role', 'style'].forEach(function (attr) { _this.element.removeAttribute(attr); });
|
|
17852
|
+
this.itemsContainer = null;
|
|
17836
17853
|
_super.prototype.destroy.call(this);
|
|
17837
17854
|
};
|
|
17838
17855
|
__decorate$11([
|