@syncfusion/ej2-filemanager 26.2.5 → 26.2.10
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 +36 -18
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +36 -18
- 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 +15 -15
- package/src/file-manager/common/operations.js +32 -12
- package/src/file-manager/pop-up/context-menu.js +4 -6
- package/styles/file-manager/fluent2.css +3 -1031
- package/styles/file-manager/material3-dark.css +1 -54
- package/styles/file-manager/material3.css +2 -109
- package/styles/fluent2.css +3 -1031
- package/styles/material3-dark.css +1 -54
- package/styles/material3.css +2 -109
@@ -3063,11 +3063,17 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
3063
3063
|
var action = getValue('action', data);
|
3064
3064
|
var isFileOperation = (action === 'move' || action === 'rename' || action === 'copy' || action === 'delete' || action === 'search') && event !== 'rename-end';
|
3065
3065
|
if (action === 'read' || action === 'create' || event === 'rename-end') {
|
3066
|
+
var rootId = parent.fileSystemData
|
3067
|
+
.filter(function (item) { return isNullOrUndefined(item.parentId); })
|
3068
|
+
.length > 0
|
3069
|
+
? parent.fileSystemData
|
3070
|
+
.filter(function (item) { return isNullOrUndefined(item.parentId); })[0].id
|
3071
|
+
: 0;
|
3066
3072
|
parent.responseData = {
|
3067
|
-
cwd: filterById(parent, parent.path === '/' && event !== 'node-expand' && event !== 'rename-end-parent' ?
|
3073
|
+
cwd: filterById(parent, parent.path === '/' && event !== 'node-expand' && event !== 'rename-end-parent' ? rootId : idValue),
|
3068
3074
|
details: null,
|
3069
3075
|
error: null,
|
3070
|
-
files: filterByParent(parent, parent.path === '/' && event !== 'node-expand' && event !== 'rename-end-parent' ?
|
3076
|
+
files: filterByParent(parent, parent.path === '/' && event !== 'node-expand' && event !== 'rename-end-parent' ? rootId : idValue)
|
3071
3077
|
};
|
3072
3078
|
if (isNullOrUndefined(parent.responseData.cwd)) {
|
3073
3079
|
var message = 'Cannot load empty data within the File Manager.';
|
@@ -3291,19 +3297,33 @@ function triggerAjaxFailure(parent, beforeSendArgs, fn, result, event, operation
|
|
3291
3297
|
* @private
|
3292
3298
|
*/
|
3293
3299
|
function readSuccess(parent, result, event) {
|
3294
|
-
|
3295
|
-
|
3296
|
-
parent.notify(selectionChanged, {});
|
3297
|
-
var args = { action: 'read', result: result };
|
3298
|
-
parent.trigger('success', args);
|
3299
|
-
}
|
3300
|
-
else {
|
3301
|
-
if (result.error.code === '401') {
|
3302
|
-
result.files = [];
|
3300
|
+
try {
|
3301
|
+
if (!isNullOrUndefined(result.files)) {
|
3303
3302
|
parent.notify(event, result);
|
3304
3303
|
parent.notify(selectionChanged, {});
|
3304
|
+
var args = { action: 'read', result: result };
|
3305
|
+
parent.trigger('success', args);
|
3305
3306
|
}
|
3306
|
-
|
3307
|
+
else {
|
3308
|
+
if (!isNullOrUndefined(result.error) && result.error.code === '401') {
|
3309
|
+
result.files = [];
|
3310
|
+
parent.notify(event, result);
|
3311
|
+
parent.notify(selectionChanged, {});
|
3312
|
+
}
|
3313
|
+
onFailure(parent, result, 'read');
|
3314
|
+
parent.setProperties({ path: parent.oldPath }, true);
|
3315
|
+
parent.pathNames.pop();
|
3316
|
+
}
|
3317
|
+
}
|
3318
|
+
catch (error) {
|
3319
|
+
var errorResult = {
|
3320
|
+
files: null,
|
3321
|
+
error: {
|
3322
|
+
message: error.message,
|
3323
|
+
fileExists: null
|
3324
|
+
}
|
3325
|
+
};
|
3326
|
+
onFailure(parent, errorResult, 'read');
|
3307
3327
|
parent.setProperties({ path: parent.oldPath }, true);
|
3308
3328
|
parent.pathNames.pop();
|
3309
3329
|
}
|
@@ -6805,6 +6825,9 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
|
|
6805
6825
|
}
|
6806
6826
|
else if (closest(target, '#' + this.parent.element.id + TREE_ID)) {
|
6807
6827
|
uid = closest(target, 'li').getAttribute('data-uid');
|
6828
|
+
if (!isNullOrUndefined(uid)) {
|
6829
|
+
this.parent.navigationpaneModule.treeObj.selectedNodes = [uid];
|
6830
|
+
}
|
6808
6831
|
treeFolder = true;
|
6809
6832
|
}
|
6810
6833
|
/* istanbul ignore next */
|
@@ -7063,12 +7086,7 @@ var ContextMenu = /** @__PURE__ @class */ (function () {
|
|
7063
7086
|
break;
|
7064
7087
|
case 'paste':
|
7065
7088
|
if (_this.menuType === 'folder') {
|
7066
|
-
|
7067
|
-
_this.parent.folderPath = getFullPath(_this.parent, _this.menuItemData, _this.parent.path);
|
7068
|
-
}
|
7069
|
-
else {
|
7070
|
-
_this.parent.folderPath = '';
|
7071
|
-
}
|
7089
|
+
_this.parent.folderPath = getFullPath(_this.parent, _this.menuItemData, _this.parent.path);
|
7072
7090
|
}
|
7073
7091
|
else {
|
7074
7092
|
_this.parent.folderPath = '';
|