@syncfusion/ej2-filemanager 26.2.10 → 26.2.11-21788

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.
@@ -1708,6 +1708,9 @@ function pasteHandler(parent) {
1708
1708
  parent.isDragDrop = false;
1709
1709
  if (parent.selectedNodes.length !== 0 && parent.enablePaste) {
1710
1710
  var path = (parent.folderPath === '') ? parent.path : parent.folderPath;
1711
+ if (parent.activeModule === 'navigationpane' && !parent.selectedNodes[0].includes('/')) {
1712
+ parent.targetPath = getValue('filterPath', parent.actionRecords[0]).replace(/\\/g, '/');
1713
+ }
1711
1714
  var subFolder = validateSubFolder(parent, parent.actionRecords, path, parent.path);
1712
1715
  if (!subFolder) {
1713
1716
  if ((parent.fileAction === 'move' && parent.targetPath !== path) || parent.fileAction === 'copy') {
@@ -5284,7 +5287,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
5284
5287
  LargeIconsView.prototype.onpasteEnd = function (args) {
5285
5288
  if (this.parent.view === 'LargeIcons') {
5286
5289
  this.isPasteOperation = true;
5287
- if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args)) {
5290
+ if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
5288
5291
  this.onPathChanged(args);
5289
5292
  }
5290
5293
  }
@@ -6749,7 +6752,23 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
6749
6752
  iconSpan.setAttribute('class', ICON_GRID + ' ' + MENU_ICON);
6750
6753
  }
6751
6754
  };
6752
- ContextMenu.prototype.onBeforeClose = function () {
6755
+ ContextMenu.prototype.onBeforeClose = function (args) {
6756
+ var eventArgs = {
6757
+ cancel: false,
6758
+ element: args.element,
6759
+ event: args.event,
6760
+ isFocused: args.isFocused,
6761
+ fileDetails: [this.menuItemData],
6762
+ items: args.items,
6763
+ parentItem: args.parentItem,
6764
+ menuType: this.menuType
6765
+ };
6766
+ this.parent.trigger('menuClose', eventArgs, function (menuCloseArgs) {
6767
+ if (menuCloseArgs.cancel) {
6768
+ args.cancel = menuCloseArgs.cancel;
6769
+ return;
6770
+ }
6771
+ });
6753
6772
  this.menuTarget = null;
6754
6773
  if (!this.isMenuItemClicked && this.parent.pathId.length > 1 && this.parent.activeModule === 'navigationpane') {
6755
6774
  this.parent.pathId.pop();
@@ -7086,6 +7105,9 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
7086
7105
  break;
7087
7106
  case 'paste':
7088
7107
  if (_this.menuType === 'folder') {
7108
+ if (_this.parent.activeModule === 'navigationpane') {
7109
+ _this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
7110
+ }
7089
7111
  _this.parent.folderPath = getFullPath(_this.parent, _this.menuItemData, _this.parent.path);
7090
7112
  }
7091
7113
  else {
@@ -8740,6 +8762,9 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
8740
8762
  __decorate$8([
8741
8763
  Event()
8742
8764
  ], FileManager.prototype, "menuOpen", void 0);
8765
+ __decorate$8([
8766
+ Event()
8767
+ ], FileManager.prototype, "menuClose", void 0);
8743
8768
  __decorate$8([
8744
8769
  Event()
8745
8770
  ], FileManager.prototype, "failure", void 0);
@@ -11575,7 +11600,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11575
11600
  DetailsView.prototype.onpasteEnd = function (args) {
11576
11601
  if (this.parent.view === 'Details') {
11577
11602
  this.isPasteOperation = true;
11578
- if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args)) {
11603
+ if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
11579
11604
  this.onPathChanged(args);
11580
11605
  }
11581
11606
  }