@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.
@@ -198,11 +198,13 @@ let HScroll = class HScroll extends Component {
198
198
  createNavIcon(element) {
199
199
  const id = element.id.concat('_nav');
200
200
  const clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);
201
- const nav = this.createElement('div', { id: id.concat('_right'), className: clsRight });
201
+ const rightAttributes = { 'role': 'button', 'id': id.concat('_right'), 'aria-label': 'Scroll right' };
202
+ const nav = this.createElement('div', { className: clsRight, attrs: rightAttributes });
202
203
  nav.setAttribute('aria-disabled', 'false');
203
204
  const navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
204
205
  const clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);
205
- const navEle = this.createElement('div', { id: id.concat('_left'), className: clsLeft + ' ' + CLS_DISABLE });
206
+ const leftAttributes = { 'role': 'button', 'id': id.concat('_left'), 'aria-label': 'Scroll left' };
207
+ const navEle = this.createElement('div', { className: clsLeft + ' ' + CLS_DISABLE, attrs: leftAttributes });
206
208
  navEle.setAttribute('aria-disabled', 'true');
207
209
  const navLeftItem = this.createElement('div', { className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons' });
208
210
  navEle.appendChild(navLeftItem);
@@ -1603,6 +1605,9 @@ let MenuBase = class MenuBase extends Component {
1603
1605
  this.navIdx.length !== 0 && closest(e.target, '.e-menu-parent.e-control')) {
1604
1606
  this.closeMenu(0, e);
1605
1607
  }
1608
+ else if (isOpen && !this.isMenu && selectAll('.e-menu-parent', wrapper)[ulIndex - 1] && e.which === 3) {
1609
+ this.closeMenu(null, e);
1610
+ }
1606
1611
  else {
1607
1612
  if (isOpen && (this.keyType === 'right' || this.keyType === 'click')) {
1608
1613
  this.afterCloseMenu(e);
@@ -2640,8 +2645,9 @@ let MenuBase = class MenuBase extends Component {
2640
2645
  removeItem(item, navIdx, idx) {
2641
2646
  item.splice(idx, 1);
2642
2647
  const uls = this.getWrapper().children;
2643
- if (navIdx.length < uls.length) {
2644
- detach(uls[navIdx.length].children[idx]);
2648
+ const uls_length = this.hamburgerMode ? 1 : uls.length;
2649
+ if (navIdx.length < uls_length) {
2650
+ detach(uls[this.hamburgerMode ? 1 : navIdx.length].children[idx]);
2645
2651
  }
2646
2652
  }
2647
2653
  /**
@@ -4874,11 +4880,15 @@ let Toolbar = class Toolbar extends Component {
4874
4880
  if (typeof (templateProp) === 'string' || !isComponent) {
4875
4881
  let templateFn;
4876
4882
  let val = templateProp;
4883
+ const regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
4877
4884
  val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;
4878
4885
  try {
4879
4886
  if (typeof (templateProp) === 'object' && !isNullOrUndefined(templateProp.tagName)) {
4880
4887
  innerEle.appendChild(templateProp);
4881
4888
  }
4889
+ else if (typeof (templateProp) === 'string' && regEx.test(val)) {
4890
+ innerEle.innerHTML = val;
4891
+ }
4882
4892
  else if (document.querySelectorAll(val).length) {
4883
4893
  const ele = document.querySelector(val);
4884
4894
  const tempStr = ele.outerHTML.trim();