@syncfusion/ej2-navigations 29.1.37 → 29.1.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/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 +25 -18
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +25 -18
- 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 +7 -7
- package/src/carousel/carousel.js +8 -0
- package/src/common/menu-base.js +5 -1
- package/src/tab/tab.js +2 -2
- package/src/treeview/treeview.js +10 -15
|
@@ -2270,6 +2270,8 @@ let MenuBase = class MenuBase extends Component {
|
|
|
2270
2270
|
}
|
|
2271
2271
|
const cmenuWidth = Math.ceil(this.getMenuWidth(ul, ul.offsetWidth, this.enableRtl));
|
|
2272
2272
|
const cmenu = addScrolling(this.createElement, wrapper, ul, 'vscroll', this.enableRtl, wrapper.offsetHeight);
|
|
2273
|
+
const newOffset = this.callFit(cmenu, false, true, top, left);
|
|
2274
|
+
top = newOffset.top;
|
|
2273
2275
|
Object.assign(cmenu.style, {
|
|
2274
2276
|
top: `${top}px`,
|
|
2275
2277
|
left: `${left}px`,
|
|
@@ -3009,6 +3011,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3009
3011
|
let pElement;
|
|
3010
3012
|
const animateElement = (this.enableScrolling && !this.isMenu && closest(ul, '.e-menu-vscroll'))
|
|
3011
3013
|
? closest(ul, '.e-menu-vscroll') : ul;
|
|
3014
|
+
Animation.stop(animateElement);
|
|
3012
3015
|
if (this.animationSettings.effect === 'None' || !isMenuOpen) {
|
|
3013
3016
|
if (this.hamburgerMode && ul) {
|
|
3014
3017
|
ul.style.top = '0px';
|
|
@@ -3017,6 +3020,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3017
3020
|
this.end(ul, isMenuOpen);
|
|
3018
3021
|
}
|
|
3019
3022
|
else {
|
|
3023
|
+
animateElement.style.maxHeight = '';
|
|
3020
3024
|
this.animation.animate(animateElement, {
|
|
3021
3025
|
name: this.animationSettings.effect,
|
|
3022
3026
|
duration: this.animationSettings.duration,
|
|
@@ -3035,7 +3039,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3035
3039
|
}
|
|
3036
3040
|
else {
|
|
3037
3041
|
options.element.style.display = 'block';
|
|
3038
|
-
options.element.style.maxHeight =
|
|
3042
|
+
options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';
|
|
3039
3043
|
}
|
|
3040
3044
|
},
|
|
3041
3045
|
progress: (options) => {
|
|
@@ -9520,14 +9524,14 @@ let Tab = class Tab extends Component {
|
|
|
9520
9524
|
* @returns {void}.
|
|
9521
9525
|
*/
|
|
9522
9526
|
removeTab(index) {
|
|
9523
|
-
const trg = selectAll('.' + CLS_TB_ITEM, this.
|
|
9527
|
+
const trg = selectAll('.' + CLS_TB_ITEM, this.hdrEle)[index];
|
|
9524
9528
|
if (isNullOrUndefined(trg)) {
|
|
9525
9529
|
return;
|
|
9526
9530
|
}
|
|
9527
9531
|
const removeArgs = { removedItem: trg, removedIndex: index, cancel: false };
|
|
9528
9532
|
this.trigger('removing', removeArgs, (tabRemovingArgs) => {
|
|
9529
9533
|
if (!tabRemovingArgs.cancel) {
|
|
9530
|
-
const header = select('#' + CLS_ITEM$2 + this.tabId + '_' + this.extIndex(trg.id), select('.' + CLS_TB_ITEMS, this.
|
|
9534
|
+
const header = select('#' + CLS_ITEM$2 + this.tabId + '_' + this.extIndex(trg.id), select('.' + CLS_TB_ITEMS, this.hdrEle));
|
|
9531
9535
|
if (!isNullOrUndefined(header)) {
|
|
9532
9536
|
this.clearTabTemplate(header, 'headerTemplate', CLS_TB_ITEM);
|
|
9533
9537
|
}
|
|
@@ -12280,7 +12284,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12280
12284
|
return undefined;
|
|
12281
12285
|
}
|
|
12282
12286
|
getChildGroup(data, parentId, isRoot) {
|
|
12283
|
-
|
|
12287
|
+
const childNodes = [];
|
|
12284
12288
|
if (isNullOrUndefined(data)) {
|
|
12285
12289
|
return childNodes;
|
|
12286
12290
|
}
|
|
@@ -12294,9 +12298,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
12294
12298
|
else if (isRoot) {
|
|
12295
12299
|
return data[parseInt(i.toString(), 10)];
|
|
12296
12300
|
}
|
|
12297
|
-
else {
|
|
12298
|
-
return [];
|
|
12299
|
-
}
|
|
12300
12301
|
}
|
|
12301
12302
|
return childNodes;
|
|
12302
12303
|
}
|
|
@@ -14206,17 +14207,15 @@ let TreeView = TreeView_1 = class TreeView extends Component {
|
|
|
14206
14207
|
removeChildNodes(parentId) {
|
|
14207
14208
|
const cNodes = this.getChildGroup(this.groupedData, parentId, false);
|
|
14208
14209
|
const childData = [];
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
this.removeChildNodes(id);
|
|
14219
|
-
}
|
|
14210
|
+
for (let i = 0, len = cNodes.length; i < len; i++) {
|
|
14211
|
+
const dm = new DataManager(this.treeData);
|
|
14212
|
+
const id = getValue(this.fields.id, cNodes[parseInt(i.toString(), 10)]).toString();
|
|
14213
|
+
const data = {};
|
|
14214
|
+
const currId = this.isNumberTypeId ? parseFloat(id) : id;
|
|
14215
|
+
data[this.fields.id] = currId;
|
|
14216
|
+
const nodeData = dm.remove(this.fields.id, data);
|
|
14217
|
+
childData.push(nodeData[0]);
|
|
14218
|
+
this.removeChildNodes(id);
|
|
14220
14219
|
}
|
|
14221
14220
|
return childData;
|
|
14222
14221
|
}
|
|
@@ -18257,6 +18256,14 @@ let Carousel = class Carousel extends Component {
|
|
|
18257
18256
|
if (this.element.classList.contains(CLS_HOVER) || isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
|
|
18258
18257
|
return;
|
|
18259
18258
|
}
|
|
18259
|
+
if (this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse)) {
|
|
18260
|
+
return;
|
|
18261
|
+
}
|
|
18262
|
+
const eventType = e.startEvents ? e.startEvents.toString() : null;
|
|
18263
|
+
if (eventType && ((this.swipeMode === CarouselSwipeMode.Mouse && eventType.includes('Touch')) ||
|
|
18264
|
+
(this.swipeMode === CarouselSwipeMode.Touch && eventType.includes('Mouse')))) {
|
|
18265
|
+
return;
|
|
18266
|
+
}
|
|
18260
18267
|
const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
|
|
18261
18268
|
const slideIndex = this.getSlideIndex(direction);
|
|
18262
18269
|
if (!this.isSuspendSlideTransition(slideIndex, direction)) {
|