@syncfusion/ej2-filemanager 25.2.6 → 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.
- package/.eslintrc.json +3 -2
- package/dist/ej2-filemanager.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +914 -462
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +958 -515
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -2
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/file-manager/actions/breadcrumb-bar.js +0 -4
- package/src/file-manager/actions/toolbar.js +1 -13
- package/src/file-manager/actions/virtualization.d.ts +28 -8
- package/src/file-manager/actions/virtualization.js +36 -13
- package/src/file-manager/base/file-manager-model.d.ts +107 -36
- package/src/file-manager/base/file-manager.d.ts +100 -25
- package/src/file-manager/base/file-manager.js +46 -20
- package/src/file-manager/base/interface.d.ts +224 -2
- package/src/file-manager/base/interface.js +0 -1
- package/src/file-manager/common/operations.d.ts +7 -0
- package/src/file-manager/common/operations.js +596 -94
- package/src/file-manager/common/utility.d.ts +22 -0
- package/src/file-manager/common/utility.js +117 -65
- package/src/file-manager/layout/details-view.d.ts +1 -1
- package/src/file-manager/layout/details-view.js +23 -68
- package/src/file-manager/layout/large-icons-view.js +24 -46
- package/src/file-manager/layout/navigation-pane.js +18 -41
- package/src/file-manager/models/column-model.d.ts +1 -3
- package/src/file-manager/models/default-locale.js +0 -1
- package/src/file-manager/models/details-view-settings.js +2 -1
- package/src/file-manager/pop-up/context-menu.js +9 -24
- package/src/file-manager/pop-up/dialog.d.ts +1 -2
- package/src/file-manager/pop-up/dialog.js +12 -35
- package/styles/bootstrap-dark.css +116 -105
- package/styles/bootstrap-dark.scss +16 -1
- package/styles/bootstrap.css +117 -106
- package/styles/bootstrap.scss +16 -1
- package/styles/bootstrap4.css +116 -105
- package/styles/bootstrap4.scss +16 -1
- package/styles/bootstrap5-dark.css +98 -98
- package/styles/bootstrap5-dark.scss +16 -1
- package/styles/bootstrap5.css +98 -98
- package/styles/bootstrap5.scss +16 -1
- package/styles/fabric-dark.css +116 -105
- package/styles/fabric-dark.scss +16 -1
- package/styles/fabric.css +116 -105
- package/styles/fabric.scss +16 -1
- package/styles/file-manager/_bds-definition.scss +1 -1
- package/styles/file-manager/_bootstrap5-definition.scss +2 -1
- package/styles/file-manager/_bootstrap5.3-definition.scss +240 -0
- package/styles/file-manager/_fluent-definition.scss +1 -1
- package/styles/file-manager/_fluent2-definition.scss +249 -0
- package/styles/file-manager/_layout.scss +255 -396
- package/styles/file-manager/_material-dark-definition.scss +1 -0
- package/styles/file-manager/_material-definition.scss +1 -0
- package/styles/file-manager/_material3-definition.scss +1 -27
- package/styles/file-manager/_tailwind-definition.scss +1 -1
- package/styles/file-manager/_theme.scss +37 -85
- package/styles/file-manager/bootstrap-dark.css +116 -105
- package/styles/file-manager/bootstrap.css +117 -106
- package/styles/file-manager/bootstrap4.css +116 -105
- package/styles/file-manager/bootstrap5-dark.css +98 -98
- package/styles/file-manager/bootstrap5.css +98 -98
- package/styles/file-manager/fabric-dark.css +116 -105
- package/styles/file-manager/fabric.css +116 -105
- package/styles/file-manager/fluent-dark.css +107 -102
- package/styles/file-manager/fluent.css +107 -102
- package/styles/file-manager/fluent2.css +2872 -0
- package/styles/file-manager/fluent2.scss +16 -0
- package/styles/file-manager/highcontrast-light.css +116 -105
- package/styles/file-manager/highcontrast.css +116 -105
- package/styles/file-manager/icons/_bootstrap5.3.scss +235 -0
- package/styles/file-manager/icons/_fluent2.scss +235 -0
- package/styles/file-manager/material-dark.css +140 -108
- package/styles/file-manager/material.css +156 -112
- package/styles/file-manager/material3-dark.css +134 -109
- package/styles/file-manager/material3.css +134 -109
- package/styles/file-manager/tailwind-dark.css +93 -95
- package/styles/file-manager/tailwind.css +93 -95
- package/styles/fluent-dark.css +107 -102
- package/styles/fluent-dark.scss +16 -1
- package/styles/fluent.css +107 -102
- package/styles/fluent.scss +16 -1
- package/styles/fluent2.css +2872 -0
- package/styles/fluent2.scss +16 -0
- package/styles/highcontrast-light.css +116 -105
- package/styles/highcontrast-light.scss +16 -1
- package/styles/highcontrast.css +116 -105
- package/styles/highcontrast.scss +16 -1
- package/styles/material-dark.css +140 -108
- package/styles/material-dark.scss +16 -1
- package/styles/material.css +156 -112
- package/styles/material.scss +16 -1
- package/styles/material3-dark.css +134 -109
- package/styles/material3-dark.scss +16 -1
- package/styles/material3.css +134 -109
- package/styles/material3.scss +16 -1
- package/styles/tailwind-dark.css +93 -95
- package/styles/tailwind-dark.scss +16 -1
- package/styles/tailwind.css +93 -95
- package/styles/tailwind.scss +16 -1
- package/CHANGELOG.md +0 -475
@@ -1,13 +1,13 @@
|
|
1
|
-
import {
|
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,
|
4
|
-
import { DataManager,
|
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
|
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
|
-
|
701
|
-
|
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
|
-
|
702
|
+
}
|
703
|
+
if (!referenceIsFile && comparerIsFile) {
|
706
704
|
return -1;
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
(
|
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
|
-
|
714
|
-
|
715
|
-
|
716
|
-
referencePart[
|
717
|
-
|
718
|
-
|
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
|
-
|
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
|
1128
|
-
if (!isFile
|
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
|
-
|
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 =
|
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
|
-
|
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])
|
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
|
-
|
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
|
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
|
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
|
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
|
-
|
1755
|
-
pathId = liElement.getAttribute(
|
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
|
-
|
1969
|
-
const node = select(
|
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
|
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
|
-
|
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
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
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
|
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
|
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
|
3011
|
-
const options = getOptions(parent, text, e, details
|
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
|
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
|
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: (
|
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: (
|
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]
|
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
|
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
|
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: (
|
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(
|
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
|
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
|
-
|
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 (
|
4686
|
-
|
4687
|
-
|
5218
|
+
if (this.parent.isDevice) {
|
5219
|
+
this.tapCount = eve.tapCount;
|
5220
|
+
this.tapEvent = eve;
|
4688
5221
|
setTimeout(() => {
|
4689
|
-
if (
|
4690
|
-
|
5222
|
+
if (this.tapCount > 0) {
|
5223
|
+
this.doTapAction(this.tapEvent);
|
4691
5224
|
}
|
4692
|
-
|
5225
|
+
this.tapCount = 0;
|
4693
5226
|
}, 350);
|
4694
5227
|
}
|
4695
5228
|
else {
|
4696
5229
|
if (eve.tapCount === 2 && eve.originalEvent.which !== 3) {
|
4697
|
-
|
5230
|
+
this.dblClickHandler(eve);
|
4698
5231
|
}
|
4699
5232
|
else {
|
4700
|
-
|
5233
|
+
this.clickHandler(eve);
|
4701
5234
|
}
|
4702
5235
|
}
|
4703
5236
|
},
|
4704
5237
|
tapHold: (e) => {
|
4705
|
-
if (
|
4706
|
-
|
4707
|
-
if (
|
4708
|
-
addClass([
|
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
|
-
|
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
|
-
|
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
|
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
|
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
|
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
|
5737
|
-
EventHandler.add(search
|
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
|
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
|
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
|
-
|
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(
|
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,6 +6770,12 @@ 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
6780
|
else if (this.parent.activeModule !== 'navigationpane') {
|
6266
6781
|
if (this.parent.selectedItems.length === 1) {
|
@@ -6299,7 +6814,7 @@ class ContextMenu$2 {
|
|
6299
6814
|
this.disabledItems.push('SelectAll');
|
6300
6815
|
}
|
6301
6816
|
else {
|
6302
|
-
this.disabledItems = this.disabledItems.filter(item => item !== 'SelectAll');
|
6817
|
+
this.disabledItems = this.disabledItems.filter((item) => item !== 'SelectAll');
|
6303
6818
|
}
|
6304
6819
|
if (this.parent.selectedNodes.length === 0) {
|
6305
6820
|
if (this.disabledItems.indexOf('Paste') === -1) {
|
@@ -6319,13 +6834,11 @@ class ContextMenu$2 {
|
|
6319
6834
|
return -1;
|
6320
6835
|
}
|
6321
6836
|
}
|
6322
|
-
// eslint-disable-next-line
|
6323
6837
|
getMenuItemData() {
|
6324
6838
|
if (this.menuType === 'layout') {
|
6325
6839
|
return getPathObject(this.parent);
|
6326
6840
|
}
|
6327
6841
|
else {
|
6328
|
-
// eslint-disable-next-line
|
6329
6842
|
const args = { target: this.menuTarget };
|
6330
6843
|
this.parent.notify(menuItemData, args);
|
6331
6844
|
return this.parent.itemData[0];
|
@@ -6337,7 +6850,6 @@ class ContextMenu$2 {
|
|
6337
6850
|
return;
|
6338
6851
|
}
|
6339
6852
|
const itemText = args.item.id.substr((this.parent.element.id + '_cm_').length);
|
6340
|
-
// eslint-disable-next-line
|
6341
6853
|
let details;
|
6342
6854
|
if (itemText === 'refresh' || itemText === 'newfolder' || itemText === 'upload') {
|
6343
6855
|
details = [getPathObject(this.parent)];
|
@@ -6362,7 +6874,6 @@ class ContextMenu$2 {
|
|
6362
6874
|
let sItems;
|
6363
6875
|
if (!menuClickArgs.cancel) {
|
6364
6876
|
this.isMenuItemClicked = true;
|
6365
|
-
// eslint:disable-next-line
|
6366
6877
|
switch (itemText) {
|
6367
6878
|
case 'cut':
|
6368
6879
|
cutFiles(this.parent);
|
@@ -6450,19 +6961,10 @@ class ContextMenu$2 {
|
|
6450
6961
|
case 'upload':
|
6451
6962
|
uploadItem(this.parent);
|
6452
6963
|
break;
|
6453
|
-
/* istanbul ignore next */
|
6454
6964
|
case 'name':
|
6455
|
-
/* istanbul ignore next */
|
6456
|
-
// eslint-disable-next-line no-fallthrough
|
6457
6965
|
case 'size':
|
6458
|
-
/* istanbul ignore next */
|
6459
|
-
// eslint-disable-next-line no-fallthrough
|
6460
6966
|
case 'date':
|
6461
|
-
/* istanbul ignore next */
|
6462
|
-
// eslint-disable-next-line no-fallthrough
|
6463
6967
|
case 'ascending':
|
6464
|
-
/* istanbul ignore next */
|
6465
|
-
// eslint-disable-next-line no-fallthrough
|
6466
6968
|
case 'descending':
|
6467
6969
|
/* istanbul ignore next */
|
6468
6970
|
sortbyClickHandler(this.parent, args);
|
@@ -6473,12 +6975,10 @@ class ContextMenu$2 {
|
|
6473
6975
|
sortbyClickHandler(this.parent, args);
|
6474
6976
|
break;
|
6475
6977
|
/* istanbul ignore next */
|
6476
|
-
// eslint:disable-next-line
|
6477
6978
|
case 'largeiconsview':
|
6478
6979
|
updateLayout(this.parent, 'LargeIcons');
|
6479
6980
|
break;
|
6480
6981
|
/* istanbul ignore next */
|
6481
|
-
// eslint:disable-next-line
|
6482
6982
|
case 'detailsview':
|
6483
6983
|
updateLayout(this.parent, 'Details');
|
6484
6984
|
break;
|
@@ -6650,7 +7150,6 @@ class ContextMenu$2 {
|
|
6650
7150
|
/**
|
6651
7151
|
* Specifies the default locale of FileManager component
|
6652
7152
|
*/
|
6653
|
-
// eslint-disable-next-line
|
6654
7153
|
const defaultLocale = {
|
6655
7154
|
'NewFolder': 'New folder',
|
6656
7155
|
'Upload': 'Upload',
|
@@ -6771,14 +7270,13 @@ var FileManager_1;
|
|
6771
7270
|
let FileManager = FileManager_1 = class FileManager extends Component {
|
6772
7271
|
constructor(options, element) {
|
6773
7272
|
super(options, element);
|
6774
|
-
// eslint-disable-next-line
|
6775
7273
|
this.filterData = null;
|
6776
7274
|
this.selectedNodes = [];
|
6777
7275
|
this.duplicateItems = [];
|
6778
|
-
// eslint-disable-next-line
|
6779
7276
|
this.duplicateRecords = [];
|
6780
7277
|
this.previousPath = [];
|
6781
7278
|
this.nextPath = [];
|
7279
|
+
this.existingFileCount = 0;
|
6782
7280
|
this.isLayoutChange = false;
|
6783
7281
|
this.layoutSelectedItems = [];
|
6784
7282
|
this.renamedId = null;
|
@@ -6800,11 +7298,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
6800
7298
|
this.isOpened = false;
|
6801
7299
|
this.isRetryOpened = false;
|
6802
7300
|
this.isPathDrag = false;
|
6803
|
-
// eslint-disable-next-line
|
6804
7301
|
this.searchedItems = [];
|
6805
7302
|
this.retryFiles = [];
|
6806
7303
|
this.isApplySame = false;
|
6807
|
-
// eslint-disable-next-line
|
6808
7304
|
this.dragData = [];
|
6809
7305
|
this.dragNodes = [];
|
6810
7306
|
this.dragPath = '';
|
@@ -6814,13 +7310,12 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
6814
7310
|
this.dragCursorPosition = { left: 44, top: 18 };
|
6815
7311
|
this.isDropEnd = false;
|
6816
7312
|
this.dragCount = 0;
|
6817
|
-
// eslint-disable-next-line
|
6818
7313
|
this.droppedObjects = [];
|
6819
7314
|
this.uploadingCount = 0;
|
6820
7315
|
this.uploadedCount = 0;
|
6821
|
-
//Specifies whether the operating system is MAC or not
|
7316
|
+
//Specifies whether the operating system is MAC or not
|
6822
7317
|
this.isMac = false;
|
6823
|
-
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu
|
7318
|
+
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
|
6824
7319
|
}
|
6825
7320
|
/**
|
6826
7321
|
* Get component name.
|
@@ -7210,7 +7705,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7210
7705
|
const data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
7211
7706
|
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
7212
7707
|
const uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
|
7213
|
-
// eslint-disable-next-line
|
7214
7708
|
const ajaxSettings = {
|
7215
7709
|
url: uploadUrl,
|
7216
7710
|
type: 'POST',
|
@@ -7226,7 +7720,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7226
7720
|
this.trigger('beforeSend', this.uploadEventArgs, (uploadEventArgs) => {
|
7227
7721
|
args.customFormData = JSON.parse(getValue('data', uploadEventArgs.ajaxSettings));
|
7228
7722
|
args.cancel = uploadEventArgs.cancel;
|
7229
|
-
// eslint-disable-next-line
|
7230
7723
|
const eventArgs = {
|
7231
7724
|
cancel: false,
|
7232
7725
|
httpRequest: args.currentRequest
|
@@ -7263,7 +7756,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7263
7756
|
}
|
7264
7757
|
this.uploadingCount = args.filesData.length;
|
7265
7758
|
this.uploadedCount = 0;
|
7266
|
-
// eslint-disable-next-line
|
7267
7759
|
const details = getPathObject(this);
|
7268
7760
|
if (!hasUploadAccess(details)) {
|
7269
7761
|
args.cancel = true;
|
@@ -7272,7 +7764,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7272
7764
|
}
|
7273
7765
|
this.uploadDialogObj.show();
|
7274
7766
|
}
|
7275
|
-
// eslint-disable-next-line
|
7276
7767
|
onFileUploadSuccess(args) {
|
7277
7768
|
this.uploadedCount = this.uploadedCount + args.count;
|
7278
7769
|
if (this.uploadSettings.autoClose && (this.uploadingCount === this.uploadedCount)) {
|
@@ -7280,7 +7771,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7280
7771
|
}
|
7281
7772
|
}
|
7282
7773
|
/* istanbul ignore next */
|
7283
|
-
// eslint-disable-next-line
|
7284
7774
|
onUploadSuccess(files) {
|
7285
7775
|
const args = { action: 'Upload', result: files };
|
7286
7776
|
this.trigger('success', args);
|
@@ -7292,9 +7782,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7292
7782
|
}
|
7293
7783
|
}
|
7294
7784
|
/* istanbul ignore next */
|
7295
|
-
// eslint-disable-next-line
|
7296
7785
|
onUploadFailure(files) {
|
7297
|
-
// eslint-disable-next-line
|
7298
7786
|
const response = getValue('response', files);
|
7299
7787
|
const statusText = getValue('statusText', response);
|
7300
7788
|
if (statusText !== '') {
|
@@ -7378,7 +7866,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7378
7866
|
break;
|
7379
7867
|
case 'ctrlU':
|
7380
7868
|
e.preventDefault();
|
7381
|
-
if (this.toolbarSettings.items.indexOf('Upload')
|
7869
|
+
if (this.toolbarSettings.items.indexOf('Upload') !== -1) {
|
7382
7870
|
uploadEle = select('#' + this.element.id + UPLOAD_ID, this.element);
|
7383
7871
|
uploadEle.click();
|
7384
7872
|
}
|
@@ -7412,7 +7900,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7412
7900
|
* @private
|
7413
7901
|
*/
|
7414
7902
|
/* istanbul ignore next */
|
7415
|
-
// eslint:disable-next-line
|
7416
7903
|
onPropertyChanged(newProp, oldProp) {
|
7417
7904
|
let height;
|
7418
7905
|
for (const prop of Object.keys(newProp)) {
|
@@ -7544,6 +8031,10 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7544
8031
|
this.viewerObj.target = newProp.popupTarget;
|
7545
8032
|
}
|
7546
8033
|
break;
|
8034
|
+
case 'fileSystemData':
|
8035
|
+
this.fileSystemData = newProp.fileSystemData;
|
8036
|
+
this.refresh();
|
8037
|
+
break;
|
7547
8038
|
}
|
7548
8039
|
}
|
7549
8040
|
}
|
@@ -7629,7 +8120,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7629
8120
|
*/
|
7630
8121
|
createFolder(name) {
|
7631
8122
|
this.notify(methodCall, { action: 'createFolder' });
|
7632
|
-
// eslint-disable-next-line
|
7633
8123
|
const details = [getPathObject(this)];
|
7634
8124
|
this.itemData = details;
|
7635
8125
|
if (name) {
|
@@ -7752,7 +8242,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7752
8242
|
*
|
7753
8243
|
* @returns {void}
|
7754
8244
|
*/
|
7755
|
-
// eslint-disable-next-line
|
7756
8245
|
filterFiles(filterData) {
|
7757
8246
|
this.filterData = filterData ? filterData : null;
|
7758
8247
|
this.setProperties({ selectedItems: [] }, true);
|
@@ -7768,7 +8257,6 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7768
8257
|
*
|
7769
8258
|
* @returns {Object[]} - returns selected files.
|
7770
8259
|
*/
|
7771
|
-
// eslint-disable-next-line
|
7772
8260
|
getSelectedFiles() {
|
7773
8261
|
this.notify(updateSelectionData, {});
|
7774
8262
|
return this.itemData;
|
@@ -7840,11 +8328,18 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7840
8328
|
* @returns {void}
|
7841
8329
|
*/
|
7842
8330
|
uploadFiles() {
|
7843
|
-
// eslint-disable-next-line
|
7844
8331
|
const details = [getPathObject(this)];
|
7845
8332
|
this.itemData = details;
|
7846
8333
|
uploadItem(this);
|
7847
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
|
+
}
|
7848
8343
|
/**
|
7849
8344
|
* Specifies the direction of FileManager
|
7850
8345
|
*
|
@@ -7867,6 +8362,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7867
8362
|
__decorate$8([
|
7868
8363
|
Complex({}, AjaxSettings)
|
7869
8364
|
], FileManager.prototype, "ajaxSettings", void 0);
|
8365
|
+
__decorate$8([
|
8366
|
+
Property([])
|
8367
|
+
], FileManager.prototype, "fileSystemData", void 0);
|
7870
8368
|
__decorate$8([
|
7871
8369
|
Property(false)
|
7872
8370
|
], FileManager.prototype, "allowDragAndDrop", void 0);
|
@@ -7972,9 +8470,36 @@ __decorate$8([
|
|
7972
8470
|
__decorate$8([
|
7973
8471
|
Event()
|
7974
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);
|
7975
8479
|
__decorate$8([
|
7976
8480
|
Event()
|
7977
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);
|
7978
8503
|
__decorate$8([
|
7979
8504
|
Event()
|
7980
8505
|
], FileManager.prototype, "fileDragStart", void 0);
|
@@ -8024,15 +8549,11 @@ FileManager = FileManager_1 = __decorate$8([
|
|
8024
8549
|
NotifyPropertyChanges
|
8025
8550
|
], FileManager);
|
8026
8551
|
|
8027
|
-
/**
|
8028
|
-
* File Manager base modules
|
8029
|
-
*/
|
8030
|
-
|
8031
8552
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
8032
8553
|
/**
|
8033
8554
|
* Toolbar module
|
8034
8555
|
*/
|
8035
|
-
class Toolbar
|
8556
|
+
class Toolbar {
|
8036
8557
|
/**
|
8037
8558
|
* Constructor for the Toolbar module
|
8038
8559
|
*
|
@@ -8054,7 +8575,7 @@ class Toolbar$1 {
|
|
8054
8575
|
const eventArgs = { items: this.items };
|
8055
8576
|
this.parent.trigger('toolbarCreate', eventArgs, (toolbarCreateArgs) => {
|
8056
8577
|
this.items = toolbarCreateArgs.items;
|
8057
|
-
this.toolbarObj = new Toolbar({
|
8578
|
+
this.toolbarObj = new Toolbar$1({
|
8058
8579
|
items: this.items,
|
8059
8580
|
created: this.toolbarCreateHandler.bind(this),
|
8060
8581
|
overflowMode: 'Popup',
|
@@ -8092,7 +8613,6 @@ class Toolbar$1 {
|
|
8092
8613
|
return;
|
8093
8614
|
}
|
8094
8615
|
const tool = args.item.id.substr((this.parent.element.id + '_tb_').length);
|
8095
|
-
// eslint-disable-next-line
|
8096
8616
|
let details;
|
8097
8617
|
if (tool === 'refresh' || tool === 'newfolder' || tool === 'upload') {
|
8098
8618
|
details = [getPathObject(this.parent)];
|
@@ -8630,6 +9150,8 @@ class Virtualization {
|
|
8630
9150
|
}
|
8631
9151
|
/**
|
8632
9152
|
* Sets up UI virtualization for the large icon view.
|
9153
|
+
*
|
9154
|
+
* @returns {void}
|
8633
9155
|
*/
|
8634
9156
|
setUIVirtualization() {
|
8635
9157
|
// Get the current view data source
|
@@ -8655,6 +9177,8 @@ class Virtualization {
|
|
8655
9177
|
/**
|
8656
9178
|
* Sets the height of the top and bottom elements that are used for virtualization.
|
8657
9179
|
* These elements are used to give the appearance of an infinitely scrolling list.
|
9180
|
+
*
|
9181
|
+
* @returns {void}
|
8658
9182
|
*/
|
8659
9183
|
setUlElementHeight() {
|
8660
9184
|
// Calculate the number of items in the last row
|
@@ -8662,10 +9186,10 @@ class Virtualization {
|
|
8662
9186
|
(this.largeIconInstance.allItems.length - this.itemCount) % this.rowItemCount : this.rowItemCount;
|
8663
9187
|
// Create top and bottom elements
|
8664
9188
|
this.topElement = this.filemanagerInstance.createElement('div');
|
8665
|
-
this.topElement.classList.add(
|
9189
|
+
this.topElement.classList.add('e-virtual-top');
|
8666
9190
|
this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement, this.largeIconInstance.element.firstElementChild.firstChild);
|
8667
9191
|
this.bottomElement = this.filemanagerInstance.createElement('div');
|
8668
|
-
this.bottomElement.classList.add(
|
9192
|
+
this.bottomElement.classList.add('e-virtual-bottom');
|
8669
9193
|
this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement, null);
|
8670
9194
|
// Get the margin value for list items
|
8671
9195
|
const marginValue = parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-top'), 10) +
|
@@ -8687,17 +9211,21 @@ class Virtualization {
|
|
8687
9211
|
}
|
8688
9212
|
/**
|
8689
9213
|
* Calculates the number of items to display in the list based on the available width and height.
|
8690
|
-
*
|
8691
|
-
* @
|
9214
|
+
*
|
9215
|
+
* @param {number} dataSourceLength The length of the data source.
|
9216
|
+
* @returns {number} The number of items to display.
|
8692
9217
|
*/
|
8693
9218
|
getItemCount(dataSourceLength) {
|
8694
9219
|
// Get the margin values for list items
|
8695
9220
|
const widthMargin = parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue('margin-right'), 10) +
|
8696
9221
|
parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue('margin-left'), 10);
|
8697
9222
|
// Calculate the number of items that can fit in a single row
|
8698
|
-
this.rowItemCount =
|
9223
|
+
this.rowItemCount =
|
9224
|
+
Math.floor(parseFloat(formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth)) /
|
9225
|
+
(this.itemList[0].offsetWidth + widthMargin));
|
8699
9226
|
// Calculate the number of items that can fit in the available height
|
8700
|
-
let itemCount = this.rowItemCount *
|
9227
|
+
let itemCount = this.rowItemCount *
|
9228
|
+
(Math.round(parseFloat(formatUnit(this.largeIconInstance.element.clientHeight)) / this.itemList[0].offsetHeight));
|
8701
9229
|
// If the calculated item count is greater than the data source length, set the item count to the data source length
|
8702
9230
|
if (itemCount > dataSourceLength) {
|
8703
9231
|
itemCount = dataSourceLength;
|
@@ -8706,7 +9234,9 @@ class Virtualization {
|
|
8706
9234
|
}
|
8707
9235
|
/**
|
8708
9236
|
* Wires or un wires the scroll event for the list element.
|
8709
|
-
*
|
9237
|
+
*
|
9238
|
+
* @param {boolean} destroy - Set `true` to unwire the scroll event.
|
9239
|
+
* @returns {void}
|
8710
9240
|
*/
|
8711
9241
|
wireScrollEvent(destroy) {
|
8712
9242
|
if (!destroy) {
|
@@ -8721,6 +9251,9 @@ class Virtualization {
|
|
8721
9251
|
/**
|
8722
9252
|
* Handles the scroll event for the list element.
|
8723
9253
|
* This method updates the top and bottom elements and the displayed items based on the scroll position.
|
9254
|
+
*
|
9255
|
+
* @returns {void}
|
9256
|
+
* @private
|
8724
9257
|
*/
|
8725
9258
|
onVirtualUiScroll() {
|
8726
9259
|
// Set the starting height to 0
|
@@ -8757,14 +9290,16 @@ class Virtualization {
|
|
8757
9290
|
this.scrollPosition = scroll;
|
8758
9291
|
// Update the list of items and the items property of the largeIconInstance
|
8759
9292
|
this.largeIconInstance.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.largeIconInstance.element));
|
8760
|
-
this.itemCount = this.itemCount
|
9293
|
+
this.itemCount = this.itemCount !== this.largeIconInstance.itemList.length ? this.largeIconInstance.itemList.length : this.itemCount;
|
8761
9294
|
this.largeIconInstance.items = this.largeIconInstance.allItems.slice(this.renderedCount -
|
8762
9295
|
this.itemCount, this.renderedCount);
|
8763
9296
|
}
|
8764
9297
|
/**
|
8765
9298
|
* Calculates the current scroll position of the list element.
|
8766
|
-
*
|
8767
|
-
* @
|
9299
|
+
*
|
9300
|
+
* @param {number} startingHeight The starting height from which to calculate the scroll position.
|
9301
|
+
* @returns {number} The current scroll position.
|
9302
|
+
* @private
|
8768
9303
|
*/
|
8769
9304
|
getscrollerHeight(startingHeight) {
|
8770
9305
|
// If the scroll position is less than or equal to the starting height, return 0.
|
@@ -8774,8 +9309,11 @@ class Virtualization {
|
|
8774
9309
|
}
|
8775
9310
|
/**
|
8776
9311
|
* This method updates the displayed items and the selection based on the scroll direction.
|
8777
|
-
*
|
8778
|
-
* @param
|
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
|
8779
9317
|
*/
|
8780
9318
|
onNormalScroll(listDiff, isScrollingDown) {
|
8781
9319
|
// Update the displayed items
|
@@ -8785,7 +9323,10 @@ class Virtualization {
|
|
8785
9323
|
}
|
8786
9324
|
/**
|
8787
9325
|
* Updates the items in the large icons view.
|
8788
|
-
*
|
9326
|
+
*
|
9327
|
+
* @param {boolean} isScrollingDown - If set to true, the scroll direction is downward.
|
9328
|
+
* @returns {void}
|
9329
|
+
* @private
|
8789
9330
|
*/
|
8790
9331
|
updateUI(isScrollingDown) {
|
8791
9332
|
if (isScrollingDown) {
|
@@ -8858,6 +9399,8 @@ class Virtualization {
|
|
8858
9399
|
}
|
8859
9400
|
/**
|
8860
9401
|
* Destroys the component.
|
9402
|
+
*
|
9403
|
+
* @returns {void}
|
8861
9404
|
*/
|
8862
9405
|
destroy() {
|
8863
9406
|
// If the file manager has already been destroyed, return immediately
|
@@ -8871,10 +9414,6 @@ class Virtualization {
|
|
8871
9414
|
}
|
8872
9415
|
}
|
8873
9416
|
|
8874
|
-
/**
|
8875
|
-
* File Manager actions modules
|
8876
|
-
*/
|
8877
|
-
|
8878
9417
|
/**
|
8879
9418
|
* NavigationPane module
|
8880
9419
|
*/
|
@@ -8921,10 +9460,8 @@ class NavigationPane {
|
|
8921
9460
|
if (!isNullOrUndefined(this.treeObj)) {
|
8922
9461
|
return;
|
8923
9462
|
}
|
8924
|
-
// eslint-disable-next-line
|
8925
9463
|
const rootData = getValue(this.parent.pathId[0], this.parent.feParent);
|
8926
9464
|
setValue('_fm_icon', 'e-fe-folder', rootData);
|
8927
|
-
// eslint-disable-next-line
|
8928
9465
|
const attr = {};
|
8929
9466
|
const id = getValue('id', rootData);
|
8930
9467
|
if (!isNullOrUndefined(id)) {
|
@@ -8995,7 +9532,6 @@ class NavigationPane {
|
|
8995
9532
|
this.parent.activeElements = [dragLi];
|
8996
9533
|
this.parent.dragNodes = [];
|
8997
9534
|
getModule(this.parent, dragLi);
|
8998
|
-
// eslint-disable-next-line
|
8999
9535
|
this.parent.dragData = this.getTreeData(dragLi);
|
9000
9536
|
this.parent.dragPath = this.getDragPath(dragLi, this.parent.dragData[0].name);
|
9001
9537
|
this.parent.dragNodes.push(this.parent.dragData[0].name);
|
@@ -9019,19 +9555,20 @@ class NavigationPane {
|
|
9019
9555
|
};
|
9020
9556
|
this.parent.trigger('fileLoad', eventArgs);
|
9021
9557
|
}
|
9022
|
-
// eslint-disable-next-line
|
9023
9558
|
addChild(files, target, prevent) {
|
9024
|
-
// eslint-disable-next-line
|
9025
9559
|
const directories = getDirectories(files);
|
9026
|
-
|
9027
|
-
|
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)) {
|
9028
9567
|
let length = 0;
|
9029
|
-
// eslint-disable-next-line
|
9030
9568
|
const folders = directories;
|
9031
9569
|
while (length < directories.length) {
|
9032
|
-
// eslint-disable-next-line
|
9033
|
-
folders[length]._fm_icon = 'e-fe-folder';
|
9034
|
-
// eslint-disable-next-line
|
9570
|
+
// eslint-disable-next-line camelcase
|
9571
|
+
folders[parseInt(length.toString(), 10)]._fm_icon = 'e-fe-folder';
|
9035
9572
|
const attr = {};
|
9036
9573
|
const id = getValue('id', folders[length]);
|
9037
9574
|
if (!isNullOrUndefined(id)) {
|
@@ -9048,21 +9585,20 @@ class NavigationPane {
|
|
9048
9585
|
const element = select('[data-uid="' + target + '"]', this.treeObj.element);
|
9049
9586
|
const childElements = select('ul', element);
|
9050
9587
|
if (isNullOrUndefined(childElements)) {
|
9051
|
-
// eslint-disable-next-line
|
9052
9588
|
this.treeObj.addNodes(directories, target, null, prevent);
|
9053
9589
|
}
|
9054
9590
|
}
|
9055
9591
|
}
|
9056
9592
|
// Node Selecting event handler
|
9057
9593
|
onNodeSelecting(args) {
|
9058
|
-
if (!args.isInteracted && !this.isRightClick &&
|
9594
|
+
if (!args.isInteracted && !this.isRightClick &&
|
9595
|
+
!this.isSameNodeClicked && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
|
9059
9596
|
this.restrictSelecting = false;
|
9060
9597
|
this.isNodeClickCalled = false;
|
9061
9598
|
return;
|
9062
9599
|
}
|
9063
9600
|
if (!this.renameParent) {
|
9064
9601
|
this.parent.activeModule = 'navigationpane';
|
9065
|
-
// eslint-disable-next-line
|
9066
9602
|
const nodeData = this.getTreeData(getValue('id', args.nodeData));
|
9067
9603
|
if (args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1] && !this.isRightClick && !this.isNodeClickCalled || this.isSameNodeClicked) {
|
9068
9604
|
this.isNodeClickCalled = false;
|
@@ -9081,7 +9617,7 @@ class NavigationPane {
|
|
9081
9617
|
this.isNodeClickCalled = true;
|
9082
9618
|
this.isSameNodeClicked = false;
|
9083
9619
|
this.previousSelected = this.treeObj.selectedNodes;
|
9084
|
-
this.treeObj.selectedNodes = [args.node.getAttribute(
|
9620
|
+
this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
|
9085
9621
|
}
|
9086
9622
|
}
|
9087
9623
|
else if (this.previousSelected[0] !== args.node.getAttribute('data-uid')) {
|
@@ -9093,7 +9629,6 @@ class NavigationPane {
|
|
9093
9629
|
// Opens the folder while clicking open context menu item in the treeview.
|
9094
9630
|
openFileOnContextMenuClick(node) {
|
9095
9631
|
const data = this.treeObj.getTreeData(node);
|
9096
|
-
// eslint-disable-next-line
|
9097
9632
|
this.parent.selectedItems = [];
|
9098
9633
|
this.parent.itemData = data;
|
9099
9634
|
this.activeNode = node;
|
@@ -9122,7 +9657,6 @@ class NavigationPane {
|
|
9122
9657
|
}
|
9123
9658
|
this.activeNode = args.node;
|
9124
9659
|
this.parent.activeModule = 'navigationpane';
|
9125
|
-
// eslint-disable-next-line
|
9126
9660
|
const nodeData = this.getTreeData(getValue('id', args.nodeData));
|
9127
9661
|
this.parent.selectedItems = [];
|
9128
9662
|
this.parent.itemData = nodeData;
|
@@ -9147,7 +9681,6 @@ class NavigationPane {
|
|
9147
9681
|
this.isPathDragged = this.isRenameParent = this.isRightClick = this.isSameNodeClicked = false;
|
9148
9682
|
}
|
9149
9683
|
/* istanbul ignore next */
|
9150
|
-
// eslint-disable-next-line
|
9151
9684
|
onPathDrag(args) {
|
9152
9685
|
this.isPathDragged = true;
|
9153
9686
|
this.selectResultNode(args[0]);
|
@@ -9158,6 +9691,7 @@ class NavigationPane {
|
|
9158
9691
|
return;
|
9159
9692
|
}
|
9160
9693
|
if (args.node.querySelector('.' + LIST_ITEM) === null) {
|
9694
|
+
this.isNodeExpandCalled = true;
|
9161
9695
|
const text = getValue('text', args.nodeData);
|
9162
9696
|
const id = args.node.getAttribute('data-id');
|
9163
9697
|
const isId = isNullOrUndefined(id) ? false : true;
|
@@ -9168,7 +9702,6 @@ class NavigationPane {
|
|
9168
9702
|
this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
|
9169
9703
|
this.parent.pathId.push(getValue('id', args.nodeData));
|
9170
9704
|
read(this.parent, nodeExpand, path);
|
9171
|
-
this.isNodeExpandCalled = true;
|
9172
9705
|
}
|
9173
9706
|
}
|
9174
9707
|
/* istanbul ignore next */
|
@@ -9208,7 +9741,6 @@ class NavigationPane {
|
|
9208
9741
|
}
|
9209
9742
|
onPathChanged(args) {
|
9210
9743
|
this.parent.isCut = false;
|
9211
|
-
// eslint-disable-next-line
|
9212
9744
|
const currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
|
9213
9745
|
if (this.expandNodeTarget === 'add') {
|
9214
9746
|
const sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
|
@@ -9313,14 +9845,12 @@ class NavigationPane {
|
|
9313
9845
|
this.renameParent = null;
|
9314
9846
|
}
|
9315
9847
|
else {
|
9316
|
-
// eslint-disable-next-line
|
9317
9848
|
let resultData = [];
|
9318
9849
|
if (this.parent.hasId) {
|
9319
9850
|
resultData = new DataManager(this.treeObj.getTreeData()).
|
9320
9851
|
executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
|
9321
9852
|
}
|
9322
9853
|
else {
|
9323
|
-
// eslint-disable-next-line
|
9324
9854
|
const nData = new DataManager(this.treeObj.getTreeData()).
|
9325
9855
|
executeLocal(new Query().where(this.treeObj.fields.text, 'equal', this.parent.renameText, false));
|
9326
9856
|
if (nData.length > 0) {
|
@@ -9341,16 +9871,13 @@ class NavigationPane {
|
|
9341
9871
|
this.updateTree(args);
|
9342
9872
|
}
|
9343
9873
|
else {
|
9344
|
-
// eslint-disable-next-line
|
9345
9874
|
const data = this.treeObj.getTreeData();
|
9346
|
-
// eslint-disable-next-line
|
9347
9875
|
let resultData = [];
|
9348
9876
|
if (this.parent.hasId) {
|
9349
9877
|
resultData = new DataManager(data).
|
9350
9878
|
executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
|
9351
9879
|
}
|
9352
9880
|
else {
|
9353
|
-
// eslint-disable-next-line
|
9354
9881
|
const nData = new DataManager(data).
|
9355
9882
|
executeLocal(new Query().where(this.treeObj.fields.text, 'equal', this.parent.currentItemText, false));
|
9356
9883
|
if (nData.length > 0) {
|
@@ -9405,7 +9932,6 @@ class NavigationPane {
|
|
9405
9932
|
}
|
9406
9933
|
this.treeObj.removeNodes(moveNames);
|
9407
9934
|
}
|
9408
|
-
// eslint-disable-next-line
|
9409
9935
|
getMoveNames(files, flag, path) {
|
9410
9936
|
const moveNames = [];
|
9411
9937
|
for (let i = 0; i < files.length; i++) {
|
@@ -9418,7 +9944,6 @@ class NavigationPane {
|
|
9418
9944
|
name = path.substring(index + 1);
|
9419
9945
|
path = path.substring(0, index + 1);
|
9420
9946
|
}
|
9421
|
-
// eslint-disable-next-line
|
9422
9947
|
const resultData = new DataManager(this.treeObj.getTreeData()).
|
9423
9948
|
executeLocal(new Query().where(this.treeObj.fields.text, 'equal', name, false));
|
9424
9949
|
for (let j = 0; j < resultData.length; j++) {
|
@@ -9445,16 +9970,13 @@ class NavigationPane {
|
|
9445
9970
|
this.treeObj.removeNodes(moveNames);
|
9446
9971
|
}
|
9447
9972
|
/* istanbul ignore next */
|
9448
|
-
// eslint-disable-next-line
|
9449
9973
|
selectResultNode(resultObj) {
|
9450
9974
|
if (!this.parent.hasId) {
|
9451
9975
|
const path = getValue('filterPath', resultObj);
|
9452
9976
|
const itemname = getValue('name', resultObj);
|
9453
|
-
// eslint-disable-next-line
|
9454
9977
|
const data = new DataManager(this.treeObj.getTreeData()).
|
9455
9978
|
executeLocal(new Query().where(this.treeObj.fields.text, 'equal', itemname, false));
|
9456
9979
|
if (data.length > 0) {
|
9457
|
-
// eslint-disable-next-line
|
9458
9980
|
const resultData = new DataManager(data).
|
9459
9981
|
executeLocal(new Query().where('filterPath', 'equal', path, false));
|
9460
9982
|
if (resultData.length > 0) {
|
@@ -9476,14 +9998,12 @@ class NavigationPane {
|
|
9476
9998
|
this.parent.isDropEnd = !this.parent.isPasteError;
|
9477
9999
|
}
|
9478
10000
|
onpasteEnd(args) {
|
9479
|
-
// eslint-disable-next-line
|
9480
10001
|
let resultData = [];
|
9481
10002
|
if (this.parent.hasId) {
|
9482
10003
|
resultData = new DataManager(this.treeObj.getTreeData()).
|
9483
10004
|
executeLocal(new Query().where('id', 'equal', getValue('id', args.cwd), false));
|
9484
10005
|
}
|
9485
10006
|
else {
|
9486
|
-
// eslint-disable-next-line
|
9487
10007
|
const nData = new DataManager(this.treeObj.getTreeData()).
|
9488
10008
|
executeLocal(new Query().where(this.treeObj.fields.text, 'equal', getValue('name', args.cwd), false));
|
9489
10009
|
if (nData.length > 0) {
|
@@ -9505,6 +10025,9 @@ class NavigationPane {
|
|
9505
10025
|
}
|
9506
10026
|
/* istanbul ignore next */
|
9507
10027
|
checkDropPath(args) {
|
10028
|
+
if (isFileSystemData(this.parent) && this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane') {
|
10029
|
+
return;
|
10030
|
+
}
|
9508
10031
|
if (this.parent.hasId) {
|
9509
10032
|
this.parent.isDropEnd = !this.parent.isPasteError;
|
9510
10033
|
readDropPath(this.parent);
|
@@ -9523,8 +10046,7 @@ class NavigationPane {
|
|
9523
10046
|
this.updateItemData();
|
9524
10047
|
}
|
9525
10048
|
this.moveNames = [];
|
9526
|
-
|
9527
|
-
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;
|
9528
10050
|
for (let i = 0; i < obj.length; i++) {
|
9529
10051
|
if (getValue('isFile', obj[i]) === false) {
|
9530
10052
|
this.moveNames.push(getValue('_fm_id', obj[i]));
|
@@ -9604,12 +10126,10 @@ class NavigationPane {
|
|
9604
10126
|
/* istanbul ignore next */
|
9605
10127
|
onDetailsInit() {
|
9606
10128
|
if (this.parent.activeModule === this.getModuleName()) {
|
9607
|
-
// eslint-disable-next-line
|
9608
10129
|
const dataobj = this.getTreeData(this.treeObj.selectedNodes[0]);
|
9609
10130
|
this.parent.itemData = dataobj;
|
9610
10131
|
}
|
9611
10132
|
}
|
9612
|
-
// eslint-disable-next-line
|
9613
10133
|
onMenuItemData(args) {
|
9614
10134
|
if (this.parent.activeModule === this.getModuleName()) {
|
9615
10135
|
const liEle = closest(args.target, 'li');
|
@@ -9707,7 +10227,6 @@ class NavigationPane {
|
|
9707
10227
|
break;
|
9708
10228
|
case 'f2':
|
9709
10229
|
if (this.parent.selectedItems.length === 0) {
|
9710
|
-
// eslint-disable-next-line
|
9711
10230
|
const data = this.getTreeData(this.treeObj.selectedNodes[0])[0];
|
9712
10231
|
if (!hasEditAccess(data)) {
|
9713
10232
|
createDeniedDialog(this.parent, data, permissionEdit);
|
@@ -9720,9 +10239,7 @@ class NavigationPane {
|
|
9720
10239
|
break;
|
9721
10240
|
}
|
9722
10241
|
}
|
9723
|
-
// eslint-disable-next-line
|
9724
10242
|
getTreeData(args) {
|
9725
|
-
// eslint-disable-next-line
|
9726
10243
|
const data = this.treeObj.getTreeData(args);
|
9727
10244
|
for (let i = 0; i < data.length; i++) {
|
9728
10245
|
if (isNullOrUndefined(getValue('hasChild', data[i]))) {
|
@@ -9736,7 +10253,6 @@ class NavigationPane {
|
|
9736
10253
|
this.parent.currentItemText = getValue('name', this.parent.itemData[0]);
|
9737
10254
|
}
|
9738
10255
|
updateItemData() {
|
9739
|
-
// eslint-disable-next-line
|
9740
10256
|
const data = this.getTreeData(this.treeObj.selectedNodes[0])[0];
|
9741
10257
|
this.parent.itemData = [data];
|
9742
10258
|
this.parent.isFile = false;
|
@@ -9757,6 +10273,7 @@ class NavigationPane {
|
|
9757
10273
|
}
|
9758
10274
|
}
|
9759
10275
|
|
10276
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9760
10277
|
/**
|
9761
10278
|
* DetailsView module
|
9762
10279
|
*/
|
@@ -9783,7 +10300,7 @@ class DetailsView {
|
|
9783
10300
|
this.isNameWidth = false;
|
9784
10301
|
this.pasteOperation = false;
|
9785
10302
|
this.uploadOperation = false;
|
9786
|
-
Grid.Inject(Resize, ContextMenu$
|
10303
|
+
Grid.Inject(Resize, ContextMenu$2, Sort, VirtualScroll);
|
9787
10304
|
this.parent = parent;
|
9788
10305
|
this.element = select('#' + this.parent.element.id + GRID_ID, this.parent.element);
|
9789
10306
|
this.addEventListener();
|
@@ -9830,7 +10347,6 @@ class DetailsView {
|
|
9830
10347
|
showSpinner(this.parent.element);
|
9831
10348
|
if (this.parent.view === 'Details') {
|
9832
10349
|
removeClass([this.parent.element], MULTI_SELECT);
|
9833
|
-
// eslint-disable-next-line
|
9834
10350
|
const items = getSortedData(this.parent, args.files);
|
9835
10351
|
this.checkNameWidth();
|
9836
10352
|
const columns = this.getColumns();
|
@@ -9871,8 +10387,7 @@ class DetailsView {
|
|
9871
10387
|
width: '100%',
|
9872
10388
|
height: (this.parent.enableVirtualization) ? this.getGridHeight() : 'auto',
|
9873
10389
|
beforeCopy: (args) => { args.cancel = true; },
|
9874
|
-
|
9875
|
-
load: function (args) {
|
10390
|
+
load: function () {
|
9876
10391
|
this.focusModule.destroy();
|
9877
10392
|
},
|
9878
10393
|
locale: this.parent.locale
|
@@ -9890,18 +10405,18 @@ class DetailsView {
|
|
9890
10405
|
}
|
9891
10406
|
}
|
9892
10407
|
reactTemplateRender(args) {
|
9893
|
-
this.parent[
|
10408
|
+
this.parent['portals'] = args;
|
9894
10409
|
if (this.parent.portals && this.parent.toolbarModule && this.parent.toolbarModule.toolbarObj &&
|
9895
10410
|
this.parent.toolbarModule.toolbarObj.portals) {
|
9896
|
-
this.parent[
|
10411
|
+
this.parent['portals'] = this.parent['portals'].concat(this.parent.toolbarModule.toolbarObj.portals);
|
9897
10412
|
}
|
9898
|
-
this.parent.notify('renderReactTemplate', this.parent[
|
9899
|
-
this.parent[
|
10413
|
+
this.parent.notify('renderReactTemplate', this.parent['portals']);
|
10414
|
+
this.parent['renderReactTemplates']();
|
9900
10415
|
}
|
9901
10416
|
/**
|
9902
10417
|
* Gets the grid height.
|
9903
10418
|
*
|
9904
|
-
* @returns The grid height.
|
10419
|
+
* @returns {number} - The grid height.
|
9905
10420
|
* @private
|
9906
10421
|
*/
|
9907
10422
|
getGridHeight() {
|
@@ -9942,7 +10457,7 @@ class DetailsView {
|
|
9942
10457
|
}
|
9943
10458
|
getColumns() {
|
9944
10459
|
let columns;
|
9945
|
-
|
10460
|
+
const enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
|
9946
10461
|
if (this.parent.isMobile) {
|
9947
10462
|
columns = [
|
9948
10463
|
{
|
@@ -9975,7 +10490,7 @@ class DetailsView {
|
|
9975
10490
|
return `<span class="e-fe-icon ${data._fm_iconClass}"></span>`;
|
9976
10491
|
}), allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
|
9977
10492
|
headerTemplate: initializeCSPTemplate(function () {
|
9978
|
-
return
|
10493
|
+
return '<span class=\'e-fe-icon e-fe-folder\'></span>';
|
9979
10494
|
})
|
9980
10495
|
};
|
9981
10496
|
columns.unshift(icon);
|
@@ -10034,7 +10549,8 @@ class DetailsView {
|
|
10034
10549
|
}
|
10035
10550
|
}
|
10036
10551
|
if (!this.parent.showFileExtension && getValue('isFile', args.data)) {
|
10037
|
-
const
|
10552
|
+
const text = getValue('name', args.data);
|
10553
|
+
const textEle = args.row.querySelector('[title= "' + text + '"]');
|
10038
10554
|
if (textEle) {
|
10039
10555
|
const name = getValue('name', args.data);
|
10040
10556
|
const type = getValue('type', args.data);
|
@@ -10068,7 +10584,6 @@ class DetailsView {
|
|
10068
10584
|
const dateEle = args.row.querySelector('.e-fe-date');
|
10069
10585
|
const intl = new Internationalization(this.parent.locale);
|
10070
10586
|
const columns = this.parent.detailsViewSettings.columns;
|
10071
|
-
// eslint-disable-next-line
|
10072
10587
|
let format;
|
10073
10588
|
for (let i = 0; i < columns.length; i++) {
|
10074
10589
|
if (columns[i].field === 'dateModified') {
|
@@ -10104,7 +10619,6 @@ class DetailsView {
|
|
10104
10619
|
let len = rows.length;
|
10105
10620
|
this.sortSelectedNodes = [];
|
10106
10621
|
while (len > 0) {
|
10107
|
-
// eslint-disable-next-line
|
10108
10622
|
const data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
10109
10623
|
this.sortSelectedNodes.push(getValue(this.parent.hasId ? 'id' : 'name', data));
|
10110
10624
|
len--;
|
@@ -10121,10 +10635,11 @@ class DetailsView {
|
|
10121
10635
|
}
|
10122
10636
|
onBeforeDataBound(args) {
|
10123
10637
|
showSpinner(this.parent.element);
|
10124
|
-
|
10638
|
+
const nameColumn = this.parent.detailsViewSettings.columns.find((column) => column.field === this.parent.sortBy);
|
10125
10639
|
if (nameColumn && !('sortComparer' in nameColumn)) {
|
10126
|
-
|
10127
|
-
|
10640
|
+
const items = getSortedData(this.parent, (this.parent.enableVirtualization)
|
10641
|
+
? args.result
|
10642
|
+
: this.gridObj.dataSource);
|
10128
10643
|
args.result = items;
|
10129
10644
|
}
|
10130
10645
|
}
|
@@ -10133,7 +10648,7 @@ class DetailsView {
|
|
10133
10648
|
this.createDragObj();
|
10134
10649
|
if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization) ||
|
10135
10650
|
((this.parent.selectedItems.length !== 0 && this.parent.enableVirtualization &&
|
10136
|
-
this.element.querySelector('.e-content').scrollTop
|
10651
|
+
this.element.querySelector('.e-content').scrollTop === 0))) {
|
10137
10652
|
this.selectRecords(this.parent.selectedItems);
|
10138
10653
|
}
|
10139
10654
|
if (this.isPasteOperation === true) {
|
@@ -10206,7 +10721,6 @@ class DetailsView {
|
|
10206
10721
|
this.isLoaded = false;
|
10207
10722
|
}
|
10208
10723
|
selectRecords(nodes) {
|
10209
|
-
// eslint-disable-next-line
|
10210
10724
|
const gridRecords = this.gridObj.getCurrentViewRecords();
|
10211
10725
|
const sRecords = [];
|
10212
10726
|
for (let i = 0, len = gridRecords.length; i < len; i++) {
|
@@ -10214,7 +10728,7 @@ class DetailsView {
|
|
10214
10728
|
if (nodes.indexOf(node) !== -1) {
|
10215
10729
|
sRecords.push(i);
|
10216
10730
|
}
|
10217
|
-
else if (!this.parent.showFileExtension && node.includes('.')) {
|
10731
|
+
else if (!this.parent.showFileExtension && !this.parent.hasId && node.includes('.')) {
|
10218
10732
|
const Str2 = node.split('.').slice(0, -1).join('.');
|
10219
10733
|
if (nodes.indexOf(Str2) !== -1) {
|
10220
10734
|
sRecords.push(i);
|
@@ -10226,18 +10740,14 @@ class DetailsView {
|
|
10226
10740
|
this.addFocus(this.gridObj.selectedRowIndex);
|
10227
10741
|
}
|
10228
10742
|
}
|
10229
|
-
// eslint-disable-next-line
|
10230
10743
|
addSelection(data) {
|
10231
|
-
// eslint-disable-next-line
|
10232
10744
|
const items = this.gridObj.getCurrentViewRecords();
|
10233
|
-
// eslint-disable-next-line
|
10234
10745
|
let rData = [];
|
10235
10746
|
if (this.parent.hasId) {
|
10236
10747
|
rData = new DataManager(items).
|
10237
10748
|
executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
|
10238
10749
|
}
|
10239
10750
|
else {
|
10240
|
-
// eslint-disable-next-line
|
10241
10751
|
const nData = new DataManager(items).
|
10242
10752
|
executeLocal(new Query().where('name', 'equal', getValue('name', data), false));
|
10243
10753
|
if (nData.length > 0) {
|
@@ -10255,7 +10765,6 @@ class DetailsView {
|
|
10255
10765
|
this.gridObj.sortModule.sortColumn(this.parent.sortBy, this.parent.sortOrder);
|
10256
10766
|
}
|
10257
10767
|
else {
|
10258
|
-
// eslint-disable-next-line
|
10259
10768
|
this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
|
10260
10769
|
}
|
10261
10770
|
if (this.element.querySelector('.e-content').scrollTop !== 0) {
|
@@ -10351,10 +10860,10 @@ class DetailsView {
|
|
10351
10860
|
const len = this.gridObj.columns.length;
|
10352
10861
|
const columnData = JSON.parse(JSON.stringify(this.gridObj.columns));
|
10353
10862
|
if (columnData[len - 1].field && columnData[len - 1].field !== 'filterPath' && !this.parent.isMobile) {
|
10354
|
-
const pathColumn
|
10863
|
+
const pathColumn = {
|
10355
10864
|
field: 'filterPath', headerText: getLocaleText(this.parent, 'Path'), minWidth: 180, width: 'auto'
|
10356
10865
|
};
|
10357
|
-
this.gridObj.columns.push(pathColumn
|
10866
|
+
this.gridObj.columns.push(pathColumn);
|
10358
10867
|
this.adjustWidth(this.gridObj.columns, 'filterPath');
|
10359
10868
|
this.adjustWidth(this.gridObj.columns, 'name');
|
10360
10869
|
this.isColumnRefresh = true;
|
@@ -10362,7 +10871,6 @@ class DetailsView {
|
|
10362
10871
|
}
|
10363
10872
|
}
|
10364
10873
|
checkEmptyDiv(args) {
|
10365
|
-
// eslint-disable-next-line
|
10366
10874
|
const items = getSortedData(this.parent, args.files);
|
10367
10875
|
if (items.length === 0 && !isNullOrUndefined(this.element.querySelector('.' + GRID_VIEW))) {
|
10368
10876
|
createEmptyElement(this.parent, this.element, args);
|
@@ -10379,21 +10887,18 @@ class DetailsView {
|
|
10379
10887
|
}
|
10380
10888
|
onOpenInit() {
|
10381
10889
|
if (this.parent.activeModule === 'detailsview') {
|
10382
|
-
// eslint-disable-next-line
|
10383
10890
|
const data = this.gridObj.getSelectedRecords()[0];
|
10384
10891
|
this.openContent(data);
|
10385
10892
|
}
|
10386
10893
|
}
|
10387
10894
|
DblClickEvents(args) {
|
10388
10895
|
this.gridObj.selectRows([args.rowIndex]);
|
10389
|
-
// eslint-disable-next-line
|
10390
10896
|
let data;
|
10391
10897
|
if (args.rowData) {
|
10392
10898
|
data = JSON.parse(JSON.stringify(args.rowData));
|
10393
10899
|
this.openContent(data);
|
10394
10900
|
}
|
10395
10901
|
}
|
10396
|
-
// eslint-disable-next-line
|
10397
10902
|
openContent(data) {
|
10398
10903
|
if (!hasReadAccess(data)) {
|
10399
10904
|
createDeniedDialog(this.parent, data, permissionRead);
|
@@ -10489,7 +10994,6 @@ class DetailsView {
|
|
10489
10994
|
this.gridObj.sortColumn('name', this.parent.sortOrder);
|
10490
10995
|
}
|
10491
10996
|
else {
|
10492
|
-
// eslint-disable-next-line
|
10493
10997
|
this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
|
10494
10998
|
}
|
10495
10999
|
this.parent.notify(sortByChange, {});
|
@@ -10678,7 +11182,6 @@ class DetailsView {
|
|
10678
11182
|
this.parent.off(updateSelectionData, this.onUpdateSelectionData);
|
10679
11183
|
}
|
10680
11184
|
onActionFailure() { this.interaction = true; }
|
10681
|
-
// eslint-disable-next-line
|
10682
11185
|
onMenuItemData(args) {
|
10683
11186
|
if (this.parent.activeModule === this.getModuleName()) {
|
10684
11187
|
this.parent.itemData = [this.gridObj.getRowInfo(args.target).rowData];
|
@@ -10719,7 +11222,6 @@ class DetailsView {
|
|
10719
11222
|
getModule(this.parent, dragLi);
|
10720
11223
|
this.parent.activeElements = [];
|
10721
11224
|
this.parent.dragData = [];
|
10722
|
-
// eslint-disable-next-line
|
10723
11225
|
this.parent.dragData = this.gridObj.getSelectedRecords();
|
10724
11226
|
let dragRow;
|
10725
11227
|
if (this.parent.dragData.length === 0 && dragLi) {
|
@@ -10807,16 +11309,13 @@ class DetailsView {
|
|
10807
11309
|
onDropInit(args) {
|
10808
11310
|
if (this.parent.targetModule === this.getModuleName()) {
|
10809
11311
|
/* istanbul ignore next */
|
10810
|
-
// eslint-disable-next-line
|
10811
11312
|
const cwdData = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feParent);
|
10812
11313
|
if (!args.target.closest('tr')) {
|
10813
11314
|
this.parent.dropPath = this.parent.path;
|
10814
11315
|
this.parent.dropData = cwdData;
|
10815
11316
|
}
|
10816
11317
|
else {
|
10817
|
-
// eslint-disable-next-line
|
10818
11318
|
let info = null;
|
10819
|
-
// eslint-disable-next-line
|
10820
11319
|
info = this.gridObj.getRowInfo(args.target).rowData;
|
10821
11320
|
this.parent.dropPath = info.isFile ? this.parent.path : getFullPath(this.parent, info, this.parent.path);
|
10822
11321
|
this.parent.dropData = info.isFile ? cwdData : info;
|
@@ -10918,7 +11417,6 @@ class DetailsView {
|
|
10918
11417
|
this.parent.currentItemText = getValue('name', args.data);
|
10919
11418
|
}
|
10920
11419
|
else if (len > 0) {
|
10921
|
-
// eslint-disable-next-line
|
10922
11420
|
const data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
10923
11421
|
this.parent.currentItemText = getValue('name', data);
|
10924
11422
|
}
|
@@ -10948,7 +11446,6 @@ class DetailsView {
|
|
10948
11446
|
}
|
10949
11447
|
selectedRecords() {
|
10950
11448
|
this.parent.setProperties({ selectedItems: [] }, true);
|
10951
|
-
// eslint-disable-next-line
|
10952
11449
|
const selectedRecords = this.gridSelectNodes();
|
10953
11450
|
let selectSize = 0;
|
10954
11451
|
while (selectSize < selectedRecords.length) {
|
@@ -11013,27 +11510,25 @@ class DetailsView {
|
|
11013
11510
|
}
|
11014
11511
|
wireClickEvent(toBind) {
|
11015
11512
|
if (toBind) {
|
11016
|
-
// eslint-disable-next-line
|
11017
|
-
const proxy = this;
|
11018
11513
|
const ele = this.gridObj.getContent();
|
11019
11514
|
this.clickObj = new Touch(ele, {
|
11020
11515
|
tap: (eve) => {
|
11021
11516
|
if (eve.tapCount === 1 && eve.originalEvent.target.classList.contains('e-content')) {
|
11022
|
-
|
11517
|
+
this.onClearAllInit();
|
11023
11518
|
}
|
11024
11519
|
},
|
11025
11520
|
tapHold: (e) => {
|
11026
|
-
if (
|
11521
|
+
if (this.parent.isDevice) {
|
11027
11522
|
e.originalEvent.preventDefault();
|
11028
|
-
if (
|
11029
|
-
setValue('enableSelectMultiTouch',
|
11030
|
-
addClass([
|
11523
|
+
if (this.parent.allowMultiSelection) {
|
11524
|
+
setValue('enableSelectMultiTouch', this.parent.allowMultiSelection, this.gridObj.selectionModule);
|
11525
|
+
addClass([this.parent.element], MULTI_SELECT);
|
11031
11526
|
}
|
11032
11527
|
const target = e.originalEvent.target;
|
11033
11528
|
if (target) {
|
11034
11529
|
const row = closest(target, '.' + ROW);
|
11035
|
-
const index =
|
11036
|
-
|
11530
|
+
const index = this.gridObj.getRows().indexOf(row);
|
11531
|
+
this.gridObj.selectRow(index);
|
11037
11532
|
}
|
11038
11533
|
}
|
11039
11534
|
}
|
@@ -11077,7 +11572,6 @@ class DetailsView {
|
|
11077
11572
|
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
11078
11573
|
}
|
11079
11574
|
/* istanbul ignore next */
|
11080
|
-
// eslint:disable-next-line
|
11081
11575
|
keydownHandler(e) {
|
11082
11576
|
if (!this.isRendered) {
|
11083
11577
|
return;
|
@@ -11116,26 +11610,20 @@ class DetailsView {
|
|
11116
11610
|
case 'ctrlD':
|
11117
11611
|
e.preventDefault();
|
11118
11612
|
break;
|
11119
|
-
default:
|
11120
|
-
break;
|
11121
11613
|
}
|
11122
11614
|
}
|
11123
11615
|
/* istanbul ignore next */
|
11124
|
-
// eslint:disable-next-line
|
11125
11616
|
keyupHandler(e) {
|
11126
11617
|
if (!this.isRendered) {
|
11127
11618
|
return;
|
11128
11619
|
}
|
11129
11620
|
e.preventDefault();
|
11130
11621
|
const action = e.action;
|
11131
|
-
// eslint-disable-next-line
|
11132
11622
|
const gridItems = getSortedData(this.parent, this.gridObj.dataSource);
|
11133
11623
|
const gridLength = gridItems.length;
|
11134
|
-
const focItem = this.getFocusedItem();
|
11135
11624
|
const focIndex = this.getFocusedItemIndex();
|
11136
11625
|
const selIndex = this.gridObj.selectedRowIndex;
|
11137
11626
|
const selRowIndeces = this.gridObj.getSelectedRowIndexes();
|
11138
|
-
// eslint-disable-next-line
|
11139
11627
|
let rowData;
|
11140
11628
|
let firstItem;
|
11141
11629
|
let lastItem;
|
@@ -11165,7 +11653,6 @@ class DetailsView {
|
|
11165
11653
|
}
|
11166
11654
|
rowData = this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data;
|
11167
11655
|
if (rowData) {
|
11168
|
-
// eslint-disable-next-line
|
11169
11656
|
const data = JSON.parse(JSON.stringify(rowData));
|
11170
11657
|
this.openContent(data);
|
11171
11658
|
}
|
@@ -11282,14 +11769,12 @@ class DetailsView {
|
|
11282
11769
|
break;
|
11283
11770
|
}
|
11284
11771
|
}
|
11285
|
-
// eslint-disable-next-line
|
11286
11772
|
gridSelectNodes() {
|
11287
11773
|
return this.gridObj.getSelectedRecords();
|
11288
11774
|
}
|
11289
11775
|
doDownload() {
|
11290
11776
|
if (this.parent.selectedItems.length !== 0) {
|
11291
11777
|
this.parent.itemData = this.gridObj.getSelectedRecords();
|
11292
|
-
// eslint-disable-next-line
|
11293
11778
|
const items = this.parent.itemData;
|
11294
11779
|
for (let i = 0; i < items.length; i++) {
|
11295
11780
|
if (!hasDownloadAccess(items[i])) {
|
@@ -11303,7 +11788,6 @@ class DetailsView {
|
|
11303
11788
|
performDelete() {
|
11304
11789
|
if (this.parent.selectedItems && this.parent.selectedItems.length > 0) {
|
11305
11790
|
this.parent.itemData = this.gridObj.getSelectedRecords();
|
11306
|
-
// eslint-disable-next-line
|
11307
11791
|
const items = this.parent.itemData;
|
11308
11792
|
for (let i = 0; i < items.length; i++) {
|
11309
11793
|
if (!hasEditAccess(items[i])) {
|
@@ -11321,11 +11805,9 @@ class DetailsView {
|
|
11321
11805
|
}
|
11322
11806
|
}
|
11323
11807
|
updateRenameData() {
|
11324
|
-
// eslint-disable-next-line
|
11325
11808
|
const data = this.gridSelectNodes()[0];
|
11326
11809
|
updateRenamingData(this.parent, data);
|
11327
11810
|
}
|
11328
|
-
// eslint-disable-next-line
|
11329
11811
|
shiftMoveMethod(gridItems, selIndex, focIndex, selRowIndeces, e) {
|
11330
11812
|
if (!this.parent.allowMultiSelection) {
|
11331
11813
|
this.moveFunction(gridItems, e, selIndex);
|
@@ -11343,7 +11825,6 @@ class DetailsView {
|
|
11343
11825
|
}
|
11344
11826
|
}
|
11345
11827
|
}
|
11346
|
-
// eslint-disable-next-line
|
11347
11828
|
moveFunction(selectedItems, e, rowIndex) {
|
11348
11829
|
if (!isNullOrUndefined(this.getFocusedItem()) && this.parent.allowMultiSelection) {
|
11349
11830
|
if (e.action === 'moveDown') {
|
@@ -11390,7 +11871,6 @@ class DetailsView {
|
|
11390
11871
|
this.gridObj.selectRow(selIndex);
|
11391
11872
|
}
|
11392
11873
|
}
|
11393
|
-
// eslint-disable-next-line
|
11394
11874
|
ctrlMoveFunction(items, e, rowIndex) {
|
11395
11875
|
let nextItem;
|
11396
11876
|
if (!isNullOrUndefined(this.getFocusedItem())) {
|
@@ -11409,7 +11889,6 @@ class DetailsView {
|
|
11409
11889
|
}
|
11410
11890
|
this.addFocus(nextItem);
|
11411
11891
|
}
|
11412
|
-
// eslint-disable-next-line
|
11413
11892
|
checkRowsKey(items, indexValue, focIndex, e) {
|
11414
11893
|
if (this.gridObj.checkAllRows === 'Uncheck' || this.gridObj.checkAllRows === 'Intermediate') {
|
11415
11894
|
if (e.action !== 'csHome' && e.action !== 'csEnd') {
|
@@ -11533,7 +12012,6 @@ class DetailsView {
|
|
11533
12012
|
}
|
11534
12013
|
return check;
|
11535
12014
|
}
|
11536
|
-
// eslint-disable-next-line
|
11537
12015
|
shiftSelectedItem(selIndex, selRowIndexes, gridItems, e) {
|
11538
12016
|
if (selIndex === -1) {
|
11539
12017
|
this.gridObj.selectRow(0);
|
@@ -11582,7 +12060,6 @@ class DetailsView {
|
|
11582
12060
|
}
|
11583
12061
|
}
|
11584
12062
|
}
|
11585
|
-
// eslint-disable-next-line
|
11586
12063
|
onMethodCall(e) {
|
11587
12064
|
if (this.parent.view !== 'Details') {
|
11588
12065
|
return;
|
@@ -11615,17 +12092,14 @@ class DetailsView {
|
|
11615
12092
|
break;
|
11616
12093
|
}
|
11617
12094
|
}
|
11618
|
-
// eslint-disable-next-line
|
11619
12095
|
getRecords(nodes) {
|
11620
|
-
// eslint-disable-next-line
|
11621
12096
|
const gridRecords = this.gridObj.getCurrentViewRecords();
|
11622
|
-
// eslint-disable-next-line
|
11623
12097
|
const records = [];
|
11624
12098
|
const hasFilter = (this.parent.breadcrumbbarModule.searchObj.element.value !== '' || this.parent.isFiltered) ? true : false;
|
11625
|
-
const filter
|
12099
|
+
const filter = this.parent.hasId ? 'id' : 'name';
|
11626
12100
|
if (this.parent.hasId || !hasFilter) {
|
11627
12101
|
for (let i = 0, len = gridRecords.length; i < len; i++) {
|
11628
|
-
if (nodes.indexOf(getValue(filter
|
12102
|
+
if (nodes.indexOf(getValue(filter, gridRecords[i])) !== -1) {
|
11629
12103
|
records.push(gridRecords[i]);
|
11630
12104
|
}
|
11631
12105
|
}
|
@@ -11646,12 +12120,10 @@ class DetailsView {
|
|
11646
12120
|
this.performDelete();
|
11647
12121
|
return;
|
11648
12122
|
}
|
11649
|
-
// eslint-disable-next-line
|
11650
12123
|
const records = this.getRecords(ids);
|
11651
12124
|
if (records.length === 0) {
|
11652
12125
|
return;
|
11653
12126
|
}
|
11654
|
-
// eslint-disable-next-line
|
11655
12127
|
const data = [];
|
11656
12128
|
const newIds = [];
|
11657
12129
|
for (let i = 0; i < records.length; i++) {
|
@@ -11665,12 +12137,10 @@ class DetailsView {
|
|
11665
12137
|
this.doDownload();
|
11666
12138
|
return;
|
11667
12139
|
}
|
11668
|
-
// eslint-disable-next-line
|
11669
12140
|
const dRecords = this.getRecords(ids);
|
11670
12141
|
if (dRecords.length === 0) {
|
11671
12142
|
return;
|
11672
12143
|
}
|
11673
|
-
// eslint-disable-next-line
|
11674
12144
|
const data = [];
|
11675
12145
|
const newIds = [];
|
11676
12146
|
for (let i = 0; i < dRecords.length; i++) {
|
@@ -11683,7 +12153,6 @@ class DetailsView {
|
|
11683
12153
|
if (isNullOrUndefined(id)) {
|
11684
12154
|
return;
|
11685
12155
|
}
|
11686
|
-
// eslint-disable-next-line
|
11687
12156
|
const records = this.getRecords([id]);
|
11688
12157
|
if (records.length > 0) {
|
11689
12158
|
this.openContent(records[0]);
|
@@ -11695,7 +12164,6 @@ class DetailsView {
|
|
11695
12164
|
this.performRename();
|
11696
12165
|
return;
|
11697
12166
|
}
|
11698
|
-
// eslint-disable-next-line
|
11699
12167
|
const records = this.getRecords([id]);
|
11700
12168
|
if (records.length > 0) {
|
11701
12169
|
updateRenamingData(this.parent, records[0]);
|
@@ -11714,21 +12182,5 @@ class DetailsView {
|
|
11714
12182
|
}
|
11715
12183
|
}
|
11716
12184
|
|
11717
|
-
|
11718
|
-
* File Manager layout modules
|
11719
|
-
*/
|
11720
|
-
|
11721
|
-
/**
|
11722
|
-
* File Manager pop-up modules
|
11723
|
-
*/
|
11724
|
-
|
11725
|
-
/**
|
11726
|
-
* File Manager modules
|
11727
|
-
*/
|
11728
|
-
|
11729
|
-
/**
|
11730
|
-
* File Manager all modules
|
11731
|
-
*/
|
11732
|
-
|
11733
|
-
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 };
|
11734
12186
|
//# sourceMappingURL=ej2-filemanager.es2015.js.map
|