@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
@@ -254,6 +254,9 @@ __decorate$6([
|
|
254
254
|
__decorate$6([
|
255
255
|
Property(30000000)
|
256
256
|
], UploadSettings.prototype, "maxFileSize", void 0);
|
257
|
+
__decorate$6([
|
258
|
+
Property(0)
|
259
|
+
], UploadSettings.prototype, "chunkSize", void 0);
|
257
260
|
|
258
261
|
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
259
262
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -949,6 +952,23 @@ function getModule(parent, element) {
|
|
949
952
|
}
|
950
953
|
}
|
951
954
|
}
|
955
|
+
/**
|
956
|
+
* Get all child items
|
957
|
+
*
|
958
|
+
* @param {IFileManager} parent - specifies the parent element.
|
959
|
+
* @param {string | number} parentId - specifies the parent ID.
|
960
|
+
* @returns {Object[]} An array of child items
|
961
|
+
* @private
|
962
|
+
*/
|
963
|
+
function getAllChildItems(parent, parentId) {
|
964
|
+
const children = parent.fileSystemData.filter((item) => String(item.parentId) === String(parentId));
|
965
|
+
let allChildren = [...children];
|
966
|
+
children.forEach((child) => {
|
967
|
+
const childId = child.id;
|
968
|
+
allChildren = allChildren.concat(getAllChildItems(parent, childId));
|
969
|
+
});
|
970
|
+
return allChildren;
|
971
|
+
}
|
952
972
|
/**
|
953
973
|
* Gets module name
|
954
974
|
*
|
@@ -970,7 +990,9 @@ function searchWordHandler(parent, value, isLayoutChange) {
|
|
970
990
|
}
|
971
991
|
else {
|
972
992
|
parent.searchSettings.filterType = isNullOrUndefined(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
|
973
|
-
const
|
993
|
+
const currData = getValue(parent.pathId[parent.pathId.length - 1], parent.feParent);
|
994
|
+
const parentId = getValue('id', currData);
|
995
|
+
const filteredData = getAllChildItems(parent, parentId);
|
974
996
|
const data = new DataManager(filteredData).
|
975
997
|
executeLocal(new Query().where('name', parent.searchSettings.filterType, value, parent.searchSettings.ignoreCase));
|
976
998
|
const searchValue = parent.searchSettings.ignoreCase ? value.toLowerCase() : value;
|
@@ -1560,7 +1582,7 @@ function pasteHandler(parent) {
|
|
1560
1582
|
if (parent.selectedNodes.length !== 0 && parent.enablePaste) {
|
1561
1583
|
const path = (parent.folderPath === '') ? parent.path : parent.folderPath;
|
1562
1584
|
if (parent.activeModule === 'navigationpane' && !parent.selectedNodes[0].includes('/')) {
|
1563
|
-
parent.targetPath =
|
1585
|
+
parent.targetPath = getTargetPath(parent, parent.actionRecords[0]);
|
1564
1586
|
}
|
1565
1587
|
const subFolder = validateSubFolder(parent, parent.actionRecords, path, parent.path);
|
1566
1588
|
if (!subFolder) {
|
@@ -1736,6 +1758,7 @@ function doPasteUpdate(parent, operation, result) {
|
|
1736
1758
|
else {
|
1737
1759
|
parent.isDropEnd = false;
|
1738
1760
|
}
|
1761
|
+
parent.trigger('success', { action: operation, result: result });
|
1739
1762
|
if (!parent.isDragDrop || (parent.path === parent.dragPath) || (parent.path === parent.dropPath)
|
1740
1763
|
|| parent.isSearchDrag) {
|
1741
1764
|
parent.isPathDrag = false;
|
@@ -1744,7 +1767,6 @@ function doPasteUpdate(parent, operation, result) {
|
|
1744
1767
|
else {
|
1745
1768
|
readDropPath(parent);
|
1746
1769
|
}
|
1747
|
-
parent.trigger('success', { action: operation, result: result });
|
1748
1770
|
}
|
1749
1771
|
/**
|
1750
1772
|
* Reads the drop path
|
@@ -2301,6 +2323,22 @@ function closePopup(parent) {
|
|
2301
2323
|
parent.dialogObj.hide();
|
2302
2324
|
}
|
2303
2325
|
}
|
2326
|
+
/**
|
2327
|
+
* Get target path from item data.
|
2328
|
+
*
|
2329
|
+
* @param {IFileManager} parent - specifies the parent.
|
2330
|
+
* @param {Object} itemData - specifies the item elements.
|
2331
|
+
* @returns {string} returns the path.
|
2332
|
+
* @private
|
2333
|
+
*/
|
2334
|
+
function getTargetPath(parent, itemData) {
|
2335
|
+
if (parent.hasId && !isNullOrUndefined(getValue('filterId', itemData))) {
|
2336
|
+
return getValue('filterId', itemData).replace(/\\/g, '/').replace(/^[^/]+\//, '/');
|
2337
|
+
}
|
2338
|
+
else {
|
2339
|
+
return getValue('filterPath', itemData).replace(/\\/g, '/');
|
2340
|
+
}
|
2341
|
+
}
|
2304
2342
|
/**
|
2305
2343
|
* Access control handler
|
2306
2344
|
*
|
@@ -2535,7 +2573,7 @@ function isFileExists(fileSystemData, name) {
|
|
2535
2573
|
* @private
|
2536
2574
|
*/
|
2537
2575
|
function findIndexById(parent, id) {
|
2538
|
-
const index = parent.fileSystemData.findIndex((item) => String(item.id) === String(id));
|
2576
|
+
const index = parent.fileSystemData.findIndex((item) => !isNullOrUndefined(item) && String(item.id) === String(id));
|
2539
2577
|
return index;
|
2540
2578
|
}
|
2541
2579
|
/**
|
@@ -2909,9 +2947,10 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
2909
2947
|
if (!beforeSendArgs.cancel) {
|
2910
2948
|
parent.notify(beforeRequest, {});
|
2911
2949
|
if (isFileSystemData(parent)) {
|
2912
|
-
const filePath = event === 'node-expand' || event === 'finalize-end'
|
2950
|
+
const filePath = event === 'node-expand' || event === 'finalize-end' || event === 'rename-end-parent'
|
2951
|
+
? getValue('path', data) : parent.path;
|
2913
2952
|
const pathArray = filePath.replace(/^\/|\/$/g, '').split('/');
|
2914
|
-
const idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0)
|
2953
|
+
const idValue = event === 'rename-end-parent' || (event === 'path-changed' && getValue('data', data).length !== 0 && isNullOrUndefined(parent.renamedItem))
|
2915
2954
|
|| (event === 'paste-end' && (parent.targetModule === 'largeiconsview' || parent.targetModule === 'detailsview'))
|
2916
2955
|
? getValue('data', data)[0].id : pathArray[pathArray.length - 1];
|
2917
2956
|
const action = getValue('action', data);
|
@@ -2937,7 +2976,12 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
2937
2976
|
else if (isFileOperation && parent.responseData.error === null) {
|
2938
2977
|
let itemData = action === 'search' || action === 'delete' ? getValue('data', data) : [];
|
2939
2978
|
if (itemData.length === 0) {
|
2940
|
-
|
2979
|
+
if (action === 'copy') {
|
2980
|
+
itemData = parent.pasteNodes.map((item) => filterById(parent, item));
|
2981
|
+
}
|
2982
|
+
else {
|
2983
|
+
itemData = getValue('data', data).map((item) => filterById(parent, item.id));
|
2984
|
+
}
|
2941
2985
|
}
|
2942
2986
|
parent.responseData = {
|
2943
2987
|
cwd: null,
|
@@ -2952,9 +2996,9 @@ function createAjax(parent, data, fn, event, operation, targetPath) {
|
|
2952
2996
|
const isMultipleFiles = itemData.length > 1;
|
2953
2997
|
const itemNames = itemData.map((item) => item.name);
|
2954
2998
|
const totalSize = isMultipleFiles ? getSize(itemData.reduce((accumulator, currentObject) => accumulator + (currentObject.size || 0), 0)) : getSize(details.size);
|
2955
|
-
const path = (parent.pathNames.includes(details.name) ? parent.pathNames.join('/') : parent.pathNames.join('/') + '/' + details.name);
|
2999
|
+
const path = (parent.pathNames.includes(details.name) || isMultipleFiles ? parent.pathNames.join('/') : parent.pathNames.join('/') + '/' + details.name);
|
2956
3000
|
parent.responseData.details = Object.assign({
|
2957
|
-
location:
|
3001
|
+
location: path,
|
2958
3002
|
multipleFiles: isMultipleFiles,
|
2959
3003
|
name: itemNames.join(', '),
|
2960
3004
|
size: totalSize
|
@@ -3083,6 +3127,8 @@ function performReadOperation(parent, result, fn, data, event, operation, target
|
|
3083
3127
|
if ((getValue('path', data) === '/') || (parent.hasId && getValue('path', data).match(/[/]/g).length === 1)) {
|
3084
3128
|
if (getValue('names', data).length === 0) {
|
3085
3129
|
setValue('name', rootName, result.details);
|
3130
|
+
}
|
3131
|
+
if (location.indexOf('\\') === -1) {
|
3086
3132
|
location = rootName;
|
3087
3133
|
}
|
3088
3134
|
else {
|
@@ -3297,14 +3343,22 @@ function renameSuccess(parent, result) {
|
|
3297
3343
|
};
|
3298
3344
|
parent.trigger('rename', renameEventArgs);
|
3299
3345
|
if (parent.activeModule === 'navigationpane') {
|
3346
|
+
const pathObject = getPathObject(parent);
|
3347
|
+
const pathLevel = parent.pathId[parent.pathId.length - 1].split('_').length - 2;
|
3300
3348
|
parent.pathId.pop();
|
3301
3349
|
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
3302
|
-
|
3303
|
-
parent
|
3304
|
-
if (
|
3305
|
-
parent.pathNames[
|
3350
|
+
const renamePath = getTargetPath(parent, parent.renamedItem);
|
3351
|
+
read(parent, renameEndParent, renamePath);
|
3352
|
+
if (!isNullOrUndefined(pathObject) && parent.pathNames.length > 1 && pathLevel <= parent.pathNames.length - 1) {
|
3353
|
+
parent.pathNames[pathLevel] = parent.renameText;
|
3354
|
+
if (!parent.hasId) {
|
3355
|
+
parent.setProperties({ path: `/${parent.pathNames.slice(1).join('/')}/` }, true);
|
3356
|
+
}
|
3306
3357
|
}
|
3307
|
-
|
3358
|
+
parent.itemData = parent.navigationpaneModule.previousSelected.length > 0
|
3359
|
+
? parent.navigationpaneModule.treeObj.getTreeData(parent.navigationpaneModule.previousSelected[0]) : parent.itemData;
|
3360
|
+
read(parent, pathChanged, parent.path);
|
3361
|
+
parent.itemData[0] = parent.renamedItem;
|
3308
3362
|
parent.renamedItem = null;
|
3309
3363
|
}
|
3310
3364
|
else {
|
@@ -4429,7 +4483,13 @@ function onReSubmit(parent) {
|
|
4429
4483
|
parent.dialogObj.hide();
|
4430
4484
|
return;
|
4431
4485
|
}
|
4432
|
-
|
4486
|
+
let newPath = '';
|
4487
|
+
if (parent.activeModule === 'navigationpane') {
|
4488
|
+
newPath = getTargetPath(parent, parent.itemData[0]);
|
4489
|
+
}
|
4490
|
+
else {
|
4491
|
+
newPath = parent.path;
|
4492
|
+
}
|
4433
4493
|
parent.renamedId = getValue('id', parent.itemData[0]);
|
4434
4494
|
if (parent.isFile) {
|
4435
4495
|
const oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);
|
@@ -5005,7 +5065,7 @@ class LargeIconsView {
|
|
5005
5065
|
removeBlur(this.parent);
|
5006
5066
|
this.parent.setProperties({ selectedItems: [] }, true);
|
5007
5067
|
this.onLayoutChange(args);
|
5008
|
-
if (this.parent.renamedItem) {
|
5068
|
+
if (this.parent.renamedItem && this.parent.activeModule === 'largeiconsview') {
|
5009
5069
|
this.clearSelect();
|
5010
5070
|
this.addSelection(this.parent.renamedItem);
|
5011
5071
|
}
|
@@ -5357,31 +5417,33 @@ class LargeIconsView {
|
|
5357
5417
|
* @hidden
|
5358
5418
|
*/
|
5359
5419
|
doSelection(target, e) {
|
5420
|
+
const ctrlKey = this.parent.isMac ? e.metaKey : e.ctrlKey;
|
5421
|
+
const isMacRightClick = this.parent.isMac && e.ctrlKey && e.shiftKey;
|
5360
5422
|
const item = closest(target, '.' + LIST_ITEM);
|
5361
5423
|
const cList = target.classList;
|
5362
5424
|
this.parent.isFile = false;
|
5363
5425
|
let action = 'select';
|
5364
|
-
if (e.which === 3 && !isNullOrUndefined(item) && item.classList.contains(ACTIVE)) {
|
5426
|
+
if ((e.which === 3 || isMacRightClick) && !isNullOrUndefined(item) && item.classList.contains(ACTIVE)) {
|
5365
5427
|
this.addActive(item);
|
5366
5428
|
this.updateType(item);
|
5367
5429
|
return;
|
5368
5430
|
}
|
5369
5431
|
else if (!isNullOrUndefined(item)) {
|
5370
5432
|
if (this.parent.allowMultiSelection && item.classList.contains(ACTIVE)
|
5371
|
-
&& (
|
5433
|
+
&& (ctrlKey || target.classList.contains(CHECK))) {
|
5372
5434
|
action = 'unselect';
|
5373
5435
|
}
|
5374
|
-
if (e.ctrlKey && e.shiftKey) {
|
5436
|
+
if (e.ctrlKey && e.shiftKey && !isMacRightClick) {
|
5375
5437
|
this.isSelectAllCalled = true;
|
5376
5438
|
}
|
5377
5439
|
const fileSelectionArgs = this.triggerSelection(action, item);
|
5378
5440
|
if (fileSelectionArgs.cancel !== true) {
|
5379
|
-
if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !
|
5441
|
+
if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !ctrlKey)))
|
5380
5442
|
&& !cList.contains(FRAME)) {
|
5381
5443
|
this.updateType(item);
|
5382
5444
|
this.clearSelect();
|
5383
5445
|
}
|
5384
|
-
if (this.parent.allowMultiSelection && e.shiftKey) {
|
5446
|
+
if (this.parent.allowMultiSelection && e.shiftKey && !isMacRightClick) {
|
5385
5447
|
if (!(e && e.ctrlKey)) {
|
5386
5448
|
this.clearSelect();
|
5387
5449
|
}
|
@@ -6730,7 +6792,7 @@ class ContextMenu {
|
|
6730
6792
|
else if (closest(target, '#' + this.parent.element.id + TREE_ID)) {
|
6731
6793
|
uid = closest(target, 'li').getAttribute('data-uid');
|
6732
6794
|
if (!isNullOrUndefined(uid)) {
|
6733
|
-
this.
|
6795
|
+
this.navUid = uid;
|
6734
6796
|
}
|
6735
6797
|
treeFolder = true;
|
6736
6798
|
}
|
@@ -6866,8 +6928,9 @@ class ContextMenu {
|
|
6866
6928
|
this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.folder.map((item) => item.trim()));
|
6867
6929
|
this.contextMenu.dataBind();
|
6868
6930
|
if (isTree) {
|
6869
|
-
const selectedTreeNode = select('[data-uid="' + this.
|
6870
|
-
if (
|
6931
|
+
const selectedTreeNode = select('[data-uid="' + this.navUid + '"]', this.parent.navigationpaneModule.treeObj.element);
|
6932
|
+
if (!isNullOrUndefined(selectedTreeNode) &&
|
6933
|
+
this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
|
6871
6934
|
this.disabledItems.push('Open');
|
6872
6935
|
}
|
6873
6936
|
else {
|
@@ -7736,11 +7799,14 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7736
7799
|
dropArea: select('#' + this.element.id + CONTENT_ID, this.element),
|
7737
7800
|
asyncSettings: {
|
7738
7801
|
saveUrl: uploadUrl,
|
7739
|
-
removeUrl: uploadUrl
|
7802
|
+
removeUrl: uploadUrl,
|
7803
|
+
chunkSize: this.uploadSettings.chunkSize,
|
7804
|
+
retryCount: 0
|
7740
7805
|
},
|
7741
7806
|
locale: this.locale,
|
7742
7807
|
enableRtl: this.enableRtl,
|
7743
7808
|
uploading: this.onUploading.bind(this),
|
7809
|
+
chunkUploading: this.onChunkUploading.bind(this),
|
7744
7810
|
removing: this.onRemoving.bind(this),
|
7745
7811
|
canceling: this.onCancel.bind(this),
|
7746
7812
|
clearing: this.onClearing.bind(this),
|
@@ -7802,19 +7868,34 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7802
7868
|
this.trigger('popupClose', args);
|
7803
7869
|
}
|
7804
7870
|
/* istanbul ignore next */
|
7871
|
+
onChunkUploading(args) {
|
7872
|
+
let action = 'save';
|
7873
|
+
if ((this.retryArgs.length !== 0)) {
|
7874
|
+
for (let i = 0; i < this.retryArgs.length; i++) {
|
7875
|
+
if (args.fileData.name === this.retryArgs[i].file.name) {
|
7876
|
+
action = this.retryArgs[i].action;
|
7877
|
+
}
|
7878
|
+
}
|
7879
|
+
}
|
7880
|
+
const data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
7881
|
+
args.customFormData = [{ 'path': this.path }, { 'size': args.fileData.size }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
7882
|
+
}
|
7883
|
+
/* istanbul ignore next */
|
7805
7884
|
onUploading(args) {
|
7806
7885
|
let action = 'save';
|
7807
7886
|
if ((this.retryArgs.length !== 0)) {
|
7808
7887
|
for (let i = 0; i < this.retryArgs.length; i++) {
|
7809
7888
|
if (args.fileData.name === this.retryArgs[i].file.name) {
|
7810
7889
|
action = this.retryArgs[i].action;
|
7811
|
-
this.
|
7812
|
-
|
7890
|
+
if (this.uploadSettings.chunkSize === 0) {
|
7891
|
+
this.retryArgs.splice(i, 1);
|
7892
|
+
i = this.retryArgs.length;
|
7893
|
+
}
|
7813
7894
|
}
|
7814
7895
|
}
|
7815
7896
|
}
|
7816
7897
|
const data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
7817
|
-
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
7898
|
+
args.customFormData = [{ 'path': this.path }, { 'size': args.fileData.size }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
7818
7899
|
const uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
|
7819
7900
|
const ajaxSettings = {
|
7820
7901
|
url: uploadUrl,
|
@@ -7881,8 +7962,22 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7881
7962
|
this.uploadDialogObj.hide();
|
7882
7963
|
}
|
7883
7964
|
}
|
7965
|
+
onChunkUploadComplete(files) {
|
7966
|
+
if ((this.retryArgs.length !== 0)) {
|
7967
|
+
for (let i = 0; i < this.retryArgs.length; i++) {
|
7968
|
+
const uploadFile = !isNullOrUndefined(files) ? getValue('file', files).name : '';
|
7969
|
+
if (uploadFile === this.retryArgs[i].file.name) {
|
7970
|
+
this.retryArgs.splice(i, 1);
|
7971
|
+
i = this.retryArgs.length;
|
7972
|
+
}
|
7973
|
+
}
|
7974
|
+
}
|
7975
|
+
}
|
7884
7976
|
/* istanbul ignore next */
|
7885
7977
|
onUploadSuccess(files) {
|
7978
|
+
if (this.uploadSettings.chunkSize > 0) {
|
7979
|
+
this.onChunkUploadComplete(files);
|
7980
|
+
}
|
7886
7981
|
const args = { action: 'Upload', result: files };
|
7887
7982
|
this.trigger('success', args);
|
7888
7983
|
this.itemData = [getValue(this.pathId[this.pathId.length - 1], this.feParent)];
|
@@ -7894,6 +7989,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7894
7989
|
}
|
7895
7990
|
/* istanbul ignore next */
|
7896
7991
|
onUploadFailure(files) {
|
7992
|
+
if (this.uploadSettings.chunkSize > 0) {
|
7993
|
+
this.onChunkUploadComplete(files);
|
7994
|
+
}
|
7897
7995
|
const response = getValue('response', files);
|
7898
7996
|
const statusText = getValue('statusText', response);
|
7899
7997
|
if (statusText !== '') {
|
@@ -9704,6 +9802,8 @@ class NavigationPane {
|
|
9704
9802
|
constructor(parent) {
|
9705
9803
|
this.removeNodes = [];
|
9706
9804
|
this.moveNames = [];
|
9805
|
+
// Specifies the previously selected nodes in the treeview control.
|
9806
|
+
this.previousSelected = [];
|
9707
9807
|
this.expandTree = false;
|
9708
9808
|
this.isDrag = false;
|
9709
9809
|
this.isPathDragged = false;
|
@@ -9712,8 +9812,6 @@ class NavigationPane {
|
|
9712
9812
|
this.isSameNodeClicked = false;
|
9713
9813
|
this.isNodeExpandCalled = false;
|
9714
9814
|
this.renameParent = null;
|
9715
|
-
// Specifies the previously selected nodes in the treeview control.
|
9716
|
-
this.previousSelected = null;
|
9717
9815
|
// Specifies whether the nodeClicked event of the treeview control is triggered or not.
|
9718
9816
|
this.isNodeClickCalled = false;
|
9719
9817
|
// Specifies whether to restrict node selection in the treeview control.
|
@@ -10133,9 +10231,11 @@ class NavigationPane {
|
|
10133
10231
|
}
|
10134
10232
|
}
|
10135
10233
|
if (resultData.length > 0) {
|
10136
|
-
const id =
|
10234
|
+
const id = this.previousSelected.length > 0 && this.treeObj.getTreeData(this.previousSelected[0]).length !== 0
|
10235
|
+
? this.previousSelected[0] : getValue(this.treeObj.fields.id, resultData[0]);
|
10137
10236
|
this.treeObj.selectedNodes = [id];
|
10138
10237
|
this.treeObj.dataBind();
|
10238
|
+
this.updateItemData();
|
10139
10239
|
}
|
10140
10240
|
}
|
10141
10241
|
}
|
@@ -10533,6 +10633,8 @@ class NavigationPane {
|
|
10533
10633
|
}
|
10534
10634
|
updateActionData() {
|
10535
10635
|
this.updateItemData();
|
10636
|
+
const node = select('[data-uid="' + this.parent.pathId[this.parent.pathId.length - 1] + '"]', this.treeObj.element);
|
10637
|
+
updatePath(node, this.parent.itemData[0], this.parent);
|
10536
10638
|
const newPath = getParentPath(this.parent.path);
|
10537
10639
|
this.parent.setProperties({ path: newPath }, true);
|
10538
10640
|
this.parent.pathId.pop();
|
@@ -10620,6 +10722,16 @@ class DetailsView {
|
|
10620
10722
|
}
|
10621
10723
|
/* istanbul ignore next */
|
10622
10724
|
render(args) {
|
10725
|
+
if (this.parent.enablePersistence) {
|
10726
|
+
const gridPersistenceValue = window.localStorage.getItem('grid' + this.parent.element.id + '_grid');
|
10727
|
+
if (!isNullOrUndefined(gridPersistenceValue)) {
|
10728
|
+
const model = JSON.parse(gridPersistenceValue);
|
10729
|
+
if (!isNullOrUndefined(model) && Object.keys(model).length > 0 && 'sortSettings' in model) {
|
10730
|
+
delete model.sortSettings;
|
10731
|
+
window.localStorage.setItem('grid' + this.parent.element.id + '_grid', JSON.stringify(model));
|
10732
|
+
}
|
10733
|
+
}
|
10734
|
+
}
|
10623
10735
|
showSpinner(this.parent.element);
|
10624
10736
|
if (this.parent.view === 'Details') {
|
10625
10737
|
removeClass([this.parent.element], MULTI_SELECT);
|
@@ -12482,5 +12594,5 @@ class DetailsView {
|
|
12482
12594
|
}
|
12483
12595
|
}
|
12484
12596
|
|
12485
|
-
export { ACTIVE, ALT_DIALOG_ID, AjaxSettings, BLUR, BREADCRUMBBAR_ID, BREADCRUMBS, BreadCrumbBar, CB_WRAP, CHECK, CHECK_SELECT, CLONE, COLLAPSED, CONTENT_ID, CONTEXT_MENU_ID, CONTROL, Column, ContextMenu, ContextMenuSettings, DETAILS_LABEL, DIALOG_ID, DISPLAY_NONE, DROP_FILE, DROP_FOLDER, Delete, DetailsView, DetailsViewSettings, Download, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, ERROR_CONTENT, EXTN_DIALOG_ID, FILTER, FOCUS, FOCUSED, FOLDER, FRAME, FULLROW, FileManager, GRID_CONTENT, GRID_HEADER, GRID_ID, GRID_VIEW, GetDetails, HEADER_CHECK, HOVER, ICONS, ICON_BREADCRUMB, ICON_CLEAR, ICON_COLLAPSIBLE, ICON_COPY, ICON_CUT, ICON_DELETE, ICON_DETAILS, ICON_DOWNLOAD, ICON_DROP_IN, ICON_DROP_OUT, ICON_GRID, ICON_IMAGE, ICON_LARGE, ICON_MUSIC, ICON_NEWFOLDER, ICON_NO_DROP, ICON_OPEN, ICON_OPTIONS, ICON_PASTE, ICON_REFRESH, ICON_RENAME, ICON_SELECTALL, ICON_SHORTBY, ICON_UPLOAD, ICON_VIDEO, ICON_VIEW, IMG_DIALOG_ID, LARGEICON_ID, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON, LARGE_ICONS, LARGE_ICON_FOLDER, LAYOUT, LAYOUT_CONTENT, LAYOUT_ID, LIST_ITEM, LIST_PARENT, LIST_TEXT, LargeIconsView, MENU_ICON, MENU_ITEM, MOBILE, MOB_POPUP, MULTI_SELECT, NAVIGATION, NAVIGATION_ID, NavigationPane, NavigationPaneSettings, OVERLAY, RETRY_DIALOG_ID, RETRY_ID, ROOT, ROOT_POPUP, ROW, ROWCELL, RTL, SEARCH_ID, SELECTED_ITEMS, SORTBY_ID, SPLITTER_ID, SPLIT_BAR, STATUS, SUBMENU_ICON, Search, SearchSettings, TB_ITEM, TB_OPTION_DOT, TB_OPTION_TICK, TEMPLATE_CELL, TEXT_CONTENT, TOOLBAR_ID, TREE_ID, TREE_VIEW, Toolbar, ToolbarItem, ToolbarSettings, UPLOAD_DIALOG_ID, UPLOAD_ID, UploadSettings, VALUE, VIEW_ID, Virtualization, actionFailure, activeElement, addBlur, afterRequest, beforeDelete, beforeDownload, beforeRequest, clearAllInit, clearPathInit, closePopup, columnArray, copyFiles, createDeniedDialog, createDialog, createEmptyElement, createEnd, createExtDialog, createFolder, createImageDialog, createNewFolder, createVirtualDragElement, cutCopyInit, cutEnd, cutFiles, defaultToolbarItems, deleteEnd, deleteInit, destroy, detailsInit, doDeleteFiles, doDownload, doDownloadFiles, doPasteUpdate, doRename, download, downloadInit, dragCancel, dragEnd, dragHelper, dragStartHandler, dragStopHandler, dragging, draggingHandler, dropHandler, dropInit, dropPath, fileItems, fileType, filter, filterEnd, finalizeEnd, folderItems, generatePath, getAccessClass, getAccessDetails, getCssClass, getDirectories, getDirectoryPath, getDuplicateData, getFullPath, getImageUrl, getItemName, getLocaleText, getModule, getName, getObject, getParentPath, getParents, getPath, getPathId, getPathNames, getPathObject, getSortField, getSortedData, getTargetModule, hasContentAccess, hasDownloadAccess, hasEditAccess, hasReadAccess, hasUploadAccess, hideLayout, hidePaste, initialEnd, isFile, isFileSystemData, layoutChange, layoutItems, layoutRefresh, menuItemData, methodCall, modelChanged, nodeExpand, objectToString, openAction, openEnd, openInit, openSearchFolder, paste, pasteEnd, pasteHandler, pasteInit, pathChanged, pathColumn, pathDrag, permissionCopy, permissionDownload, permissionEdit, permissionEditContents, permissionRead, permissionUpload, read, readDropPath, refresh, refreshEnd, removeActive, removeBlur, removeDropTarget, removeItemClass, rename, renameEnd, renameEndParent, renameInit, resizeEnd, scrollHandler, search, searchTextChange, searchWordHandler, selectAllInit, selectedData, selectionChanged, setDateObject, setNextPath, setNodeId, showPaste, skipUpload, sortByChange, sortColumn, sortComparer, sortbyClickHandler, splitterResize, treeSelect, updateLayout, updatePath, updateRenamingData, updateSelectionData, updateTreeSelection, upload, uploadItem, validateSubFolder };
|
12597
|
+
export { ACTIVE, ALT_DIALOG_ID, AjaxSettings, BLUR, BREADCRUMBBAR_ID, BREADCRUMBS, BreadCrumbBar, CB_WRAP, CHECK, CHECK_SELECT, CLONE, COLLAPSED, CONTENT_ID, CONTEXT_MENU_ID, CONTROL, Column, ContextMenu, ContextMenuSettings, DETAILS_LABEL, DIALOG_ID, DISPLAY_NONE, DROP_FILE, DROP_FOLDER, Delete, DetailsView, DetailsViewSettings, Download, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, ERROR_CONTENT, EXTN_DIALOG_ID, FILTER, FOCUS, FOCUSED, FOLDER, FRAME, FULLROW, FileManager, GRID_CONTENT, GRID_HEADER, GRID_ID, GRID_VIEW, GetDetails, HEADER_CHECK, HOVER, ICONS, ICON_BREADCRUMB, ICON_CLEAR, ICON_COLLAPSIBLE, ICON_COPY, ICON_CUT, ICON_DELETE, ICON_DETAILS, ICON_DOWNLOAD, ICON_DROP_IN, ICON_DROP_OUT, ICON_GRID, ICON_IMAGE, ICON_LARGE, ICON_MUSIC, ICON_NEWFOLDER, ICON_NO_DROP, ICON_OPEN, ICON_OPTIONS, ICON_PASTE, ICON_REFRESH, ICON_RENAME, ICON_SELECTALL, ICON_SHORTBY, ICON_UPLOAD, ICON_VIDEO, ICON_VIEW, IMG_DIALOG_ID, LARGEICON_ID, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON, LARGE_ICONS, LARGE_ICON_FOLDER, LAYOUT, LAYOUT_CONTENT, LAYOUT_ID, LIST_ITEM, LIST_PARENT, LIST_TEXT, LargeIconsView, MENU_ICON, MENU_ITEM, MOBILE, MOB_POPUP, MULTI_SELECT, NAVIGATION, NAVIGATION_ID, NavigationPane, NavigationPaneSettings, OVERLAY, RETRY_DIALOG_ID, RETRY_ID, ROOT, ROOT_POPUP, ROW, ROWCELL, RTL, SEARCH_ID, SELECTED_ITEMS, SORTBY_ID, SPLITTER_ID, SPLIT_BAR, STATUS, SUBMENU_ICON, Search, SearchSettings, TB_ITEM, TB_OPTION_DOT, TB_OPTION_TICK, TEMPLATE_CELL, TEXT_CONTENT, TOOLBAR_ID, TREE_ID, TREE_VIEW, Toolbar, ToolbarItem, ToolbarSettings, UPLOAD_DIALOG_ID, UPLOAD_ID, UploadSettings, VALUE, VIEW_ID, Virtualization, actionFailure, activeElement, addBlur, afterRequest, beforeDelete, beforeDownload, beforeRequest, clearAllInit, clearPathInit, closePopup, columnArray, copyFiles, createDeniedDialog, createDialog, createEmptyElement, createEnd, createExtDialog, createFolder, createImageDialog, createNewFolder, createVirtualDragElement, cutCopyInit, cutEnd, cutFiles, defaultToolbarItems, deleteEnd, deleteInit, destroy, detailsInit, doDeleteFiles, doDownload, doDownloadFiles, doPasteUpdate, doRename, download, downloadInit, dragCancel, dragEnd, dragHelper, dragStartHandler, dragStopHandler, dragging, draggingHandler, dropHandler, dropInit, dropPath, fileItems, fileType, filter, filterEnd, finalizeEnd, folderItems, generatePath, getAccessClass, getAccessDetails, getAllChildItems, getCssClass, getDirectories, getDirectoryPath, getDuplicateData, getFullPath, getImageUrl, getItemName, getLocaleText, getModule, getName, getObject, getParentPath, getParents, getPath, getPathId, getPathNames, getPathObject, getSortField, getSortedData, getTargetModule, getTargetPath, hasContentAccess, hasDownloadAccess, hasEditAccess, hasReadAccess, hasUploadAccess, hideLayout, hidePaste, initialEnd, isFile, isFileSystemData, layoutChange, layoutItems, layoutRefresh, menuItemData, methodCall, modelChanged, nodeExpand, objectToString, openAction, openEnd, openInit, openSearchFolder, paste, pasteEnd, pasteHandler, pasteInit, pathChanged, pathColumn, pathDrag, permissionCopy, permissionDownload, permissionEdit, permissionEditContents, permissionRead, permissionUpload, read, readDropPath, refresh, refreshEnd, removeActive, removeBlur, removeDropTarget, removeItemClass, rename, renameEnd, renameEndParent, renameInit, resizeEnd, scrollHandler, search, searchTextChange, searchWordHandler, selectAllInit, selectedData, selectionChanged, setDateObject, setNextPath, setNodeId, showPaste, skipUpload, sortByChange, sortColumn, sortComparer, sortbyClickHandler, splitterResize, treeSelect, updateLayout, updatePath, updateRenamingData, updateSelectionData, updateTreeSelection, upload, uploadItem, validateSubFolder };
|
12486
12598
|
//# sourceMappingURL=ej2-filemanager.es2015.js.map
|