@syncfusion/ej2-navigations 20.4.38 → 20.4.42

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.
@@ -1292,7 +1292,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1292
1292
  }
1293
1293
  }
1294
1294
  if (this.cssClass) {
1295
- addClass([wrapper], this.cssClass.split(' '));
1295
+ addClass([wrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
1296
1296
  }
1297
1297
  if (this.enableRtl) {
1298
1298
  wrapper.classList.add(RTL);
@@ -1491,6 +1491,14 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1491
1491
  if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
1492
1492
  fliIdx = defaultIdx;
1493
1493
  }
1494
+ if (cul.children[fliIdx].classList.contains(HIDE)) {
1495
+ if (e.action === DOWNARROW && fliIdx === cul.childElementCount - 1) {
1496
+ fliIdx = defaultIdx;
1497
+ }
1498
+ else if (e.action === UPARROW && fliIdx === 0) {
1499
+ fliIdx = defaultIdx;
1500
+ }
1501
+ }
1494
1502
  }
1495
1503
  }
1496
1504
  var cli = cul.children[fliIdx];
@@ -1839,7 +1847,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1839
1847
  }
1840
1848
  else {
1841
1849
  if (this.cssClass) {
1842
- addClass([this.popupWrapper], this.cssClass.split(' '));
1850
+ addClass([this.popupWrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
1843
1851
  }
1844
1852
  this.popupObj.hide();
1845
1853
  }
@@ -2215,7 +2223,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2215
2223
  itemCreated: function (args) {
2216
2224
  if (args.curData[_this.getField('separator', level)]) {
2217
2225
  args.item.classList.add(SEPARATOR);
2218
- args.item.removeAttribute('role');
2226
+ args.item.setAttribute('role', 'separator');
2219
2227
  }
2220
2228
  if (showIcon && !args.curData[args.fields.iconCss]
2221
2229
  && !args.curData[_this.getField('separator', level)]) {
@@ -2227,9 +2235,6 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2227
2235
  args.item.appendChild(span);
2228
2236
  args.item.setAttribute('aria-haspopup', 'true');
2229
2237
  args.item.setAttribute('aria-expanded', 'false');
2230
- if (!_this.isMenu) {
2231
- args.item.removeAttribute('role');
2232
- }
2233
2238
  args.item.classList.add('e-menu-caret-icon');
2234
2239
  }
2235
2240
  if (_this.isMenu && _this.template) {
@@ -2256,6 +2261,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2256
2261
  if (this.isMenu) {
2257
2262
  ul.setAttribute('role', 'menu');
2258
2263
  }
2264
+ else {
2265
+ ul.setAttribute('role', 'menubar');
2266
+ }
2259
2267
  return ul;
2260
2268
  };
2261
2269
  MenuBase.prototype.moverHandler = function (e) {
@@ -2649,7 +2657,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2649
2657
  removeClass([wrapper], oldProp.cssClass.split(' '));
2650
2658
  }
2651
2659
  if (newProp.cssClass) {
2652
- addClass([wrapper], newProp.cssClass.split(' '));
2660
+ addClass([wrapper], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
2653
2661
  }
2654
2662
  break;
2655
2663
  case 'enableRtl':
@@ -9981,6 +9989,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
9981
9989
  _this.isFirstRender = false;
9982
9990
  // Specifies whether the node is dropped or not
9983
9991
  _this.isNodeDropped = false;
9992
+ _this.isInteracted = false;
9984
9993
  _this.mouseDownStatus = false;
9985
9994
  return _this;
9986
9995
  }
@@ -11380,6 +11389,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11380
11389
  }
11381
11390
  if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
11382
11391
  this.expandArgs = this.getExpandEvent(currLi, null);
11392
+ this.expandArgs.isInteracted = this.isInteracted;
11383
11393
  this.trigger('nodeExpanded', this.expandArgs);
11384
11394
  }
11385
11395
  };
@@ -11402,6 +11412,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11402
11412
  var colArgs;
11403
11413
  if (this.isLoaded) {
11404
11414
  colArgs = this.getExpandEvent(currLi, e);
11415
+ this.isInteracted = colArgs.isInteracted;
11405
11416
  this.trigger('nodeCollapsing', colArgs, function (observedArgs) {
11406
11417
  if (observedArgs.cancel) {
11407
11418
  removeClass([icon], PROCESS);
@@ -11462,6 +11473,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11462
11473
  this.removeExpand(liEle);
11463
11474
  if (this.isLoaded) {
11464
11475
  colArgs = this.getExpandEvent(liEle, null);
11476
+ colArgs.isInteracted = this.isInteracted;
11465
11477
  this.trigger('nodeCollapsed', colArgs);
11466
11478
  }
11467
11479
  };
@@ -11875,6 +11887,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11875
11887
  }
11876
11888
  if (this.isLoaded && !this.isRefreshed) {
11877
11889
  this.expandArgs = this.getExpandEvent(currLi, e);
11890
+ this.isInteracted = this.expandArgs.isInteracted;
11878
11891
  this.trigger('nodeExpanding', this.expandArgs, function (observedArgs) {
11879
11892
  if (observedArgs.cancel) {
11880
11893
  removeClass([icon], PROCESS);
@@ -15695,7 +15708,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
15695
15708
  this._maxItems = this.maxItems;
15696
15709
  this.element.setAttribute('aria-label', 'breadcrumb');
15697
15710
  if (this.cssClass) {
15698
- addClass([this.element], this.cssClass.split(' '));
15711
+ addClass([this.element], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
15699
15712
  }
15700
15713
  if (this.enableRtl) {
15701
15714
  this.element.classList.add('e-rtl');
@@ -16209,7 +16222,7 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
16209
16222
  removeClass([this.element], oldProp.cssClass.split(' '));
16210
16223
  }
16211
16224
  if (newProp.cssClass) {
16212
- addClass([this.element], newProp.cssClass.split(' '));
16225
+ addClass([this.element], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
16213
16226
  }
16214
16227
  if ((oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) && !(newProp.cssClass &&
16215
16228
  newProp.cssClass.indexOf(ICONRIGHT) > -1) || !(oldProp.cssClass && oldProp.cssClass.indexOf(ICONRIGHT) > -1) &&