@syncfusion/ej2-filemanager 20.1.52-10459 → 20.1.52-10460
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/.eslintrc.json +3 -20
- package/CHANGELOG.md +410 -0
- package/README.md +43 -54
- package/dist/ej2-filemanager.umd.min.js +10 -1
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +659 -2353
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +708 -2421
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +10 -1
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/helpers/e2e/filemanagerHelper.js +166 -183
- package/package.json +71 -71
- package/src/file-manager/actions/breadcrumb-bar.js +5 -1
- package/src/file-manager/actions/index.d.ts +0 -1
- package/src/file-manager/actions/index.js +0 -1
- package/src/file-manager/actions/toolbar.d.ts +0 -1
- package/src/file-manager/actions/toolbar.js +17 -129
- package/src/file-manager/base/file-manager-model.d.ts +28 -154
- package/src/file-manager/base/file-manager.d.ts +27 -176
- package/src/file-manager/base/file-manager.js +28 -244
- package/src/file-manager/base/interface.d.ts +3 -329
- package/src/file-manager/base/interface.js +1 -0
- package/src/file-manager/common/operations.d.ts +0 -7
- package/src/file-manager/common/operations.js +185 -830
- package/src/file-manager/common/utility.d.ts +3 -46
- package/src/file-manager/common/utility.js +73 -249
- package/src/file-manager/index.d.ts +0 -1
- package/src/file-manager/index.js +0 -1
- package/src/file-manager/layout/details-view.d.ts +0 -10
- package/src/file-manager/layout/details-view.js +94 -203
- package/src/file-manager/layout/large-icons-view.d.ts +2 -4
- package/src/file-manager/layout/large-icons-view.js +72 -121
- package/src/file-manager/layout/navigation-pane.d.ts +0 -2
- package/src/file-manager/layout/navigation-pane.js +73 -97
- package/src/file-manager/models/column-model.d.ts +5 -23
- package/src/file-manager/models/column.d.ts +2 -21
- package/src/file-manager/models/column.js +0 -6
- package/src/file-manager/models/default-locale.js +1 -0
- package/src/file-manager/models/details-view-settings-model.d.ts +1 -1
- package/src/file-manager/models/details-view-settings.js +3 -8
- package/src/file-manager/models/search-settings.d.ts +0 -5
- package/src/file-manager/models/toolbar-settings-model.d.ts +2 -177
- package/src/file-manager/models/toolbar-settings.d.ts +2 -157
- package/src/file-manager/models/toolbar-settings.js +2 -64
- package/src/file-manager/models/upload-settings-model.d.ts +0 -13
- package/src/file-manager/models/upload-settings.d.ts +0 -12
- package/src/file-manager/models/upload-settings.js +0 -3
- package/src/file-manager/pop-up/context-menu.d.ts +1 -2
- package/src/file-manager/pop-up/context-menu.js +36 -111
- package/src/file-manager/pop-up/dialog.d.ts +2 -1
- package/src/file-manager/pop-up/dialog.js +40 -19
- package/src/global.js +1 -1
- package/styles/bootstrap-dark.css +665 -371
- package/styles/bootstrap-dark.scss +1 -17
- package/styles/bootstrap.css +644 -353
- package/styles/bootstrap.scss +1 -17
- package/styles/bootstrap4.css +680 -381
- package/styles/bootstrap4.scss +1 -17
- package/styles/bootstrap5-dark.css +694 -376
- package/styles/bootstrap5-dark.scss +1 -17
- package/styles/bootstrap5.css +695 -377
- package/styles/bootstrap5.scss +1 -17
- package/styles/fabric-dark.css +642 -358
- package/styles/fabric-dark.scss +1 -17
- package/styles/fabric.css +641 -357
- package/styles/fabric.scss +1 -17
- package/styles/file-manager/_all.scss +1 -1
- package/styles/file-manager/_bootstrap-dark-definition.scss +2 -6
- package/styles/file-manager/_bootstrap-definition.scss +2 -6
- package/styles/file-manager/_bootstrap4-definition.scss +2 -6
- package/styles/file-manager/_bootstrap5-definition.scss +15 -20
- package/styles/file-manager/_fabric-dark-definition.scss +2 -6
- package/styles/file-manager/_fabric-definition.scss +2 -6
- package/styles/file-manager/_fluent-definition.scss +15 -18
- package/styles/file-manager/_highcontrast-definition.scss +2 -6
- package/styles/file-manager/_highcontrast-light-definition.scss +2 -6
- package/styles/file-manager/_layout.scss +932 -369
- package/styles/file-manager/_material-dark-definition.scss +2 -7
- package/styles/file-manager/_material-definition.scss +2 -7
- package/styles/file-manager/_tailwind-definition.scss +16 -20
- package/styles/file-manager/_theme.scss +102 -123
- package/styles/file-manager/bootstrap-dark.css +665 -371
- package/styles/file-manager/bootstrap-dark.scss +1 -2
- package/styles/file-manager/bootstrap.css +644 -353
- package/styles/file-manager/bootstrap.scss +1 -2
- package/styles/file-manager/bootstrap4.css +680 -381
- package/styles/file-manager/bootstrap4.scss +1 -2
- package/styles/file-manager/bootstrap5-dark.css +694 -376
- package/styles/file-manager/bootstrap5-dark.scss +1 -2
- package/styles/file-manager/bootstrap5.css +695 -377
- package/styles/file-manager/bootstrap5.scss +1 -2
- package/styles/file-manager/fabric-dark.css +642 -358
- package/styles/file-manager/fabric-dark.scss +1 -2
- package/styles/file-manager/fabric.css +641 -357
- package/styles/file-manager/fabric.scss +1 -2
- package/styles/file-manager/fluent-dark.css +641 -356
- package/styles/file-manager/fluent-dark.scss +1 -2
- package/styles/file-manager/fluent.css +640 -355
- package/styles/file-manager/fluent.scss +1 -2
- package/styles/file-manager/highcontrast-light.css +644 -354
- package/styles/file-manager/highcontrast-light.scss +1 -2
- package/styles/file-manager/highcontrast.css +647 -377
- package/styles/file-manager/highcontrast.scss +1 -2
- package/styles/file-manager/icons/_bootstrap.scss +1 -0
- package/styles/file-manager/icons/_bootstrap4.scss +1 -0
- package/styles/file-manager/icons/_fabric-dark.scss +1 -0
- package/styles/file-manager/icons/_fabric.scss +1 -0
- package/styles/file-manager/material-dark.css +671 -392
- package/styles/file-manager/material-dark.scss +1 -2
- package/styles/file-manager/material.css +654 -391
- package/styles/file-manager/material.scss +1 -2
- package/styles/file-manager/tailwind-dark.css +667 -350
- package/styles/file-manager/tailwind-dark.scss +1 -2
- package/styles/file-manager/tailwind.css +667 -350
- package/styles/file-manager/tailwind.scss +1 -2
- package/styles/fluent-dark.css +641 -356
- package/styles/fluent-dark.scss +1 -17
- package/styles/fluent.css +640 -355
- package/styles/fluent.scss +1 -17
- package/styles/highcontrast-light.css +644 -354
- package/styles/highcontrast-light.scss +1 -17
- package/styles/highcontrast.css +647 -377
- package/styles/highcontrast.scss +1 -17
- package/styles/material-dark.css +671 -392
- package/styles/material-dark.scss +1 -17
- package/styles/material.css +654 -391
- package/styles/material.scss +1 -17
- package/styles/tailwind-dark.css +667 -350
- package/styles/tailwind-dark.scss +1 -17
- package/styles/tailwind.css +667 -350
- package/styles/tailwind.scss +1 -17
- package/dist/ej2-filemanager.min.js +0 -1
- package/src/file-manager/actions/virtualization.d.ts +0 -93
- package/src/file-manager/actions/virtualization.js +0 -279
- package/styles/bootstrap-dark-lite.css +0 -1058
- package/styles/bootstrap-dark-lite.scss +0 -16
- package/styles/bootstrap-lite.css +0 -1040
- package/styles/bootstrap-lite.scss +0 -16
- package/styles/bootstrap4-lite.css +0 -1068
- package/styles/bootstrap4-lite.scss +0 -16
- package/styles/bootstrap5-dark-lite.css +0 -1078
- package/styles/bootstrap5-dark-lite.scss +0 -16
- package/styles/bootstrap5-lite.css +0 -1078
- package/styles/bootstrap5-lite.scss +0 -16
- package/styles/bootstrap5.3-lite.css +0 -1035
- package/styles/bootstrap5.3-lite.scss +0 -16
- package/styles/bootstrap5.3.css +0 -1603
- package/styles/bootstrap5.3.scss +0 -17
- package/styles/fabric-dark-lite.css +0 -1039
- package/styles/fabric-dark-lite.scss +0 -16
- package/styles/fabric-lite.css +0 -1039
- package/styles/fabric-lite.scss +0 -16
- package/styles/file-manager/_bds-definition.scss +0 -236
- package/styles/file-manager/_bigger.scss +0 -758
- package/styles/file-manager/_bootstrap5.3-definition.scss +0 -242
- package/styles/file-manager/_fluent2-definition.scss +0 -255
- package/styles/file-manager/_fusionnew-definition.scss +0 -241
- package/styles/file-manager/_material3-dark-definition.scss +0 -1
- package/styles/file-manager/_material3-definition.scss +0 -235
- package/styles/file-manager/bootstrap5.3.css +0 -1603
- package/styles/file-manager/bootstrap5.3.scss +0 -17
- package/styles/file-manager/fluent2.css +0 -1886
- package/styles/file-manager/fluent2.scss +0 -17
- package/styles/file-manager/icons/_bds.scss +0 -235
- package/styles/file-manager/icons/_bootstrap5.3.scss +0 -235
- package/styles/file-manager/icons/_fluent2.scss +0 -235
- package/styles/file-manager/icons/_fusionnew.scss +0 -235
- package/styles/file-manager/icons/_material3-dark.scss +0 -1
- package/styles/file-manager/icons/_material3.scss +0 -235
- package/styles/file-manager/material3-dark.css +0 -1633
- package/styles/file-manager/material3-dark.scss +0 -18
- package/styles/file-manager/material3.css +0 -1635
- package/styles/file-manager/material3.scss +0 -18
- package/styles/fluent-dark-lite.css +0 -1037
- package/styles/fluent-dark-lite.scss +0 -16
- package/styles/fluent-lite.css +0 -1036
- package/styles/fluent-lite.scss +0 -16
- package/styles/fluent2-lite.css +0 -1272
- package/styles/fluent2-lite.scss +0 -16
- package/styles/fluent2.css +0 -1886
- package/styles/fluent2.scss +0 -17
- package/styles/highcontrast-light-lite.css +0 -1039
- package/styles/highcontrast-light-lite.scss +0 -16
- package/styles/highcontrast-lite.css +0 -1059
- package/styles/highcontrast-lite.scss +0 -16
- package/styles/material-dark-lite.css +0 -1092
- package/styles/material-dark-lite.scss +0 -16
- package/styles/material-lite.css +0 -1097
- package/styles/material-lite.scss +0 -16
- package/styles/material3-dark-lite.css +0 -1090
- package/styles/material3-dark-lite.scss +0 -16
- package/styles/material3-dark.css +0 -1633
- package/styles/material3-dark.scss +0 -19
- package/styles/material3-lite.css +0 -1092
- package/styles/material3-lite.scss +0 -16
- package/styles/material3.css +0 -1635
- package/styles/material3.scss +0 -19
- package/styles/tailwind-dark-lite.css +0 -1060
- package/styles/tailwind-dark-lite.scss +0 -16
- package/styles/tailwind-lite.css +0 -1060
- package/styles/tailwind-lite.scss +0 -16
|
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
19
|
};
|
|
20
|
-
import { Component, isNullOrUndefined, L10n, closest
|
|
20
|
+
import { Component, isNullOrUndefined, L10n, closest } from '@syncfusion/ej2-base';
|
|
21
21
|
import { Property, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';
|
|
22
22
|
import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';
|
|
23
23
|
import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents } from '@syncfusion/ej2-base';
|
|
@@ -26,7 +26,6 @@ import { Splitter } from '@syncfusion/ej2-layouts';
|
|
|
26
26
|
import { Dialog, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
27
27
|
import { createDialog, createExtDialog } from '../pop-up/dialog';
|
|
28
28
|
import { ToolbarSettings, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';
|
|
29
|
-
import { ToolbarItem } from '../models/index';
|
|
30
29
|
import { SearchSettings } from '../models/index';
|
|
31
30
|
import { LargeIconsView } from '../layout/large-icons-view';
|
|
32
31
|
import { Uploader } from '@syncfusion/ej2-inputs';
|
|
@@ -35,7 +34,7 @@ import * as events from './constant';
|
|
|
35
34
|
import * as CLS from './classes';
|
|
36
35
|
import { read, filter, createFolder } from '../common/operations';
|
|
37
36
|
import { refresh, getPathObject, getLocaleText, setNextPath, createDeniedDialog, getCssClass } from '../common/utility';
|
|
38
|
-
import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem
|
|
37
|
+
import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem } from '../common/utility';
|
|
39
38
|
import { ContextMenuSettings } from '../models/contextMenu-settings';
|
|
40
39
|
import { BreadCrumbBar } from '../actions/breadcrumb-bar';
|
|
41
40
|
import { ContextMenu } from '../pop-up/context-menu';
|
|
@@ -56,13 +55,14 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
56
55
|
__extends(FileManager, _super);
|
|
57
56
|
function FileManager(options, element) {
|
|
58
57
|
var _this = _super.call(this, options, element) || this;
|
|
58
|
+
// eslint-disable-next-line
|
|
59
59
|
_this.filterData = null;
|
|
60
60
|
_this.selectedNodes = [];
|
|
61
61
|
_this.duplicateItems = [];
|
|
62
|
+
// eslint-disable-next-line
|
|
62
63
|
_this.duplicateRecords = [];
|
|
63
64
|
_this.previousPath = [];
|
|
64
65
|
_this.nextPath = [];
|
|
65
|
-
_this.existingFileCount = 0;
|
|
66
66
|
_this.isLayoutChange = false;
|
|
67
67
|
_this.layoutSelectedItems = [];
|
|
68
68
|
_this.renamedId = null;
|
|
@@ -84,9 +84,11 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
84
84
|
_this.isOpened = false;
|
|
85
85
|
_this.isRetryOpened = false;
|
|
86
86
|
_this.isPathDrag = false;
|
|
87
|
+
// eslint-disable-next-line
|
|
87
88
|
_this.searchedItems = [];
|
|
88
89
|
_this.retryFiles = [];
|
|
89
90
|
_this.isApplySame = false;
|
|
91
|
+
// eslint-disable-next-line
|
|
90
92
|
_this.dragData = [];
|
|
91
93
|
_this.dragNodes = [];
|
|
92
94
|
_this.dragPath = '';
|
|
@@ -96,12 +98,10 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
96
98
|
_this.dragCursorPosition = { left: 44, top: 18 };
|
|
97
99
|
_this.isDropEnd = false;
|
|
98
100
|
_this.dragCount = 0;
|
|
101
|
+
// eslint-disable-next-line
|
|
99
102
|
_this.droppedObjects = [];
|
|
100
103
|
_this.uploadingCount = 0;
|
|
101
104
|
_this.uploadedCount = 0;
|
|
102
|
-
//Specifies whether the operating system is MAC or not
|
|
103
|
-
_this.isMac = false;
|
|
104
|
-
_this.dragSelectedItems = [];
|
|
105
105
|
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
|
|
106
106
|
return _this;
|
|
107
107
|
}
|
|
@@ -176,36 +176,25 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
176
176
|
if (this.toolbarSettings.visible) {
|
|
177
177
|
modules.push({
|
|
178
178
|
member: 'toolbar',
|
|
179
|
-
args: [this]
|
|
180
|
-
name: 'Toolbar'
|
|
179
|
+
args: [this]
|
|
181
180
|
});
|
|
182
181
|
}
|
|
183
182
|
if (this.navigationPaneSettings.visible) {
|
|
184
183
|
modules.push({
|
|
185
184
|
member: 'navigationpane',
|
|
186
|
-
args: [this]
|
|
187
|
-
name: 'NavigationPane'
|
|
185
|
+
args: [this]
|
|
188
186
|
});
|
|
189
187
|
}
|
|
190
188
|
if (this.view) {
|
|
191
189
|
modules.push({
|
|
192
190
|
member: 'detailsview',
|
|
193
|
-
args: [this]
|
|
194
|
-
name: 'DetailsView'
|
|
191
|
+
args: [this]
|
|
195
192
|
});
|
|
196
193
|
}
|
|
197
194
|
if (this.contextMenuSettings.visible && !this.isDevice) {
|
|
198
195
|
modules.push({
|
|
199
196
|
member: 'contextmenu',
|
|
200
|
-
args: [this]
|
|
201
|
-
name: 'ContextMenu'
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
if (this.enableVirtualization) {
|
|
205
|
-
modules.push({
|
|
206
|
-
member: 'virtualization',
|
|
207
|
-
args: [this],
|
|
208
|
-
name: 'Virtualization'
|
|
197
|
+
args: [this]
|
|
209
198
|
});
|
|
210
199
|
}
|
|
211
200
|
return modules;
|
|
@@ -222,13 +211,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
222
211
|
this.allowMultiSelection ? this.selectedItems : this.selectedItems.slice(this.selectedItems.length - 1);
|
|
223
212
|
this.setProperties({ selectedItems: slItems }, true);
|
|
224
213
|
this.fileView = this.view;
|
|
225
|
-
this.isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
226
214
|
this.setRtl(this.enableRtl);
|
|
227
215
|
this.addEventListeners();
|
|
228
216
|
read(this, (this.path !== this.originalPath) ? events.initialEnd : events.finalizeEnd, this.path);
|
|
229
|
-
if (this.fileView === 'Details') {
|
|
230
|
-
this.largeiconsviewModule.element.classList.add(CLS.DISPLAY_NONE);
|
|
231
|
-
}
|
|
232
217
|
this.adjustHeight();
|
|
233
218
|
if (isNOU(this.navigationpaneModule)) {
|
|
234
219
|
this.splitterObj.collapse(this.enableRtl ? 1 : 0);
|
|
@@ -432,7 +417,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
432
417
|
minFileSize: this.uploadSettings.minFileSize,
|
|
433
418
|
maxFileSize: this.uploadSettings.maxFileSize,
|
|
434
419
|
allowedExtensions: this.uploadSettings.allowedExtensions,
|
|
435
|
-
directoryUpload: this.uploadSettings.directoryUpload,
|
|
436
420
|
fileListRendering: this.onFileListRender.bind(this)
|
|
437
421
|
});
|
|
438
422
|
this.uploadObj.appendTo('#' + this.element.id + CLS.UPLOAD_ID);
|
|
@@ -445,7 +429,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
445
429
|
this.uploadObj.minFileSize = this.uploadSettings.minFileSize;
|
|
446
430
|
this.uploadObj.maxFileSize = this.uploadSettings.maxFileSize;
|
|
447
431
|
this.uploadObj.allowedExtensions = this.uploadSettings.allowedExtensions;
|
|
448
|
-
this.uploadObj.directoryUpload = this.uploadSettings.directoryUpload;
|
|
449
432
|
this.uploadObj.dataBind();
|
|
450
433
|
};
|
|
451
434
|
FileManager.prototype.onBeforeOpen = function (args) {
|
|
@@ -495,8 +478,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
495
478
|
}
|
|
496
479
|
}
|
|
497
480
|
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
|
498
|
-
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }
|
|
481
|
+
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }];
|
|
499
482
|
var uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
|
|
483
|
+
// eslint-disable-next-line
|
|
500
484
|
var ajaxSettings = {
|
|
501
485
|
url: uploadUrl,
|
|
502
486
|
type: 'POST',
|
|
@@ -512,6 +496,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
512
496
|
this.trigger('beforeSend', this.uploadEventArgs, function (uploadEventArgs) {
|
|
513
497
|
args.customFormData = JSON.parse(getValue('data', uploadEventArgs.ajaxSettings));
|
|
514
498
|
args.cancel = uploadEventArgs.cancel;
|
|
499
|
+
// eslint-disable-next-line
|
|
515
500
|
var eventArgs = {
|
|
516
501
|
cancel: false,
|
|
517
502
|
httpRequest: args.currentRequest
|
|
@@ -548,6 +533,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
548
533
|
}
|
|
549
534
|
this.uploadingCount = args.filesData.length;
|
|
550
535
|
this.uploadedCount = 0;
|
|
536
|
+
// eslint-disable-next-line
|
|
551
537
|
var details = getPathObject(this);
|
|
552
538
|
if (!hasUploadAccess(details)) {
|
|
553
539
|
args.cancel = true;
|
|
@@ -556,6 +542,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
556
542
|
}
|
|
557
543
|
this.uploadDialogObj.show();
|
|
558
544
|
};
|
|
545
|
+
// eslint-disable-next-line
|
|
559
546
|
FileManager.prototype.onFileUploadSuccess = function (args) {
|
|
560
547
|
this.uploadedCount = this.uploadedCount + args.count;
|
|
561
548
|
if (this.uploadSettings.autoClose && (this.uploadingCount === this.uploadedCount)) {
|
|
@@ -563,6 +550,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
563
550
|
}
|
|
564
551
|
};
|
|
565
552
|
/* istanbul ignore next */
|
|
553
|
+
// eslint-disable-next-line
|
|
566
554
|
FileManager.prototype.onUploadSuccess = function (files) {
|
|
567
555
|
var args = { action: 'Upload', result: files };
|
|
568
556
|
this.trigger('success', args);
|
|
@@ -574,7 +562,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
574
562
|
}
|
|
575
563
|
};
|
|
576
564
|
/* istanbul ignore next */
|
|
565
|
+
// eslint-disable-next-line
|
|
577
566
|
FileManager.prototype.onUploadFailure = function (files) {
|
|
567
|
+
// eslint-disable-next-line
|
|
578
568
|
var response = getValue('response', files);
|
|
579
569
|
var statusText = getValue('statusText', response);
|
|
580
570
|
if (statusText !== '') {
|
|
@@ -658,40 +648,12 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
658
648
|
break;
|
|
659
649
|
case 'ctrlU':
|
|
660
650
|
e.preventDefault();
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
uploadEle.click();
|
|
664
|
-
}
|
|
651
|
+
uploadEle = select('#' + this.element.id + CLS.UPLOAD_ID, this.element);
|
|
652
|
+
uploadEle.click();
|
|
665
653
|
break;
|
|
666
654
|
}
|
|
667
655
|
};
|
|
668
|
-
FileManager.prototype.wireSelectOnDragEvent = function (isBind) {
|
|
669
|
-
if (isNOU(this.view)) {
|
|
670
|
-
return;
|
|
671
|
-
}
|
|
672
|
-
if (isBind) {
|
|
673
|
-
this.viewElem = this.view === 'LargeIcons' ? this.largeiconsviewModule.element : this.element.querySelector('.e-gridcontent');
|
|
674
|
-
}
|
|
675
|
-
if (!this.viewElem) {
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
if (isBind) {
|
|
679
|
-
if (this.allowMultiSelection) {
|
|
680
|
-
EventHandler.add(this.viewElem, 'mousedown', this.onDragStart, this);
|
|
681
|
-
this.on(events.layoutChange, this.onLayoutChange, this);
|
|
682
|
-
this.on(events.selectionChanged, this.onLayoutChange, this);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
else {
|
|
686
|
-
EventHandler.remove(this.viewElem, 'mousedown', this.onDragStart);
|
|
687
|
-
this.off(events.layoutChange, this.onLayoutChange);
|
|
688
|
-
this.off(events.selectionChanged, this.onLayoutChange);
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
656
|
FileManager.prototype.wireEvents = function () {
|
|
692
|
-
if (this.enableRangeSelection) {
|
|
693
|
-
this.wireSelectOnDragEvent(true);
|
|
694
|
-
}
|
|
695
657
|
EventHandler.add(window, 'resize', this.resizeHandler, this);
|
|
696
658
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
697
659
|
keyAction: this.keyActionHandler.bind(this),
|
|
@@ -700,94 +662,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
700
662
|
});
|
|
701
663
|
};
|
|
702
664
|
FileManager.prototype.unWireEvents = function () {
|
|
703
|
-
this.wireSelectOnDragEvent(false);
|
|
704
665
|
EventHandler.remove(window, 'resize', this.resizeHandler);
|
|
705
666
|
this.keyboardModule.destroy();
|
|
706
667
|
};
|
|
707
|
-
FileManager.prototype.onDragStart = function (event) {
|
|
708
|
-
if (this.viewElem) {
|
|
709
|
-
if (this.allowDragAndDrop) {
|
|
710
|
-
var targetElement = closest(event.target, this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-fe-text');
|
|
711
|
-
if (targetElement) {
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
event.preventDefault();
|
|
716
|
-
this.dragX = event.pageX;
|
|
717
|
-
this.dragY = event.pageY;
|
|
718
|
-
if (!this.dragSelectElement) {
|
|
719
|
-
this.dragSelectElement = createElement('div', {
|
|
720
|
-
id: this.element.id + '_drag',
|
|
721
|
-
className: 'e-filemanager e-drag-select',
|
|
722
|
-
styles: 'left: ' + this.dragX + 'px;top: ' + this.dragY + 'px;'
|
|
723
|
-
});
|
|
724
|
-
document.body.append(this.dragSelectElement);
|
|
725
|
-
}
|
|
726
|
-
EventHandler.add(document, 'mouseup', this.onDragStop, this);
|
|
727
|
-
EventHandler.add(this.viewElem, 'mousemove', this.onDrag, this);
|
|
728
|
-
EventHandler.add(this.dragSelectElement, 'mousemove', this.onDrag, this);
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
FileManager.prototype.onDrag = function (event) {
|
|
732
|
-
event.stopPropagation();
|
|
733
|
-
if (this.dragSelectElement) {
|
|
734
|
-
var diffX = event.pageX - this.dragX;
|
|
735
|
-
var diffY = event.pageY - this.dragY;
|
|
736
|
-
setStyleAttribute(this.dragSelectElement, {
|
|
737
|
-
'left': diffX < 0 ? this.dragX + diffX + 'px' : this.dragX + 'px', 'top': diffY < 0 ? this.dragY + diffY + 'px' : this.dragY + 'px',
|
|
738
|
-
'height': Math.abs(diffY) + 'px', 'width': Math.abs(diffX) + 'px'
|
|
739
|
-
});
|
|
740
|
-
this.selectItems();
|
|
741
|
-
}
|
|
742
|
-
else {
|
|
743
|
-
EventHandler.remove(this.viewElem, 'mousemove', this.onDrag);
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
FileManager.prototype.onDragStop = function () {
|
|
747
|
-
if (this.viewElem) {
|
|
748
|
-
EventHandler.remove(document, 'mouseup', this.onDragStop);
|
|
749
|
-
EventHandler.remove(this.viewElem, 'mousemove', this.onDrag);
|
|
750
|
-
}
|
|
751
|
-
if (this.dragSelectElement) {
|
|
752
|
-
EventHandler.remove(this.dragSelectElement, 'mousemove', this.onDrag);
|
|
753
|
-
if (this.dragSelectElement.clientHeight > 0 && this.dragSelectElement.clientWidth > 0) {
|
|
754
|
-
this.setProperties({ selectedItems: this.dragSelectedItems });
|
|
755
|
-
}
|
|
756
|
-
this.dragSelectedItems = [];
|
|
757
|
-
detach(this.dragSelectElement);
|
|
758
|
-
this.dragSelectElement = null;
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
FileManager.prototype.selectItems = function () {
|
|
762
|
-
this.dragSelectedItems = [];
|
|
763
|
-
var dragRect = this.dragSelectElement.getBoundingClientRect();
|
|
764
|
-
var allItems = selectAll(this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-row', this.viewElem);
|
|
765
|
-
removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
|
|
766
|
-
removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
|
|
767
|
-
for (var _i = 0, allItems_1 = allItems; _i < allItems_1.length; _i++) {
|
|
768
|
-
var item = allItems_1[_i];
|
|
769
|
-
var itemRect = item.getBoundingClientRect();
|
|
770
|
-
if (!(dragRect.right < itemRect.left || dragRect.left > itemRect.right
|
|
771
|
-
|| dragRect.bottom < itemRect.top || dragRect.top > itemRect.bottom)
|
|
772
|
-
&& (this.dragSelectElement.clientHeight > 0 && this.dragSelectElement.clientWidth > 0)) {
|
|
773
|
-
if (this.viewElem.classList.contains('e-large-icons')) {
|
|
774
|
-
item.classList.add('e-active');
|
|
775
|
-
this.dragSelectedItems.push(item.getAttribute('title'));
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
addClass(selectAll('.e-rowcell', item), ['e-active']);
|
|
779
|
-
this.dragSelectedItems.push(item.querySelector('.e-drag-text').textContent);
|
|
780
|
-
}
|
|
781
|
-
item.querySelector('.e-frame').classList.add('e-check');
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
};
|
|
785
|
-
FileManager.prototype.onLayoutChange = function () {
|
|
786
|
-
if (this.enableRangeSelection) {
|
|
787
|
-
this.unWireEvents();
|
|
788
|
-
this.wireEvents();
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
668
|
FileManager.prototype.setPath = function () {
|
|
792
669
|
this.setProperties({ selectedItems: [] }, true);
|
|
793
670
|
this.ensurePath();
|
|
@@ -803,6 +680,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
803
680
|
* @private
|
|
804
681
|
*/
|
|
805
682
|
/* istanbul ignore next */
|
|
683
|
+
// eslint:disable-next-line
|
|
806
684
|
FileManager.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
807
685
|
var height;
|
|
808
686
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
@@ -834,12 +712,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
834
712
|
case 'detailsViewSettings':
|
|
835
713
|
this.notify(events.modelChanged, { module: 'detailsview', newProp: newProp, oldProp: oldProp });
|
|
836
714
|
break;
|
|
837
|
-
case 'enableRangeSelection':
|
|
838
|
-
this.wireSelectOnDragEvent(false);
|
|
839
|
-
if (newProp.enableRangeSelection) {
|
|
840
|
-
this.wireSelectOnDragEvent(true);
|
|
841
|
-
}
|
|
842
|
-
break;
|
|
843
715
|
case 'enableRtl':
|
|
844
716
|
this.enableRtl = newProp.enableRtl;
|
|
845
717
|
this.refresh();
|
|
@@ -897,7 +769,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
897
769
|
this.notify(events.modelChanged, { module: 'largeiconsview', newProp: newProp, oldProp: oldProp });
|
|
898
770
|
break;
|
|
899
771
|
case 'toolbarSettings':
|
|
900
|
-
case 'toolbarItems':
|
|
901
772
|
this.adjustHeight();
|
|
902
773
|
this.notify(events.modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
|
|
903
774
|
break;
|
|
@@ -941,10 +812,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
941
812
|
this.viewerObj.target = newProp.popupTarget;
|
|
942
813
|
}
|
|
943
814
|
break;
|
|
944
|
-
case 'fileSystemData':
|
|
945
|
-
this.fileSystemData = newProp.fileSystemData;
|
|
946
|
-
this.refresh();
|
|
947
|
-
break;
|
|
948
815
|
}
|
|
949
816
|
}
|
|
950
817
|
};
|
|
@@ -1008,21 +875,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1008
875
|
this.addCssClass(this.cssClass, null);
|
|
1009
876
|
removeClass([this.element], [CLS.RTL, CLS.MOBILE, CLS.CHECK_SELECT]);
|
|
1010
877
|
this.element.innerHTML = '';
|
|
1011
|
-
this.breadCrumbBarNavigation = null;
|
|
1012
|
-
this.activeElements = null;
|
|
1013
|
-
this.virtualDragElement = null;
|
|
1014
|
-
this.visitedItem = null;
|
|
1015
878
|
_super.prototype.destroy.call(this);
|
|
1016
|
-
this.virtualizationModule = null;
|
|
1017
|
-
this.navigationpaneModule = null;
|
|
1018
|
-
this.toolbarModule = null;
|
|
1019
|
-
this.contextmenuModule = null;
|
|
1020
|
-
this.largeiconsviewModule = null;
|
|
1021
|
-
this.detailsviewModule = null;
|
|
1022
|
-
this.breadcrumbbarModule = null;
|
|
1023
|
-
this.viewElem = null;
|
|
1024
|
-
this.dragSelectElement = null;
|
|
1025
|
-
this.dragSelectedItems = null;
|
|
1026
879
|
};
|
|
1027
880
|
/**
|
|
1028
881
|
* Creates a new folder in file manager.
|
|
@@ -1033,6 +886,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1033
886
|
*/
|
|
1034
887
|
FileManager.prototype.createFolder = function (name) {
|
|
1035
888
|
this.notify(events.methodCall, { action: 'createFolder' });
|
|
889
|
+
// eslint-disable-next-line
|
|
1036
890
|
var details = [getPathObject(this)];
|
|
1037
891
|
this.itemData = details;
|
|
1038
892
|
if (name) {
|
|
@@ -1080,7 +934,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1080
934
|
* @returns {void}
|
|
1081
935
|
*/
|
|
1082
936
|
FileManager.prototype.disableToolbarItems = function (items) {
|
|
1083
|
-
if (!isNOU(items)
|
|
937
|
+
if (!isNOU(items)) {
|
|
1084
938
|
this.toolbarModule.enableItems(items, false);
|
|
1085
939
|
}
|
|
1086
940
|
};
|
|
@@ -1104,7 +958,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1104
958
|
* @returns {void}
|
|
1105
959
|
*/
|
|
1106
960
|
FileManager.prototype.enableToolbarItems = function (items) {
|
|
1107
|
-
if (!isNOU(items)
|
|
961
|
+
if (!isNOU(items)) {
|
|
1108
962
|
this.toolbarModule.enableItems(items, true);
|
|
1109
963
|
}
|
|
1110
964
|
};
|
|
@@ -1155,6 +1009,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1155
1009
|
*
|
|
1156
1010
|
* @returns {void}
|
|
1157
1011
|
*/
|
|
1012
|
+
// eslint-disable-next-line
|
|
1158
1013
|
FileManager.prototype.filterFiles = function (filterData) {
|
|
1159
1014
|
this.filterData = filterData ? filterData : null;
|
|
1160
1015
|
this.setProperties({ selectedItems: [] }, true);
|
|
@@ -1170,6 +1025,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1170
1025
|
*
|
|
1171
1026
|
* @returns {Object[]} - returns selected files.
|
|
1172
1027
|
*/
|
|
1028
|
+
// eslint-disable-next-line
|
|
1173
1029
|
FileManager.prototype.getSelectedFiles = function () {
|
|
1174
1030
|
this.notify(events.updateSelectionData, {});
|
|
1175
1031
|
return this.itemData;
|
|
@@ -1211,23 +1067,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1211
1067
|
FileManager.prototype.selectAll = function () {
|
|
1212
1068
|
this.notify(events.methodCall, { action: 'selectAll' });
|
|
1213
1069
|
};
|
|
1214
|
-
/**
|
|
1215
|
-
* Specifies the method that must be invoked to traverse the path backwards in the file manager.
|
|
1216
|
-
*
|
|
1217
|
-
* @returns {void}
|
|
1218
|
-
*/
|
|
1219
|
-
FileManager.prototype.traverseBackward = function () {
|
|
1220
|
-
if (this.pathNames.length > 1 && this.breadcrumbbarModule.searchObj.element.value === '' && !this.isFiltered) {
|
|
1221
|
-
this.pathId.pop();
|
|
1222
|
-
this.pathNames.pop();
|
|
1223
|
-
var newPath = this.pathNames.slice(1).join('/');
|
|
1224
|
-
newPath = newPath === '' ? '/' : '/' + newPath + '/';
|
|
1225
|
-
this.setProperties({ path: newPath }, true);
|
|
1226
|
-
read(this, events.pathChanged, this.path);
|
|
1227
|
-
var treeNodeId = this.pathId[this.pathId.length - 1];
|
|
1228
|
-
this.notify(events.updateTreeSelection, { module: 'treeview', selectedNode: treeNodeId });
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
1070
|
/**
|
|
1232
1071
|
* Deselects the currently selected folders and files in current path.
|
|
1233
1072
|
*
|
|
@@ -1258,18 +1097,11 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1258
1097
|
* @returns {void}
|
|
1259
1098
|
*/
|
|
1260
1099
|
FileManager.prototype.uploadFiles = function () {
|
|
1100
|
+
// eslint-disable-next-line
|
|
1261
1101
|
var details = [getPathObject(this)];
|
|
1262
1102
|
this.itemData = details;
|
|
1263
1103
|
uploadItem(this);
|
|
1264
1104
|
};
|
|
1265
|
-
/**
|
|
1266
|
-
* Specifies the method which must be invoked to programmatically close the dialog popup in the file manager.
|
|
1267
|
-
*
|
|
1268
|
-
* @returns {void}
|
|
1269
|
-
*/
|
|
1270
|
-
FileManager.prototype.closeDialog = function () {
|
|
1271
|
-
closePopup(this);
|
|
1272
|
-
};
|
|
1273
1105
|
/**
|
|
1274
1106
|
* Specifies the direction of FileManager
|
|
1275
1107
|
*
|
|
@@ -1292,18 +1124,12 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1292
1124
|
__decorate([
|
|
1293
1125
|
Complex({}, AjaxSettings)
|
|
1294
1126
|
], FileManager.prototype, "ajaxSettings", void 0);
|
|
1295
|
-
__decorate([
|
|
1296
|
-
Property([])
|
|
1297
|
-
], FileManager.prototype, "fileSystemData", void 0);
|
|
1298
1127
|
__decorate([
|
|
1299
1128
|
Property(false)
|
|
1300
1129
|
], FileManager.prototype, "allowDragAndDrop", void 0);
|
|
1301
1130
|
__decorate([
|
|
1302
1131
|
Property(true)
|
|
1303
1132
|
], FileManager.prototype, "allowMultiSelection", void 0);
|
|
1304
|
-
__decorate([
|
|
1305
|
-
Property(true)
|
|
1306
|
-
], FileManager.prototype, "showItemCheckBoxes", void 0);
|
|
1307
1133
|
__decorate([
|
|
1308
1134
|
Complex({}, ContextMenuSettings)
|
|
1309
1135
|
], FileManager.prototype, "contextMenuSettings", void 0);
|
|
@@ -1319,9 +1145,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1319
1145
|
__decorate([
|
|
1320
1146
|
Property(false)
|
|
1321
1147
|
], FileManager.prototype, "enablePersistence", void 0);
|
|
1322
|
-
__decorate([
|
|
1323
|
-
Property(false)
|
|
1324
|
-
], FileManager.prototype, "enableVirtualization", void 0);
|
|
1325
1148
|
__decorate([
|
|
1326
1149
|
Property('400px')
|
|
1327
1150
|
], FileManager.prototype, "height", void 0);
|
|
@@ -1361,18 +1184,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1361
1184
|
__decorate([
|
|
1362
1185
|
Property('name')
|
|
1363
1186
|
], FileManager.prototype, "sortBy", void 0);
|
|
1364
|
-
__decorate([
|
|
1365
|
-
Property(null)
|
|
1366
|
-
], FileManager.prototype, "sortComparer", void 0);
|
|
1367
|
-
__decorate([
|
|
1368
|
-
Property(false)
|
|
1369
|
-
], FileManager.prototype, "enableRangeSelection", void 0);
|
|
1370
1187
|
__decorate([
|
|
1371
1188
|
Complex({}, ToolbarSettings)
|
|
1372
1189
|
], FileManager.prototype, "toolbarSettings", void 0);
|
|
1373
|
-
__decorate([
|
|
1374
|
-
Collection([], ToolbarItem)
|
|
1375
|
-
], FileManager.prototype, "toolbarItems", void 0);
|
|
1376
1190
|
__decorate([
|
|
1377
1191
|
Complex({}, UploadSettings)
|
|
1378
1192
|
], FileManager.prototype, "uploadSettings", void 0);
|
|
@@ -1403,36 +1217,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1403
1217
|
__decorate([
|
|
1404
1218
|
Event()
|
|
1405
1219
|
], FileManager.prototype, "created", void 0);
|
|
1406
|
-
__decorate([
|
|
1407
|
-
Event()
|
|
1408
|
-
], FileManager.prototype, "beforeFolderCreate", void 0);
|
|
1409
|
-
__decorate([
|
|
1410
|
-
Event()
|
|
1411
|
-
], FileManager.prototype, "folderCreate", void 0);
|
|
1412
1220
|
__decorate([
|
|
1413
1221
|
Event()
|
|
1414
1222
|
], FileManager.prototype, "destroyed", void 0);
|
|
1415
|
-
__decorate([
|
|
1416
|
-
Event()
|
|
1417
|
-
], FileManager.prototype, "beforeDelete", void 0);
|
|
1418
|
-
__decorate([
|
|
1419
|
-
Event()
|
|
1420
|
-
], FileManager.prototype, "delete", void 0);
|
|
1421
|
-
__decorate([
|
|
1422
|
-
Event()
|
|
1423
|
-
], FileManager.prototype, "beforeRename", void 0);
|
|
1424
|
-
__decorate([
|
|
1425
|
-
Event()
|
|
1426
|
-
], FileManager.prototype, "rename", void 0);
|
|
1427
|
-
__decorate([
|
|
1428
|
-
Event()
|
|
1429
|
-
], FileManager.prototype, "beforeMove", void 0);
|
|
1430
|
-
__decorate([
|
|
1431
|
-
Event()
|
|
1432
|
-
], FileManager.prototype, "move", void 0);
|
|
1433
|
-
__decorate([
|
|
1434
|
-
Event()
|
|
1435
|
-
], FileManager.prototype, "search", void 0);
|
|
1436
1223
|
__decorate([
|
|
1437
1224
|
Event()
|
|
1438
1225
|
], FileManager.prototype, "fileDragStart", void 0);
|
|
@@ -1457,9 +1244,6 @@ var FileManager = /** @class */ (function (_super) {
|
|
|
1457
1244
|
__decorate([
|
|
1458
1245
|
Event()
|
|
1459
1246
|
], FileManager.prototype, "menuOpen", void 0);
|
|
1460
|
-
__decorate([
|
|
1461
|
-
Event()
|
|
1462
|
-
], FileManager.prototype, "menuClose", void 0);
|
|
1463
1247
|
__decorate([
|
|
1464
1248
|
Event()
|
|
1465
1249
|
], FileManager.prototype, "failure", void 0);
|