@syncfusion/ej2-filemanager 27.2.3 → 27.2.5
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 +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 +51 -15
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +55 -15
- 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 +11 -11
- package/src/file-manager/base/interface.d.ts +1 -0
- package/src/file-manager/common/operations.js +23 -8
- package/src/file-manager/common/utility.d.ts +11 -0
- package/src/file-manager/common/utility.js +23 -2
- package/src/file-manager/layout/large-icons-view.js +1 -1
- package/src/file-manager/layout/navigation-pane.d.ts +1 -1
- package/src/file-manager/layout/navigation-pane.js +7 -3
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version : 27.2.
|
3
|
+
* version : 27.2.5
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
5
5
|
* Use of this code is subject to the terms of our license.
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "@syncfusion/ej2-filemanager@*",
|
3
|
-
"_id": "@syncfusion/ej2-filemanager@27.2.
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@27.2.3",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-MGo4pWIt087+DhmLwvHM602yus8DIse92opOOTEPKMXp2igmvsCMQSiCWWQK9PIyt9RAMRmAx8fWSl5hezOrfw==",
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"/@syncfusion/ej2-richtexteditor",
|
25
25
|
"/@syncfusion/ej2-vue-filemanager"
|
26
26
|
],
|
27
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.2.
|
28
|
-
"_shasum": "
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.2.3.tgz",
|
28
|
+
"_shasum": "d3c2b67dab2a63cfb4c725588a764145472bcc4d",
|
29
29
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
31
31
|
"author": {
|
@@ -36,14 +36,14 @@
|
|
36
36
|
},
|
37
37
|
"bundleDependencies": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@syncfusion/ej2-base": "~27.2.
|
40
|
-
"@syncfusion/ej2-buttons": "~27.2.
|
39
|
+
"@syncfusion/ej2-base": "~27.2.5",
|
40
|
+
"@syncfusion/ej2-buttons": "~27.2.4",
|
41
41
|
"@syncfusion/ej2-data": "~27.2.2",
|
42
|
-
"@syncfusion/ej2-grids": "~27.2.
|
43
|
-
"@syncfusion/ej2-inputs": "~27.2.
|
42
|
+
"@syncfusion/ej2-grids": "~27.2.5",
|
43
|
+
"@syncfusion/ej2-inputs": "~27.2.4",
|
44
44
|
"@syncfusion/ej2-layouts": "~27.2.3",
|
45
|
-
"@syncfusion/ej2-lists": "~27.2.
|
46
|
-
"@syncfusion/ej2-navigations": "~27.2.
|
45
|
+
"@syncfusion/ej2-lists": "~27.2.5",
|
46
|
+
"@syncfusion/ej2-navigations": "~27.2.5",
|
47
47
|
"@syncfusion/ej2-popups": "~27.2.2",
|
48
48
|
"@syncfusion/ej2-splitbuttons": "~27.2.2"
|
49
49
|
},
|
@@ -75,6 +75,6 @@
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
76
76
|
},
|
77
77
|
"typings": "index.d.ts",
|
78
|
-
"version": "27.2.
|
78
|
+
"version": "27.2.5",
|
79
79
|
"sideEffects": false
|
80
80
|
}
|
@@ -929,6 +929,7 @@ export interface ITreeView extends Component<HTMLElement> {
|
|
929
929
|
rootID: string;
|
930
930
|
activeNode: Element;
|
931
931
|
openFileOnContextMenuClick: Function;
|
932
|
+
previousSelected: string[];
|
932
933
|
}
|
933
934
|
/** @hidden */
|
934
935
|
export interface IContextMenu extends Component<HTMLElement> {
|
@@ -188,7 +188,9 @@ function isFileExists(fileSystemData, name) {
|
|
188
188
|
* @private
|
189
189
|
*/
|
190
190
|
function findIndexById(parent, id) {
|
191
|
-
var index = parent.fileSystemData.findIndex(function (item) {
|
191
|
+
var index = parent.fileSystemData.findIndex(function (item) {
|
192
|
+
return !isNOU(item) && String(item.id) === String(id);
|
193
|
+
});
|
192
194
|
return index;
|
193
195
|
}
|
194
196
|
/**
|
@@ -562,9 +564,10 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
562
564
|
if (!beforeSendArgs.cancel) {
|
563
565
|
parent.notify(events.beforeRequest, {});
|
564
566
|
if (isFileSystemData(parent)) {
|
565
|
-
var filePath = event === 'node-expand' || event === 'finalize-end'
|
567
|
+
var filePath = event === 'node-expand' || event === 'finalize-end' || event === 'rename-end-parent'
|
568
|
+
? getValue('path', data) : parent.path;
|
566
569
|
var pathArray = filePath.replace(/^\/|\/$/g, '').split('/');
|
567
|
-
var idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0)
|
570
|
+
var idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0 && isNOU(parent.renamedItem))
|
568
571
|
|| (event === 'paste-end' && (parent.targetModule === 'largeiconsview' || parent.targetModule === 'detailsview'))
|
569
572
|
? getValue('data', data)[0].id : pathArray[pathArray.length - 1];
|
570
573
|
var action = getValue('action', data);
|
@@ -590,7 +593,12 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
590
593
|
else if (isFileOperation && parent.responseData.error === null) {
|
591
594
|
var itemData = action === 'search' || action === 'delete' ? getValue('data', data) : [];
|
592
595
|
if (itemData.length === 0) {
|
593
|
-
|
596
|
+
if (action === 'copy') {
|
597
|
+
itemData = parent.pasteNodes.map(function (item) { return filterById(parent, item); });
|
598
|
+
}
|
599
|
+
else {
|
600
|
+
itemData = getValue('data', data).map(function (item) { return filterById(parent, item.id); });
|
601
|
+
}
|
594
602
|
}
|
595
603
|
parent.responseData = {
|
596
604
|
cwd: null,
|
@@ -950,14 +958,21 @@ function renameSuccess(parent, result) {
|
|
950
958
|
};
|
951
959
|
parent.trigger('rename', renameEventArgs);
|
952
960
|
if (parent.activeModule === 'navigationpane') {
|
961
|
+
var pathObject = getPathObject(parent);
|
962
|
+
var pathLevel = parent.pathId[parent.pathId.length - 1].split('_').length - 2;
|
953
963
|
parent.pathId.pop();
|
954
964
|
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
955
965
|
read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
|
956
|
-
parent.
|
957
|
-
|
958
|
-
parent.
|
966
|
+
if (!isNOU(pathObject) && parent.pathNames.length > 1 && pathLevel <= parent.pathNames.length - 1) {
|
967
|
+
parent.pathNames[pathLevel] = parent.renameText;
|
968
|
+
if (!parent.hasId) {
|
969
|
+
parent.setProperties({ path: "/" + parent.pathNames.slice(1).join('/') + "/" }, true);
|
970
|
+
}
|
959
971
|
}
|
960
|
-
|
972
|
+
parent.itemData = parent.navigationpaneModule.previousSelected.length > 0
|
973
|
+
? parent.navigationpaneModule.treeObj.getTreeData(parent.navigationpaneModule.previousSelected[0]) : parent.itemData;
|
974
|
+
read(parent, events.pathChanged, parent.path);
|
975
|
+
parent.itemData[0] = parent.renamedItem;
|
961
976
|
parent.renamedItem = null;
|
962
977
|
}
|
963
978
|
else {
|
@@ -110,6 +110,17 @@ export declare function removeBlur(parent?: IFileManager, hover?: string): void;
|
|
110
110
|
* @private
|
111
111
|
*/
|
112
112
|
export declare function getModule(parent: IFileManager, element: Element): void;
|
113
|
+
/**
|
114
|
+
* Get all child items
|
115
|
+
*
|
116
|
+
* @param {IFileManager} parent - specifies the parent element.
|
117
|
+
* @param {string | number} parentId - specifies the parent ID.
|
118
|
+
* @returns {Object[]} An array of child items
|
119
|
+
* @private
|
120
|
+
*/
|
121
|
+
export declare function getAllChildItems(parent: IFileManager, parentId: number | string): {
|
122
|
+
[key: string]: Object;
|
123
|
+
}[];
|
113
124
|
/**
|
114
125
|
* Gets module name
|
115
126
|
*
|
@@ -270,6 +270,25 @@ export function getModule(parent, element) {
|
|
270
270
|
}
|
271
271
|
}
|
272
272
|
}
|
273
|
+
/**
|
274
|
+
* Get all child items
|
275
|
+
*
|
276
|
+
* @param {IFileManager} parent - specifies the parent element.
|
277
|
+
* @param {string | number} parentId - specifies the parent ID.
|
278
|
+
* @returns {Object[]} An array of child items
|
279
|
+
* @private
|
280
|
+
*/
|
281
|
+
export function getAllChildItems(parent, parentId) {
|
282
|
+
var children = parent.fileSystemData.filter(function (item) {
|
283
|
+
return String(item.parentId) === String(parentId);
|
284
|
+
});
|
285
|
+
var allChildren = children.slice();
|
286
|
+
children.forEach(function (child) {
|
287
|
+
var childId = child.id;
|
288
|
+
allChildren = allChildren.concat(getAllChildItems(parent, childId));
|
289
|
+
});
|
290
|
+
return allChildren;
|
291
|
+
}
|
273
292
|
/**
|
274
293
|
* Gets module name
|
275
294
|
*
|
@@ -291,7 +310,9 @@ export function searchWordHandler(parent, value, isLayoutChange) {
|
|
291
310
|
}
|
292
311
|
else {
|
293
312
|
parent.searchSettings.filterType = isNOU(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
|
294
|
-
var
|
313
|
+
var currData = getValue(parent.pathId[parent.pathId.length - 1], parent.feParent);
|
314
|
+
var parentId = getValue('id', currData);
|
315
|
+
var filteredData = getAllChildItems(parent, parentId);
|
295
316
|
var data = new DataManager(filteredData).
|
296
317
|
executeLocal(new Query().where('name', parent.searchSettings.filterType, value, parent.searchSettings.ignoreCase));
|
297
318
|
var searchValue = parent.searchSettings.ignoreCase ? value.toLowerCase() : value;
|
@@ -1057,6 +1078,7 @@ export function doPasteUpdate(parent, operation, result) {
|
|
1057
1078
|
else {
|
1058
1079
|
parent.isDropEnd = false;
|
1059
1080
|
}
|
1081
|
+
parent.trigger('success', { action: operation, result: result });
|
1060
1082
|
if (!parent.isDragDrop || (parent.path === parent.dragPath) || (parent.path === parent.dropPath)
|
1061
1083
|
|| parent.isSearchDrag) {
|
1062
1084
|
parent.isPathDrag = false;
|
@@ -1065,7 +1087,6 @@ export function doPasteUpdate(parent, operation, result) {
|
|
1065
1087
|
else {
|
1066
1088
|
readDropPath(parent);
|
1067
1089
|
}
|
1068
|
-
parent.trigger('success', { action: operation, result: result });
|
1069
1090
|
}
|
1070
1091
|
/**
|
1071
1092
|
* Reads the drop path
|
@@ -412,7 +412,7 @@ var LargeIconsView = /** @class */ (function () {
|
|
412
412
|
removeBlur(this.parent);
|
413
413
|
this.parent.setProperties({ selectedItems: [] }, true);
|
414
414
|
this.onLayoutChange(args);
|
415
|
-
if (this.parent.renamedItem) {
|
415
|
+
if (this.parent.renamedItem && this.parent.activeModule === 'largeiconsview') {
|
416
416
|
this.clearSelect();
|
417
417
|
this.addSelection(this.parent.renamedItem);
|
418
418
|
}
|
@@ -14,6 +14,7 @@ export declare class NavigationPane {
|
|
14
14
|
removeNodes: string[];
|
15
15
|
moveNames: string[];
|
16
16
|
touchClickObj: Touch;
|
17
|
+
previousSelected: string[];
|
17
18
|
private expandTree;
|
18
19
|
private isDrag;
|
19
20
|
private dragObj;
|
@@ -23,7 +24,6 @@ export declare class NavigationPane {
|
|
23
24
|
private isSameNodeClicked;
|
24
25
|
private isNodeExpandCalled;
|
25
26
|
private renameParent;
|
26
|
-
private previousSelected;
|
27
27
|
private isNodeClickCalled;
|
28
28
|
private restrictSelecting;
|
29
29
|
/**
|
@@ -24,6 +24,8 @@ var NavigationPane = /** @class */ (function () {
|
|
24
24
|
function NavigationPane(parent) {
|
25
25
|
this.removeNodes = [];
|
26
26
|
this.moveNames = [];
|
27
|
+
// Specifies the previously selected nodes in the treeview control.
|
28
|
+
this.previousSelected = [];
|
27
29
|
this.expandTree = false;
|
28
30
|
this.isDrag = false;
|
29
31
|
this.isPathDragged = false;
|
@@ -32,8 +34,6 @@ var NavigationPane = /** @class */ (function () {
|
|
32
34
|
this.isSameNodeClicked = false;
|
33
35
|
this.isNodeExpandCalled = false;
|
34
36
|
this.renameParent = null;
|
35
|
-
// Specifies the previously selected nodes in the treeview control.
|
36
|
-
this.previousSelected = null;
|
37
37
|
// Specifies whether the nodeClicked event of the treeview control is triggered or not.
|
38
38
|
this.isNodeClickCalled = false;
|
39
39
|
// Specifies whether to restrict node selection in the treeview control.
|
@@ -454,9 +454,11 @@ var NavigationPane = /** @class */ (function () {
|
|
454
454
|
}
|
455
455
|
}
|
456
456
|
if (resultData.length > 0) {
|
457
|
-
var id_1 =
|
457
|
+
var id_1 = this.previousSelected.length > 0 && this.treeObj.getTreeData(this.previousSelected[0]).length !== 0
|
458
|
+
? this.previousSelected[0] : getValue(this.treeObj.fields.id, resultData[0]);
|
458
459
|
this.treeObj.selectedNodes = [id_1];
|
459
460
|
this.treeObj.dataBind();
|
461
|
+
this.updateItemData();
|
460
462
|
}
|
461
463
|
}
|
462
464
|
};
|
@@ -855,6 +857,8 @@ var NavigationPane = /** @class */ (function () {
|
|
855
857
|
};
|
856
858
|
NavigationPane.prototype.updateActionData = function () {
|
857
859
|
this.updateItemData();
|
860
|
+
var node = select('[data-uid="' + this.parent.pathId[this.parent.pathId.length - 1] + '"]', this.treeObj.element);
|
861
|
+
updatePath(node, this.parent.itemData[0], this.parent);
|
858
862
|
var newPath = getParentPath(this.parent.path);
|
859
863
|
this.parent.setProperties({ path: newPath }, true);
|
860
864
|
this.parent.pathId.pop();
|