@syncfusion/ej2-navigations 20.1.47 → 20.1.48

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.
@@ -214,11 +214,13 @@ var HScroll = /** @__PURE__ @class */ (function (_super) {
214
214
  HScroll.prototype.createNavIcon = function (element) {
215
215
  var id = element.id.concat('_nav');
216
216
  var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);
217
- var nav = this.createElement('div', { id: id.concat('_right'), className: clsRight });
217
+ var rightAttributes = { 'role': 'button', 'id': id.concat('_right'), 'aria-label': 'Scroll right' };
218
+ var nav = this.createElement('div', { className: clsRight, attrs: rightAttributes });
218
219
  nav.setAttribute('aria-disabled', 'false');
219
220
  var navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
220
221
  var clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);
221
- var navEle = this.createElement('div', { id: id.concat('_left'), className: clsLeft + ' ' + CLS_DISABLE });
222
+ var leftAttributes = { 'role': 'button', 'id': id.concat('_left'), 'aria-label': 'Scroll left' };
223
+ var navEle = this.createElement('div', { className: clsLeft + ' ' + CLS_DISABLE, attrs: leftAttributes });
222
224
  navEle.setAttribute('aria-disabled', 'true');
223
225
  var navLeftItem = this.createElement('div', { className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
224
226
  navEle.appendChild(navLeftItem);
@@ -1587,14 +1589,14 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1587
1589
  if (this.isMenuVisible()) {
1588
1590
  var sli = void 0;
1589
1591
  var item_1;
1590
- var wrapper = this.getWrapper();
1592
+ var wrapper_1 = this.getWrapper();
1591
1593
  var beforeCloseArgs = void 0;
1592
1594
  var items_1;
1593
1595
  var popups = this.getPopups();
1594
1596
  var isClose = false;
1595
- var cnt = this.isMenu ? popups.length + 1 : wrapper.childElementCount;
1597
+ var cnt = this.isMenu ? popups.length + 1 : wrapper_1.childElementCount;
1596
1598
  var ul_1 = this.isMenu && cnt !== 1 ? select('.e-ul', popups[cnt - 2])
1597
- : selectAll('.e-menu-parent', wrapper)[cnt - 1];
1599
+ : selectAll('.e-menu-parent', wrapper_1)[cnt - 1];
1598
1600
  if (this.isMenu && ul_1.classList.contains('e-menu')) {
1599
1601
  sli = this.getLIByClass(ul_1, SELECTED);
1600
1602
  if (sli) {
@@ -1683,6 +1685,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
1683
1685
  _this.navIdx.length !== 0 && closest(e.target, '.e-menu-parent.e-control')) {
1684
1686
  _this.closeMenu(0, e);
1685
1687
  }
1688
+ else if (isOpen && !_this.isMenu && selectAll('.e-menu-parent', wrapper_1)[ulIndex - 1] && e.which === 3) {
1689
+ _this.closeMenu(null, e);
1690
+ }
1686
1691
  else {
1687
1692
  if (isOpen && (_this.keyType === 'right' || _this.keyType === 'click')) {
1688
1693
  _this.afterCloseMenu(e);
@@ -2743,8 +2748,9 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2743
2748
  MenuBase.prototype.removeItem = function (item, navIdx, idx) {
2744
2749
  item.splice(idx, 1);
2745
2750
  var uls = this.getWrapper().children;
2746
- if (navIdx.length < uls.length) {
2747
- detach(uls[navIdx.length].children[idx]);
2751
+ var uls_length = this.hamburgerMode ? 1 : uls.length;
2752
+ if (navIdx.length < uls_length) {
2753
+ detach(uls[this.hamburgerMode ? 1 : navIdx.length].children[idx]);
2748
2754
  }
2749
2755
  };
2750
2756
  /**
@@ -5026,11 +5032,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
5026
5032
  if (typeof (templateProp) === 'string' || !isComponent) {
5027
5033
  var templateFn = void 0;
5028
5034
  var val = templateProp;
5035
+ var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
5029
5036
  val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
5030
5037
  try {
5031
5038
  if (typeof (templateProp) === 'object' && !isNullOrUndefined(templateProp.tagName)) {
5032
5039
  innerEle.appendChild(templateProp);
5033
5040
  }
5041
+ else if (typeof (templateProp) === 'string' && regEx.test(val)) {
5042
+ innerEle.innerHTML = val;
5043
+ }
5034
5044
  else if (document.querySelectorAll(val).length) {
5035
5045
  var ele = document.querySelector(val);
5036
5046
  var tempStr = ele.outerHTML.trim();