@syncfusion/ej2-filemanager 25.2.3 → 26.1.35

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 (104) hide show
  1. package/.eslintrc.json +3 -2
  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 +931 -464
  6. package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
  7. package/dist/es6/ej2-filemanager.es5.js +975 -517
  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/actions/breadcrumb-bar.js +0 -4
  14. package/src/file-manager/actions/toolbar.js +1 -13
  15. package/src/file-manager/actions/virtualization.d.ts +28 -8
  16. package/src/file-manager/actions/virtualization.js +36 -12
  17. package/src/file-manager/base/file-manager-model.d.ts +107 -36
  18. package/src/file-manager/base/file-manager.d.ts +100 -25
  19. package/src/file-manager/base/file-manager.js +46 -20
  20. package/src/file-manager/base/interface.d.ts +224 -2
  21. package/src/file-manager/base/interface.js +0 -1
  22. package/src/file-manager/common/operations.d.ts +7 -0
  23. package/src/file-manager/common/operations.js +596 -94
  24. package/src/file-manager/common/utility.d.ts +22 -0
  25. package/src/file-manager/common/utility.js +117 -65
  26. package/src/file-manager/layout/details-view.d.ts +1 -1
  27. package/src/file-manager/layout/details-view.js +23 -68
  28. package/src/file-manager/layout/large-icons-view.js +24 -46
  29. package/src/file-manager/layout/navigation-pane.js +18 -41
  30. package/src/file-manager/models/column-model.d.ts +1 -3
  31. package/src/file-manager/models/default-locale.js +0 -1
  32. package/src/file-manager/models/details-view-settings.js +2 -1
  33. package/src/file-manager/pop-up/context-menu.js +26 -27
  34. package/src/file-manager/pop-up/dialog.d.ts +1 -2
  35. package/src/file-manager/pop-up/dialog.js +12 -35
  36. package/styles/bootstrap-dark.css +116 -105
  37. package/styles/bootstrap-dark.scss +16 -1
  38. package/styles/bootstrap.css +117 -106
  39. package/styles/bootstrap.scss +16 -1
  40. package/styles/bootstrap4.css +116 -105
  41. package/styles/bootstrap4.scss +16 -1
  42. package/styles/bootstrap5-dark.css +98 -98
  43. package/styles/bootstrap5-dark.scss +16 -1
  44. package/styles/bootstrap5.css +98 -98
  45. package/styles/bootstrap5.scss +16 -1
  46. package/styles/fabric-dark.css +116 -105
  47. package/styles/fabric-dark.scss +16 -1
  48. package/styles/fabric.css +116 -105
  49. package/styles/fabric.scss +16 -1
  50. package/styles/file-manager/_bds-definition.scss +1 -1
  51. package/styles/file-manager/_bootstrap5-definition.scss +2 -1
  52. package/styles/file-manager/_bootstrap5.3-definition.scss +240 -0
  53. package/styles/file-manager/_fluent-definition.scss +1 -1
  54. package/styles/file-manager/_fluent2-definition.scss +249 -0
  55. package/styles/file-manager/_layout.scss +255 -396
  56. package/styles/file-manager/_material-dark-definition.scss +1 -0
  57. package/styles/file-manager/_material-definition.scss +1 -0
  58. package/styles/file-manager/_material3-definition.scss +1 -27
  59. package/styles/file-manager/_tailwind-definition.scss +1 -1
  60. package/styles/file-manager/_theme.scss +37 -85
  61. package/styles/file-manager/bootstrap-dark.css +116 -105
  62. package/styles/file-manager/bootstrap.css +117 -106
  63. package/styles/file-manager/bootstrap4.css +116 -105
  64. package/styles/file-manager/bootstrap5-dark.css +98 -98
  65. package/styles/file-manager/bootstrap5.css +98 -98
  66. package/styles/file-manager/fabric-dark.css +116 -105
  67. package/styles/file-manager/fabric.css +116 -105
  68. package/styles/file-manager/fluent-dark.css +107 -102
  69. package/styles/file-manager/fluent.css +107 -102
  70. package/styles/file-manager/fluent2.css +2872 -0
  71. package/styles/file-manager/fluent2.scss +16 -0
  72. package/styles/file-manager/highcontrast-light.css +116 -105
  73. package/styles/file-manager/highcontrast.css +116 -105
  74. package/styles/file-manager/icons/_bootstrap5.3.scss +235 -0
  75. package/styles/file-manager/icons/_fluent2.scss +235 -0
  76. package/styles/file-manager/material-dark.css +140 -108
  77. package/styles/file-manager/material.css +156 -112
  78. package/styles/file-manager/material3-dark.css +134 -109
  79. package/styles/file-manager/material3.css +134 -109
  80. package/styles/file-manager/tailwind-dark.css +93 -95
  81. package/styles/file-manager/tailwind.css +93 -95
  82. package/styles/fluent-dark.css +107 -102
  83. package/styles/fluent-dark.scss +16 -1
  84. package/styles/fluent.css +107 -102
  85. package/styles/fluent.scss +16 -1
  86. package/styles/fluent2.css +2872 -0
  87. package/styles/fluent2.scss +16 -0
  88. package/styles/highcontrast-light.css +116 -105
  89. package/styles/highcontrast-light.scss +16 -1
  90. package/styles/highcontrast.css +116 -105
  91. package/styles/highcontrast.scss +16 -1
  92. package/styles/material-dark.css +140 -108
  93. package/styles/material-dark.scss +16 -1
  94. package/styles/material.css +156 -112
  95. package/styles/material.scss +16 -1
  96. package/styles/material3-dark.css +134 -109
  97. package/styles/material3-dark.scss +16 -1
  98. package/styles/material3.css +134 -109
  99. package/styles/material3.scss +16 -1
  100. package/styles/tailwind-dark.css +93 -95
  101. package/styles/tailwind-dark.scss +16 -1
  102. package/styles/tailwind.css +93 -95
  103. package/styles/tailwind.scss +16 -1
  104. package/CHANGELOG.md +0 -467
@@ -1,13 +1,13 @@
1
- import { Ajax, Browser, ChildProperty, Collection, Complex, Component, Draggable, Event, EventHandler, Fetch, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, addClass, closest, createElement, detach, extend, formatUnit, getUniqueID, getValue, initializeCSPTemplate, isNullOrUndefined, isVisible, matches, remove, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
1
+ import { ChildProperty, Property, initializeCSPTemplate, getValue, isNullOrUndefined, matches, select, closest, createElement, setValue, detach, extend, Ajax, Internationalization, Fetch, remove, selectAll, addClass, Draggable, KeyboardEvents, EventHandler, Touch, removeClass, isVisible, Component, getUniqueID, setStyleAttribute, formatUnit, Browser, L10n, Complex, Collection, Event, NotifyPropertyChanges, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
2
2
  import { Splitter } from '@syncfusion/ej2-layouts';
3
- import { Dialog, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
4
- import { DataManager, DataUtil, Query } from '@syncfusion/ej2-data';
3
+ import { Dialog, showSpinner, hideSpinner, createSpinner } from '@syncfusion/ej2-popups';
4
+ import { DataManager, Query, DataUtil } from '@syncfusion/ej2-data';
5
+ import { getUid, Grid, Resize, ContextMenu as ContextMenu$2, Sort, VirtualScroll } from '@syncfusion/ej2-grids';
5
6
  import { Input, TextBox, Uploader } from '@syncfusion/ej2-inputs';
6
7
  import { CheckBox, createCheckBox } from '@syncfusion/ej2-buttons';
7
8
  import { ListBase } from '@syncfusion/ej2-lists';
8
9
  import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
9
- import { ContextMenu, Toolbar, TreeView } from '@syncfusion/ej2-navigations';
10
- import { ContextMenu as ContextMenu$1, Grid, Resize, Sort, VirtualScroll } from '@syncfusion/ej2-grids';
10
+ import { ContextMenu as ContextMenu$1, Toolbar as Toolbar$1, TreeView } from '@syncfusion/ej2-navigations';
11
11
 
12
12
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
13
13
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -145,7 +145,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
145
145
  const columnArray = [
146
146
  {
147
147
  field: 'name', headerText: 'Name', minWidth: 120,
148
- template: '<span class=\"e-fe-text\">${name}</span>',
148
+ template: '<span class="e-fe-text">${name}</span>',
149
149
  customAttributes: { class: 'e-fe-grid-name' }
150
150
  },
151
151
  {
@@ -154,6 +154,7 @@ const columnArray = [
154
154
  },
155
155
  {
156
156
  field: 'size', headerText: 'Size', minWidth: 90, width: '110',
157
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
157
158
  template: initializeCSPTemplate(function (data) {
158
159
  return `<span class="e-fe-size">${data.size}</span>`;
159
160
  }), format: 'n2'
@@ -321,10 +322,6 @@ __decorate$7([
321
322
  Property(false)
322
323
  ], Column.prototype, "isPrimaryKey", void 0);
323
324
 
324
- /**
325
- * FileExplorer common modules
326
- */
327
-
328
325
  /**
329
326
  * Specifies the File Manager internal ID's
330
327
  */
@@ -697,25 +694,30 @@ const permissionDownload = 'download';
697
694
  */
698
695
  function sortComparer(reference, comparer) {
699
696
  // Check if reference and comparer are files or folders
700
- let referenceIsFile = /\.\S+/.test(reference);
701
- let comparerIsFile = /\.\S+/.test(comparer);
697
+ const referenceIsFile = /\.\S+/.test(reference);
698
+ const comparerIsFile = /\.\S+/.test(comparer);
702
699
  // If one is a file and the other is a folder, the folder should come first
703
- if (referenceIsFile && !comparerIsFile)
700
+ if (referenceIsFile && !comparerIsFile) {
704
701
  return 1;
705
- if (!referenceIsFile && comparerIsFile)
702
+ }
703
+ if (!referenceIsFile && comparerIsFile) {
706
704
  return -1;
707
- let referenceParts = [];
708
- let comparerParts = [];
709
- (reference + '').replace(/(\d+)|(\D+)/g, function (_, $1, $2) { referenceParts.push([$1 || Infinity, $2 || ""]); return ""; });
710
- (comparer + '').replace(/(\d+)|(\D+)/g, function (_, $1, $2) { comparerParts.push([$1 || Infinity, $2 || ""]); return ""; });
705
+ }
706
+ const referenceParts = [];
707
+ const comparerParts = [];
708
+ (reference + '').replace(/(\d+)|(\D+)/g, function (_, $1, $2) { referenceParts.push([$1 || Infinity, $2 || '']); return ''; });
709
+ (comparer + '').replace(/(\d+)|(\D+)/g, function (_, $1, $2) { comparerParts.push([$1 || Infinity, $2 || '']); return ''; });
711
710
  // Compare each part of reference and comparer
712
711
  while (referenceParts.length && comparerParts.length) {
713
- let referencePart = referenceParts.shift();
714
- let comparerPart = comparerParts.shift();
715
- let comparisonResult = referencePart[0] - comparerPart[0] ||
716
- referencePart[1].localeCompare(comparerPart[1]);
717
- if (comparisonResult)
718
- return comparisonResult;
712
+ const referencePart = referenceParts.shift();
713
+ const comparerPart = comparerParts.shift();
714
+ if (referencePart && comparerPart) {
715
+ const comparisonResult = referencePart[0] - comparerPart[0] ||
716
+ referencePart[1].localeCompare(comparerPart[1]);
717
+ if (comparisonResult) {
718
+ return comparisonResult;
719
+ }
720
+ }
719
721
  }
720
722
  return referenceParts.length - comparerParts.length;
721
723
  }
@@ -728,7 +730,6 @@ function sortComparer(reference, comparer) {
728
730
  * @returns {void}
729
731
  * @private
730
732
  */
731
- // eslint-disable-next-line
732
733
  function updatePath(node, data, instance) {
733
734
  const text = getValue('name', data);
734
735
  const id = node.getAttribute('data-id');
@@ -824,8 +825,7 @@ function generatePath(parent) {
824
825
  let newPath = '/';
825
826
  let i = 1;
826
827
  for (i; i < parent.pathId.length; i++) {
827
- // eslint-disable-next-line
828
- const data = getValue(parent.pathId[i], parent.feParent);
828
+ const data = getValue(parent.pathId[parseInt(i.toString(), 10)], parent.feParent);
829
829
  newPath += getValue(key, data) + '/';
830
830
  }
831
831
  parent.setProperties({ path: newPath }, true);
@@ -963,6 +963,22 @@ function searchWordHandler(parent, value, isLayoutChange) {
963
963
  if (value.length === 0 && !parent.isFiltered) {
964
964
  parent.notify(pathColumn, { args: parent });
965
965
  }
966
+ if (isFileSystemData(parent)) {
967
+ if (value === '') {
968
+ parent.itemData = parent.fileSystemData;
969
+ read(parent, layoutChange, parent.path);
970
+ }
971
+ else {
972
+ parent.searchSettings.filterType = isNullOrUndefined(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
973
+ const filteredData = parent.fileSystemData.filter((obj) => obj.parentId !== null);
974
+ const data = new DataManager(filteredData).
975
+ executeLocal(new Query().where('name', parent.searchSettings.filterType, value, parent.searchSettings.ignoreCase));
976
+ const searchValue = parent.searchSettings.ignoreCase ? value.toLowerCase() : value;
977
+ parent.itemData = data;
978
+ Search(parent, isLayoutChange ? layoutChange : search, parent.path, searchValue, parent.showHiddenItems, !parent.searchSettings.ignoreCase);
979
+ }
980
+ return;
981
+ }
966
982
  if (parent.searchSettings.filterType === 'startsWith') {
967
983
  searchWord = value + '*';
968
984
  }
@@ -1080,7 +1096,6 @@ function openAction(parent) {
1080
1096
  * @returns {Object} - returns the path data.
1081
1097
  * @private
1082
1098
  */
1083
- // eslint-disable-next-line
1084
1099
  function getPathObject(parent) {
1085
1100
  return getValue(parent.pathId[parent.pathId.length - 1], parent.feParent);
1086
1101
  }
@@ -1122,10 +1137,9 @@ function cutFiles(parent) {
1122
1137
  * @returns {string} - returns the file type.
1123
1138
  * @private
1124
1139
  */
1125
- // eslint-disable-next-line
1126
1140
  function fileType(file) {
1127
- const isFile$$1 = getValue('isFile', file);
1128
- if (!isFile$$1) {
1141
+ const isFile = getValue('isFile', file);
1142
+ if (!isFile) {
1129
1143
  return FOLDER;
1130
1144
  }
1131
1145
  const imageFormat = ['bmp', 'dib', 'jpg', 'jpeg', 'jpe', 'jfif', 'gif', 'tif', 'tiff', 'png', 'ico'];
@@ -1165,11 +1179,18 @@ function fileType(file) {
1165
1179
  * @returns {string} - returns the image url.
1166
1180
  * @private
1167
1181
  */
1168
- // eslint-disable-next-line
1169
1182
  function getImageUrl(parent, item) {
1183
+ let imgUrl = isFileSystemData(parent) ? getValue('imageUrl', item) : '';
1184
+ if (isFileSystemData(parent)) {
1185
+ const eventArgs = {
1186
+ fileDetails: [item],
1187
+ imageUrl: imgUrl
1188
+ };
1189
+ parent.trigger('beforeImageLoad', eventArgs);
1190
+ return eventArgs.imageUrl;
1191
+ }
1170
1192
  const baseUrl = parent.ajaxSettings.getImageUrl ? parent.ajaxSettings.getImageUrl : parent.ajaxSettings.url;
1171
- let pathUrl = (baseUrl.indexOf('?') !== -1) ? '&path=' : '?path=';
1172
- let imgUrl;
1193
+ const pathUrl = (baseUrl.indexOf('?') !== -1) ? '&path=' : '?path=';
1173
1194
  const fileName = encodeURIComponent(getValue('name', item));
1174
1195
  const fPath = getValue('filterPath', item);
1175
1196
  if (parent.hasId) {
@@ -1200,7 +1221,6 @@ function getImageUrl(parent, item) {
1200
1221
  * @returns {string} - returns the image url.
1201
1222
  * @private
1202
1223
  */
1203
- // eslint-disable-next-line
1204
1224
  function getFullPath(parent, data, path) {
1205
1225
  const filePath = getValue(parent.hasId ? 'id' : 'name', data) + '/';
1206
1226
  const fPath = getValue(parent.hasId ? 'filterId' : 'filterPath', data);
@@ -1219,7 +1239,6 @@ function getFullPath(parent, data, path) {
1219
1239
  * @returns {string} - returns the name.
1220
1240
  * @private
1221
1241
  */
1222
- // eslint-disable-next-line
1223
1242
  function getName(parent, data) {
1224
1243
  let name = getValue('name', data);
1225
1244
  let fPath = getValue('filterPath', data);
@@ -1237,19 +1256,17 @@ function getName(parent, data) {
1237
1256
  * @returns {Object[]} - returns the sorted data.
1238
1257
  * @private
1239
1258
  */
1240
- // eslint-disable-next-line
1241
1259
  function getSortedData(parent, items) {
1242
1260
  if (items.length === 0) {
1243
1261
  return items;
1244
1262
  }
1245
1263
  let query;
1246
- if (parent.sortOrder !== 'None') {
1264
+ if (parent.sortOrder !== 'None' && !isNullOrUndefined(parent.sortOrder)) {
1247
1265
  query = new Query().sortBy(parent.sortBy, parent.sortOrder.toLowerCase(), true).group('isFile');
1248
1266
  }
1249
1267
  else {
1250
1268
  query = new Query().group('isFile');
1251
1269
  }
1252
- // eslint-disable-next-line
1253
1270
  const lists = new DataManager(items).executeLocal(query);
1254
1271
  return getValue('records', lists);
1255
1272
  }
@@ -1262,12 +1279,9 @@ function getSortedData(parent, items) {
1262
1279
  * @returns {Object} - returns the sorted data.
1263
1280
  * @private
1264
1281
  */
1265
- // eslint-disable-next-line
1266
1282
  function getObject(parent, key, value) {
1267
- // eslint-disable-next-line
1268
1283
  const currFiles = getValue(parent.pathId[parent.pathId.length - 1], parent.feFiles);
1269
1284
  const query = new Query().where(key, 'equal', value);
1270
- // eslint-disable-next-line
1271
1285
  const lists = new DataManager(currFiles).executeLocal(query);
1272
1286
  return lists[0];
1273
1287
  }
@@ -1332,7 +1346,6 @@ function createEmptyElement(parent, element, args) {
1332
1346
  * @returns {Object[]} - returns the sorted data.
1333
1347
  * @private
1334
1348
  */
1335
- // eslint-disable-next-line
1336
1349
  function getDirectories(files) {
1337
1350
  return new DataManager(files).executeLocal(new Query().where(isFile, 'equal', false, false));
1338
1351
  }
@@ -1345,7 +1358,6 @@ function getDirectories(files) {
1345
1358
  * @private
1346
1359
  */
1347
1360
  function setNodeId(result, rootId) {
1348
- // eslint-disable-next-line
1349
1361
  const dirs = getDirectories(result.files);
1350
1362
  for (let i = 0, len = dirs.length; i < len; i++) {
1351
1363
  setValue('_fm_id', rootId + '_' + i, dirs[i]);
@@ -1355,16 +1367,17 @@ function setNodeId(result, rootId) {
1355
1367
  * set the date object
1356
1368
  *
1357
1369
  * @param {Object[]} args - specifies the file object.
1370
+ * @param {Internationalization} localeString - The internationalization object for formatting dates.
1371
+ * @param {string} dateFormat - The date format string.
1358
1372
  * @returns {void}
1359
1373
  * @private
1360
1374
  */
1361
- // eslint-disable-next-line
1362
1375
  function setDateObject(args, localeString, dateFormat) {
1363
1376
  for (let i = 0; i < args.length; i++) {
1364
1377
  const createdDate = new Date(getValue('dateCreated', args[i]));
1365
1378
  const modifiedDate = new Date(getValue('dateModified', args[i]));
1366
1379
  if (isNullOrUndefined(dateFormat)) {
1367
- dateFormat = "MM/dd/yyyy";
1380
+ dateFormat = 'MM/dd/yyyy';
1368
1381
  }
1369
1382
  setValue('_fm_created', localeString.formatDate(createdDate, { format: dateFormat }), args[i]);
1370
1383
  setValue('_fm_modified', localeString.formatDate(modifiedDate, { format: dateFormat }), args[i]);
@@ -1437,6 +1450,7 @@ function sortbyClickHandler(parent, args) {
1437
1450
  * Gets the sorted fields
1438
1451
  *
1439
1452
  * @param {string} id - specifies the id.
1453
+ * @param {IFileManager} [parent] - optional parameter representing the parent IFileManager.
1440
1454
  * @returns {string} - returns the sorted fields
1441
1455
  * @private
1442
1456
  */
@@ -1482,14 +1496,12 @@ function getSortField(id, parent) {
1482
1496
  function setNextPath(parent, path) {
1483
1497
  const currfolders = path.split('/');
1484
1498
  const folders = parent.originalPath.split('/');
1485
- // eslint-disable-next-line
1486
1499
  const root = getValue(parent.pathId[0], parent.feParent);
1487
1500
  const key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1488
1501
  for (let i = currfolders.length - 1, len = folders.length - 1; i < len; i++) {
1489
1502
  const eventName = (folders[i + 1] === '') ? finalizeEnd : initialEnd;
1490
1503
  const newPath = (folders[i] === '') ? '/' : (parent.path + folders[i] + '/');
1491
- // eslint-disable-next-line
1492
- const data = getObject(parent, key, folders[i]);
1504
+ const data = getObject(parent, key, folders[parseInt(i.toString(), 10)]);
1493
1505
  if (!isNullOrUndefined(data)) {
1494
1506
  const id = getValue('_fm_id', data);
1495
1507
  parent.setProperties({ path: newPath }, true);
@@ -1512,13 +1524,12 @@ function setNextPath(parent, path) {
1512
1524
  * @returns {void}
1513
1525
  * @private
1514
1526
  */
1515
- // eslint-disable-next-line
1516
1527
  function openSearchFolder(parent, data) {
1517
1528
  parent.originalPath = getFullPath(parent, data, parent.path);
1518
1529
  const root = getValue(parent.pathId[0], parent.feParent);
1519
- const isRoot = getValue('_fm_id', parent.itemData[0]) == 'fe_tree';
1530
+ const isRoot = getValue('_fm_id', parent.itemData[0]) === 'fe_tree';
1520
1531
  const key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1521
- const searchData = getObject(parent, key, getValue('name', data));
1532
+ const searchData = getObject(parent, key, isFileSystemData(parent) ? getValue('id', data) : getValue('name', data));
1522
1533
  if (isNullOrUndefined(searchData)) {
1523
1534
  if (!isRoot) {
1524
1535
  parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
@@ -1548,7 +1559,6 @@ function pasteHandler(parent) {
1548
1559
  parent.isDragDrop = false;
1549
1560
  if (parent.selectedNodes.length !== 0 && parent.enablePaste) {
1550
1561
  const path = (parent.folderPath === '') ? parent.path : parent.folderPath;
1551
- // eslint-disable-next-line
1552
1562
  const subFolder = validateSubFolder(parent, parent.actionRecords, path, parent.path);
1553
1563
  if (!subFolder) {
1554
1564
  if ((parent.fileAction === 'move' && parent.targetPath !== path) || parent.fileAction === 'copy') {
@@ -1582,13 +1592,12 @@ function pasteHandler(parent) {
1582
1592
  * @returns {boolean} - returns the validated sub folder.
1583
1593
  * @private
1584
1594
  */
1585
- // eslint-disable-next-line
1586
- function validateSubFolder(parent, data, dropPath$$1, dragPath) {
1595
+ function validateSubFolder(parent, data, dropPath, dragPath) {
1587
1596
  let subFolder = false;
1588
1597
  for (let i = 0; i < data.length; i++) {
1589
1598
  if (!getValue('isFile', data[i])) {
1590
1599
  const tempTarget = getFullPath(parent, data[i], dragPath);
1591
- if (dropPath$$1.indexOf(tempTarget) === 0) {
1600
+ if (dropPath.indexOf(tempTarget) === 0) {
1592
1601
  const result = {
1593
1602
  files: null,
1594
1603
  error: {
@@ -1603,7 +1612,8 @@ function validateSubFolder(parent, data, dropPath$$1, dragPath) {
1603
1612
  }
1604
1613
  }
1605
1614
  else {
1606
- const srcData = parent.dragNodes[i];
1615
+ const name = parent.dragData[i] ? parent.dragData[i].name : null;
1616
+ const srcData = isFileSystemData(parent) ? name : parent.dragNodes[i];
1607
1617
  let len = 0;
1608
1618
  if (srcData) {
1609
1619
  len = srcData.lastIndexOf('/');
@@ -1612,7 +1622,7 @@ function validateSubFolder(parent, data, dropPath$$1, dragPath) {
1612
1622
  if (len > 0) {
1613
1623
  path = dragPath + srcData.substring(0, len + 1);
1614
1624
  }
1615
- if (path === dropPath$$1) {
1625
+ if (path === dropPath) {
1616
1626
  const result = {
1617
1627
  files: null,
1618
1628
  error: {
@@ -1674,15 +1684,15 @@ function getParentPath(oldPath) {
1674
1684
  */
1675
1685
  function getDirectoryPath(parent, args) {
1676
1686
  const filePath = getValue(parent.hasId ? 'id' : 'name', args.cwd) + '/';
1677
- const fPath = getValue(parent.hasId ? 'filterId' : 'filterPath', args.cwd);
1687
+ const fPath = getValue(parent.hasId && !isNullOrUndefined(parent.ajaxSettings.url) ? 'filterId' : 'filterPath', args.cwd);
1678
1688
  if (!isNullOrUndefined(fPath)) {
1679
1689
  if (fPath === '') {
1680
- return parent.hasId ? filePath : '/';
1690
+ return parent.hasId && !isNullOrUndefined(parent.ajaxSettings.url) ? filePath : '/';
1681
1691
  }
1682
1692
  return fPath.replace(/\\/g, '/') + filePath;
1683
1693
  }
1684
1694
  else {
1685
- return parent.path + filePath;
1695
+ return isFileSystemData(parent) ? filePath : parent.path + filePath;
1686
1696
  }
1687
1697
  }
1688
1698
  /**
@@ -1751,8 +1761,8 @@ function readDropPath(parent) {
1751
1761
  if (parent.navigationpaneModule) {
1752
1762
  let node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1753
1763
  if (!node) {
1754
- let liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
1755
- pathId = liElement.getAttribute("data-uid");
1764
+ const liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
1765
+ pathId = liElement.getAttribute('data-uid');
1756
1766
  node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
1757
1767
  }
1758
1768
  updatePath(node, parent.dropData, parent);
@@ -1768,11 +1778,8 @@ function readDropPath(parent) {
1768
1778
  * @returns {object} - returns the duplicated path.
1769
1779
  * @private
1770
1780
  */
1771
- // eslint-disable-next-line
1772
1781
  function getDuplicateData(parent, name) {
1773
- // eslint-disable-next-line
1774
1782
  let data = null;
1775
- // eslint-disable-next-line
1776
1783
  const records = parent.isDragDrop ? parent.dragData : parent.actionRecords;
1777
1784
  for (let i = 0; i < records.length; i++) {
1778
1785
  if (getValue('name', records[i]) === name) {
@@ -1965,8 +1972,8 @@ function removeItemClass(parent, value) {
1965
1972
  */
1966
1973
  function scrollHandler(scrollParent, parent, nodeClass, screenY, clientY) {
1967
1974
  let position;
1968
- let elementData = scrollParent.getBoundingClientRect();
1969
- const node = select("." + nodeClass, scrollParent);
1975
+ const elementData = scrollParent.getBoundingClientRect();
1976
+ const node = select('.' + nodeClass, scrollParent);
1970
1977
  if ((screenY >= (elementData.top + scrollParent.clientHeight - 30)) && !isNullOrUndefined(node)) {
1971
1978
  position = (parent.targetModule === 'navigationpane' || parent.targetModule === 'detailsview') ? node.offsetHeight / 2.5 : node.offsetHeight / 4.5;
1972
1979
  scrollParent.scrollBy(0, position);
@@ -2044,7 +2051,6 @@ function draggingHandler(parent, args) {
2044
2051
  * @private
2045
2052
  */
2046
2053
  // Ignored the message key value in permission object
2047
- // eslint-disable-next-line
2048
2054
  function objectToString(data) {
2049
2055
  let str = '';
2050
2056
  const keys = Object.keys(data);
@@ -2063,7 +2069,6 @@ function objectToString(data) {
2063
2069
  * @returns {string} returns the item name.
2064
2070
  * @private
2065
2071
  */
2066
- // eslint-disable-next-line
2067
2072
  function getItemName(parent, data) {
2068
2073
  if (parent.hasId) {
2069
2074
  return getValue('id', data);
@@ -2078,7 +2083,6 @@ function getItemName(parent, data) {
2078
2083
  * @returns {void}
2079
2084
  * @private
2080
2085
  */
2081
- // eslint-disable-next-line
2082
2086
  function updateRenamingData(parent, data) {
2083
2087
  parent.itemData = [data];
2084
2088
  parent.currentItemText = getValue('name', data);
@@ -2109,7 +2113,6 @@ function doRename(parent) {
2109
2113
  * @private
2110
2114
  */
2111
2115
  function doDownload(parent) {
2112
- // eslint-disable-next-line
2113
2116
  const items = parent.itemData;
2114
2117
  for (let i = 0; i < items.length; i++) {
2115
2118
  if (!hasDownloadAccess(items[i])) {
@@ -2130,7 +2133,6 @@ function doDownload(parent) {
2130
2133
  * @returns {void}
2131
2134
  * @private
2132
2135
  */
2133
- // eslint-disable-next-line
2134
2136
  function doDeleteFiles(parent, data, newIds) {
2135
2137
  for (let i = 0; i < data.length; i++) {
2136
2138
  if (!hasEditAccess(data[i])) {
@@ -2151,7 +2153,6 @@ function doDeleteFiles(parent, data, newIds) {
2151
2153
  * @returns {void}
2152
2154
  * @private
2153
2155
  */
2154
- // eslint-disable-next-line
2155
2156
  function doDownloadFiles(parent, data, newIds) {
2156
2157
  for (let i = 0; i < data.length; i++) {
2157
2158
  if (!hasDownloadAccess(data[i])) {
@@ -2173,7 +2174,6 @@ function doDownloadFiles(parent, data, newIds) {
2173
2174
  * @returns {void}
2174
2175
  * @private
2175
2176
  */
2176
- // eslint-disable-next-line
2177
2177
  function createDeniedDialog(parent, data, action) {
2178
2178
  let message = getValue('message', getValue('permission', data));
2179
2179
  if (message === '') {
@@ -2195,7 +2195,6 @@ function createDeniedDialog(parent, data, action) {
2195
2195
  * @returns {string} - returns accesses classes.
2196
2196
  * @private
2197
2197
  */
2198
- // eslint-disable-next-line
2199
2198
  function getAccessClass(data) {
2200
2199
  return !hasReadAccess(data) ? 'e-fe-locked e-fe-hidden' : 'e-fe-locked';
2201
2200
  }
@@ -2206,9 +2205,7 @@ function getAccessClass(data) {
2206
2205
  * @returns {boolean} - returns read access.
2207
2206
  * @private
2208
2207
  */
2209
- // eslint-disable-next-line
2210
2208
  function hasReadAccess(data) {
2211
- // eslint-disable-next-line
2212
2209
  const permission = getValue('permission', data);
2213
2210
  return (permission && !getValue('read', permission)) ? false : true;
2214
2211
  }
@@ -2219,9 +2216,7 @@ function hasReadAccess(data) {
2219
2216
  * @returns {boolean} - returns edit access.
2220
2217
  * @private
2221
2218
  */
2222
- // eslint-disable-next-line
2223
2219
  function hasEditAccess(data) {
2224
- // eslint-disable-next-line
2225
2220
  const permission = getValue('permission', data);
2226
2221
  return permission ? ((getValue('read', permission) && getValue('write', permission))) : true;
2227
2222
  }
@@ -2232,9 +2227,7 @@ function hasEditAccess(data) {
2232
2227
  * @returns {boolean} - returns content access.
2233
2228
  * @private
2234
2229
  */
2235
- // eslint-disable-next-line
2236
2230
  function hasContentAccess(data) {
2237
- // eslint-disable-next-line
2238
2231
  const permission = getValue('permission', data);
2239
2232
  return permission ? ((getValue('read', permission) && getValue('writeContents', permission))) : true;
2240
2233
  }
@@ -2245,9 +2238,7 @@ function hasContentAccess(data) {
2245
2238
  * @returns {boolean} - returns upload access.
2246
2239
  * @private
2247
2240
  */
2248
- // eslint-disable-next-line
2249
2241
  function hasUploadAccess(data) {
2250
- // eslint-disable-next-line
2251
2242
  const permission = getValue('permission', data);
2252
2243
  return permission ? ((getValue('read', permission) && getValue('upload', permission))) : true;
2253
2244
  }
@@ -2258,9 +2249,7 @@ function hasUploadAccess(data) {
2258
2249
  * @returns {boolean} - returns download access.
2259
2250
  * @private
2260
2251
  */
2261
- // eslint-disable-next-line
2262
2252
  function hasDownloadAccess(data) {
2263
- // eslint-disable-next-line
2264
2253
  const permission = getValue('permission', data);
2265
2254
  return permission ? ((getValue('read', permission) && getValue('download', permission))) : true;
2266
2255
  }
@@ -2272,7 +2261,6 @@ function hasDownloadAccess(data) {
2272
2261
  * @private
2273
2262
  */
2274
2263
  function createNewFolder(parent) {
2275
- // eslint-disable-next-line
2276
2264
  const details = parent.itemData[0];
2277
2265
  if (!hasContentAccess(details)) {
2278
2266
  createDeniedDialog(parent, details, permissionEditContents);
@@ -2289,7 +2277,6 @@ function createNewFolder(parent) {
2289
2277
  * @private
2290
2278
  */
2291
2279
  function uploadItem(parent) {
2292
- // eslint-disable-next-line
2293
2280
  const details = parent.itemData[0];
2294
2281
  if (!hasUploadAccess(details)) {
2295
2282
  createDeniedDialog(parent, details, permissionUpload);
@@ -2300,7 +2287,70 @@ function uploadItem(parent) {
2300
2287
  uploadEle.click();
2301
2288
  }
2302
2289
  }
2290
+ /**
2291
+ * Close dialog popup handler
2292
+ *
2293
+ * @param {IFileManager} parent - specifies the parent.
2294
+ * @returns {void}
2295
+ * @private
2296
+ */
2297
+ function closePopup(parent) {
2298
+ if (!isNullOrUndefined(parent.dialogObj)) {
2299
+ parent.dialogObj.hide();
2300
+ }
2301
+ }
2302
+ /**
2303
+ * Access control handler
2304
+ *
2305
+ * @param {IFileManager} parent - specifies the parent.
2306
+ * @param {Object[]} itemData - specifies the item elements.
2307
+ * @param {string} action - specifies the action.
2308
+ * @param {boolean} isPathPermision - specifies the path permission.
2309
+ * @returns {string} returns the path.
2310
+ * @private
2311
+ */
2312
+ function getAccessDetails(parent, itemData, action, isPathPermision) {
2313
+ let accessMessage = '';
2314
+ for (let i = 0; i < itemData.length; i++) {
2315
+ let permission = getValue('permission', itemData[i]);
2316
+ if (permission == null) {
2317
+ permission = undefined;
2318
+ }
2319
+ if (isPathPermision) {
2320
+ if (permission && (!getValue('read', permission) || !getValue('writeContents', permission))) {
2321
+ accessMessage = getValue('message', getValue('permission', itemData[i]));
2322
+ if (accessMessage === '') {
2323
+ accessMessage = getLocaleText(parent, 'Access-Message').replace('{0}', getValue('name', itemData[i])).replace('{1}', 'writeContents');
2324
+ }
2325
+ }
2326
+ }
2327
+ else {
2328
+ const copyOrMovePermission = action === 'copy' ? getValue('copy', permission) : getValue('write', permission);
2329
+ if (permission && (!getValue('read', permission) || !copyOrMovePermission)) {
2330
+ accessMessage = getValue('message', getValue('permission', itemData[i]));
2331
+ if (accessMessage === '') {
2332
+ accessMessage = getLocaleText(parent, 'Access-Message').replace('{0}', getValue('name', itemData[i])).replace('{1}', action);
2333
+ }
2334
+ }
2335
+ }
2336
+ if (accessMessage !== '') {
2337
+ parent.responseData = {
2338
+ cwd: null,
2339
+ details: null,
2340
+ error: {
2341
+ code: '401',
2342
+ message: accessMessage,
2343
+ fileExists: null
2344
+ },
2345
+ files: null
2346
+ };
2347
+ break;
2348
+ }
2349
+ }
2350
+ return accessMessage;
2351
+ }
2303
2352
 
2353
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2304
2354
  /**
2305
2355
  * Function to read the content from given path in File Manager.
2306
2356
  *
@@ -2311,14 +2361,12 @@ function uploadItem(parent) {
2311
2361
  * @private
2312
2362
  */
2313
2363
  function read(parent, event, path) {
2314
- // eslint-disable-next-line
2315
2364
  const itemData = parent.itemData;
2316
2365
  for (let i = 0; i < itemData.length; i++) {
2317
2366
  if (isNullOrUndefined(getValue('hasChild', itemData[i]))) {
2318
2367
  setValue('hasChild', false, itemData[i]);
2319
2368
  }
2320
2369
  }
2321
- // eslint-disable-next-line
2322
2370
  const data = { action: 'read', path: path, showHiddenItems: parent.showHiddenItems, data: itemData };
2323
2371
  createAjax(parent, data, readSuccess, event);
2324
2372
  }
@@ -2331,7 +2379,6 @@ function read(parent, event, path) {
2331
2379
  * @private
2332
2380
  */
2333
2381
  function createFolder(parent, itemName) {
2334
- // eslint-disable-next-line
2335
2382
  const data = { action: 'create', path: parent.path, name: itemName, data: parent.itemData };
2336
2383
  createAjax(parent, data, createSuccess, itemName);
2337
2384
  }
@@ -2344,11 +2391,8 @@ function createFolder(parent, itemName) {
2344
2391
  * @private
2345
2392
  */
2346
2393
  function filter(parent, event) {
2347
- // eslint-disable-next-line
2348
2394
  const data = { action: 'filter', path: parent.path, showHiddenItems: parent.showHiddenItems, data: [getPathObject(parent)] };
2349
- // eslint-disable-next-line
2350
2395
  let filterData;
2351
- // eslint-disable-next-line
2352
2396
  const filterDataVal = parent.filterData ? extend(filterData, data, parent.filterData) : data;
2353
2397
  createAjax(parent, filterDataVal, filterSuccess, event, getValue('action', filterDataVal));
2354
2398
  }
@@ -2380,7 +2424,6 @@ function rename(parent, path, itemNewName) {
2380
2424
  newName = fPath.replace(path, '') + itemNewName;
2381
2425
  }
2382
2426
  }
2383
- // eslint-disable-next-line
2384
2427
  const data = {
2385
2428
  action: 'rename', path: path, name: name, newName: newName, data: parent.itemData, showFileExtension: parent.showFileExtension
2386
2429
  };
@@ -2399,10 +2442,7 @@ function rename(parent, path, itemNewName) {
2399
2442
  * @returns {void}
2400
2443
  * @private
2401
2444
  */
2402
- function paste(parent, path, names, targetPath, pasteOperation,
2403
- // eslint-disable-next-line
2404
- renameItems, actionRecords) {
2405
- // eslint-disable-next-line
2445
+ function paste(parent, path, names, targetPath, pasteOperation, renameItems, actionRecords) {
2406
2446
  const data = {
2407
2447
  action: pasteOperation, path: path, targetData: parent.itemData[0],
2408
2448
  targetPath: targetPath, names: names, renameFiles: renameItems, data: actionRecords
@@ -2421,7 +2461,6 @@ renameItems, actionRecords) {
2421
2461
  * @private
2422
2462
  */
2423
2463
  function Delete(parent, items, path, operation) {
2424
- // eslint-disable-next-line
2425
2464
  const data = { action: operation, path: path, names: items, data: parent.itemData };
2426
2465
  createAjax(parent, data, deleteSuccess, path);
2427
2466
  }
@@ -2437,26 +2476,23 @@ function Delete(parent, items, path, operation) {
2437
2476
  * @private
2438
2477
  */
2439
2478
  function GetDetails(parent, names, path, operation) {
2440
- // eslint-disable-next-line
2441
2479
  const data = { action: operation, path: path, names: names, data: parent.itemData };
2442
2480
  createAjax(parent, data, detailsSuccess, path, operation);
2443
2481
  }
2444
2482
  /**
2445
- * Function for createAjax in File Manager.
2483
+ * Function for getDateFormat in File Manager.
2446
2484
  *
2447
2485
  * @param {IFileManager} parent - specifies the parent element.
2448
- * @param {Object} data - specifies the data.
2449
- * @param {Function} fn - specifies the fn.
2450
- * @param {string} event - specifies the event.
2451
- * @param {string} operation - specifies the operation.
2452
- * @param {string} targetPath - specifies the target path.
2453
2486
  * @returns {void}
2454
2487
  * @private
2455
2488
  */
2456
2489
  function getDateFormat(parent) {
2457
2490
  const columns = parent.detailsViewSettings.columns;
2458
2491
  let dateFormat;
2459
- for (var i = 0; i < columns.length; i++) {
2492
+ if (!columns) {
2493
+ return null;
2494
+ }
2495
+ for (let i = 0; i < columns.length; i++) {
2460
2496
  if (columns[i].field === '_fm_modified') {
2461
2497
  if (!isNullOrUndefined(columns[i].format)) {
2462
2498
  dateFormat = columns[i].format.toString();
@@ -2466,10 +2502,393 @@ function getDateFormat(parent) {
2466
2502
  }
2467
2503
  return dateFormat;
2468
2504
  }
2469
- function createAjax(
2470
- // eslint-disable-next-line
2471
- parent, data, fn, event, operation, targetPath) {
2472
- // eslint-disable-next-line
2505
+ /**
2506
+ * Checks whether fileSystemData is enabled.
2507
+ *
2508
+ * @param {IFileManager} parent - specifies the parent element.
2509
+ * @returns {boolean} - returns the boolean value.
2510
+ */
2511
+ function isFileSystemData(parent) {
2512
+ const isFileSystemData = parent.fileSystemData.length >= 0 && isNullOrUndefined(parent.ajaxSettings.url);
2513
+ return isFileSystemData;
2514
+ }
2515
+ /**
2516
+ * Function to check whether file already exist or not.
2517
+ *
2518
+ * @param {Record<string, any>} fileSystemData - specifies the file data.
2519
+ * @param {string} name - specifies the name.
2520
+ * @returns {boolean} - returns the boolean value.
2521
+ * @private
2522
+ */
2523
+ function isFileExists(fileSystemData, name) {
2524
+ const isExists = fileSystemData.some((item) => item.name === name);
2525
+ return isExists;
2526
+ }
2527
+ /**
2528
+ * Function to find the index value of a file or folder.
2529
+ *
2530
+ * @param {IFileManager} parent - specifies the parent element.
2531
+ * @param {number} id - specifies the id.
2532
+ * @returns {number} - returns the index value.
2533
+ * @private
2534
+ */
2535
+ function findIndexById(parent, id) {
2536
+ const index = parent.fileSystemData.findIndex((item) => String(item.id) === String(id));
2537
+ return index;
2538
+ }
2539
+ /**
2540
+ * Function to get the entire data of a file or folder using id value.
2541
+ *
2542
+ * @param {IFileManager} parent - specifies the parent element.
2543
+ * @param {number | string} id - specifies the id.
2544
+ * @returns {Object} - returns the data.
2545
+ * @private
2546
+ */
2547
+ function filterById(parent, id) {
2548
+ const data = parent.fileSystemData.filter((item) => String(item.id) === String(id))[0];
2549
+ return data;
2550
+ }
2551
+ /**
2552
+ * Function to get the entire data of a file or folder for a parent.
2553
+ *
2554
+ * @param {IFileManager} parent - specifies the parent element.
2555
+ * @param {number | string} parentId - specifies the parent id.
2556
+ * @returns {Object[]} - returns the data.
2557
+ * @private
2558
+ */
2559
+ function filterByParent(parent, parentId) {
2560
+ const data = parent.fileSystemData.filter((item) => String(item.parentId) === String(parentId));
2561
+ return data;
2562
+ }
2563
+ /**
2564
+ * Function to create a new copied file or folder.
2565
+ *
2566
+ * @param {Record<string, any>} data - specifies the file or folder data.
2567
+ * @param {Record<string, any>} target - specifies the target data.
2568
+ * @param {string} itemName - specifies the item name.
2569
+ * @param {boolean} isCopy - specifies the copy operation.
2570
+ * @returns {Record<string, Object>} - returns the data.
2571
+ * @private
2572
+ */
2573
+ function createNewItem(data, target, itemName, isCopy) {
2574
+ const newItem = {};
2575
+ //Construct the new folder details.
2576
+ for (const key in data) {
2577
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
2578
+ newItem[key] = null;
2579
+ }
2580
+ }
2581
+ const currentDate = new Date();
2582
+ const folderPath = target.id !== 0 ? target.filterPath + target.name : '\\';
2583
+ Object.assign(newItem, {
2584
+ dateCreated: currentDate,
2585
+ dateModified: currentDate,
2586
+ filterPath: folderPath,
2587
+ hasChild: isCopy ? data.hasChild : false,
2588
+ id: getUid(itemName === null ? data.name : itemName),
2589
+ isFile: isCopy ? data.isFile : false,
2590
+ name: itemName === null ? data.name : itemName,
2591
+ parentId: target.id,
2592
+ size: isCopy ? data.size : 0,
2593
+ type: isCopy ? data.type : ''
2594
+ });
2595
+ return newItem;
2596
+ }
2597
+ /**
2598
+ * Function to create an error response.
2599
+ *
2600
+ * @param {IFileManager} parent - specifies the parent element.
2601
+ * @param {string} message - specifies the error message.
2602
+ * @param {string} code - specifies the error code.
2603
+ * @param {Object[]} fileName - specifies the file name.
2604
+ * @returns {void}
2605
+ * @private
2606
+ */
2607
+ function createErrorObject(parent, message, code, fileName) {
2608
+ parent.responseData = {
2609
+ cwd: null,
2610
+ details: null,
2611
+ error: {
2612
+ code: code,
2613
+ message: message,
2614
+ fileExists: fileName != null ? fileName : null
2615
+ },
2616
+ files: null
2617
+ };
2618
+ }
2619
+ /**
2620
+ * Function to trigger folder creation.
2621
+ *
2622
+ * @param {IFileManager} parent - specifies the parent element.
2623
+ * @param {Object} data - specifies the data.
2624
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2625
+ * @returns {void}
2626
+ * @private
2627
+ */
2628
+ function triggerFolderCreation(parent, data, eventArgs) {
2629
+ const createEventArgs = {
2630
+ folderName: getValue('name', data),
2631
+ cancel: false,
2632
+ path: getValue('path', data),
2633
+ parentFolder: getValue('data', data)
2634
+ };
2635
+ parent.trigger('beforeFolderCreate', createEventArgs, function (args) {
2636
+ if (args.cancel) {
2637
+ eventArgs.cancel = true;
2638
+ return;
2639
+ }
2640
+ if (isFileSystemData(parent)) {
2641
+ if (!isFileExists(parent.fileSystemData, args.folderName)) {
2642
+ const data = args.parentFolder[0];
2643
+ const newObject = createNewItem(data, data, args.folderName, false);
2644
+ parent.fileSystemData.push(newObject);
2645
+ }
2646
+ else {
2647
+ const message = 'A file or folder with the name ' + args.folderName + ' already exists.';
2648
+ createErrorObject(parent, message, '400', null);
2649
+ }
2650
+ }
2651
+ });
2652
+ }
2653
+ /**
2654
+ * Function to trigger delete operation.
2655
+ *
2656
+ * @param {IFileManager} parent - specifies the parent element.
2657
+ * @param {Object} data - specifies the data.
2658
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2659
+ * @returns {void}
2660
+ * @private
2661
+ */
2662
+ function triggerDeleteOperation(parent, data, eventArgs) {
2663
+ const deleteEventArgs = {
2664
+ cancel: false,
2665
+ itemData: getValue('data', data),
2666
+ path: getValue('path', data)
2667
+ };
2668
+ parent.trigger('beforeDelete', deleteEventArgs, function (args) {
2669
+ if (args.cancel) {
2670
+ eventArgs.cancel = true;
2671
+ return;
2672
+ }
2673
+ if (isFileSystemData(parent)) {
2674
+ args.itemData.forEach((itemData) => {
2675
+ const index = findIndexById(parent, itemData.id);
2676
+ if (index !== -1) {
2677
+ parent.fileSystemData.splice(index, 1);
2678
+ }
2679
+ if (!itemData.isFile) {
2680
+ const subItems = parent.fileSystemData.filter(function (obj) { return obj.filterPath.includes(itemData.name); });
2681
+ subItems.forEach((subItem) => {
2682
+ const index = findIndexById(parent, subItem.id);
2683
+ if (index !== -1) {
2684
+ parent.fileSystemData.splice(index, 1);
2685
+ }
2686
+ });
2687
+ }
2688
+ });
2689
+ }
2690
+ });
2691
+ }
2692
+ /**
2693
+ * Function to trigger rename operation.
2694
+ *
2695
+ * @param {IFileManager} parent - specifies the parent element.
2696
+ * @param {Object} data - specifies the data.
2697
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2698
+ * @returns {void}
2699
+ * @private
2700
+ */
2701
+ function triggerRenameOperation(parent, data, eventArgs) {
2702
+ const renameEventArgs = {
2703
+ cancel: false,
2704
+ newName: getValue('newName', data),
2705
+ itemData: getValue('data', data),
2706
+ path: getValue('path', data)
2707
+ };
2708
+ parent.trigger('beforeRename', renameEventArgs, function (args) {
2709
+ if (args.cancel) {
2710
+ eventArgs.cancel = true;
2711
+ return;
2712
+ }
2713
+ if (isFileSystemData(parent)) {
2714
+ if (!isFileExists(parent.fileSystemData, args.newName)) {
2715
+ const fileData = filterById(parent, args.itemData[0].id);
2716
+ fileData.name = args.newName;
2717
+ }
2718
+ else {
2719
+ const message = 'Cannot rename' + args.itemData[0].name + 'to' + args.newName + ': destination already exists.';
2720
+ createErrorObject(parent, message, '400', null);
2721
+ }
2722
+ }
2723
+ });
2724
+ }
2725
+ /**
2726
+ * Function to trigger move or copy operation.
2727
+ *
2728
+ * @param {IFileManager} parent - specifies the parent element.
2729
+ * @param {Object} data - specifies the data.
2730
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2731
+ * @returns {void}
2732
+ * @private
2733
+ */
2734
+ function triggerMoveOrCopyOperation(parent, data, eventArgs) {
2735
+ const moveEventArgs = {
2736
+ cancel: false,
2737
+ itemData: getValue('data', data),
2738
+ isCopy: getValue('action', data) === 'copy' ? true : false,
2739
+ path: getValue('path', data),
2740
+ targetData: getValue('targetData', data),
2741
+ targetPath: getValue('targetPath', data)
2742
+ };
2743
+ parent.trigger('beforeMove', moveEventArgs, function (args) {
2744
+ if (args.cancel) {
2745
+ eventArgs.cancel = true;
2746
+ return;
2747
+ }
2748
+ if (isFileSystemData(parent)) {
2749
+ const message = 'File Already Exists';
2750
+ const action = getValue('action', data);
2751
+ const itemPermission = getAccessDetails(parent, args.itemData, action, false);
2752
+ const pathPermission = getAccessDetails(parent, [args.targetData], action, true);
2753
+ const file = [];
2754
+ parent.pasteNodes = [];
2755
+ if (itemPermission === '' && pathPermission === '') {
2756
+ if (args.isCopy) {
2757
+ const folderSubItems = filterByParent(parent, args.targetData.id);
2758
+ const copiedFolders = args.itemData;
2759
+ copiedFolders.forEach((itemData) => {
2760
+ if (!isFileExists(folderSubItems, itemData.name) || getValue('renameFiles', data).length > 0) {
2761
+ if (getValue('renameFiles', data).length > 0) {
2762
+ const names = itemData.name.split('.');
2763
+ const name = itemData.name.includes('.') ? names[0] + '(' + parent.existingFileCount + ').' + names[1] : names[0] + '(' + parent.existingFileCount + ')';
2764
+ copyFolderItems(parent, itemData, args.targetData, name);
2765
+ parent.responseData.error = null;
2766
+ parent.existingFileCount++;
2767
+ return;
2768
+ }
2769
+ copyFolderItems(parent, itemData, args.targetData, null);
2770
+ }
2771
+ else {
2772
+ file.push(itemData.name);
2773
+ }
2774
+ });
2775
+ if (file.length > 0) {
2776
+ createErrorObject(parent, message, '400', file);
2777
+ }
2778
+ return;
2779
+ }
2780
+ let target = args.targetData;
2781
+ const getTargetFiles = filterByParent(parent, target.id);
2782
+ for (let i = 0; i < args.itemData.length; i++) {
2783
+ const currItem = args.itemData[i];
2784
+ if (!isFileExists(getTargetFiles, currItem.name) || getValue('renameFiles', data).length > 0) {
2785
+ if (!target.hasChild) {
2786
+ target.hasChild = !currItem.isFile;
2787
+ }
2788
+ if (!currItem.isFile) {
2789
+ //Check whether the source folder include other sub folders or not.
2790
+ const subItems = currItem.parentId !== 0
2791
+ ? filterByParent(parent, currItem.parentID) : [];
2792
+ const itemData = filterById(parent, currItem.parentId);
2793
+ itemData.hasChild = subItems.length > 1 ? true : false;
2794
+ }
2795
+ const fileData = filterById(parent, currItem.id);
2796
+ if (getValue('renameFiles', data).length > 0) {
2797
+ const names = currItem.name.split('.');
2798
+ currItem.name = currItem.name.includes('.') ? names[0] + '(' + parent.existingFileCount + ').' + names[1] : names[0] + '(' + parent.existingFileCount + ')';
2799
+ fileData.name = currItem.name;
2800
+ parent.responseData.error = null;
2801
+ parent.existingFileCount++;
2802
+ parent.dropData = target;
2803
+ parent.dropPath = args.path;
2804
+ const pathArray = args.targetPath.replace(/^\/|\/$/g, '').split('/');
2805
+ target = filterById(parent, pathArray[pathArray.length - 1]);
2806
+ }
2807
+ fileData.parentId = target.id;
2808
+ fileData.filterPath = target.id === 0 ? '\\' : target.filterPath + target.name + '\\';
2809
+ }
2810
+ else {
2811
+ file.push(currItem.name);
2812
+ }
2813
+ }
2814
+ if (file.length > 0) {
2815
+ createErrorObject(parent, message, '400', file);
2816
+ }
2817
+ }
2818
+ }
2819
+ });
2820
+ }
2821
+ /**
2822
+ * Function to trigger search operation.
2823
+ *
2824
+ * @param {IFileManager} parent - specifies the parent element.
2825
+ * @param {Object} data - specifies the data.
2826
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2827
+ * @returns {void}
2828
+ * @private
2829
+ */
2830
+ function triggerSearchOperation(parent, data, eventArgs) {
2831
+ const searchEventArgs = {
2832
+ searchResults: getValue('data', data),
2833
+ cancel: false,
2834
+ path: getValue('path', data),
2835
+ searchText: getValue('searchString', data),
2836
+ caseSensitive: getValue('caseSensitive', data),
2837
+ showHiddenItems: getValue('showHiddenItems', data)
2838
+ };
2839
+ parent.trigger('search', searchEventArgs, function (args) {
2840
+ if (args.cancel) {
2841
+ eventArgs.cancel = true;
2842
+ }
2843
+ });
2844
+ }
2845
+ /**
2846
+ * Function to trigger client side events.
2847
+ *
2848
+ * @param {IFileManager} parent - specifies the parent element.
2849
+ * @param {Object} data - specifies the data.
2850
+ * @param {BeforeSendEventArgs} eventArgs - specifies the eventArgs.
2851
+ * @returns {void}
2852
+ * @private
2853
+ */
2854
+ function triggerClientEvents(parent, data, eventArgs) {
2855
+ switch (getValue('action', data)) {
2856
+ case 'create': {
2857
+ triggerFolderCreation(parent, data, eventArgs);
2858
+ break;
2859
+ }
2860
+ case 'delete': {
2861
+ triggerDeleteOperation(parent, data, eventArgs);
2862
+ break;
2863
+ }
2864
+ case 'rename': {
2865
+ triggerRenameOperation(parent, data, eventArgs);
2866
+ break;
2867
+ }
2868
+ case 'move':
2869
+ case 'copy': {
2870
+ triggerMoveOrCopyOperation(parent, data, eventArgs);
2871
+ break;
2872
+ }
2873
+ case 'search': {
2874
+ triggerSearchOperation(parent, data, eventArgs);
2875
+ break;
2876
+ }
2877
+ }
2878
+ }
2879
+ /**
2880
+ * Creates an AJAX request for the file manager.
2881
+ *
2882
+ * @param {IFileManager} parent - The parent file manager instance.
2883
+ * @param {Object} data - The data object for the AJAX request.
2884
+ * @param {Function} fn - The callback function to be executed after the AJAX request.
2885
+ * @param {string} [event] - The event type for the AJAX request.
2886
+ * @param {string} [operation] - The operation type for the AJAX request.
2887
+ * @param {string} [targetPath] - The target path for the AJAX request.
2888
+ * @returns {void}
2889
+ * @private
2890
+ */
2891
+ function createAjax(parent, data, fn, event, operation, targetPath) {
2473
2892
  const ajaxSettings = {
2474
2893
  url: parent.ajaxSettings.url,
2475
2894
  type: 'POST',
@@ -2482,9 +2901,64 @@ parent, data, fn, event, operation, targetPath) {
2482
2901
  beforeSend: null
2483
2902
  };
2484
2903
  const eventArgs = { action: getValue('action', data), ajaxSettings: ajaxSettings, cancel: false };
2904
+ triggerClientEvents(parent, data, eventArgs);
2485
2905
  parent.trigger('beforeSend', eventArgs, (beforeSendArgs) => {
2486
2906
  if (!beforeSendArgs.cancel) {
2487
2907
  parent.notify(beforeRequest, {});
2908
+ if (isFileSystemData(parent)) {
2909
+ const filePath = event === 'node-expand' || event === 'finalize-end' ? getValue('path', data) : parent.path;
2910
+ const pathArray = filePath.replace(/^\/|\/$/g, '').split('/');
2911
+ const idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length != 0)
2912
+ || (event === 'paste-end' && (parent.targetModule === 'largeiconsview' || parent.targetModule === 'detailsview'))
2913
+ ? getValue('data', data)[0].id : pathArray[pathArray.length - 1];
2914
+ const action = getValue('action', data);
2915
+ const isFileOperation = (action === 'move' || action === 'rename' || action === 'copy' || action === 'delete' || action === 'search') && event !== 'rename-end';
2916
+ if (action === 'read' || action === 'create' || event === 'rename-end') {
2917
+ parent.responseData = {
2918
+ cwd: filterById(parent, parent.path === '/' && event !== 'node-expand' && event != 'rename-end-parent' ? 0 : idValue),
2919
+ details: null,
2920
+ error: null,
2921
+ files: filterByParent(parent, parent.path === '/' && event !== 'node-expand' && event != 'rename-end-parent' ? 0 : idValue)
2922
+ };
2923
+ if (isNullOrUndefined(parent.responseData.cwd)) {
2924
+ const message = 'Cannot load empty data within the File Manager.';
2925
+ createErrorObject(parent, message, '400', null);
2926
+ }
2927
+ }
2928
+ else if (isFileOperation && parent.responseData.error === null) {
2929
+ let itemData = action === 'search' || action === 'delete' ? getValue('data', data) : [];
2930
+ if (itemData.length === 0) {
2931
+ itemData = getValue('data', data).map((item) => filterById(parent, item.id));
2932
+ }
2933
+ parent.responseData = {
2934
+ cwd: null,
2935
+ details: null,
2936
+ error: null,
2937
+ files: itemData
2938
+ };
2939
+ }
2940
+ else if (getValue('action', data) === 'details') {
2941
+ const itemData = getValue('data', data);
2942
+ const details = itemData[0];
2943
+ const isMultipleFiles = itemData.length > 1;
2944
+ const itemNames = itemData.map((item) => item.name);
2945
+ const totalSize = isMultipleFiles ? getSize(itemData.reduce((accumulator, currentObject) => accumulator + (currentObject.size || 0), 0)) : getSize(details.size);
2946
+ const path = (parent.pathNames.includes(details.name) ? parent.pathNames.join('/') : parent.pathNames.join('/') + '/' + details.name);
2947
+ parent.responseData.details = Object.assign({
2948
+ location: isMultipleFiles ? null : path,
2949
+ multipleFiles: isMultipleFiles,
2950
+ name: itemNames.join(', '),
2951
+ size: totalSize
2952
+ }, isMultipleFiles ? {} : {
2953
+ created: details.dateCreated,
2954
+ isFile: details.isFile,
2955
+ modified: details.dateModified,
2956
+ permission: details.permission
2957
+ });
2958
+ }
2959
+ performReadOperation(parent, parent.responseData, fn, data, event, operation, targetPath, beforeSendArgs);
2960
+ return;
2961
+ }
2488
2962
  const ajax = new Ajax({
2489
2963
  url: getValue('url', beforeSendArgs.ajaxSettings),
2490
2964
  type: getValue('type', beforeSendArgs.ajaxSettings),
@@ -2509,61 +2983,7 @@ parent, data, fn, event, operation, targetPath) {
2509
2983
  if (typeof (result) === 'string') {
2510
2984
  result = JSON.parse(result);
2511
2985
  }
2512
- parent.notify(afterRequest, { action: 'success' });
2513
- const id = parent.expandedId ? parent.expandedId : parent.pathId[parent.pathId.length - 1];
2514
- if (!isNullOrUndefined(result.cwd) && (getValue('action', data) === 'read')) {
2515
- result.cwd.name = (parent.pathId.length === 1) ? (parent.rootAliasName || result.cwd.name) : result.cwd.name;
2516
- setValue('_fm_id', id, result.cwd);
2517
- setValue(id, result.cwd, parent.feParent);
2518
- if (!isNullOrUndefined(result.files) || result.error.code === '401') {
2519
- if ((event === 'finalize-end' || event === 'initial-end') && parent.pathNames.length === 0) {
2520
- // eslint-disable-next-line
2521
- const root = getValue(parent.pathId[0], parent.feParent);
2522
- parent.pathNames[0] = getValue('name', root);
2523
- parent.hasId = !isNullOrUndefined(getValue('id', root));
2524
- }
2525
- if (event === 'finalize-end') {
2526
- generatePath(parent);
2527
- }
2528
- }
2529
- }
2530
- const intl = new Internationalization(parent.locale);
2531
- if (!isNullOrUndefined(result.files)) {
2532
- setDateObject(result.files, intl, getDateFormat(parent));
2533
- for (let i = 0, len = result.files.length; i < len; i++) {
2534
- // eslint-disable-next-line
2535
- const item = result.files[i];
2536
- setValue('_fm_iconClass', fileType(item), item);
2537
- }
2538
- if (getValue('action', data) === 'read') {
2539
- setNodeId(result, id);
2540
- setValue(id, result.files, parent.feFiles);
2541
- }
2542
- }
2543
- if (!isNullOrUndefined(result.details) && !isNullOrUndefined(parent.rootAliasName)) {
2544
- const rootName = parent.rootAliasName || getValue('name', result.details);
2545
- let location = getValue('location', result.details).replace(new RegExp('/', 'g'), '\\');
2546
- if ((getValue('path', data) === '/') || (parent.hasId && getValue('path', data).match(/[/]/g).length === 1)) {
2547
- if (getValue('names', data).length === 0) {
2548
- setValue('name', rootName, result.details);
2549
- location = rootName;
2550
- }
2551
- else {
2552
- location = location.replace(location.substring(0, location.indexOf('\\')), rootName);
2553
- }
2554
- }
2555
- else {
2556
- location = location.replace(location.substring(0, location.indexOf('\\')), rootName);
2557
- }
2558
- setValue('location', location, result.details);
2559
- }
2560
- fn(parent, result, event, operation, targetPath);
2561
- if (!isNullOrUndefined(result.files) && (event === 'path-changed' || event === 'finalize-end' || event === 'open-end' || event === 'drop-path')) {
2562
- parent.notify(searchTextChange, result);
2563
- }
2564
- if (typeof getValue('onSuccess', beforeSendArgs.ajaxSettings) === 'function') {
2565
- getValue('onSuccess', beforeSendArgs.ajaxSettings)();
2566
- }
2986
+ performReadOperation(parent, result, fn, data, event, operation, targetPath, beforeSendArgs);
2567
2987
  },
2568
2988
  onFailure: () => {
2569
2989
  const result = {
@@ -2581,6 +3001,117 @@ parent, data, fn, event, operation, targetPath) {
2581
3001
  }
2582
3002
  });
2583
3003
  }
3004
+ /**
3005
+ * Function to get file size.
3006
+ *
3007
+ * @param {number} size - specifies the size.
3008
+ * @returns {string} - returns the size.
3009
+ * @private
3010
+ */
3011
+ function getSize(size) {
3012
+ let hz;
3013
+ if (size < 1024) {
3014
+ hz = size + ' B';
3015
+ }
3016
+ else if (size < 1024 * 1024) {
3017
+ hz = (size / 1024).toFixed(2) + ' KB';
3018
+ }
3019
+ else if (size < 1024 * 1024 * 1024) {
3020
+ hz = (size / 1024 / 1024).toFixed(2) + ' MB';
3021
+ }
3022
+ else {
3023
+ hz = (size / 1024 / 1024 / 1024).toFixed(2) + ' GB';
3024
+ }
3025
+ return hz;
3026
+ }
3027
+ /**
3028
+ * Function to perform read operation.
3029
+ *
3030
+ * @param {IFileManager} parent - specifies the parent element.
3031
+ * @param {ReadArgs} result - specifies the result.
3032
+ * @param {Function} fn - specifies the function.
3033
+ * @param {Object} data - specifies the data.
3034
+ * @param {string} event - specifies the event.
3035
+ * @param {string} operation - specifies the operation.
3036
+ * @param {string} targetPath - specifies the targetPath.
3037
+ * @param {BeforeSendEventArgs} beforeSendArgs - specifies the eventArgs.
3038
+ * @returns {void}
3039
+ * @private
3040
+ */
3041
+ function performReadOperation(parent, result, fn, data, event, operation, targetPath, beforeSendArgs) {
3042
+ parent.notify(afterRequest, { action: 'success' });
3043
+ const id = parent.expandedId ? parent.expandedId : parent.pathId[parent.pathId.length - 1];
3044
+ if (!isNullOrUndefined(result.cwd) && (getValue('action', data) === 'read')) {
3045
+ result.cwd.name = (parent.pathId.length === 1) ? (parent.rootAliasName || result.cwd.name) : result.cwd.name;
3046
+ setValue('_fm_id', id, result.cwd);
3047
+ setValue(id, result.cwd, parent.feParent);
3048
+ if (!isNullOrUndefined(result.files) || result.error.code === '401') {
3049
+ if ((event === 'finalize-end' || event === 'initial-end') && parent.pathNames.length === 0) {
3050
+ const root = getValue(parent.pathId[0], parent.feParent);
3051
+ parent.pathNames[0] = getValue('name', root);
3052
+ parent.hasId = !isNullOrUndefined(getValue('id', root));
3053
+ }
3054
+ if (event === 'finalize-end') {
3055
+ generatePath(parent);
3056
+ }
3057
+ }
3058
+ }
3059
+ const intl = new Internationalization(parent.locale);
3060
+ if (!isNullOrUndefined(result.files)) {
3061
+ setDateObject(result.files, intl, getDateFormat(parent));
3062
+ for (let i = 0, len = result.files.length; i < len; i++) {
3063
+ const item = result.files[i];
3064
+ setValue('_fm_iconClass', fileType(item), item);
3065
+ }
3066
+ if (getValue('action', data) === 'read' || isFileSystemData(parent) && getValue('action', data) === 'search') {
3067
+ setNodeId(result, id);
3068
+ setValue(id, result.files, parent.feFiles);
3069
+ }
3070
+ }
3071
+ if (!isNullOrUndefined(result.details) && !isNullOrUndefined(parent.rootAliasName)) {
3072
+ const rootName = parent.rootAliasName || getValue('name', result.details);
3073
+ let location = getValue('location', result.details).replace(new RegExp('/', 'g'), '\\');
3074
+ if ((getValue('path', data) === '/') || (parent.hasId && getValue('path', data).match(/[/]/g).length === 1)) {
3075
+ if (getValue('names', data).length === 0) {
3076
+ setValue('name', rootName, result.details);
3077
+ location = rootName;
3078
+ }
3079
+ else {
3080
+ location = location.replace(location.substring(0, location.indexOf('\\')), rootName);
3081
+ }
3082
+ }
3083
+ else {
3084
+ location = location.replace(location.substring(0, location.indexOf('\\')), rootName);
3085
+ }
3086
+ setValue('location', location, result.details);
3087
+ }
3088
+ fn(parent, result, event, operation, targetPath);
3089
+ if (!isNullOrUndefined(result.files) && (event === 'path-changed' || event === 'finalize-end' || event === 'open-end' || event === 'drop-path')) {
3090
+ parent.notify(searchTextChange, result);
3091
+ }
3092
+ if (typeof getValue('onSuccess', beforeSendArgs.ajaxSettings) === 'function') {
3093
+ getValue('onSuccess', beforeSendArgs.ajaxSettings)();
3094
+ }
3095
+ }
3096
+ /**
3097
+ * Function to copy operation.
3098
+ *
3099
+ * @param {IFileManager} parent - specifies the parent element.
3100
+ * @param {Object} data - specifies the data.
3101
+ * @param {string} target - specifies the target.
3102
+ * @param {string} itemName - specifies the item name.
3103
+ * @returns {void}
3104
+ * @private
3105
+ */
3106
+ function copyFolderItems(parent, data, target, itemName) {
3107
+ const newObject = createNewItem(data, target, itemName, true);
3108
+ parent.fileSystemData.push(newObject);
3109
+ parent.pasteNodes.push(newObject.id);
3110
+ const copiedItems = filterByParent(parent, data.id);
3111
+ for (let i = 0; i < copiedItems.length; i++) {
3112
+ copyFolderItems(parent, copiedItems[i], newObject, null);
3113
+ }
3114
+ }
2584
3115
  /**
2585
3116
  * Function for trigger Ajax failure in File Manager.
2586
3117
  *
@@ -2594,9 +3125,7 @@ parent, data, fn, event, operation, targetPath) {
2594
3125
  * @returns {void}
2595
3126
  * @private
2596
3127
  */
2597
- function triggerAjaxFailure(
2598
- // eslint-disable-next-line
2599
- parent, beforeSendArgs, fn, result, event, operation, targetPath) {
3128
+ function triggerAjaxFailure(parent, beforeSendArgs, fn, result, event, operation, targetPath) {
2600
3129
  parent.notify(afterRequest, { action: 'failure' });
2601
3130
  fn(parent, result, event, operation, targetPath);
2602
3131
  if (typeof getValue('onFailure', beforeSendArgs.ajaxSettings) === 'function') {
@@ -2672,8 +3201,14 @@ function createSuccess(parent, result, itemName) {
2672
3201
  if (parent.dialogObj && parent.dialogObj.visible) {
2673
3202
  parent.dialogObj.hide();
2674
3203
  }
2675
- parent.createdItem = result.files[0];
3204
+ parent.createdItem = isFileSystemData(parent) ? result.files[result.files.length - 1] : result.files[0];
2676
3205
  parent.breadcrumbbarModule.searchObj.value = '';
3206
+ const createEventArgs = {
3207
+ folderName: itemName,
3208
+ path: parent.path,
3209
+ parentFolder: parent.itemData
3210
+ };
3211
+ parent.trigger('folderCreate', createEventArgs);
2677
3212
  const args = { action: 'create', result: result };
2678
3213
  parent.trigger('success', args);
2679
3214
  parent.itemData = [getPathObject(parent)];
@@ -2714,11 +3249,10 @@ function createSuccess(parent, result, itemName) {
2714
3249
  *
2715
3250
  * @param {IFileManager} parent - specifies the parent element.
2716
3251
  * @param {ReadArgs} result - specifies the result.
2717
- * @param {string} path - specifies the path
2718
3252
  * @returns {void}
2719
3253
  * @private
2720
3254
  */
2721
- function renameSuccess(parent, result, path) {
3255
+ function renameSuccess(parent, result) {
2722
3256
  if (!isNullOrUndefined(result.files)) {
2723
3257
  if (!isNullOrUndefined(parent.dialogObj)) {
2724
3258
  parent.dialogObj.hide();
@@ -2726,15 +3260,22 @@ function renameSuccess(parent, result, path) {
2726
3260
  const args = { action: 'rename', result: result };
2727
3261
  parent.trigger('success', args);
2728
3262
  parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
3263
+ const renameEventArgs = {
3264
+ newName: parent.renamedItem.name,
3265
+ itemData: parent.renamedItem,
3266
+ path: parent.path
3267
+ };
3268
+ parent.trigger('rename', renameEventArgs);
2729
3269
  if (parent.activeModule === 'navigationpane') {
2730
3270
  parent.pathId.pop();
2731
3271
  parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
2732
3272
  read(parent, renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
2733
3273
  parent.itemData[0] = parent.renamedItem;
2734
- read(parent, pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
2735
3274
  if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
2736
3275
  parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
2737
3276
  }
3277
+ read(parent, pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
3278
+ parent.renamedItem = null;
2738
3279
  }
2739
3280
  else {
2740
3281
  parent.itemData = [getPathObject(parent)];
@@ -2780,6 +3321,14 @@ function renameSuccess(parent, result, path) {
2780
3321
  * @private
2781
3322
  */
2782
3323
  function pasteSuccess(parent, result, path, operation) {
3324
+ const moveorcopyEventArgs = {
3325
+ itemData: result.files,
3326
+ isCopy: operation === 'copy' ? true : false,
3327
+ path: path,
3328
+ targetData: parent.itemData[0],
3329
+ targetPath: parent.path
3330
+ };
3331
+ parent.trigger('move', moveorcopyEventArgs);
2783
3332
  if (result.error && result.error.fileExists) {
2784
3333
  parent.fileLength = 0;
2785
3334
  if (!isNullOrUndefined(result.files)) {
@@ -2814,6 +3363,11 @@ function pasteSuccess(parent, result, path, operation) {
2814
3363
  * @private
2815
3364
  */
2816
3365
  function deleteSuccess(parent, result, path) {
3366
+ const deleteEventArgs = {
3367
+ itemData: result.files,
3368
+ path: path
3369
+ };
3370
+ parent.trigger('delete', deleteEventArgs);
2817
3371
  if (!isNullOrUndefined(result.files)) {
2818
3372
  parent.setProperties({ path: path }, true);
2819
3373
  parent.itemData = [getPathObject(parent)];
@@ -2878,10 +3432,7 @@ function onFailure(parent, result, action) {
2878
3432
  * @returns {void}
2879
3433
  * @private
2880
3434
  */
2881
- function Search(
2882
- // eslint:disable-next-line
2883
- parent, event, path, searchString, showHiddenItems, caseSensitive) {
2884
- // eslint-disable-next-line
3435
+ function Search(parent, event, path, searchString, showHiddenItems, caseSensitive) {
2885
3436
  const data = {
2886
3437
  action: 'search', path: path, searchString: searchString, showHiddenItems: showHiddenItems, caseSensitive: caseSensitive,
2887
3438
  data: parent.itemData
@@ -2920,7 +3471,6 @@ function searchSuccess(parent, result, event) {
2920
3471
  */
2921
3472
  function Download(parent, path, items) {
2922
3473
  const downloadUrl = parent.ajaxSettings.downloadUrl ? parent.ajaxSettings.downloadUrl : parent.ajaxSettings.url;
2923
- // eslint-disable-next-line
2924
3474
  const data = { 'action': 'download', 'path': path, 'names': items, 'data': parent.itemData };
2925
3475
  const ajaxSettings = {
2926
3476
  url: downloadUrl,
@@ -2984,12 +3534,12 @@ function Download(parent, path, items) {
2984
3534
  const result = {
2985
3535
  error: {
2986
3536
  code: e.status.toString(),
2987
- message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl,
2988
- },
3537
+ message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl
3538
+ }
2989
3539
  };
2990
3540
  createDialog(parent, 'Error', result);
2991
3541
  parent.trigger('failure', downloadArgs);
2992
- },
3542
+ }
2993
3543
  });
2994
3544
  fetch.send(JSON.stringify(downloadArgs.data));
2995
3545
  }
@@ -3003,12 +3553,11 @@ function Download(parent, path, items) {
3003
3553
  * @param {string} text - specifies the text string.
3004
3554
  * @param {ReadArgs | SelectedEventArgs} e - specifies the type of event args.
3005
3555
  * @param {FileDetails} details - specifies the file details.
3006
- * @param {string[]} replaceItems - specifies the replacement.
3007
3556
  * @returns {void}
3008
3557
  * @private
3009
3558
  */
3010
- function createDialog(parent, text, e, details, replaceItems) {
3011
- const options = getOptions(parent, text, e, details, replaceItems);
3559
+ function createDialog(parent, text, e, details) {
3560
+ const options = getOptions(parent, text, e, details);
3012
3561
  if (isNullOrUndefined(parent.dialogObj)) {
3013
3562
  parent.dialogObj = new Dialog({
3014
3563
  beforeOpen: keydownAction.bind(this, parent, options.dialogName),
@@ -3529,11 +4078,10 @@ function createInput(ele, placeholder) {
3529
4078
  * @param {string} text - specifies the text string.
3530
4079
  * @param {ReadArgs | SelectedEventArgs} e - specifies the event arguements.
3531
4080
  * @param {FileDetails} details - specifies the file details.
3532
- * @param {string[]} replaceItems - specifies the replacement items.
3533
4081
  * @returns {DialogOptions} - specifies the dialog options.
3534
4082
  * @private
3535
4083
  */
3536
- function getOptions(parent, text, e, details, replaceItems) {
4084
+ function getOptions(parent, text, e, details) {
3537
4085
  const options = {
3538
4086
  header: '', content: '', buttons: [], dialogName: ''
3539
4087
  };
@@ -3541,11 +4089,12 @@ function getOptions(parent, text, e, details, replaceItems) {
3541
4089
  let formattedString;
3542
4090
  let intl;
3543
4091
  let strArr;
3544
- let fileType$$1;
4092
+ let fileType;
3545
4093
  let location;
3546
4094
  options.open = () => { triggerPopupOpen(parent, parent.dialogObj, options.dialogName); };
3547
4095
  options.close = () => { triggerPopupClose(parent, parent.dialogObj, options.dialogName); };
3548
4096
  text = (details && details.multipleFiles === true) ? 'MultipleFileDetails' : text;
4097
+ let index;
3549
4098
  switch (text) {
3550
4099
  case 'NewFolder':
3551
4100
  options.dialogName = 'Create Folder';
@@ -3578,7 +4127,7 @@ function getOptions(parent, text, e, details, replaceItems) {
3578
4127
  options.buttons = [
3579
4128
  {
3580
4129
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Yes') },
3581
- click: (e) => {
4130
+ click: () => {
3582
4131
  onDeleteSubmit(parent);
3583
4132
  }
3584
4133
  },
@@ -3630,31 +4179,30 @@ function getOptions(parent, text, e, details, replaceItems) {
3630
4179
  options.buttons = [
3631
4180
  {
3632
4181
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Ok') },
3633
- click: (e) => {
4182
+ click: () => {
3634
4183
  parent.dialogObj.hide();
3635
4184
  }
3636
4185
  }
3637
4186
  ];
3638
4187
  break;
3639
4188
  case 'MultipleFileDetails':
3640
- let index;
3641
4189
  options.dialogName = 'File Details';
3642
4190
  strArr = parent.itemData.map((val) => {
3643
4191
  index = val.name.indexOf('.') + 1;
3644
4192
  return (index === 0 && (!val.isFile)) ? 'Folder' : ((index !== 0) ? val.name.substr(index).replace(' ', '') : 'undetermined');
3645
4193
  });
3646
- if (strArr[0] == undefined) {
4194
+ if (strArr[0] === undefined) {
3647
4195
  strArr = details.name.split(',').map((val) => {
3648
4196
  index = val.indexOf('.') + 1;
3649
4197
  return (index === 0) ? 'Folder' : val.substr(index).replace(' ', '');
3650
4198
  });
3651
4199
  }
3652
- fileType$$1 = strArr.every((val, i, arr) => val === arr[0]) ?
4200
+ fileType = strArr.every((val, i, arr) => val === arr[0]) ?
3653
4201
  ((strArr[0] === 'Folder') ? 'Folder' : strArr[0].toLocaleUpperCase() + ' Type') : 'Multiple Types';
3654
4202
  location = details.location;
3655
4203
  options.header = details.name;
3656
4204
  options.content = '<table><tr><td>' + getLocaleText(parent, 'Type')
3657
- + ':</td><td class="' + VALUE + '">' + fileType$$1 + '</td></tr>' +
4205
+ + ':</td><td class="' + VALUE + '">' + fileType + '</td></tr>' +
3658
4206
  '<tr><td>' + getLocaleText(parent, 'Size') + ':</td><td>' +
3659
4207
  details.size + '<span class="' + VALUE + '" title ="' + details.size
3660
4208
  + '"></span></td></tr>' + '<tr><td>' + getLocaleText(parent, 'Location') +
@@ -3686,7 +4234,7 @@ function getOptions(parent, text, e, details, replaceItems) {
3686
4234
  options.buttons = [
3687
4235
  {
3688
4236
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Ok') },
3689
- click: (e) => {
4237
+ click: () => {
3690
4238
  parent.dialogObj.hide();
3691
4239
  }
3692
4240
  }
@@ -3980,10 +4528,6 @@ function updateImage(parent) {
3980
4528
  imgWrap.style.height = (content.offsetHeight - paddingHeight) + 'px';
3981
4529
  }
3982
4530
 
3983
- /**
3984
- * File Manager common operations
3985
- */
3986
-
3987
4531
  /**
3988
4532
  * LargeIconsView module
3989
4533
  */
@@ -4094,11 +4638,10 @@ class LargeIconsView {
4094
4638
  }
4095
4639
  this.parent.virtualizationModule.setUIVirtualization();
4096
4640
  }
4097
- // eslint-disable-next-line
4098
4641
  this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
4099
4642
  this.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.listElements));
4100
4643
  this.element.appendChild(this.listElements);
4101
- this.listElements.setAttribute("aria-label", "listbox");
4644
+ this.listElements.setAttribute('aria-label', 'listbox');
4102
4645
  this.preventImgDrag();
4103
4646
  this.createDragObj();
4104
4647
  if (this.itemList.length === 0) {
@@ -4146,7 +4689,7 @@ class LargeIconsView {
4146
4689
  }
4147
4690
  }
4148
4691
  }
4149
- comparer(x, y, xObj, yObj) {
4692
+ comparer(x, y) {
4150
4693
  if (this.parent.sortOrder === 'Descending') {
4151
4694
  const z = x;
4152
4695
  x = y;
@@ -4154,7 +4697,6 @@ class LargeIconsView {
4154
4697
  }
4155
4698
  return this.parent.sortComparer(x, y);
4156
4699
  }
4157
- ;
4158
4700
  preventImgDrag() {
4159
4701
  let i = 0;
4160
4702
  while (i < this.itemList.length) {
@@ -4205,8 +4747,7 @@ class LargeIconsView {
4205
4747
  this.parent.activeElements = [];
4206
4748
  this.parent.dragData = [];
4207
4749
  for (let i = 0; i < activeEle.length; i++) {
4208
- // eslint-disable-next-line
4209
- this.parent.dragData.push(this.getItemObject(activeEle[i]));
4750
+ this.parent.dragData.push(this.getItemObject(activeEle[parseInt(i.toString(), 10)]));
4210
4751
  this.parent.activeElements.push(activeEle[i]);
4211
4752
  }
4212
4753
  getModule(this.parent, dragLi);
@@ -4217,10 +4758,8 @@ class LargeIconsView {
4217
4758
  onDropInit(args) {
4218
4759
  if (this.parent.targetModule === this.getModuleName()) {
4219
4760
  const dropLi = closest(args.target, '.e-list-item');
4220
- // eslint-disable-next-line
4221
4761
  const cwdData = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feParent);
4222
4762
  if (dropLi) {
4223
- // eslint-disable-next-line
4224
4763
  const info = this.getItemObject(dropLi);
4225
4764
  this.parent.dropPath = info.isFile ? this.parent.path : getFullPath(this.parent, info, this.parent.path);
4226
4765
  this.parent.dropData = info.isFile ? cwdData : info;
@@ -4312,10 +4851,8 @@ class LargeIconsView {
4312
4851
  }
4313
4852
  }
4314
4853
  }
4315
- // eslint-disable-next-line
4316
4854
  renderList(args) {
4317
4855
  let i = 0;
4318
- // eslint-disable-next-line
4319
4856
  const items = JSON.parse(JSON.stringify(args.files));
4320
4857
  while (i < items.length) {
4321
4858
  const icon = fileType(items[i]);
@@ -4397,7 +4934,6 @@ class LargeIconsView {
4397
4934
  if (this.parent.renamedItem) {
4398
4935
  this.clearSelect();
4399
4936
  this.addSelection(this.parent.renamedItem);
4400
- this.parent.renamedItem = null;
4401
4937
  }
4402
4938
  }
4403
4939
  }
@@ -4539,7 +5075,6 @@ class LargeIconsView {
4539
5075
  this.parent.on(filterEnd, this.onPathChanged, this);
4540
5076
  }
4541
5077
  onActionFailure() { this.isInteraction = true; this.isInteracted = true; }
4542
- // eslint-disable-next-line
4543
5078
  onMenuItemData(args) {
4544
5079
  if (this.parent.activeModule === this.getModuleName()) {
4545
5080
  const ele = closest(args.target, 'li');
@@ -4677,37 +5212,35 @@ class LargeIconsView {
4677
5212
  }
4678
5213
  wireClickEvent(toBind) {
4679
5214
  if (toBind) {
4680
- // eslint-disable-next-line
4681
- const proxy = this;
4682
5215
  this.clickObj = new Touch(this.element, {
4683
5216
  tap: (eve) => {
4684
5217
  eve.originalEvent.preventDefault();
4685
- if (proxy.parent.isDevice) {
4686
- proxy.tapCount = eve.tapCount;
4687
- proxy.tapEvent = eve;
5218
+ if (this.parent.isDevice) {
5219
+ this.tapCount = eve.tapCount;
5220
+ this.tapEvent = eve;
4688
5221
  setTimeout(() => {
4689
- if (proxy.tapCount > 0) {
4690
- proxy.doTapAction(proxy.tapEvent);
5222
+ if (this.tapCount > 0) {
5223
+ this.doTapAction(this.tapEvent);
4691
5224
  }
4692
- proxy.tapCount = 0;
5225
+ this.tapCount = 0;
4693
5226
  }, 350);
4694
5227
  }
4695
5228
  else {
4696
5229
  if (eve.tapCount === 2 && eve.originalEvent.which !== 3) {
4697
- proxy.dblClickHandler(eve);
5230
+ this.dblClickHandler(eve);
4698
5231
  }
4699
5232
  else {
4700
- proxy.clickHandler(eve);
5233
+ this.clickHandler(eve);
4701
5234
  }
4702
5235
  }
4703
5236
  },
4704
5237
  tapHold: (e) => {
4705
- if (proxy.parent.isDevice) {
4706
- proxy.multiSelect = proxy.parent.allowMultiSelection ? true : false;
4707
- if (proxy.parent.allowMultiSelection) {
4708
- addClass([proxy.parent.element], MULTI_SELECT);
5238
+ if (this.parent.isDevice) {
5239
+ this.multiSelect = this.parent.allowMultiSelection ? true : false;
5240
+ if (this.parent.allowMultiSelection) {
5241
+ addClass([this.parent.element], MULTI_SELECT);
4709
5242
  }
4710
- proxy.clickHandler(e);
5243
+ this.clickHandler(e);
4711
5244
  }
4712
5245
  }
4713
5246
  });
@@ -4758,6 +5291,7 @@ class LargeIconsView {
4758
5291
  this.parent.isFile = false;
4759
5292
  let action = 'select';
4760
5293
  if (e.which === 3 && !isNullOrUndefined(item) && item.classList.contains(ACTIVE)) {
5294
+ this.addActive(item);
4761
5295
  this.updateType(item);
4762
5296
  return;
4763
5297
  }
@@ -4847,7 +5381,6 @@ class LargeIconsView {
4847
5381
  this.parent.isFile = false;
4848
5382
  if (!isNullOrUndefined(item)) {
4849
5383
  this.updateType(item);
4850
- // eslint-disable-next-line
4851
5384
  const details = this.getItemObject(item);
4852
5385
  if (!hasReadAccess(details)) {
4853
5386
  createDeniedDialog(this.parent, details, permissionRead);
@@ -4891,7 +5424,6 @@ class LargeIconsView {
4891
5424
  this.parent.isFile = isNullOrUndefined(folder) ? true : false;
4892
5425
  }
4893
5426
  /* istanbul ignore next */
4894
- // eslint:disable-next-line
4895
5427
  keydownActionHandler(e) {
4896
5428
  if (!this.isRendered) {
4897
5429
  return;
@@ -4935,12 +5467,9 @@ class LargeIconsView {
4935
5467
  case 'ctrlD':
4936
5468
  e.preventDefault();
4937
5469
  break;
4938
- default:
4939
- break;
4940
5470
  }
4941
5471
  }
4942
5472
  /* istanbul ignore next */
4943
- // eslint:disable-next-line
4944
5473
  keyActionHandler(e) {
4945
5474
  if (!this.isRendered) {
4946
5475
  return;
@@ -5075,7 +5604,6 @@ class LargeIconsView {
5075
5604
  performDelete() {
5076
5605
  if (this.parent.selectedItems && this.parent.selectedItems.length > 0) {
5077
5606
  this.updateSelectedData();
5078
- // eslint-disable-next-line
5079
5607
  const data = this.parent.itemData;
5080
5608
  for (let i = 0; i < data.length; i++) {
5081
5609
  if (!hasEditAccess(data[i])) {
@@ -5094,7 +5622,6 @@ class LargeIconsView {
5094
5622
  }
5095
5623
  updateRenameData() {
5096
5624
  const item = select('.' + LIST_ITEM + '.' + ACTIVE, this.element);
5097
- // eslint-disable-next-line
5098
5625
  const data = this.getItemObject(item);
5099
5626
  updateRenamingData(this.parent, data);
5100
5627
  }
@@ -5310,7 +5837,6 @@ class LargeIconsView {
5310
5837
  }
5311
5838
  }
5312
5839
  getDataName(item) {
5313
- // eslint-disable-next-line
5314
5840
  const data = this.getItemObject(item);
5315
5841
  return getItemName(this.parent, data);
5316
5842
  }
@@ -5383,7 +5909,6 @@ class LargeIconsView {
5383
5909
  this.perRow = perRow;
5384
5910
  }
5385
5911
  triggerSelection(action, item) {
5386
- // eslint-disable-next-line
5387
5912
  const data = [];
5388
5913
  if (this.isSelectAllCalled) {
5389
5914
  for (let i = 0, len = this.itemList.length; i < len; i++) {
@@ -5393,15 +5918,15 @@ class LargeIconsView {
5393
5918
  else {
5394
5919
  data[0] = this.getItemObject(item);
5395
5920
  }
5396
- const eventArgs = {
5397
- action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteraction, cancel: false, target: this.isSelectAllCalled ? null : item
5921
+ const eventArgs = { action: action, fileDetails: data.length > 1
5922
+ ? data : data[0], isInteracted: this.isInteraction, cancel: false, target: this.isSelectAllCalled ? null
5923
+ : item
5398
5924
  };
5399
5925
  this.parent.trigger('fileSelection', eventArgs);
5400
5926
  this.isInteraction = true;
5401
5927
  return eventArgs;
5402
5928
  }
5403
5929
  triggerSelect(action, item) {
5404
- // eslint-disable-next-line
5405
5930
  const data = [];
5406
5931
  if (this.isSelectAllCalled) {
5407
5932
  for (let i = 0, len = this.itemList.length; i < len; i++) {
@@ -5413,7 +5938,9 @@ class LargeIconsView {
5413
5938
  data[0] = this.getItemObject(item);
5414
5939
  }
5415
5940
  this.parent.visitedData = data.length > 1 ? data[data.length - 1] : data[0];
5416
- const eventArgs = { action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteracted };
5941
+ const eventArgs = { action: action, fileDetails: data.length > 1
5942
+ ? data
5943
+ : data[0], isInteracted: this.isInteracted };
5417
5944
  this.parent.trigger('fileSelect', eventArgs);
5418
5945
  this.isInteracted = true;
5419
5946
  }
@@ -5426,29 +5953,25 @@ class LargeIconsView {
5426
5953
  }
5427
5954
  getIndexes(items, byId) {
5428
5955
  const indexes = [];
5429
- const filter$$1 = byId ? 'id' : 'name';
5956
+ const filter = byId ? 'id' : 'name';
5430
5957
  for (let i = 0, len = this.items.length; i < len; i++) {
5431
- if (items.indexOf(getValue(filter$$1, this.items[i])) !== -1) {
5958
+ if (items.indexOf(getValue(filter, this.items[i])) !== -1) {
5432
5959
  indexes.push(i);
5433
5960
  }
5434
5961
  }
5435
5962
  return indexes;
5436
5963
  }
5437
- // eslint-disable-next-line
5438
5964
  getItemObject(item) {
5439
5965
  const index = this.itemList.indexOf(item);
5440
5966
  return this.items[index];
5441
5967
  }
5442
- // eslint-disable-next-line
5443
5968
  addSelection(data) {
5444
- // eslint-disable-next-line
5445
5969
  let resultData = [];
5446
5970
  if (this.parent.hasId) {
5447
5971
  resultData = new DataManager(this.items).
5448
5972
  executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
5449
5973
  }
5450
5974
  else {
5451
- // eslint-disable-next-line
5452
5975
  const newData = new DataManager(this.items).
5453
5976
  executeLocal(new Query().where('name', 'equal', getValue('name', data), false));
5454
5977
  if (newData.length > 0) {
@@ -5463,7 +5986,6 @@ class LargeIconsView {
5463
5986
  }
5464
5987
  }
5465
5988
  updateSelectedData() {
5466
- // eslint-disable-next-line
5467
5989
  const data = [];
5468
5990
  const items = selectAll('.' + LIST_ITEM + '.' + ACTIVE, this.element);
5469
5991
  for (let i = 0; i < items.length; i++) {
@@ -5471,7 +5993,6 @@ class LargeIconsView {
5471
5993
  }
5472
5994
  this.parent.itemData = data;
5473
5995
  }
5474
- // eslint-disable-next-line
5475
5996
  onMethodCall(args) {
5476
5997
  if (this.parent.view !== 'LargeIcons') {
5477
5998
  return;
@@ -5539,7 +6060,6 @@ class LargeIconsView {
5539
6060
  if (indexes.length === 0) {
5540
6061
  return;
5541
6062
  }
5542
- // eslint-disable-next-line
5543
6063
  const data = [];
5544
6064
  const newIds = [];
5545
6065
  for (let i = 0; i < indexes.length; i++) {
@@ -5557,7 +6077,6 @@ class LargeIconsView {
5557
6077
  if (index.length === 0) {
5558
6078
  return;
5559
6079
  }
5560
- // eslint-disable-next-line
5561
6080
  const data = [];
5562
6081
  const newIds = [];
5563
6082
  for (let i = 0; i < index.length; i++) {
@@ -5733,8 +6252,8 @@ class BreadCrumbBar {
5733
6252
  });
5734
6253
  this.searchObj.appendTo('#' + this.parent.element.id + SEARCH_ID);
5735
6254
  this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);
5736
- const search$$1 = this.searchObj.element.nextElementSibling;
5737
- EventHandler.add(search$$1, 'mousedown', this.searchChangeHandler.bind(this), this);
6255
+ const search = this.searchObj.element.nextElementSibling;
6256
+ EventHandler.add(search, 'mousedown', this.searchChangeHandler.bind(this), this);
5738
6257
  EventHandler.add(this.searchObj.element, 'keyup', this.onKeyUp.bind(this), this);
5739
6258
  }
5740
6259
  const searchWrap = this.parent.breadCrumbBarNavigation.querySelector('.e-search-wrap');
@@ -5748,7 +6267,6 @@ class BreadCrumbBar {
5748
6267
  breadCrumbBarWidth = diff;
5749
6268
  }
5750
6269
  else {
5751
- // eslint-disable-next-line
5752
6270
  const items = [];
5753
6271
  for (let j = 0; j <= i; j++) {
5754
6272
  const liElement = liElements[j];
@@ -5758,7 +6276,6 @@ class BreadCrumbBar {
5758
6276
  });
5759
6277
  }
5760
6278
  const subMenuLi = this.parent.createElement('li', { className: 'e-breadcrumb-menu' });
5761
- // eslint-disable-next-line
5762
6279
  const attributes = { className: 'e-breadcrumb-submenu' };
5763
6280
  const subMenuSpan = this.parent.createElement('button', attributes);
5764
6281
  subMenuLi.appendChild(subMenuSpan);
@@ -5799,7 +6316,6 @@ class BreadCrumbBar {
5799
6316
  }
5800
6317
  /* istanbul ignore next */
5801
6318
  subMenuSelectOperations(event) {
5802
- // eslint-disable-next-line
5803
6319
  const args = { target: event.element };
5804
6320
  this.addressPathClickHandler(args);
5805
6321
  }
@@ -5846,7 +6362,6 @@ class BreadCrumbBar {
5846
6362
  }
5847
6363
  }
5848
6364
  }
5849
- // eslint-disable-next-line
5850
6365
  triggerFileOpen(data) {
5851
6366
  const eventArgs = { cancel: false, fileDetails: data, module: 'BreadCrumbBar' };
5852
6367
  delete eventArgs.cancel;
@@ -6003,7 +6518,7 @@ class BreadCrumbBar {
6003
6518
  /**
6004
6519
  * ContextMenu module
6005
6520
  */
6006
- class ContextMenu$2 {
6521
+ class ContextMenu {
6007
6522
  /**
6008
6523
  * Constructor for the ContextMenu module
6009
6524
  *
@@ -6023,7 +6538,7 @@ class ContextMenu$2 {
6023
6538
  downarrow: 'downarrow',
6024
6539
  uparrow: 'uparrown'
6025
6540
  };
6026
- this.contextMenu = new ContextMenu({
6541
+ this.contextMenu = new ContextMenu$1({
6027
6542
  enableRtl: this.parent.enableRtl,
6028
6543
  locale: this.parent.locale,
6029
6544
  target: '#' + this.parent.element.id,
@@ -6055,12 +6570,13 @@ class ContextMenu$2 {
6055
6570
  }
6056
6571
  onBeforeClose() {
6057
6572
  this.menuTarget = null;
6058
- if (!this.isMenuItemClicked && this.parent.pathId.length > 1 && this.parent.activeModule == 'navigationpane') {
6573
+ if (!this.isMenuItemClicked && this.parent.pathId.length > 1 && this.parent.activeModule === 'navigationpane') {
6059
6574
  this.parent.pathId.pop();
6060
6575
  const parentKey = [];
6061
6576
  const itemKeys = Object.keys(this.parent.feParent);
6062
6577
  for (const item of itemKeys) {
6063
- var itemData = getValue(item, this.parent.feParent);
6578
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6579
+ const itemData = getValue(item, this.parent.feParent);
6064
6580
  if (this.parent.pathNames.indexOf(itemData.name) !== -1) {
6065
6581
  parentKey.push(itemData._fm_id);
6066
6582
  }
@@ -6074,7 +6590,6 @@ class ContextMenu$2 {
6074
6590
  onBeforeOpen(args) {
6075
6591
  let selected = false;
6076
6592
  let uid;
6077
- // eslint-disable-next-line
6078
6593
  let data;
6079
6594
  let treeFolder = false;
6080
6595
  let target = args.event.target;
@@ -6086,7 +6601,7 @@ class ContextMenu$2 {
6086
6601
  }
6087
6602
  this.targetElement = this.parent.view === 'Details' ? closest(target, 'tr.e-row') : target;
6088
6603
  if (this.parent.enableVirtualization && (target.classList.contains('e-virtual-bottom') || target.classList.contains('e-virtualtable'))) {
6089
- target = target.parentElement.closest("div");
6604
+ target = target.parentElement.closest('div');
6090
6605
  }
6091
6606
  const view = this.getTargetView(target);
6092
6607
  this.updateActiveModule();
@@ -6095,7 +6610,6 @@ class ContextMenu$2 {
6095
6610
  (closest(target, '#' + this.parent.element.id + BREADCRUMBBAR_ID)) ||
6096
6611
  (closest(target, '#' + this.parent.element.id + TOOLBAR_ID))) {
6097
6612
  args.cancel = true;
6098
- // eslint:disable-next-line
6099
6613
  }
6100
6614
  else if (!(this.parent.view === 'LargeIcons') && this.targetElement &&
6101
6615
  this.targetElement.classList.contains('e-emptyrow')) {
@@ -6104,24 +6618,20 @@ class ContextMenu$2 {
6104
6618
  }
6105
6619
  else if (closest(target, '.' + EMPTY)) {
6106
6620
  this.setLayoutItem(target);
6107
- // eslint:disable-next-line
6108
6621
  }
6109
6622
  else if (!target.classList.contains(MENU_ITEM) &&
6110
6623
  !target.classList.contains(MENU_ICON) && !target.classList.contains(SUBMENU_ICON)) {
6111
6624
  /* istanbul ignore next */
6112
- // eslint:disable-next-line
6113
6625
  if (this.parent.view === 'LargeIcons' && !isNullOrUndefined(closest(target, 'li')) && !closest(target, '#' + this.parent.element.id + TREE_ID)) {
6114
6626
  const eveArgs = { ctrlKey: true, shiftKey: true };
6115
6627
  if (!closest(target, 'li').classList.contains('e-active')) {
6116
6628
  this.parent.largeiconsviewModule.doSelection(target, eveArgs);
6117
6629
  }
6118
- // eslint-disable-next-line
6119
6630
  data = this.parent.visitedData;
6120
6631
  selected = true;
6121
6632
  }
6122
6633
  else if (!isNullOrUndefined(closest(target, 'tr.e-row'))) {
6123
6634
  uid = this.targetElement.getAttribute('data-uid');
6124
- // eslint-disable-next-line
6125
6635
  data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
6126
6636
  if (isNullOrUndefined(this.targetElement.getAttribute('aria-selected'))) {
6127
6637
  /* istanbul ignore next */
@@ -6150,7 +6660,6 @@ class ContextMenu$2 {
6150
6660
  this.disabledItems.push('Delete', 'Rename', 'Cut', 'Copy');
6151
6661
  }
6152
6662
  /* istanbul ignore next */
6153
- // eslint:disable-next-line
6154
6663
  }
6155
6664
  else if (view === 'TreeView' || view === 'GridView' || view === 'LargeIcon') {
6156
6665
  this.setLayoutItem(target);
@@ -6261,16 +6770,36 @@ class ContextMenu$2 {
6261
6770
  if (this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
6262
6771
  this.disabledItems.push('Open');
6263
6772
  }
6773
+ if (this.parent.selectedItems.length === 0) {
6774
+ const renameIndex = this.disabledItems.indexOf('Rename');
6775
+ if (renameIndex !== -1) {
6776
+ this.disabledItems.splice(renameIndex, 1);
6777
+ }
6778
+ }
6264
6779
  }
6265
- else if (this.parent.selectedItems.length !== 1 && this.parent.activeModule !== 'navigationpane') {
6266
- this.disabledItems.push('Rename', 'Paste');
6780
+ else if (this.parent.activeModule !== 'navigationpane') {
6781
+ if (this.parent.selectedItems.length === 1) {
6782
+ const renameIndex = this.disabledItems.indexOf('Rename');
6783
+ if (renameIndex !== -1) {
6784
+ this.disabledItems.splice(renameIndex, 1);
6785
+ }
6786
+ }
6787
+ else {
6788
+ this.disabledItems.push('Rename', 'Paste');
6789
+ }
6267
6790
  }
6268
6791
  }
6269
6792
  setFileItem() {
6270
6793
  this.menuType = 'file';
6271
6794
  this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.file.map((item) => item.trim()));
6272
6795
  this.contextMenu.dataBind();
6273
- if (this.parent.selectedItems.length !== 1) {
6796
+ if (this.parent.selectedItems.length === 1) {
6797
+ const renameIndex = this.disabledItems.indexOf('Rename');
6798
+ if (renameIndex !== -1) {
6799
+ this.disabledItems.splice(renameIndex, 1);
6800
+ }
6801
+ }
6802
+ else {
6274
6803
  this.disabledItems.push('Rename');
6275
6804
  }
6276
6805
  }
@@ -6285,7 +6814,7 @@ class ContextMenu$2 {
6285
6814
  this.disabledItems.push('SelectAll');
6286
6815
  }
6287
6816
  else {
6288
- this.disabledItems = this.disabledItems.filter(item => item !== 'SelectAll');
6817
+ this.disabledItems = this.disabledItems.filter((item) => item !== 'SelectAll');
6289
6818
  }
6290
6819
  if (this.parent.selectedNodes.length === 0) {
6291
6820
  if (this.disabledItems.indexOf('Paste') === -1) {
@@ -6305,13 +6834,11 @@ class ContextMenu$2 {
6305
6834
  return -1;
6306
6835
  }
6307
6836
  }
6308
- // eslint-disable-next-line
6309
6837
  getMenuItemData() {
6310
6838
  if (this.menuType === 'layout') {
6311
6839
  return getPathObject(this.parent);
6312
6840
  }
6313
6841
  else {
6314
- // eslint-disable-next-line
6315
6842
  const args = { target: this.menuTarget };
6316
6843
  this.parent.notify(menuItemData, args);
6317
6844
  return this.parent.itemData[0];
@@ -6323,7 +6850,6 @@ class ContextMenu$2 {
6323
6850
  return;
6324
6851
  }
6325
6852
  const itemText = args.item.id.substr((this.parent.element.id + '_cm_').length);
6326
- // eslint-disable-next-line
6327
6853
  let details;
6328
6854
  if (itemText === 'refresh' || itemText === 'newfolder' || itemText === 'upload') {
6329
6855
  details = [getPathObject(this.parent)];
@@ -6348,7 +6874,6 @@ class ContextMenu$2 {
6348
6874
  let sItems;
6349
6875
  if (!menuClickArgs.cancel) {
6350
6876
  this.isMenuItemClicked = true;
6351
- // eslint:disable-next-line
6352
6877
  switch (itemText) {
6353
6878
  case 'cut':
6354
6879
  cutFiles(this.parent);
@@ -6436,19 +6961,10 @@ class ContextMenu$2 {
6436
6961
  case 'upload':
6437
6962
  uploadItem(this.parent);
6438
6963
  break;
6439
- /* istanbul ignore next */
6440
6964
  case 'name':
6441
- /* istanbul ignore next */
6442
- // eslint-disable-next-line no-fallthrough
6443
6965
  case 'size':
6444
- /* istanbul ignore next */
6445
- // eslint-disable-next-line no-fallthrough
6446
6966
  case 'date':
6447
- /* istanbul ignore next */
6448
- // eslint-disable-next-line no-fallthrough
6449
6967
  case 'ascending':
6450
- /* istanbul ignore next */
6451
- // eslint-disable-next-line no-fallthrough
6452
6968
  case 'descending':
6453
6969
  /* istanbul ignore next */
6454
6970
  sortbyClickHandler(this.parent, args);
@@ -6459,12 +6975,10 @@ class ContextMenu$2 {
6459
6975
  sortbyClickHandler(this.parent, args);
6460
6976
  break;
6461
6977
  /* istanbul ignore next */
6462
- // eslint:disable-next-line
6463
6978
  case 'largeiconsview':
6464
6979
  updateLayout(this.parent, 'LargeIcons');
6465
6980
  break;
6466
6981
  /* istanbul ignore next */
6467
- // eslint:disable-next-line
6468
6982
  case 'detailsview':
6469
6983
  updateLayout(this.parent, 'Details');
6470
6984
  break;
@@ -6636,7 +7150,6 @@ class ContextMenu$2 {
6636
7150
  /**
6637
7151
  * Specifies the default locale of FileManager component
6638
7152
  */
6639
- // eslint-disable-next-line
6640
7153
  const defaultLocale = {
6641
7154
  'NewFolder': 'New folder',
6642
7155
  'Upload': 'Upload',
@@ -6757,14 +7270,13 @@ var FileManager_1;
6757
7270
  let FileManager = FileManager_1 = class FileManager extends Component {
6758
7271
  constructor(options, element) {
6759
7272
  super(options, element);
6760
- // eslint-disable-next-line
6761
7273
  this.filterData = null;
6762
7274
  this.selectedNodes = [];
6763
7275
  this.duplicateItems = [];
6764
- // eslint-disable-next-line
6765
7276
  this.duplicateRecords = [];
6766
7277
  this.previousPath = [];
6767
7278
  this.nextPath = [];
7279
+ this.existingFileCount = 0;
6768
7280
  this.isLayoutChange = false;
6769
7281
  this.layoutSelectedItems = [];
6770
7282
  this.renamedId = null;
@@ -6786,11 +7298,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
6786
7298
  this.isOpened = false;
6787
7299
  this.isRetryOpened = false;
6788
7300
  this.isPathDrag = false;
6789
- // eslint-disable-next-line
6790
7301
  this.searchedItems = [];
6791
7302
  this.retryFiles = [];
6792
7303
  this.isApplySame = false;
6793
- // eslint-disable-next-line
6794
7304
  this.dragData = [];
6795
7305
  this.dragNodes = [];
6796
7306
  this.dragPath = '';
@@ -6800,13 +7310,12 @@ let FileManager = FileManager_1 = class FileManager extends Component {
6800
7310
  this.dragCursorPosition = { left: 44, top: 18 };
6801
7311
  this.isDropEnd = false;
6802
7312
  this.dragCount = 0;
6803
- // eslint-disable-next-line
6804
7313
  this.droppedObjects = [];
6805
7314
  this.uploadingCount = 0;
6806
7315
  this.uploadedCount = 0;
6807
- //Specifies whether the operating system is MAC or not
7316
+ //Specifies whether the operating system is MAC or not
6808
7317
  this.isMac = false;
6809
- FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu$2);
7318
+ FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
6810
7319
  }
6811
7320
  /**
6812
7321
  * Get component name.
@@ -7196,7 +7705,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7196
7705
  const data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
7197
7706
  args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
7198
7707
  const uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
7199
- // eslint-disable-next-line
7200
7708
  const ajaxSettings = {
7201
7709
  url: uploadUrl,
7202
7710
  type: 'POST',
@@ -7212,7 +7720,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7212
7720
  this.trigger('beforeSend', this.uploadEventArgs, (uploadEventArgs) => {
7213
7721
  args.customFormData = JSON.parse(getValue('data', uploadEventArgs.ajaxSettings));
7214
7722
  args.cancel = uploadEventArgs.cancel;
7215
- // eslint-disable-next-line
7216
7723
  const eventArgs = {
7217
7724
  cancel: false,
7218
7725
  httpRequest: args.currentRequest
@@ -7249,7 +7756,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7249
7756
  }
7250
7757
  this.uploadingCount = args.filesData.length;
7251
7758
  this.uploadedCount = 0;
7252
- // eslint-disable-next-line
7253
7759
  const details = getPathObject(this);
7254
7760
  if (!hasUploadAccess(details)) {
7255
7761
  args.cancel = true;
@@ -7258,7 +7764,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7258
7764
  }
7259
7765
  this.uploadDialogObj.show();
7260
7766
  }
7261
- // eslint-disable-next-line
7262
7767
  onFileUploadSuccess(args) {
7263
7768
  this.uploadedCount = this.uploadedCount + args.count;
7264
7769
  if (this.uploadSettings.autoClose && (this.uploadingCount === this.uploadedCount)) {
@@ -7266,7 +7771,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7266
7771
  }
7267
7772
  }
7268
7773
  /* istanbul ignore next */
7269
- // eslint-disable-next-line
7270
7774
  onUploadSuccess(files) {
7271
7775
  const args = { action: 'Upload', result: files };
7272
7776
  this.trigger('success', args);
@@ -7278,9 +7782,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7278
7782
  }
7279
7783
  }
7280
7784
  /* istanbul ignore next */
7281
- // eslint-disable-next-line
7282
7785
  onUploadFailure(files) {
7283
- // eslint-disable-next-line
7284
7786
  const response = getValue('response', files);
7285
7787
  const statusText = getValue('statusText', response);
7286
7788
  if (statusText !== '') {
@@ -7364,7 +7866,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7364
7866
  break;
7365
7867
  case 'ctrlU':
7366
7868
  e.preventDefault();
7367
- if (this.toolbarSettings.items.indexOf('Upload') != -1) {
7869
+ if (this.toolbarSettings.items.indexOf('Upload') !== -1) {
7368
7870
  uploadEle = select('#' + this.element.id + UPLOAD_ID, this.element);
7369
7871
  uploadEle.click();
7370
7872
  }
@@ -7398,7 +7900,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7398
7900
  * @private
7399
7901
  */
7400
7902
  /* istanbul ignore next */
7401
- // eslint:disable-next-line
7402
7903
  onPropertyChanged(newProp, oldProp) {
7403
7904
  let height;
7404
7905
  for (const prop of Object.keys(newProp)) {
@@ -7530,6 +8031,10 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7530
8031
  this.viewerObj.target = newProp.popupTarget;
7531
8032
  }
7532
8033
  break;
8034
+ case 'fileSystemData':
8035
+ this.fileSystemData = newProp.fileSystemData;
8036
+ this.refresh();
8037
+ break;
7533
8038
  }
7534
8039
  }
7535
8040
  }
@@ -7615,7 +8120,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7615
8120
  */
7616
8121
  createFolder(name) {
7617
8122
  this.notify(methodCall, { action: 'createFolder' });
7618
- // eslint-disable-next-line
7619
8123
  const details = [getPathObject(this)];
7620
8124
  this.itemData = details;
7621
8125
  if (name) {
@@ -7738,7 +8242,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7738
8242
  *
7739
8243
  * @returns {void}
7740
8244
  */
7741
- // eslint-disable-next-line
7742
8245
  filterFiles(filterData) {
7743
8246
  this.filterData = filterData ? filterData : null;
7744
8247
  this.setProperties({ selectedItems: [] }, true);
@@ -7754,7 +8257,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7754
8257
  *
7755
8258
  * @returns {Object[]} - returns selected files.
7756
8259
  */
7757
- // eslint-disable-next-line
7758
8260
  getSelectedFiles() {
7759
8261
  this.notify(updateSelectionData, {});
7760
8262
  return this.itemData;
@@ -7826,11 +8328,18 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7826
8328
  * @returns {void}
7827
8329
  */
7828
8330
  uploadFiles() {
7829
- // eslint-disable-next-line
7830
8331
  const details = [getPathObject(this)];
7831
8332
  this.itemData = details;
7832
8333
  uploadItem(this);
7833
8334
  }
8335
+ /**
8336
+ * Specifies the method which must be invoked to programmatically close the dialog popup in the file manager.
8337
+ *
8338
+ * @returns {void}
8339
+ */
8340
+ closeDialog() {
8341
+ closePopup(this);
8342
+ }
7834
8343
  /**
7835
8344
  * Specifies the direction of FileManager
7836
8345
  *
@@ -7853,6 +8362,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
7853
8362
  __decorate$8([
7854
8363
  Complex({}, AjaxSettings)
7855
8364
  ], FileManager.prototype, "ajaxSettings", void 0);
8365
+ __decorate$8([
8366
+ Property([])
8367
+ ], FileManager.prototype, "fileSystemData", void 0);
7856
8368
  __decorate$8([
7857
8369
  Property(false)
7858
8370
  ], FileManager.prototype, "allowDragAndDrop", void 0);
@@ -7958,9 +8470,36 @@ __decorate$8([
7958
8470
  __decorate$8([
7959
8471
  Event()
7960
8472
  ], FileManager.prototype, "created", void 0);
8473
+ __decorate$8([
8474
+ Event()
8475
+ ], FileManager.prototype, "beforeFolderCreate", void 0);
8476
+ __decorate$8([
8477
+ Event()
8478
+ ], FileManager.prototype, "folderCreate", void 0);
7961
8479
  __decorate$8([
7962
8480
  Event()
7963
8481
  ], FileManager.prototype, "destroyed", void 0);
8482
+ __decorate$8([
8483
+ Event()
8484
+ ], FileManager.prototype, "beforeDelete", void 0);
8485
+ __decorate$8([
8486
+ Event()
8487
+ ], FileManager.prototype, "delete", void 0);
8488
+ __decorate$8([
8489
+ Event()
8490
+ ], FileManager.prototype, "beforeRename", void 0);
8491
+ __decorate$8([
8492
+ Event()
8493
+ ], FileManager.prototype, "rename", void 0);
8494
+ __decorate$8([
8495
+ Event()
8496
+ ], FileManager.prototype, "beforeMove", void 0);
8497
+ __decorate$8([
8498
+ Event()
8499
+ ], FileManager.prototype, "move", void 0);
8500
+ __decorate$8([
8501
+ Event()
8502
+ ], FileManager.prototype, "search", void 0);
7964
8503
  __decorate$8([
7965
8504
  Event()
7966
8505
  ], FileManager.prototype, "fileDragStart", void 0);
@@ -8010,15 +8549,11 @@ FileManager = FileManager_1 = __decorate$8([
8010
8549
  NotifyPropertyChanges
8011
8550
  ], FileManager);
8012
8551
 
8013
- /**
8014
- * File Manager base modules
8015
- */
8016
-
8017
8552
  /* eslint-disable @typescript-eslint/no-explicit-any */
8018
8553
  /**
8019
8554
  * Toolbar module
8020
8555
  */
8021
- class Toolbar$1 {
8556
+ class Toolbar {
8022
8557
  /**
8023
8558
  * Constructor for the Toolbar module
8024
8559
  *
@@ -8040,7 +8575,7 @@ class Toolbar$1 {
8040
8575
  const eventArgs = { items: this.items };
8041
8576
  this.parent.trigger('toolbarCreate', eventArgs, (toolbarCreateArgs) => {
8042
8577
  this.items = toolbarCreateArgs.items;
8043
- this.toolbarObj = new Toolbar({
8578
+ this.toolbarObj = new Toolbar$1({
8044
8579
  items: this.items,
8045
8580
  created: this.toolbarCreateHandler.bind(this),
8046
8581
  overflowMode: 'Popup',
@@ -8078,7 +8613,6 @@ class Toolbar$1 {
8078
8613
  return;
8079
8614
  }
8080
8615
  const tool = args.item.id.substr((this.parent.element.id + '_tb_').length);
8081
- // eslint-disable-next-line
8082
8616
  let details;
8083
8617
  if (tool === 'refresh' || tool === 'newfolder' || tool === 'upload') {
8084
8618
  details = [getPathObject(this.parent)];
@@ -8616,6 +9150,8 @@ class Virtualization {
8616
9150
  }
8617
9151
  /**
8618
9152
  * Sets up UI virtualization for the large icon view.
9153
+ *
9154
+ * @returns {void}
8619
9155
  */
8620
9156
  setUIVirtualization() {
8621
9157
  // Get the current view data source
@@ -8641,6 +9177,8 @@ class Virtualization {
8641
9177
  /**
8642
9178
  * Sets the height of the top and bottom elements that are used for virtualization.
8643
9179
  * These elements are used to give the appearance of an infinitely scrolling list.
9180
+ *
9181
+ * @returns {void}
8644
9182
  */
8645
9183
  setUlElementHeight() {
8646
9184
  // Calculate the number of items in the last row
@@ -8648,10 +9186,10 @@ class Virtualization {
8648
9186
  (this.largeIconInstance.allItems.length - this.itemCount) % this.rowItemCount : this.rowItemCount;
8649
9187
  // Create top and bottom elements
8650
9188
  this.topElement = this.filemanagerInstance.createElement('div');
8651
- this.topElement.classList.add("e-virtual-top");
9189
+ this.topElement.classList.add('e-virtual-top');
8652
9190
  this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement, this.largeIconInstance.element.firstElementChild.firstChild);
8653
9191
  this.bottomElement = this.filemanagerInstance.createElement('div');
8654
- this.bottomElement.classList.add("e-virtual-bottom");
9192
+ this.bottomElement.classList.add('e-virtual-bottom');
8655
9193
  this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement, null);
8656
9194
  // Get the margin value for list items
8657
9195
  const marginValue = parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-top'), 10) +
@@ -8673,17 +9211,21 @@ class Virtualization {
8673
9211
  }
8674
9212
  /**
8675
9213
  * Calculates the number of items to display in the list based on the available width and height.
8676
- * @param dataSourceLength The length of the data source.
8677
- * @returns The number of items to display.
9214
+ *
9215
+ * @param {number} dataSourceLength The length of the data source.
9216
+ * @returns {number} The number of items to display.
8678
9217
  */
8679
9218
  getItemCount(dataSourceLength) {
8680
9219
  // Get the margin values for list items
8681
9220
  const widthMargin = parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue('margin-right'), 10) +
8682
9221
  parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue('margin-left'), 10);
8683
9222
  // Calculate the number of items that can fit in a single row
8684
- this.rowItemCount = Math.floor(parseFloat(formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth)) / (this.itemList[0].offsetWidth + widthMargin));
9223
+ this.rowItemCount =
9224
+ Math.floor(parseFloat(formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth)) /
9225
+ (this.itemList[0].offsetWidth + widthMargin));
8685
9226
  // Calculate the number of items that can fit in the available height
8686
- let itemCount = this.rowItemCount * (Math.round(parseFloat(formatUnit(this.largeIconInstance.element.clientHeight)) / this.itemList[0].offsetHeight));
9227
+ let itemCount = this.rowItemCount *
9228
+ (Math.round(parseFloat(formatUnit(this.largeIconInstance.element.clientHeight)) / this.itemList[0].offsetHeight));
8687
9229
  // If the calculated item count is greater than the data source length, set the item count to the data source length
8688
9230
  if (itemCount > dataSourceLength) {
8689
9231
  itemCount = dataSourceLength;
@@ -8692,7 +9234,9 @@ class Virtualization {
8692
9234
  }
8693
9235
  /**
8694
9236
  * Wires or un wires the scroll event for the list element.
8695
- * @param destroy - Set `true` to unwire the scroll event.
9237
+ *
9238
+ * @param {boolean} destroy - Set `true` to unwire the scroll event.
9239
+ * @returns {void}
8696
9240
  */
8697
9241
  wireScrollEvent(destroy) {
8698
9242
  if (!destroy) {
@@ -8707,6 +9251,9 @@ class Virtualization {
8707
9251
  /**
8708
9252
  * Handles the scroll event for the list element.
8709
9253
  * This method updates the top and bottom elements and the displayed items based on the scroll position.
9254
+ *
9255
+ * @returns {void}
9256
+ * @private
8710
9257
  */
8711
9258
  onVirtualUiScroll() {
8712
9259
  // Set the starting height to 0
@@ -8743,13 +9290,16 @@ class Virtualization {
8743
9290
  this.scrollPosition = scroll;
8744
9291
  // Update the list of items and the items property of the largeIconInstance
8745
9292
  this.largeIconInstance.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.largeIconInstance.element));
9293
+ this.itemCount = this.itemCount !== this.largeIconInstance.itemList.length ? this.largeIconInstance.itemList.length : this.itemCount;
8746
9294
  this.largeIconInstance.items = this.largeIconInstance.allItems.slice(this.renderedCount -
8747
9295
  this.itemCount, this.renderedCount);
8748
9296
  }
8749
9297
  /**
8750
9298
  * Calculates the current scroll position of the list element.
8751
- * @param startingHeight The starting height from which to calculate the scroll position.
8752
- * @returns The current scroll position.
9299
+ *
9300
+ * @param {number} startingHeight The starting height from which to calculate the scroll position.
9301
+ * @returns {number} The current scroll position.
9302
+ * @private
8753
9303
  */
8754
9304
  getscrollerHeight(startingHeight) {
8755
9305
  // If the scroll position is less than or equal to the starting height, return 0.
@@ -8759,8 +9309,11 @@ class Virtualization {
8759
9309
  }
8760
9310
  /**
8761
9311
  * This method updates the displayed items and the selection based on the scroll direction.
8762
- * @param listDiff The number of rows to update.
8763
- * @param isScrollingDown If set to true, the scroll direction is downward.
9312
+ *
9313
+ * @param {number} listDiff The number of rows to update.
9314
+ * @param {boolean} isScrollingDown If set to true, the scroll direction is downward.
9315
+ * @returns {void}
9316
+ * @private
8764
9317
  */
8765
9318
  onNormalScroll(listDiff, isScrollingDown) {
8766
9319
  // Update the displayed items
@@ -8770,7 +9323,10 @@ class Virtualization {
8770
9323
  }
8771
9324
  /**
8772
9325
  * Updates the items in the large icons view.
8773
- * @param isScrollingDown If set to true, the scroll direction is downward.
9326
+ *
9327
+ * @param {boolean} isScrollingDown - If set to true, the scroll direction is downward.
9328
+ * @returns {void}
9329
+ * @private
8774
9330
  */
8775
9331
  updateUI(isScrollingDown) {
8776
9332
  if (isScrollingDown) {
@@ -8843,6 +9399,8 @@ class Virtualization {
8843
9399
  }
8844
9400
  /**
8845
9401
  * Destroys the component.
9402
+ *
9403
+ * @returns {void}
8846
9404
  */
8847
9405
  destroy() {
8848
9406
  // If the file manager has already been destroyed, return immediately
@@ -8856,10 +9414,6 @@ class Virtualization {
8856
9414
  }
8857
9415
  }
8858
9416
 
8859
- /**
8860
- * File Manager actions modules
8861
- */
8862
-
8863
9417
  /**
8864
9418
  * NavigationPane module
8865
9419
  */
@@ -8906,10 +9460,8 @@ class NavigationPane {
8906
9460
  if (!isNullOrUndefined(this.treeObj)) {
8907
9461
  return;
8908
9462
  }
8909
- // eslint-disable-next-line
8910
9463
  const rootData = getValue(this.parent.pathId[0], this.parent.feParent);
8911
9464
  setValue('_fm_icon', 'e-fe-folder', rootData);
8912
- // eslint-disable-next-line
8913
9465
  const attr = {};
8914
9466
  const id = getValue('id', rootData);
8915
9467
  if (!isNullOrUndefined(id)) {
@@ -8980,7 +9532,6 @@ class NavigationPane {
8980
9532
  this.parent.activeElements = [dragLi];
8981
9533
  this.parent.dragNodes = [];
8982
9534
  getModule(this.parent, dragLi);
8983
- // eslint-disable-next-line
8984
9535
  this.parent.dragData = this.getTreeData(dragLi);
8985
9536
  this.parent.dragPath = this.getDragPath(dragLi, this.parent.dragData[0].name);
8986
9537
  this.parent.dragNodes.push(this.parent.dragData[0].name);
@@ -9004,19 +9555,20 @@ class NavigationPane {
9004
9555
  };
9005
9556
  this.parent.trigger('fileLoad', eventArgs);
9006
9557
  }
9007
- // eslint-disable-next-line
9008
9558
  addChild(files, target, prevent) {
9009
- // eslint-disable-next-line
9010
9559
  const directories = getDirectories(files);
9011
- if (directories.length > 0 &&
9012
- (directories[0].filterPath == null || this.getTreeData(target)[0].filterPath == null || directories[0].filterPath !== this.getTreeData(target)[0].filterPath)) {
9560
+ const targetDirectory = this.getTreeData(target);
9561
+ if (directories.length > 0 && targetDirectory.length > 0 &&
9562
+ (directories[0].filterPath == null ||
9563
+ isNullOrUndefined(targetDirectory[0])
9564
+ && targetDirectory[0].filterPath == null
9565
+ || directories[0].filterPath !==
9566
+ targetDirectory[0].filterPath)) {
9013
9567
  let length = 0;
9014
- // eslint-disable-next-line
9015
9568
  const folders = directories;
9016
9569
  while (length < directories.length) {
9017
- // eslint-disable-next-line
9018
- folders[length]._fm_icon = 'e-fe-folder';
9019
- // eslint-disable-next-line
9570
+ // eslint-disable-next-line camelcase
9571
+ folders[parseInt(length.toString(), 10)]._fm_icon = 'e-fe-folder';
9020
9572
  const attr = {};
9021
9573
  const id = getValue('id', folders[length]);
9022
9574
  if (!isNullOrUndefined(id)) {
@@ -9033,21 +9585,20 @@ class NavigationPane {
9033
9585
  const element = select('[data-uid="' + target + '"]', this.treeObj.element);
9034
9586
  const childElements = select('ul', element);
9035
9587
  if (isNullOrUndefined(childElements)) {
9036
- // eslint-disable-next-line
9037
9588
  this.treeObj.addNodes(directories, target, null, prevent);
9038
9589
  }
9039
9590
  }
9040
9591
  }
9041
9592
  // Node Selecting event handler
9042
9593
  onNodeSelecting(args) {
9043
- if (!args.isInteracted && !this.isRightClick && !this.isSameNodeClicked && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
9594
+ if (!args.isInteracted && !this.isRightClick &&
9595
+ !this.isSameNodeClicked && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
9044
9596
  this.restrictSelecting = false;
9045
9597
  this.isNodeClickCalled = false;
9046
9598
  return;
9047
9599
  }
9048
9600
  if (!this.renameParent) {
9049
9601
  this.parent.activeModule = 'navigationpane';
9050
- // eslint-disable-next-line
9051
9602
  const nodeData = this.getTreeData(getValue('id', args.nodeData));
9052
9603
  if (args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1] && !this.isRightClick && !this.isNodeClickCalled || this.isSameNodeClicked) {
9053
9604
  this.isNodeClickCalled = false;
@@ -9066,7 +9617,7 @@ class NavigationPane {
9066
9617
  this.isNodeClickCalled = true;
9067
9618
  this.isSameNodeClicked = false;
9068
9619
  this.previousSelected = this.treeObj.selectedNodes;
9069
- this.treeObj.selectedNodes = [args.node.getAttribute("data-uid")];
9620
+ this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
9070
9621
  }
9071
9622
  }
9072
9623
  else if (this.previousSelected[0] !== args.node.getAttribute('data-uid')) {
@@ -9078,7 +9629,6 @@ class NavigationPane {
9078
9629
  // Opens the folder while clicking open context menu item in the treeview.
9079
9630
  openFileOnContextMenuClick(node) {
9080
9631
  const data = this.treeObj.getTreeData(node);
9081
- // eslint-disable-next-line
9082
9632
  this.parent.selectedItems = [];
9083
9633
  this.parent.itemData = data;
9084
9634
  this.activeNode = node;
@@ -9107,7 +9657,6 @@ class NavigationPane {
9107
9657
  }
9108
9658
  this.activeNode = args.node;
9109
9659
  this.parent.activeModule = 'navigationpane';
9110
- // eslint-disable-next-line
9111
9660
  const nodeData = this.getTreeData(getValue('id', args.nodeData));
9112
9661
  this.parent.selectedItems = [];
9113
9662
  this.parent.itemData = nodeData;
@@ -9132,7 +9681,6 @@ class NavigationPane {
9132
9681
  this.isPathDragged = this.isRenameParent = this.isRightClick = this.isSameNodeClicked = false;
9133
9682
  }
9134
9683
  /* istanbul ignore next */
9135
- // eslint-disable-next-line
9136
9684
  onPathDrag(args) {
9137
9685
  this.isPathDragged = true;
9138
9686
  this.selectResultNode(args[0]);
@@ -9143,6 +9691,7 @@ class NavigationPane {
9143
9691
  return;
9144
9692
  }
9145
9693
  if (args.node.querySelector('.' + LIST_ITEM) === null) {
9694
+ this.isNodeExpandCalled = true;
9146
9695
  const text = getValue('text', args.nodeData);
9147
9696
  const id = args.node.getAttribute('data-id');
9148
9697
  const isId = isNullOrUndefined(id) ? false : true;
@@ -9153,7 +9702,6 @@ class NavigationPane {
9153
9702
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
9154
9703
  this.parent.pathId.push(getValue('id', args.nodeData));
9155
9704
  read(this.parent, nodeExpand, path);
9156
- this.isNodeExpandCalled = true;
9157
9705
  }
9158
9706
  }
9159
9707
  /* istanbul ignore next */
@@ -9193,7 +9741,6 @@ class NavigationPane {
9193
9741
  }
9194
9742
  onPathChanged(args) {
9195
9743
  this.parent.isCut = false;
9196
- // eslint-disable-next-line
9197
9744
  const currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
9198
9745
  if (this.expandNodeTarget === 'add') {
9199
9746
  const sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
@@ -9298,14 +9845,12 @@ class NavigationPane {
9298
9845
  this.renameParent = null;
9299
9846
  }
9300
9847
  else {
9301
- // eslint-disable-next-line
9302
9848
  let resultData = [];
9303
9849
  if (this.parent.hasId) {
9304
9850
  resultData = new DataManager(this.treeObj.getTreeData()).
9305
9851
  executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
9306
9852
  }
9307
9853
  else {
9308
- // eslint-disable-next-line
9309
9854
  const nData = new DataManager(this.treeObj.getTreeData()).
9310
9855
  executeLocal(new Query().where(this.treeObj.fields.text, 'equal', this.parent.renameText, false));
9311
9856
  if (nData.length > 0) {
@@ -9326,16 +9871,13 @@ class NavigationPane {
9326
9871
  this.updateTree(args);
9327
9872
  }
9328
9873
  else {
9329
- // eslint-disable-next-line
9330
9874
  const data = this.treeObj.getTreeData();
9331
- // eslint-disable-next-line
9332
9875
  let resultData = [];
9333
9876
  if (this.parent.hasId) {
9334
9877
  resultData = new DataManager(data).
9335
9878
  executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
9336
9879
  }
9337
9880
  else {
9338
- // eslint-disable-next-line
9339
9881
  const nData = new DataManager(data).
9340
9882
  executeLocal(new Query().where(this.treeObj.fields.text, 'equal', this.parent.currentItemText, false));
9341
9883
  if (nData.length > 0) {
@@ -9390,7 +9932,6 @@ class NavigationPane {
9390
9932
  }
9391
9933
  this.treeObj.removeNodes(moveNames);
9392
9934
  }
9393
- // eslint-disable-next-line
9394
9935
  getMoveNames(files, flag, path) {
9395
9936
  const moveNames = [];
9396
9937
  for (let i = 0; i < files.length; i++) {
@@ -9403,7 +9944,6 @@ class NavigationPane {
9403
9944
  name = path.substring(index + 1);
9404
9945
  path = path.substring(0, index + 1);
9405
9946
  }
9406
- // eslint-disable-next-line
9407
9947
  const resultData = new DataManager(this.treeObj.getTreeData()).
9408
9948
  executeLocal(new Query().where(this.treeObj.fields.text, 'equal', name, false));
9409
9949
  for (let j = 0; j < resultData.length; j++) {
@@ -9430,16 +9970,13 @@ class NavigationPane {
9430
9970
  this.treeObj.removeNodes(moveNames);
9431
9971
  }
9432
9972
  /* istanbul ignore next */
9433
- // eslint-disable-next-line
9434
9973
  selectResultNode(resultObj) {
9435
9974
  if (!this.parent.hasId) {
9436
9975
  const path = getValue('filterPath', resultObj);
9437
9976
  const itemname = getValue('name', resultObj);
9438
- // eslint-disable-next-line
9439
9977
  const data = new DataManager(this.treeObj.getTreeData()).
9440
9978
  executeLocal(new Query().where(this.treeObj.fields.text, 'equal', itemname, false));
9441
9979
  if (data.length > 0) {
9442
- // eslint-disable-next-line
9443
9980
  const resultData = new DataManager(data).
9444
9981
  executeLocal(new Query().where('filterPath', 'equal', path, false));
9445
9982
  if (resultData.length > 0) {
@@ -9461,14 +9998,12 @@ class NavigationPane {
9461
9998
  this.parent.isDropEnd = !this.parent.isPasteError;
9462
9999
  }
9463
10000
  onpasteEnd(args) {
9464
- // eslint-disable-next-line
9465
10001
  let resultData = [];
9466
10002
  if (this.parent.hasId) {
9467
10003
  resultData = new DataManager(this.treeObj.getTreeData()).
9468
10004
  executeLocal(new Query().where('id', 'equal', getValue('id', args.cwd), false));
9469
10005
  }
9470
10006
  else {
9471
- // eslint-disable-next-line
9472
10007
  const nData = new DataManager(this.treeObj.getTreeData()).
9473
10008
  executeLocal(new Query().where(this.treeObj.fields.text, 'equal', getValue('name', args.cwd), false));
9474
10009
  if (nData.length > 0) {
@@ -9490,6 +10025,9 @@ class NavigationPane {
9490
10025
  }
9491
10026
  /* istanbul ignore next */
9492
10027
  checkDropPath(args) {
10028
+ if (isFileSystemData(this.parent) && this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane') {
10029
+ return;
10030
+ }
9493
10031
  if (this.parent.hasId) {
9494
10032
  this.parent.isDropEnd = !this.parent.isPasteError;
9495
10033
  readDropPath(this.parent);
@@ -9508,8 +10046,7 @@ class NavigationPane {
9508
10046
  this.updateItemData();
9509
10047
  }
9510
10048
  this.moveNames = [];
9511
- // eslint-disable-next-line
9512
- const obj = this.parent.isDragDrop ? this.parent.dragData : this.parent.actionRecords;
10049
+ const obj = this.parent.isDragDrop || isFileSystemData(this.parent) ? this.parent.dragData : this.parent.actionRecords;
9513
10050
  for (let i = 0; i < obj.length; i++) {
9514
10051
  if (getValue('isFile', obj[i]) === false) {
9515
10052
  this.moveNames.push(getValue('_fm_id', obj[i]));
@@ -9589,12 +10126,10 @@ class NavigationPane {
9589
10126
  /* istanbul ignore next */
9590
10127
  onDetailsInit() {
9591
10128
  if (this.parent.activeModule === this.getModuleName()) {
9592
- // eslint-disable-next-line
9593
10129
  const dataobj = this.getTreeData(this.treeObj.selectedNodes[0]);
9594
10130
  this.parent.itemData = dataobj;
9595
10131
  }
9596
10132
  }
9597
- // eslint-disable-next-line
9598
10133
  onMenuItemData(args) {
9599
10134
  if (this.parent.activeModule === this.getModuleName()) {
9600
10135
  const liEle = closest(args.target, 'li');
@@ -9692,7 +10227,6 @@ class NavigationPane {
9692
10227
  break;
9693
10228
  case 'f2':
9694
10229
  if (this.parent.selectedItems.length === 0) {
9695
- // eslint-disable-next-line
9696
10230
  const data = this.getTreeData(this.treeObj.selectedNodes[0])[0];
9697
10231
  if (!hasEditAccess(data)) {
9698
10232
  createDeniedDialog(this.parent, data, permissionEdit);
@@ -9705,9 +10239,7 @@ class NavigationPane {
9705
10239
  break;
9706
10240
  }
9707
10241
  }
9708
- // eslint-disable-next-line
9709
10242
  getTreeData(args) {
9710
- // eslint-disable-next-line
9711
10243
  const data = this.treeObj.getTreeData(args);
9712
10244
  for (let i = 0; i < data.length; i++) {
9713
10245
  if (isNullOrUndefined(getValue('hasChild', data[i]))) {
@@ -9721,7 +10253,6 @@ class NavigationPane {
9721
10253
  this.parent.currentItemText = getValue('name', this.parent.itemData[0]);
9722
10254
  }
9723
10255
  updateItemData() {
9724
- // eslint-disable-next-line
9725
10256
  const data = this.getTreeData(this.treeObj.selectedNodes[0])[0];
9726
10257
  this.parent.itemData = [data];
9727
10258
  this.parent.isFile = false;
@@ -9742,6 +10273,7 @@ class NavigationPane {
9742
10273
  }
9743
10274
  }
9744
10275
 
10276
+ /* eslint-disable @typescript-eslint/no-explicit-any */
9745
10277
  /**
9746
10278
  * DetailsView module
9747
10279
  */
@@ -9768,7 +10300,7 @@ class DetailsView {
9768
10300
  this.isNameWidth = false;
9769
10301
  this.pasteOperation = false;
9770
10302
  this.uploadOperation = false;
9771
- Grid.Inject(Resize, ContextMenu$1, Sort, VirtualScroll);
10303
+ Grid.Inject(Resize, ContextMenu$2, Sort, VirtualScroll);
9772
10304
  this.parent = parent;
9773
10305
  this.element = select('#' + this.parent.element.id + GRID_ID, this.parent.element);
9774
10306
  this.addEventListener();
@@ -9815,7 +10347,6 @@ class DetailsView {
9815
10347
  showSpinner(this.parent.element);
9816
10348
  if (this.parent.view === 'Details') {
9817
10349
  removeClass([this.parent.element], MULTI_SELECT);
9818
- // eslint-disable-next-line
9819
10350
  const items = getSortedData(this.parent, args.files);
9820
10351
  this.checkNameWidth();
9821
10352
  const columns = this.getColumns();
@@ -9856,8 +10387,7 @@ class DetailsView {
9856
10387
  width: '100%',
9857
10388
  height: (this.parent.enableVirtualization) ? this.getGridHeight() : 'auto',
9858
10389
  beforeCopy: (args) => { args.cancel = true; },
9859
- // eslint-disable-next-line
9860
- load: function (args) {
10390
+ load: function () {
9861
10391
  this.focusModule.destroy();
9862
10392
  },
9863
10393
  locale: this.parent.locale
@@ -9875,18 +10405,18 @@ class DetailsView {
9875
10405
  }
9876
10406
  }
9877
10407
  reactTemplateRender(args) {
9878
- this.parent[`portals`] = args;
10408
+ this.parent['portals'] = args;
9879
10409
  if (this.parent.portals && this.parent.toolbarModule && this.parent.toolbarModule.toolbarObj &&
9880
10410
  this.parent.toolbarModule.toolbarObj.portals) {
9881
- this.parent[`portals`] = this.parent[`portals`].concat(this.parent.toolbarModule.toolbarObj.portals);
10411
+ this.parent['portals'] = this.parent['portals'].concat(this.parent.toolbarModule.toolbarObj.portals);
9882
10412
  }
9883
- this.parent.notify('renderReactTemplate', this.parent[`portals`]);
9884
- this.parent[`renderReactTemplates`]();
10413
+ this.parent.notify('renderReactTemplate', this.parent['portals']);
10414
+ this.parent['renderReactTemplates']();
9885
10415
  }
9886
10416
  /**
9887
10417
  * Gets the grid height.
9888
10418
  *
9889
- * @returns The grid height.
10419
+ * @returns {number} - The grid height.
9890
10420
  * @private
9891
10421
  */
9892
10422
  getGridHeight() {
@@ -9927,7 +10457,7 @@ class DetailsView {
9927
10457
  }
9928
10458
  getColumns() {
9929
10459
  let columns;
9930
- let enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
10460
+ const enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
9931
10461
  if (this.parent.isMobile) {
9932
10462
  columns = [
9933
10463
  {
@@ -9960,7 +10490,7 @@ class DetailsView {
9960
10490
  return `<span class="e-fe-icon ${data._fm_iconClass}"></span>`;
9961
10491
  }), allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
9962
10492
  headerTemplate: initializeCSPTemplate(function () {
9963
- return `<span class="e-fe-icon e-fe-folder"></span>`;
10493
+ return '<span class=\'e-fe-icon e-fe-folder\'></span>';
9964
10494
  })
9965
10495
  };
9966
10496
  columns.unshift(icon);
@@ -10019,7 +10549,8 @@ class DetailsView {
10019
10549
  }
10020
10550
  }
10021
10551
  if (!this.parent.showFileExtension && getValue('isFile', args.data)) {
10022
- const textEle = args.row.querySelector('.e-fe-text');
10552
+ const text = getValue('name', args.data);
10553
+ const textEle = args.row.querySelector('[title= "' + text + '"]');
10023
10554
  if (textEle) {
10024
10555
  const name = getValue('name', args.data);
10025
10556
  const type = getValue('type', args.data);
@@ -10053,7 +10584,6 @@ class DetailsView {
10053
10584
  const dateEle = args.row.querySelector('.e-fe-date');
10054
10585
  const intl = new Internationalization(this.parent.locale);
10055
10586
  const columns = this.parent.detailsViewSettings.columns;
10056
- // eslint-disable-next-line
10057
10587
  let format;
10058
10588
  for (let i = 0; i < columns.length; i++) {
10059
10589
  if (columns[i].field === 'dateModified') {
@@ -10089,7 +10619,6 @@ class DetailsView {
10089
10619
  let len = rows.length;
10090
10620
  this.sortSelectedNodes = [];
10091
10621
  while (len > 0) {
10092
- // eslint-disable-next-line
10093
10622
  const data = this.gridObj.getRowsObject()[rows[len - 1]].data;
10094
10623
  this.sortSelectedNodes.push(getValue(this.parent.hasId ? 'id' : 'name', data));
10095
10624
  len--;
@@ -10106,10 +10635,11 @@ class DetailsView {
10106
10635
  }
10107
10636
  onBeforeDataBound(args) {
10108
10637
  showSpinner(this.parent.element);
10109
- let nameColumn = this.parent.detailsViewSettings.columns.find((column) => column.field === this.parent.sortBy);
10638
+ const nameColumn = this.parent.detailsViewSettings.columns.find((column) => column.field === this.parent.sortBy);
10110
10639
  if (nameColumn && !('sortComparer' in nameColumn)) {
10111
- // eslint-disable-next-line
10112
- const items = getSortedData(this.parent, (this.parent.enableVirtualization) ? args.result : this.gridObj.dataSource);
10640
+ const items = getSortedData(this.parent, (this.parent.enableVirtualization)
10641
+ ? args.result
10642
+ : this.gridObj.dataSource);
10113
10643
  args.result = items;
10114
10644
  }
10115
10645
  }
@@ -10118,7 +10648,7 @@ class DetailsView {
10118
10648
  this.createDragObj();
10119
10649
  if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization) ||
10120
10650
  ((this.parent.selectedItems.length !== 0 && this.parent.enableVirtualization &&
10121
- this.element.querySelector('.e-content').scrollTop == 0))) {
10651
+ this.element.querySelector('.e-content').scrollTop === 0))) {
10122
10652
  this.selectRecords(this.parent.selectedItems);
10123
10653
  }
10124
10654
  if (this.isPasteOperation === true) {
@@ -10191,7 +10721,6 @@ class DetailsView {
10191
10721
  this.isLoaded = false;
10192
10722
  }
10193
10723
  selectRecords(nodes) {
10194
- // eslint-disable-next-line
10195
10724
  const gridRecords = this.gridObj.getCurrentViewRecords();
10196
10725
  const sRecords = [];
10197
10726
  for (let i = 0, len = gridRecords.length; i < len; i++) {
@@ -10199,7 +10728,7 @@ class DetailsView {
10199
10728
  if (nodes.indexOf(node) !== -1) {
10200
10729
  sRecords.push(i);
10201
10730
  }
10202
- else if (!this.parent.showFileExtension && node.includes('.')) {
10731
+ else if (!this.parent.showFileExtension && !this.parent.hasId && node.includes('.')) {
10203
10732
  const Str2 = node.split('.').slice(0, -1).join('.');
10204
10733
  if (nodes.indexOf(Str2) !== -1) {
10205
10734
  sRecords.push(i);
@@ -10211,18 +10740,14 @@ class DetailsView {
10211
10740
  this.addFocus(this.gridObj.selectedRowIndex);
10212
10741
  }
10213
10742
  }
10214
- // eslint-disable-next-line
10215
10743
  addSelection(data) {
10216
- // eslint-disable-next-line
10217
10744
  const items = this.gridObj.getCurrentViewRecords();
10218
- // eslint-disable-next-line
10219
10745
  let rData = [];
10220
10746
  if (this.parent.hasId) {
10221
10747
  rData = new DataManager(items).
10222
10748
  executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
10223
10749
  }
10224
10750
  else {
10225
- // eslint-disable-next-line
10226
10751
  const nData = new DataManager(items).
10227
10752
  executeLocal(new Query().where('name', 'equal', getValue('name', data), false));
10228
10753
  if (nData.length > 0) {
@@ -10240,7 +10765,6 @@ class DetailsView {
10240
10765
  this.gridObj.sortModule.sortColumn(this.parent.sortBy, this.parent.sortOrder);
10241
10766
  }
10242
10767
  else {
10243
- // eslint-disable-next-line
10244
10768
  this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
10245
10769
  }
10246
10770
  if (this.element.querySelector('.e-content').scrollTop !== 0) {
@@ -10336,10 +10860,10 @@ class DetailsView {
10336
10860
  const len = this.gridObj.columns.length;
10337
10861
  const columnData = JSON.parse(JSON.stringify(this.gridObj.columns));
10338
10862
  if (columnData[len - 1].field && columnData[len - 1].field !== 'filterPath' && !this.parent.isMobile) {
10339
- const pathColumn$$1 = {
10863
+ const pathColumn = {
10340
10864
  field: 'filterPath', headerText: getLocaleText(this.parent, 'Path'), minWidth: 180, width: 'auto'
10341
10865
  };
10342
- this.gridObj.columns.push(pathColumn$$1);
10866
+ this.gridObj.columns.push(pathColumn);
10343
10867
  this.adjustWidth(this.gridObj.columns, 'filterPath');
10344
10868
  this.adjustWidth(this.gridObj.columns, 'name');
10345
10869
  this.isColumnRefresh = true;
@@ -10347,7 +10871,6 @@ class DetailsView {
10347
10871
  }
10348
10872
  }
10349
10873
  checkEmptyDiv(args) {
10350
- // eslint-disable-next-line
10351
10874
  const items = getSortedData(this.parent, args.files);
10352
10875
  if (items.length === 0 && !isNullOrUndefined(this.element.querySelector('.' + GRID_VIEW))) {
10353
10876
  createEmptyElement(this.parent, this.element, args);
@@ -10364,21 +10887,18 @@ class DetailsView {
10364
10887
  }
10365
10888
  onOpenInit() {
10366
10889
  if (this.parent.activeModule === 'detailsview') {
10367
- // eslint-disable-next-line
10368
10890
  const data = this.gridObj.getSelectedRecords()[0];
10369
10891
  this.openContent(data);
10370
10892
  }
10371
10893
  }
10372
10894
  DblClickEvents(args) {
10373
10895
  this.gridObj.selectRows([args.rowIndex]);
10374
- // eslint-disable-next-line
10375
10896
  let data;
10376
10897
  if (args.rowData) {
10377
10898
  data = JSON.parse(JSON.stringify(args.rowData));
10378
10899
  this.openContent(data);
10379
10900
  }
10380
10901
  }
10381
- // eslint-disable-next-line
10382
10902
  openContent(data) {
10383
10903
  if (!hasReadAccess(data)) {
10384
10904
  createDeniedDialog(this.parent, data, permissionRead);
@@ -10474,7 +10994,6 @@ class DetailsView {
10474
10994
  this.gridObj.sortColumn('name', this.parent.sortOrder);
10475
10995
  }
10476
10996
  else {
10477
- // eslint-disable-next-line
10478
10997
  this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
10479
10998
  }
10480
10999
  this.parent.notify(sortByChange, {});
@@ -10663,7 +11182,6 @@ class DetailsView {
10663
11182
  this.parent.off(updateSelectionData, this.onUpdateSelectionData);
10664
11183
  }
10665
11184
  onActionFailure() { this.interaction = true; }
10666
- // eslint-disable-next-line
10667
11185
  onMenuItemData(args) {
10668
11186
  if (this.parent.activeModule === this.getModuleName()) {
10669
11187
  this.parent.itemData = [this.gridObj.getRowInfo(args.target).rowData];
@@ -10704,7 +11222,6 @@ class DetailsView {
10704
11222
  getModule(this.parent, dragLi);
10705
11223
  this.parent.activeElements = [];
10706
11224
  this.parent.dragData = [];
10707
- // eslint-disable-next-line
10708
11225
  this.parent.dragData = this.gridObj.getSelectedRecords();
10709
11226
  let dragRow;
10710
11227
  if (this.parent.dragData.length === 0 && dragLi) {
@@ -10792,16 +11309,13 @@ class DetailsView {
10792
11309
  onDropInit(args) {
10793
11310
  if (this.parent.targetModule === this.getModuleName()) {
10794
11311
  /* istanbul ignore next */
10795
- // eslint-disable-next-line
10796
11312
  const cwdData = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feParent);
10797
11313
  if (!args.target.closest('tr')) {
10798
11314
  this.parent.dropPath = this.parent.path;
10799
11315
  this.parent.dropData = cwdData;
10800
11316
  }
10801
11317
  else {
10802
- // eslint-disable-next-line
10803
11318
  let info = null;
10804
- // eslint-disable-next-line
10805
11319
  info = this.gridObj.getRowInfo(args.target).rowData;
10806
11320
  this.parent.dropPath = info.isFile ? this.parent.path : getFullPath(this.parent, info, this.parent.path);
10807
11321
  this.parent.dropData = info.isFile ? cwdData : info;
@@ -10903,7 +11417,6 @@ class DetailsView {
10903
11417
  this.parent.currentItemText = getValue('name', args.data);
10904
11418
  }
10905
11419
  else if (len > 0) {
10906
- // eslint-disable-next-line
10907
11420
  const data = this.gridObj.getRowsObject()[rows[len - 1]].data;
10908
11421
  this.parent.currentItemText = getValue('name', data);
10909
11422
  }
@@ -10933,7 +11446,6 @@ class DetailsView {
10933
11446
  }
10934
11447
  selectedRecords() {
10935
11448
  this.parent.setProperties({ selectedItems: [] }, true);
10936
- // eslint-disable-next-line
10937
11449
  const selectedRecords = this.gridSelectNodes();
10938
11450
  let selectSize = 0;
10939
11451
  while (selectSize < selectedRecords.length) {
@@ -10998,27 +11510,25 @@ class DetailsView {
10998
11510
  }
10999
11511
  wireClickEvent(toBind) {
11000
11512
  if (toBind) {
11001
- // eslint-disable-next-line
11002
- const proxy = this;
11003
11513
  const ele = this.gridObj.getContent();
11004
11514
  this.clickObj = new Touch(ele, {
11005
11515
  tap: (eve) => {
11006
11516
  if (eve.tapCount === 1 && eve.originalEvent.target.classList.contains('e-content')) {
11007
- proxy.onClearAllInit();
11517
+ this.onClearAllInit();
11008
11518
  }
11009
11519
  },
11010
11520
  tapHold: (e) => {
11011
- if (proxy.parent.isDevice) {
11521
+ if (this.parent.isDevice) {
11012
11522
  e.originalEvent.preventDefault();
11013
- if (proxy.parent.allowMultiSelection) {
11014
- setValue('enableSelectMultiTouch', proxy.parent.allowMultiSelection, proxy.gridObj.selectionModule);
11015
- addClass([proxy.parent.element], MULTI_SELECT);
11523
+ if (this.parent.allowMultiSelection) {
11524
+ setValue('enableSelectMultiTouch', this.parent.allowMultiSelection, this.gridObj.selectionModule);
11525
+ addClass([this.parent.element], MULTI_SELECT);
11016
11526
  }
11017
11527
  const target = e.originalEvent.target;
11018
11528
  if (target) {
11019
11529
  const row = closest(target, '.' + ROW);
11020
- const index = proxy.gridObj.getRows().indexOf(row);
11021
- proxy.gridObj.selectRow(index);
11530
+ const index = this.gridObj.getRows().indexOf(row);
11531
+ this.gridObj.selectRow(index);
11022
11532
  }
11023
11533
  }
11024
11534
  }
@@ -11062,7 +11572,6 @@ class DetailsView {
11062
11572
  parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
11063
11573
  }
11064
11574
  /* istanbul ignore next */
11065
- // eslint:disable-next-line
11066
11575
  keydownHandler(e) {
11067
11576
  if (!this.isRendered) {
11068
11577
  return;
@@ -11101,26 +11610,20 @@ class DetailsView {
11101
11610
  case 'ctrlD':
11102
11611
  e.preventDefault();
11103
11612
  break;
11104
- default:
11105
- break;
11106
11613
  }
11107
11614
  }
11108
11615
  /* istanbul ignore next */
11109
- // eslint:disable-next-line
11110
11616
  keyupHandler(e) {
11111
11617
  if (!this.isRendered) {
11112
11618
  return;
11113
11619
  }
11114
11620
  e.preventDefault();
11115
11621
  const action = e.action;
11116
- // eslint-disable-next-line
11117
11622
  const gridItems = getSortedData(this.parent, this.gridObj.dataSource);
11118
11623
  const gridLength = gridItems.length;
11119
- const focItem = this.getFocusedItem();
11120
11624
  const focIndex = this.getFocusedItemIndex();
11121
11625
  const selIndex = this.gridObj.selectedRowIndex;
11122
11626
  const selRowIndeces = this.gridObj.getSelectedRowIndexes();
11123
- // eslint-disable-next-line
11124
11627
  let rowData;
11125
11628
  let firstItem;
11126
11629
  let lastItem;
@@ -11150,7 +11653,6 @@ class DetailsView {
11150
11653
  }
11151
11654
  rowData = this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data;
11152
11655
  if (rowData) {
11153
- // eslint-disable-next-line
11154
11656
  const data = JSON.parse(JSON.stringify(rowData));
11155
11657
  this.openContent(data);
11156
11658
  }
@@ -11267,14 +11769,12 @@ class DetailsView {
11267
11769
  break;
11268
11770
  }
11269
11771
  }
11270
- // eslint-disable-next-line
11271
11772
  gridSelectNodes() {
11272
11773
  return this.gridObj.getSelectedRecords();
11273
11774
  }
11274
11775
  doDownload() {
11275
11776
  if (this.parent.selectedItems.length !== 0) {
11276
11777
  this.parent.itemData = this.gridObj.getSelectedRecords();
11277
- // eslint-disable-next-line
11278
11778
  const items = this.parent.itemData;
11279
11779
  for (let i = 0; i < items.length; i++) {
11280
11780
  if (!hasDownloadAccess(items[i])) {
@@ -11288,7 +11788,6 @@ class DetailsView {
11288
11788
  performDelete() {
11289
11789
  if (this.parent.selectedItems && this.parent.selectedItems.length > 0) {
11290
11790
  this.parent.itemData = this.gridObj.getSelectedRecords();
11291
- // eslint-disable-next-line
11292
11791
  const items = this.parent.itemData;
11293
11792
  for (let i = 0; i < items.length; i++) {
11294
11793
  if (!hasEditAccess(items[i])) {
@@ -11306,11 +11805,9 @@ class DetailsView {
11306
11805
  }
11307
11806
  }
11308
11807
  updateRenameData() {
11309
- // eslint-disable-next-line
11310
11808
  const data = this.gridSelectNodes()[0];
11311
11809
  updateRenamingData(this.parent, data);
11312
11810
  }
11313
- // eslint-disable-next-line
11314
11811
  shiftMoveMethod(gridItems, selIndex, focIndex, selRowIndeces, e) {
11315
11812
  if (!this.parent.allowMultiSelection) {
11316
11813
  this.moveFunction(gridItems, e, selIndex);
@@ -11328,7 +11825,6 @@ class DetailsView {
11328
11825
  }
11329
11826
  }
11330
11827
  }
11331
- // eslint-disable-next-line
11332
11828
  moveFunction(selectedItems, e, rowIndex) {
11333
11829
  if (!isNullOrUndefined(this.getFocusedItem()) && this.parent.allowMultiSelection) {
11334
11830
  if (e.action === 'moveDown') {
@@ -11375,7 +11871,6 @@ class DetailsView {
11375
11871
  this.gridObj.selectRow(selIndex);
11376
11872
  }
11377
11873
  }
11378
- // eslint-disable-next-line
11379
11874
  ctrlMoveFunction(items, e, rowIndex) {
11380
11875
  let nextItem;
11381
11876
  if (!isNullOrUndefined(this.getFocusedItem())) {
@@ -11394,7 +11889,6 @@ class DetailsView {
11394
11889
  }
11395
11890
  this.addFocus(nextItem);
11396
11891
  }
11397
- // eslint-disable-next-line
11398
11892
  checkRowsKey(items, indexValue, focIndex, e) {
11399
11893
  if (this.gridObj.checkAllRows === 'Uncheck' || this.gridObj.checkAllRows === 'Intermediate') {
11400
11894
  if (e.action !== 'csHome' && e.action !== 'csEnd') {
@@ -11518,7 +12012,6 @@ class DetailsView {
11518
12012
  }
11519
12013
  return check;
11520
12014
  }
11521
- // eslint-disable-next-line
11522
12015
  shiftSelectedItem(selIndex, selRowIndexes, gridItems, e) {
11523
12016
  if (selIndex === -1) {
11524
12017
  this.gridObj.selectRow(0);
@@ -11567,7 +12060,6 @@ class DetailsView {
11567
12060
  }
11568
12061
  }
11569
12062
  }
11570
- // eslint-disable-next-line
11571
12063
  onMethodCall(e) {
11572
12064
  if (this.parent.view !== 'Details') {
11573
12065
  return;
@@ -11600,17 +12092,14 @@ class DetailsView {
11600
12092
  break;
11601
12093
  }
11602
12094
  }
11603
- // eslint-disable-next-line
11604
12095
  getRecords(nodes) {
11605
- // eslint-disable-next-line
11606
12096
  const gridRecords = this.gridObj.getCurrentViewRecords();
11607
- // eslint-disable-next-line
11608
12097
  const records = [];
11609
12098
  const hasFilter = (this.parent.breadcrumbbarModule.searchObj.element.value !== '' || this.parent.isFiltered) ? true : false;
11610
- const filter$$1 = this.parent.hasId ? 'id' : 'name';
12099
+ const filter = this.parent.hasId ? 'id' : 'name';
11611
12100
  if (this.parent.hasId || !hasFilter) {
11612
12101
  for (let i = 0, len = gridRecords.length; i < len; i++) {
11613
- if (nodes.indexOf(getValue(filter$$1, gridRecords[i])) !== -1) {
12102
+ if (nodes.indexOf(getValue(filter, gridRecords[i])) !== -1) {
11614
12103
  records.push(gridRecords[i]);
11615
12104
  }
11616
12105
  }
@@ -11631,12 +12120,10 @@ class DetailsView {
11631
12120
  this.performDelete();
11632
12121
  return;
11633
12122
  }
11634
- // eslint-disable-next-line
11635
12123
  const records = this.getRecords(ids);
11636
12124
  if (records.length === 0) {
11637
12125
  return;
11638
12126
  }
11639
- // eslint-disable-next-line
11640
12127
  const data = [];
11641
12128
  const newIds = [];
11642
12129
  for (let i = 0; i < records.length; i++) {
@@ -11650,12 +12137,10 @@ class DetailsView {
11650
12137
  this.doDownload();
11651
12138
  return;
11652
12139
  }
11653
- // eslint-disable-next-line
11654
12140
  const dRecords = this.getRecords(ids);
11655
12141
  if (dRecords.length === 0) {
11656
12142
  return;
11657
12143
  }
11658
- // eslint-disable-next-line
11659
12144
  const data = [];
11660
12145
  const newIds = [];
11661
12146
  for (let i = 0; i < dRecords.length; i++) {
@@ -11668,7 +12153,6 @@ class DetailsView {
11668
12153
  if (isNullOrUndefined(id)) {
11669
12154
  return;
11670
12155
  }
11671
- // eslint-disable-next-line
11672
12156
  const records = this.getRecords([id]);
11673
12157
  if (records.length > 0) {
11674
12158
  this.openContent(records[0]);
@@ -11680,7 +12164,6 @@ class DetailsView {
11680
12164
  this.performRename();
11681
12165
  return;
11682
12166
  }
11683
- // eslint-disable-next-line
11684
12167
  const records = this.getRecords([id]);
11685
12168
  if (records.length > 0) {
11686
12169
  updateRenamingData(this.parent, records[0]);
@@ -11699,21 +12182,5 @@ class DetailsView {
11699
12182
  }
11700
12183
  }
11701
12184
 
11702
- /**
11703
- * File Manager layout modules
11704
- */
11705
-
11706
- /**
11707
- * File Manager pop-up modules
11708
- */
11709
-
11710
- /**
11711
- * File Manager modules
11712
- */
11713
-
11714
- /**
11715
- * File Manager all modules
11716
- */
11717
-
11718
- export { AjaxSettings, defaultToolbarItems, ToolbarSettings, ToolbarItem, SearchSettings, columnArray, DetailsViewSettings, fileItems, folderItems, layoutItems, ContextMenuSettings, NavigationPaneSettings, UploadSettings, Column, TOOLBAR_ID, LAYOUT_ID, NAVIGATION_ID, TREE_ID, GRID_ID, LARGEICON_ID, DIALOG_ID, ALT_DIALOG_ID, IMG_DIALOG_ID, EXTN_DIALOG_ID, UPLOAD_DIALOG_ID, RETRY_DIALOG_ID, CONTEXT_MENU_ID, SORTBY_ID, VIEW_ID, SPLITTER_ID, CONTENT_ID, BREADCRUMBBAR_ID, UPLOAD_ID, RETRY_ID, SEARCH_ID, ROOT, CONTROL, CHECK_SELECT, ROOT_POPUP, MOBILE, MOB_POPUP, MULTI_SELECT, FILTER, LAYOUT, NAVIGATION, LAYOUT_CONTENT, LARGE_ICONS, TB_ITEM, LIST_ITEM, LIST_TEXT, LIST_PARENT, TB_OPTION_TICK, TB_OPTION_DOT, BLUR, ACTIVE, HOVER, FOCUS, FOCUSED, CHECK, FRAME, CB_WRAP, ROW, ROWCELL, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, CLONE, DROP_FOLDER, DROP_FILE, FOLDER, ICON_IMAGE, ICON_MUSIC, ICON_VIDEO, LARGE_ICON, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON_FOLDER, SELECTED_ITEMS, TEXT_CONTENT, GRID_HEADER, TEMPLATE_CELL, TREE_VIEW, MENU_ITEM, MENU_ICON, SUBMENU_ICON, GRID_VIEW, GRID_CONTENT, ICON_VIEW, ICON_OPEN, ICON_UPLOAD, ICON_CUT, ICON_COPY, ICON_PASTE, ICON_DELETE, ICON_RENAME, ICON_NEWFOLDER, ICON_DETAILS, ICON_SHORTBY, ICON_REFRESH, ICON_SELECTALL, ICON_DOWNLOAD, ICON_OPTIONS, ICON_GRID, ICON_LARGE, ICON_BREADCRUMB, ICON_CLEAR, ICON_DROP_IN, ICON_DROP_OUT, ICON_NO_DROP, ICONS, DETAILS_LABEL, ERROR_CONTENT, STATUS, BREADCRUMBS, RTL, DISPLAY_NONE, COLLAPSED, FULLROW, ICON_COLLAPSIBLE, SPLIT_BAR, HEADER_CHECK, OVERLAY, VALUE, isFile, modelChanged, initialEnd, finalizeEnd, createEnd, filterEnd, beforeDelete, pathDrag, deleteInit, deleteEnd, refreshEnd, resizeEnd, splitterResize, pathChanged, destroy, beforeRequest, upload, skipUpload, afterRequest, download, layoutRefresh, actionFailure, search, openInit, openEnd, selectionChanged, selectAllInit, clearAllInit, clearPathInit, layoutChange, sortByChange, nodeExpand, detailsInit, menuItemData, renameInit, renameEndParent, renameEnd, showPaste, hidePaste, selectedData, cutCopyInit, pasteInit, pasteEnd, cutEnd, hideLayout, updateTreeSelection, treeSelect, sortColumn, pathColumn, searchTextChange, beforeDownload, downloadInit, dropInit, dragEnd, dropPath, dragHelper, dragging, updateSelectionData, methodCall, permissionRead, permissionEdit, permissionEditContents, permissionCopy, permissionUpload, permissionDownload, FileManager, Toolbar$1 as Toolbar, BreadCrumbBar, Virtualization, NavigationPane, DetailsView, LargeIconsView, createDialog, createExtDialog, createImageDialog, ContextMenu$2 as ContextMenu, read, createFolder, filter, rename, paste, Delete, GetDetails, Search, Download, sortComparer, updatePath, getPath, getPathId, getPathNames, getParents, generatePath, removeActive, activeElement, addBlur, removeBlur, getModule, searchWordHandler, updateLayout, getTargetModule, refresh, openAction, getPathObject, copyFiles, cutFiles, fileType, getImageUrl, getFullPath, getName, getSortedData, getObject, createEmptyElement, getDirectories, setNodeId, setDateObject, getLocaleText, getCssClass, sortbyClickHandler, getSortField, setNextPath, openSearchFolder, pasteHandler, validateSubFolder, dropHandler, getParentPath, getDirectoryPath, doPasteUpdate, readDropPath, getDuplicateData, createVirtualDragElement, dragStopHandler, dragStartHandler, dragCancel, removeDropTarget, removeItemClass, scrollHandler, draggingHandler, objectToString, getItemName, updateRenamingData, doRename, doDownload, doDeleteFiles, doDownloadFiles, createDeniedDialog, getAccessClass, hasReadAccess, hasEditAccess, hasContentAccess, hasUploadAccess, hasDownloadAccess, createNewFolder, uploadItem };
12185
+ export { ACTIVE, ALT_DIALOG_ID, AjaxSettings, BLUR, BREADCRUMBBAR_ID, BREADCRUMBS, BreadCrumbBar, CB_WRAP, CHECK, CHECK_SELECT, CLONE, COLLAPSED, CONTENT_ID, CONTEXT_MENU_ID, CONTROL, Column, ContextMenu, ContextMenuSettings, DETAILS_LABEL, DIALOG_ID, DISPLAY_NONE, DROP_FILE, DROP_FOLDER, Delete, DetailsView, DetailsViewSettings, Download, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, ERROR_CONTENT, EXTN_DIALOG_ID, FILTER, FOCUS, FOCUSED, FOLDER, FRAME, FULLROW, FileManager, GRID_CONTENT, GRID_HEADER, GRID_ID, GRID_VIEW, GetDetails, HEADER_CHECK, HOVER, ICONS, ICON_BREADCRUMB, ICON_CLEAR, ICON_COLLAPSIBLE, ICON_COPY, ICON_CUT, ICON_DELETE, ICON_DETAILS, ICON_DOWNLOAD, ICON_DROP_IN, ICON_DROP_OUT, ICON_GRID, ICON_IMAGE, ICON_LARGE, ICON_MUSIC, ICON_NEWFOLDER, ICON_NO_DROP, ICON_OPEN, ICON_OPTIONS, ICON_PASTE, ICON_REFRESH, ICON_RENAME, ICON_SELECTALL, ICON_SHORTBY, ICON_UPLOAD, ICON_VIDEO, ICON_VIEW, IMG_DIALOG_ID, LARGEICON_ID, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON, LARGE_ICONS, LARGE_ICON_FOLDER, LAYOUT, LAYOUT_CONTENT, LAYOUT_ID, LIST_ITEM, LIST_PARENT, LIST_TEXT, LargeIconsView, MENU_ICON, MENU_ITEM, MOBILE, MOB_POPUP, MULTI_SELECT, NAVIGATION, NAVIGATION_ID, NavigationPane, NavigationPaneSettings, OVERLAY, RETRY_DIALOG_ID, RETRY_ID, ROOT, ROOT_POPUP, ROW, ROWCELL, RTL, SEARCH_ID, SELECTED_ITEMS, SORTBY_ID, SPLITTER_ID, SPLIT_BAR, STATUS, SUBMENU_ICON, Search, SearchSettings, TB_ITEM, TB_OPTION_DOT, TB_OPTION_TICK, TEMPLATE_CELL, TEXT_CONTENT, TOOLBAR_ID, TREE_ID, TREE_VIEW, Toolbar, ToolbarItem, ToolbarSettings, UPLOAD_DIALOG_ID, UPLOAD_ID, UploadSettings, VALUE, VIEW_ID, Virtualization, actionFailure, activeElement, addBlur, afterRequest, beforeDelete, beforeDownload, beforeRequest, clearAllInit, clearPathInit, closePopup, columnArray, copyFiles, createDeniedDialog, createDialog, createEmptyElement, createEnd, createExtDialog, createFolder, createImageDialog, createNewFolder, createVirtualDragElement, cutCopyInit, cutEnd, cutFiles, defaultToolbarItems, deleteEnd, deleteInit, destroy, detailsInit, doDeleteFiles, doDownload, doDownloadFiles, doPasteUpdate, doRename, download, downloadInit, dragCancel, dragEnd, dragHelper, dragStartHandler, dragStopHandler, dragging, draggingHandler, dropHandler, dropInit, dropPath, fileItems, fileType, filter, filterEnd, finalizeEnd, folderItems, generatePath, getAccessClass, getAccessDetails, getCssClass, getDirectories, getDirectoryPath, getDuplicateData, getFullPath, getImageUrl, getItemName, getLocaleText, getModule, getName, getObject, getParentPath, getParents, getPath, getPathId, getPathNames, getPathObject, getSortField, getSortedData, getTargetModule, hasContentAccess, hasDownloadAccess, hasEditAccess, hasReadAccess, hasUploadAccess, hideLayout, hidePaste, initialEnd, isFile, isFileSystemData, layoutChange, layoutItems, layoutRefresh, menuItemData, methodCall, modelChanged, nodeExpand, objectToString, openAction, openEnd, openInit, openSearchFolder, paste, pasteEnd, pasteHandler, pasteInit, pathChanged, pathColumn, pathDrag, permissionCopy, permissionDownload, permissionEdit, permissionEditContents, permissionRead, permissionUpload, read, readDropPath, refresh, refreshEnd, removeActive, removeBlur, removeDropTarget, removeItemClass, rename, renameEnd, renameEndParent, renameInit, resizeEnd, scrollHandler, search, searchTextChange, searchWordHandler, selectAllInit, selectedData, selectionChanged, setDateObject, setNextPath, setNodeId, showPaste, skipUpload, sortByChange, sortColumn, sortComparer, sortbyClickHandler, splitterResize, treeSelect, updateLayout, updatePath, updateRenamingData, updateSelectionData, updateTreeSelection, upload, uploadItem, validateSubFolder };
11719
12186
  //# sourceMappingURL=ej2-filemanager.es2015.js.map