@syncfusion/ej2-filemanager 25.1.39 → 25.2.3

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.
@@ -144,7 +144,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
144
144
  */
145
145
  const columnArray = [
146
146
  {
147
- field: 'name', headerText: 'Name', minWidth: 120, isPrimaryKey: true,
147
+ field: 'name', headerText: 'Name', minWidth: 120,
148
148
  template: '<span class=\"e-fe-text\">${name}</span>',
149
149
  customAttributes: { class: 'e-fe-grid-name' }
150
150
  },
@@ -748,8 +748,8 @@ function updatePath(node, data, instance) {
748
748
  */
749
749
  function getPath(element, text, hasId) {
750
750
  const matched = getParents(element, text, false, hasId);
751
- let path = hasId ? '' : '/';
752
- const len = matched.length - (hasId ? 1 : 2);
751
+ let path = '/';
752
+ const len = matched.length - (2);
753
753
  for (let i = len; i >= 0; i--) {
754
754
  path += matched[i] + '/';
755
755
  }
@@ -821,8 +821,8 @@ function getParents(element, text, isId, hasId) {
821
821
  */
822
822
  function generatePath(parent) {
823
823
  const key = parent.hasId ? 'id' : 'name';
824
- let newPath = parent.hasId ? '' : '/';
825
- let i = parent.hasId ? 0 : 1;
824
+ let newPath = '/';
825
+ let i = 1;
826
826
  for (i; i < parent.pathId.length; i++) {
827
827
  // eslint-disable-next-line
828
828
  const data = getValue(parent.pathId[i], parent.feParent);
@@ -6163,7 +6163,15 @@ class ContextMenu$2 {
6163
6163
  const pasteEle = select('#' + this.getMenuId('Paste'), this.contextMenu.element);
6164
6164
  if (!args.cancel && !this.parent.enablePaste &&
6165
6165
  pasteEle && !pasteEle.classList.contains('e-disabled')) {
6166
- this.disabledItems.push('Paste');
6166
+ if (this.disabledItems.indexOf('Paste') === -1) {
6167
+ this.disabledItems.push('Paste');
6168
+ }
6169
+ }
6170
+ else {
6171
+ const pasteIndex = this.disabledItems.indexOf('Paste');
6172
+ if (pasteIndex !== -1) {
6173
+ this.disabledItems.splice(pasteIndex, 1);
6174
+ }
6167
6175
  }
6168
6176
  if (args.cancel) {
6169
6177
  this.menuTarget = this.currentElement = null;
@@ -6276,8 +6284,13 @@ class ContextMenu$2 {
6276
6284
  (closest(target, '#' + this.parent.element.id + GRID_ID).getElementsByClassName(EMPTY).length !== 0)))) {
6277
6285
  this.disabledItems.push('SelectAll');
6278
6286
  }
6287
+ else {
6288
+ this.disabledItems = this.disabledItems.filter(item => item !== 'SelectAll');
6289
+ }
6279
6290
  if (this.parent.selectedNodes.length === 0) {
6280
- this.disabledItems.push('Paste');
6291
+ if (this.disabledItems.indexOf('Paste') === -1) {
6292
+ this.disabledItems.push('Paste');
6293
+ }
6281
6294
  }
6282
6295
  this.contextMenu.dataBind();
6283
6296
  }
@@ -9825,8 +9838,7 @@ class DetailsView {
9825
9838
  allowResizing: this.parent.detailsViewSettings.columnResizing,
9826
9839
  selectionSettings: {
9827
9840
  type: this.parent.allowMultiSelection ? 'Multiple' : 'Single',
9828
- checkboxMode: 'ResetOnRowClick',
9829
- persistSelection: (this.parent.enableVirtualization) ? true : false
9841
+ checkboxMode: 'ResetOnRowClick'
9830
9842
  },
9831
9843
  enableRtl: this.parent.enableRtl,
9832
9844
  pageSettings: { pageSize: 20 },