@syncfusion/ej2-filemanager 27.2.3 → 28.1.33
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/README.md +2 -2
- package/dist/ej2-filemanager.min.js +3 -3
- package/dist/ej2-filemanager.umd.min.js +3 -3
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +144 -32
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +148 -32
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +3 -3
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +16 -16
- package/src/file-manager/base/file-manager-model.d.ts +2 -1
- package/src/file-manager/base/file-manager.d.ts +4 -1
- package/src/file-manager/base/file-manager.js +39 -4
- package/src/file-manager/base/interface.d.ts +1 -0
- package/src/file-manager/common/operations.js +30 -12
- package/src/file-manager/common/utility.d.ts +20 -0
- package/src/file-manager/common/utility.js +40 -3
- package/src/file-manager/layout/details-view.js +10 -0
- package/src/file-manager/layout/large-icons-view.js +8 -6
- package/src/file-manager/layout/navigation-pane.d.ts +1 -1
- package/src/file-manager/layout/navigation-pane.js +7 -3
- package/src/file-manager/models/upload-settings-model.d.ts +9 -0
- package/src/file-manager/models/upload-settings.d.ts +8 -0
- package/src/file-manager/models/upload-settings.js +3 -0
- package/src/file-manager/pop-up/context-menu.d.ts +1 -0
- package/src/file-manager/pop-up/context-menu.js +4 -3
- package/src/file-manager/pop-up/dialog.js +8 -2
- package/styles/bds-lite.css +1284 -0
- package/styles/bds-lite.scss +16 -0
- package/styles/bds.css +1876 -0
- package/styles/bds.scss +17 -0
- package/styles/file-manager/_bigger.scss +69 -6
- package/styles/file-manager/_fluent2-definition.scss +1 -1
- package/styles/file-manager/_layout.scss +77 -14
- package/styles/file-manager/_material3-definition.scss +2 -2
- package/styles/file-manager/_tailwind3-definition.scss +243 -0
- package/styles/file-manager/_theme.scss +4 -1
- package/styles/file-manager/bds.css +1876 -0
- package/styles/file-manager/bds.scss +17 -0
- package/styles/file-manager/fluent2.css +2 -2
- package/styles/file-manager/icons/_tailwind3.scss +235 -0
- package/styles/file-manager/material3-dark.css +3 -2
- package/styles/file-manager/material3.css +3 -2
- package/styles/file-manager/tailwind3.css +1666 -0
- package/styles/file-manager/tailwind3.scss +17 -0
- package/styles/fluent2.css +2 -2
- package/styles/material3-dark.css +3 -2
- package/styles/material3.css +3 -2
- package/styles/tailwind3-lite.css +1069 -0
- package/styles/tailwind3-lite.scss +16 -0
- package/styles/tailwind3.css +1666 -0
- package/styles/tailwind3.scss +17 -0
package/dist/global/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version :
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
3
|
+
* version : 28.1.33
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
5
5
|
* Use of this code is subject to the terms of our license.
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "@syncfusion/ej2-filemanager@*",
|
3
|
-
"_id": "@syncfusion/ej2-filemanager@
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@18.28.1",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-zzol2ppCnpFvRpdwhzxa8R7RfF84vklbeFH9hYlEzOhSxLzCBxL3eNFfOoQB6Q9DbB3gtUBkw1arYRoJOQ4oBA==",
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -24,10 +24,10 @@
|
|
24
24
|
"/@syncfusion/ej2-richtexteditor",
|
25
25
|
"/@syncfusion/ej2-vue-filemanager"
|
26
26
|
],
|
27
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
28
|
-
"_shasum": "
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-filemanager/-/ej2-filemanager-18.28.1.tgz",
|
28
|
+
"_shasum": "26aebb2c4d38529bf6bc755a869b1a1b4ea5fbba",
|
29
29
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
30
|
-
"_where": "/jenkins/workspace/elease-
|
30
|
+
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
|
31
31
|
"author": {
|
32
32
|
"name": "Syncfusion Inc."
|
33
33
|
},
|
@@ -36,16 +36,16 @@
|
|
36
36
|
},
|
37
37
|
"bundleDependencies": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@syncfusion/ej2-base": "~
|
40
|
-
"@syncfusion/ej2-buttons": "~
|
41
|
-
"@syncfusion/ej2-data": "~
|
42
|
-
"@syncfusion/ej2-grids": "~
|
43
|
-
"@syncfusion/ej2-inputs": "~
|
44
|
-
"@syncfusion/ej2-layouts": "~
|
45
|
-
"@syncfusion/ej2-lists": "~
|
46
|
-
"@syncfusion/ej2-navigations": "~
|
47
|
-
"@syncfusion/ej2-popups": "~
|
48
|
-
"@syncfusion/ej2-splitbuttons": "~
|
39
|
+
"@syncfusion/ej2-base": "~28.1.33",
|
40
|
+
"@syncfusion/ej2-buttons": "~28.1.33",
|
41
|
+
"@syncfusion/ej2-data": "~28.1.33",
|
42
|
+
"@syncfusion/ej2-grids": "~28.1.33",
|
43
|
+
"@syncfusion/ej2-inputs": "~28.1.33",
|
44
|
+
"@syncfusion/ej2-layouts": "~28.1.33",
|
45
|
+
"@syncfusion/ej2-lists": "~28.1.33",
|
46
|
+
"@syncfusion/ej2-navigations": "~28.1.33",
|
47
|
+
"@syncfusion/ej2-popups": "~28.1.33",
|
48
|
+
"@syncfusion/ej2-splitbuttons": "~28.1.33"
|
49
49
|
},
|
50
50
|
"deprecated": false,
|
51
51
|
"description": "Essential JS 2 FileManager Component",
|
@@ -75,6 +75,6 @@
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
76
76
|
},
|
77
77
|
"typings": "index.d.ts",
|
78
|
-
"version": "
|
78
|
+
"version": "28.1.33",
|
79
79
|
"sideEffects": false
|
80
80
|
}
|
@@ -184,7 +184,8 @@ export interface FileManagerModel extends ComponentModel{
|
|
184
184
|
rootAliasName?: string;
|
185
185
|
|
186
186
|
/**
|
187
|
-
*
|
187
|
+
* Determines whether to show or hide hidden files and folders.
|
188
|
+
* This is applicable only for storage systems that support attributes for controlling the visibility of data, including physical file directories and custom flat data handlers.
|
188
189
|
*
|
189
190
|
* @default false
|
190
191
|
*/
|
@@ -318,7 +318,8 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
|
|
318
318
|
*/
|
319
319
|
rootAliasName: string;
|
320
320
|
/**
|
321
|
-
*
|
321
|
+
* Determines whether to show or hide hidden files and folders.
|
322
|
+
* This is applicable only for storage systems that support attributes for controlling the visibility of data, including physical file directories and custom flat data handlers.
|
322
323
|
*
|
323
324
|
* @default false
|
324
325
|
*/
|
@@ -660,12 +661,14 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
|
|
660
661
|
private onBeforeClose;
|
661
662
|
private onOpen;
|
662
663
|
private onClose;
|
664
|
+
private onChunkUploading;
|
663
665
|
private onUploading;
|
664
666
|
private onRemoving;
|
665
667
|
private onCancel;
|
666
668
|
private onClearing;
|
667
669
|
private onSelected;
|
668
670
|
private onFileUploadSuccess;
|
671
|
+
private onChunkUploadComplete;
|
669
672
|
private onUploadSuccess;
|
670
673
|
private onUploadFailure;
|
671
674
|
private onInitialEnd;
|
@@ -417,11 +417,14 @@ var FileManager = /** @class */ (function (_super) {
|
|
417
417
|
dropArea: select('#' + this.element.id + CLS.CONTENT_ID, this.element),
|
418
418
|
asyncSettings: {
|
419
419
|
saveUrl: uploadUrl,
|
420
|
-
removeUrl: uploadUrl
|
420
|
+
removeUrl: uploadUrl,
|
421
|
+
chunkSize: this.uploadSettings.chunkSize,
|
422
|
+
retryCount: 0
|
421
423
|
},
|
422
424
|
locale: this.locale,
|
423
425
|
enableRtl: this.enableRtl,
|
424
426
|
uploading: this.onUploading.bind(this),
|
427
|
+
chunkUploading: this.onChunkUploading.bind(this),
|
425
428
|
removing: this.onRemoving.bind(this),
|
426
429
|
canceling: this.onCancel.bind(this),
|
427
430
|
clearing: this.onClearing.bind(this),
|
@@ -483,19 +486,34 @@ var FileManager = /** @class */ (function (_super) {
|
|
483
486
|
this.trigger('popupClose', args);
|
484
487
|
};
|
485
488
|
/* istanbul ignore next */
|
489
|
+
FileManager.prototype.onChunkUploading = function (args) {
|
490
|
+
var action = 'save';
|
491
|
+
if ((this.retryArgs.length !== 0)) {
|
492
|
+
for (var i = 0; i < this.retryArgs.length; i++) {
|
493
|
+
if (args.fileData.name === this.retryArgs[i].file.name) {
|
494
|
+
action = this.retryArgs[i].action;
|
495
|
+
}
|
496
|
+
}
|
497
|
+
}
|
498
|
+
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
499
|
+
args.customFormData = [{ 'path': this.path }, { 'size': args.fileData.size }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
500
|
+
};
|
501
|
+
/* istanbul ignore next */
|
486
502
|
FileManager.prototype.onUploading = function (args) {
|
487
503
|
var action = 'save';
|
488
504
|
if ((this.retryArgs.length !== 0)) {
|
489
505
|
for (var i = 0; i < this.retryArgs.length; i++) {
|
490
506
|
if (args.fileData.name === this.retryArgs[i].file.name) {
|
491
507
|
action = this.retryArgs[i].action;
|
492
|
-
this.
|
493
|
-
|
508
|
+
if (this.uploadSettings.chunkSize === 0) {
|
509
|
+
this.retryArgs.splice(i, 1);
|
510
|
+
i = this.retryArgs.length;
|
511
|
+
}
|
494
512
|
}
|
495
513
|
}
|
496
514
|
}
|
497
515
|
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
498
|
-
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
516
|
+
args.customFormData = [{ 'path': this.path }, { 'size': args.fileData.size }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
499
517
|
var uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
|
500
518
|
var ajaxSettings = {
|
501
519
|
url: uploadUrl,
|
@@ -562,8 +580,22 @@ var FileManager = /** @class */ (function (_super) {
|
|
562
580
|
this.uploadDialogObj.hide();
|
563
581
|
}
|
564
582
|
};
|
583
|
+
FileManager.prototype.onChunkUploadComplete = function (files) {
|
584
|
+
if ((this.retryArgs.length !== 0)) {
|
585
|
+
for (var i = 0; i < this.retryArgs.length; i++) {
|
586
|
+
var uploadFile = !isNullOrUndefined(files) ? getValue('file', files).name : '';
|
587
|
+
if (uploadFile === this.retryArgs[i].file.name) {
|
588
|
+
this.retryArgs.splice(i, 1);
|
589
|
+
i = this.retryArgs.length;
|
590
|
+
}
|
591
|
+
}
|
592
|
+
}
|
593
|
+
};
|
565
594
|
/* istanbul ignore next */
|
566
595
|
FileManager.prototype.onUploadSuccess = function (files) {
|
596
|
+
if (this.uploadSettings.chunkSize > 0) {
|
597
|
+
this.onChunkUploadComplete(files);
|
598
|
+
}
|
567
599
|
var args = { action: 'Upload', result: files };
|
568
600
|
this.trigger('success', args);
|
569
601
|
this.itemData = [getValue(this.pathId[this.pathId.length - 1], this.feParent)];
|
@@ -575,6 +607,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
575
607
|
};
|
576
608
|
/* istanbul ignore next */
|
577
609
|
FileManager.prototype.onUploadFailure = function (files) {
|
610
|
+
if (this.uploadSettings.chunkSize > 0) {
|
611
|
+
this.onChunkUploadComplete(files);
|
612
|
+
}
|
578
613
|
var response = getValue('response', files);
|
579
614
|
var statusText = getValue('statusText', response);
|
580
615
|
if (statusText !== '') {
|
@@ -929,6 +929,7 @@ export interface ITreeView extends Component<HTMLElement> {
|
|
929
929
|
rootID: string;
|
930
930
|
activeNode: Element;
|
931
931
|
openFileOnContextMenuClick: Function;
|
932
|
+
previousSelected: string[];
|
932
933
|
}
|
933
934
|
/** @hidden */
|
934
935
|
export interface IContextMenu extends Component<HTMLElement> {
|
@@ -3,7 +3,7 @@ import { isNullOrUndefined as isNOU, setValue, getValue } from '@syncfusion/ej2-
|
|
3
3
|
import * as events from '../base/constant';
|
4
4
|
import { createDialog, createExtDialog } from '../pop-up/dialog';
|
5
5
|
import { fileType, setNodeId, getLocaleText, setDateObject, doPasteUpdate, getPathObject } from '../common/utility';
|
6
|
-
import { generatePath, getAccessDetails } from '../common/utility';
|
6
|
+
import { generatePath, getAccessDetails, getTargetPath } from '../common/utility';
|
7
7
|
import { getUid } from '@syncfusion/ej2-grids';
|
8
8
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9
9
|
/**
|
@@ -188,7 +188,9 @@ function isFileExists(fileSystemData, name) {
|
|
188
188
|
* @private
|
189
189
|
*/
|
190
190
|
function findIndexById(parent, id) {
|
191
|
-
var index = parent.fileSystemData.findIndex(function (item) {
|
191
|
+
var index = parent.fileSystemData.findIndex(function (item) {
|
192
|
+
return !isNOU(item) && String(item.id) === String(id);
|
193
|
+
});
|
192
194
|
return index;
|
193
195
|
}
|
194
196
|
/**
|
@@ -562,9 +564,10 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
562
564
|
if (!beforeSendArgs.cancel) {
|
563
565
|
parent.notify(events.beforeRequest, {});
|
564
566
|
if (isFileSystemData(parent)) {
|
565
|
-
var filePath = event === 'node-expand' || event === 'finalize-end'
|
567
|
+
var filePath = event === 'node-expand' || event === 'finalize-end' || event === 'rename-end-parent'
|
568
|
+
? getValue('path', data) : parent.path;
|
566
569
|
var pathArray = filePath.replace(/^\/|\/$/g, '').split('/');
|
567
|
-
var idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0)
|
570
|
+
var idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0 && isNOU(parent.renamedItem))
|
568
571
|
|| (event === 'paste-end' && (parent.targetModule === 'largeiconsview' || parent.targetModule === 'detailsview'))
|
569
572
|
? getValue('data', data)[0].id : pathArray[pathArray.length - 1];
|
570
573
|
var action = getValue('action', data);
|
@@ -590,7 +593,12 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
590
593
|
else if (isFileOperation && parent.responseData.error === null) {
|
591
594
|
var itemData = action === 'search' || action === 'delete' ? getValue('data', data) : [];
|
592
595
|
if (itemData.length === 0) {
|
593
|
-
|
596
|
+
if (action === 'copy') {
|
597
|
+
itemData = parent.pasteNodes.map(function (item) { return filterById(parent, item); });
|
598
|
+
}
|
599
|
+
else {
|
600
|
+
itemData = getValue('data', data).map(function (item) { return filterById(parent, item.id); });
|
601
|
+
}
|
594
602
|
}
|
595
603
|
parent.responseData = {
|
596
604
|
cwd: null,
|
@@ -605,9 +613,9 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
605
613
|
var isMultipleFiles = itemData.length > 1;
|
606
614
|
var itemNames = itemData.map(function (item) { return item.name; });
|
607
615
|
var totalSize = isMultipleFiles ? getSize(itemData.reduce(function (accumulator, currentObject) { return accumulator + (currentObject.size || 0); }, 0)) : getSize(details.size);
|
608
|
-
var path = (parent.pathNames.includes(details.name) ? parent.pathNames.join('/') : parent.pathNames.join('/') + '/' + details.name);
|
616
|
+
var path = (parent.pathNames.includes(details.name) || isMultipleFiles ? parent.pathNames.join('/') : parent.pathNames.join('/') + '/' + details.name);
|
609
617
|
parent.responseData.details = Object.assign({
|
610
|
-
location:
|
618
|
+
location: path,
|
611
619
|
multipleFiles: isMultipleFiles,
|
612
620
|
name: itemNames.join(', '),
|
613
621
|
size: totalSize
|
@@ -736,6 +744,8 @@ function performReadOperation(parent, result, fn, data, event, operation, target
|
|
736
744
|
if ((getValue('path', data) === '/') || (parent.hasId && getValue('path', data).match(/[/]/g).length === 1)) {
|
737
745
|
if (getValue('names', data).length === 0) {
|
738
746
|
setValue('name', rootName, result.details);
|
747
|
+
}
|
748
|
+
if (location_1.indexOf('\\') === -1) {
|
739
749
|
location_1 = rootName;
|
740
750
|
}
|
741
751
|
else {
|
@@ -950,14 +960,22 @@ function renameSuccess(parent, result) {
|
|
950
960
|
};
|
951
961
|
parent.trigger('rename', renameEventArgs);
|
952
962
|
if (parent.activeModule === 'navigationpane') {
|
963
|
+
var pathObject = getPathObject(parent);
|
964
|
+
var pathLevel = parent.pathId[parent.pathId.length - 1].split('_').length - 2;
|
953
965
|
parent.pathId.pop();
|
954
966
|
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
955
|
-
|
956
|
-
parent.
|
957
|
-
if (
|
958
|
-
parent.pathNames[
|
967
|
+
var renamePath = getTargetPath(parent, parent.renamedItem);
|
968
|
+
read(parent, events.renameEndParent, renamePath);
|
969
|
+
if (!isNOU(pathObject) && parent.pathNames.length > 1 && pathLevel <= parent.pathNames.length - 1) {
|
970
|
+
parent.pathNames[pathLevel] = parent.renameText;
|
971
|
+
if (!parent.hasId) {
|
972
|
+
parent.setProperties({ path: "/" + parent.pathNames.slice(1).join('/') + "/" }, true);
|
973
|
+
}
|
959
974
|
}
|
960
|
-
|
975
|
+
parent.itemData = parent.navigationpaneModule.previousSelected.length > 0
|
976
|
+
? parent.navigationpaneModule.treeObj.getTreeData(parent.navigationpaneModule.previousSelected[0]) : parent.itemData;
|
977
|
+
read(parent, events.pathChanged, parent.path);
|
978
|
+
parent.itemData[0] = parent.renamedItem;
|
961
979
|
parent.renamedItem = null;
|
962
980
|
}
|
963
981
|
else {
|
@@ -110,6 +110,17 @@ export declare function removeBlur(parent?: IFileManager, hover?: string): void;
|
|
110
110
|
* @private
|
111
111
|
*/
|
112
112
|
export declare function getModule(parent: IFileManager, element: Element): void;
|
113
|
+
/**
|
114
|
+
* Get all child items
|
115
|
+
*
|
116
|
+
* @param {IFileManager} parent - specifies the parent element.
|
117
|
+
* @param {string | number} parentId - specifies the parent ID.
|
118
|
+
* @returns {Object[]} An array of child items
|
119
|
+
* @private
|
120
|
+
*/
|
121
|
+
export declare function getAllChildItems(parent: IFileManager, parentId: number | string): {
|
122
|
+
[key: string]: Object;
|
123
|
+
}[];
|
113
124
|
/**
|
114
125
|
* Gets module name
|
115
126
|
*
|
@@ -613,6 +624,15 @@ export declare function uploadItem(parent: IFileManager): void;
|
|
613
624
|
* @private
|
614
625
|
*/
|
615
626
|
export declare function closePopup(parent: IFileManager): void;
|
627
|
+
/**
|
628
|
+
* Get target path from item data.
|
629
|
+
*
|
630
|
+
* @param {IFileManager} parent - specifies the parent.
|
631
|
+
* @param {Object} itemData - specifies the item elements.
|
632
|
+
* @returns {string} returns the path.
|
633
|
+
* @private
|
634
|
+
*/
|
635
|
+
export declare function getTargetPath(parent: IFileManager, itemData: Object): string;
|
616
636
|
/**
|
617
637
|
* Access control handler
|
618
638
|
*
|
@@ -270,6 +270,25 @@ export function getModule(parent, element) {
|
|
270
270
|
}
|
271
271
|
}
|
272
272
|
}
|
273
|
+
/**
|
274
|
+
* Get all child items
|
275
|
+
*
|
276
|
+
* @param {IFileManager} parent - specifies the parent element.
|
277
|
+
* @param {string | number} parentId - specifies the parent ID.
|
278
|
+
* @returns {Object[]} An array of child items
|
279
|
+
* @private
|
280
|
+
*/
|
281
|
+
export function getAllChildItems(parent, parentId) {
|
282
|
+
var children = parent.fileSystemData.filter(function (item) {
|
283
|
+
return String(item.parentId) === String(parentId);
|
284
|
+
});
|
285
|
+
var allChildren = children.slice();
|
286
|
+
children.forEach(function (child) {
|
287
|
+
var childId = child.id;
|
288
|
+
allChildren = allChildren.concat(getAllChildItems(parent, childId));
|
289
|
+
});
|
290
|
+
return allChildren;
|
291
|
+
}
|
273
292
|
/**
|
274
293
|
* Gets module name
|
275
294
|
*
|
@@ -291,7 +310,9 @@ export function searchWordHandler(parent, value, isLayoutChange) {
|
|
291
310
|
}
|
292
311
|
else {
|
293
312
|
parent.searchSettings.filterType = isNOU(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
|
294
|
-
var
|
313
|
+
var currData = getValue(parent.pathId[parent.pathId.length - 1], parent.feParent);
|
314
|
+
var parentId = getValue('id', currData);
|
315
|
+
var filteredData = getAllChildItems(parent, parentId);
|
295
316
|
var data = new DataManager(filteredData).
|
296
317
|
executeLocal(new Query().where('name', parent.searchSettings.filterType, value, parent.searchSettings.ignoreCase));
|
297
318
|
var searchValue = parent.searchSettings.ignoreCase ? value.toLowerCase() : value;
|
@@ -881,7 +902,7 @@ export function pasteHandler(parent) {
|
|
881
902
|
if (parent.selectedNodes.length !== 0 && parent.enablePaste) {
|
882
903
|
var path = (parent.folderPath === '') ? parent.path : parent.folderPath;
|
883
904
|
if (parent.activeModule === 'navigationpane' && !parent.selectedNodes[0].includes('/')) {
|
884
|
-
parent.targetPath =
|
905
|
+
parent.targetPath = getTargetPath(parent, parent.actionRecords[0]);
|
885
906
|
}
|
886
907
|
var subFolder = validateSubFolder(parent, parent.actionRecords, path, parent.path);
|
887
908
|
if (!subFolder) {
|
@@ -1057,6 +1078,7 @@ export function doPasteUpdate(parent, operation, result) {
|
|
1057
1078
|
else {
|
1058
1079
|
parent.isDropEnd = false;
|
1059
1080
|
}
|
1081
|
+
parent.trigger('success', { action: operation, result: result });
|
1060
1082
|
if (!parent.isDragDrop || (parent.path === parent.dragPath) || (parent.path === parent.dropPath)
|
1061
1083
|
|| parent.isSearchDrag) {
|
1062
1084
|
parent.isPathDrag = false;
|
@@ -1065,7 +1087,6 @@ export function doPasteUpdate(parent, operation, result) {
|
|
1065
1087
|
else {
|
1066
1088
|
readDropPath(parent);
|
1067
1089
|
}
|
1068
|
-
parent.trigger('success', { action: operation, result: result });
|
1069
1090
|
}
|
1070
1091
|
/**
|
1071
1092
|
* Reads the drop path
|
@@ -1622,6 +1643,22 @@ export function closePopup(parent) {
|
|
1622
1643
|
parent.dialogObj.hide();
|
1623
1644
|
}
|
1624
1645
|
}
|
1646
|
+
/**
|
1647
|
+
* Get target path from item data.
|
1648
|
+
*
|
1649
|
+
* @param {IFileManager} parent - specifies the parent.
|
1650
|
+
* @param {Object} itemData - specifies the item elements.
|
1651
|
+
* @returns {string} returns the path.
|
1652
|
+
* @private
|
1653
|
+
*/
|
1654
|
+
export function getTargetPath(parent, itemData) {
|
1655
|
+
if (parent.hasId && !isNOU(getValue('filterId', itemData))) {
|
1656
|
+
return getValue('filterId', itemData).replace(/\\/g, '/').replace(/^[^/]+\//, '/');
|
1657
|
+
}
|
1658
|
+
else {
|
1659
|
+
return getValue('filterPath', itemData).replace(/\\/g, '/');
|
1660
|
+
}
|
1661
|
+
}
|
1625
1662
|
/**
|
1626
1663
|
* Access control handler
|
1627
1664
|
*
|
@@ -88,6 +88,16 @@ var DetailsView = /** @class */ (function () {
|
|
88
88
|
/* istanbul ignore next */
|
89
89
|
DetailsView.prototype.render = function (args) {
|
90
90
|
var _this = this;
|
91
|
+
if (this.parent.enablePersistence) {
|
92
|
+
var gridPersistenceValue = window.localStorage.getItem('grid' + this.parent.element.id + '_grid');
|
93
|
+
if (!isNOU(gridPersistenceValue)) {
|
94
|
+
var model = JSON.parse(gridPersistenceValue);
|
95
|
+
if (!isNOU(model) && Object.keys(model).length > 0 && 'sortSettings' in model) {
|
96
|
+
delete model.sortSettings;
|
97
|
+
window.localStorage.setItem('grid' + this.parent.element.id + '_grid', JSON.stringify(model));
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
91
101
|
showSpinner(this.parent.element);
|
92
102
|
if (this.parent.view === 'Details') {
|
93
103
|
removeClass([this.parent.element], CLS.MULTI_SELECT);
|
@@ -412,7 +412,7 @@ var LargeIconsView = /** @class */ (function () {
|
|
412
412
|
removeBlur(this.parent);
|
413
413
|
this.parent.setProperties({ selectedItems: [] }, true);
|
414
414
|
this.onLayoutChange(args);
|
415
|
-
if (this.parent.renamedItem) {
|
415
|
+
if (this.parent.renamedItem && this.parent.activeModule === 'largeiconsview') {
|
416
416
|
this.clearSelect();
|
417
417
|
this.addSelection(this.parent.renamedItem);
|
418
418
|
}
|
@@ -766,31 +766,33 @@ var LargeIconsView = /** @class */ (function () {
|
|
766
766
|
* @hidden
|
767
767
|
*/
|
768
768
|
LargeIconsView.prototype.doSelection = function (target, e) {
|
769
|
+
var ctrlKey = this.parent.isMac ? e.metaKey : e.ctrlKey;
|
770
|
+
var isMacRightClick = this.parent.isMac && e.ctrlKey && e.shiftKey;
|
769
771
|
var item = closest(target, '.' + CLS.LIST_ITEM);
|
770
772
|
var cList = target.classList;
|
771
773
|
this.parent.isFile = false;
|
772
774
|
var action = 'select';
|
773
|
-
if (e.which === 3 && !isNOU(item) && item.classList.contains(CLS.ACTIVE)) {
|
775
|
+
if ((e.which === 3 || isMacRightClick) && !isNOU(item) && item.classList.contains(CLS.ACTIVE)) {
|
774
776
|
this.addActive(item);
|
775
777
|
this.updateType(item);
|
776
778
|
return;
|
777
779
|
}
|
778
780
|
else if (!isNOU(item)) {
|
779
781
|
if (this.parent.allowMultiSelection && item.classList.contains(CLS.ACTIVE)
|
780
|
-
&& (
|
782
|
+
&& (ctrlKey || target.classList.contains(CLS.CHECK))) {
|
781
783
|
action = 'unselect';
|
782
784
|
}
|
783
|
-
if (e.ctrlKey && e.shiftKey) {
|
785
|
+
if (e.ctrlKey && e.shiftKey && !isMacRightClick) {
|
784
786
|
this.isSelectAllCalled = true;
|
785
787
|
}
|
786
788
|
var fileSelectionArgs = this.triggerSelection(action, item);
|
787
789
|
if (fileSelectionArgs.cancel !== true) {
|
788
|
-
if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !
|
790
|
+
if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !ctrlKey)))
|
789
791
|
&& !cList.contains(CLS.FRAME)) {
|
790
792
|
this.updateType(item);
|
791
793
|
this.clearSelect();
|
792
794
|
}
|
793
|
-
if (this.parent.allowMultiSelection && e.shiftKey) {
|
795
|
+
if (this.parent.allowMultiSelection && e.shiftKey && !isMacRightClick) {
|
794
796
|
if (!(e && e.ctrlKey)) {
|
795
797
|
this.clearSelect();
|
796
798
|
}
|
@@ -14,6 +14,7 @@ export declare class NavigationPane {
|
|
14
14
|
removeNodes: string[];
|
15
15
|
moveNames: string[];
|
16
16
|
touchClickObj: Touch;
|
17
|
+
previousSelected: string[];
|
17
18
|
private expandTree;
|
18
19
|
private isDrag;
|
19
20
|
private dragObj;
|
@@ -23,7 +24,6 @@ export declare class NavigationPane {
|
|
23
24
|
private isSameNodeClicked;
|
24
25
|
private isNodeExpandCalled;
|
25
26
|
private renameParent;
|
26
|
-
private previousSelected;
|
27
27
|
private isNodeClickCalled;
|
28
28
|
private restrictSelecting;
|
29
29
|
/**
|
@@ -24,6 +24,8 @@ var NavigationPane = /** @class */ (function () {
|
|
24
24
|
function NavigationPane(parent) {
|
25
25
|
this.removeNodes = [];
|
26
26
|
this.moveNames = [];
|
27
|
+
// Specifies the previously selected nodes in the treeview control.
|
28
|
+
this.previousSelected = [];
|
27
29
|
this.expandTree = false;
|
28
30
|
this.isDrag = false;
|
29
31
|
this.isPathDragged = false;
|
@@ -32,8 +34,6 @@ var NavigationPane = /** @class */ (function () {
|
|
32
34
|
this.isSameNodeClicked = false;
|
33
35
|
this.isNodeExpandCalled = false;
|
34
36
|
this.renameParent = null;
|
35
|
-
// Specifies the previously selected nodes in the treeview control.
|
36
|
-
this.previousSelected = null;
|
37
37
|
// Specifies whether the nodeClicked event of the treeview control is triggered or not.
|
38
38
|
this.isNodeClickCalled = false;
|
39
39
|
// Specifies whether to restrict node selection in the treeview control.
|
@@ -454,9 +454,11 @@ var NavigationPane = /** @class */ (function () {
|
|
454
454
|
}
|
455
455
|
}
|
456
456
|
if (resultData.length > 0) {
|
457
|
-
var id_1 =
|
457
|
+
var id_1 = this.previousSelected.length > 0 && this.treeObj.getTreeData(this.previousSelected[0]).length !== 0
|
458
|
+
? this.previousSelected[0] : getValue(this.treeObj.fields.id, resultData[0]);
|
458
459
|
this.treeObj.selectedNodes = [id_1];
|
459
460
|
this.treeObj.dataBind();
|
461
|
+
this.updateItemData();
|
460
462
|
}
|
461
463
|
}
|
462
464
|
};
|
@@ -855,6 +857,8 @@ var NavigationPane = /** @class */ (function () {
|
|
855
857
|
};
|
856
858
|
NavigationPane.prototype.updateActionData = function () {
|
857
859
|
this.updateItemData();
|
860
|
+
var node = select('[data-uid="' + this.parent.pathId[this.parent.pathId.length - 1] + '"]', this.treeObj.element);
|
861
|
+
updatePath(node, this.parent.itemData[0], this.parent);
|
858
862
|
var newPath = getParentPath(this.parent.path);
|
859
863
|
this.parent.setProperties({ path: newPath }, true);
|
860
864
|
this.parent.pathId.pop();
|
@@ -58,4 +58,13 @@ export interface UploadSettingsModel {
|
|
58
58
|
*/
|
59
59
|
maxFileSize?: number;
|
60
60
|
|
61
|
+
/**
|
62
|
+
* Specifies the chunk size to split the large file into chunks, and upload it to the server in a sequential order.
|
63
|
+
* If the chunk size property has value, the FileManager enables the chunk upload by default.
|
64
|
+
* It must be specified in bytes value.
|
65
|
+
*
|
66
|
+
* @default 0
|
67
|
+
*/
|
68
|
+
chunkSize?: number;
|
69
|
+
|
61
70
|
}
|
@@ -50,4 +50,12 @@ export declare class UploadSettings extends ChildProperty<UploadSettings> {
|
|
50
50
|
* @default 30000000
|
51
51
|
*/
|
52
52
|
maxFileSize: number;
|
53
|
+
/**
|
54
|
+
* Specifies the chunk size to split the large file into chunks, and upload it to the server in a sequential order.
|
55
|
+
* If the chunk size property has value, the FileManager enables the chunk upload by default.
|
56
|
+
* It must be specified in bytes value.
|
57
|
+
*
|
58
|
+
* @default 0
|
59
|
+
*/
|
60
|
+
chunkSize: number;
|
53
61
|
}
|
@@ -44,6 +44,9 @@ var UploadSettings = /** @class */ (function (_super) {
|
|
44
44
|
__decorate([
|
45
45
|
Property(30000000)
|
46
46
|
], UploadSettings.prototype, "maxFileSize", void 0);
|
47
|
+
__decorate([
|
48
|
+
Property(0)
|
49
|
+
], UploadSettings.prototype, "chunkSize", void 0);
|
47
50
|
return UploadSettings;
|
48
51
|
}(ChildProperty));
|
49
52
|
export { UploadSettings };
|
@@ -154,7 +154,7 @@ var ContextMenu = /** @class */ (function () {
|
|
154
154
|
else if (closest(target, '#' + this.parent.element.id + CLS.TREE_ID)) {
|
155
155
|
uid = closest(target, 'li').getAttribute('data-uid');
|
156
156
|
if (!isNOU(uid)) {
|
157
|
-
this.
|
157
|
+
this.navUid = uid;
|
158
158
|
}
|
159
159
|
treeFolder = true;
|
160
160
|
}
|
@@ -290,8 +290,9 @@ var ContextMenu = /** @class */ (function () {
|
|
290
290
|
this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.folder.map(function (item) { return item.trim(); }));
|
291
291
|
this.contextMenu.dataBind();
|
292
292
|
if (isTree) {
|
293
|
-
var selectedTreeNode = select('[data-uid="' + this.
|
294
|
-
if (
|
293
|
+
var selectedTreeNode = select('[data-uid="' + this.navUid + '"]', this.parent.navigationpaneModule.treeObj.element);
|
294
|
+
if (!isNOU(selectedTreeNode) &&
|
295
|
+
this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
|
295
296
|
this.disabledItems.push('Open');
|
296
297
|
}
|
297
298
|
else {
|
@@ -5,7 +5,7 @@ import { createFolder } from '../common/operations';
|
|
5
5
|
import * as CLS from '../base/classes';
|
6
6
|
import * as events from '../base/constant';
|
7
7
|
import { paste, rename } from '../common/operations';
|
8
|
-
import { getLocaleText, getDuplicateData, objectToString, getCssClass } from '../common/utility';
|
8
|
+
import { getLocaleText, getDuplicateData, objectToString, getCssClass, getTargetPath } from '../common/utility';
|
9
9
|
import { Input } from '@syncfusion/ej2-inputs';
|
10
10
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
11
11
|
/**
|
@@ -812,7 +812,13 @@ function onReSubmit(parent) {
|
|
812
812
|
parent.dialogObj.hide();
|
813
813
|
return;
|
814
814
|
}
|
815
|
-
var newPath =
|
815
|
+
var newPath = '';
|
816
|
+
if (parent.activeModule === 'navigationpane') {
|
817
|
+
newPath = getTargetPath(parent, parent.itemData[0]);
|
818
|
+
}
|
819
|
+
else {
|
820
|
+
newPath = parent.path;
|
821
|
+
}
|
816
822
|
parent.renamedId = getValue('id', parent.itemData[0]);
|
817
823
|
if (parent.isFile) {
|
818
824
|
var oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);
|