@syncfusion/ej2-navigations 27.1.48 → 27.1.51
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 +48 -19
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +50 -20
- 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 +11 -12
- package/src/common/menu-base.d.ts +1 -0
- package/src/common/menu-base.js +3 -1
- package/src/sidebar/sidebar.d.ts +1 -0
- package/src/sidebar/sidebar.js +9 -5
- package/src/stepper/stepper.js +2 -2
- package/src/treeview/treeview.d.ts +2 -0
- package/src/treeview/treeview.js +36 -12
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.1.
|
|
3
|
+
* version : 27.1.51
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-navigations@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-navigations@
|
|
3
|
+
"_id": "@syncfusion/ej2-navigations@27.1.50",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-RU939KWXIlWV+VrU/vROorLnguKamVY3SSjBP/lOqa/oGBFhIQebcGmSo2JSkQ870R+jyK1Ec67MVaI/crYoRw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-navigations",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"/@syncfusion/ej2-spreadsheet",
|
|
41
41
|
"/@syncfusion/ej2-vue-navigations"
|
|
42
42
|
],
|
|
43
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
|
44
|
-
"_shasum": "
|
|
43
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-27.1.50.tgz",
|
|
44
|
+
"_shasum": "190f937bf1b2d76dc94cc68e77a90b124625589e",
|
|
45
45
|
"_spec": "@syncfusion/ej2-navigations@*",
|
|
46
46
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
47
47
|
"author": {
|
|
@@ -52,13 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"bundleDependencies": false,
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@syncfusion/ej2-base": "~27.1.
|
|
56
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
|
57
|
-
"@syncfusion/ej2-data": "~27.1.
|
|
58
|
-
"@syncfusion/ej2-inputs": "~27.1.
|
|
59
|
-
"@syncfusion/ej2-lists": "~27.1.
|
|
60
|
-
"@syncfusion/ej2-popups": "~27.1.
|
|
61
|
-
"markdown-spellcheck": "^1.3.1"
|
|
55
|
+
"@syncfusion/ej2-base": "~27.1.50",
|
|
56
|
+
"@syncfusion/ej2-buttons": "~27.1.51",
|
|
57
|
+
"@syncfusion/ej2-data": "~27.1.51",
|
|
58
|
+
"@syncfusion/ej2-inputs": "~27.1.50",
|
|
59
|
+
"@syncfusion/ej2-lists": "~27.1.50",
|
|
60
|
+
"@syncfusion/ej2-popups": "~27.1.50"
|
|
62
61
|
},
|
|
63
62
|
"deprecated": false,
|
|
64
63
|
"description": "A package of Essential JS 2 navigation components such as Tree-view, Tab, Toolbar, Context-menu, and Accordion which is used to navigate from one page to another",
|
|
@@ -163,6 +162,6 @@
|
|
|
163
162
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
164
163
|
},
|
|
165
164
|
"typings": "index.d.ts",
|
|
166
|
-
"version": "27.1.
|
|
165
|
+
"version": "27.1.51",
|
|
167
166
|
"sideEffects": false
|
|
168
167
|
}
|
package/src/common/menu-base.js
CHANGED
|
@@ -641,6 +641,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
641
641
|
detach(popupEle);
|
|
642
642
|
}
|
|
643
643
|
else {
|
|
644
|
+
_this.isContextMenuClosed = false;
|
|
644
645
|
_this.toggleAnimation(ul_1, false);
|
|
645
646
|
}
|
|
646
647
|
closeArgs = { element: ul_1, parentItem: item_1, items: items_1 };
|
|
@@ -1046,6 +1047,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1046
1047
|
case 'none':
|
|
1047
1048
|
_this.top = observedOpenArgs.top;
|
|
1048
1049
|
_this.left = observedOpenArgs.left;
|
|
1050
|
+
_this.isContextMenuClosed = true;
|
|
1049
1051
|
break;
|
|
1050
1052
|
case 'hamburger':
|
|
1051
1053
|
if (!observedOpenArgs.cancel) {
|
|
@@ -1983,7 +1985,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1983
1985
|
}
|
|
1984
1986
|
};
|
|
1985
1987
|
MenuBase.prototype.end = function (ul, isMenuOpen) {
|
|
1986
|
-
if (isMenuOpen) {
|
|
1988
|
+
if (isMenuOpen && (this.isMenu || (!this.isMenu && this.isContextMenuClosed))) {
|
|
1987
1989
|
if (this.isMenu || !Browser.isDevice) {
|
|
1988
1990
|
ul.style.display = 'block';
|
|
1989
1991
|
}
|
package/src/sidebar/sidebar.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare class Sidebar extends Component<HTMLElement> implements INotifyPr
|
|
|
42
42
|
private windowWidth;
|
|
43
43
|
private targetEle;
|
|
44
44
|
private firstRender;
|
|
45
|
+
private documentClickContext;
|
|
45
46
|
/**
|
|
46
47
|
* Specifies the size of the Sidebar in dock state.
|
|
47
48
|
* > For more details about dockSize refer to
|
package/src/sidebar/sidebar.js
CHANGED
|
@@ -56,7 +56,9 @@ var SIDEBARABSOLUTE = 'e-sidebar-absolute';
|
|
|
56
56
|
var Sidebar = /** @class */ (function (_super) {
|
|
57
57
|
__extends(Sidebar, _super);
|
|
58
58
|
function Sidebar(options, element) {
|
|
59
|
-
|
|
59
|
+
var _this = _super.call(this, options, element) || this;
|
|
60
|
+
_this.documentClickContext = _this.documentclickHandler.bind(_this);
|
|
61
|
+
return _this;
|
|
60
62
|
}
|
|
61
63
|
Sidebar.prototype.preRender = function () {
|
|
62
64
|
this.setWidth();
|
|
@@ -116,10 +118,12 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
116
118
|
};
|
|
117
119
|
Sidebar.prototype.setCloseOnDocumentClick = function () {
|
|
118
120
|
if (this.closeOnDocumentClick) {
|
|
119
|
-
|
|
121
|
+
document.addEventListener('mousedown', this.documentClickContext);
|
|
122
|
+
document.addEventListener('touchstart', this.documentClickContext);
|
|
120
123
|
}
|
|
121
124
|
else {
|
|
122
|
-
|
|
125
|
+
document.removeEventListener('mousedown', this.documentClickContext);
|
|
126
|
+
document.removeEventListener('touchstart', this.documentClickContext);
|
|
123
127
|
}
|
|
124
128
|
};
|
|
125
129
|
Sidebar.prototype.setWidth = function () {
|
|
@@ -421,10 +425,10 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
421
425
|
this.show();
|
|
422
426
|
}
|
|
423
427
|
else if (this.isOpen && this.position === 'Left' && args.swipeDirection === 'Left') {
|
|
424
|
-
this.hide();
|
|
428
|
+
this.hide(args.originalEvent);
|
|
425
429
|
}
|
|
426
430
|
else if (this.isOpen && this.position === 'Right' && args.swipeDirection === 'Right') {
|
|
427
|
-
this.hide();
|
|
431
|
+
this.hide(args.originalEvent);
|
|
428
432
|
}
|
|
429
433
|
else if (!this.isOpen && this.position === 'Right' && args.swipeDirection === 'Left'
|
|
430
434
|
&& (window.innerWidth - args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5)) {
|
package/src/stepper/stepper.js
CHANGED
|
@@ -264,7 +264,7 @@ var Stepper = /** @class */ (function (_super) {
|
|
|
264
264
|
if (this.stepperItemList && this.progressbar && this.element.classList.contains(HORIZSTEP)) {
|
|
265
265
|
this.setProgressPosition(this.element, true);
|
|
266
266
|
}
|
|
267
|
-
this.navigateToStep(this.activeStep, null, null, false);
|
|
267
|
+
this.navigateToStep(this.activeStep, null, null, false, false);
|
|
268
268
|
};
|
|
269
269
|
Stepper.prototype.updateStepFocus = function () {
|
|
270
270
|
if (this.isKeyNavFocus) {
|
|
@@ -972,7 +972,7 @@ var Stepper = /** @class */ (function (_super) {
|
|
|
972
972
|
if (this.stepperItemList && this.progressbar) {
|
|
973
973
|
this.setProgressPosition(this.element);
|
|
974
974
|
}
|
|
975
|
-
this.navigateToStep(this.activeStep, null, null, false);
|
|
975
|
+
this.navigateToStep(this.activeStep, null, null, false, false);
|
|
976
976
|
};
|
|
977
977
|
Stepper.prototype.updateElementClassArray = function () {
|
|
978
978
|
var classArray = [RTL, READONLY, 'e-steps-focus', LABELAFTER, LABELBEFORE, 'e-label-top',
|
|
@@ -1229,6 +1229,8 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
1229
1229
|
private setDragAndDrop;
|
|
1230
1230
|
private initializeDrag;
|
|
1231
1231
|
private dragCancelAction;
|
|
1232
|
+
private getOffsetX;
|
|
1233
|
+
private getOffsetY;
|
|
1232
1234
|
private dragAction;
|
|
1233
1235
|
private appendIndicator;
|
|
1234
1236
|
private dropAction;
|
package/src/treeview/treeview.js
CHANGED
|
@@ -2636,7 +2636,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2636
2636
|
currentItem = isNOU(currentItem) ? currentItem : this.getNodeObject(resultId);
|
|
2637
2637
|
if (!isNOU(currentItem)) {
|
|
2638
2638
|
var htmlAttributes = currentItem[this.fields.htmlAttributes];
|
|
2639
|
-
if (htmlAttributes && htmlAttributes.class.indexOf(DISABLE) !== -1) {
|
|
2639
|
+
if (htmlAttributes && !isNOU(htmlAttributes.class) && htmlAttributes.class.indexOf(DISABLE) !== -1) {
|
|
2640
2640
|
shouldPreventUpdate = false;
|
|
2641
2641
|
}
|
|
2642
2642
|
}
|
|
@@ -3371,6 +3371,24 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3371
3371
|
removeClass([this.element], DRAGGING);
|
|
3372
3372
|
this.dragStartAction = false;
|
|
3373
3373
|
};
|
|
3374
|
+
TreeView.prototype.getOffsetX = function (event, target) {
|
|
3375
|
+
var touchList = event.changedTouches;
|
|
3376
|
+
if (touchList && touchList.length > 0) {
|
|
3377
|
+
return touchList[0].clientX - target.getBoundingClientRect().left;
|
|
3378
|
+
}
|
|
3379
|
+
else {
|
|
3380
|
+
return event.offsetX;
|
|
3381
|
+
}
|
|
3382
|
+
};
|
|
3383
|
+
TreeView.prototype.getOffsetY = function (event, target) {
|
|
3384
|
+
var touchList = event.changedTouches;
|
|
3385
|
+
if (touchList && touchList.length > 0) {
|
|
3386
|
+
return touchList[0].clientY - target.getBoundingClientRect().top;
|
|
3387
|
+
}
|
|
3388
|
+
else {
|
|
3389
|
+
return event.offsetY;
|
|
3390
|
+
}
|
|
3391
|
+
};
|
|
3374
3392
|
TreeView.prototype.dragAction = function (e, virtualEle) {
|
|
3375
3393
|
var dropRoot = closest(e.target, '.' + DROPPABLE);
|
|
3376
3394
|
var dropWrap = closest(e.target, '.' + TEXTWRAP);
|
|
@@ -3380,6 +3398,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3380
3398
|
this.removeVirtualEle();
|
|
3381
3399
|
document.body.style.cursor = '';
|
|
3382
3400
|
var classList = e.target.classList;
|
|
3401
|
+
var event = e.event;
|
|
3402
|
+
var offsetY = this.getOffsetY(event, e.target);
|
|
3403
|
+
var offsetX = this.getOffsetX(event, e.target);
|
|
3383
3404
|
if (this.fullRowSelect && !dropWrap && !isNOU(classList) && classList.contains(FULLROW)) {
|
|
3384
3405
|
dropWrap = e.target.nextElementSibling;
|
|
3385
3406
|
}
|
|
@@ -3392,14 +3413,14 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3392
3413
|
(!dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)))) {
|
|
3393
3414
|
if (this.hasTemplate && dropLi) {
|
|
3394
3415
|
var templateTarget = select(this.fullRowSelect ? '.' + FULLROW : '.' + TEXTWRAP, dropLi);
|
|
3395
|
-
if ((e && (!expand && !collapse) &&
|
|
3396
|
-
(((expand &&
|
|
3416
|
+
if ((e && (!expand && !collapse) && offsetY < 7 && !checkWrapper) ||
|
|
3417
|
+
(((expand && offsetY < 5) || (collapse && offsetX < 3)))) {
|
|
3397
3418
|
var index = this.fullRowSelect ? (1) : (0);
|
|
3398
3419
|
this.appendIndicator(dropLi, icon, index);
|
|
3399
3420
|
}
|
|
3400
3421
|
else if ((e && (!expand && !collapse) &&
|
|
3401
|
-
!checkWrapper && templateTarget &&
|
|
3402
|
-
((expand &&
|
|
3422
|
+
!checkWrapper && templateTarget && offsetY > templateTarget.offsetHeight - 10) ||
|
|
3423
|
+
((expand && offsetY > 19) || (collapse && offsetX > 19))) {
|
|
3403
3424
|
var index = this.fullRowSelect ? (2) : (1);
|
|
3404
3425
|
this.appendIndicator(dropLi, icon, index);
|
|
3405
3426
|
}
|
|
@@ -3409,14 +3430,14 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3409
3430
|
}
|
|
3410
3431
|
}
|
|
3411
3432
|
else {
|
|
3412
|
-
if ((dropLi && e && (!expand && !collapse) && (
|
|
3413
|
-
(((expand &&
|
|
3433
|
+
if ((dropLi && e && (!expand && !collapse) && (offsetY < 7) && !checkWrapper) ||
|
|
3434
|
+
(((expand && offsetY < 5) || (collapse && offsetX < 3)))) {
|
|
3414
3435
|
var index = this.fullRowSelect ? (1) : (0);
|
|
3415
3436
|
this.appendIndicator(dropLi, icon, index);
|
|
3416
3437
|
}
|
|
3417
3438
|
else if ((dropLi && e && (!expand && !collapse) &&
|
|
3418
|
-
(e.target.offsetHeight > 0 &&
|
|
3419
|
-
(((expand &&
|
|
3439
|
+
(e.target.offsetHeight > 0 && offsetY > (e.target.offsetHeight - 10)) && !checkWrapper) ||
|
|
3440
|
+
(((expand && offsetY > 19) || (collapse && offsetX > 19)))) {
|
|
3420
3441
|
var index = this.fullRowSelect ? (2) : (1);
|
|
3421
3442
|
this.appendIndicator(dropLi, icon, index);
|
|
3422
3443
|
}
|
|
@@ -3461,7 +3482,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3461
3482
|
dropLi.insertBefore(virEle, dropLi.children[parseInt(index.toString(), 10)]);
|
|
3462
3483
|
};
|
|
3463
3484
|
TreeView.prototype.dropAction = function (e) {
|
|
3464
|
-
var
|
|
3485
|
+
var event = e.event;
|
|
3486
|
+
var offsetY = this.getOffsetY(event, e.target);
|
|
3465
3487
|
var dropTarget = e.target;
|
|
3466
3488
|
var dragObj;
|
|
3467
3489
|
var level;
|
|
@@ -3752,10 +3774,12 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3752
3774
|
};
|
|
3753
3775
|
TreeView.prototype.renderVirtualEle = function (e) {
|
|
3754
3776
|
var pre;
|
|
3755
|
-
|
|
3777
|
+
var event = e.event;
|
|
3778
|
+
var offsetY = this.getOffsetY(event, e.target);
|
|
3779
|
+
if (offsetY > e.target.offsetHeight - 2) {
|
|
3756
3780
|
pre = false;
|
|
3757
3781
|
}
|
|
3758
|
-
else if (
|
|
3782
|
+
else if (offsetY < 2) {
|
|
3759
3783
|
pre = true;
|
|
3760
3784
|
}
|
|
3761
3785
|
var virEle = this.createElement('div', { className: SIBLING });
|