@syncfusion/ej2-filemanager 28.1.33 → 28.1.36
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/dist/ej2-filemanager.min.js +1 -10
- package/dist/ej2-filemanager.umd.min.js +1 -10
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +40 -10
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +48 -18
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +1 -10
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +8 -9
- package/src/file-manager/common/operations.js +37 -11
- package/src/file-manager/common/utility.js +2 -2
- package/src/file-manager/layout/navigation-pane.js +9 -5
package/dist/global/index.d.ts
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
/*!
|
2
|
-
* filename: index.d.ts
|
3
|
-
* version : 28.1.33
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
5
|
-
* Use of this code is subject to the terms of our license.
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
8
|
-
* applicable laws.
|
9
|
-
*/
|
10
1
|
import * as _filemanager from '@syncfusion/ej2-filemanager';
|
11
2
|
|
12
3
|
export declare namespace ej {
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "@syncfusion/ej2-filemanager@*",
|
3
|
-
"_id": "@syncfusion/ej2-filemanager@
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@28.1.33",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-YC0/Yxh34dCNbHhc8GlueONPkYBzkK//zTCOIplztS/ThVIs8lbp+5G5jCTdDG6VdCHiexPwUTV5uneKFWDNDQ==",
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,14 +18,13 @@
|
|
18
18
|
},
|
19
19
|
"_requiredBy": [
|
20
20
|
"/",
|
21
|
-
"/@syncfusion/ej2",
|
22
21
|
"/@syncfusion/ej2-angular-filemanager",
|
23
22
|
"/@syncfusion/ej2-react-filemanager",
|
24
23
|
"/@syncfusion/ej2-richtexteditor",
|
25
24
|
"/@syncfusion/ej2-vue-filemanager"
|
26
25
|
],
|
27
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
28
|
-
"_shasum": "
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-28.1.33.tgz",
|
27
|
+
"_shasum": "2067fc573960580b9fa858834b89558ff39edf13",
|
29
28
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
30
29
|
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
|
31
30
|
"author": {
|
@@ -37,13 +36,13 @@
|
|
37
36
|
"bundleDependencies": false,
|
38
37
|
"dependencies": {
|
39
38
|
"@syncfusion/ej2-base": "~28.1.33",
|
40
|
-
"@syncfusion/ej2-buttons": "~28.1.
|
39
|
+
"@syncfusion/ej2-buttons": "~28.1.36",
|
41
40
|
"@syncfusion/ej2-data": "~28.1.33",
|
42
|
-
"@syncfusion/ej2-grids": "~28.1.
|
41
|
+
"@syncfusion/ej2-grids": "~28.1.36",
|
43
42
|
"@syncfusion/ej2-inputs": "~28.1.33",
|
44
43
|
"@syncfusion/ej2-layouts": "~28.1.33",
|
45
44
|
"@syncfusion/ej2-lists": "~28.1.33",
|
46
|
-
"@syncfusion/ej2-navigations": "~28.1.
|
45
|
+
"@syncfusion/ej2-navigations": "~28.1.36",
|
47
46
|
"@syncfusion/ej2-popups": "~28.1.33",
|
48
47
|
"@syncfusion/ej2-splitbuttons": "~28.1.33"
|
49
48
|
},
|
@@ -75,6 +74,6 @@
|
|
75
74
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
76
75
|
},
|
77
76
|
"typings": "index.d.ts",
|
78
|
-
"version": "28.1.
|
77
|
+
"version": "28.1.36",
|
79
78
|
"sideEffects": false
|
80
79
|
}
|
@@ -236,7 +236,7 @@ function createNewItem(data, target, itemName, isCopy) {
|
|
236
236
|
}
|
237
237
|
}
|
238
238
|
var currentDate = new Date();
|
239
|
-
var folderPath = target.id !== 0 ? target.filterPath + target.name : '\\';
|
239
|
+
var folderPath = String(target.id) !== String(0) && !isNOU(target.parentId) ? target.filterPath + target.name + '\\' : '\\';
|
240
240
|
Object.assign(newItem, {
|
241
241
|
dateCreated: currentDate,
|
242
242
|
dateModified: currentDate,
|
@@ -370,7 +370,9 @@ function triggerRenameOperation(parent, data, eventArgs) {
|
|
370
370
|
if (isFileSystemData(parent)) {
|
371
371
|
if (!isFileExists(parent.fileSystemData, args.newName)) {
|
372
372
|
var fileData = filterById(parent, args.itemData[0].id);
|
373
|
+
var oldName = fileData.name;
|
373
374
|
fileData.name = args.newName;
|
375
|
+
updateChildrenFilterPath(parent, fileData.id, oldName, args.newName);
|
374
376
|
}
|
375
377
|
else {
|
376
378
|
var message = 'Cannot rename' + args.itemData[0].name + 'to' + args.newName + ': destination already exists.';
|
@@ -379,6 +381,26 @@ function triggerRenameOperation(parent, data, eventArgs) {
|
|
379
381
|
}
|
380
382
|
});
|
381
383
|
}
|
384
|
+
/**
|
385
|
+
* Function to update child item filter path.
|
386
|
+
*
|
387
|
+
* @param {IFileManager} parent - specifies the parent element.
|
388
|
+
* @param {string | number} parentId - specifies the parent id.
|
389
|
+
* @param {string} oldName - specifies the previous name.
|
390
|
+
* @param {string} newName - specifies the new name.
|
391
|
+
* @returns {void}
|
392
|
+
* @private
|
393
|
+
*/
|
394
|
+
function updateChildrenFilterPath(parent, parentId, oldName, newName) {
|
395
|
+
parent.fileSystemData.forEach(function (item) {
|
396
|
+
if (String(item.parentId) === String(parentId)) {
|
397
|
+
var oldPath = item.filterPath;
|
398
|
+
var newPath = oldPath.replace(oldName + '\\', newName + '\\');
|
399
|
+
item.filterPath = newPath;
|
400
|
+
updateChildrenFilterPath(parent, item.id, oldName, newName);
|
401
|
+
}
|
402
|
+
});
|
403
|
+
}
|
382
404
|
/**
|
383
405
|
* Function to trigger move or copy operation.
|
384
406
|
*
|
@@ -434,18 +456,23 @@ function triggerMoveOrCopyOperation(parent, data, eventArgs) {
|
|
434
456
|
}
|
435
457
|
return;
|
436
458
|
}
|
437
|
-
var
|
438
|
-
var getTargetFiles = filterByParent(parent,
|
459
|
+
var target_1 = args.targetData;
|
460
|
+
var getTargetFiles = filterByParent(parent, target_1.id);
|
439
461
|
for (var i = 0; i < args.itemData.length; i++) {
|
440
462
|
var currItem = args.itemData[i];
|
441
463
|
if (!isFileExists(getTargetFiles, currItem.name) || getValue('renameFiles', data).length > 0) {
|
442
|
-
if (!
|
443
|
-
|
464
|
+
if (!target_1.hasChild) {
|
465
|
+
target_1.hasChild = !currItem.isFile;
|
466
|
+
var targetItem = parent.fileSystemData
|
467
|
+
.filter(function (item) { return String(item.id) === String(target_1.id); });
|
468
|
+
if (targetItem.length > 0) {
|
469
|
+
targetItem[0].hasChild = target_1.hasChild;
|
470
|
+
}
|
444
471
|
}
|
445
472
|
if (!currItem.isFile) {
|
446
473
|
//Check whether the source folder include other sub folders or not.
|
447
474
|
var subItems = currItem.parentId !== 0
|
448
|
-
? filterByParent(parent, currItem.
|
475
|
+
? filterByParent(parent, currItem.parentId) : [];
|
449
476
|
var itemData = filterById(parent, currItem.parentId);
|
450
477
|
itemData.hasChild = subItems.length > 1 ? true : false;
|
451
478
|
}
|
@@ -456,13 +483,13 @@ function triggerMoveOrCopyOperation(parent, data, eventArgs) {
|
|
456
483
|
fileData.name = currItem.name;
|
457
484
|
parent.responseData.error = null;
|
458
485
|
parent.existingFileCount++;
|
459
|
-
parent.dropData =
|
486
|
+
parent.dropData = target_1;
|
460
487
|
parent.dropPath = args.path;
|
461
488
|
var pathArray = args.targetPath.replace(/^\/|\/$/g, '').split('/');
|
462
|
-
|
489
|
+
target_1 = filterById(parent, pathArray[pathArray.length - 1]);
|
463
490
|
}
|
464
|
-
fileData.parentId =
|
465
|
-
fileData.filterPath =
|
491
|
+
fileData.parentId = target_1.id;
|
492
|
+
fileData.filterPath = target_1.id === 0 ? '\\' : target_1.filterPath + target_1.name + '\\';
|
466
493
|
}
|
467
494
|
else {
|
468
495
|
file_1.push(currItem.name);
|
@@ -568,7 +595,6 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
568
595
|
? getValue('path', data) : parent.path;
|
569
596
|
var pathArray = filePath.replace(/^\/|\/$/g, '').split('/');
|
570
597
|
var idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0 && isNOU(parent.renamedItem))
|
571
|
-
|| (event === 'paste-end' && (parent.targetModule === 'largeiconsview' || parent.targetModule === 'detailsview'))
|
572
598
|
? getValue('data', data)[0].id : pathArray[pathArray.length - 1];
|
573
599
|
var action = getValue('action', data);
|
574
600
|
var isFileOperation = (action === 'move' || action === 'rename' || action === 'copy' || action === 'delete' || action === 'search') && event !== 'rename-end';
|
@@ -1032,9 +1032,9 @@ export function getDirectoryPath(parent, args) {
|
|
1032
1032
|
var fPath = getValue(parent.hasId && !isNullOrUndefined(parent.ajaxSettings.url) ? 'filterId' : 'filterPath', args.cwd);
|
1033
1033
|
if (!isNOU(fPath)) {
|
1034
1034
|
if (fPath === '') {
|
1035
|
-
return
|
1035
|
+
return '/';
|
1036
1036
|
}
|
1037
|
-
return fPath.replace(/\\/g, '/') + filePath;
|
1037
|
+
return fPath.replace(/\\/g, '/').replace(/^.*?(?=\/)/, '') + filePath;
|
1038
1038
|
}
|
1039
1039
|
else {
|
1040
1040
|
return isFileSystemData(parent) ? filePath : parent.path + filePath;
|
@@ -521,6 +521,15 @@ var NavigationPane = /** @class */ (function () {
|
|
521
521
|
this.removeChildNodes(e.selectedNode);
|
522
522
|
};
|
523
523
|
NavigationPane.prototype.onDragEnd = function (args) {
|
524
|
+
if (isFileSystemData(this.parent)) {
|
525
|
+
this.moveNames = [];
|
526
|
+
var obj = this.parent.dragData;
|
527
|
+
for (var i = 0; i < obj.length; i++) {
|
528
|
+
if (getValue('isFile', obj[i]) === false) {
|
529
|
+
this.moveNames.push(getValue('_fm_id', obj[i]));
|
530
|
+
}
|
531
|
+
}
|
532
|
+
}
|
524
533
|
var moveNames = [];
|
525
534
|
if (this.parent.isPasteError || this.parent.isSearchDrag) {
|
526
535
|
moveNames = this.getMoveNames(args.files, this.parent.isSearchDrag, this.parent.dragPath);
|
@@ -626,11 +635,6 @@ var NavigationPane = /** @class */ (function () {
|
|
626
635
|
if (isFileSystemData(this.parent) && (this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane')) {
|
627
636
|
return;
|
628
637
|
}
|
629
|
-
if (this.parent.hasId) {
|
630
|
-
this.parent.isDropEnd = !this.parent.isPasteError;
|
631
|
-
readDropPath(this.parent);
|
632
|
-
return;
|
633
|
-
}
|
634
638
|
if ((this.parent.dropPath.indexOf(getDirectoryPath(this.parent, args)) === -1)) {
|
635
639
|
this.parent.isDropEnd = false;
|
636
640
|
readDropPath(this.parent);
|