@syncfusion/ej2-navigations 22.2.7 → 22.2.8
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 +2 -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 +54 -26
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +54 -26
- 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/tab/tab-model.d.ts +6 -0
- package/src/tab/tab.d.ts +5 -0
- package/src/tab/tab.js +6 -0
- package/src/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +48 -26
|
@@ -5038,7 +5038,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5038
5038
|
this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
|
|
5039
5039
|
}
|
|
5040
5040
|
if (this.isReact) {
|
|
5041
|
-
this.
|
|
5041
|
+
this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);
|
|
5042
5042
|
}
|
|
5043
5043
|
const btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
|
|
5044
5044
|
if (!isNullOrUndefined(btnItem) && !isNullOrUndefined(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
|
|
@@ -5350,6 +5350,30 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5350
5350
|
nextEle = innerItems[++eleIndex];
|
|
5351
5351
|
}
|
|
5352
5352
|
}
|
|
5353
|
+
clearToolbarTemplate(templateEle) {
|
|
5354
|
+
if (this.registeredTemplate && this.registeredTemplate[`${'template'}`]) {
|
|
5355
|
+
const registeredTemplates = this.registeredTemplate;
|
|
5356
|
+
for (let index = 0; index < registeredTemplates[`${'template'}`].length; index++) {
|
|
5357
|
+
const registeredItem = registeredTemplates[`${'template'}`][parseInt(index.toString(), 10)].rootNodes[0];
|
|
5358
|
+
const closestItem = closest(registeredItem, '.' + CLS_ITEM);
|
|
5359
|
+
if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
|
|
5360
|
+
this.clearTemplate(['template'], [registeredTemplates[`${'template'}`][parseInt(index.toString(), 10)]]);
|
|
5361
|
+
break;
|
|
5362
|
+
}
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
else if (this.portals && this.portals.length > 0) {
|
|
5366
|
+
const portals = this.portals;
|
|
5367
|
+
for (let index = 0; index < portals.length; index++) {
|
|
5368
|
+
const portalItem = portals[parseInt(index.toString(), 10)];
|
|
5369
|
+
const closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);
|
|
5370
|
+
if (!isNullOrUndefined(closestItem) && closestItem === templateEle) {
|
|
5371
|
+
this.clearTemplate(['template'], index);
|
|
5372
|
+
break;
|
|
5373
|
+
}
|
|
5374
|
+
}
|
|
5375
|
+
}
|
|
5376
|
+
}
|
|
5353
5377
|
/**
|
|
5354
5378
|
* Gets called when the model property changes.The data that describes the old and new values of the property that changed.
|
|
5355
5379
|
*
|
|
@@ -5371,31 +5395,29 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5371
5395
|
const index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
|
|
5372
5396
|
const property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
|
|
5373
5397
|
const newProperty = Object(newProp.items[parseInt(index.toString(), 10)])[`${property}`];
|
|
5374
|
-
if (
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
this.tbarEle.splice(this.items.length, 1);
|
|
5398
|
-
}
|
|
5398
|
+
if (this.tbarAlign || property === 'align') {
|
|
5399
|
+
this.refresh();
|
|
5400
|
+
this.trigger('created');
|
|
5401
|
+
break;
|
|
5402
|
+
}
|
|
5403
|
+
const popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
|
|
5404
|
+
const booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
|
|
5405
|
+
if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
|
|
5406
|
+
--this.popupPriCount;
|
|
5407
|
+
}
|
|
5408
|
+
if (isNullOrUndefined(this.scrollModule)) {
|
|
5409
|
+
this.destroyMode();
|
|
5410
|
+
}
|
|
5411
|
+
const itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
|
|
5412
|
+
if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
|
|
5413
|
+
this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
|
|
5414
|
+
}
|
|
5415
|
+
detach(itemCol[parseInt(index.toString(), 10)]);
|
|
5416
|
+
this.tbarEle.splice(index, 1);
|
|
5417
|
+
this.addItems([this.items[parseInt(index.toString(), 10)]], index);
|
|
5418
|
+
this.items.splice(index, 1);
|
|
5419
|
+
if (this.items[parseInt(index.toString(), 10)].template) {
|
|
5420
|
+
this.tbarEle.splice(this.items.length, 1);
|
|
5399
5421
|
}
|
|
5400
5422
|
}
|
|
5401
5423
|
}
|
|
@@ -8734,6 +8756,9 @@ let Tab = class Tab extends Component {
|
|
|
8734
8756
|
}
|
|
8735
8757
|
}
|
|
8736
8758
|
clearTabTemplate(templateEle, templateName, className) {
|
|
8759
|
+
if (!this.clearTemplates) {
|
|
8760
|
+
return;
|
|
8761
|
+
}
|
|
8737
8762
|
if (this.registeredTemplate && this.registeredTemplate[templateName]) {
|
|
8738
8763
|
const registeredTemplates = this.registeredTemplate;
|
|
8739
8764
|
for (let index = 0; index < registeredTemplates[templateName].length; index++) {
|
|
@@ -9626,6 +9651,9 @@ __decorate$7([
|
|
|
9626
9651
|
__decorate$7([
|
|
9627
9652
|
Property(false)
|
|
9628
9653
|
], Tab.prototype, "allowDragAndDrop", void 0);
|
|
9654
|
+
__decorate$7([
|
|
9655
|
+
Property(true)
|
|
9656
|
+
], Tab.prototype, "clearTemplates", void 0);
|
|
9629
9657
|
__decorate$7([
|
|
9630
9658
|
Complex({}, TabAnimationSettings)
|
|
9631
9659
|
], Tab.prototype, "animation", void 0);
|