@syncfusion/ej2-filemanager 26.2.11 → 27.1.48

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.
Files changed (156) hide show
  1. package/.eslintrc.json +2 -4
  2. package/dist/ej2-filemanager.min.js +2 -2
  3. package/dist/ej2-filemanager.umd.min.js +2 -2
  4. package/dist/ej2-filemanager.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-filemanager.es2015.js +164 -20
  6. package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
  7. package/dist/es6/ej2-filemanager.es5.js +165 -20
  8. package/dist/es6/ej2-filemanager.es5.js.map +1 -1
  9. package/dist/global/ej2-filemanager.min.js +2 -2
  10. package/dist/global/ej2-filemanager.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +16 -16
  13. package/src/file-manager/base/file-manager-model.d.ts +10 -1
  14. package/src/file-manager/base/file-manager.d.ts +25 -0
  15. package/src/file-manager/base/file-manager.js +145 -1
  16. package/src/file-manager/base/interface.d.ts +1 -0
  17. package/src/file-manager/common/operations.js +1 -0
  18. package/src/file-manager/layout/details-view.js +11 -2
  19. package/src/file-manager/layout/large-icons-view.d.ts +0 -1
  20. package/src/file-manager/layout/large-icons-view.js +5 -17
  21. package/src/file-manager/pop-up/context-menu.js +4 -1
  22. package/styles/bootstrap-dark-lite.css +1058 -0
  23. package/styles/bootstrap-dark-lite.scss +16 -0
  24. package/styles/bootstrap-dark.css +201 -161
  25. package/styles/bootstrap-dark.scss +1 -0
  26. package/styles/bootstrap-lite.css +1040 -0
  27. package/styles/bootstrap-lite.scss +16 -0
  28. package/styles/bootstrap.css +183 -143
  29. package/styles/bootstrap.scss +1 -0
  30. package/styles/bootstrap4-lite.css +1068 -0
  31. package/styles/bootstrap4-lite.scss +16 -0
  32. package/styles/bootstrap4.css +211 -171
  33. package/styles/bootstrap4.scss +1 -0
  34. package/styles/bootstrap5-dark-lite.css +1078 -0
  35. package/styles/bootstrap5-dark-lite.scss +16 -0
  36. package/styles/bootstrap5-dark.css +220 -186
  37. package/styles/bootstrap5-dark.scss +1 -0
  38. package/styles/bootstrap5-lite.css +1078 -0
  39. package/styles/bootstrap5-lite.scss +16 -0
  40. package/styles/bootstrap5.3-lite.css +1035 -0
  41. package/styles/bootstrap5.3-lite.scss +16 -0
  42. package/styles/bootstrap5.3.css +1603 -0
  43. package/styles/bootstrap5.3.scss +17 -0
  44. package/styles/bootstrap5.css +220 -186
  45. package/styles/bootstrap5.scss +1 -0
  46. package/styles/fabric-dark-lite.css +1039 -0
  47. package/styles/fabric-dark-lite.scss +16 -0
  48. package/styles/fabric-dark.css +184 -144
  49. package/styles/fabric-dark.scss +1 -0
  50. package/styles/fabric-lite.css +1039 -0
  51. package/styles/fabric-lite.scss +16 -0
  52. package/styles/fabric.css +183 -143
  53. package/styles/fabric.scss +1 -0
  54. package/styles/file-manager/_bds-definition.scss +2 -0
  55. package/styles/file-manager/_bigger.scss +758 -0
  56. package/styles/file-manager/_bootstrap-dark-definition.scss +2 -0
  57. package/styles/file-manager/_bootstrap-definition.scss +2 -0
  58. package/styles/file-manager/_bootstrap4-definition.scss +2 -0
  59. package/styles/file-manager/_bootstrap5-definition.scss +2 -0
  60. package/styles/file-manager/_bootstrap5.3-definition.scss +22 -20
  61. package/styles/file-manager/_fabric-dark-definition.scss +2 -0
  62. package/styles/file-manager/_fabric-definition.scss +2 -0
  63. package/styles/file-manager/_fluent-definition.scss +2 -0
  64. package/styles/file-manager/_fluent2-definition.scss +15 -9
  65. package/styles/file-manager/_fusionnew-definition.scss +2 -0
  66. package/styles/file-manager/_highcontrast-definition.scss +2 -0
  67. package/styles/file-manager/_highcontrast-light-definition.scss +2 -0
  68. package/styles/file-manager/_layout.scss +45 -663
  69. package/styles/file-manager/_material-dark-definition.scss +2 -0
  70. package/styles/file-manager/_material-definition.scss +2 -0
  71. package/styles/file-manager/_material3-definition.scss +2 -0
  72. package/styles/file-manager/_tailwind-definition.scss +2 -0
  73. package/styles/file-manager/_theme.scss +38 -7
  74. package/styles/file-manager/bootstrap-dark.css +201 -161
  75. package/styles/file-manager/bootstrap-dark.scss +1 -0
  76. package/styles/file-manager/bootstrap.css +183 -143
  77. package/styles/file-manager/bootstrap.scss +1 -0
  78. package/styles/file-manager/bootstrap4.css +211 -171
  79. package/styles/file-manager/bootstrap4.scss +1 -0
  80. package/styles/file-manager/bootstrap5-dark.css +220 -186
  81. package/styles/file-manager/bootstrap5-dark.scss +1 -0
  82. package/styles/file-manager/bootstrap5.3.css +1603 -0
  83. package/styles/file-manager/bootstrap5.3.scss +17 -0
  84. package/styles/file-manager/bootstrap5.css +220 -186
  85. package/styles/file-manager/bootstrap5.scss +1 -0
  86. package/styles/file-manager/fabric-dark.css +184 -144
  87. package/styles/file-manager/fabric-dark.scss +1 -0
  88. package/styles/file-manager/fabric.css +183 -143
  89. package/styles/file-manager/fabric.scss +1 -0
  90. package/styles/file-manager/fluent-dark.css +187 -147
  91. package/styles/file-manager/fluent-dark.scss +1 -0
  92. package/styles/file-manager/fluent.css +186 -146
  93. package/styles/file-manager/fluent.scss +1 -0
  94. package/styles/file-manager/fluent2.css +204 -158
  95. package/styles/file-manager/fluent2.scss +1 -0
  96. package/styles/file-manager/highcontrast-light.css +184 -144
  97. package/styles/file-manager/highcontrast-light.scss +1 -0
  98. package/styles/file-manager/highcontrast.css +207 -167
  99. package/styles/file-manager/highcontrast.scss +1 -0
  100. package/styles/file-manager/material-dark.css +198 -158
  101. package/styles/file-manager/material-dark.scss +1 -0
  102. package/styles/file-manager/material.css +183 -143
  103. package/styles/file-manager/material.scss +1 -0
  104. package/styles/file-manager/material3-dark.css +185 -145
  105. package/styles/file-manager/material3-dark.scss +1 -0
  106. package/styles/file-manager/material3.css +185 -145
  107. package/styles/file-manager/material3.scss +1 -0
  108. package/styles/file-manager/tailwind-dark.css +198 -164
  109. package/styles/file-manager/tailwind-dark.scss +1 -0
  110. package/styles/file-manager/tailwind.css +198 -164
  111. package/styles/file-manager/tailwind.scss +1 -0
  112. package/styles/fluent-dark-lite.css +1037 -0
  113. package/styles/fluent-dark-lite.scss +16 -0
  114. package/styles/fluent-dark.css +187 -147
  115. package/styles/fluent-dark.scss +1 -0
  116. package/styles/fluent-lite.css +1036 -0
  117. package/styles/fluent-lite.scss +16 -0
  118. package/styles/fluent.css +186 -146
  119. package/styles/fluent.scss +1 -0
  120. package/styles/fluent2-lite.css +1272 -0
  121. package/styles/fluent2-lite.scss +16 -0
  122. package/styles/fluent2.css +204 -158
  123. package/styles/fluent2.scss +1 -0
  124. package/styles/highcontrast-light-lite.css +1039 -0
  125. package/styles/highcontrast-light-lite.scss +16 -0
  126. package/styles/highcontrast-light.css +184 -144
  127. package/styles/highcontrast-light.scss +1 -0
  128. package/styles/highcontrast-lite.css +1059 -0
  129. package/styles/highcontrast-lite.scss +16 -0
  130. package/styles/highcontrast.css +207 -167
  131. package/styles/highcontrast.scss +1 -0
  132. package/styles/material-dark-lite.css +1092 -0
  133. package/styles/material-dark-lite.scss +16 -0
  134. package/styles/material-dark.css +198 -158
  135. package/styles/material-dark.scss +1 -0
  136. package/styles/material-lite.css +1097 -0
  137. package/styles/material-lite.scss +16 -0
  138. package/styles/material.css +183 -143
  139. package/styles/material.scss +1 -0
  140. package/styles/material3-dark-lite.css +1090 -0
  141. package/styles/material3-dark-lite.scss +16 -0
  142. package/styles/material3-dark.css +185 -145
  143. package/styles/material3-dark.scss +1 -0
  144. package/styles/material3-lite.css +1092 -0
  145. package/styles/material3-lite.scss +16 -0
  146. package/styles/material3.css +185 -145
  147. package/styles/material3.scss +1 -0
  148. package/styles/tailwind-dark-lite.css +1060 -0
  149. package/styles/tailwind-dark-lite.scss +16 -0
  150. package/styles/tailwind-dark.css +198 -164
  151. package/styles/tailwind-dark.scss +1 -0
  152. package/styles/tailwind-lite.css +1060 -0
  153. package/styles/tailwind-lite.scss +16 -0
  154. package/styles/tailwind.css +198 -164
  155. package/styles/tailwind.scss +1 -0
  156. package/tslint.json +0 -111
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.2.11
3
+ * version : 27.1.48
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@26.2.10",
3
+ "_id": "@syncfusion/ej2-filemanager@18.28.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-oiNkHvO8aEgTFU9PVi+t/aw3isJHPEDUoClk68yJ0zSfEnv6tawYHEAVYfQItpmRGvEGLI43gLdn6ePdoeSdiA==",
5
+ "_integrity": "sha512-opby/2n/6yJA4+14V/syjuS4wTJVti6Up4krWzctYlPcbQk7GuKiJuQlveSIbLKjk4I6ERRfHBAxnZiNKdkqZQ==",
6
6
  "_location": "/@syncfusion/ej2-filemanager",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,10 +24,10 @@
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-26.2.10.tgz",
28
- "_shasum": "304c8eee30929973f64d0924c1f8bb67ba8b5db9",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-filemanager/-/ej2-filemanager-18.28.1.tgz",
28
+ "_shasum": "0fb6ec0705a6e57f523e448c4e28626ae7d3d8b7",
29
29
  "_spec": "@syncfusion/ej2-filemanager@*",
30
- "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
30
+ "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
31
31
  "author": {
32
32
  "name": "Syncfusion Inc."
33
33
  },
@@ -36,16 +36,16 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~26.2.10",
40
- "@syncfusion/ej2-buttons": "~26.2.10",
41
- "@syncfusion/ej2-data": "~26.2.10",
42
- "@syncfusion/ej2-grids": "~26.2.11",
43
- "@syncfusion/ej2-inputs": "~26.2.11",
44
- "@syncfusion/ej2-layouts": "~26.2.10",
45
- "@syncfusion/ej2-lists": "~26.2.11",
46
- "@syncfusion/ej2-navigations": "~26.2.11",
47
- "@syncfusion/ej2-popups": "~26.2.11",
48
- "@syncfusion/ej2-splitbuttons": "~26.2.10"
39
+ "@syncfusion/ej2-base": "~27.1.48",
40
+ "@syncfusion/ej2-buttons": "~27.1.48",
41
+ "@syncfusion/ej2-data": "~27.1.48",
42
+ "@syncfusion/ej2-grids": "~27.1.48",
43
+ "@syncfusion/ej2-inputs": "~27.1.48",
44
+ "@syncfusion/ej2-layouts": "~27.1.48",
45
+ "@syncfusion/ej2-lists": "~27.1.48",
46
+ "@syncfusion/ej2-navigations": "~27.1.48",
47
+ "@syncfusion/ej2-popups": "~27.1.48",
48
+ "@syncfusion/ej2-splitbuttons": "~27.1.48"
49
49
  },
50
50
  "deprecated": false,
51
51
  "description": "Essential JS 2 FileManager Component",
@@ -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": "26.2.11",
78
+ "version": "27.1.48",
79
79
  "sideEffects": false
80
80
  }
@@ -1,4 +1,4 @@
1
- import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest, Collection } from '@syncfusion/ej2-base';import { Property, INotifyPropertyChanged, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Event, EventHandler, getValue, setValue } from '@syncfusion/ej2-base';import { Splitter, PanePropertiesModel } from '@syncfusion/ej2-layouts';import { Dialog, createSpinner, hideSpinner, showSpinner, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import { createDialog, createExtDialog } from '../pop-up/dialog';import { ToolbarSettings, ToolbarSettingsModel, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';import { ToolbarItem, ToolbarItemModel } from'../models/index' ;import { NavigationPaneSettingsModel, DetailsViewSettingsModel } from '../models/index';import { AjaxSettingsModel, SearchSettings, SearchSettingsModel } from '../models/index';import { Toolbar } from '../actions/toolbar';import { DetailsView } from '../layout/details-view';import { LargeIconsView } from '../layout/large-icons-view';import { Uploader, UploadingEventArgs, SelectedEventArgs, FileInfo, CancelEventArgs } from '@syncfusion/ej2-inputs';import { UploadSettingsModel } from '../models/upload-settings-model';import { UploadSettings } from '../models/upload-settings';import * as events from './constant';import * as CLS from './classes';import { read, filter, createFolder } from '../common/operations';import { ITreeView, IContextMenu, ViewType, SortOrder, FileDragEventArgs, RetryArgs, ReadArgs, FileSelectionEventArgs } from './interface';import { BeforeSendEventArgs, SuccessEventArgs, FailureEventArgs, FileLoadEventArgs, FolderCreateEventArgs, DeleteEventArgs, RenameEventArgs, MoveEventArgs, SearchEventArgs } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs, MenuCloseEventArgs } from './interface';import { ToolbarClickEventArgs, ToolbarCreateEventArgs, UploadListCreateArgs } from './interface';import { PopupOpenCloseEventArgs, BeforePopupOpenCloseEventArgs, BeforeDownloadEventArgs, BeforeImageLoadEventArgs } from './interface';import { refresh, getPathObject, getLocaleText, setNextPath, createDeniedDialog, getCssClass } from '../common/utility';import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem, closePopup } from '../common/utility';import { TreeView as BaseTreeView } from '@syncfusion/ej2-navigations';import { ContextMenuSettingsModel } from '../models/contextMenu-settings-model';import { ContextMenuSettings } from '../models/contextMenu-settings';import { BreadCrumbBar } from '../actions/breadcrumb-bar';import { ContextMenu } from '../pop-up/context-menu';import { defaultLocale } from '../models/default-locale';import { PositionModel } from '@syncfusion/ej2-base/src/draggable-model';import { Virtualization } from '../actions/virtualization';import { SortComparer } from './interface';
1
+ import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest, Collection, detach, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';import { Property, INotifyPropertyChanged, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Event, EventHandler, getValue, setValue } from '@syncfusion/ej2-base';import { Splitter, PanePropertiesModel } from '@syncfusion/ej2-layouts';import { Dialog, createSpinner, hideSpinner, showSpinner, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import { createDialog, createExtDialog } from '../pop-up/dialog';import { ToolbarSettings, ToolbarSettingsModel, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';import { ToolbarItem, ToolbarItemModel } from'../models/index' ;import { NavigationPaneSettingsModel, DetailsViewSettingsModel } from '../models/index';import { AjaxSettingsModel, SearchSettings, SearchSettingsModel } from '../models/index';import { Toolbar } from '../actions/toolbar';import { DetailsView } from '../layout/details-view';import { LargeIconsView } from '../layout/large-icons-view';import { Uploader, UploadingEventArgs, SelectedEventArgs, FileInfo, CancelEventArgs } from '@syncfusion/ej2-inputs';import { UploadSettingsModel } from '../models/upload-settings-model';import { UploadSettings } from '../models/upload-settings';import * as events from './constant';import * as CLS from './classes';import { read, filter, createFolder } from '../common/operations';import { ITreeView, IContextMenu, ViewType, SortOrder, FileDragEventArgs, RetryArgs, ReadArgs, FileSelectionEventArgs } from './interface';import { BeforeSendEventArgs, SuccessEventArgs, FailureEventArgs, FileLoadEventArgs, FolderCreateEventArgs, DeleteEventArgs, RenameEventArgs, MoveEventArgs, SearchEventArgs } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs, MenuCloseEventArgs } from './interface';import { ToolbarClickEventArgs, ToolbarCreateEventArgs, UploadListCreateArgs } from './interface';import { PopupOpenCloseEventArgs, BeforePopupOpenCloseEventArgs, BeforeDownloadEventArgs, BeforeImageLoadEventArgs } from './interface';import { refresh, getPathObject, getLocaleText, setNextPath, createDeniedDialog, getCssClass } from '../common/utility';import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem, closePopup } from '../common/utility';import { TreeView as BaseTreeView } from '@syncfusion/ej2-navigations';import { ContextMenuSettingsModel } from '../models/contextMenu-settings-model';import { ContextMenuSettings } from '../models/contextMenu-settings';import { BreadCrumbBar } from '../actions/breadcrumb-bar';import { ContextMenu } from '../pop-up/context-menu';import { defaultLocale } from '../models/default-locale';import { PositionModel } from '@syncfusion/ej2-base/src/draggable-model';import { Virtualization } from '../actions/virtualization';import { SortComparer } from './interface';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -226,6 +226,15 @@ export interface FileManagerModel extends ComponentModel{
226
226
  */
227
227
  sortComparer?: SortComparer | string;
228
228
 
229
+ /**
230
+ * Gets or sets a value that indicates whether the File Manager allows multiple items selection with mouse dragging.
231
+ * Set this property to true to allow users to select multiple items with mouse drag as like file explorer. Hover over
232
+ * the files or folders and drag the mouse to select the required items.
233
+ *
234
+ * @default false
235
+ */
236
+ enableRangeSelection?: boolean;
237
+
229
238
  /**
230
239
  * Specifies the group of items aligned horizontally in the toolbar.
231
240
  *
@@ -153,6 +153,11 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
153
153
  isMac: boolean;
154
154
  oldView: string;
155
155
  oldPath: string;
156
+ private viewElem;
157
+ private dragSelectElement;
158
+ private dragX;
159
+ private dragY;
160
+ private dragSelectedItems;
156
161
  /**
157
162
  * Specifies the AJAX settings of the file manager.
158
163
  *
@@ -350,6 +355,14 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
350
355
  * @aspType string
351
356
  */
352
357
  sortComparer: SortComparer | string;
358
+ /**
359
+ * Gets or sets a value that indicates whether the File Manager allows multiple items selection with mouse dragging.
360
+ * Set this property to true to allow users to select multiple items with mouse drag as like file explorer. Hover over
361
+ * the files or folders and drag the mouse to select the required items.
362
+ *
363
+ * @default false
364
+ */
365
+ enableRangeSelection: boolean;
353
366
  /**
354
367
  * Specifies the group of items aligned horizontally in the toolbar.
355
368
  *
@@ -661,8 +674,14 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
661
674
  private onDetailsInit;
662
675
  private resizeHandler;
663
676
  private keyActionHandler;
677
+ private wireSelectOnDragEvent;
664
678
  private wireEvents;
665
679
  private unWireEvents;
680
+ private onDragStart;
681
+ private onDrag;
682
+ private onDragStop;
683
+ private selectItems;
684
+ private onLayoutChange;
666
685
  private setPath;
667
686
  /**
668
687
  * Called internally if any of the property value changed.
@@ -789,6 +808,12 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
789
808
  * @returns {void}
790
809
  */
791
810
  selectAll(): void;
811
+ /**
812
+ * Specifies the method that must be invoked to traverse the path backwards in the file manager.
813
+ *
814
+ * @returns {void}
815
+ */
816
+ traverseBackward(): void;
792
817
  /**
793
818
  * Deselects the currently selected folders and files in current path.
794
819
  *
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
17
17
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
18
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
19
  };
20
- import { Component, isNullOrUndefined, L10n, closest, Collection } from '@syncfusion/ej2-base';
20
+ import { Component, isNullOrUndefined, L10n, closest, Collection, detach, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';
21
21
  import { Property, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';
22
22
  import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';
23
23
  import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents } from '@syncfusion/ej2-base';
@@ -101,6 +101,7 @@ var FileManager = /** @class */ (function (_super) {
101
101
  _this.uploadedCount = 0;
102
102
  //Specifies whether the operating system is MAC or not
103
103
  _this.isMac = false;
104
+ _this.dragSelectedItems = [];
104
105
  FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
105
106
  return _this;
106
107
  }
@@ -225,6 +226,9 @@ var FileManager = /** @class */ (function (_super) {
225
226
  this.setRtl(this.enableRtl);
226
227
  this.addEventListeners();
227
228
  read(this, (this.path !== this.originalPath) ? events.initialEnd : events.finalizeEnd, this.path);
229
+ if (this.fileView === 'Details') {
230
+ this.largeiconsviewModule.element.classList.add(CLS.DISPLAY_NONE);
231
+ }
228
232
  this.adjustHeight();
229
233
  if (isNOU(this.navigationpaneModule)) {
230
234
  this.splitterObj.collapse(this.enableRtl ? 1 : 0);
@@ -661,7 +665,33 @@ var FileManager = /** @class */ (function (_super) {
661
665
  break;
662
666
  }
663
667
  };
668
+ FileManager.prototype.wireSelectOnDragEvent = function (isBind) {
669
+ if (isNOU(this.view)) {
670
+ return;
671
+ }
672
+ if (isBind) {
673
+ this.viewElem = this.view === 'LargeIcons' ? this.largeiconsviewModule.element : this.element.querySelector('.e-gridcontent');
674
+ }
675
+ if (!this.viewElem) {
676
+ return;
677
+ }
678
+ if (isBind) {
679
+ if (this.allowMultiSelection) {
680
+ EventHandler.add(this.viewElem, 'mousedown', this.onDragStart, this);
681
+ this.on(events.layoutChange, this.onLayoutChange, this);
682
+ this.on(events.selectionChanged, this.onLayoutChange, this);
683
+ }
684
+ }
685
+ else {
686
+ EventHandler.remove(this.viewElem, 'mousedown', this.onDragStart);
687
+ this.off(events.layoutChange, this.onLayoutChange);
688
+ this.off(events.selectionChanged, this.onLayoutChange);
689
+ }
690
+ };
664
691
  FileManager.prototype.wireEvents = function () {
692
+ if (this.enableRangeSelection) {
693
+ this.wireSelectOnDragEvent(true);
694
+ }
665
695
  EventHandler.add(window, 'resize', this.resizeHandler, this);
666
696
  this.keyboardModule = new KeyboardEvents(this.element, {
667
697
  keyAction: this.keyActionHandler.bind(this),
@@ -670,9 +700,94 @@ var FileManager = /** @class */ (function (_super) {
670
700
  });
671
701
  };
672
702
  FileManager.prototype.unWireEvents = function () {
703
+ this.wireSelectOnDragEvent(false);
673
704
  EventHandler.remove(window, 'resize', this.resizeHandler);
674
705
  this.keyboardModule.destroy();
675
706
  };
707
+ FileManager.prototype.onDragStart = function (event) {
708
+ if (this.viewElem) {
709
+ if (this.allowDragAndDrop) {
710
+ var targetElement = closest(event.target, this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-fe-text');
711
+ if (targetElement) {
712
+ return;
713
+ }
714
+ }
715
+ event.preventDefault();
716
+ this.dragX = event.pageX;
717
+ this.dragY = event.pageY;
718
+ if (!this.dragSelectElement) {
719
+ this.dragSelectElement = createElement('div', {
720
+ id: this.element.id + '_drag',
721
+ className: 'e-filemanager e-drag-select',
722
+ styles: 'left: ' + this.dragX + 'px;top: ' + this.dragY + 'px;'
723
+ });
724
+ document.body.append(this.dragSelectElement);
725
+ }
726
+ EventHandler.add(document, 'mouseup', this.onDragStop, this);
727
+ EventHandler.add(this.viewElem, 'mousemove', this.onDrag, this);
728
+ EventHandler.add(this.dragSelectElement, 'mousemove', this.onDrag, this);
729
+ }
730
+ };
731
+ FileManager.prototype.onDrag = function (event) {
732
+ event.stopPropagation();
733
+ if (this.dragSelectElement) {
734
+ var diffX = event.pageX - this.dragX;
735
+ var diffY = event.pageY - this.dragY;
736
+ setStyleAttribute(this.dragSelectElement, {
737
+ 'left': diffX < 0 ? this.dragX + diffX + 'px' : this.dragX + 'px', 'top': diffY < 0 ? this.dragY + diffY + 'px' : this.dragY + 'px',
738
+ 'height': Math.abs(diffY) + 'px', 'width': Math.abs(diffX) + 'px'
739
+ });
740
+ this.selectItems();
741
+ }
742
+ else {
743
+ EventHandler.remove(this.viewElem, 'mousemove', this.onDrag);
744
+ }
745
+ };
746
+ FileManager.prototype.onDragStop = function () {
747
+ if (this.viewElem) {
748
+ EventHandler.remove(document, 'mouseup', this.onDragStop);
749
+ EventHandler.remove(this.viewElem, 'mousemove', this.onDrag);
750
+ }
751
+ if (this.dragSelectElement) {
752
+ EventHandler.remove(this.dragSelectElement, 'mousemove', this.onDrag);
753
+ if (this.dragSelectElement.clientHeight > 0 && this.dragSelectElement.clientWidth > 0) {
754
+ this.setProperties({ selectedItems: this.dragSelectedItems });
755
+ }
756
+ this.dragSelectedItems = [];
757
+ detach(this.dragSelectElement);
758
+ this.dragSelectElement = null;
759
+ }
760
+ };
761
+ FileManager.prototype.selectItems = function () {
762
+ this.dragSelectedItems = [];
763
+ var dragRect = this.dragSelectElement.getBoundingClientRect();
764
+ var allItems = selectAll(this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-row', this.viewElem);
765
+ removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
766
+ removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
767
+ for (var _i = 0, allItems_1 = allItems; _i < allItems_1.length; _i++) {
768
+ var item = allItems_1[_i];
769
+ var itemRect = item.getBoundingClientRect();
770
+ if (!(dragRect.right < itemRect.left || dragRect.left > itemRect.right
771
+ || dragRect.bottom < itemRect.top || dragRect.top > itemRect.bottom)
772
+ && (this.dragSelectElement.clientHeight > 0 && this.dragSelectElement.clientWidth > 0)) {
773
+ if (this.viewElem.classList.contains('e-large-icons')) {
774
+ item.classList.add('e-active');
775
+ this.dragSelectedItems.push(item.getAttribute('title'));
776
+ }
777
+ else {
778
+ addClass(selectAll('.e-rowcell', item), ['e-active']);
779
+ this.dragSelectedItems.push(item.querySelector('.e-drag-text').textContent);
780
+ }
781
+ item.querySelector('.e-frame').classList.add('e-check');
782
+ }
783
+ }
784
+ };
785
+ FileManager.prototype.onLayoutChange = function () {
786
+ if (this.enableRangeSelection) {
787
+ this.unWireEvents();
788
+ this.wireEvents();
789
+ }
790
+ };
676
791
  FileManager.prototype.setPath = function () {
677
792
  this.setProperties({ selectedItems: [] }, true);
678
793
  this.ensurePath();
@@ -719,6 +834,12 @@ var FileManager = /** @class */ (function (_super) {
719
834
  case 'detailsViewSettings':
720
835
  this.notify(events.modelChanged, { module: 'detailsview', newProp: newProp, oldProp: oldProp });
721
836
  break;
837
+ case 'enableRangeSelection':
838
+ this.wireSelectOnDragEvent(false);
839
+ if (newProp.enableRangeSelection) {
840
+ this.wireSelectOnDragEvent(true);
841
+ }
842
+ break;
722
843
  case 'enableRtl':
723
844
  this.enableRtl = newProp.enableRtl;
724
845
  this.refresh();
@@ -899,6 +1020,9 @@ var FileManager = /** @class */ (function (_super) {
899
1020
  this.largeiconsviewModule = null;
900
1021
  this.detailsviewModule = null;
901
1022
  this.breadcrumbbarModule = null;
1023
+ this.viewElem = null;
1024
+ this.dragSelectElement = null;
1025
+ this.dragSelectedItems = null;
902
1026
  };
903
1027
  /**
904
1028
  * Creates a new folder in file manager.
@@ -1087,6 +1211,23 @@ var FileManager = /** @class */ (function (_super) {
1087
1211
  FileManager.prototype.selectAll = function () {
1088
1212
  this.notify(events.methodCall, { action: 'selectAll' });
1089
1213
  };
1214
+ /**
1215
+ * Specifies the method that must be invoked to traverse the path backwards in the file manager.
1216
+ *
1217
+ * @returns {void}
1218
+ */
1219
+ FileManager.prototype.traverseBackward = function () {
1220
+ if (this.pathNames.length > 1 && this.breadcrumbbarModule.searchObj.element.value === '' && !this.isFiltered) {
1221
+ this.pathId.pop();
1222
+ this.pathNames.pop();
1223
+ var newPath = this.pathNames.slice(1).join('/');
1224
+ newPath = newPath === '' ? '/' : '/' + newPath + '/';
1225
+ this.setProperties({ path: newPath }, true);
1226
+ read(this, events.pathChanged, this.path);
1227
+ var treeNodeId = this.pathId[this.pathId.length - 1];
1228
+ this.notify(events.updateTreeSelection, { module: 'treeview', selectedNode: treeNodeId });
1229
+ }
1230
+ };
1090
1231
  /**
1091
1232
  * Deselects the currently selected folders and files in current path.
1092
1233
  *
@@ -1223,6 +1364,9 @@ var FileManager = /** @class */ (function (_super) {
1223
1364
  __decorate([
1224
1365
  Property(null)
1225
1366
  ], FileManager.prototype, "sortComparer", void 0);
1367
+ __decorate([
1368
+ Property(false)
1369
+ ], FileManager.prototype, "enableRangeSelection", void 0);
1226
1370
  __decorate([
1227
1371
  Complex({}, ToolbarSettings)
1228
1372
  ], FileManager.prototype, "toolbarSettings", void 0);
@@ -915,6 +915,7 @@ export interface IFileManager extends Component<HTMLElement> {
915
915
  destinationPath: string;
916
916
  enableHtmlSanitizer: boolean;
917
917
  refreshLayout(): void;
918
+ traverseBackward(): void;
918
919
  isMac: boolean;
919
920
  oldView: string;
920
921
  oldPath: string;
@@ -492,6 +492,7 @@ function triggerSearchOperation(parent, data, eventArgs) {
492
492
  showHiddenItems: getValue('showHiddenItems', data)
493
493
  };
494
494
  parent.trigger('search', searchEventArgs, function (args) {
495
+ setValue('data', args.searchResults, data);
495
496
  if (args.cancel) {
496
497
  eventArgs.cancel = true;
497
498
  }
@@ -80,7 +80,8 @@ var DetailsView = /** @class */ (function () {
80
80
  ctrlD: 'ctrl+d',
81
81
  f2: 'f2',
82
82
  ctrlA: 'ctrl+a',
83
- enter: 'enter'
83
+ enter: 'enter',
84
+ back: 'backspace'
84
85
  };
85
86
  }
86
87
  /* istanbul ignore next */
@@ -255,6 +256,10 @@ var DetailsView = /** @class */ (function () {
255
256
  for (var i = 0, len = columns.length; i < len; i++) {
256
257
  columns[i].disableHtmlEncode = !this.parent.enableHtmlSanitizer;
257
258
  }
259
+ if (this.parent.enableRangeSelection) {
260
+ var HiddenName = { field: 'name', visible: false, customAttributes: { class: 'e-drag-text' } };
261
+ columns.push(HiddenName);
262
+ }
258
263
  return columns;
259
264
  };
260
265
  DetailsView.prototype.adjustHeight = function () {
@@ -1082,7 +1087,8 @@ var DetailsView = /** @class */ (function () {
1082
1087
  DetailsView.prototype.onpasteEnd = function (args) {
1083
1088
  if (this.parent.view === 'Details') {
1084
1089
  this.isPasteOperation = true;
1085
- if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
1090
+ if (this.parent.path === this.parent.destinationPath ||
1091
+ this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
1086
1092
  this.onPathChanged(args);
1087
1093
  }
1088
1094
  }
@@ -1521,6 +1527,9 @@ var DetailsView = /** @class */ (function () {
1521
1527
  this.parent.setProperties({ selectedItems: lastItem }, true);
1522
1528
  this.selectRecords(lastItem);
1523
1529
  break;
1530
+ case 'back':
1531
+ this.parent.traverseBackward();
1532
+ break;
1524
1533
  }
1525
1534
  };
1526
1535
  DetailsView.prototype.gridSelectNodes = function () {
@@ -52,7 +52,6 @@ export declare class LargeIconsView {
52
52
  * @private
53
53
  */
54
54
  private getModuleName;
55
- private adjustHeight;
56
55
  private onItemCreated;
57
56
  private renderCheckbox;
58
57
  private onLayoutChange;
@@ -120,9 +120,6 @@ var LargeIconsView = /** @class */ (function () {
120
120
  }
121
121
  iconsView.classList.remove(CLS.DISPLAY_NONE);
122
122
  if (this.parent.enableVirtualization && this.allItems.length > 0) {
123
- if (!this.element.style.height) {
124
- this.adjustHeight();
125
- }
126
123
  this.parent.virtualizationModule.setUIVirtualization();
127
124
  }
128
125
  this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
@@ -160,7 +157,6 @@ var LargeIconsView = /** @class */ (function () {
160
157
  for (var i = 0; i < activeEle.length; i++) {
161
158
  activeEle[i].setAttribute('aria-selected', 'true');
162
159
  }
163
- this.adjustHeight();
164
160
  this.element.style.maxHeight = '100%';
165
161
  this.getItemCount();
166
162
  this.addEventListener();
@@ -267,11 +263,6 @@ var LargeIconsView = /** @class */ (function () {
267
263
  LargeIconsView.prototype.getModuleName = function () {
268
264
  return 'largeiconsview';
269
265
  };
270
- LargeIconsView.prototype.adjustHeight = function () {
271
- var pane = select('#' + this.parent.element.id + CLS.CONTENT_ID, this.parent.element);
272
- var bar = select('#' + this.parent.element.id + CLS.BREADCRUMBBAR_ID, this.parent.element);
273
- this.element.style.height = (pane.offsetHeight - bar.offsetHeight) + 'px';
274
- };
275
266
  LargeIconsView.prototype.onItemCreated = function (args) {
276
267
  args.item.removeAttribute('aria-level');
277
268
  if (!this.parent.showFileExtension && getValue('isFile', args.curData)) {
@@ -471,7 +462,6 @@ var LargeIconsView = /** @class */ (function () {
471
462
  if (this.parent.view !== 'LargeIcons') {
472
463
  return;
473
464
  }
474
- this.adjustHeight();
475
465
  };
476
466
  LargeIconsView.prototype.onUpdateSelectionData = function () {
477
467
  if (this.parent.view !== 'LargeIcons') {
@@ -599,7 +589,8 @@ var LargeIconsView = /** @class */ (function () {
599
589
  LargeIconsView.prototype.onpasteEnd = function (args) {
600
590
  if (this.parent.view === 'LargeIcons') {
601
591
  this.isPasteOperation = true;
602
- if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
592
+ if (this.parent.path === this.parent.destinationPath ||
593
+ this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
603
594
  this.onPathChanged(args);
604
595
  }
605
596
  }
@@ -621,9 +612,6 @@ var LargeIconsView = /** @class */ (function () {
621
612
  case 'allowDragAndDrop':
622
613
  this.createDragObj();
623
614
  break;
624
- case 'height':
625
- this.adjustHeight();
626
- break;
627
615
  case 'selectedItems':
628
616
  this.isInteraction = false;
629
617
  this.isInteracted = false;
@@ -1089,6 +1077,9 @@ var LargeIconsView = /** @class */ (function () {
1089
1077
  case 'ctrlD':
1090
1078
  this.doDownload();
1091
1079
  break;
1080
+ case 'back':
1081
+ this.parent.traverseBackward();
1082
+ break;
1092
1083
  }
1093
1084
  };
1094
1085
  LargeIconsView.prototype.doDownload = function () {
@@ -1381,9 +1372,6 @@ var LargeIconsView = /** @class */ (function () {
1381
1372
  };
1382
1373
  LargeIconsView.prototype.resizeHandler = function () {
1383
1374
  this.getItemCount();
1384
- if (!isNOU(this.listObj)) {
1385
- this.adjustHeight();
1386
- }
1387
1375
  };
1388
1376
  LargeIconsView.prototype.splitterResizeHandler = function () {
1389
1377
  this.getItemCount();
@@ -416,8 +416,11 @@ var ContextMenu = /** @class */ (function () {
416
416
  if (_this.menuType === 'folder') {
417
417
  if (_this.parent.activeModule === 'navigationpane') {
418
418
  _this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
419
+ _this.parent.folderPath = _this.parent.path;
420
+ }
421
+ else {
422
+ _this.parent.folderPath = getFullPath(_this.parent, _this.menuItemData, _this.parent.path);
419
423
  }
420
- _this.parent.folderPath = getFullPath(_this.parent, _this.menuItemData, _this.parent.path);
421
424
  }
422
425
  else {
423
426
  _this.parent.folderPath = '';