@syncfusion/ej2-filemanager 19.4.48 → 19.4.50-117124
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 +16 -1
- package/CHANGELOG.md +6 -20
- package/README.md +54 -43
- package/dist/ej2-filemanager.min.js +10 -0
- package/dist/ej2-filemanager.umd.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +445 -129
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +473 -136
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -2
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/helpers/e2e/filemanagerHelper.js +183 -166
- package/package.json +11 -12
- package/src/file-manager/actions/breadcrumb-bar.js +1 -1
- package/src/file-manager/actions/index.d.ts +1 -0
- package/src/file-manager/actions/index.js +1 -0
- package/src/file-manager/actions/toolbar.js +6 -4
- package/src/file-manager/actions/virtualization.d.ts +38 -0
- package/src/file-manager/actions/virtualization.js +179 -0
- package/src/file-manager/base/classes.d.ts +2 -0
- package/src/file-manager/base/classes.js +2 -0
- package/src/file-manager/base/file-manager-model.d.ts +24 -2
- package/src/file-manager/base/file-manager.d.ts +28 -2
- package/src/file-manager/base/file-manager.js +32 -3
- package/src/file-manager/base/interface.d.ts +5 -1
- package/src/file-manager/common/operations.js +2 -0
- package/src/file-manager/common/utility.js +21 -5
- package/src/file-manager/layout/details-view.d.ts +2 -0
- package/src/file-manager/layout/details-view.js +46 -7
- package/src/file-manager/layout/large-icons-view.d.ts +2 -1
- package/src/file-manager/layout/large-icons-view.js +13 -5
- package/src/file-manager/layout/navigation-pane.js +29 -17
- package/src/file-manager/models/index.d.ts +2 -0
- package/src/file-manager/models/index.js +1 -0
- package/src/file-manager/models/navigation-pane-settings-model.d.ts +11 -0
- package/src/file-manager/models/navigation-pane-settings.d.ts +10 -0
- package/src/file-manager/models/navigation-pane-settings.js +3 -0
- package/src/file-manager/models/upload-settings-model.d.ts +13 -0
- package/src/file-manager/models/upload-settings.d.ts +12 -0
- package/src/file-manager/models/upload-settings.js +3 -0
- package/src/file-manager/models/virtualization-settings-model.d.ts +29 -0
- package/src/file-manager/models/virtualization-settings.d.ts +24 -0
- package/src/file-manager/models/virtualization-settings.js +40 -0
- package/src/file-manager/pop-up/context-menu.js +1 -1
- package/src/file-manager/pop-up/dialog.js +11 -4
- package/src/global.js +1 -1
- package/styles/bootstrap-dark.css +55 -399
- package/styles/bootstrap.css +55 -396
- package/styles/bootstrap4.css +55 -404
- package/styles/bootstrap5-dark.css +56 -408
- package/styles/bootstrap5.css +56 -408
- package/styles/fabric-dark.css +54 -392
- package/styles/fabric.css +54 -392
- package/styles/file-manager/_all.scss +1 -1
- package/styles/file-manager/_bootstrap-dark-definition.scss +1 -1
- package/styles/file-manager/_bootstrap-definition.scss +1 -1
- package/styles/file-manager/_bootstrap4-definition.scss +1 -1
- package/styles/file-manager/_bootstrap5-definition.scss +3 -3
- package/styles/file-manager/_fabric-dark-definition.scss +1 -1
- package/styles/file-manager/_fabric-definition.scss +1 -1
- package/styles/file-manager/_fluent-dark-definition.scss +1 -0
- package/styles/file-manager/_fluent-definition.scss +10 -10
- package/styles/file-manager/_fusionnew-definition.scss +237 -0
- package/styles/file-manager/_highcontrast-definition.scss +1 -1
- package/styles/file-manager/_highcontrast-light-definition.scss +1 -1
- package/styles/file-manager/_layout.scss +65 -16
- package/styles/file-manager/_material-dark-definition.scss +1 -1
- package/styles/file-manager/_material-definition.scss +1 -1
- package/styles/file-manager/_material3-definition.scss +237 -0
- package/styles/file-manager/_tailwind-definition.scss +2 -2
- package/styles/file-manager/_theme.scss +39 -10
- package/styles/file-manager/bootstrap-dark.css +55 -399
- package/styles/file-manager/bootstrap.css +55 -396
- package/styles/file-manager/bootstrap4.css +55 -404
- package/styles/file-manager/bootstrap5-dark.css +56 -408
- package/styles/file-manager/bootstrap5.css +56 -408
- package/styles/file-manager/fabric-dark.css +54 -392
- package/styles/file-manager/fabric.css +54 -392
- package/styles/file-manager/fluent-dark.css +1568 -0
- package/styles/file-manager/fluent-dark.scss +16 -0
- package/styles/file-manager/fluent.css +1567 -0
- package/styles/file-manager/fluent.scss +16 -0
- package/styles/file-manager/highcontrast-light.css +54 -394
- package/styles/file-manager/highcontrast.css +73 -393
- package/styles/file-manager/icons/_bootstrap.scss +0 -1
- package/styles/file-manager/icons/_bootstrap4.scss +0 -1
- package/styles/file-manager/icons/_fabric-dark.scss +0 -1
- package/styles/file-manager/icons/_fabric.scss +0 -1
- package/styles/file-manager/icons/_fluent-dark.scss +1 -0
- package/styles/file-manager/icons/_fluent.scss +19 -19
- package/styles/file-manager/icons/_fusionnew.scss +235 -0
- package/styles/file-manager/icons/_material3.scss +235 -0
- package/styles/file-manager/icons/_tailwind.scss +49 -49
- package/styles/file-manager/material-dark.css +55 -403
- package/styles/file-manager/material.css +55 -400
- package/styles/file-manager/tailwind-dark.css +76 -424
- package/styles/file-manager/tailwind.css +76 -424
- package/styles/fluent-dark.css +1568 -0
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent.css +1567 -0
- package/styles/fluent.scss +1 -0
- package/styles/highcontrast-light.css +54 -394
- package/styles/highcontrast.css +73 -393
- package/styles/material-dark.css +55 -403
- package/styles/material.css +55 -400
- package/styles/tailwind-dark.css +76 -424
- package/styles/tailwind.css +76 -424
@@ -40,6 +40,9 @@ var DetailsView = /** @class */ (function () {
|
|
40
40
|
this.isNameWidth = false;
|
41
41
|
this.pasteOperation = false;
|
42
42
|
this.uploadOperation = false;
|
43
|
+
/* istanbul ignore next */
|
44
|
+
// eslint:disable-next-line
|
45
|
+
this.actionDivert = false;
|
43
46
|
Grid.Inject(Resize, ContextMenu, Sort, VirtualScroll);
|
44
47
|
this.parent = parent;
|
45
48
|
this.element = select('#' + this.parent.element.id + CLS.GRID_ID, this.parent.element);
|
@@ -71,9 +74,9 @@ var DetailsView = /** @class */ (function () {
|
|
71
74
|
home: 'home',
|
72
75
|
moveUp: 'uparrow',
|
73
76
|
del: 'delete',
|
74
|
-
ctrlX: 'ctrl+x',
|
75
|
-
ctrlC: 'ctrl+c',
|
76
|
-
ctrlV: 'ctrl+v',
|
77
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
78
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
79
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
77
80
|
ctrlShiftN: 'ctrl+shift+n',
|
78
81
|
shiftdel: 'shift+delete',
|
79
82
|
ctrlD: 'ctrl+d',
|
@@ -114,6 +117,10 @@ var DetailsView = /** @class */ (function () {
|
|
114
117
|
},
|
115
118
|
enableRtl: this.parent.enableRtl,
|
116
119
|
pageSettings: { pageSize: 20 },
|
120
|
+
// enableVirtualization: this.parent.virtualizationSettings.enable,
|
121
|
+
enablePersistence: this.parent.enablePersistence,
|
122
|
+
// enableVirtualMaskRow: true,
|
123
|
+
// pageSettings: { pageSize: this.parent.virtualizationSettings.detailsViewItemsCount },
|
117
124
|
sortSettings: { allowUnsort: false, columns: sortSettings },
|
118
125
|
columns: columns,
|
119
126
|
recordDoubleClick: this.DblClickEvents.bind(this),
|
@@ -322,14 +329,19 @@ var DetailsView = /** @class */ (function () {
|
|
322
329
|
}
|
323
330
|
};
|
324
331
|
DetailsView.prototype.onBeforeDataBound = function (args) {
|
332
|
+
// if (!this.parent.virtualizationSettings.enable) {
|
325
333
|
showSpinner(this.parent.element);
|
326
334
|
// eslint-disable-next-line
|
327
335
|
var items = getSortedData(this.parent, this.gridObj.dataSource);
|
328
336
|
args.result = items;
|
337
|
+
// }
|
329
338
|
};
|
330
339
|
/* istanbul ignore next */
|
331
340
|
DetailsView.prototype.onDataBound = function () {
|
332
341
|
this.createDragObj();
|
342
|
+
// if ((this.parent.selectedItems.length !== 0 && !this.parent.virtualizationSettings.enable) ||
|
343
|
+
// ((this.parent.selectedItems.length !== 0 && this.parent.virtualizationSettings.enable &&
|
344
|
+
// this.element.querySelector('.e-content').scrollTop == 0))) {
|
333
345
|
if (this.parent.selectedItems.length !== 0) {
|
334
346
|
this.selectRecords(this.parent.selectedItems);
|
335
347
|
}
|
@@ -599,6 +611,7 @@ var DetailsView = /** @class */ (function () {
|
|
599
611
|
var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
|
600
612
|
if (val === '' && !_this.parent.isFiltered) {
|
601
613
|
var id = getValue('id', data);
|
614
|
+
_this.parent.oldPath = _this.parent.path;
|
602
615
|
var newPath = _this.parent.path + (isNOU(id) ? name_2 : id) + '/';
|
603
616
|
_this.parent.setProperties({ path: newPath }, true);
|
604
617
|
_this.parent.pathNames.push(name_2);
|
@@ -884,7 +897,13 @@ var DetailsView = /** @class */ (function () {
|
|
884
897
|
if (!dragLi) {
|
885
898
|
return null;
|
886
899
|
}
|
887
|
-
var name
|
900
|
+
var name;
|
901
|
+
if (dragLi.getElementsByClassName('e-fe-text')[0]) {
|
902
|
+
name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
|
903
|
+
}
|
904
|
+
else if (dragLi.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling) {
|
905
|
+
name = dragLi.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText;
|
906
|
+
}
|
888
907
|
if (dragLi && !dragLi.querySelector('.e-active')) {
|
889
908
|
this.selectRecords([name]);
|
890
909
|
}
|
@@ -1085,6 +1104,10 @@ var DetailsView = /** @class */ (function () {
|
|
1085
1104
|
}
|
1086
1105
|
var len = rows.length;
|
1087
1106
|
if (len > 0) {
|
1107
|
+
// if (this.parent.virtualizationSettings.enable) {
|
1108
|
+
// this.parent.currentItemText = getValue('name', args.data);
|
1109
|
+
// }
|
1110
|
+
// else if (len > 0) {
|
1088
1111
|
// eslint-disable-next-line
|
1089
1112
|
var data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
1090
1113
|
this.parent.currentItemText = getValue('name', data);
|
@@ -1228,7 +1251,7 @@ var DetailsView = /** @class */ (function () {
|
|
1228
1251
|
};
|
1229
1252
|
DetailsView.prototype.getFocusedItemIndex = function () {
|
1230
1253
|
return (!isNOU(this.getFocusedItem())) ?
|
1231
|
-
parseInt(this.getFocusedItem().getAttribute('
|
1254
|
+
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
1232
1255
|
};
|
1233
1256
|
/* istanbul ignore next */
|
1234
1257
|
// eslint:disable-next-line
|
@@ -1267,14 +1290,13 @@ var DetailsView = /** @class */ (function () {
|
|
1267
1290
|
case 'f2':
|
1268
1291
|
case 'moveDown':
|
1269
1292
|
case 'moveUp':
|
1293
|
+
case 'ctrlD':
|
1270
1294
|
e.preventDefault();
|
1271
1295
|
break;
|
1272
1296
|
default:
|
1273
1297
|
break;
|
1274
1298
|
}
|
1275
1299
|
};
|
1276
|
-
/* istanbul ignore next */
|
1277
|
-
// eslint:disable-next-line
|
1278
1300
|
DetailsView.prototype.keyupHandler = function (e) {
|
1279
1301
|
if (!this.isRendered) {
|
1280
1302
|
return;
|
@@ -1351,8 +1373,13 @@ var DetailsView = /** @class */ (function () {
|
|
1351
1373
|
else if (this.gridObj.selectedRowIndex !== -1 && e.action === 'tab') {
|
1352
1374
|
return;
|
1353
1375
|
}
|
1376
|
+
else if (!this.actionDivert) {
|
1377
|
+
this.addHeaderFocus();
|
1378
|
+
this.actionDivert = true;
|
1379
|
+
}
|
1354
1380
|
else {
|
1355
1381
|
this.addFocus(0);
|
1382
|
+
this.actionDivert = false;
|
1356
1383
|
}
|
1357
1384
|
}
|
1358
1385
|
break;
|
@@ -1639,6 +1666,18 @@ var DetailsView = /** @class */ (function () {
|
|
1639
1666
|
addClass([itemElement], [CLS.FOCUS, CLS.FOCUSED]);
|
1640
1667
|
}
|
1641
1668
|
};
|
1669
|
+
DetailsView.prototype.addHeaderFocus = function () {
|
1670
|
+
var treeFocus = select('.e-row', this.element);
|
1671
|
+
this.gridObj.element.setAttribute('tabindex', '-1');
|
1672
|
+
var nameFocus = select('th.e-fe-grid-name', this.element);
|
1673
|
+
nameFocus.setAttribute('tabindex', '0');
|
1674
|
+
nameFocus.focus();
|
1675
|
+
addClass([nameFocus], [CLS.FOCUS, CLS.FOCUSED]);
|
1676
|
+
treeFocus.setAttribute('tabindex', '0');
|
1677
|
+
if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
|
1678
|
+
removeClass([treeFocus], [CLS.FOCUS, CLS.FOCUSED]);
|
1679
|
+
}
|
1680
|
+
};
|
1642
1681
|
DetailsView.prototype.getFocusedItem = function () {
|
1643
1682
|
return select('.' + CLS.FOCUSED, this.element);
|
1644
1683
|
};
|
@@ -12,8 +12,9 @@ export declare class LargeIconsView {
|
|
12
12
|
private keyboardDownModule;
|
13
13
|
private keyConfigs;
|
14
14
|
private isInteraction;
|
15
|
-
|
15
|
+
itemList: HTMLElement[];
|
16
16
|
items: Object[];
|
17
|
+
allItems: Object[];
|
17
18
|
private clickObj;
|
18
19
|
private perRow;
|
19
20
|
private startItem;
|
@@ -72,9 +72,9 @@ var LargeIconsView = /** @class */ (function () {
|
|
72
72
|
altEnter: 'alt+enter',
|
73
73
|
esc: 'escape',
|
74
74
|
del: 'delete',
|
75
|
-
ctrlX: 'ctrl+x',
|
76
|
-
ctrlC: 'ctrl+c',
|
77
|
-
ctrlV: 'ctrl+v',
|
75
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
76
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
77
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
78
78
|
f2: 'f2',
|
79
79
|
shiftdel: 'shift+delete',
|
80
80
|
back: 'backspace',
|
@@ -111,7 +111,10 @@ var LargeIconsView = /** @class */ (function () {
|
|
111
111
|
};
|
112
112
|
this.items = [];
|
113
113
|
this.items = this.renderList(args);
|
114
|
-
this.items = getSortedData(this.parent, this.items);
|
114
|
+
this.items = this.allItems = getSortedData(this.parent, this.items);
|
115
|
+
// if (this.parent.virtualizationSettings.enable) {
|
116
|
+
// this.items = this.allItems.slice(0, this.parent.virtualizationSettings.largeIconsViewItemsCount);
|
117
|
+
// }
|
115
118
|
// eslint-disable-next-line
|
116
119
|
this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
|
117
120
|
this.itemList = Array.prototype.slice.call(selectAll('.' + CLS.LIST_ITEM, this.listElements));
|
@@ -153,6 +156,10 @@ var LargeIconsView = /** @class */ (function () {
|
|
153
156
|
this.getItemCount();
|
154
157
|
this.addEventListener();
|
155
158
|
this.wireEvents();
|
159
|
+
// if (this.parent.virtualizationSettings.enable && this.allItems.length > 0) {
|
160
|
+
// this.parent.virtualizationModule.setUlElementHeight();
|
161
|
+
// this.parent.virtualizationModule.wireScrollEvent(false);
|
162
|
+
// }
|
156
163
|
this.isRendered = true;
|
157
164
|
hideSpinner(this.parent.element);
|
158
165
|
if (this.parent.selectedItems.length) {
|
@@ -855,6 +862,7 @@ var LargeIconsView = /** @class */ (function () {
|
|
855
862
|
var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
|
856
863
|
if (val === '' && !_this.parent.isFiltered) {
|
857
864
|
var id = getValue('id', details_1);
|
865
|
+
_this.parent.oldPath = _this.parent.path;
|
858
866
|
var newPath = _this.parent.path + (isNOU(id) ? text : id) + '/';
|
859
867
|
_this.parent.setProperties({ path: newPath }, true);
|
860
868
|
_this.parent.pathNames.push(text);
|
@@ -1474,7 +1482,7 @@ var LargeIconsView = /** @class */ (function () {
|
|
1474
1482
|
else {
|
1475
1483
|
for (var i = 0, len = this.items.length; i < len; i++) {
|
1476
1484
|
var name_2 = getValue('filterPath', this.items[i]) + getValue('name', this.items[i]);
|
1477
|
-
if (items.indexOf(name_2) !== -1) {
|
1485
|
+
if ((items.indexOf(name_2) !== -1) || (items.indexOf(getValue(filterName, this.items[i])) !== -1)) {
|
1478
1486
|
indexes.push(i);
|
1479
1487
|
}
|
1480
1488
|
}
|
@@ -20,6 +20,7 @@ var NavigationPane = /** @class */ (function () {
|
|
20
20
|
* @param {IFileManager} parent - specifies the parent element.
|
21
21
|
* @hidden
|
22
22
|
*/
|
23
|
+
/* istanbul ignore next */
|
23
24
|
function NavigationPane(parent) {
|
24
25
|
this.removeNodes = [];
|
25
26
|
this.moveNames = [];
|
@@ -41,9 +42,9 @@ var NavigationPane = /** @class */ (function () {
|
|
41
42
|
altEnter: 'alt+enter',
|
42
43
|
esc: 'escape',
|
43
44
|
del: 'delete',
|
44
|
-
ctrlX: 'ctrl+x',
|
45
|
-
ctrlC: 'ctrl+c',
|
46
|
-
ctrlV: 'ctrl+v',
|
45
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
46
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
47
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
47
48
|
ctrlShiftN: 'ctrl+shift+n',
|
48
49
|
shiftF10: 'shift+F10',
|
49
50
|
f2: 'f2'
|
@@ -74,6 +75,7 @@ var NavigationPane = /** @class */ (function () {
|
|
74
75
|
hasChildren: 'hasChild', iconCss: '_fm_icon', htmlAttributes: '_fm_htmlAttr', tooltip: 'name'
|
75
76
|
},
|
76
77
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
78
|
+
sortOrder: this.parent.navigationPaneSettings.sortOrder,
|
77
79
|
nodeSelecting: this.onNodeSelecting.bind(this),
|
78
80
|
nodeSelected: this.onNodeSelected.bind(this),
|
79
81
|
nodeExpanding: this.onNodeExpand.bind(this),
|
@@ -195,7 +197,7 @@ var NavigationPane = /** @class */ (function () {
|
|
195
197
|
this.parent.trigger('fileOpen', eventArgs);
|
196
198
|
args.cancel = eventArgs.cancel;
|
197
199
|
if (args.cancel) {
|
198
|
-
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0]
|
200
|
+
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] !== args.node.getAttribute('data-uid') : false;
|
199
201
|
this.treeObj.selectedNodes = this.isNodeClickCalled ? this.previousSelected : this.treeObj.selectedNodes;
|
200
202
|
this.previousSelected = this.treeObj.selectedNodes;
|
201
203
|
if (!isNOU(this.parent) && !isNOU(this.parent.contextmenuModule)) {
|
@@ -233,13 +235,16 @@ var NavigationPane = /** @class */ (function () {
|
|
233
235
|
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
234
236
|
this.parent.selectedItems = [];
|
235
237
|
this.parent.itemData = nodeData;
|
238
|
+
var previousPath = this.parent.path;
|
236
239
|
updatePath(args.node, this.parent.itemData[0], this.parent);
|
237
|
-
this.
|
238
|
-
|
239
|
-
|
240
|
+
if (previousPath !== this.parent.path) {
|
241
|
+
this.expandNodeTarget = null;
|
242
|
+
if (args.node.querySelector('.' + CLS.ICONS) && args.node.querySelector('.' + CLS.LIST_ITEM) === null) {
|
243
|
+
this.expandNodeTarget = 'add';
|
244
|
+
}
|
245
|
+
read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
|
246
|
+
this.parent.visitedItem = args.node;
|
240
247
|
}
|
241
|
-
read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
|
242
|
-
this.parent.visitedItem = args.node;
|
243
248
|
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
244
249
|
};
|
245
250
|
/* istanbul ignore next */
|
@@ -297,7 +302,7 @@ var NavigationPane = /** @class */ (function () {
|
|
297
302
|
var currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
|
298
303
|
if (this.expandNodeTarget === 'add') {
|
299
304
|
var sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
|
300
|
-
var ul = select('.' + CLS.LIST_PARENT, sNode);
|
305
|
+
var ul = (!isNOU(sNode)) ? select('.' + CLS.LIST_PARENT, sNode) : null;
|
301
306
|
if (isNOU(ul)) {
|
302
307
|
this.addChild(args.files, this.treeObj.selectedNodes[0], !this.expandTree);
|
303
308
|
}
|
@@ -307,6 +312,8 @@ var NavigationPane = /** @class */ (function () {
|
|
307
312
|
if (isNOU(currFiles)) {
|
308
313
|
setValue(this.parent.pathId[this.parent.pathId.length - 1], args.files, this.parent.feFiles);
|
309
314
|
}
|
315
|
+
if (this.parent.uploadObj.directoryUpload)
|
316
|
+
this.updateTree(args);
|
310
317
|
};
|
311
318
|
NavigationPane.prototype.updateTree = function (args) {
|
312
319
|
if (this.treeObj) {
|
@@ -463,6 +470,9 @@ var NavigationPane = /** @class */ (function () {
|
|
463
470
|
break;
|
464
471
|
case 'navigationPaneSettings':
|
465
472
|
read(this.parent, events.finalizeEnd, '/');
|
473
|
+
if (e.oldProp.navigationPaneSettings.sortOrder !== e.newProp.navigationPaneSettings.sortOrder) {
|
474
|
+
this.treeObj.sortOrder = e.newProp.navigationPaneSettings.sortOrder;
|
475
|
+
}
|
466
476
|
break;
|
467
477
|
}
|
468
478
|
}
|
@@ -755,13 +765,15 @@ var NavigationPane = /** @class */ (function () {
|
|
755
765
|
removeActive(this.parent);
|
756
766
|
break;
|
757
767
|
case 'del':
|
758
|
-
this.
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
768
|
+
if (this.parent.pathId[0] !== this.activeNode.getAttribute('data-uid')) {
|
769
|
+
this.updateItemData();
|
770
|
+
if (!hasEditAccess(this.parent.itemData[0])) {
|
771
|
+
createDeniedDialog(this.parent, this.parent.itemData[0], events.permissionEdit);
|
772
|
+
}
|
773
|
+
else {
|
774
|
+
this.removeNodes = [];
|
775
|
+
createDialog(this.parent, 'Delete');
|
776
|
+
}
|
765
777
|
}
|
766
778
|
break;
|
767
779
|
case 'ctrlC':
|
@@ -9,6 +9,8 @@ export * from './search-settings';
|
|
9
9
|
export * from './search-settings-model';
|
10
10
|
export * from './details-view-settings-model';
|
11
11
|
export * from './details-view-settings';
|
12
|
+
export * from './virtualization-settings-model';
|
13
|
+
export * from './virtualization-settings';
|
12
14
|
export * from './contextMenu-settings';
|
13
15
|
export * from './contextMenu-settings-model';
|
14
16
|
export * from './navigation-pane-settings-model';
|
@@ -5,6 +5,7 @@ export * from './ajax-settings';
|
|
5
5
|
export * from './toolbar-settings';
|
6
6
|
export * from './search-settings';
|
7
7
|
export * from './details-view-settings';
|
8
|
+
export * from './virtualization-settings';
|
8
9
|
export * from './contextMenu-settings';
|
9
10
|
export * from './navigation-pane-settings';
|
10
11
|
export * from './upload-settings';
|
@@ -26,4 +26,15 @@ export interface NavigationPaneSettingsModel {
|
|
26
26
|
*/
|
27
27
|
visible?: boolean;
|
28
28
|
|
29
|
+
/**
|
30
|
+
* Specifies a value that indicates how to sort the folders in the navigation pane of the file manager component.
|
31
|
+
*
|
32
|
+
* If the sortOrder is Ascending, the folders are sorted in ascending order.
|
33
|
+
* If the sortOrder is Descending, the folders are sorted in descending order.
|
34
|
+
* If the sortOrder is None, the folders are not sorted.
|
35
|
+
*
|
36
|
+
* @default 'None'
|
37
|
+
*/
|
38
|
+
sortOrder?: 'None' | 'Ascending' | 'Descending';
|
39
|
+
|
29
40
|
}
|
@@ -21,4 +21,14 @@ export declare class NavigationPaneSettings extends ChildProperty<NavigationPane
|
|
21
21
|
* @default true
|
22
22
|
*/
|
23
23
|
visible: boolean;
|
24
|
+
/**
|
25
|
+
* Specifies a value that indicates how to sort the folders in the navigation pane of the file manager component.
|
26
|
+
*
|
27
|
+
* If the sortOrder is Ascending, the folders are sorted in ascending order.
|
28
|
+
* If the sortOrder is Descending, the folders are sorted in descending order.
|
29
|
+
* If the sortOrder is None, the folders are not sorted.
|
30
|
+
*
|
31
|
+
* @default 'None'
|
32
|
+
*/
|
33
|
+
sortOrder: 'None' | 'Ascending' | 'Descending';
|
24
34
|
}
|
@@ -35,6 +35,9 @@ var NavigationPaneSettings = /** @class */ (function (_super) {
|
|
35
35
|
__decorate([
|
36
36
|
Property(true)
|
37
37
|
], NavigationPaneSettings.prototype, "visible", void 0);
|
38
|
+
__decorate([
|
39
|
+
Property('None')
|
40
|
+
], NavigationPaneSettings.prototype, "sortOrder", void 0);
|
38
41
|
return NavigationPaneSettings;
|
39
42
|
}(ChildProperty));
|
40
43
|
export { NavigationPaneSettings };
|
@@ -29,6 +29,19 @@ export interface UploadSettingsModel {
|
|
29
29
|
*/
|
30
30
|
autoClose?: boolean;
|
31
31
|
|
32
|
+
/**
|
33
|
+
* Specifies a Boolean value that indicates whether the folder (directory) can be browsed and uploaded in the FileManager component.
|
34
|
+
* This property allows to select or drop to upload the folders (directories) instead of files. When folder upload is enabled, all the folder contents including hierarchy folders and files are considered to upload.
|
35
|
+
* Folder (directory) upload is supported for the following file system providers,
|
36
|
+
* - Physical provider
|
37
|
+
* - NodeJS provider
|
38
|
+
* - Azure provider
|
39
|
+
* - Amazon S3 provider
|
40
|
+
*
|
41
|
+
* @default false
|
42
|
+
*/
|
43
|
+
directoryUpload?: boolean;
|
44
|
+
|
32
45
|
/**
|
33
46
|
* Specifies the minimum file size to be uploaded in bytes.
|
34
47
|
* The property is used to make sure that you cannot upload empty files and small files.
|
@@ -24,6 +24,18 @@ export declare class UploadSettings extends ChildProperty<UploadSettings> {
|
|
24
24
|
* @default false
|
25
25
|
*/
|
26
26
|
autoClose: boolean;
|
27
|
+
/**
|
28
|
+
* Specifies a Boolean value that indicates whether the folder (directory) can be browsed and uploaded in the FileManager component.
|
29
|
+
* This property allows to select or drop to upload the folders (directories) instead of files. When folder upload is enabled, all the folder contents including hierarchy folders and files are considered to upload.
|
30
|
+
* Folder (directory) upload is supported for the following file system providers,
|
31
|
+
* - Physical provider
|
32
|
+
* - NodeJS provider
|
33
|
+
* - Azure provider
|
34
|
+
* - Amazon S3 provider
|
35
|
+
*
|
36
|
+
* @default false
|
37
|
+
*/
|
38
|
+
directoryUpload: boolean;
|
27
39
|
/**
|
28
40
|
* Specifies the minimum file size to be uploaded in bytes.
|
29
41
|
* The property is used to make sure that you cannot upload empty files and small files.
|
@@ -35,6 +35,9 @@ var UploadSettings = /** @class */ (function (_super) {
|
|
35
35
|
__decorate([
|
36
36
|
Property(false)
|
37
37
|
], UploadSettings.prototype, "autoClose", void 0);
|
38
|
+
__decorate([
|
39
|
+
Property(false)
|
40
|
+
], UploadSettings.prototype, "directoryUpload", void 0);
|
38
41
|
__decorate([
|
39
42
|
Property(0)
|
40
43
|
], UploadSettings.prototype, "minFileSize", void 0);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Property, ChildProperty } from '@syncfusion/ej2-base';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Interface for a class VirtualizationSettings
|
5
|
+
*/
|
6
|
+
export interface VirtualizationSettingsModel {
|
7
|
+
|
8
|
+
/**
|
9
|
+
* If `enable` is set to true, it will increase the FileManager performance, while loading a large number of files/folders.
|
10
|
+
*
|
11
|
+
* @default false
|
12
|
+
*/
|
13
|
+
enable?: boolean;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Defines the number of records to be displayed in the details view.
|
17
|
+
*
|
18
|
+
* @default 20
|
19
|
+
*/
|
20
|
+
detailsViewItemsCount?: number;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Defines the number of records to be displayed in large icons view.
|
24
|
+
*
|
25
|
+
* @default 40
|
26
|
+
*/
|
27
|
+
largeIconsViewItemsCount?: number;
|
28
|
+
|
29
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ChildProperty } from '@syncfusion/ej2-base';
|
2
|
+
/**
|
3
|
+
* Specifies the virtualization settings of the File Manager.
|
4
|
+
*/
|
5
|
+
export declare class VirtualizationSettings extends ChildProperty<VirtualizationSettings> {
|
6
|
+
/**
|
7
|
+
* If `enable` is set to true, it will increase the FileManager performance, while loading a large number of files/folders.
|
8
|
+
*
|
9
|
+
* @default false
|
10
|
+
*/
|
11
|
+
private enable;
|
12
|
+
/**
|
13
|
+
* Defines the number of records to be displayed in the details view.
|
14
|
+
*
|
15
|
+
* @default 20
|
16
|
+
*/
|
17
|
+
private detailsViewItemsCount;
|
18
|
+
/**
|
19
|
+
* Defines the number of records to be displayed in large icons view.
|
20
|
+
*
|
21
|
+
* @default 40
|
22
|
+
*/
|
23
|
+
private largeIconsViewItemsCount;
|
24
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
extendStatics(d, b);
|
10
|
+
function __() { this.constructor = d; }
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12
|
+
};
|
13
|
+
})();
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
19
|
+
};
|
20
|
+
import { Property, ChildProperty } from '@syncfusion/ej2-base';
|
21
|
+
/**
|
22
|
+
* Specifies the virtualization settings of the File Manager.
|
23
|
+
*/
|
24
|
+
var VirtualizationSettings = /** @class */ (function (_super) {
|
25
|
+
__extends(VirtualizationSettings, _super);
|
26
|
+
function VirtualizationSettings() {
|
27
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
28
|
+
}
|
29
|
+
__decorate([
|
30
|
+
Property(false)
|
31
|
+
], VirtualizationSettings.prototype, "enable", void 0);
|
32
|
+
__decorate([
|
33
|
+
Property(20)
|
34
|
+
], VirtualizationSettings.prototype, "detailsViewItemsCount", void 0);
|
35
|
+
__decorate([
|
36
|
+
Property(40)
|
37
|
+
], VirtualizationSettings.prototype, "largeIconsViewItemsCount", void 0);
|
38
|
+
return VirtualizationSettings;
|
39
|
+
}(ChildProperty));
|
40
|
+
export { VirtualizationSettings };
|
@@ -117,7 +117,7 @@ var ContextMenu = /** @class */ (function () {
|
|
117
117
|
data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
|
118
118
|
if (isNOU(this.targetElement.getAttribute('aria-selected'))) {
|
119
119
|
/* istanbul ignore next */
|
120
|
-
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('
|
120
|
+
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('data-rowindex'), 10)]);
|
121
121
|
}
|
122
122
|
selected = true;
|
123
123
|
/* istanbul ignore next */
|
@@ -653,11 +653,18 @@ function getOptions(parent, text, e, details, replaceItems) {
|
|
653
653
|
];
|
654
654
|
break;
|
655
655
|
case 'MultipleFileDetails':
|
656
|
+
var index_1;
|
656
657
|
options.dialogName = 'File Details';
|
657
|
-
strArr =
|
658
|
-
|
659
|
-
return (
|
658
|
+
strArr = parent.itemData.map(function (val) {
|
659
|
+
index_1 = val.name.indexOf('.') + 1;
|
660
|
+
return (index_1 === 0 && (!val.isFile)) ? 'Folder' : ((index_1 !== 0) ? val.name.substr(index_1).replace(' ', '') : 'undetermined');
|
660
661
|
});
|
662
|
+
if (strArr[0] == undefined) {
|
663
|
+
strArr = details.name.split(',').map(function (val) {
|
664
|
+
index_1 = val.indexOf('.') + 1;
|
665
|
+
return (index_1 === 0) ? 'Folder' : val.substr(index_1).replace(' ', '');
|
666
|
+
});
|
667
|
+
}
|
661
668
|
fileType = strArr.every(function (val, i, arr) { return val === arr[0]; }) ?
|
662
669
|
((strArr[0] === 'Folder') ? 'Folder' : strArr[0].toLocaleUpperCase() + ' Type') : 'Multiple Types';
|
663
670
|
location = details.location;
|
@@ -889,7 +896,7 @@ function onSubmitValidate(parent, ele) {
|
|
889
896
|
onValidate(parent, ele);
|
890
897
|
var len = ele.value.length - 1;
|
891
898
|
if (ele.value !== '' && ((ele.value.lastIndexOf('.') === len) || (ele.value.lastIndexOf(' ') === len)) &&
|
892
|
-
(parent.showFileExtension || (
|
899
|
+
(parent.showFileExtension || (ele.value.lastIndexOf('.') === -1 || ele.value.substring(ele.value.indexOf('.') + 1).length === 0))) {
|
893
900
|
addInvalid(parent, ele);
|
894
901
|
}
|
895
902
|
}
|
package/src/global.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import * as index from './index';
|
2
|
-
index.FileManager.Inject(index.DetailsView, index.NavigationPane, index.LargeIconsView, index.Toolbar, index.ContextMenu, index.BreadCrumbBar);
|
2
|
+
index.FileManager.Inject(index.DetailsView, index.NavigationPane, index.LargeIconsView, index.Toolbar, index.ContextMenu, index.BreadCrumbBar, index.Virtualization);
|
3
3
|
export * from './index';
|