@syncfusion/ej2-navigations 21.2.6 → 21.2.9

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.2.6
3
+ * version : 21.2.9
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@21.2.5",
3
+ "_id": "@syncfusion/ej2-navigations@21.2.8",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-w6/rmRJuiQ/w1MLzkDK3cgYSoFU/ZgRCxOK+1mrWCE3O+2cNEWK3FEKRE/FzTMYDKqYiupQH3xqYQMH9lesjLw==",
5
+ "_integrity": "sha512-Y0QyJlwVcReJZ7MuHkXXViY7svJOa10kD3+02yxGpik+D8bP4On1czu7ZDCsMfypt/vLY0cwazXL5VorYz8piw==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -39,8 +39,8 @@
39
39
  "/@syncfusion/ej2-spreadsheet",
40
40
  "/@syncfusion/ej2-vue-navigations"
41
41
  ],
42
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-21.2.5.tgz",
43
- "_shasum": "97b3f5525e0413b72bdb904471da8d0813513c34",
42
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-21.2.8.tgz",
43
+ "_shasum": "2e90b8a32c4ab7240d0b141119a28af4f113af60",
44
44
  "_spec": "@syncfusion/ej2-navigations@*",
45
45
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
46
46
  "author": {
@@ -51,11 +51,11 @@
51
51
  },
52
52
  "bundleDependencies": false,
53
53
  "dependencies": {
54
- "@syncfusion/ej2-base": "~21.2.3",
54
+ "@syncfusion/ej2-base": "~21.2.9",
55
55
  "@syncfusion/ej2-buttons": "~21.2.6",
56
- "@syncfusion/ej2-data": "~21.2.6",
57
- "@syncfusion/ej2-inputs": "~21.2.6",
58
- "@syncfusion/ej2-lists": "~21.2.6",
56
+ "@syncfusion/ej2-data": "~21.2.9",
57
+ "@syncfusion/ej2-inputs": "~21.2.9",
58
+ "@syncfusion/ej2-lists": "~21.2.9",
59
59
  "@syncfusion/ej2-popups": "~21.2.4"
60
60
  },
61
61
  "deprecated": false,
@@ -161,6 +161,6 @@
161
161
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
162
162
  },
163
163
  "typings": "index.d.ts",
164
- "version": "21.2.6",
164
+ "version": "21.2.9",
165
165
  "sideEffects": false
166
166
  }
@@ -476,9 +476,17 @@ var MenuBase = /** @class */ (function (_super) {
476
476
  return index;
477
477
  };
478
478
  MenuBase.prototype.getUlByNavIdx = function (navIdxLen) {
479
+ var _this = this;
479
480
  if (navIdxLen === void 0) { navIdxLen = this.navIdx.length; }
480
481
  if (this.isMenu) {
481
- var popup = [this.getWrapper()].concat([].slice.call(selectAll('.' + POPUP)))[navIdxLen];
482
+ var popups_1 = [];
483
+ var allPopup = selectAll('.' + POPUP);
484
+ allPopup.forEach(function (elem) {
485
+ if (_this.element.id === elem.id.split('-')[2]) {
486
+ popups_1.push(elem);
487
+ }
488
+ });
489
+ var popup = [this.getWrapper()].concat([].slice.call(popups_1))[navIdxLen];
482
490
  return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);
483
491
  }
484
492
  else {
@@ -2089,7 +2097,8 @@ var MenuBase = /** @class */ (function (_super) {
2089
2097
  index = navIdx.pop();
2090
2098
  ul = this.getUlByNavIdx(navIdx.length);
2091
2099
  if (ul) {
2092
- if (ishide) {
2100
+ var validUl = isUniqueId ? ul.children[index].id : ul.children[index].textContent;
2101
+ if (ishide && validUl === items[i]) {
2093
2102
  ul.children[index].classList.add(HIDE);
2094
2103
  }
2095
2104
  else {
@@ -389,6 +389,8 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
389
389
  */
390
390
  disable(value: boolean): void;
391
391
  private eleContains;
392
+ private focusFirstVisibleEle;
393
+ private focusLastVisibleEle;
392
394
  private eleFocus;
393
395
  private clickHandler;
394
396
  private popupClickHandler;
@@ -411,20 +411,20 @@ var Toolbar = /** @class */ (function (_super) {
411
411
  if (isVisible(this.popObj.element)) {
412
412
  nodes = [].slice.call(popupCheck.children);
413
413
  if (e.action === 'home') {
414
- ele = nodes[0];
414
+ ele = this.focusFirstVisibleEle(nodes);
415
415
  }
416
416
  else {
417
- ele = nodes[nodes.length - 1];
417
+ ele = this.focusLastVisibleEle(nodes);
418
418
  }
419
419
  }
420
420
  }
421
421
  else {
422
422
  nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');
423
423
  if (e.action === 'home') {
424
- ele = nodes[0];
424
+ ele = this.focusFirstVisibleEle(nodes);
425
425
  }
426
426
  else {
427
- ele = nodes[nodes.length - 1];
427
+ ele = this.focusLastVisibleEle(nodes);
428
428
  }
429
429
  }
430
430
  if (ele) {
@@ -538,6 +538,30 @@ var Toolbar = /** @class */ (function (_super) {
538
538
  Toolbar.prototype.eleContains = function (el) {
539
539
  return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !isVisible(el) || !el.classList.contains(CLS_ITEM);
540
540
  };
541
+ Toolbar.prototype.focusFirstVisibleEle = function (nodes) {
542
+ var element;
543
+ var index = 0;
544
+ while (index < nodes.length) {
545
+ var ele = nodes[parseInt(index.toString(), 10)];
546
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
547
+ return ele;
548
+ }
549
+ index++;
550
+ }
551
+ return element;
552
+ };
553
+ Toolbar.prototype.focusLastVisibleEle = function (nodes) {
554
+ var element;
555
+ var index = nodes.length - 1;
556
+ while (index >= 0) {
557
+ var ele = nodes[parseInt(index.toString(), 10)];
558
+ if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {
559
+ return ele;
560
+ }
561
+ index--;
562
+ }
563
+ return element;
564
+ };
541
565
  Toolbar.prototype.eleFocus = function (closest, pos) {
542
566
  var sib = Object(closest)[pos + 'ElementSibling'];
543
567
  if (sib) {
@@ -1181,12 +1205,10 @@ var Toolbar = /** @class */ (function (_super) {
1181
1205
  if (checkoffset) {
1182
1206
  if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {
1183
1207
  if (this.overflowMode === 'Extended') {
1184
- if (itemCount === itemPopCount) {
1185
- var sepEle = inEle[parseInt(i.toString(), 10)];
1186
- if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
1187
- inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
1188
- itemPopCount++;
1189
- }
1208
+ var sepEle = inEle[parseInt(i.toString(), 10)];
1209
+ if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
1210
+ inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);
1211
+ itemPopCount++;
1190
1212
  }
1191
1213
  itemCount++;
1192
1214
  }
@@ -2150,10 +2172,7 @@ var Toolbar = /** @class */ (function (_super) {
2150
2172
  break;
2151
2173
  case 'width':
2152
2174
  setStyle(tEle, { 'width': formatUnit(newProp.width) });
2153
- this.renderOverflowMode();
2154
- if (this.popObj && wid < tEle.offsetWidth) {
2155
- this.popupRefresh(this.popObj.element, false);
2156
- }
2175
+ this.refreshOverflow();
2157
2176
  break;
2158
2177
  case 'height':
2159
2178
  setStyle(this.element, { 'height': formatUnit(newProp.height) });