@syncfusion/ej2-filemanager 28.2.3 → 28.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.
@@ -1137,7 +1137,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
1137
1137
  if (isFileSystemData(parent)) {
1138
1138
  if (value === '') {
1139
1139
  parent.itemData = parent.fileSystemData;
1140
- read(parent, layoutChange, parent.path);
1140
+ read(parent, isLayoutChange ? layoutChange : search, parent.path);
1141
1141
  }
1142
1142
  else {
1143
1143
  parent.searchSettings.filterType = isNullOrUndefined(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
@@ -7078,11 +7078,15 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
7078
7078
  }
7079
7079
  };
7080
7080
  ContextMenu.prototype.enableItems = function (items, enable, isUniqueId) {
7081
+ if (enable) {
7082
+ this.disabledItems = this.disabledItems.filter(function (item) { return items.indexOf(item) === -1; });
7083
+ }
7081
7084
  for (var i = 0; i < items.length; i++) {
7082
- if (this.checkValidItem(items[i]) === 1) {
7085
+ var validItem = this.checkValidItem(items[i]);
7086
+ if (validItem === 1) {
7083
7087
  this.contextMenu.enableItems([this.getMenuId(items[i])], enable, isUniqueId);
7084
7088
  }
7085
- else if (this.checkValidItem(items[i]) === 2) {
7089
+ else if (validItem === 2) {
7086
7090
  this.contextMenu.enableItems([items[i]], enable, isUniqueId);
7087
7091
  }
7088
7092
  }
@@ -7157,15 +7161,15 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
7157
7161
  this.contextMenu.dataBind();
7158
7162
  };
7159
7163
  ContextMenu.prototype.checkValidItem = function (nameEle) {
7160
- if (!isNullOrUndefined(select('#' + this.getMenuId(nameEle), this.currentElement))) {
7161
- return 1;
7162
- }
7163
- else if (!isNullOrUndefined(select('#' + nameEle, this.currentElement))) {
7164
- return 2;
7165
- }
7166
- else {
7167
- return -1;
7164
+ if (!isNullOrUndefined(this.currentElement)) {
7165
+ if (!isNullOrUndefined(select('#' + this.getMenuId(nameEle), this.currentElement))) {
7166
+ return 1;
7167
+ }
7168
+ else if (!isNullOrUndefined(select('#' + nameEle, this.currentElement))) {
7169
+ return 2;
7170
+ }
7168
7171
  }
7172
+ return -1;
7169
7173
  };
7170
7174
  ContextMenu.prototype.getMenuItemData = function () {
7171
7175
  if (this.menuType === 'layout') {
@@ -8730,6 +8734,17 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
8730
8734
  this.toolbarModule.enableItems(items, true);
8731
8735
  }
8732
8736
  };
8737
+ /**
8738
+ * Enables the specified menu items of the file manager.
8739
+ *
8740
+ * @param {string[]} items - Specifies an array of items to be enabled.
8741
+ * @returns {void}
8742
+ */
8743
+ FileManager.prototype.enableMenuItems = function (items) {
8744
+ if (!isNullOrUndefined(items) && !isNullOrUndefined(this.contextmenuModule) && !isNullOrUndefined(this.contextmenuModule.contextMenu)) {
8745
+ this.contextmenuModule.enableItems(items, true, true);
8746
+ }
8747
+ };
8733
8748
  /**
8734
8749
  * Disables the specified context menu items in file manager. This method is used only in the menuOpen event.
8735
8750
  *
@@ -8737,7 +8752,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
8737
8752
  * @returns {void}
8738
8753
  */
8739
8754
  FileManager.prototype.disableMenuItems = function (items) {
8740
- if (!isNullOrUndefined(items) && !isNullOrUndefined(this.contextmenuModule.contextMenu)) {
8755
+ if (!isNullOrUndefined(items) && !isNullOrUndefined(this.contextmenuModule) && !isNullOrUndefined(this.contextmenuModule.contextMenu)) {
8741
8756
  this.contextmenuModule.disableItem(items);
8742
8757
  }
8743
8758
  };
@@ -11601,7 +11616,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11601
11616
  DetailsView.prototype.removePathColumn = function (isRefresh) {
11602
11617
  var len = this.gridObj.columns.length;
11603
11618
  var columnData = JSON.parse(JSON.stringify(this.gridObj.columns));
11604
- if (columnData[len - 1].field && (columnData[len - 1].field === 'filterPath')) {
11619
+ var filterPathInSettings = this.parent.detailsViewSettings.columns.some(function (col) { return col.field === 'filterPath'; });
11620
+ if (columnData[len - 1].field && (columnData[len - 1].field === 'filterPath') && !filterPathInSettings) {
11605
11621
  /* istanbul ignore next */
11606
11622
  if (!isNullOrUndefined(this.gridObj.sortSettings.columns[0]) && this.gridObj.sortSettings.columns[0].field === 'filterPath') {
11607
11623
  if (this.parent.sortOrder !== 'None') {