@syncfusion/ej2-filemanager 25.1.38 → 25.1.40

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 25.1.38
3
+ * version : 25.1.40
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-filemanager@*",
3
- "_id": "@syncfusion/ej2-filemanager@25.1.37",
3
+ "_id": "@syncfusion/ej2-filemanager@25.1.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-E1C2uMBrLbHmWH7u6iECQldBwNpGb9Y/bbviwBWKb9VCw3lZzpTQCJ3rYq3Ek5iLJrvTYQ59AonoF/F3RAdSMA==",
5
+ "_integrity": "sha512-Z6BdQySKrjaUSHIaVXQ5wz3K1cgT3KIp8r0ObtWYRgszZjseC4kesoRPZ+4qyGiyPrn4jWB/fD/mTanU8WUDMw==",
6
6
  "_location": "/@syncfusion/ej2-filemanager",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-richtexteditor",
25
25
  "/@syncfusion/ej2-vue-filemanager"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-25.1.37.tgz",
28
- "_shasum": "cf782a89b485d61d55101285fe5e01c7b2e094a0",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-25.1.39.tgz",
28
+ "_shasum": "d972e0f5d37560d0529f8bc4a1bf8234a8263cfc",
29
29
  "_spec": "@syncfusion/ej2-filemanager@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
31
31
  "author": {
@@ -37,14 +37,14 @@
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
39
  "@syncfusion/ej2-base": "~25.1.35",
40
- "@syncfusion/ej2-buttons": "~25.1.35",
40
+ "@syncfusion/ej2-buttons": "~25.1.39",
41
41
  "@syncfusion/ej2-data": "~25.1.35",
42
- "@syncfusion/ej2-grids": "~25.1.38",
43
- "@syncfusion/ej2-inputs": "~25.1.38",
42
+ "@syncfusion/ej2-grids": "~25.1.40",
43
+ "@syncfusion/ej2-inputs": "~25.1.40",
44
44
  "@syncfusion/ej2-layouts": "~25.1.37",
45
- "@syncfusion/ej2-lists": "~25.1.35",
46
- "@syncfusion/ej2-navigations": "~25.1.38",
47
- "@syncfusion/ej2-popups": "~25.1.38",
45
+ "@syncfusion/ej2-lists": "~25.1.39",
46
+ "@syncfusion/ej2-navigations": "~25.1.40",
47
+ "@syncfusion/ej2-popups": "~25.1.39",
48
48
  "@syncfusion/ej2-splitbuttons": "~25.1.38"
49
49
  },
50
50
  "deprecated": false,
@@ -75,6 +75,6 @@
75
75
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
76
76
  },
77
77
  "typings": "index.d.ts",
78
- "version": "25.1.38",
78
+ "version": "25.1.40",
79
79
  "sideEffects": false
80
80
  }
@@ -66,8 +66,8 @@ export function updatePath(node, data, instance) {
66
66
  */
67
67
  export function getPath(element, text, hasId) {
68
68
  var matched = getParents(element, text, false, hasId);
69
- var path = hasId ? '' : '/';
70
- var len = matched.length - (hasId ? 1 : 2);
69
+ var path = '/';
70
+ var len = matched.length - (2);
71
71
  for (var i = len; i >= 0; i--) {
72
72
  path += matched[i] + '/';
73
73
  }
@@ -139,8 +139,8 @@ export function getParents(element, text, isId, hasId) {
139
139
  */
140
140
  export function generatePath(parent) {
141
141
  var key = parent.hasId ? 'id' : 'name';
142
- var newPath = parent.hasId ? '' : '/';
143
- var i = parent.hasId ? 0 : 1;
142
+ var newPath = '/';
143
+ var i = 1;
144
144
  for (i; i < parent.pathId.length; i++) {
145
145
  // eslint-disable-next-line
146
146
  var data = getValue(parent.pathId[i], parent.feParent);
@@ -808,11 +808,16 @@ export function setNextPath(parent, path) {
808
808
  var newPath = (folders[i] === '') ? '/' : (parent.path + folders[i] + '/');
809
809
  // eslint-disable-next-line
810
810
  var data = getObject(parent, key, folders[i]);
811
- var id = getValue('_fm_id', data);
812
- parent.setProperties({ path: newPath }, true);
813
- parent.pathId.push(id);
814
- parent.itemData = [data];
815
- parent.pathNames.push(getValue('name', data));
811
+ if (!isNullOrUndefined(data)) {
812
+ var id = getValue('_fm_id', data);
813
+ parent.setProperties({ path: newPath }, true);
814
+ parent.pathId.push(id);
815
+ parent.itemData = [data];
816
+ parent.pathNames.push(getValue('name', data));
817
+ }
818
+ else {
819
+ parent.originalPath = newPath;
820
+ }
816
821
  read(parent, eventName, parent.path);
817
822
  break;
818
823
  }
@@ -82,7 +82,6 @@ var ContextMenu = /** @class */ (function () {
82
82
  /* istanbul ignore next */
83
83
  ContextMenu.prototype.onBeforeOpen = function (args) {
84
84
  var _this = this;
85
- this.disabledItems = [];
86
85
  var selected = false;
87
86
  var uid;
88
87
  // eslint-disable-next-line
@@ -174,7 +173,15 @@ var ContextMenu = /** @class */ (function () {
174
173
  var pasteEle = select('#' + this.getMenuId('Paste'), this.contextMenu.element);
175
174
  if (!args.cancel && !this.parent.enablePaste &&
176
175
  pasteEle && !pasteEle.classList.contains('e-disabled')) {
177
- this.disabledItems.push('Paste');
176
+ if (this.disabledItems.indexOf('Paste') === -1) {
177
+ this.disabledItems.push('Paste');
178
+ }
179
+ }
180
+ else {
181
+ var pasteIndex = this.disabledItems.indexOf('Paste');
182
+ if (pasteIndex !== -1) {
183
+ this.disabledItems.splice(pasteIndex, 1);
184
+ }
178
185
  }
179
186
  if (args.cancel) {
180
187
  this.menuTarget = this.currentElement = null;
@@ -288,7 +295,9 @@ var ContextMenu = /** @class */ (function () {
288
295
  this.disabledItems.push('SelectAll');
289
296
  }
290
297
  if (this.parent.selectedNodes.length === 0) {
291
- this.disabledItems.push('Paste');
298
+ if (this.disabledItems.indexOf('Paste') === -1) {
299
+ this.disabledItems.push('Paste');
300
+ }
292
301
  }
293
302
  this.contextMenu.dataBind();
294
303
  };
@@ -629,7 +638,7 @@ var ContextMenu = /** @class */ (function () {
629
638
  return items;
630
639
  };
631
640
  ContextMenu.prototype.getMenuId = function (id) {
632
- return this.parent.element.id + '_cm_' + id.toLowerCase();
641
+ return this.parent.element.id + '_cm_' + id.split(' ').join('').toLowerCase();
633
642
  };
634
643
  return ContextMenu;
635
644
  }());