@syncfusion/ej2-filemanager 21.1.35 → 21.1.37

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 : 21.1.35
3
+ * version : 21.1.37
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@18.20.1",
3
+ "_id": "@syncfusion/ej2-filemanager@21.1.35",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-aWF002IK3S7gXmugPv1V7vnx88KCzVk1ndOj7yJyj8cu11Q/4Lk4B8azq2R8+1Mlyra1qHCFRFoS+RB38D6oIg==",
5
+ "_integrity": "sha512-b8o3DLdPrFmsp2eE1LBmHWO/D3qousnaq+rQHbMtWK3naYPMhtJ0q6CfnUgWDaz3nhpFdwt9M6NTwII8fy5xIQ==",
6
6
  "_location": "/@syncfusion/ej2-filemanager",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -25,8 +25,8 @@
25
25
  "/@syncfusion/ej2-richtexteditor",
26
26
  "/@syncfusion/ej2-vue-filemanager"
27
27
  ],
28
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-filemanager/-/ej2-filemanager-18.20.1.tgz",
29
- "_shasum": "6115759f03937e73d38d4967b9e9ce8507850442",
28
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-21.1.35.tgz",
29
+ "_shasum": "9d1b9e84738e6bac0e265695df0c843f4937e01c",
30
30
  "_spec": "@syncfusion/ej2-filemanager@*",
31
31
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
32
32
  "author": {
@@ -37,16 +37,16 @@
37
37
  },
38
38
  "bundleDependencies": false,
39
39
  "dependencies": {
40
- "@syncfusion/ej2-base": "~21.1.35",
41
- "@syncfusion/ej2-buttons": "~21.1.35",
42
- "@syncfusion/ej2-data": "~21.1.35",
43
- "@syncfusion/ej2-grids": "~21.1.35",
44
- "@syncfusion/ej2-inputs": "~21.1.35",
45
- "@syncfusion/ej2-layouts": "~21.1.35",
46
- "@syncfusion/ej2-lists": "~21.1.35",
47
- "@syncfusion/ej2-navigations": "~21.1.35",
48
- "@syncfusion/ej2-popups": "~21.1.35",
49
- "@syncfusion/ej2-splitbuttons": "~21.1.35"
40
+ "@syncfusion/ej2-base": "~21.1.37",
41
+ "@syncfusion/ej2-buttons": "~21.1.37",
42
+ "@syncfusion/ej2-data": "~21.1.37",
43
+ "@syncfusion/ej2-grids": "~21.1.37",
44
+ "@syncfusion/ej2-inputs": "~21.1.37",
45
+ "@syncfusion/ej2-layouts": "~21.1.37",
46
+ "@syncfusion/ej2-lists": "~21.1.37",
47
+ "@syncfusion/ej2-navigations": "~21.1.37",
48
+ "@syncfusion/ej2-popups": "~21.1.37",
49
+ "@syncfusion/ej2-splitbuttons": "~21.1.37"
50
50
  },
51
51
  "deprecated": false,
52
52
  "description": "Essential JS 2 FileManager Component",
@@ -76,6 +76,6 @@
76
76
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
77
77
  },
78
78
  "typings": "index.d.ts",
79
- "version": "21.1.35",
79
+ "version": "21.1.37",
80
80
  "sideEffects": false
81
81
  }
@@ -20,6 +20,7 @@ export declare class NavigationPane {
20
20
  private isPathDragged;
21
21
  private isRenameParent;
22
22
  private isRightClick;
23
+ private isSameNodeClicked;
23
24
  private renameParent;
24
25
  private previousSelected;
25
26
  private isNodeClickCalled;
@@ -29,6 +29,7 @@ var NavigationPane = /** @class */ (function () {
29
29
  this.isPathDragged = false;
30
30
  this.isRenameParent = false;
31
31
  this.isRightClick = false;
32
+ this.isSameNodeClicked = false;
32
33
  this.renameParent = null;
33
34
  // Specifies the previously selected nodes in the treeview control.
34
35
  this.previousSelected = null;
@@ -184,7 +185,7 @@ var NavigationPane = /** @class */ (function () {
184
185
  };
185
186
  // Node Selecting event handler
186
187
  NavigationPane.prototype.onNodeSelecting = function (args) {
187
- if (!args.isInteracted && !this.isRightClick && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
188
+ if (!args.isInteracted && !this.isRightClick && !this.isSameNodeClicked && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
188
189
  this.restrictSelecting = false;
189
190
  this.isNodeClickCalled = false;
190
191
  return;
@@ -193,18 +194,29 @@ var NavigationPane = /** @class */ (function () {
193
194
  this.parent.activeModule = 'navigationpane';
194
195
  // eslint-disable-next-line
195
196
  var nodeData = this.getTreeData(getValue('id', args.nodeData));
196
- var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
197
- this.parent.trigger('fileOpen', eventArgs);
198
- var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
199
- this.parent.trigger('fileSelect', selecEventArgs);
200
- args.cancel = eventArgs.cancel;
201
- if (args.cancel) {
202
- this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] !== args.node.getAttribute('data-uid') : false;
203
- this.previousSelected = this.treeObj.selectedNodes;
204
- this.treeObj.selectedNodes = [args.node.getAttribute("data-uid")];
205
- if (!isNOU(this.parent) && !isNOU(this.parent.contextmenuModule)) {
206
- this.parent.contextmenuModule.contextMenu.enableItems(['Open'], true);
197
+ if (args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1] && !this.isRightClick && !this.isNodeClickCalled || this.isSameNodeClicked) {
198
+ this.isNodeClickCalled = false;
199
+ if (!this.isSameNodeClicked) {
200
+ this.isSameNodeClicked = true;
201
+ var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
202
+ this.parent.trigger('fileSelect', selecEventArgs);
207
203
  }
204
+ if (!this.isRightClick) {
205
+ var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
206
+ this.parent.trigger('fileOpen', eventArgs);
207
+ args.cancel = eventArgs.cancel;
208
+ }
209
+ if (args.cancel) {
210
+ this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] !== args.node.getAttribute('data-uid') : false;
211
+ this.isNodeClickCalled = true;
212
+ this.isSameNodeClicked = false;
213
+ this.previousSelected = this.treeObj.selectedNodes;
214
+ this.treeObj.selectedNodes = [args.node.getAttribute("data-uid")];
215
+ }
216
+ }
217
+ else if (this.previousSelected[0] !== args.node.getAttribute('data-uid')) {
218
+ var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
219
+ this.parent.trigger('fileSelect', selecEventArgs);
208
220
  }
209
221
  }
210
222
  };
@@ -216,19 +228,25 @@ var NavigationPane = /** @class */ (function () {
216
228
  this.parent.itemData = data;
217
229
  this.activeNode = node;
218
230
  this.parent.activeModule = 'navigationpane';
219
- updatePath(node, this.parent.itemData[0], this.parent);
220
- read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
221
- this.parent.visitedItem = node;
222
- this.isPathDragged = this.isRenameParent = this.isRightClick = false;
223
- this.treeObj.selectedNodes = [node.getAttribute('data-uid')];
231
+ var eventArgs = { cancel: false, fileDetails: data[0], module: 'NavigationPane' };
232
+ this.parent.trigger('fileOpen', eventArgs);
233
+ this.isNodeClickCalled = true;
234
+ if (!eventArgs.cancel) {
235
+ updatePath(node, this.parent.itemData[0], this.parent);
236
+ read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
237
+ this.parent.visitedItem = node;
238
+ this.isPathDragged = this.isRenameParent = this.isRightClick = false;
239
+ this.treeObj.selectedNodes = [node.getAttribute('data-uid')];
240
+ }
224
241
  };
225
242
  NavigationPane.prototype.onNodeSelected = function (args) {
226
243
  if (this.parent.breadcrumbbarModule && this.parent.breadcrumbbarModule.searchObj && !this.renameParent) {
227
244
  this.parent.breadcrumbbarModule.searchObj.element.value = '';
228
245
  this.parent.isFiltered = false;
246
+ this.isNodeClickCalled = false;
229
247
  }
230
248
  this.parent.searchedItems = [];
231
- if (!args.isInteracted && !this.isRightClick && !this.isPathDragged && !this.isRenameParent) {
249
+ if (!args.isInteracted && !this.isRightClick && !this.isSameNodeClicked && !this.isPathDragged && !this.isRenameParent) {
232
250
  this.parent.pathId = getPathId(args.node);
233
251
  return;
234
252
  }
@@ -239,7 +257,8 @@ var NavigationPane = /** @class */ (function () {
239
257
  this.parent.selectedItems = [];
240
258
  this.parent.itemData = nodeData;
241
259
  var previousPath = this.parent.path;
242
- if (!this.isRightClick) {
260
+ var sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
261
+ if (!this.isRightClick && this.isSameNodeClicked && sNode.querySelector('.e-list-text').innerHTML !== this.parent.pathNames[this.parent.pathNames.length - 1]) {
243
262
  updatePath(args.node, this.parent.itemData[0], this.parent);
244
263
  }
245
264
  else {
@@ -251,12 +270,13 @@ var NavigationPane = /** @class */ (function () {
251
270
  if (args.node.querySelector('.' + CLS.ICONS) && args.node.querySelector('.' + CLS.LIST_ITEM) === null) {
252
271
  this.expandNodeTarget = 'add';
253
272
  }
254
- if (!this.isRightClick) {
273
+ if (!this.isRightClick && this.isSameNodeClicked) {
255
274
  read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
275
+ this.isNodeClickCalled = true;
256
276
  }
257
277
  this.parent.visitedItem = args.node;
258
278
  }
259
- this.isPathDragged = this.isRenameParent = this.isRightClick = false;
279
+ this.isPathDragged = this.isRenameParent = this.isRightClick = this.isSameNodeClicked = false;
260
280
  };
261
281
  /* istanbul ignore next */
262
282
  // eslint-disable-next-line
@@ -300,6 +320,14 @@ var NavigationPane = /** @class */ (function () {
300
320
  var layout = (this.parent.view === 'LargeIcons') ? 'largeiconsview' : 'detailsview';
301
321
  this.parent.notify(events.modelChanged, { module: layout, newProp: { selectedItems: [] } });
302
322
  }
323
+ else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && !this.isNodeClickCalled) {
324
+ if (args.event.which === 3) {
325
+ this.isRightClick = true;
326
+ }
327
+ this.isSameNodeClicked = true;
328
+ this.isNodeClickCalled = true;
329
+ this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
330
+ }
303
331
  };
304
332
  /* istanbul ignore next */
305
333
  NavigationPane.prototype.onNodeEditing = function (args) {
@@ -243,10 +243,11 @@ var ContextMenu = /** @class */ (function () {
243
243
  this.menuType = 'folder';
244
244
  this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.folder.map(function (item) { return item.trim(); }));
245
245
  this.contextMenu.dataBind();
246
- if (isTree) {
246
+ var selectedTreeNode = select('[data-uid="' + this.parent.navigationpaneModule.treeObj.selectedNodes[0] + '"]', this.parent.navigationpaneModule.treeObj.element);
247
+ if (this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
247
248
  this.disabledItems.push('Open');
248
249
  }
249
- else if (this.parent.selectedItems.length !== 1) {
250
+ else if (this.parent.selectedItems.length !== 1 && this.parent.activeModule !== 'navigationpane') {
250
251
  this.disabledItems.push('Rename', 'Paste');
251
252
  }
252
253
  };
@@ -390,10 +391,13 @@ var ContextMenu = /** @class */ (function () {
390
391
  refresh(_this.parent);
391
392
  break;
392
393
  case 'open':
393
- if (_this.parent.visitedItem) {
394
+ if (_this.parent.visitedItem && _this.parent.activeModule !== 'navigationpane') {
394
395
  _this.parent.notify(events.openInit, { target: _this.parent.visitedItem });
395
396
  }
396
397
  else if (_this.parent.activeModule === 'navigationpane') {
398
+ if (_this.parent.visitedItem) {
399
+ _this.parent.notify(events.openInit, { target: _this.parent.visitedItem });
400
+ }
397
401
  _this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
398
402
  }
399
403
  break;