@syncfusion/ej2-navigations 20.4.40 → 20.4.43
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 +21 -0
- package/README.md +1 -1
- 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 +44 -45
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +44 -46
- 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 -11
- package/src/breadcrumb/breadcrumb.js +2 -2
- package/src/common/menu-base-model.d.ts +1 -1
- package/src/common/menu-base.js +17 -13
- package/src/tab/tab.d.ts +0 -1
- package/src/tab/tab.js +19 -30
- package/src/treeview/treeview.d.ts +1 -0
- package/src/treeview/treeview.js +6 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.43
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-navigations@20.4.42",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-BmuwwxiB2TtPnfF5n7PHNE1XxcYIC9qMR+wFFFvyTfHAaHW6bPG9fGkvJXxfXzN9/TUpQnzkWN8y16roZtGPgA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-navigations",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"/@syncfusion/ej2-spreadsheet",
|
|
39
39
|
"/@syncfusion/ej2-vue-navigations"
|
|
40
40
|
],
|
|
41
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-20.4.
|
|
42
|
-
"_shasum": "
|
|
41
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-20.4.42.tgz",
|
|
42
|
+
"_shasum": "7328ff72f4680102ef4272d27d44f7b6f5861fd2",
|
|
43
43
|
"_spec": "@syncfusion/ej2-navigations@*",
|
|
44
44
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
45
45
|
"author": {
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"bundleDependencies": false,
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@syncfusion/ej2-base": "~20.4.
|
|
54
|
-
"@syncfusion/ej2-buttons": "~20.4.
|
|
55
|
-
"@syncfusion/ej2-data": "~20.4.
|
|
56
|
-
"@syncfusion/ej2-inputs": "~20.4.
|
|
57
|
-
"@syncfusion/ej2-lists": "~20.4.
|
|
58
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
53
|
+
"@syncfusion/ej2-base": "~20.4.42",
|
|
54
|
+
"@syncfusion/ej2-buttons": "~20.4.42",
|
|
55
|
+
"@syncfusion/ej2-data": "~20.4.42",
|
|
56
|
+
"@syncfusion/ej2-inputs": "~20.4.42",
|
|
57
|
+
"@syncfusion/ej2-lists": "~20.4.42",
|
|
58
|
+
"@syncfusion/ej2-popups": "~20.4.43"
|
|
59
59
|
},
|
|
60
60
|
"deprecated": false,
|
|
61
61
|
"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",
|
|
@@ -160,6 +160,6 @@
|
|
|
160
160
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
161
161
|
},
|
|
162
162
|
"typings": "index.d.ts",
|
|
163
|
-
"version": "20.4.
|
|
163
|
+
"version": "20.4.43",
|
|
164
164
|
"sideEffects": false
|
|
165
165
|
}
|
|
@@ -99,7 +99,7 @@ var Breadcrumb = /** @class */ (function (_super) {
|
|
|
99
99
|
this._maxItems = this.maxItems;
|
|
100
100
|
this.element.setAttribute('aria-label', 'breadcrumb');
|
|
101
101
|
if (this.cssClass) {
|
|
102
|
-
addClass([this.element], this.cssClass.split(' '));
|
|
102
|
+
addClass([this.element], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
103
103
|
}
|
|
104
104
|
if (this.enableRtl) {
|
|
105
105
|
this.element.classList.add('e-rtl');
|
|
@@ -613,7 +613,7 @@ var Breadcrumb = /** @class */ (function (_super) {
|
|
|
613
613
|
removeClass([this.element], oldProp.cssClass.split(' '));
|
|
614
614
|
}
|
|
615
615
|
if (newProp.cssClass) {
|
|
616
|
-
addClass([this.element], newProp.cssClass.split(' '));
|
|
616
|
+
addClass([this.element], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
617
617
|
}
|
|
618
618
|
if ((oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) && !(newProp.cssClass &&
|
|
619
619
|
newProp.cssClass.indexOf(ICONRIGHT) > -1) || !(oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Property, ChildProperty, NotifyPropertyChanges, INotifyPropertyChanged, AnimationModel, isBlazor } from '@syncfusion/ej2-base';import { Event, EventHandler, EmitType, BaseEventArgs, KeyboardEvents, KeyboardEventArgs, Touch, TapEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, TouchEventArgs, MouseEventArgs } from '@syncfusion/ej2-base';import { Browser, Collection, setValue, getValue, getUniqueID, getInstance, isNullOrUndefined } from '@syncfusion/ej2-base';import { select, selectAll, closest, detach, append, rippleEffect, isVisible, Complex, addClass, removeClass } from '@syncfusion/ej2-base';import { ListBase, ListBaseOptions } from '@syncfusion/ej2-lists';import { getZindexPartial, calculatePosition, OffsetPosition, isCollide, fit, Popup } from '@syncfusion/ej2-popups';import {
|
|
1
|
+
import { Component, Property, ChildProperty, NotifyPropertyChanges, INotifyPropertyChanged, AnimationModel, isBlazor } from '@syncfusion/ej2-base';import { Event, EventHandler, EmitType, BaseEventArgs, KeyboardEvents, KeyboardEventArgs, Touch, TapEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationOptions, TouchEventArgs, MouseEventArgs } from '@syncfusion/ej2-base';import { Browser, Collection, setValue, getValue, getUniqueID, getInstance, isNullOrUndefined } from '@syncfusion/ej2-base';import { select, selectAll, closest, detach, append, rippleEffect, isVisible, Complex, addClass, removeClass } from '@syncfusion/ej2-base';import { ListBase, ListBaseOptions } from '@syncfusion/ej2-lists';import { getZindexPartial, calculatePosition, OffsetPosition, isCollide, fit, Popup } from '@syncfusion/ej2-popups';import { SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { getScrollableParent } from '@syncfusion/ej2-popups';import { HScroll } from '../common/h-scroll';import { VScroll } from '../common/v-scroll';import { addScrolling, destroyScroll } from '../common/menu-scroll';
|
|
2
2
|
import {MenuEffect,MenuEventArgs,BeforeOpenCloseMenuEventArgs,OpenCloseMenuEventArgs} from "./menu-base";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
package/src/common/menu-base.js
CHANGED
|
@@ -239,7 +239,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
if (this.cssClass) {
|
|
242
|
-
addClass([wrapper], this.cssClass.split(' '));
|
|
242
|
+
addClass([wrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
243
243
|
}
|
|
244
244
|
if (this.enableRtl) {
|
|
245
245
|
wrapper.classList.add(RTL);
|
|
@@ -438,14 +438,6 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
438
438
|
if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
|
|
439
439
|
fliIdx = defaultIdx;
|
|
440
440
|
}
|
|
441
|
-
if (cul.children[fliIdx].classList.contains(HIDE)) {
|
|
442
|
-
if (e.action === DOWNARROW && fliIdx === cul.childElementCount - 1) {
|
|
443
|
-
fliIdx = defaultIdx;
|
|
444
|
-
}
|
|
445
|
-
else if (e.action === UPARROW && fliIdx === 0) {
|
|
446
|
-
fliIdx = defaultIdx;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
441
|
}
|
|
450
442
|
}
|
|
451
443
|
var cli = cul.children[fliIdx];
|
|
@@ -455,8 +447,15 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
455
447
|
};
|
|
456
448
|
MenuBase.prototype.isValidLI = function (cli, index, action) {
|
|
457
449
|
var cul = this.getUlByNavIdx();
|
|
450
|
+
var defaultIdx = (action === DOWNARROW || action === HOME || action === TAB) ? 0 : cul.childElementCount - 1;
|
|
458
451
|
if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {
|
|
459
|
-
if (
|
|
452
|
+
if (action === DOWNARROW && index === cul.childElementCount - 1) {
|
|
453
|
+
index = defaultIdx;
|
|
454
|
+
}
|
|
455
|
+
else if (action === UPARROW && index === 0) {
|
|
456
|
+
index = defaultIdx;
|
|
457
|
+
}
|
|
458
|
+
else if ((action === DOWNARROW) || (action === RIGHTARROW)) {
|
|
460
459
|
index++;
|
|
461
460
|
}
|
|
462
461
|
else {
|
|
@@ -794,7 +793,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
794
793
|
}
|
|
795
794
|
else {
|
|
796
795
|
if (this.cssClass) {
|
|
797
|
-
addClass([this.popupWrapper], this.cssClass.split(' '));
|
|
796
|
+
addClass([this.popupWrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
798
797
|
}
|
|
799
798
|
this.popupObj.hide();
|
|
800
799
|
}
|
|
@@ -1205,7 +1204,12 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1205
1204
|
}
|
|
1206
1205
|
var ul = ListBase.createList(this.createElement, items, listBaseOptions, !this.template, this);
|
|
1207
1206
|
ul.setAttribute('tabindex', '0');
|
|
1208
|
-
this.isMenu
|
|
1207
|
+
if (this.isMenu) {
|
|
1208
|
+
ul.setAttribute('role', 'menu');
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
ul.setAttribute('role', 'menubar');
|
|
1212
|
+
}
|
|
1209
1213
|
return ul;
|
|
1210
1214
|
};
|
|
1211
1215
|
MenuBase.prototype.moverHandler = function (e) {
|
|
@@ -1599,7 +1603,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
1599
1603
|
removeClass([wrapper], oldProp.cssClass.split(' '));
|
|
1600
1604
|
}
|
|
1601
1605
|
if (newProp.cssClass) {
|
|
1602
|
-
addClass([wrapper], newProp.cssClass.split(' '));
|
|
1606
|
+
addClass([wrapper], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
1603
1607
|
}
|
|
1604
1608
|
break;
|
|
1605
1609
|
case 'enableRtl':
|
package/src/tab/tab.d.ts
CHANGED
|
@@ -515,7 +515,6 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
|
|
|
515
515
|
private removeActiveClass;
|
|
516
516
|
private checkPopupOverflow;
|
|
517
517
|
private popupHandler;
|
|
518
|
-
private updateOrientationAttribute;
|
|
519
518
|
private setCloseButton;
|
|
520
519
|
private prevCtnAnimation;
|
|
521
520
|
private triggerPrevAnimation;
|
package/src/tab/tab.js
CHANGED
|
@@ -213,7 +213,6 @@ var Tab = /** @class */ (function (_super) {
|
|
|
213
213
|
* @returns {void}
|
|
214
214
|
*/
|
|
215
215
|
Tab.prototype.destroy = function () {
|
|
216
|
-
var _this = this;
|
|
217
216
|
if (this.isReact || this.isAngular) {
|
|
218
217
|
this.clearTemplate();
|
|
219
218
|
}
|
|
@@ -222,9 +221,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
222
221
|
this.tbObj = null;
|
|
223
222
|
}
|
|
224
223
|
this.unWireEvents();
|
|
225
|
-
|
|
226
|
-
_this.element.removeAttribute(val);
|
|
227
|
-
});
|
|
224
|
+
this.element.removeAttribute('aria-disabled');
|
|
228
225
|
this.expTemplateContent();
|
|
229
226
|
if (!this.isTemplate) {
|
|
230
227
|
while (this.element.firstElementChild) {
|
|
@@ -303,7 +300,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
303
300
|
var css = (name === 'msie') ? 'e-ie' : (name === 'edge') ? 'e-edge' : (name === 'safari') ? 'e-safari' : '';
|
|
304
301
|
setStyle(this.element, { 'width': formatUnit(this.width), 'height': formatUnit(this.height) });
|
|
305
302
|
this.setCssClass(this.element, this.cssClass, true);
|
|
306
|
-
attributes(this.element, {
|
|
303
|
+
attributes(this.element, { 'aria-disabled': 'false' });
|
|
307
304
|
this.setCssClass(this.element, css, true);
|
|
308
305
|
this.updatePopAnimationConfig();
|
|
309
306
|
};
|
|
@@ -399,8 +396,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
399
396
|
hdrItems.forEach(function (item, index) {
|
|
400
397
|
_this.lastIndex = index;
|
|
401
398
|
var attr = {
|
|
402
|
-
className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
|
|
403
|
-
attrs: { role: 'tab', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index, 'aria-selected': 'false' }
|
|
399
|
+
className: CLS_ITEM, id: CLS_ITEM + _this.tabId + '_' + index
|
|
404
400
|
};
|
|
405
401
|
var txt = _this.createElement('span', {
|
|
406
402
|
className: CLS_TEXT, innerHTML: item, attrs: { 'role': 'presentation' }
|
|
@@ -408,7 +404,10 @@ var Tab = /** @class */ (function (_super) {
|
|
|
408
404
|
var cont = _this.createElement('div', {
|
|
409
405
|
className: CLS_TEXT_WRAP, innerHTML: txt + _this.btnCls.outerHTML
|
|
410
406
|
}).outerHTML;
|
|
411
|
-
var wrap = _this.createElement('div', {
|
|
407
|
+
var wrap = _this.createElement('div', {
|
|
408
|
+
className: CLS_WRAP, innerHTML: cont,
|
|
409
|
+
attrs: { role: 'tab', tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': CLS_CONTENT + _this.tabId + '_' + index }
|
|
410
|
+
});
|
|
412
411
|
tabItems_1.appendChild(_this.createElement('div', attr));
|
|
413
412
|
selectAll('.' + CLS_ITEM, tabItems_1)[index].appendChild(wrap);
|
|
414
413
|
});
|
|
@@ -427,15 +426,13 @@ var Tab = /** @class */ (function (_super) {
|
|
|
427
426
|
this.tbObj.isStringTemplate = true;
|
|
428
427
|
this.tbObj.createElement = this.createElement;
|
|
429
428
|
this.tbObj.appendTo(this.hdrEle);
|
|
430
|
-
attributes(this.hdrEle, {
|
|
431
|
-
this.updateOrientationAttribute();
|
|
429
|
+
attributes(this.hdrEle, { role: 'tablist' });
|
|
432
430
|
this.setCloseButton(this.showCloseButton);
|
|
433
431
|
var toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
|
|
434
432
|
if (!isNOU(toolbarHeader)) {
|
|
435
433
|
if (isNOU(toolbarHeader.id) || toolbarHeader.id === '') {
|
|
436
434
|
toolbarHeader.id = this.element.id + '_' + 'tab_header_items';
|
|
437
435
|
}
|
|
438
|
-
this.element.setAttribute('aria-owns', toolbarHeader.id);
|
|
439
436
|
}
|
|
440
437
|
};
|
|
441
438
|
Tab.prototype.renderContent = function () {
|
|
@@ -531,7 +528,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
531
528
|
}
|
|
532
529
|
}
|
|
533
530
|
var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
534
|
-
var wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
531
|
+
var wrapAttrs = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'false' };
|
|
535
532
|
tCont.appendChild(_this.btnCls.cloneNode(true));
|
|
536
533
|
var wrap = _this.createElement('div', { className: CLS_WRAP, attrs: wrapAttrs });
|
|
537
534
|
wrap.appendChild(tCont);
|
|
@@ -542,7 +539,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
542
539
|
_this.itemIndexArray.splice((index + i), 0, CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
|
|
543
540
|
}
|
|
544
541
|
var attrObj = {
|
|
545
|
-
id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex
|
|
542
|
+
id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex
|
|
546
543
|
};
|
|
547
544
|
var tItem = { htmlAttributes: attrObj, template: wrap };
|
|
548
545
|
tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
|
|
@@ -571,6 +568,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
571
568
|
if (tabHeader) {
|
|
572
569
|
var tabItems = selectAll('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE, tabHeader);
|
|
573
570
|
[].slice.call(tabItems).forEach(function (node) { return node.classList.remove(CLS_ACTIVE); });
|
|
571
|
+
[].slice.call(tabItems).forEach(function (node) { return node.firstElementChild.setAttribute('aria-selected', 'false'); });
|
|
574
572
|
}
|
|
575
573
|
};
|
|
576
574
|
Tab.prototype.checkPopupOverflow = function (ele) {
|
|
@@ -613,9 +611,6 @@ var Tab = /** @class */ (function (_super) {
|
|
|
613
611
|
}
|
|
614
612
|
return selectAll('.' + CLS_TB_ITEM, this.tbItems).length - 1;
|
|
615
613
|
};
|
|
616
|
-
Tab.prototype.updateOrientationAttribute = function () {
|
|
617
|
-
attributes(this.element, { 'aria-orientation': (this.isVertical() ? 'vertical' : 'horizontal') });
|
|
618
|
-
};
|
|
619
614
|
Tab.prototype.setCloseButton = function (val) {
|
|
620
615
|
var trg = select('.' + CLS_HEADER, this.element);
|
|
621
616
|
if (val === true) {
|
|
@@ -922,7 +917,6 @@ var Tab = /** @class */ (function (_super) {
|
|
|
922
917
|
}
|
|
923
918
|
}
|
|
924
919
|
this.addVerticalClass();
|
|
925
|
-
this.updateOrientationAttribute();
|
|
926
920
|
this.setActiveBorder();
|
|
927
921
|
this.focusItem();
|
|
928
922
|
};
|
|
@@ -1108,20 +1102,18 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1108
1102
|
if (!this.isTemplate) {
|
|
1109
1103
|
var prev = this.tbItem[this.prevIndex];
|
|
1110
1104
|
if (!isNOU(prev)) {
|
|
1111
|
-
prev.removeAttribute('aria-controls');
|
|
1105
|
+
prev.firstElementChild.removeAttribute('aria-controls');
|
|
1112
1106
|
}
|
|
1113
|
-
attributes(trg, { 'aria-controls': CLS_CONTENT + this.tabId + '_' + value });
|
|
1107
|
+
attributes(trg.firstElementChild, { 'aria-controls': CLS_CONTENT + this.tabId + '_' + value });
|
|
1114
1108
|
}
|
|
1115
1109
|
var id = trg.id;
|
|
1116
1110
|
this.removeActiveClass();
|
|
1117
1111
|
trg.classList.add(CLS_ACTIVE);
|
|
1118
|
-
|
|
1119
|
-
trg.setAttribute('aria-selected', 'true');
|
|
1112
|
+
trg.firstElementChild.setAttribute('aria-selected', 'true');
|
|
1120
1113
|
var no = Number(this.extIndex(id));
|
|
1121
1114
|
if (isNOU(this.prevActiveEle)) {
|
|
1122
1115
|
this.prevActiveEle = CLS_CONTENT + this.tabId + '_' + no;
|
|
1123
1116
|
}
|
|
1124
|
-
attributes(this.element, { 'aria-activedescendant': id });
|
|
1125
1117
|
if (this.isTemplate) {
|
|
1126
1118
|
if (select('.' + CLS_CONTENT, this.element).children.length > 0) {
|
|
1127
1119
|
var trg_1 = this.findEle(select('.' + CLS_CONTENT, this.element).children, CLS_CONTENT + this.tabId + '_' + no);
|
|
@@ -1796,7 +1788,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
1796
1788
|
(textValue_1.length === 0) && !isNOU(item.header) && isNOU(item.header.iconCss))) {
|
|
1797
1789
|
if (tabItems_2[place]) {
|
|
1798
1790
|
if (isNOU(item.id)) {
|
|
1799
|
-
item.id = TABITEMPREFIX + (lastEleIndex + place).toString();
|
|
1791
|
+
item.id = CLS_ITEM + _this.tabId + '_' + TABITEMPREFIX + (lastEleIndex + place).toString();
|
|
1800
1792
|
}
|
|
1801
1793
|
tabItems_2[place].htmlAttributes['data-id'] = item.id;
|
|
1802
1794
|
}
|
|
@@ -2229,7 +2221,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
2229
2221
|
}
|
|
2230
2222
|
}
|
|
2231
2223
|
var tabIndex = isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString();
|
|
2232
|
-
var wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex };
|
|
2224
|
+
var wrapAtt = (item.disabled) ? {} : { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-selected': 'true' };
|
|
2233
2225
|
tConts.appendChild(this.btnCls.cloneNode(true));
|
|
2234
2226
|
var wraper = this.createElement('div', { className: CLS_WRAP, attrs: wrapAtt });
|
|
2235
2227
|
wraper.appendChild(tConts);
|
|
@@ -2280,11 +2272,7 @@ var Tab = /** @class */ (function (_super) {
|
|
|
2280
2272
|
detach(element);
|
|
2281
2273
|
detach(detachContent);
|
|
2282
2274
|
var attr = {
|
|
2283
|
-
className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE + ' ' + CLS_ACTIVE, id: CLS_ITEM + this.tabId + '_' + index
|
|
2284
|
-
attrs: {
|
|
2285
|
-
role: 'tab', 'aria-controls': CLS_CONTENT + this.tabId + '_' + index,
|
|
2286
|
-
'aria-disabled': 'false', 'aria-selected': 'true'
|
|
2287
|
-
}
|
|
2275
|
+
className: CLS_TB_ITEM + ' ' + CLS_TEMPLATE + ' ' + CLS_ACTIVE, id: CLS_ITEM + this.tabId + '_' + index
|
|
2288
2276
|
};
|
|
2289
2277
|
var txtString = this.createElement('span', {
|
|
2290
2278
|
className: CLS_TEXT, innerHTML: header, attrs: { 'role': 'presentation' }
|
|
@@ -2294,7 +2282,8 @@ var Tab = /** @class */ (function (_super) {
|
|
|
2294
2282
|
}).outerHTML;
|
|
2295
2283
|
var tabIndex = element.firstElementChild.getAttribute('data-tabindex');
|
|
2296
2284
|
var wrap = this.createElement('div', {
|
|
2297
|
-
className: CLS_WRAP, innerHTML: conte,
|
|
2285
|
+
className: CLS_WRAP, innerHTML: conte,
|
|
2286
|
+
attrs: { tabIndex: tabIndex, 'data-tabindex': tabIndex, role: 'tab', 'aria-controls': CLS_CONTENT + this.tabId + '_' + index, 'aria-selected': 'true' }
|
|
2298
2287
|
});
|
|
2299
2288
|
tabItems.insertBefore(this.createElement('div', attr), tabItems.children[index + 1]);
|
|
2300
2289
|
this.element.querySelector('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE).appendChild(wrap);
|
|
@@ -522,6 +522,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
522
522
|
private hasTemplate;
|
|
523
523
|
private isFirstRender;
|
|
524
524
|
private isNodeDropped;
|
|
525
|
+
private isInteracted;
|
|
525
526
|
/**
|
|
526
527
|
* Indicates whether the TreeView allows drag and drop of nodes. To drag and drop a node in
|
|
527
528
|
* desktop, hold the mouse on the node, drag it to the target node and drop the node by releasing
|
package/src/treeview/treeview.js
CHANGED
|
@@ -216,6 +216,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
216
216
|
_this.isFirstRender = false;
|
|
217
217
|
// Specifies whether the node is dropped or not
|
|
218
218
|
_this.isNodeDropped = false;
|
|
219
|
+
_this.isInteracted = false;
|
|
219
220
|
_this.mouseDownStatus = false;
|
|
220
221
|
return _this;
|
|
221
222
|
}
|
|
@@ -1477,7 +1478,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1477
1478
|
}
|
|
1478
1479
|
};
|
|
1479
1480
|
TreeView.prototype.clickHandler = function (event) {
|
|
1480
|
-
var target = event.originalEvent.target;
|
|
1481
|
+
var target = Browser.isDevice ? document.elementFromPoint(event.originalEvent.changedTouches[0].clientX, event.originalEvent.changedTouches[0].clientY) : event.originalEvent.target;
|
|
1481
1482
|
EventHandler.remove(this.element, 'contextmenu', this.preventContextMenu);
|
|
1482
1483
|
if (!target || this.dragStartAction) {
|
|
1483
1484
|
return;
|
|
@@ -1616,6 +1617,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1616
1617
|
}
|
|
1617
1618
|
if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
|
|
1618
1619
|
this.expandArgs = this.getExpandEvent(currLi, null);
|
|
1620
|
+
this.expandArgs.isInteracted = this.isInteracted;
|
|
1619
1621
|
this.trigger('nodeExpanded', this.expandArgs);
|
|
1620
1622
|
}
|
|
1621
1623
|
};
|
|
@@ -1638,6 +1640,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1638
1640
|
var colArgs;
|
|
1639
1641
|
if (this.isLoaded) {
|
|
1640
1642
|
colArgs = this.getExpandEvent(currLi, e);
|
|
1643
|
+
this.isInteracted = colArgs.isInteracted;
|
|
1641
1644
|
this.trigger('nodeCollapsing', colArgs, function (observedArgs) {
|
|
1642
1645
|
if (observedArgs.cancel) {
|
|
1643
1646
|
removeClass([icon], PROCESS);
|
|
@@ -1698,6 +1701,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1698
1701
|
this.removeExpand(liEle);
|
|
1699
1702
|
if (this.isLoaded) {
|
|
1700
1703
|
colArgs = this.getExpandEvent(liEle, null);
|
|
1704
|
+
colArgs.isInteracted = this.isInteracted;
|
|
1701
1705
|
this.trigger('nodeCollapsed', colArgs);
|
|
1702
1706
|
}
|
|
1703
1707
|
};
|
|
@@ -2112,6 +2116,7 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2112
2116
|
}
|
|
2113
2117
|
if (this.isLoaded && !this.isRefreshed) {
|
|
2114
2118
|
this.expandArgs = this.getExpandEvent(currLi, e);
|
|
2119
|
+
this.isInteracted = this.expandArgs.isInteracted;
|
|
2115
2120
|
this.trigger('nodeExpanding', this.expandArgs, function (observedArgs) {
|
|
2116
2121
|
if (observedArgs.cancel) {
|
|
2117
2122
|
removeClass([icon], PROCESS);
|