@syncfusion/ej2-filemanager 21.1.37 → 21.1.41

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.37
3
+ * version : 21.1.41
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@21.1.35",
3
+ "_id": "@syncfusion/ej2-filemanager@21.1.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-b8o3DLdPrFmsp2eE1LBmHWO/D3qousnaq+rQHbMtWK3naYPMhtJ0q6CfnUgWDaz3nhpFdwt9M6NTwII8fy5xIQ==",
5
+ "_integrity": "sha512-AfUJAG9clB2hStgQ2IUVojPADrEa3e8Jmf+Mlg5+0BCKeCzDmHBBLTQeW0LHP9qhaPqZNevkgUmlluIDlrS+Qw==",
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-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-21.1.35.tgz",
29
- "_shasum": "9d1b9e84738e6bac0e265695df0c843f4937e01c",
28
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-21.1.39.tgz",
29
+ "_shasum": "af6dba133104dd8f57bc190b55d0c55642eab717",
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.37",
40
+ "@syncfusion/ej2-base": "~21.1.40",
41
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",
42
+ "@syncfusion/ej2-data": "~21.1.38",
43
+ "@syncfusion/ej2-grids": "~21.1.41",
44
+ "@syncfusion/ej2-inputs": "~21.1.39",
45
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"
46
+ "@syncfusion/ej2-lists": "~21.1.41",
47
+ "@syncfusion/ej2-navigations": "~21.1.39",
48
+ "@syncfusion/ej2-popups": "~21.1.41",
49
+ "@syncfusion/ej2-splitbuttons": "~21.1.41"
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.37",
79
+ "version": "21.1.41",
80
80
  "sideEffects": false
81
81
  }
@@ -231,7 +231,12 @@ var Toolbar = /** @class */ (function () {
231
231
  items[itemCount].iconCss = this.parent.sortBy === 'size' ? CLS.TB_OPTION_DOT : '';
232
232
  }
233
233
  else if (items[itemCount].id === this.getPupupId('date')) {
234
- items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? CLS.TB_OPTION_DOT : '';
234
+ if (this.parent.sortBy === 'dateModified' || this.parent.sortBy === 'dateCreated') {
235
+ items[itemCount].iconCss = this.parent.sortBy === this.parent.sortBy ? CLS.TB_OPTION_DOT : '';
236
+ }
237
+ else {
238
+ items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? CLS.TB_OPTION_DOT : '';
239
+ }
235
240
  }
236
241
  else if (items[itemCount].id === this.getPupupId('ascending')) {
237
242
  items[itemCount].iconCss = this.parent.sortOrder === 'Ascending' ? CLS.TB_OPTION_TICK : '';
@@ -2,6 +2,7 @@ import { Component, EmitType, L10n } from '@syncfusion/ej2-base';
2
2
  import { Dialog, ButtonPropsModel } from '@syncfusion/ej2-popups';
3
3
  import { FileManagerModel } from '../base/file-manager-model';
4
4
  import { ToolbarSettingsModel, AjaxSettingsModel } from '../models/index';
5
+ import { DetailsViewSettingsModel } from '../models/details-view-settings-model';
5
6
  import { TreeView, ContextMenu, MenuItemModel, ItemModel } from '@syncfusion/ej2-navigations';
6
7
  import { DetailsView } from '../layout/details-view';
7
8
  import { Toolbar } from '../actions/toolbar';
@@ -638,6 +639,7 @@ export interface IFileManager extends Component<HTMLElement> {
638
639
  breadcrumbbarModule: BreadCrumbBar;
639
640
  virtualizationModule: Virtualization;
640
641
  toolbarSelection: boolean;
642
+ detailsViewSettings: DetailsViewSettingsModel;
641
643
  duplicateItems: string[];
642
644
  duplicateRecords: Object[];
643
645
  fileAction: string;
@@ -2,7 +2,7 @@ import { Ajax, createElement, select, extend } from '@syncfusion/ej2-base';
2
2
  import { isNullOrUndefined as isNOU, setValue, getValue } from '@syncfusion/ej2-base';
3
3
  import * as events from '../base/constant';
4
4
  import { createDialog, createExtDialog } from '../pop-up/dialog';
5
- import { fileType, setNodeId, getLocaleText, setDateObject, doPasteUpdate, getParentPath, getPathObject } from '../common/utility';
5
+ import { fileType, setNodeId, getLocaleText, setDateObject, doPasteUpdate, getPathObject } from '../common/utility';
6
6
  import { generatePath } from '../common/utility';
7
7
  /**
8
8
  * Function to read the content from given path in File Manager.
@@ -415,10 +415,15 @@ function renameSuccess(parent, result, path) {
415
415
  var args = { action: 'rename', result: result };
416
416
  parent.trigger('success', args);
417
417
  parent.renamedItem = result.files[0];
418
+ if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
419
+ parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
420
+ }
418
421
  if (parent.activeModule === 'navigationpane') {
419
422
  parent.pathId.pop();
420
423
  parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
421
- read(parent, events.renameEndParent, getParentPath(parent.path));
424
+ read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
425
+ parent.itemData[0] = parent.renamedItem;
426
+ read(parent, events.pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
422
427
  }
423
428
  else {
424
429
  parent.itemData = [getPathObject(parent)];
@@ -293,7 +293,7 @@ export declare function sortbyClickHandler(parent: IFileManager, args: MenuEvent
293
293
  * @returns {string} - returns the sorted fields
294
294
  * @private
295
295
  */
296
- export declare function getSortField(id: string): string;
296
+ export declare function getSortField(id: string, parent?: IFileManager): string;
297
297
  /**
298
298
  * Sets the next path
299
299
  *
@@ -694,7 +694,7 @@ export function sortbyClickHandler(parent, args) {
694
694
  tick = false;
695
695
  }
696
696
  if (!tick) {
697
- parent.sortBy = getSortField(args.item.id);
697
+ parent.sortBy = getSortField(args.item.id, parent);
698
698
  }
699
699
  else {
700
700
  parent.sortOrder = getSortField(args.item.id);
@@ -721,12 +721,24 @@ export function sortbyClickHandler(parent, args) {
721
721
  * @returns {string} - returns the sorted fields
722
722
  * @private
723
723
  */
724
- export function getSortField(id) {
724
+ export function getSortField(id, parent) {
725
725
  var text = id.substring(id.lastIndexOf('_') + 1);
726
726
  var field = text;
727
+ var column;
728
+ if (parent) {
729
+ column = parent.detailsViewSettings.columns;
730
+ }
727
731
  switch (text) {
728
732
  case 'date':
729
- field = '_fm_modified';
733
+ for (var i = 0, len = column.length; i < len; i++) {
734
+ if (column[i].field === 'dateModified' || column[i].field === 'dateCreated') {
735
+ field = column[i].field;
736
+ break;
737
+ }
738
+ else {
739
+ field = '_fm_modified';
740
+ }
741
+ }
730
742
  break;
731
743
  case 'ascending':
732
744
  field = 'Ascending';
@@ -24,6 +24,7 @@ export declare class LargeIconsView {
24
24
  private count;
25
25
  private isRendered;
26
26
  private tapCount;
27
+ private isSelectAllCalled;
27
28
  private tapEvent;
28
29
  private isPasteOperation;
29
30
  private dragObj;
@@ -31,6 +31,7 @@ var LargeIconsView = /** @class */ (function () {
31
31
  this.count = 0;
32
32
  this.isRendered = true;
33
33
  this.tapCount = 0;
34
+ this.isSelectAllCalled = false;
34
35
  this.isPasteOperation = false;
35
36
  this.isInteracted = true;
36
37
  this.parent = parent;
@@ -779,6 +780,9 @@ var LargeIconsView = /** @class */ (function () {
779
780
  && (e.ctrlKey || target.classList.contains(CLS.CHECK))) {
780
781
  action = 'unselect';
781
782
  }
783
+ if (e.ctrlKey && e.shiftKey) {
784
+ this.isSelectAllCalled = true;
785
+ }
782
786
  var fileSelectionArgs = this.triggerSelection(action, item);
783
787
  if (fileSelectionArgs.cancel !== true) {
784
788
  if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !e.ctrlKey)))
@@ -825,9 +829,13 @@ var LargeIconsView = /** @class */ (function () {
825
829
  }
826
830
  }
827
831
  else {
832
+ if (this.parent.selectedItems.length === this.itemList.length) {
833
+ this.isSelectAllCalled = true;
834
+ }
828
835
  this.clearSelection();
829
836
  }
830
837
  if (!isNOU(item)) {
838
+ this.isSelectAllCalled = false;
831
839
  this.updateType(item);
832
840
  }
833
841
  };
@@ -1392,9 +1400,17 @@ var LargeIconsView = /** @class */ (function () {
1392
1400
  };
1393
1401
  LargeIconsView.prototype.triggerSelection = function (action, item) {
1394
1402
  // eslint-disable-next-line
1395
- var data = this.getItemObject(item);
1403
+ var data = [];
1404
+ if (this.isSelectAllCalled) {
1405
+ for (var i = 0, len = this.itemList.length; i < len; i++) {
1406
+ data[i] = this.getItemObject(this.itemList[i]);
1407
+ }
1408
+ }
1409
+ else {
1410
+ data[0] = this.getItemObject(item);
1411
+ }
1396
1412
  var eventArgs = {
1397
- action: action, fileDetails: data, isInteracted: this.isInteraction, cancel: false, target: item
1413
+ action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteraction, cancel: false, target: this.isSelectAllCalled ? null : item
1398
1414
  };
1399
1415
  this.parent.trigger('fileSelection', eventArgs);
1400
1416
  this.isInteraction = true;
@@ -1402,9 +1418,18 @@ var LargeIconsView = /** @class */ (function () {
1402
1418
  };
1403
1419
  LargeIconsView.prototype.triggerSelect = function (action, item) {
1404
1420
  // eslint-disable-next-line
1405
- var data = this.getItemObject(item);
1406
- this.parent.visitedData = data;
1407
- var eventArgs = { action: action, fileDetails: data, isInteracted: this.isInteracted };
1421
+ var data = [];
1422
+ if (this.isSelectAllCalled) {
1423
+ for (var i = 0, len = this.itemList.length; i < len; i++) {
1424
+ data[i] = this.getItemObject(this.itemList[i]);
1425
+ }
1426
+ this.isSelectAllCalled = false;
1427
+ }
1428
+ else {
1429
+ data[0] = this.getItemObject(item);
1430
+ }
1431
+ this.parent.visitedData = data.length > 1 ? data[data.length - 1] : data[0];
1432
+ var eventArgs = { action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteracted };
1408
1433
  this.parent.trigger('fileSelect', eventArgs);
1409
1434
  this.isInteracted = true;
1410
1435
  };
@@ -21,6 +21,7 @@ export declare class NavigationPane {
21
21
  private isRenameParent;
22
22
  private isRightClick;
23
23
  private isSameNodeClicked;
24
+ private isNodeExpandCalled;
24
25
  private renameParent;
25
26
  private previousSelected;
26
27
  private isNodeClickCalled;
@@ -30,6 +30,7 @@ var NavigationPane = /** @class */ (function () {
30
30
  this.isRenameParent = false;
31
31
  this.isRightClick = false;
32
32
  this.isSameNodeClicked = false;
33
+ this.isNodeExpandCalled = false;
33
34
  this.renameParent = null;
34
35
  // Specifies the previously selected nodes in the treeview control.
35
36
  this.previousSelected = null;
@@ -201,7 +202,7 @@ var NavigationPane = /** @class */ (function () {
201
202
  var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
202
203
  this.parent.trigger('fileSelect', selecEventArgs);
203
204
  }
204
- if (!this.isRightClick) {
205
+ if (!this.isRightClick && args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1]) {
205
206
  var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
206
207
  this.parent.trigger('fileOpen', eventArgs);
207
208
  args.cancel = eventArgs.cancel;
@@ -299,12 +300,14 @@ var NavigationPane = /** @class */ (function () {
299
300
  this.parent.expandedId = this.expandNodeTarget;
300
301
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
301
302
  read(this.parent, events.nodeExpand, path);
303
+ this.isNodeExpandCalled = true;
302
304
  }
303
305
  };
304
306
  /* istanbul ignore next */
305
307
  NavigationPane.prototype.onNodeExpanded = function (args) {
306
308
  this.addChild(args.files, this.expandNodeTarget, false);
307
309
  this.parent.expandedId = null;
310
+ this.isNodeExpandCalled = false;
308
311
  };
309
312
  NavigationPane.prototype.onNodeClicked = function (args) {
310
313
  this.parent.activeModule = 'navigationpane';
@@ -320,7 +323,7 @@ var NavigationPane = /** @class */ (function () {
320
323
  var layout = (this.parent.view === 'LargeIcons') ? 'largeiconsview' : 'detailsview';
321
324
  this.parent.notify(events.modelChanged, { module: layout, newProp: { selectedItems: [] } });
322
325
  }
323
- else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && !this.isNodeClickCalled) {
326
+ else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && !this.isNodeClickCalled && !this.isNodeExpandCalled) {
324
327
  if (args.event.which === 3) {
325
328
  this.isRightClick = true;
326
329
  }
@@ -5,7 +5,7 @@ import { createFolder } from '../common/operations';
5
5
  import * as CLS from '../base/classes';
6
6
  import * as events from '../base/constant';
7
7
  import { paste, rename } from '../common/operations';
8
- import { getLocaleText, getDuplicateData, getParentPath, objectToString, getCssClass } from '../common/utility';
8
+ import { getLocaleText, getDuplicateData, objectToString, getCssClass } from '../common/utility';
9
9
  import { Input } from '@syncfusion/ej2-inputs';
10
10
  import { CheckBox } from '@syncfusion/ej2-buttons';
11
11
  // eslint:disable-next-line
@@ -840,7 +840,8 @@ function onReSubmit(parent) {
840
840
  parent.dialogObj.hide();
841
841
  return;
842
842
  }
843
- var newPath = (parent.activeModule === 'navigationpane') ? getParentPath(parent.path) : parent.path;
843
+ var newPath = (parent.activeModule === 'navigationpane') ? getValue('filterPath', parent.itemData[0]).replace(/\\/g, '/') : parent.path;
844
+ parent.renamedId = getValue('id', parent.itemData[0]);
844
845
  parent.renamedId = getValue('id', parent.itemData[0]);
845
846
  if (parent.isFile) {
846
847
  var oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);