@syncfusion/ej2-filemanager 21.1.41 → 21.2.5

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.
@@ -5996,9 +5996,11 @@ class ContextMenu$2 {
5996
5996
  this.menuType = 'folder';
5997
5997
  this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.folder.map((item) => item.trim()));
5998
5998
  this.contextMenu.dataBind();
5999
- const selectedTreeNode = select('[data-uid="' + this.parent.navigationpaneModule.treeObj.selectedNodes[0] + '"]', this.parent.navigationpaneModule.treeObj.element);
6000
- if (this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
6001
- this.disabledItems.push('Open');
5999
+ if (isTree) {
6000
+ const selectedTreeNode = select('[data-uid="' + this.parent.navigationpaneModule.treeObj.selectedNodes[0] + '"]', this.parent.navigationpaneModule.treeObj.element);
6001
+ if (this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
6002
+ this.disabledItems.push('Open');
6003
+ }
6002
6004
  }
6003
6005
  else if (this.parent.selectedItems.length !== 1 && this.parent.activeModule !== 'navigationpane') {
6004
6006
  this.disabledItems.push('Rename', 'Paste');
@@ -8644,7 +8646,7 @@ class NavigationPane {
8644
8646
  const selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
8645
8647
  this.parent.trigger('fileSelect', selecEventArgs);
8646
8648
  }
8647
- if (!this.isRightClick && args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1]) {
8649
+ if (!this.isRightClick) {
8648
8650
  const eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
8649
8651
  this.parent.trigger('fileOpen', eventArgs);
8650
8652
  args.cancel = eventArgs.cancel;
@@ -8658,7 +8660,7 @@ class NavigationPane {
8658
8660
  }
8659
8661
  }
8660
8662
  else if (this.previousSelected[0] !== args.node.getAttribute('data-uid')) {
8661
- const selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
8663
+ const selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: this.isNodeClickCalled };
8662
8664
  this.parent.trigger('fileSelect', selecEventArgs);
8663
8665
  }
8664
8666
  }
@@ -8708,11 +8710,11 @@ class NavigationPane {
8708
8710
  this.parent.pathId = getPathId(args.node);
8709
8711
  this.parent.visitedItem = args.node;
8710
8712
  }
8713
+ this.expandNodeTarget = null;
8714
+ if (args.node.querySelector('.' + ICONS) && args.node.querySelector('.' + LIST_ITEM) === null) {
8715
+ this.expandNodeTarget = 'add';
8716
+ }
8711
8717
  if (previousPath !== this.parent.path) {
8712
- this.expandNodeTarget = null;
8713
- if (args.node.querySelector('.' + ICONS) && args.node.querySelector('.' + LIST_ITEM) === null) {
8714
- this.expandNodeTarget = 'add';
8715
- }
8716
8718
  if (!this.isRightClick && this.isSameNodeClicked) {
8717
8719
  read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
8718
8720
  this.isNodeClickCalled = true;
@@ -9604,7 +9606,7 @@ class DetailsView {
9604
9606
  const columns = this.parent.detailsViewSettings.columns;
9605
9607
  for (let i = 0; i < columns.length; i++) {
9606
9608
  if (columns[i].field === 'size') {
9607
- sizeFormat = columns[i].format.toString();
9609
+ sizeFormat = !isNullOrUndefined(columns[i].format) ? columns[i].format.toString() : 'n';
9608
9610
  break;
9609
9611
  }
9610
9612
  }
@@ -9846,6 +9848,7 @@ class DetailsView {
9846
9848
  }
9847
9849
  else if (!isNullOrUndefined(this.gridObj)) {
9848
9850
  this.gridObj.clearSelection();
9851
+ this.interaction = true;
9849
9852
  }
9850
9853
  break;
9851
9854
  case 'showFileExtension':