@syncfusion/ej2-filemanager 20.2.36 → 20.2.43

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.
@@ -1597,7 +1597,7 @@ function doPasteUpdate(parent, operation, result) {
1597
1597
  * @private
1598
1598
  */
1599
1599
  function readDropPath(parent) {
1600
- const pathId = getValue('_fm_id', parent.dropData);
1600
+ let pathId = getValue('_fm_id', parent.dropData);
1601
1601
  parent.expandedId = pathId;
1602
1602
  parent.itemData = [parent.dropData];
1603
1603
  if (parent.isPathDrag) {
@@ -1605,7 +1605,12 @@ function readDropPath(parent) {
1605
1605
  }
1606
1606
  else {
1607
1607
  if (parent.navigationpaneModule) {
1608
- const node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1608
+ let node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1609
+ if (!node) {
1610
+ let liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
1611
+ pathId = liElement.getAttribute("data-uid");
1612
+ node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1613
+ }
1609
1614
  updatePath(node, parent.dropData, parent);
1610
1615
  }
1611
1616
  read(parent, dropPath, parent.dropPath);
@@ -3385,11 +3390,18 @@ function getOptions(parent, text, e, details, replaceItems) {
3385
3390
  ];
3386
3391
  break;
3387
3392
  case 'MultipleFileDetails':
3393
+ let index;
3388
3394
  options.dialogName = 'File Details';
3389
- strArr = details.name.split(',').map((val) => {
3390
- const index = val.indexOf('.') + 1;
3391
- return (index === 0) ? 'Folder' : val.substr(index).replace(' ', '');
3395
+ strArr = parent.itemData.map((val) => {
3396
+ index = val.name.indexOf('.') + 1;
3397
+ return (index === 0 && (!val.isFile)) ? 'Folder' : ((index !== 0) ? val.name.substr(index).replace(' ', '') : 'undetermined');
3392
3398
  });
3399
+ if (strArr[0] == undefined) {
3400
+ strArr = details.name.split(',').map((val) => {
3401
+ index = val.indexOf('.') + 1;
3402
+ return (index === 0) ? 'Folder' : val.substr(index).replace(' ', '');
3403
+ });
3404
+ }
3393
3405
  fileType$$1 = strArr.every((val, i, arr) => val === arr[0]) ?
3394
3406
  ((strArr[0] === 'Folder') ? 'Folder' : strArr[0].toLocaleUpperCase() + ' Type') : 'Multiple Types';
3395
3407
  location = details.location;
@@ -5767,7 +5779,7 @@ class ContextMenu$2 {
5767
5779
  data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
5768
5780
  if (isNullOrUndefined(this.targetElement.getAttribute('aria-selected'))) {
5769
5781
  /* istanbul ignore next */
5770
- this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('aria-rowindex'), 10)]);
5782
+ this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('data-rowindex'), 10)]);
5771
5783
  }
5772
5784
  selected = true;
5773
5785
  /* istanbul ignore next */
@@ -8372,7 +8384,7 @@ class NavigationPane {
8372
8384
  const currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
8373
8385
  if (this.expandNodeTarget === 'add') {
8374
8386
  const sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
8375
- const ul = select('.' + LIST_PARENT, sNode);
8387
+ const ul = (!isNullOrUndefined(sNode)) ? select('.' + LIST_PARENT, sNode) : null;
8376
8388
  if (isNullOrUndefined(ul)) {
8377
8389
  this.addChild(args.files, this.treeObj.selectedNodes[0], !this.expandTree);
8378
8390
  }
@@ -10132,7 +10144,7 @@ class DetailsView {
10132
10144
  }
10133
10145
  getFocusedItemIndex() {
10134
10146
  return (!isNullOrUndefined(this.getFocusedItem())) ?
10135
- parseInt(this.getFocusedItem().getAttribute('aria-rowindex'), 10) : null;
10147
+ parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
10136
10148
  }
10137
10149
  /* istanbul ignore next */
10138
10150
  // eslint:disable-next-line