@syncfusion/ej2-navigations 21.2.5 → 21.2.6

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 : 21.2.5
3
+ * version : 21.2.6
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@21.2.4",
3
+ "_id": "@syncfusion/ej2-navigations@21.2.5",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-tNqo7fwXnp6YNAF+gVKLJwXJK2dL+l1taEvIzEwjIvBLxKDnPcIXQkPD/mA5L+/Dm2dVRrLm8B0EB4n43UyPiQ==",
5
+ "_integrity": "sha512-w6/rmRJuiQ/w1MLzkDK3cgYSoFU/ZgRCxOK+1mrWCE3O+2cNEWK3FEKRE/FzTMYDKqYiupQH3xqYQMH9lesjLw==",
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-21.2.4.tgz",
43
- "_shasum": "f4bd273deb7fef77a35df8828162db349c176394",
42
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-navigations/-/ej2-navigations-21.2.5.tgz",
43
+ "_shasum": "97b3f5525e0413b72bdb904471da8d0813513c34",
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": "~21.2.3",
55
- "@syncfusion/ej2-buttons": "~21.2.5",
56
- "@syncfusion/ej2-data": "~21.2.4",
57
- "@syncfusion/ej2-inputs": "~21.2.4",
58
- "@syncfusion/ej2-lists": "~21.2.3",
55
+ "@syncfusion/ej2-buttons": "~21.2.6",
56
+ "@syncfusion/ej2-data": "~21.2.6",
57
+ "@syncfusion/ej2-inputs": "~21.2.6",
58
+ "@syncfusion/ej2-lists": "~21.2.6",
59
59
  "@syncfusion/ej2-popups": "~21.2.4"
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": "21.2.5",
164
+ "version": "21.2.6",
165
165
  "sideEffects": false
166
166
  }
@@ -430,6 +430,7 @@ export declare class Accordion extends Component<HTMLElement> implements INotify
430
430
  private updateItem;
431
431
  private setTemplate;
432
432
  private templateCompile;
433
+ private clearAccordionTemplate;
433
434
  protected getPersistData(): string;
434
435
  /**
435
436
  * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
@@ -1176,6 +1176,12 @@ var Accordion = /** @class */ (function (_super) {
1176
1176
  var itemObj = items[parseInt(index.toString(), 10)];
1177
1177
  items.splice(index, 1);
1178
1178
  this.restoreContent(index);
1179
+ var header = select('.' + CLS_HEADERCTN, item);
1180
+ var content = select('.' + CLS_CTENT, item);
1181
+ if (this.isReact || this.isAngular) {
1182
+ this.clearAccordionTemplate(header, 'header', CLS_HEADERCTN);
1183
+ this.clearAccordionTemplate(content, 'content', CLS_CTENT);
1184
+ }
1179
1185
  detach(item);
1180
1186
  this.addItem(itemObj, index);
1181
1187
  }
@@ -1196,6 +1202,30 @@ var Accordion = /** @class */ (function (_super) {
1196
1202
  });
1197
1203
  }
1198
1204
  };
1205
+ Accordion.prototype.clearAccordionTemplate = function (templateEle, templateName, className) {
1206
+ if (this.registeredTemplate && this.registeredTemplate["" + templateName]) {
1207
+ var registeredTemplates = this.registeredTemplate;
1208
+ for (var index = 0; index < registeredTemplates["" + templateName].length; index++) {
1209
+ var registeredItem = registeredTemplates["" + templateName][parseInt(index.toString(), 10)].rootNodes[0];
1210
+ var closestItem = closest(registeredItem.containerInfo, '.' + className);
1211
+ if (!isNOU(closestItem) && closestItem === templateEle) {
1212
+ this.clearTemplate([templateName], [registeredTemplates["" + templateName][parseInt(index.toString(), 10)]]);
1213
+ break;
1214
+ }
1215
+ }
1216
+ }
1217
+ else if (this.portals && this.portals.length > 0) {
1218
+ var portals = this.portals;
1219
+ for (var index = 0; index < portals.length; index++) {
1220
+ var portalItem = portals[parseInt(index.toString(), 10)];
1221
+ var closestItem = closest(portalItem.containerInfo, '.' + className);
1222
+ if (!isNOU(closestItem) && closestItem === templateEle) {
1223
+ this.clearTemplate([templateName], index);
1224
+ break;
1225
+ }
1226
+ }
1227
+ }
1228
+ };
1199
1229
  Accordion.prototype.getPersistData = function () {
1200
1230
  var keyEntity = ['expandedIndices'];
1201
1231
  return this.addOnPersist(keyEntity);
@@ -1219,44 +1249,50 @@ var Accordion = /** @class */ (function (_super) {
1219
1249
  var changedProp = Object.keys(newProp.items);
1220
1250
  for (var j = 0; j < changedProp.length; j++) {
1221
1251
  var index = parseInt(Object.keys(newProp.items)[parseInt(j.toString(), 10)], 10);
1222
- var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];
1223
- var item = selectAll('.' + CLS_ITEM, this.element)[parseInt(index.toString(), 10)];
1224
- var oldVal = Object(oldProp.items[parseInt(index.toString(), 10)])["" + property];
1225
- var newVal = Object(newProp.items[parseInt(index.toString(), 10)])["" + property];
1226
- var temp = property;
1227
- if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || ((temp === 'content') && (oldVal === ''))) {
1228
- this.updateItem(item, index);
1229
- }
1230
- if (property === 'cssClass' && !isNOU(item)) {
1231
- if (oldVal) {
1232
- removeClass([item], oldVal.split(' '));
1233
- }
1234
- if (newVal) {
1235
- addClass([item], newVal.split(' '));
1252
+ var property = Object.keys(newProp.items[parseInt(index.toString(), 10)]);
1253
+ for (var k = 0; k < property.length; k++) {
1254
+ var item = selectAll('.' + CLS_ITEM, this.element)[parseInt(index.toString(), 10)];
1255
+ var oldVal = Object(oldProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]];
1256
+ var newVal = Object(newProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]];
1257
+ var temp = property[parseInt(k.toString(), 10)];
1258
+ var content = select('.' + CLS_CTENT, item);
1259
+ if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || ((temp === 'content') && (oldVal === ''))) {
1260
+ this.updateItem(item, index);
1236
1261
  }
1237
- }
1238
- if (property === 'visible' && !isNOU(item)) {
1239
- if (Object(newProp.items[parseInt(index.toString(), 10)])["" + property] === false) {
1240
- item.classList.add(CLS_ITEMHIDE);
1262
+ if (property[parseInt(k.toString(), 10)] === 'cssClass' && !isNOU(item)) {
1263
+ if (oldVal) {
1264
+ removeClass([item], oldVal.split(' '));
1265
+ }
1266
+ if (newVal) {
1267
+ addClass([item], newVal.split(' '));
1268
+ }
1241
1269
  }
1242
- else {
1243
- item.classList.remove(CLS_ITEMHIDE);
1270
+ if (property[parseInt(k.toString(), 10)] === 'visible' && !isNOU(item)) {
1271
+ if (Object(newProp.items[parseInt(index.toString(), 10)])["" + property[parseInt(k.toString(), 10)]] === false) {
1272
+ item.classList.add(CLS_ITEMHIDE);
1273
+ }
1274
+ else {
1275
+ item.classList.remove(CLS_ITEMHIDE);
1276
+ }
1244
1277
  }
1245
- }
1246
- if (property === 'disabled' && !isNOU(item)) {
1247
- this.enableItem(index, !newVal);
1248
- }
1249
- if (property === 'content' && !isNOU(item) && item.children.length === 2) {
1250
- if (typeof newVal === 'function') {
1251
- var activeContent = item.querySelector('.' + CLS_CTENT);
1252
- activeContent.innerHTML = '';
1253
- this.setTemplate(newVal, activeContent, index);
1278
+ if (property[parseInt(k.toString(), 10)] === 'disabled' && !isNOU(item)) {
1279
+ this.enableItem(index, !newVal);
1254
1280
  }
1255
- else {
1256
- if (item.classList.contains(CLS_SLCTED)) {
1257
- this.expandItem(false, index);
1281
+ if (property[parseInt(k.toString(), 10)] === 'content' && !isNOU(item) && item.children.length === 2) {
1282
+ if (typeof newVal === 'function') {
1283
+ if (this.isAngular || this.isReact) {
1284
+ this.clearAccordionTemplate(content, property[parseInt(k.toString(), 10)], CLS_CTENT);
1285
+ }
1286
+ var activeContent = item.querySelector('.' + CLS_CTENT);
1287
+ activeContent.innerHTML = '';
1288
+ this.setTemplate(newVal, activeContent, index);
1289
+ }
1290
+ else {
1291
+ if (item.classList.contains(CLS_SLCTED)) {
1292
+ this.expandItem(false, index);
1293
+ }
1294
+ detach(item.querySelector('.' + CLS_CONTENT));
1258
1295
  }
1259
- detach(item.querySelector('.' + CLS_CONTENT));
1260
1296
  }
1261
1297
  }
1262
1298
  }