@syncfusion/ej2-filemanager 19.4.43 → 19.4.51
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 +26 -0
- package/README.md +1 -1
- package/dist/ej2-filemanager.umd.min.js +1 -10
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +44 -20
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +44 -20
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +1 -10
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +71 -72
- package/src/file-manager/base/file-manager-model.d.ts +2 -1
- package/src/file-manager/base/file-manager.d.ts +3 -0
- package/src/file-manager/base/file-manager.js +8 -0
- package/src/file-manager/base/interface.d.ts +1 -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.js +25 -16
- package/src/file-manager/models/navigation-pane-settings-model.d.ts +11 -0
- package/src/file-manager/models/navigation-pane-settings.d.ts +10 -0
- package/src/file-manager/models/navigation-pane-settings.js +3 -0
- package/src/file-manager/pop-up/context-menu.js +0 -3
- 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
@@ -160,6 +160,9 @@ __decorate$5([
|
|
160
160
|
__decorate$5([
|
161
161
|
Property(true)
|
162
162
|
], NavigationPaneSettings.prototype, "visible", void 0);
|
163
|
+
__decorate$5([
|
164
|
+
Property('None')
|
165
|
+
], NavigationPaneSettings.prototype, "sortOrder", void 0);
|
163
166
|
|
164
167
|
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
165
168
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -875,7 +878,13 @@ function searchWordHandler(parent, value, isLayoutChange) {
|
|
875
878
|
}
|
876
879
|
else {
|
877
880
|
if (!parent.isFiltered) {
|
878
|
-
|
881
|
+
if (parent.isSortByClicked) {
|
882
|
+
parent.notify(layoutChange, { files: parent.largeiconsviewModule.items });
|
883
|
+
parent.isSortByClicked = false;
|
884
|
+
}
|
885
|
+
else {
|
886
|
+
read(parent, isLayoutChange ? layoutChange : search, parent.path);
|
887
|
+
}
|
879
888
|
}
|
880
889
|
else {
|
881
890
|
filter(parent, layoutChange);
|
@@ -1286,6 +1295,7 @@ function getCssClass(parent, css) {
|
|
1286
1295
|
*/
|
1287
1296
|
function sortbyClickHandler(parent, args) {
|
1288
1297
|
let tick;
|
1298
|
+
parent.isSortByClicked = true;
|
1289
1299
|
if (args.item.id.indexOf('ascending') !== -1 || args.item.id.indexOf('descending') !== -1 || args.item.id.indexOf('none') !== -1) {
|
1290
1300
|
tick = true;
|
1291
1301
|
}
|
@@ -5707,9 +5717,6 @@ class ContextMenu$2 {
|
|
5707
5717
|
target = this.parent.navigationpaneModule.activeNode.getElementsByClassName(FULLROW)[0];
|
5708
5718
|
this.menuTarget = this.targetNodeElement = target;
|
5709
5719
|
}
|
5710
|
-
if (target.classList.contains(FULLROW)) {
|
5711
|
-
this.parent.selectedItems.length = 0;
|
5712
|
-
}
|
5713
5720
|
this.targetElement = this.parent.view === 'Details' ? closest(target, 'tr.e-row') : target;
|
5714
5721
|
const view = this.getTargetView(target);
|
5715
5722
|
this.updateActiveModule();
|
@@ -6380,6 +6387,8 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
6380
6387
|
this.folderPath = '';
|
6381
6388
|
this.isSameAction = false;
|
6382
6389
|
this.isFiltered = false;
|
6390
|
+
// Specifies whether the sort by option is clicked or not.
|
6391
|
+
this.isSortByClicked = false;
|
6383
6392
|
this.enablePaste = false;
|
6384
6393
|
this.persistData = false;
|
6385
6394
|
this.retryArgs = [];
|
@@ -6708,6 +6717,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
6708
6717
|
enableRtl: this.enableRtl,
|
6709
6718
|
uploading: this.onUploading.bind(this),
|
6710
6719
|
removing: this.onRemoving.bind(this),
|
6720
|
+
canceling: this.onCancel.bind(this),
|
6711
6721
|
clearing: this.onClearing.bind(this),
|
6712
6722
|
selected: this.onSelected.bind(this),
|
6713
6723
|
success: this.onUploadSuccess.bind(this),
|
@@ -6815,6 +6825,11 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
6815
6825
|
}
|
6816
6826
|
}
|
6817
6827
|
/* istanbul ignore next */
|
6828
|
+
onCancel(args) {
|
6829
|
+
const data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
6830
|
+
args.customFormData = [{ 'path': this.path }, { 'action': 'remove' }, { 'data': data }];
|
6831
|
+
}
|
6832
|
+
/* istanbul ignore next */
|
6818
6833
|
onClearing() {
|
6819
6834
|
if (this.isOpened) {
|
6820
6835
|
this.uploadDialogObj.hide();
|
@@ -8104,6 +8119,7 @@ class NavigationPane {
|
|
8104
8119
|
hasChildren: 'hasChild', iconCss: '_fm_icon', htmlAttributes: '_fm_htmlAttr', tooltip: 'name'
|
8105
8120
|
},
|
8106
8121
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
8122
|
+
sortOrder: this.parent.navigationPaneSettings.sortOrder,
|
8107
8123
|
nodeSelecting: this.onNodeSelecting.bind(this),
|
8108
8124
|
nodeSelected: this.onNodeSelected.bind(this),
|
8109
8125
|
nodeExpanding: this.onNodeExpand.bind(this),
|
@@ -8213,6 +8229,7 @@ class NavigationPane {
|
|
8213
8229
|
onNodeSelecting(args) {
|
8214
8230
|
if (!args.isInteracted && !this.isRightClick && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
|
8215
8231
|
this.restrictSelecting = false;
|
8232
|
+
this.isNodeClickCalled = false;
|
8216
8233
|
return;
|
8217
8234
|
}
|
8218
8235
|
if (!this.renameParent) {
|
@@ -8220,13 +8237,12 @@ class NavigationPane {
|
|
8220
8237
|
// eslint-disable-next-line
|
8221
8238
|
const nodeData = this.getTreeData(getValue('id', args.nodeData));
|
8222
8239
|
const eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
8223
|
-
delete eventArgs.cancel;
|
8224
8240
|
this.parent.trigger('fileOpen', eventArgs);
|
8225
8241
|
args.cancel = eventArgs.cancel;
|
8226
8242
|
if (args.cancel) {
|
8227
|
-
this.restrictSelecting =
|
8243
|
+
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] != args.node.getAttribute('data-uid') : false;
|
8228
8244
|
this.treeObj.selectedNodes = this.isNodeClickCalled ? this.previousSelected : this.treeObj.selectedNodes;
|
8229
|
-
this.
|
8245
|
+
this.previousSelected = this.treeObj.selectedNodes;
|
8230
8246
|
if (!isNullOrUndefined(this.parent) && !isNullOrUndefined(this.parent.contextmenuModule)) {
|
8231
8247
|
this.parent.contextmenuModule.contextMenu.enableItems(['Open'], true);
|
8232
8248
|
}
|
@@ -8262,13 +8278,16 @@ class NavigationPane {
|
|
8262
8278
|
const nodeData = this.getTreeData(getValue('id', args.nodeData));
|
8263
8279
|
this.parent.selectedItems = [];
|
8264
8280
|
this.parent.itemData = nodeData;
|
8281
|
+
let previousPath = this.parent.path;
|
8265
8282
|
updatePath(args.node, this.parent.itemData[0], this.parent);
|
8266
|
-
this.
|
8267
|
-
|
8268
|
-
|
8283
|
+
if (previousPath !== this.parent.path) {
|
8284
|
+
this.expandNodeTarget = null;
|
8285
|
+
if (args.node.querySelector('.' + ICONS) && args.node.querySelector('.' + LIST_ITEM) === null) {
|
8286
|
+
this.expandNodeTarget = 'add';
|
8287
|
+
}
|
8288
|
+
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8289
|
+
this.parent.visitedItem = args.node;
|
8269
8290
|
}
|
8270
|
-
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8271
|
-
this.parent.visitedItem = args.node;
|
8272
8291
|
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
8273
8292
|
}
|
8274
8293
|
/* istanbul ignore next */
|
@@ -8301,11 +8320,11 @@ class NavigationPane {
|
|
8301
8320
|
}
|
8302
8321
|
onNodeClicked(args) {
|
8303
8322
|
this.parent.activeModule = 'navigationpane';
|
8323
|
+
this.previousSelected = this.treeObj.selectedNodes;
|
8304
8324
|
this.activeNode = args.node;
|
8305
8325
|
if ((args.event.which === 3) && (args.node.getAttribute('data-uid') !== this.treeObj.selectedNodes[0])) {
|
8306
8326
|
this.isRightClick = true;
|
8307
8327
|
this.isNodeClickCalled = true;
|
8308
|
-
this.previousSelected = this.treeObj.selectedNodes;
|
8309
8328
|
this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
|
8310
8329
|
}
|
8311
8330
|
else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && this.parent.selectedItems.length !== 0) {
|
@@ -8491,6 +8510,9 @@ class NavigationPane {
|
|
8491
8510
|
break;
|
8492
8511
|
case 'navigationPaneSettings':
|
8493
8512
|
read(this.parent, finalizeEnd, '/');
|
8513
|
+
if (e.oldProp.navigationPaneSettings.sortOrder !== e.newProp.navigationPaneSettings.sortOrder) {
|
8514
|
+
this.treeObj.sortOrder = e.newProp.navigationPaneSettings.sortOrder;
|
8515
|
+
}
|
8494
8516
|
break;
|
8495
8517
|
}
|
8496
8518
|
}
|
@@ -8783,13 +8805,15 @@ class NavigationPane {
|
|
8783
8805
|
removeActive(this.parent);
|
8784
8806
|
break;
|
8785
8807
|
case 'del':
|
8786
|
-
this.
|
8787
|
-
|
8788
|
-
|
8789
|
-
|
8790
|
-
|
8791
|
-
|
8792
|
-
|
8808
|
+
if (this.parent.pathId[0] !== this.activeNode.getAttribute('data-uid')) {
|
8809
|
+
this.updateItemData();
|
8810
|
+
if (!hasEditAccess(this.parent.itemData[0])) {
|
8811
|
+
createDeniedDialog(this.parent, this.parent.itemData[0], permissionEdit);
|
8812
|
+
}
|
8813
|
+
else {
|
8814
|
+
this.removeNodes = [];
|
8815
|
+
createDialog(this.parent, 'Delete');
|
8816
|
+
}
|
8793
8817
|
}
|
8794
8818
|
break;
|
8795
8819
|
case 'ctrlC':
|