@syncfusion/ej2-navigations 21.2.4 → 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.4
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.3",
3
+ "_id": "@syncfusion/ej2-navigations@21.2.5",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-wkXN1stY02EuXHBfwv7RtsJsFvnKxYNoT74/VZu+Dqe2dMMx1JH8zDLVbjIVflAo3BiDRTKs6erEjJB4ErtUUQ==",
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.3.tgz",
43
- "_shasum": "e53c4fd12005ea2d5c63cd9b9b7d97deb07ba785",
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.3",
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.4",
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
  }
package/src/tab/tab.js CHANGED
@@ -357,15 +357,6 @@ var Tab = /** @class */ (function (_super) {
357
357
  this.setContentHeight(true);
358
358
  this.select(this.selectedItem);
359
359
  }
360
- this.tbItem = selectAll('.' + CLS_TB_ITEM, this.hdrEle);
361
- if (!isNOU(this.tbItem)) {
362
- for (var i = 0; i < this.items.length; i++) {
363
- if (this.tbItem[i]) {
364
- var tabID = this.items[i].id;
365
- this.tbItem[i].setAttribute('data-id', tabID);
366
- }
367
- }
368
- }
369
360
  this.setRTL(this.enableRtl);
370
361
  }
371
362
  };
@@ -545,7 +536,7 @@ var Tab = /** @class */ (function (_super) {
545
536
  _this.itemIndexArray.splice((index + i), 0, CLS_ITEM + _this.tabId + '_' + _this.lastIndex);
546
537
  }
547
538
  var attrObj = {
548
- id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex
539
+ id: CLS_ITEM + _this.tabId + '_' + _this.lastIndex, 'data-id': item.id
549
540
  };
550
541
  var tItem = { htmlAttributes: attrObj, template: wrap };
551
542
  tItem.cssClass = ((item.cssClass !== undefined) ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + ' '
@@ -1629,6 +1620,10 @@ var Tab = /** @class */ (function (_super) {
1629
1620
  };
1630
1621
  this.trigger('onDragStart', dragArgs, function (tabitemDragArgs) {
1631
1622
  if (tabitemDragArgs.cancel) {
1623
+ var dragObj = e.element.ej2_instances[0];
1624
+ if (!isNullOrUndefined(dragObj)) {
1625
+ dragObj.intDestroy(e.event);
1626
+ }
1632
1627
  detach(_this.cloneElement);
1633
1628
  }
1634
1629
  else {
@@ -2965,6 +2965,8 @@ var TreeView = /** @class */ (function (_super) {
2965
2965
  enableTailMode: true, enableAutoScroll: true,
2966
2966
  dragArea: this.dragArea,
2967
2967
  dragTarget: '.' + TEXTWRAP,
2968
+ enableTapHold: true,
2969
+ tapHoldThreshold: 100,
2968
2970
  helper: function (e) {
2969
2971
  _this.dragTarget = e.sender.target;
2970
2972
  var dragRoot = closest(_this.dragTarget, '.' + ROOT);
@@ -3395,7 +3397,10 @@ var TreeView = /** @class */ (function (_super) {
3395
3397
  dropUl.style.display = 'none';
3396
3398
  }
3397
3399
  if (isNOU(dropUl)) {
3398
- this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));
3400
+ var args = this.expandArgs;
3401
+ if (isNOU(args) || args.name != 'nodeExpanding') {
3402
+ this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));
3403
+ }
3399
3404
  if (isNOU(dropIcon)) {
3400
3405
  ListBase.generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
3401
3406
  }
@@ -3745,6 +3750,7 @@ var TreeView = /** @class */ (function (_super) {
3745
3750
  }
3746
3751
  refNode = dropUl.childNodes[index];
3747
3752
  if (!this.isFirstRender || this.dataType === 1) {
3753
+ var args = this.expandArgs;
3748
3754
  if (refNode || this.sortOrder === 'None') {
3749
3755
  for (var i = 0; i < li.length; i++) {
3750
3756
  dropUl.insertBefore(li[i], refNode);
@@ -3752,7 +3758,7 @@ var TreeView = /** @class */ (function (_super) {
3752
3758
  if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
3753
3759
  this.preventExpand = false;
3754
3760
  var dropIcon = select('div.' + ICON, dropLi);
3755
- if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
3761
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNOU(args) || args.name != 'nodeExpanding')) {
3756
3762
  this.expandAction(dropLi, dropIcon, null);
3757
3763
  }
3758
3764
  }
@@ -3765,7 +3771,7 @@ var TreeView = /** @class */ (function (_super) {
3765
3771
  if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNOU(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
3766
3772
  this.preventExpand = false;
3767
3773
  var dropIcon = select('div.' + ICON, dropLi);
3768
- if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {
3774
+ if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && (isNOU(args) || args.name != 'nodeExpanding')) {
3769
3775
  this.expandAction(dropLi, dropIcon, null);
3770
3776
  }
3771
3777
  }
@@ -8149,10 +8149,10 @@
8149
8149
  color: rgba(0, 0, 0, 0.54);
8150
8150
  }
8151
8151
  .e-treeview .e-list-item.e-active > .e-text-content {
8152
- color: #cc1351;
8152
+ color: #e3165b;
8153
8153
  }
8154
8154
  .e-treeview .e-list-item.e-active > .e-text-content .e-list-text {
8155
- color: #cc1351;
8155
+ color: #e3165b;
8156
8156
  }
8157
8157
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-collapsible,
8158
8158
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-expandable {
@@ -12,7 +12,7 @@ $treeview-text-color: rgba($grey-light-font, .87) !default;
12
12
  $treeview-item-border-color: transparent !default;
13
13
  $treeview-item-active-bg: $grey-200 !default;
14
14
  $treeview-icon-active-color: rgba($grey-light-font, .54) !default;
15
- $treeview-text-active-color: $tree-node-text-color !default;
15
+ $treeview-text-active-color: $accent !default;
16
16
  $treeview-item-active-border-color: $grey-200 !default;
17
17
  $treeview-item-hover-bg: $grey-100 !default;
18
18
  $treeview-icon-hover-color: rgba($grey-light-font, .54) !default;
@@ -619,10 +619,10 @@
619
619
  color: rgba(0, 0, 0, 0.54);
620
620
  }
621
621
  .e-treeview .e-list-item.e-active > .e-text-content {
622
- color: #cc1351;
622
+ color: #e3165b;
623
623
  }
624
624
  .e-treeview .e-list-item.e-active > .e-text-content .e-list-text {
625
- color: #cc1351;
625
+ color: #e3165b;
626
626
  }
627
627
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-collapsible,
628
628
  .e-treeview .e-list-item.e-active > .e-text-content .e-icon-expandable {