@syncfusion/ej2-filemanager 20.2.38 → 20.2.44
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/CHANGELOG.md +32 -0
- package/dist/ej2-filemanager.umd.min.js +2 -11
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +25 -9
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +23 -7
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -11
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -10
- package/package.json +16 -16
- package/src/file-manager/base/file-manager.d.ts +1 -0
- package/src/file-manager/base/interface.d.ts +1 -0
- package/src/file-manager/common/operations.js +2 -0
- package/src/file-manager/common/utility.js +6 -1
- package/src/file-manager/layout/details-view.js +2 -1
- package/src/file-manager/layout/large-icons-view.js +1 -0
- package/src/file-manager/layout/navigation-pane.js +1 -1
- package/src/file-manager/pop-up/context-menu.js +1 -1
- package/src/file-manager/pop-up/dialog.js +10 -3
- package/styles/file-manager/fluent-dark.css +3 -3
- package/styles/fluent-dark.css +3 -3
@@ -1075,7 +1075,7 @@ function getImageUrl(parent, item) {
|
|
1075
1075
|
imgUrl = baseUrl + '?path=' + parent.path + '&id=' + imgId;
|
1076
1076
|
}
|
1077
1077
|
else if (!isNullOrUndefined(fPath)) {
|
1078
|
-
imgUrl = baseUrl + '?path=' + fPath.replace(/\\/g, '/') + fileName;
|
1078
|
+
imgUrl = baseUrl + '?path=' + encodeURIComponent(fPath.replace(/\\/g, '/')) + fileName;
|
1079
1079
|
}
|
1080
1080
|
else {
|
1081
1081
|
imgUrl = baseUrl + '?path=' + parent.path + fileName;
|
@@ -1597,7 +1597,7 @@ function doPasteUpdate(parent, operation, result) {
|
|
1597
1597
|
* @private
|
1598
1598
|
*/
|
1599
1599
|
function readDropPath(parent) {
|
1600
|
-
|
1600
|
+
let pathId = getValue('_fm_id', parent.dropData);
|
1601
1601
|
parent.expandedId = pathId;
|
1602
1602
|
parent.itemData = [parent.dropData];
|
1603
1603
|
if (parent.isPathDrag) {
|
@@ -1605,7 +1605,12 @@ function readDropPath(parent) {
|
|
1605
1605
|
}
|
1606
1606
|
else {
|
1607
1607
|
if (parent.navigationpaneModule) {
|
1608
|
-
|
1608
|
+
let node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
|
1609
|
+
if (!node) {
|
1610
|
+
let liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
|
1611
|
+
pathId = liElement.getAttribute("data-uid");
|
1612
|
+
node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
|
1613
|
+
}
|
1609
1614
|
updatePath(node, parent.dropData, parent);
|
1610
1615
|
}
|
1611
1616
|
read(parent, dropPath, parent.dropPath);
|
@@ -2432,6 +2437,8 @@ function readSuccess(parent, result, event) {
|
|
2432
2437
|
parent.notify(selectionChanged, {});
|
2433
2438
|
}
|
2434
2439
|
onFailure(parent, result, 'read');
|
2440
|
+
parent.setProperties({ path: parent.oldPath }, true);
|
2441
|
+
parent.pathNames.pop();
|
2435
2442
|
}
|
2436
2443
|
if (parent.isDragDrop && parent.isDropEnd) {
|
2437
2444
|
if (parent.droppedObjects.length !== 0) {
|
@@ -3385,11 +3392,18 @@ function getOptions(parent, text, e, details, replaceItems) {
|
|
3385
3392
|
];
|
3386
3393
|
break;
|
3387
3394
|
case 'MultipleFileDetails':
|
3395
|
+
let index;
|
3388
3396
|
options.dialogName = 'File Details';
|
3389
|
-
strArr =
|
3390
|
-
|
3391
|
-
return (index === 0) ? 'Folder' : val.substr(index).replace(' ', '');
|
3397
|
+
strArr = parent.itemData.map((val) => {
|
3398
|
+
index = val.name.indexOf('.') + 1;
|
3399
|
+
return (index === 0 && (!val.isFile)) ? 'Folder' : ((index !== 0) ? val.name.substr(index).replace(' ', '') : 'undetermined');
|
3392
3400
|
});
|
3401
|
+
if (strArr[0] == undefined) {
|
3402
|
+
strArr = details.name.split(',').map((val) => {
|
3403
|
+
index = val.indexOf('.') + 1;
|
3404
|
+
return (index === 0) ? 'Folder' : val.substr(index).replace(' ', '');
|
3405
|
+
});
|
3406
|
+
}
|
3393
3407
|
fileType$$1 = strArr.every((val, i, arr) => val === arr[0]) ?
|
3394
3408
|
((strArr[0] === 'Folder') ? 'Folder' : strArr[0].toLocaleUpperCase() + ' Type') : 'Multiple Types';
|
3395
3409
|
location = details.location;
|
@@ -4562,6 +4576,7 @@ class LargeIconsView {
|
|
4562
4576
|
const val = this.parent.breadcrumbbarModule.searchObj.element.value;
|
4563
4577
|
if (val === '' && !this.parent.isFiltered) {
|
4564
4578
|
const id = getValue('id', details);
|
4579
|
+
this.parent.oldPath = this.parent.path;
|
4565
4580
|
const newPath = this.parent.path + (isNullOrUndefined(id) ? text : id) + '/';
|
4566
4581
|
this.parent.setProperties({ path: newPath }, true);
|
4567
4582
|
this.parent.pathNames.push(text);
|
@@ -5767,7 +5782,7 @@ class ContextMenu$2 {
|
|
5767
5782
|
data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
|
5768
5783
|
if (isNullOrUndefined(this.targetElement.getAttribute('aria-selected'))) {
|
5769
5784
|
/* istanbul ignore next */
|
5770
|
-
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('
|
5785
|
+
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('data-rowindex'), 10)]);
|
5771
5786
|
}
|
5772
5787
|
selected = true;
|
5773
5788
|
/* istanbul ignore next */
|
@@ -8372,7 +8387,7 @@ class NavigationPane {
|
|
8372
8387
|
const currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
|
8373
8388
|
if (this.expandNodeTarget === 'add') {
|
8374
8389
|
const sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
|
8375
|
-
const ul = select('.' + LIST_PARENT, sNode);
|
8390
|
+
const ul = (!isNullOrUndefined(sNode)) ? select('.' + LIST_PARENT, sNode) : null;
|
8376
8391
|
if (isNullOrUndefined(ul)) {
|
8377
8392
|
this.addChild(args.files, this.treeObj.selectedNodes[0], !this.expandTree);
|
8378
8393
|
}
|
@@ -9498,6 +9513,7 @@ class DetailsView {
|
|
9498
9513
|
const val = this.parent.breadcrumbbarModule.searchObj.element.value;
|
9499
9514
|
if (val === '' && !this.parent.isFiltered) {
|
9500
9515
|
const id = getValue('id', data);
|
9516
|
+
this.parent.oldPath = this.parent.path;
|
9501
9517
|
const newPath = this.parent.path + (isNullOrUndefined(id) ? name : id) + '/';
|
9502
9518
|
this.parent.setProperties({ path: newPath }, true);
|
9503
9519
|
this.parent.pathNames.push(name);
|
@@ -10132,7 +10148,7 @@ class DetailsView {
|
|
10132
10148
|
}
|
10133
10149
|
getFocusedItemIndex() {
|
10134
10150
|
return (!isNullOrUndefined(this.getFocusedItem())) ?
|
10135
|
-
parseInt(this.getFocusedItem().getAttribute('
|
10151
|
+
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
10136
10152
|
}
|
10137
10153
|
/* istanbul ignore next */
|
10138
10154
|
// eslint:disable-next-line
|