@syncfusion/ej2-filemanager 21.1.37 → 21.1.41
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 +8 -0
- 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 +64 -13
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +64 -13
- 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 +13 -13
- package/src/file-manager/actions/toolbar.js +6 -1
- package/src/file-manager/base/interface.d.ts +2 -0
- package/src/file-manager/common/operations.js +7 -2
- package/src/file-manager/common/utility.d.ts +1 -1
- package/src/file-manager/common/utility.js +15 -3
- package/src/file-manager/layout/large-icons-view.d.ts +1 -0
- package/src/file-manager/layout/large-icons-view.js +30 -5
- package/src/file-manager/layout/navigation-pane.d.ts +1 -0
- package/src/file-manager/layout/navigation-pane.js +5 -2
- package/src/file-manager/pop-up/dialog.js +3 -2
@@ -1457,7 +1457,7 @@ function sortbyClickHandler(parent, args) {
|
|
1457
1457
|
tick = false;
|
1458
1458
|
}
|
1459
1459
|
if (!tick) {
|
1460
|
-
parent.sortBy = getSortField(args.item.id);
|
1460
|
+
parent.sortBy = getSortField(args.item.id, parent);
|
1461
1461
|
}
|
1462
1462
|
else {
|
1463
1463
|
parent.sortOrder = getSortField(args.item.id);
|
@@ -1484,12 +1484,24 @@ function sortbyClickHandler(parent, args) {
|
|
1484
1484
|
* @returns {string} - returns the sorted fields
|
1485
1485
|
* @private
|
1486
1486
|
*/
|
1487
|
-
function getSortField(id) {
|
1487
|
+
function getSortField(id, parent) {
|
1488
1488
|
var text = id.substring(id.lastIndexOf('_') + 1);
|
1489
1489
|
var field = text;
|
1490
|
+
var column;
|
1491
|
+
if (parent) {
|
1492
|
+
column = parent.detailsViewSettings.columns;
|
1493
|
+
}
|
1490
1494
|
switch (text) {
|
1491
1495
|
case 'date':
|
1492
|
-
|
1496
|
+
for (var i = 0, len = column.length; i < len; i++) {
|
1497
|
+
if (column[i].field === 'dateModified' || column[i].field === 'dateCreated') {
|
1498
|
+
field = column[i].field;
|
1499
|
+
break;
|
1500
|
+
}
|
1501
|
+
else {
|
1502
|
+
field = '_fm_modified';
|
1503
|
+
}
|
1504
|
+
}
|
1493
1505
|
break;
|
1494
1506
|
case 'ascending':
|
1495
1507
|
field = 'Ascending';
|
@@ -2689,10 +2701,15 @@ function renameSuccess(parent, result, path) {
|
|
2689
2701
|
var args = { action: 'rename', result: result };
|
2690
2702
|
parent.trigger('success', args);
|
2691
2703
|
parent.renamedItem = result.files[0];
|
2704
|
+
if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
|
2705
|
+
parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
|
2706
|
+
}
|
2692
2707
|
if (parent.activeModule === 'navigationpane') {
|
2693
2708
|
parent.pathId.pop();
|
2694
2709
|
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
2695
|
-
read(parent, renameEndParent,
|
2710
|
+
read(parent, renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
|
2711
|
+
parent.itemData[0] = parent.renamedItem;
|
2712
|
+
read(parent, pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
|
2696
2713
|
}
|
2697
2714
|
else {
|
2698
2715
|
parent.itemData = [getPathObject(parent)];
|
@@ -3710,7 +3727,8 @@ function onReSubmit(parent) {
|
|
3710
3727
|
parent.dialogObj.hide();
|
3711
3728
|
return;
|
3712
3729
|
}
|
3713
|
-
var newPath = (parent.activeModule === 'navigationpane') ?
|
3730
|
+
var newPath = (parent.activeModule === 'navigationpane') ? getValue('filterPath', parent.itemData[0]).replace(/\\/g, '/') : parent.path;
|
3731
|
+
parent.renamedId = getValue('id', parent.itemData[0]);
|
3714
3732
|
parent.renamedId = getValue('id', parent.itemData[0]);
|
3715
3733
|
if (parent.isFile) {
|
3716
3734
|
var oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);
|
@@ -3910,6 +3928,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
3910
3928
|
this.count = 0;
|
3911
3929
|
this.isRendered = true;
|
3912
3930
|
this.tapCount = 0;
|
3931
|
+
this.isSelectAllCalled = false;
|
3913
3932
|
this.isPasteOperation = false;
|
3914
3933
|
this.isInteracted = true;
|
3915
3934
|
this.parent = parent;
|
@@ -4658,6 +4677,9 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4658
4677
|
&& (e.ctrlKey || target.classList.contains(CHECK))) {
|
4659
4678
|
action = 'unselect';
|
4660
4679
|
}
|
4680
|
+
if (e.ctrlKey && e.shiftKey) {
|
4681
|
+
this.isSelectAllCalled = true;
|
4682
|
+
}
|
4661
4683
|
var fileSelectionArgs = this.triggerSelection(action, item);
|
4662
4684
|
if (fileSelectionArgs.cancel !== true) {
|
4663
4685
|
if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !e.ctrlKey)))
|
@@ -4704,9 +4726,13 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4704
4726
|
}
|
4705
4727
|
}
|
4706
4728
|
else {
|
4729
|
+
if (this.parent.selectedItems.length === this.itemList.length) {
|
4730
|
+
this.isSelectAllCalled = true;
|
4731
|
+
}
|
4707
4732
|
this.clearSelection();
|
4708
4733
|
}
|
4709
4734
|
if (!isNullOrUndefined(item)) {
|
4735
|
+
this.isSelectAllCalled = false;
|
4710
4736
|
this.updateType(item);
|
4711
4737
|
}
|
4712
4738
|
};
|
@@ -5271,9 +5297,17 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
5271
5297
|
};
|
5272
5298
|
LargeIconsView.prototype.triggerSelection = function (action, item) {
|
5273
5299
|
// eslint-disable-next-line
|
5274
|
-
var data =
|
5300
|
+
var data = [];
|
5301
|
+
if (this.isSelectAllCalled) {
|
5302
|
+
for (var i = 0, len = this.itemList.length; i < len; i++) {
|
5303
|
+
data[i] = this.getItemObject(this.itemList[i]);
|
5304
|
+
}
|
5305
|
+
}
|
5306
|
+
else {
|
5307
|
+
data[0] = this.getItemObject(item);
|
5308
|
+
}
|
5275
5309
|
var eventArgs = {
|
5276
|
-
action: action, fileDetails: data, isInteracted: this.isInteraction, cancel: false, target: item
|
5310
|
+
action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteraction, cancel: false, target: this.isSelectAllCalled ? null : item
|
5277
5311
|
};
|
5278
5312
|
this.parent.trigger('fileSelection', eventArgs);
|
5279
5313
|
this.isInteraction = true;
|
@@ -5281,9 +5315,18 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
5281
5315
|
};
|
5282
5316
|
LargeIconsView.prototype.triggerSelect = function (action, item) {
|
5283
5317
|
// eslint-disable-next-line
|
5284
|
-
var data =
|
5285
|
-
this.
|
5286
|
-
|
5318
|
+
var data = [];
|
5319
|
+
if (this.isSelectAllCalled) {
|
5320
|
+
for (var i = 0, len = this.itemList.length; i < len; i++) {
|
5321
|
+
data[i] = this.getItemObject(this.itemList[i]);
|
5322
|
+
}
|
5323
|
+
this.isSelectAllCalled = false;
|
5324
|
+
}
|
5325
|
+
else {
|
5326
|
+
data[0] = this.getItemObject(item);
|
5327
|
+
}
|
5328
|
+
this.parent.visitedData = data.length > 1 ? data[data.length - 1] : data[0];
|
5329
|
+
var eventArgs = { action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteracted };
|
5287
5330
|
this.parent.trigger('fileSelect', eventArgs);
|
5288
5331
|
this.isInteracted = true;
|
5289
5332
|
};
|
@@ -8074,7 +8117,12 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
8074
8117
|
items[itemCount].iconCss = this.parent.sortBy === 'size' ? TB_OPTION_DOT : '';
|
8075
8118
|
}
|
8076
8119
|
else if (items[itemCount].id === this.getPupupId('date')) {
|
8077
|
-
|
8120
|
+
if (this.parent.sortBy === 'dateModified' || this.parent.sortBy === 'dateCreated') {
|
8121
|
+
items[itemCount].iconCss = this.parent.sortBy === this.parent.sortBy ? TB_OPTION_DOT : '';
|
8122
|
+
}
|
8123
|
+
else {
|
8124
|
+
items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? TB_OPTION_DOT : '';
|
8125
|
+
}
|
8078
8126
|
}
|
8079
8127
|
else if (items[itemCount].id === this.getPupupId('ascending')) {
|
8080
8128
|
items[itemCount].iconCss = this.parent.sortOrder === 'Ascending' ? TB_OPTION_TICK : '';
|
@@ -8613,6 +8661,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8613
8661
|
this.isRenameParent = false;
|
8614
8662
|
this.isRightClick = false;
|
8615
8663
|
this.isSameNodeClicked = false;
|
8664
|
+
this.isNodeExpandCalled = false;
|
8616
8665
|
this.renameParent = null;
|
8617
8666
|
// Specifies the previously selected nodes in the treeview control.
|
8618
8667
|
this.previousSelected = null;
|
@@ -8784,7 +8833,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8784
8833
|
var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
|
8785
8834
|
this.parent.trigger('fileSelect', selecEventArgs);
|
8786
8835
|
}
|
8787
|
-
if (!this.isRightClick) {
|
8836
|
+
if (!this.isRightClick && args.node.getAttribute('data-uid') !== this.parent.pathId[this.parent.pathId.length - 1]) {
|
8788
8837
|
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
8789
8838
|
this.parent.trigger('fileOpen', eventArgs);
|
8790
8839
|
args.cancel = eventArgs.cancel;
|
@@ -8882,12 +8931,14 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8882
8931
|
this.parent.expandedId = this.expandNodeTarget;
|
8883
8932
|
this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
|
8884
8933
|
read(this.parent, nodeExpand, path);
|
8934
|
+
this.isNodeExpandCalled = true;
|
8885
8935
|
}
|
8886
8936
|
};
|
8887
8937
|
/* istanbul ignore next */
|
8888
8938
|
NavigationPane.prototype.onNodeExpanded = function (args) {
|
8889
8939
|
this.addChild(args.files, this.expandNodeTarget, false);
|
8890
8940
|
this.parent.expandedId = null;
|
8941
|
+
this.isNodeExpandCalled = false;
|
8891
8942
|
};
|
8892
8943
|
NavigationPane.prototype.onNodeClicked = function (args) {
|
8893
8944
|
this.parent.activeModule = 'navigationpane';
|
@@ -8903,7 +8954,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8903
8954
|
var layout = (this.parent.view === 'LargeIcons') ? 'largeiconsview' : 'detailsview';
|
8904
8955
|
this.parent.notify(modelChanged, { module: layout, newProp: { selectedItems: [] } });
|
8905
8956
|
}
|
8906
|
-
else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && !this.isNodeClickCalled) {
|
8957
|
+
else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && !this.isNodeClickCalled && !this.isNodeExpandCalled) {
|
8907
8958
|
if (args.event.which === 3) {
|
8908
8959
|
this.isRightClick = true;
|
8909
8960
|
}
|