@syncfusion/ej2-filemanager 19.4.42 → 19.4.50
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 +19 -0
- 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 +83 -18
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +83 -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 -16
- package/src/file-manager/base/file-manager-model.d.ts +1 -1
- package/src/file-manager/base/file-manager.d.ts +2 -0
- package/src/file-manager/base/file-manager.js +8 -0
- package/src/file-manager/base/interface.d.ts +2 -0
- package/src/file-manager/common/utility.js +8 -1
- package/src/file-manager/layout/large-icons-view.d.ts +1 -1
- package/src/file-manager/layout/navigation-pane.d.ts +5 -0
- package/src/file-manager/layout/navigation-pane.js +55 -10
- package/src/file-manager/pop-up/context-menu.d.ts +1 -0
- package/src/file-manager/pop-up/context-menu.js +12 -7
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/file-manager/_layout.scss +6 -0
- package/styles/file-manager/bootstrap-dark.css +4 -0
- package/styles/file-manager/bootstrap.css +4 -0
- package/styles/file-manager/bootstrap4.css +4 -0
- package/styles/file-manager/bootstrap5-dark.css +4 -0
- package/styles/file-manager/bootstrap5.css +4 -0
- package/styles/file-manager/fabric-dark.css +4 -0
- package/styles/file-manager/fabric.css +4 -0
- package/styles/file-manager/highcontrast-light.css +4 -0
- package/styles/file-manager/highcontrast.css +4 -0
- package/styles/file-manager/material-dark.css +4 -0
- package/styles/file-manager/material.css +4 -0
- package/styles/file-manager/tailwind-dark.css +4 -0
- package/styles/file-manager/tailwind.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind.css +4 -0
@@ -1019,7 +1019,13 @@ function searchWordHandler(parent, value, isLayoutChange) {
|
|
1019
1019
|
}
|
1020
1020
|
else {
|
1021
1021
|
if (!parent.isFiltered) {
|
1022
|
-
|
1022
|
+
if (parent.isSortByClicked) {
|
1023
|
+
parent.notify(layoutChange, { files: parent.largeiconsviewModule.items });
|
1024
|
+
parent.isSortByClicked = false;
|
1025
|
+
}
|
1026
|
+
else {
|
1027
|
+
read(parent, isLayoutChange ? layoutChange : search, parent.path);
|
1028
|
+
}
|
1023
1029
|
}
|
1024
1030
|
else {
|
1025
1031
|
filter(parent, layoutChange);
|
@@ -1430,6 +1436,7 @@ function getCssClass(parent, css) {
|
|
1430
1436
|
*/
|
1431
1437
|
function sortbyClickHandler(parent, args) {
|
1432
1438
|
var tick;
|
1439
|
+
parent.isSortByClicked = true;
|
1433
1440
|
if (args.item.id.indexOf('ascending') !== -1 || args.item.id.indexOf('descending') !== -1 || args.item.id.indexOf('none') !== -1) {
|
1434
1441
|
tick = true;
|
1435
1442
|
}
|
@@ -5856,14 +5863,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
5856
5863
|
var data;
|
5857
5864
|
var treeFolder = false;
|
5858
5865
|
var target = args.event.target;
|
5859
|
-
this.menuTarget = target;
|
5866
|
+
this.menuTarget = this.targetNodeElement = target;
|
5860
5867
|
this.currentElement = args.element;
|
5861
5868
|
if (target.classList.contains('e-spinner-pane')) {
|
5862
5869
|
target = this.parent.navigationpaneModule.activeNode.getElementsByClassName(FULLROW)[0];
|
5863
|
-
this.menuTarget = target;
|
5864
|
-
}
|
5865
|
-
if (target.classList.contains(FULLROW)) {
|
5866
|
-
this.parent.selectedItems.length = 0;
|
5870
|
+
this.menuTarget = this.targetNodeElement = target;
|
5867
5871
|
}
|
5868
5872
|
this.targetElement = this.parent.view === 'Details' ? closest(target, 'tr.e-row') : target;
|
5869
5873
|
var view = this.getTargetView(target);
|
@@ -5974,7 +5978,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
5974
5978
|
_this.enableItems(_this.disabledItems, false, true);
|
5975
5979
|
args.cancel = menuOpenArgs.cancel;
|
5976
5980
|
if (menuOpenArgs.cancel) {
|
5977
|
-
_this.menuTarget = _this.currentElement = null;
|
5981
|
+
_this.menuTarget = _this.targetNodeElement = _this.currentElement = null;
|
5978
5982
|
}
|
5979
5983
|
});
|
5980
5984
|
};
|
@@ -6094,7 +6098,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
6094
6098
|
}
|
6095
6099
|
else {
|
6096
6100
|
this.parent.notify(selectedData, {});
|
6097
|
-
|
6101
|
+
if (this.parent.activeModule === 'navigationpane' && itemText === 'open') {
|
6102
|
+
details = [this.menuItemData];
|
6103
|
+
}
|
6104
|
+
else {
|
6105
|
+
details = this.parent.itemData;
|
6106
|
+
}
|
6098
6107
|
}
|
6099
6108
|
var eventArgs = {
|
6100
6109
|
cancel: false,
|
@@ -6171,6 +6180,9 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
6171
6180
|
if (_this.parent.visitedItem) {
|
6172
6181
|
_this.parent.notify(openInit, { target: _this.parent.visitedItem });
|
6173
6182
|
}
|
6183
|
+
else if (_this.parent.activeModule === 'navigationpane') {
|
6184
|
+
_this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
|
6185
|
+
}
|
6174
6186
|
break;
|
6175
6187
|
case 'details':
|
6176
6188
|
_this.parent.notify(detailsInit, {});
|
@@ -6543,6 +6555,8 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6543
6555
|
_this.folderPath = '';
|
6544
6556
|
_this.isSameAction = false;
|
6545
6557
|
_this.isFiltered = false;
|
6558
|
+
// Specifies whether the sort by option is clicked or not.
|
6559
|
+
_this.isSortByClicked = false;
|
6546
6560
|
_this.enablePaste = false;
|
6547
6561
|
_this.persistData = false;
|
6548
6562
|
_this.retryArgs = [];
|
@@ -6873,6 +6887,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6873
6887
|
enableRtl: this.enableRtl,
|
6874
6888
|
uploading: this.onUploading.bind(this),
|
6875
6889
|
removing: this.onRemoving.bind(this),
|
6890
|
+
canceling: this.onCancel.bind(this),
|
6876
6891
|
clearing: this.onClearing.bind(this),
|
6877
6892
|
selected: this.onSelected.bind(this),
|
6878
6893
|
success: this.onUploadSuccess.bind(this),
|
@@ -6980,6 +6995,11 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6980
6995
|
}
|
6981
6996
|
};
|
6982
6997
|
/* istanbul ignore next */
|
6998
|
+
FileManager.prototype.onCancel = function (args) {
|
6999
|
+
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
7000
|
+
args.customFormData = [{ 'path': this.path }, { 'action': 'remove' }, { 'data': data }];
|
7001
|
+
};
|
7002
|
+
/* istanbul ignore next */
|
6983
7003
|
FileManager.prototype.onClearing = function () {
|
6984
7004
|
if (this.isOpened) {
|
6985
7005
|
this.uploadDialogObj.hide();
|
@@ -8235,6 +8255,12 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8235
8255
|
this.isRenameParent = false;
|
8236
8256
|
this.isRightClick = false;
|
8237
8257
|
this.renameParent = null;
|
8258
|
+
// Specifies the previously selected nodes in the treeview control.
|
8259
|
+
this.previousSelected = null;
|
8260
|
+
// Specifies whether the nodeClicked event of the treeview control is triggered or not.
|
8261
|
+
this.isNodeClickCalled = false;
|
8262
|
+
// Specifies whether to restrict node selection in the treeview control.
|
8263
|
+
this.restrictSelecting = false;
|
8238
8264
|
this.parent = parent;
|
8239
8265
|
this.addEventListener();
|
8240
8266
|
this.keyConfigs = {
|
@@ -8274,6 +8300,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8274
8300
|
hasChildren: 'hasChild', iconCss: '_fm_icon', htmlAttributes: '_fm_htmlAttr', tooltip: 'name'
|
8275
8301
|
},
|
8276
8302
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
8303
|
+
nodeSelecting: this.onNodeSelecting.bind(this),
|
8277
8304
|
nodeSelected: this.onNodeSelected.bind(this),
|
8278
8305
|
nodeExpanding: this.onNodeExpand.bind(this),
|
8279
8306
|
nodeClicked: this.onNodeClicked.bind(this),
|
@@ -8379,6 +8406,44 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8379
8406
|
this.treeObj.addNodes(directories, target, null, prevent);
|
8380
8407
|
}
|
8381
8408
|
};
|
8409
|
+
// Node Selecting event handler
|
8410
|
+
NavigationPane.prototype.onNodeSelecting = function (args) {
|
8411
|
+
if (!args.isInteracted && !this.isRightClick && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
|
8412
|
+
this.restrictSelecting = false;
|
8413
|
+
this.isNodeClickCalled = false;
|
8414
|
+
return;
|
8415
|
+
}
|
8416
|
+
if (!this.renameParent) {
|
8417
|
+
this.parent.activeModule = 'navigationpane';
|
8418
|
+
// eslint-disable-next-line
|
8419
|
+
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
8420
|
+
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
8421
|
+
this.parent.trigger('fileOpen', eventArgs);
|
8422
|
+
args.cancel = eventArgs.cancel;
|
8423
|
+
if (args.cancel) {
|
8424
|
+
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] != args.node.getAttribute('data-uid') : false;
|
8425
|
+
this.treeObj.selectedNodes = this.isNodeClickCalled ? this.previousSelected : this.treeObj.selectedNodes;
|
8426
|
+
this.previousSelected = this.treeObj.selectedNodes;
|
8427
|
+
if (!isNullOrUndefined(this.parent) && !isNullOrUndefined(this.parent.contextmenuModule)) {
|
8428
|
+
this.parent.contextmenuModule.contextMenu.enableItems(['Open'], true);
|
8429
|
+
}
|
8430
|
+
}
|
8431
|
+
}
|
8432
|
+
};
|
8433
|
+
// Opens the folder while clicking open context menu item in the treeview.
|
8434
|
+
NavigationPane.prototype.openFileOnContextMenuClick = function (node) {
|
8435
|
+
var data = this.treeObj.getTreeData(node);
|
8436
|
+
// eslint-disable-next-line
|
8437
|
+
this.parent.selectedItems = [];
|
8438
|
+
this.parent.itemData = data;
|
8439
|
+
this.activeNode = node;
|
8440
|
+
this.parent.activeModule = 'navigationpane';
|
8441
|
+
updatePath(node, this.parent.itemData[0], this.parent);
|
8442
|
+
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8443
|
+
this.parent.visitedItem = node;
|
8444
|
+
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
8445
|
+
this.treeObj.selectedNodes = [node.getAttribute('data-uid')];
|
8446
|
+
};
|
8382
8447
|
NavigationPane.prototype.onNodeSelected = function (args) {
|
8383
8448
|
if (this.parent.breadcrumbbarModule && this.parent.breadcrumbbarModule.searchObj && !this.renameParent) {
|
8384
8449
|
this.parent.breadcrumbbarModule.searchObj.element.value = '';
|
@@ -8392,20 +8457,18 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8392
8457
|
this.parent.activeModule = 'navigationpane';
|
8393
8458
|
// eslint-disable-next-line
|
8394
8459
|
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
8395
|
-
if (!this.renameParent) {
|
8396
|
-
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
8397
|
-
delete eventArgs.cancel;
|
8398
|
-
this.parent.trigger('fileOpen', eventArgs);
|
8399
|
-
}
|
8400
8460
|
this.parent.selectedItems = [];
|
8401
8461
|
this.parent.itemData = nodeData;
|
8462
|
+
var previousPath = this.parent.path;
|
8402
8463
|
updatePath(args.node, this.parent.itemData[0], this.parent);
|
8403
|
-
this.
|
8404
|
-
|
8405
|
-
|
8464
|
+
if (previousPath !== this.parent.path) {
|
8465
|
+
this.expandNodeTarget = null;
|
8466
|
+
if (args.node.querySelector('.' + ICONS) && args.node.querySelector('.' + LIST_ITEM) === null) {
|
8467
|
+
this.expandNodeTarget = 'add';
|
8468
|
+
}
|
8469
|
+
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8470
|
+
this.parent.visitedItem = args.node;
|
8406
8471
|
}
|
8407
|
-
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8408
|
-
this.parent.visitedItem = args.node;
|
8409
8472
|
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
8410
8473
|
};
|
8411
8474
|
/* istanbul ignore next */
|
@@ -8438,9 +8501,11 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8438
8501
|
};
|
8439
8502
|
NavigationPane.prototype.onNodeClicked = function (args) {
|
8440
8503
|
this.parent.activeModule = 'navigationpane';
|
8504
|
+
this.previousSelected = this.treeObj.selectedNodes;
|
8441
8505
|
this.activeNode = args.node;
|
8442
8506
|
if ((args.event.which === 3) && (args.node.getAttribute('data-uid') !== this.treeObj.selectedNodes[0])) {
|
8443
8507
|
this.isRightClick = true;
|
8508
|
+
this.isNodeClickCalled = true;
|
8444
8509
|
this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
|
8445
8510
|
}
|
8446
8511
|
else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && this.parent.selectedItems.length !== 0) {
|