@syncfusion/ej2-filemanager 20.2.39 → 20.2.45

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.
@@ -1219,7 +1219,7 @@ function getImageUrl(parent, item) {
1219
1219
  imgUrl = baseUrl + '?path=' + parent.path + '&id=' + imgId;
1220
1220
  }
1221
1221
  else if (!isNullOrUndefined(fPath)) {
1222
- imgUrl = baseUrl + '?path=' + fPath.replace(/\\/g, '/') + fileName;
1222
+ imgUrl = baseUrl + '?path=' + encodeURIComponent(fPath.replace(/\\/g, '/')) + fileName;
1223
1223
  }
1224
1224
  else {
1225
1225
  imgUrl = baseUrl + '?path=' + parent.path + fileName;
@@ -1750,6 +1750,11 @@ function readDropPath(parent) {
1750
1750
  else {
1751
1751
  if (parent.navigationpaneModule) {
1752
1752
  var node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1753
+ if (!node) {
1754
+ var liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
1755
+ pathId = liElement.getAttribute("data-uid");
1756
+ node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1757
+ }
1753
1758
  updatePath(node, parent.dropData, parent);
1754
1759
  }
1755
1760
  read(parent, dropPath, parent.dropPath);
@@ -2576,6 +2581,8 @@ function readSuccess(parent, result, event) {
2576
2581
  parent.notify(selectionChanged, {});
2577
2582
  }
2578
2583
  onFailure(parent, result, 'read');
2584
+ parent.setProperties({ path: parent.oldPath }, true);
2585
+ parent.pathNames.pop();
2579
2586
  }
2580
2587
  if (parent.isDragDrop && parent.isDropEnd) {
2581
2588
  if (parent.droppedObjects.length !== 0) {
@@ -4719,6 +4726,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
4719
4726
  var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
4720
4727
  if (val === '' && !_this.parent.isFiltered) {
4721
4728
  var id = getValue('id', details_1);
4729
+ _this.parent.oldPath = _this.parent.path;
4722
4730
  var newPath = _this.parent.path + (isNullOrUndefined(id) ? text : id) + '/';
4723
4731
  _this.parent.setProperties({ path: newPath }, true);
4724
4732
  _this.parent.pathNames.push(text);
@@ -5929,7 +5937,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
5929
5937
  data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
5930
5938
  if (isNullOrUndefined(this.targetElement.getAttribute('aria-selected'))) {
5931
5939
  /* istanbul ignore next */
5932
- this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('aria-rowindex'), 10)]);
5940
+ this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('data-rowindex'), 10)]);
5933
5941
  }
5934
5942
  selected = true;
5935
5943
  /* istanbul ignore next */
@@ -9694,6 +9702,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
9694
9702
  var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
9695
9703
  if (val === '' && !_this.parent.isFiltered) {
9696
9704
  var id = getValue('id', data);
9705
+ _this.parent.oldPath = _this.parent.path;
9697
9706
  var newPath = _this.parent.path + (isNullOrUndefined(id) ? name_2 : id) + '/';
9698
9707
  _this.parent.setProperties({ path: newPath }, true);
9699
9708
  _this.parent.pathNames.push(name_2);
@@ -10329,7 +10338,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
10329
10338
  };
10330
10339
  DetailsView.prototype.getFocusedItemIndex = function () {
10331
10340
  return (!isNullOrUndefined(this.getFocusedItem())) ?
10332
- parseInt(this.getFocusedItem().getAttribute('aria-rowindex'), 10) : null;
10341
+ parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
10333
10342
  };
10334
10343
  /* istanbul ignore next */
10335
10344
  // eslint:disable-next-line