@syncfusion/ej2-navigations 22.2.7 → 22.2.11
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 +14 -0
- package/dist/ej2-navigations.min.js +2 -2
- 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 +86 -28
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +88 -28
- 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 +10 -10
- package/src/breadcrumb/breadcrumb-model.d.ts +1 -1
- package/src/breadcrumb/breadcrumb.js +9 -2
- package/src/carousel/carousel.d.ts +1 -0
- package/src/carousel/carousel.js +9 -0
- package/src/tab/tab-model.d.ts +6 -0
- package/src/tab/tab.d.ts +5 -0
- package/src/tab/tab.js +11 -0
- package/src/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +48 -26
- package/src/treeview/treeview-model.d.ts +1 -1
- package/src/treeview/treeview.js +11 -0
- package/styles/accordion/material.css +1 -1
- package/styles/appbar/material.css +1 -1
- package/styles/breadcrumb/material.css +1 -1
- package/styles/carousel/material.css +1 -1
- package/styles/context-menu/material.css +1 -1
- package/styles/h-scroll/material.css +1 -1
- package/styles/material.css +1 -1
- package/styles/menu/material.css +1 -1
- package/styles/pager/material.css +1 -1
- package/styles/sidebar/material.css +1 -1
- package/styles/tab/material.css +1 -1
- package/styles/toolbar/material.css +1 -1
- package/styles/treeview/material.css +1 -1
- package/styles/v-scroll/material.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Draggable, Droppable, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getElement, getInstance, getRandomId, getUniqueID, getValue, isBlazor, isNullOrUndefined, isRippleEnabled, isUndefined, isVisible, matches, merge, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Draggable, Droppable, Event, EventHandler, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getElement, getInstance, getRandomId, getUniqueID, getValue, initializeCSPTemplate, isBlazor, isNullOrUndefined, isRippleEnabled, isUndefined, isVisible, matches, merge, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { ListBase } from '@syncfusion/ej2-lists';
|
|
3
3
|
import { Popup, calculatePosition, createSpinner, fit, getScrollableParent, getZindexPartial, hideSpinner, isCollide, showSpinner } from '@syncfusion/ej2-popups';
|
|
4
4
|
import { Button, createCheckBox, rippleMouseHandler } from '@syncfusion/ej2-buttons';
|
|
@@ -5191,7 +5191,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5191
5191
|
this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
|
|
5192
5192
|
}
|
|
5193
5193
|
if (this.isReact) {
|
|
5194
|
-
this.
|
|
5194
|
+
this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);
|
|
5195
5195
|
}
|
|
5196
5196
|
var btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
|
|
5197
5197
|
if (!isNullOrUndefined(btnItem) && !isNullOrUndefined(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
|
|
@@ -5504,6 +5504,30 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5504
5504
|
nextEle = innerItems[++eleIndex];
|
|
5505
5505
|
}
|
|
5506
5506
|
};
|
|
5507
|
+
Toolbar.prototype.clearToolbarTemplate = function (templateEle) {
|
|
5508
|
+
if (this.registeredTemplate && this.registeredTemplate["" + 'template']) {
|
|
5509
|
+
var registeredTemplates = this.registeredTemplate;
|
|
5510
|
+
for (var index = 0; index < registeredTemplates["" + 'template'].length; index++) {
|
|
5511
|
+
var registeredItem = registeredTemplates["" + 'template'][parseInt(index.toString(), 10)].rootNodes[0];
|
|
5512
|
+
var closestItem = closest(registeredItem, '.' + CLS_ITEM);
|
|
5513
|
+
if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
|
|
5514
|
+
this.clearTemplate(['template'], [registeredTemplates["" + 'template'][parseInt(index.toString(), 10)]]);
|
|
5515
|
+
break;
|
|
5516
|
+
}
|
|
5517
|
+
}
|
|
5518
|
+
}
|
|
5519
|
+
else if (this.portals && this.portals.length > 0) {
|
|
5520
|
+
var portals = this.portals;
|
|
5521
|
+
for (var index = 0; index < portals.length; index++) {
|
|
5522
|
+
var portalItem = portals[parseInt(index.toString(), 10)];
|
|
5523
|
+
var closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);
|
|
5524
|
+
if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
|
|
5525
|
+
this.clearTemplate(['template'], index);
|
|
5526
|
+
break;
|
|
5527
|
+
}
|
|
5528
|
+
}
|
|
5529
|
+
}
|
|
5530
|
+
};
|
|
5507
5531
|
/**
|
|
5508
5532
|
* Gets called when the model property changes.The data that describes the old and new values of the property that changed.
|
|
5509
5533
|
*
|
|
@@ -5526,31 +5550,29 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5526
5550
|
var index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
|
|
5527
5551
|
var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
5528
5552
|
var newProperty = Object(newProp.items[parseInt(index.toString(), 10)])["" + property];
|
|
5529
|
-
if (
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
this.tbarEle.splice(this.items.length, 1);
|
|
5553
|
-
}
|
|
5553
|
+
if (this.tbarAlign || property === 'align') {
|
|
5554
|
+
this.refresh();
|
|
5555
|
+
this.trigger('created');
|
|
5556
|
+
break;
|
|
5557
|
+
}
|
|
5558
|
+
var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
|
|
5559
|
+
var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
|
|
5560
|
+
if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
|
|
5561
|
+
--this.popupPriCount;
|
|
5562
|
+
}
|
|
5563
|
+
if (isNullOrUndefined(this.scrollModule)) {
|
|
5564
|
+
this.destroyMode();
|
|
5565
|
+
}
|
|
5566
|
+
var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
|
|
5567
|
+
if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
|
|
5568
|
+
this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
|
|
5569
|
+
}
|
|
5570
|
+
detach(itemCol[parseInt(index.toString(), 10)]);
|
|
5571
|
+
this.tbarEle.splice(index, 1);
|
|
5572
|
+
this.addItems([this.items[parseInt(index.toString(), 10)]], index);
|
|
5573
|
+
this.items.splice(index, 1);
|
|
5574
|
+
if (this.items[parseInt(index.toString(), 10)].template) {
|
|
5575
|
+
this.tbarEle.splice(this.items.length, 1);
|
|
5554
5576
|
}
|
|
5555
5577
|
}
|
|
5556
5578
|
}
|
|
@@ -7838,6 +7860,11 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
7838
7860
|
this.renderContainer();
|
|
7839
7861
|
this.wireEvents();
|
|
7840
7862
|
this.initRender = false;
|
|
7863
|
+
if (this.isReact && this.portals && this.portals.length > 0) {
|
|
7864
|
+
this.renderReactTemplates(function () {
|
|
7865
|
+
this.refreshActiveBorder();
|
|
7866
|
+
});
|
|
7867
|
+
}
|
|
7841
7868
|
};
|
|
7842
7869
|
Tab.prototype.renderContainer = function () {
|
|
7843
7870
|
var ele = this.element;
|
|
@@ -9010,6 +9037,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
9010
9037
|
}
|
|
9011
9038
|
};
|
|
9012
9039
|
Tab.prototype.clearTabTemplate = function (templateEle, templateName, className) {
|
|
9040
|
+
if (!this.clearTemplates) {
|
|
9041
|
+
return;
|
|
9042
|
+
}
|
|
9013
9043
|
if (this.registeredTemplate && this.registeredTemplate[templateName]) {
|
|
9014
9044
|
var registeredTemplates = this.registeredTemplate;
|
|
9015
9045
|
for (var index = 0; index < registeredTemplates[templateName].length; index++) {
|
|
@@ -9912,6 +9942,9 @@ var Tab = /** @__PURE__ @class */ (function (_super) {
|
|
|
9912
9942
|
__decorate$7([
|
|
9913
9943
|
Property(false)
|
|
9914
9944
|
], Tab.prototype, "allowDragAndDrop", void 0);
|
|
9945
|
+
__decorate$7([
|
|
9946
|
+
Property(true)
|
|
9947
|
+
], Tab.prototype, "clearTemplates", void 0);
|
|
9915
9948
|
__decorate$7([
|
|
9916
9949
|
Complex({}, TabAnimationSettings)
|
|
9917
9950
|
], Tab.prototype, "animation", void 0);
|
|
@@ -10796,6 +10829,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10796
10829
|
return list;
|
|
10797
10830
|
};
|
|
10798
10831
|
TreeView.prototype.finalizeNode = function (element) {
|
|
10832
|
+
var _this = this;
|
|
10799
10833
|
var iNodes = selectAll('.' + IMAGE, element);
|
|
10800
10834
|
for (var k = 0; k < iNodes.length; k++) {
|
|
10801
10835
|
iNodes[k].setAttribute('alt', IMAGE);
|
|
@@ -10816,6 +10850,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
10816
10850
|
}
|
|
10817
10851
|
}
|
|
10818
10852
|
var eNodes = selectAll('.' + EXPANDED, element);
|
|
10853
|
+
if (!this.loadOnDemand) {
|
|
10854
|
+
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] == true; }).length > 0 ? true : this.isInitalExpand;
|
|
10855
|
+
}
|
|
10819
10856
|
if (!this.isInitalExpand) {
|
|
10820
10857
|
for (var i = 0; i < eNodes.length; i++) {
|
|
10821
10858
|
this.renderChildNodes(eNodes[i]);
|
|
@@ -11320,7 +11357,11 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11320
11357
|
}
|
|
11321
11358
|
};
|
|
11322
11359
|
TreeView.prototype.doExpandAction = function () {
|
|
11360
|
+
var _this = this;
|
|
11323
11361
|
var eUids = this.expandedNodes;
|
|
11362
|
+
if (!this.loadOnDemand) {
|
|
11363
|
+
this.isInitalExpand = this.treeData.filter(function (e) { return e[_this.fields.expanded] == true; }).length > 0 ? true : this.isInitalExpand;
|
|
11364
|
+
}
|
|
11324
11365
|
if (this.isInitalExpand && eUids.length > 0) {
|
|
11325
11366
|
this.setProperties({ expandedNodes: [] }, true);
|
|
11326
11367
|
/* eslint-disable */
|
|
@@ -11762,6 +11803,9 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
|
|
|
11762
11803
|
if (callback) {
|
|
11763
11804
|
callback();
|
|
11764
11805
|
}
|
|
11806
|
+
if (expandChild) {
|
|
11807
|
+
this.expandedNodes.push(parentLi.getAttribute('data-uid'));
|
|
11808
|
+
}
|
|
11765
11809
|
if (this.treeList.length === 0 && !this.isLoaded) {
|
|
11766
11810
|
this.finalize();
|
|
11767
11811
|
}
|
|
@@ -16172,7 +16216,14 @@ var Breadcrumb = /** @__PURE__ @class */ (function (_super) {
|
|
|
16172
16216
|
if (i % 2) {
|
|
16173
16217
|
// separator item
|
|
16174
16218
|
wrapDiv = this.createElement('div', { className: 'e-breadcrumb-item-wrapper' });
|
|
16175
|
-
|
|
16219
|
+
if ((this.separatorTemplate && this.separatorTemplate === '/') || isNullOrUndefined(this.separatorTemplate)) {
|
|
16220
|
+
listBaseOptions.template = initializeCSPTemplate(function () {
|
|
16221
|
+
return '/';
|
|
16222
|
+
});
|
|
16223
|
+
}
|
|
16224
|
+
else {
|
|
16225
|
+
listBaseOptions.template = this.separatorTemplate;
|
|
16226
|
+
}
|
|
16176
16227
|
listBaseOptions.itemClass = 'e-breadcrumb-separator';
|
|
16177
16228
|
isSingleLevel = false;
|
|
16178
16229
|
item = [{ previousItem: items[j_1], nextItem: items[j_1 + 1] }];
|
|
@@ -17759,6 +17810,13 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17759
17810
|
EventHandler.add(this.itemsContainer, 'mouseup touchend', this.swipStop, this);
|
|
17760
17811
|
}
|
|
17761
17812
|
};
|
|
17813
|
+
Carousel.prototype.resizeHandler = function () {
|
|
17814
|
+
if (this.itemsContainer && this.itemsContainer.firstElementChild) {
|
|
17815
|
+
var numOfItems = this.getNumOfItems();
|
|
17816
|
+
var slideWidth = this.itemsContainer.firstElementChild.clientWidth;
|
|
17817
|
+
this.itemsContainer.style.transform = this.getTranslateX(slideWidth, this.selectedIndex + numOfItems);
|
|
17818
|
+
}
|
|
17819
|
+
};
|
|
17762
17820
|
Carousel.prototype.wireEvents = function () {
|
|
17763
17821
|
if (!(this.animationEffect === 'Custom')) {
|
|
17764
17822
|
this.swipeModehandlers();
|
|
@@ -17767,6 +17825,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17767
17825
|
EventHandler.add(this.element, 'mouseenter mouseleave', this.onHoverActions, this);
|
|
17768
17826
|
EventHandler.add(this.element.firstElementChild, 'animationend', this.onTransitionEnd, this);
|
|
17769
17827
|
EventHandler.add(this.element.firstElementChild, 'transitionend', this.onTransitionEnd, this);
|
|
17828
|
+
EventHandler.add(window, 'resize', this.resizeHandler, this);
|
|
17770
17829
|
};
|
|
17771
17830
|
Carousel.prototype.unWireEvents = function () {
|
|
17772
17831
|
var _this = this;
|
|
@@ -17786,6 +17845,7 @@ var Carousel = /** @__PURE__ @class */ (function (_super) {
|
|
|
17786
17845
|
EventHandler.remove(this.element.firstElementChild, 'transitionend', this.onTransitionEnd);
|
|
17787
17846
|
EventHandler.clearEvents(this.element);
|
|
17788
17847
|
EventHandler.clearEvents(this.itemsContainer);
|
|
17848
|
+
EventHandler.remove(window, 'resize', this.resizeHandler);
|
|
17789
17849
|
};
|
|
17790
17850
|
/**
|
|
17791
17851
|
* Method to transit from the current slide to the previous slide.
|