@syncfusion/ej2-filemanager 21.1.37 → 21.1.39

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.39
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.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-b8o3DLdPrFmsp2eE1LBmHWO/D3qousnaq+rQHbMtWK3naYPMhtJ0q6CfnUgWDaz3nhpFdwt9M6NTwII8fy5xIQ==",
5
+ "_integrity": "sha512-qIZ+ACsxbmH7pk4hUbOjqSBaa2pTpdhknvGSIXfsyVXA5S5wgWACAGQqyUu52UEHDgNuM3cDpVjAiHeHY8nBJw==",
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.37.tgz",
29
+ "_shasum": "e9ac521b654f440cfe8dc0b83e465cc564bf44b3",
30
30
  "_spec": "@syncfusion/ej2-filemanager@*",
31
31
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
32
32
  "author": {
@@ -37,14 +37,14 @@
37
37
  },
38
38
  "bundleDependencies": false,
39
39
  "dependencies": {
40
- "@syncfusion/ej2-base": "~21.1.37",
40
+ "@syncfusion/ej2-base": "~21.1.39",
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.39",
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",
46
+ "@syncfusion/ej2-lists": "~21.1.39",
47
+ "@syncfusion/ej2-navigations": "~21.1.39",
48
48
  "@syncfusion/ej2-popups": "~21.1.37",
49
49
  "@syncfusion/ej2-splitbuttons": "~21.1.37"
50
50
  },
@@ -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.39",
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';
@@ -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);