@syncfusion/ej2-filemanager 23.1.39 → 23.1.43-87344

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.
@@ -1625,8 +1625,27 @@ function setNextPath(parent, path) {
1625
1625
  */
1626
1626
  // eslint-disable-next-line
1627
1627
  function openSearchFolder(parent, data) {
1628
- parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1629
1628
  parent.originalPath = getFullPath(parent, data, parent.path);
1629
+ var root = getValue(parent.pathId[0], parent.feParent);
1630
+ var isRoot = getValue('_fm_id', parent.itemData[0]) == 'fe_tree';
1631
+ var key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1632
+ var searchData = getObject(parent, key, getValue('name', data));
1633
+ if (isNullOrUndefined(searchData)) {
1634
+ if (!isRoot) {
1635
+ parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1636
+ }
1637
+ else {
1638
+ setNextPath(parent, parent.path);
1639
+ return;
1640
+ }
1641
+ }
1642
+ else {
1643
+ var id = getValue('_fm_id', searchData);
1644
+ parent.setProperties({ path: parent.originalPath }, true);
1645
+ parent.pathId.push(id);
1646
+ parent.itemData = [searchData];
1647
+ parent.pathNames.push(getValue('name', searchData));
1648
+ }
1630
1649
  read(parent, (parent.path !== parent.originalPath) ? initialEnd : finalizeEnd, parent.path);
1631
1650
  }
1632
1651
  /**
@@ -2619,7 +2638,7 @@ parent, data, fn, event, operation, targetPath) {
2619
2638
  setValue('location', location_1, result.details);
2620
2639
  }
2621
2640
  fn(parent, result, event, operation, targetPath);
2622
- if (!isNullOrUndefined(result.files) && (event === 'path-changed' || event === 'finalize-end' || event === 'open-end')) {
2641
+ if (!isNullOrUndefined(result.files) && (event === 'path-changed' || event === 'finalize-end' || event === 'open-end' || event === 'drop-path')) {
2623
2642
  parent.notify(searchTextChange, result);
2624
2643
  }
2625
2644
  if (typeof getValue('onSuccess', beforeSendArgs.ajaxSettings) === 'function') {
@@ -2787,15 +2806,15 @@ function renameSuccess(parent, result, path) {
2787
2806
  var args = { action: 'rename', result: result };
2788
2807
  parent.trigger('success', args);
2789
2808
  parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
2790
- if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
2791
- parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
2792
- }
2793
2809
  if (parent.activeModule === 'navigationpane') {
2794
2810
  parent.pathId.pop();
2795
2811
  parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
2796
2812
  read(parent, renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
2797
2813
  parent.itemData[0] = parent.renamedItem;
2798
2814
  read(parent, pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
2815
+ if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
2816
+ parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
2817
+ }
2799
2818
  }
2800
2819
  else {
2801
2820
  parent.itemData = [getPathObject(parent)];
@@ -4345,6 +4364,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
4345
4364
  this.selectItems([getValue(this.parent.hasId ? 'id' : 'name', this.parent.createdItem)]);
4346
4365
  this.parent.createdItem = null;
4347
4366
  this.parent.largeiconsviewModule.element.focus();
4367
+ this.parent.activeModule = 'largeiconsview';
4348
4368
  };
4349
4369
  LargeIconsView.prototype.onSelectedData = function () {
4350
4370
  if (this.parent.activeModule === 'largeiconsview') {
@@ -9146,6 +9166,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
9146
9166
  this.expandNodeTarget = args.node.getAttribute('data-uid');
9147
9167
  this.parent.expandedId = this.expandNodeTarget;
9148
9168
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
9169
+ this.parent.pathId.push(getValue('id', args.nodeData));
9149
9170
  read(this.parent, nodeExpand, path);
9150
9171
  this.isNodeExpandCalled = true;
9151
9172
  }
@@ -10684,10 +10705,10 @@ var DetailsView = /** @__PURE__ @class */ (function () {
10684
10705
  }
10685
10706
  var name;
10686
10707
  if (dragLi.getElementsByClassName('e-fe-text')[0]) {
10687
- name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10708
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10688
10709
  }
10689
10710
  else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
10690
- name = dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10711
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10691
10712
  }
10692
10713
  if (dragLi && !dragLi.querySelector('.e-active')) {
10693
10714
  this.selectRecords([name]);