@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.
- package/CHANGELOG.md +15 -0
- 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 +14 -4
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +17 -7
- 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 +7 -7
- package/src/common/h-scroll.js +4 -2
- package/src/common/menu-base.js +9 -5
- package/src/toolbar/toolbar.js +4 -0
- package/styles/breadcrumb/_tailwind-dark-definition.scss +1 -60
- package/styles/breadcrumb/_tailwind-definition.scss +3 -3
- package/styles/breadcrumb/tailwind-dark.css +7 -7
- package/styles/breadcrumb/tailwind.css +7 -7
- package/styles/tailwind-dark.css +7 -7
- package/styles/tailwind.css +7 -7
|
@@ -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
|
|
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
|
|
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
|
-
|
|
2644
|
-
|
|
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();
|