@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.2.7
3
+ * version : 22.2.8
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-navigations@*",
3
- "_id": "@syncfusion/ej2-navigations@22.2.5",
3
+ "_id": "@syncfusion/ej2-navigations@22.2.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-ROhN91xNpqtogxlvW9w3ku1Ho2bKlrMhnEXRn4Xy+sQPN5FjVRsgnTZ0Wbp1tH1XygcVFw1QagQufhFvXT1ERw==",
5
+ "_integrity": "sha512-7Uz9JOqY5jJxwhyzEm/75NlZPwU2FSgHGayMBKK7HD/fi4Xs7JZUrC51E6un9JZk8/QGRgqVtf5zSgLbBHAYHA==",
6
6
  "_location": "/@syncfusion/ej2-navigations",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -39,8 +39,8 @@
39
39
  "/@syncfusion/ej2-spreadsheet",
40
40
  "/@syncfusion/ej2-vue-navigations"
41
41
  ],
42
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-22.2.5.tgz",
43
- "_shasum": "aa9ae780330515fbfda83b0aa3c565b5b349a8d7",
42
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-22.2.7.tgz",
43
+ "_shasum": "5fcaed69c7a93538c2bb9312dde3fe7375060919",
44
44
  "_spec": "@syncfusion/ej2-navigations@*",
45
45
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
46
46
  "author": {
@@ -52,10 +52,10 @@
52
52
  "bundleDependencies": false,
53
53
  "dependencies": {
54
54
  "@syncfusion/ej2-base": "~22.2.5",
55
- "@syncfusion/ej2-buttons": "~22.2.5",
55
+ "@syncfusion/ej2-buttons": "~22.2.8",
56
56
  "@syncfusion/ej2-data": "~22.2.5",
57
57
  "@syncfusion/ej2-inputs": "~22.2.7",
58
- "@syncfusion/ej2-lists": "~22.2.5",
58
+ "@syncfusion/ej2-lists": "~22.2.8",
59
59
  "@syncfusion/ej2-popups": "~22.2.7"
60
60
  },
61
61
  "deprecated": false,
@@ -161,6 +161,6 @@
161
161
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
162
162
  },
163
163
  "typings": "index.d.ts",
164
- "version": "22.2.7",
164
+ "version": "22.2.8",
165
165
  "sideEffects": false
166
166
  }
@@ -315,6 +315,12 @@ export interface TabModel extends ComponentModel{
315
315
  */
316
316
  allowDragAndDrop?: boolean;
317
317
 
318
+ /**
319
+ * Specifies whether the templates need to be cleared or not while changing the Tab items dynamically.
320
+ * @default true
321
+ */
322
+ clearTemplates?: boolean;
323
+
318
324
  /**
319
325
  * Specifies the animation configuration settings while showing the content of the Tab.
320
326
  *
package/src/tab/tab.d.ts CHANGED
@@ -430,6 +430,11 @@ export declare class Tab extends Component<HTMLElement> implements INotifyProper
430
430
  * @default false
431
431
  */
432
432
  allowDragAndDrop: boolean;
433
+ /**
434
+ * Specifies whether the templates need to be cleared or not while changing the Tab items dynamically.
435
+ * @default true
436
+ */
437
+ clearTemplates: boolean;
433
438
  /**
434
439
  * Specifies the animation configuration settings while showing the content of the Tab.
435
440
  *
package/src/tab/tab.js CHANGED
@@ -1489,6 +1489,9 @@ var Tab = /** @class */ (function (_super) {
1489
1489
  }
1490
1490
  };
1491
1491
  Tab.prototype.clearTabTemplate = function (templateEle, templateName, className) {
1492
+ if (!this.clearTemplates) {
1493
+ return;
1494
+ }
1492
1495
  if (this.registeredTemplate && this.registeredTemplate[templateName]) {
1493
1496
  var registeredTemplates = this.registeredTemplate;
1494
1497
  for (var index = 0; index < registeredTemplates[templateName].length; index++) {
@@ -2391,6 +2394,9 @@ var Tab = /** @class */ (function (_super) {
2391
2394
  __decorate([
2392
2395
  Property(false)
2393
2396
  ], Tab.prototype, "allowDragAndDrop", void 0);
2397
+ __decorate([
2398
+ Property(true)
2399
+ ], Tab.prototype, "clearTemplates", void 0);
2394
2400
  __decorate([
2395
2401
  Complex({}, TabAnimationSettings)
2396
2402
  ], Tab.prototype, "animation", void 0);
@@ -502,6 +502,7 @@ export declare class Toolbar extends Component<HTMLElement> implements INotifyPr
502
502
  private orientationChange;
503
503
  private extendedOpen;
504
504
  private updateHideEleTabIndex;
505
+ private clearToolbarTemplate;
505
506
  /**
506
507
  * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
507
508
  *
@@ -1814,7 +1814,7 @@ var Toolbar = /** @class */ (function (_super) {
1814
1814
  this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);
1815
1815
  }
1816
1816
  if (this.isReact) {
1817
- this.clearTemplate();
1817
+ this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);
1818
1818
  }
1819
1819
  var btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');
1820
1820
  if (!isNOU(btnItem) && !isNOU(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
@@ -2127,6 +2127,30 @@ var Toolbar = /** @class */ (function (_super) {
2127
2127
  nextEle = innerItems[++eleIndex];
2128
2128
  }
2129
2129
  };
2130
+ Toolbar.prototype.clearToolbarTemplate = function (templateEle) {
2131
+ if (this.registeredTemplate && this.registeredTemplate["" + 'template']) {
2132
+ var registeredTemplates = this.registeredTemplate;
2133
+ for (var index = 0; index < registeredTemplates["" + 'template'].length; index++) {
2134
+ var registeredItem = registeredTemplates["" + 'template'][parseInt(index.toString(), 10)].rootNodes[0];
2135
+ var closestItem = closest(registeredItem, '.' + CLS_ITEM);
2136
+ if (!isNOU(closestItem) && closestItem === templateEle) {
2137
+ this.clearTemplate(['template'], [registeredTemplates["" + 'template'][parseInt(index.toString(), 10)]]);
2138
+ break;
2139
+ }
2140
+ }
2141
+ }
2142
+ else if (this.portals && this.portals.length > 0) {
2143
+ var portals = this.portals;
2144
+ for (var index = 0; index < portals.length; index++) {
2145
+ var portalItem = portals[parseInt(index.toString(), 10)];
2146
+ var closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);
2147
+ if (!isNOU(closestItem) && closestItem === templateEle) {
2148
+ this.clearTemplate(['template'], index);
2149
+ break;
2150
+ }
2151
+ }
2152
+ }
2153
+ };
2130
2154
  /**
2131
2155
  * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
2132
2156
  *
@@ -2149,31 +2173,29 @@ var Toolbar = /** @class */ (function (_super) {
2149
2173
  var index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);
2150
2174
  var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
2151
2175
  var newProperty = Object(newProp.items[parseInt(index.toString(), 10)])["" + property];
2152
- if (typeof newProperty !== 'function') {
2153
- if (this.tbarAlign || property === 'align') {
2154
- this.refresh();
2155
- this.trigger('created');
2156
- break;
2157
- }
2158
- var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
2159
- var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
2160
- if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
2161
- --this.popupPriCount;
2162
- }
2163
- if (isNOU(this.scrollModule)) {
2164
- this.destroyMode();
2165
- }
2166
- var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
2167
- if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
2168
- this.clearTemplate();
2169
- }
2170
- detach(itemCol[parseInt(index.toString(), 10)]);
2171
- this.tbarEle.splice(index, 1);
2172
- this.addItems([this.items[parseInt(index.toString(), 10)]], index);
2173
- this.items.splice(index, 1);
2174
- if (this.items[parseInt(index.toString(), 10)].template) {
2175
- this.tbarEle.splice(this.items.length, 1);
2176
- }
2176
+ if (this.tbarAlign || property === 'align') {
2177
+ this.refresh();
2178
+ this.trigger('created');
2179
+ break;
2180
+ }
2181
+ var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
2182
+ var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;
2183
+ if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {
2184
+ --this.popupPriCount;
2185
+ }
2186
+ if (isNOU(this.scrollModule)) {
2187
+ this.destroyMode();
2188
+ }
2189
+ var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
2190
+ if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
2191
+ this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
2192
+ }
2193
+ detach(itemCol[parseInt(index.toString(), 10)]);
2194
+ this.tbarEle.splice(index, 1);
2195
+ this.addItems([this.items[parseInt(index.toString(), 10)]], index);
2196
+ this.items.splice(index, 1);
2197
+ if (this.items[parseInt(index.toString(), 10)].template) {
2198
+ this.tbarEle.splice(this.items.length, 1);
2177
2199
  }
2178
2200
  }
2179
2201
  }