@syncfusion/ej2-navigations 20.3.47 → 20.3.49
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 +36 -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 +28 -46
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +28 -47
- 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 +9 -9
- package/src/accordion/accordion-model.d.ts +1 -1
- package/src/accordion/accordion.d.ts +0 -1
- package/src/accordion/accordion.js +15 -42
- package/src/common/menu-base.js +1 -1
- package/src/sidebar/sidebar.js +4 -2
- package/src/treeview/treeview.d.ts +1 -0
- package/src/treeview/treeview.js +9 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.49
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-navigations@20.3.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Q2g0BP2zJb+C4pecEmgaBUuEYq3B3ITJefvx+s7bg0G8tB4OAHpr74x/AxghpQABAmLccQ5ie6zoVtO4QYR2mw==",
|
|
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": "http://nexus.syncfusion.com/repository/ej2-
|
|
42
|
-
"_shasum": "
|
|
41
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-20.3.48.tgz",
|
|
42
|
+
"_shasum": "874054b33a192fabfd69aba5edfaf2b724d2adce",
|
|
43
43
|
"_spec": "@syncfusion/ej2-navigations@*",
|
|
44
44
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
45
45
|
"author": {
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"bundleDependencies": false,
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@syncfusion/ej2-base": "~20.3.
|
|
54
|
-
"@syncfusion/ej2-buttons": "~20.3.
|
|
53
|
+
"@syncfusion/ej2-base": "~20.3.49",
|
|
54
|
+
"@syncfusion/ej2-buttons": "~20.3.49",
|
|
55
55
|
"@syncfusion/ej2-data": "~20.3.47",
|
|
56
|
-
"@syncfusion/ej2-inputs": "~20.3.
|
|
56
|
+
"@syncfusion/ej2-inputs": "~20.3.49",
|
|
57
57
|
"@syncfusion/ej2-lists": "~20.3.47",
|
|
58
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
58
|
+
"@syncfusion/ej2-popups": "~20.3.49"
|
|
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.3.
|
|
163
|
+
"version": "20.3.49",
|
|
164
164
|
"sideEffects": false
|
|
165
165
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventHandler, Property, Event, EmitType, AnimationModel, KeyboardEvents, rippleEffect } from '@syncfusion/ej2-base';import { KeyboardEventArgs, BaseEventArgs, Effect, getUniqueID, compile as templateCompiler } from '@syncfusion/ej2-base';import { isVisible, closest, attributes, detach, select, addClass, append } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Collection, Animation } from '@syncfusion/ej2-base';import { setStyleAttribute as setStyle, Complex } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, selectAll, SanitizeHtmlHelper, isRippleEnabled } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Component, EventHandler, Property, Event, EmitType, AnimationModel, KeyboardEvents, rippleEffect } from '@syncfusion/ej2-base';import { KeyboardEventArgs, BaseEventArgs, Effect, getUniqueID, compile as templateCompiler } from '@syncfusion/ej2-base';import { isVisible, closest, attributes, detach, select, addClass, removeClass, append } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, Collection, Animation } from '@syncfusion/ej2-base';import { setStyleAttribute as setStyle, Complex } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, selectAll, SanitizeHtmlHelper, isRippleEnabled } from '@syncfusion/ej2-base';
|
|
2
2
|
import {ExpandMode,AccordionClickArgs,ExpandEventArgs,ExpandedEventArgs} from "./accordion";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -368,7 +368,6 @@ export declare class Accordion extends Component<HTMLElement> implements INotify
|
|
|
368
368
|
* @private
|
|
369
369
|
*/
|
|
370
370
|
protected getModuleName(): string;
|
|
371
|
-
private itemAttribUpdate;
|
|
372
371
|
private getItems;
|
|
373
372
|
/**
|
|
374
373
|
* Adds new item to the Accordion with the specified index of the Accordion.
|
|
@@ -20,7 +20,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
21
21
|
import { Component, EventHandler, Property, Event, KeyboardEvents, rippleEffect } from '@syncfusion/ej2-base';
|
|
22
22
|
import { getUniqueID, compile as templateCompiler } from '@syncfusion/ej2-base';
|
|
23
|
-
import { isVisible, closest, attributes, detach, select, addClass, append } from '@syncfusion/ej2-base';
|
|
23
|
+
import { isVisible, closest, attributes, detach, select, addClass, removeClass, append } from '@syncfusion/ej2-base';
|
|
24
24
|
import { NotifyPropertyChanges, ChildProperty, Collection, Animation } from '@syncfusion/ej2-base';
|
|
25
25
|
import { setStyleAttribute as setStyle, Complex } from '@syncfusion/ej2-base';
|
|
26
26
|
import { isNullOrUndefined as isNOU, formatUnit, selectAll, SanitizeHtmlHelper, isRippleEnabled } from '@syncfusion/ej2-base';
|
|
@@ -159,7 +159,6 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
159
159
|
* @returns {void}
|
|
160
160
|
*/
|
|
161
161
|
Accordion.prototype.destroy = function () {
|
|
162
|
-
var _this = this;
|
|
163
162
|
if (this.isReact || this.isAngular || this.isVue) {
|
|
164
163
|
this.clearTemplate();
|
|
165
164
|
}
|
|
@@ -180,9 +179,7 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
180
179
|
}
|
|
181
180
|
ele.classList.remove(CLS_ACRDN_ROOT);
|
|
182
181
|
ele.removeAttribute('style');
|
|
183
|
-
|
|
184
|
-
_this.element.removeAttribute(attrb);
|
|
185
|
-
});
|
|
182
|
+
this.element.removeAttribute('data-ripple');
|
|
186
183
|
if (!this.isNested && isRippleEnabled) {
|
|
187
184
|
this.removeRippleEffect();
|
|
188
185
|
}
|
|
@@ -231,19 +228,12 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
231
228
|
var width = formatUnit(this.width);
|
|
232
229
|
var height = formatUnit(this.height);
|
|
233
230
|
setStyle(this.element, { 'width': width, 'height': height });
|
|
234
|
-
var ariaAttr = {
|
|
235
|
-
'aria-disabled': 'false', 'role': 'presentation', 'aria-multiselectable': 'true'
|
|
236
|
-
};
|
|
237
231
|
if (isNOU(this.initExpand)) {
|
|
238
232
|
this.initExpand = [];
|
|
239
233
|
}
|
|
240
234
|
if (this.expandedIndices.length > 0) {
|
|
241
235
|
this.initExpand = this.expandedIndices;
|
|
242
236
|
}
|
|
243
|
-
attributes(this.element, ariaAttr);
|
|
244
|
-
if (this.expandMode === 'Single') {
|
|
245
|
-
this.element.setAttribute('aria-multiselectable', 'false');
|
|
246
|
-
}
|
|
247
237
|
};
|
|
248
238
|
Accordion.prototype.renderControl = function () {
|
|
249
239
|
this.trgtEle = (this.element.children.length > 0) ? select('div', this.element) : null;
|
|
@@ -554,18 +544,15 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
554
544
|
};
|
|
555
545
|
Accordion.prototype.headerEleGenerate = function () {
|
|
556
546
|
var header = this.createElement('div', { className: CLS_HEADER, id: getUniqueID('acrdn_header') });
|
|
557
|
-
var items = this.getItems();
|
|
558
547
|
var ariaAttr = {
|
|
559
|
-
'tabindex': '0', 'role': '
|
|
560
|
-
'aria-disabled': 'false', 'aria-level': items.length.toString()
|
|
548
|
+
'tabindex': '0', 'role': 'button', 'aria-disabled': 'false', 'aria-expanded': 'false'
|
|
561
549
|
};
|
|
562
550
|
attributes(header, ariaAttr);
|
|
563
551
|
return header;
|
|
564
552
|
};
|
|
565
553
|
Accordion.prototype.renderInnerItem = function (item, index) {
|
|
566
554
|
var innerEle = this.createElement('div', {
|
|
567
|
-
className: CLS_ITEM, id: item.id || getUniqueID('acrdn_item')
|
|
568
|
-
attrs: { 'aria-expanded': 'false', 'role': 'row' }
|
|
555
|
+
className: CLS_ITEM, id: item.id || getUniqueID('acrdn_item')
|
|
569
556
|
});
|
|
570
557
|
if (this.headerTemplate) {
|
|
571
558
|
var ctnEle = this.headerEleGenerate();
|
|
@@ -713,7 +700,7 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
713
700
|
var content = select('.' + CLS_CONTENT, itemEle);
|
|
714
701
|
header.setAttribute('aria-controls', content.id);
|
|
715
702
|
content.setAttribute('aria-labelledby', header.id);
|
|
716
|
-
content.setAttribute('role', '
|
|
703
|
+
content.setAttribute('role', 'region');
|
|
717
704
|
};
|
|
718
705
|
Accordion.prototype.contentRendering = function (index) {
|
|
719
706
|
var itemcnt = this.createElement('div', { className: CLS_CONTENT + ' ' + CLS_CTNHIDE, id: getUniqueID('acrdn_panel') });
|
|
@@ -812,8 +799,7 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
812
799
|
if (progress === 'end') {
|
|
813
800
|
this.add(trgtItemEle, CLS_ACTIVE);
|
|
814
801
|
trgt.setAttribute('aria-hidden', 'false');
|
|
815
|
-
attributes(
|
|
816
|
-
attributes(trgt.previousElementSibling, { 'aria-label': 'expanded' });
|
|
802
|
+
attributes(trgt.previousElementSibling, { 'aria-expanded': 'true' });
|
|
817
803
|
icon.classList.remove(CLS_TOGANIMATE);
|
|
818
804
|
this.trigger('expanded', eventArgs);
|
|
819
805
|
}
|
|
@@ -929,8 +915,7 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
929
915
|
icon.classList.remove(CLS_TOGANIMATE);
|
|
930
916
|
this.remove(trgtItemEle, CLS_ACTIVE);
|
|
931
917
|
trgt.setAttribute('aria-hidden', 'true');
|
|
932
|
-
attributes(
|
|
933
|
-
attributes(trgt.previousElementSibling, { 'aria-label': 'collapsed' });
|
|
918
|
+
attributes(trgt.previousElementSibling, { 'aria-expanded': 'false' });
|
|
934
919
|
this.trigger('expanded', eventArgs);
|
|
935
920
|
}
|
|
936
921
|
};
|
|
@@ -943,14 +928,6 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
943
928
|
Accordion.prototype.getModuleName = function () {
|
|
944
929
|
return 'accordion';
|
|
945
930
|
};
|
|
946
|
-
Accordion.prototype.itemAttribUpdate = function () {
|
|
947
|
-
var items = this.getItems();
|
|
948
|
-
var itemEle = this.getItemElements();
|
|
949
|
-
var itemLen = items.length;
|
|
950
|
-
itemEle.forEach(function (ele) {
|
|
951
|
-
select('.' + CLS_HEADER, ele).setAttribute('aria-level', '' + itemLen);
|
|
952
|
-
});
|
|
953
|
-
};
|
|
954
931
|
Accordion.prototype.getItems = function () {
|
|
955
932
|
var items;
|
|
956
933
|
if (this.itemTemplate && this.headerTemplate) {
|
|
@@ -991,7 +968,6 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
991
968
|
}
|
|
992
969
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'focus', _this.focusIn, _this);
|
|
993
970
|
EventHandler.add(innerItemEle.querySelector('.' + CLS_HEADER), 'blur', _this.focusOut, _this);
|
|
994
|
-
_this.itemAttribUpdate();
|
|
995
971
|
_this.expandedIndices = [];
|
|
996
972
|
_this.expandedItemRefresh(ele);
|
|
997
973
|
if (addItem && addItem.expanded) {
|
|
@@ -1032,7 +1008,6 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
1032
1008
|
this.restoreContent(index);
|
|
1033
1009
|
detach(ele);
|
|
1034
1010
|
items.splice(index, 1);
|
|
1035
|
-
this.itemAttribUpdate();
|
|
1036
1011
|
this.expandedIndices = [];
|
|
1037
1012
|
this.expandedItemRefresh(this.element);
|
|
1038
1013
|
};
|
|
@@ -1252,8 +1227,12 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
1252
1227
|
this.updateItem(item, index);
|
|
1253
1228
|
}
|
|
1254
1229
|
if (property === 'cssClass' && !isNOU(item)) {
|
|
1255
|
-
|
|
1256
|
-
|
|
1230
|
+
if (oldVal) {
|
|
1231
|
+
removeClass([item], oldVal.split(' '));
|
|
1232
|
+
}
|
|
1233
|
+
if (newVal) {
|
|
1234
|
+
addClass([item], newVal.split(' '));
|
|
1235
|
+
}
|
|
1257
1236
|
}
|
|
1258
1237
|
if (property === 'visible' && !isNOU(item)) {
|
|
1259
1238
|
if (Object(newProp.items[index])[property] === false) {
|
|
@@ -1315,14 +1294,8 @@ var Accordion = /** @class */ (function (_super) {
|
|
|
1315
1294
|
setStyle(this.element, { 'width': formatUnit(newProp.width) });
|
|
1316
1295
|
break;
|
|
1317
1296
|
case 'expandMode':
|
|
1318
|
-
if (newProp.expandMode === 'Single') {
|
|
1319
|
-
this.
|
|
1320
|
-
if (this.expandedIndices.length > 1) {
|
|
1321
|
-
this.expandItem(false);
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
else {
|
|
1325
|
-
this.element.setAttribute('aria-multiselectable', 'true');
|
|
1297
|
+
if (newProp.expandMode === 'Single' && this.expandedIndices.length > 1) {
|
|
1298
|
+
this.expandItem(false);
|
|
1326
1299
|
}
|
|
1327
1300
|
break;
|
|
1328
1301
|
}
|
package/src/common/menu-base.js
CHANGED
|
@@ -2096,7 +2096,7 @@ var MenuBase = /** @class */ (function (_super) {
|
|
|
2096
2096
|
menuitem = new MenuItem(iitems[0], 'items', items[i], true);
|
|
2097
2097
|
iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
|
|
2098
2098
|
var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);
|
|
2099
|
-
if (navIdx.length < uls.length) {
|
|
2099
|
+
if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {
|
|
2100
2100
|
idx = isAfter ? idx + 1 : idx;
|
|
2101
2101
|
li = this.createItems(iitems).children[idx];
|
|
2102
2102
|
var ul = this.isMenu ? select('.e-menu-parent', uls[navIdx.length]) : uls[navIdx.length];
|
package/src/sidebar/sidebar.js
CHANGED
|
@@ -158,7 +158,7 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
158
158
|
if (!isNullOrUndefined(classELement || this.targetEle)) {
|
|
159
159
|
addClass([classELement || this.targetEle], [MAINCONTENTANIMATION]);
|
|
160
160
|
}
|
|
161
|
-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') :
|
|
161
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : null;
|
|
162
162
|
if (!this.enableDock && this.type !== 'Auto') {
|
|
163
163
|
addClass([this.element], [VISIBILITY]);
|
|
164
164
|
}
|
|
@@ -168,7 +168,9 @@ var Sidebar = /** @class */ (function (_super) {
|
|
|
168
168
|
if (this.enableDock) {
|
|
169
169
|
addClass([this.element], DOCKER);
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
if (!isNullOrUndefined(this.tabIndex)) {
|
|
172
|
+
this.element.setAttribute('tabindex', this.tabIndex);
|
|
173
|
+
}
|
|
172
174
|
if (this.type === 'Auto' && !Browser.isDevice) {
|
|
173
175
|
this.show();
|
|
174
176
|
}
|
|
@@ -516,6 +516,7 @@ export declare class TreeView extends Component<HTMLElement> implements INotifyP
|
|
|
516
516
|
private firstTap;
|
|
517
517
|
private hasTemplate;
|
|
518
518
|
private isFirstRender;
|
|
519
|
+
private isNodeDropped;
|
|
519
520
|
/**
|
|
520
521
|
* Indicates whether the TreeView allows drag and drop of nodes. To drag and drop a node in
|
|
521
522
|
* 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
|
@@ -210,6 +210,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
210
210
|
_this.changeDataSource = false;
|
|
211
211
|
_this.hasTemplate = false;
|
|
212
212
|
_this.isFirstRender = false;
|
|
213
|
+
// Specifies whether the node is dropped or not
|
|
214
|
+
_this.isNodeDropped = false;
|
|
213
215
|
_this.mouseDownStatus = false;
|
|
214
216
|
return _this;
|
|
215
217
|
}
|
|
@@ -1423,11 +1425,12 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
1423
1425
|
this.updateCheckedProp();
|
|
1424
1426
|
this.isAnimate = true;
|
|
1425
1427
|
this.isInitalExpand = false;
|
|
1426
|
-
if (!this.isLoaded || this.isFieldChange) {
|
|
1428
|
+
if ((!this.isLoaded || this.isFieldChange) && !this.isNodeDropped) {
|
|
1427
1429
|
var eventArgs = { data: this.treeData };
|
|
1428
1430
|
this.trigger('dataBound', eventArgs);
|
|
1429
1431
|
}
|
|
1430
1432
|
this.isLoaded = true;
|
|
1433
|
+
this.isNodeDropped = false;
|
|
1431
1434
|
};
|
|
1432
1435
|
TreeView.prototype.doSelectionAction = function () {
|
|
1433
1436
|
var sNodes = selectAll('.' + SELECTED, this.element);
|
|
@@ -2652,8 +2655,9 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
2652
2655
|
var expanded = (currLi.getAttribute('aria-expanded') === 'true') ? true : false;
|
|
2653
2656
|
var hasChildren = currLi.getAttribute('aria-expanded') !== null ? true : (select('.' + EXPANDABLE, currLi) || select('.' + COLLAPSIBLE, currLi)) != null ? true : false;
|
|
2654
2657
|
var checked = null;
|
|
2655
|
-
|
|
2656
|
-
|
|
2658
|
+
var checkboxElement = select('.' + CHECKBOXWRAP, currLi);
|
|
2659
|
+
if (this.showCheckBox && checkboxElement) {
|
|
2660
|
+
checked = checkboxElement.getAttribute('aria-checked');
|
|
2657
2661
|
}
|
|
2658
2662
|
return {
|
|
2659
2663
|
id: id, text: text, parentID: pid, selected: selected, expanded: expanded,
|
|
@@ -3165,6 +3169,8 @@ var TreeView = /** @class */ (function (_super) {
|
|
|
3165
3169
|
this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
|
|
3166
3170
|
if (dragObj.element.id !== this.element.id) {
|
|
3167
3171
|
dragObj.triggerEvent();
|
|
3172
|
+
this.isNodeDropped = true;
|
|
3173
|
+
this.fields.dataSource = this.treeData;
|
|
3168
3174
|
}
|
|
3169
3175
|
this.triggerEvent();
|
|
3170
3176
|
};
|