@syncfusion/ej2-filemanager 19.4.47 → 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 +15 -16
- 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
@@ -202,6 +202,45 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
202
202
|
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;
|
203
203
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
204
204
|
};
|
205
|
+
/**
|
206
|
+
* Specifies the virtualization settings of the File Manager.
|
207
|
+
*/
|
208
|
+
var VirtualizationSettings = /** @__PURE__ @class */ (function (_super) {
|
209
|
+
__extends$4(VirtualizationSettings, _super);
|
210
|
+
function VirtualizationSettings() {
|
211
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
212
|
+
}
|
213
|
+
__decorate$4([
|
214
|
+
Property(false)
|
215
|
+
], VirtualizationSettings.prototype, "enable", void 0);
|
216
|
+
__decorate$4([
|
217
|
+
Property(20)
|
218
|
+
], VirtualizationSettings.prototype, "detailsViewItemsCount", void 0);
|
219
|
+
__decorate$4([
|
220
|
+
Property(40)
|
221
|
+
], VirtualizationSettings.prototype, "largeIconsViewItemsCount", void 0);
|
222
|
+
return VirtualizationSettings;
|
223
|
+
}(ChildProperty));
|
224
|
+
|
225
|
+
var __extends$5 = (undefined && undefined.__extends) || (function () {
|
226
|
+
var extendStatics = function (d, b) {
|
227
|
+
extendStatics = Object.setPrototypeOf ||
|
228
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
229
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
230
|
+
return extendStatics(d, b);
|
231
|
+
};
|
232
|
+
return function (d, b) {
|
233
|
+
extendStatics(d, b);
|
234
|
+
function __() { this.constructor = d; }
|
235
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
236
|
+
};
|
237
|
+
})();
|
238
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
239
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
240
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
241
|
+
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;
|
242
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
243
|
+
};
|
205
244
|
var fileItems = ['Open', '|', 'Cut', 'Copy', '|', 'Delete', 'Download', 'Rename', '|', 'Details'];
|
206
245
|
var folderItems = ['Open', '|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Rename', 'Download', '|', 'Details'];
|
207
246
|
var layoutItems = [
|
@@ -211,26 +250,26 @@ var layoutItems = [
|
|
211
250
|
* Specifies the ContextMenu settings of the File Manager.
|
212
251
|
*/
|
213
252
|
var ContextMenuSettings = /** @__PURE__ @class */ (function (_super) {
|
214
|
-
__extends$
|
253
|
+
__extends$5(ContextMenuSettings, _super);
|
215
254
|
function ContextMenuSettings() {
|
216
255
|
return _super !== null && _super.apply(this, arguments) || this;
|
217
256
|
}
|
218
|
-
__decorate$
|
257
|
+
__decorate$5([
|
219
258
|
Property(fileItems)
|
220
259
|
], ContextMenuSettings.prototype, "file", void 0);
|
221
|
-
__decorate$
|
260
|
+
__decorate$5([
|
222
261
|
Property(folderItems)
|
223
262
|
], ContextMenuSettings.prototype, "folder", void 0);
|
224
|
-
__decorate$
|
263
|
+
__decorate$5([
|
225
264
|
Property(layoutItems)
|
226
265
|
], ContextMenuSettings.prototype, "layout", void 0);
|
227
|
-
__decorate$
|
266
|
+
__decorate$5([
|
228
267
|
Property(true)
|
229
268
|
], ContextMenuSettings.prototype, "visible", void 0);
|
230
269
|
return ContextMenuSettings;
|
231
270
|
}(ChildProperty));
|
232
271
|
|
233
|
-
var __extends$
|
272
|
+
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
234
273
|
var extendStatics = function (d, b) {
|
235
274
|
extendStatics = Object.setPrototypeOf ||
|
236
275
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
@@ -243,7 +282,7 @@ var __extends$5 = (undefined && undefined.__extends) || (function () {
|
|
243
282
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
244
283
|
};
|
245
284
|
})();
|
246
|
-
var __decorate$
|
285
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
247
286
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
248
287
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
249
288
|
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;
|
@@ -253,23 +292,26 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
253
292
|
* Specifies the navigationpane settings of the File Manager.
|
254
293
|
*/
|
255
294
|
var NavigationPaneSettings = /** @__PURE__ @class */ (function (_super) {
|
256
|
-
__extends$
|
295
|
+
__extends$6(NavigationPaneSettings, _super);
|
257
296
|
function NavigationPaneSettings() {
|
258
297
|
return _super !== null && _super.apply(this, arguments) || this;
|
259
298
|
}
|
260
|
-
__decorate$
|
299
|
+
__decorate$6([
|
261
300
|
Property('650px')
|
262
301
|
], NavigationPaneSettings.prototype, "maxWidth", void 0);
|
263
|
-
__decorate$
|
302
|
+
__decorate$6([
|
264
303
|
Property('240px')
|
265
304
|
], NavigationPaneSettings.prototype, "minWidth", void 0);
|
266
|
-
__decorate$
|
305
|
+
__decorate$6([
|
267
306
|
Property(true)
|
268
307
|
], NavigationPaneSettings.prototype, "visible", void 0);
|
308
|
+
__decorate$6([
|
309
|
+
Property('None')
|
310
|
+
], NavigationPaneSettings.prototype, "sortOrder", void 0);
|
269
311
|
return NavigationPaneSettings;
|
270
312
|
}(ChildProperty));
|
271
313
|
|
272
|
-
var __extends$
|
314
|
+
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
273
315
|
var extendStatics = function (d, b) {
|
274
316
|
extendStatics = Object.setPrototypeOf ||
|
275
317
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
@@ -282,7 +324,7 @@ var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
282
324
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
283
325
|
};
|
284
326
|
})();
|
285
|
-
var __decorate$
|
327
|
+
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
286
328
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
287
329
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
288
330
|
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;
|
@@ -292,29 +334,32 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
292
334
|
* Specifies the Ajax settings of the File Manager.
|
293
335
|
*/
|
294
336
|
var UploadSettings = /** @__PURE__ @class */ (function (_super) {
|
295
|
-
__extends$
|
337
|
+
__extends$7(UploadSettings, _super);
|
296
338
|
function UploadSettings() {
|
297
339
|
return _super !== null && _super.apply(this, arguments) || this;
|
298
340
|
}
|
299
|
-
__decorate$
|
341
|
+
__decorate$7([
|
300
342
|
Property('')
|
301
343
|
], UploadSettings.prototype, "allowedExtensions", void 0);
|
302
|
-
__decorate$
|
344
|
+
__decorate$7([
|
303
345
|
Property(true)
|
304
346
|
], UploadSettings.prototype, "autoUpload", void 0);
|
305
|
-
__decorate$
|
347
|
+
__decorate$7([
|
306
348
|
Property(false)
|
307
349
|
], UploadSettings.prototype, "autoClose", void 0);
|
308
|
-
__decorate$
|
350
|
+
__decorate$7([
|
351
|
+
Property(false)
|
352
|
+
], UploadSettings.prototype, "directoryUpload", void 0);
|
353
|
+
__decorate$7([
|
309
354
|
Property(0)
|
310
355
|
], UploadSettings.prototype, "minFileSize", void 0);
|
311
|
-
__decorate$
|
356
|
+
__decorate$7([
|
312
357
|
Property(30000000)
|
313
358
|
], UploadSettings.prototype, "maxFileSize", void 0);
|
314
359
|
return UploadSettings;
|
315
360
|
}(ChildProperty));
|
316
361
|
|
317
|
-
var __extends$
|
362
|
+
var __extends$8 = (undefined && undefined.__extends) || (function () {
|
318
363
|
var extendStatics = function (d, b) {
|
319
364
|
extendStatics = Object.setPrototypeOf ||
|
320
365
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
@@ -327,7 +372,7 @@ var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
327
372
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
328
373
|
};
|
329
374
|
})();
|
330
|
-
var __decorate$
|
375
|
+
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
331
376
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
332
377
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
333
378
|
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;
|
@@ -338,56 +383,56 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
338
383
|
*/
|
339
384
|
/* istanbul ignore next */
|
340
385
|
var Column = /** @__PURE__ @class */ (function (_super) {
|
341
|
-
__extends$
|
386
|
+
__extends$8(Column, _super);
|
342
387
|
function Column() {
|
343
388
|
return _super !== null && _super.apply(this, arguments) || this;
|
344
389
|
}
|
345
|
-
__decorate$
|
390
|
+
__decorate$8([
|
346
391
|
Property('')
|
347
392
|
], Column.prototype, "field", void 0);
|
348
|
-
__decorate$
|
393
|
+
__decorate$8([
|
349
394
|
Property('')
|
350
395
|
], Column.prototype, "headerText", void 0);
|
351
|
-
__decorate$
|
396
|
+
__decorate$8([
|
352
397
|
Property('')
|
353
398
|
], Column.prototype, "width", void 0);
|
354
|
-
__decorate$
|
399
|
+
__decorate$8([
|
355
400
|
Property('')
|
356
401
|
], Column.prototype, "minWidth", void 0);
|
357
|
-
__decorate$
|
402
|
+
__decorate$8([
|
358
403
|
Property('')
|
359
404
|
], Column.prototype, "maxWidth", void 0);
|
360
|
-
__decorate$
|
405
|
+
__decorate$8([
|
361
406
|
Property('Left')
|
362
407
|
], Column.prototype, "textAlign", void 0);
|
363
|
-
__decorate$
|
408
|
+
__decorate$8([
|
364
409
|
Property(null)
|
365
410
|
], Column.prototype, "headerTextAlign", void 0);
|
366
|
-
__decorate$
|
411
|
+
__decorate$8([
|
367
412
|
Property(null)
|
368
413
|
], Column.prototype, "type", void 0);
|
369
|
-
__decorate$
|
414
|
+
__decorate$8([
|
370
415
|
Property(null)
|
371
416
|
], Column.prototype, "format", void 0);
|
372
|
-
__decorate$
|
417
|
+
__decorate$8([
|
373
418
|
Property(null)
|
374
419
|
], Column.prototype, "template", void 0);
|
375
|
-
__decorate$
|
420
|
+
__decorate$8([
|
376
421
|
Property(null)
|
377
422
|
], Column.prototype, "headerTemplate", void 0);
|
378
|
-
__decorate$
|
423
|
+
__decorate$8([
|
379
424
|
Property(true)
|
380
425
|
], Column.prototype, "allowSorting", void 0);
|
381
|
-
__decorate$
|
426
|
+
__decorate$8([
|
382
427
|
Property(true)
|
383
428
|
], Column.prototype, "allowResizing", void 0);
|
384
|
-
__decorate$
|
429
|
+
__decorate$8([
|
385
430
|
Property(null)
|
386
431
|
], Column.prototype, "customAttributes", void 0);
|
387
|
-
__decorate$
|
432
|
+
__decorate$8([
|
388
433
|
Property('')
|
389
434
|
], Column.prototype, "hideAtMedia", void 0);
|
390
|
-
__decorate$
|
435
|
+
__decorate$8([
|
391
436
|
Property(null)
|
392
437
|
], Column.prototype, "customFormat", void 0);
|
393
438
|
return Column;
|
@@ -548,6 +593,8 @@ var SUBMENU_ICON = 'e-caret';
|
|
548
593
|
/** @hidden */
|
549
594
|
var GRID_VIEW = 'e-content';
|
550
595
|
/** @hidden */
|
596
|
+
var GRID_CONTENT = 'e-gridcontent';
|
597
|
+
/** @hidden */
|
551
598
|
var ICON_VIEW = 'e-list-parent';
|
552
599
|
/** @hidden */
|
553
600
|
var ICON_OPEN = 'e-icons e-fe-open';
|
@@ -1020,7 +1067,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
|
|
1020
1067
|
else {
|
1021
1068
|
if (!parent.isFiltered) {
|
1022
1069
|
if (parent.isSortByClicked) {
|
1023
|
-
parent.notify(layoutChange, { files: parent.largeiconsviewModule.
|
1070
|
+
parent.notify(layoutChange, { files: (parent.oldView === 'Details') ? parent.detailsviewModule.gridObj.dataSource : parent.largeiconsviewModule.allItems });
|
1024
1071
|
parent.isSortByClicked = false;
|
1025
1072
|
}
|
1026
1073
|
else {
|
@@ -1041,6 +1088,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
|
|
1041
1088
|
* @private
|
1042
1089
|
*/
|
1043
1090
|
function updateLayout(parent, view) {
|
1091
|
+
parent.oldView = parent.view;
|
1044
1092
|
parent.setProperties({ view: view }, true);
|
1045
1093
|
if (parent.breadcrumbbarModule.searchObj.element.value !== '' || parent.isFiltered) {
|
1046
1094
|
parent.layoutSelectedItems = parent.selectedItems;
|
@@ -1064,7 +1112,7 @@ function updateLayout(parent, view) {
|
|
1064
1112
|
function getTargetModule(parent, element) {
|
1065
1113
|
var tartgetModule = '';
|
1066
1114
|
if (element) {
|
1067
|
-
if (closest(element, '.
|
1115
|
+
if (closest(element, '.' + ROOT + '.' + CONTROL + ' .' + GRID_CONTENT)) {
|
1068
1116
|
tartgetModule = 'detailsview';
|
1069
1117
|
}
|
1070
1118
|
else if (closest(element, '.' + LARGE_ICONS)) {
|
@@ -1205,18 +1253,19 @@ function fileType(file) {
|
|
1205
1253
|
// eslint-disable-next-line
|
1206
1254
|
function getImageUrl(parent, item) {
|
1207
1255
|
var baseUrl = parent.ajaxSettings.getImageUrl ? parent.ajaxSettings.getImageUrl : parent.ajaxSettings.url;
|
1256
|
+
var pathUrl = (baseUrl.indexOf('?') !== -1) ? '&path=' : '?path=';
|
1208
1257
|
var imgUrl;
|
1209
1258
|
var fileName = encodeURIComponent(getValue('name', item));
|
1210
1259
|
var fPath = getValue('filterPath', item);
|
1211
1260
|
if (parent.hasId) {
|
1212
1261
|
var imgId = getValue('id', item);
|
1213
|
-
imgUrl = baseUrl +
|
1262
|
+
imgUrl = baseUrl + pathUrl + parent.path + '&id=' + imgId;
|
1214
1263
|
}
|
1215
1264
|
else if (!isNullOrUndefined(fPath)) {
|
1216
|
-
imgUrl = baseUrl +
|
1265
|
+
imgUrl = baseUrl + pathUrl + encodeURIComponent(fPath.replace(/\\/g, '/')) + fileName;
|
1217
1266
|
}
|
1218
1267
|
else {
|
1219
|
-
imgUrl = baseUrl +
|
1268
|
+
imgUrl = baseUrl + pathUrl + parent.path + fileName;
|
1220
1269
|
}
|
1221
1270
|
imgUrl = imgUrl + '&time=' + (new Date().getTime()).toString();
|
1222
1271
|
var eventArgs = {
|
@@ -1553,6 +1602,15 @@ function pasteHandler(parent) {
|
|
1553
1602
|
parent.enablePaste = false;
|
1554
1603
|
parent.notify(hidePaste, {});
|
1555
1604
|
removeBlur(parent);
|
1605
|
+
var result = {
|
1606
|
+
files: null,
|
1607
|
+
error: {
|
1608
|
+
code: '402',
|
1609
|
+
message: getLocaleText(parent, 'Same-Folder-Error'),
|
1610
|
+
fileExists: null
|
1611
|
+
}
|
1612
|
+
};
|
1613
|
+
createDialog(parent, 'Error', result);
|
1556
1614
|
}
|
1557
1615
|
}
|
1558
1616
|
}
|
@@ -1735,6 +1793,11 @@ function readDropPath(parent) {
|
|
1735
1793
|
else {
|
1736
1794
|
if (parent.navigationpaneModule) {
|
1737
1795
|
var node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
|
1796
|
+
if (!node) {
|
1797
|
+
var liElement = document.querySelector('[data-id = "' + getValue('id', parent.dropData) + '"]');
|
1798
|
+
pathId = liElement.getAttribute("data-uid");
|
1799
|
+
node = select('[data-uid="' + pathId + '"]', parent.navigationpaneModule.treeObj.element);
|
1800
|
+
}
|
1738
1801
|
updatePath(node, parent.dropData, parent);
|
1739
1802
|
}
|
1740
1803
|
read(parent, dropPath, parent.dropPath);
|
@@ -2561,6 +2624,8 @@ function readSuccess(parent, result, event) {
|
|
2561
2624
|
parent.notify(selectionChanged, {});
|
2562
2625
|
}
|
2563
2626
|
onFailure(parent, result, 'read');
|
2627
|
+
parent.setProperties({ path: parent.oldPath }, true);
|
2628
|
+
parent.pathNames.pop();
|
2564
2629
|
}
|
2565
2630
|
if (parent.isDragDrop && parent.isDropEnd) {
|
2566
2631
|
if (parent.droppedObjects.length !== 0) {
|
@@ -3514,11 +3579,18 @@ function getOptions(parent, text, e, details, replaceItems) {
|
|
3514
3579
|
];
|
3515
3580
|
break;
|
3516
3581
|
case 'MultipleFileDetails':
|
3582
|
+
var index_1;
|
3517
3583
|
options.dialogName = 'File Details';
|
3518
|
-
strArr =
|
3519
|
-
|
3520
|
-
return (
|
3584
|
+
strArr = parent.itemData.map(function (val) {
|
3585
|
+
index_1 = val.name.indexOf('.') + 1;
|
3586
|
+
return (index_1 === 0 && (!val.isFile)) ? 'Folder' : ((index_1 !== 0) ? val.name.substr(index_1).replace(' ', '') : 'undetermined');
|
3521
3587
|
});
|
3588
|
+
if (strArr[0] == undefined) {
|
3589
|
+
strArr = details.name.split(',').map(function (val) {
|
3590
|
+
index_1 = val.indexOf('.') + 1;
|
3591
|
+
return (index_1 === 0) ? 'Folder' : val.substr(index_1).replace(' ', '');
|
3592
|
+
});
|
3593
|
+
}
|
3522
3594
|
fileType$$1 = strArr.every(function (val, i, arr) { return val === arr[0]; }) ?
|
3523
3595
|
((strArr[0] === 'Folder') ? 'Folder' : strArr[0].toLocaleUpperCase() + ' Type') : 'Multiple Types';
|
3524
3596
|
location = details.location;
|
@@ -3729,7 +3801,7 @@ function onSubmitValidate(parent, ele) {
|
|
3729
3801
|
onValidate(parent, ele);
|
3730
3802
|
var len = ele.value.length - 1;
|
3731
3803
|
if (ele.value !== '' && ((ele.value.lastIndexOf('.') === len) || (ele.value.lastIndexOf(' ') === len)) &&
|
3732
|
-
(parent.showFileExtension || (
|
3804
|
+
(parent.showFileExtension || (ele.value.lastIndexOf('.') === -1 || ele.value.substring(ele.value.indexOf('.') + 1).length === 0))) {
|
3733
3805
|
addInvalid(parent, ele);
|
3734
3806
|
}
|
3735
3807
|
}
|
@@ -3914,9 +3986,9 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
3914
3986
|
altEnter: 'alt+enter',
|
3915
3987
|
esc: 'escape',
|
3916
3988
|
del: 'delete',
|
3917
|
-
ctrlX: 'ctrl+x',
|
3918
|
-
ctrlC: 'ctrl+c',
|
3919
|
-
ctrlV: 'ctrl+v',
|
3989
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
3990
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
3991
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
3920
3992
|
f2: 'f2',
|
3921
3993
|
shiftdel: 'shift+delete',
|
3922
3994
|
back: 'backspace',
|
@@ -3953,7 +4025,10 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
3953
4025
|
};
|
3954
4026
|
this.items = [];
|
3955
4027
|
this.items = this.renderList(args);
|
3956
|
-
this.items = getSortedData(this.parent, this.items);
|
4028
|
+
this.items = this.allItems = getSortedData(this.parent, this.items);
|
4029
|
+
// if (this.parent.virtualizationSettings.enable) {
|
4030
|
+
// this.items = this.allItems.slice(0, this.parent.virtualizationSettings.largeIconsViewItemsCount);
|
4031
|
+
// }
|
3957
4032
|
// eslint-disable-next-line
|
3958
4033
|
this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
|
3959
4034
|
this.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.listElements));
|
@@ -3995,6 +4070,10 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
3995
4070
|
this.getItemCount();
|
3996
4071
|
this.addEventListener();
|
3997
4072
|
this.wireEvents();
|
4073
|
+
// if (this.parent.virtualizationSettings.enable && this.allItems.length > 0) {
|
4074
|
+
// this.parent.virtualizationModule.setUlElementHeight();
|
4075
|
+
// this.parent.virtualizationModule.wireScrollEvent(false);
|
4076
|
+
// }
|
3998
4077
|
this.isRendered = true;
|
3999
4078
|
hideSpinner(this.parent.element);
|
4000
4079
|
if (this.parent.selectedItems.length) {
|
@@ -4697,6 +4776,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4697
4776
|
var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
|
4698
4777
|
if (val === '' && !_this.parent.isFiltered) {
|
4699
4778
|
var id = getValue('id', details_1);
|
4779
|
+
_this.parent.oldPath = _this.parent.path;
|
4700
4780
|
var newPath = _this.parent.path + (isNullOrUndefined(id) ? text : id) + '/';
|
4701
4781
|
_this.parent.setProperties({ path: newPath }, true);
|
4702
4782
|
_this.parent.pathNames.push(text);
|
@@ -5316,7 +5396,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
5316
5396
|
else {
|
5317
5397
|
for (var i = 0, len = this.items.length; i < len; i++) {
|
5318
5398
|
var name_2 = getValue('filterPath', this.items[i]) + getValue('name', this.items[i]);
|
5319
|
-
if (items.indexOf(name_2) !== -1) {
|
5399
|
+
if ((items.indexOf(name_2) !== -1) || (items.indexOf(getValue(filterName, this.items[i])) !== -1)) {
|
5320
5400
|
indexes.push(i);
|
5321
5401
|
}
|
5322
5402
|
}
|
@@ -5793,7 +5873,7 @@ var BreadCrumbBar = /** @__PURE__ @class */ (function () {
|
|
5793
5873
|
}
|
5794
5874
|
};
|
5795
5875
|
BreadCrumbBar.prototype.onSearchTextChange = function (args) {
|
5796
|
-
this.searchObj.element.placeholder = (this.parent.searchSettings.placeholder != null) ? this.parent.searchSettings.placeholder : getLocaleText(this.parent, 'Search') + ' ' + args.cwd.name;
|
5876
|
+
this.searchObj.element.placeholder = (this.parent.searchSettings.placeholder != null) ? this.parent.searchSettings.placeholder : getLocaleText(this.parent, 'Search') + ' ' + getLocaleText(this.parent, args.cwd.name.toString());
|
5797
5877
|
};
|
5798
5878
|
return BreadCrumbBar;
|
5799
5879
|
}());
|
@@ -5907,7 +5987,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
5907
5987
|
data = this.parent.detailsviewModule.gridObj.getRowObjectFromUID(uid).data;
|
5908
5988
|
if (isNullOrUndefined(this.targetElement.getAttribute('aria-selected'))) {
|
5909
5989
|
/* istanbul ignore next */
|
5910
|
-
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('
|
5990
|
+
this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute('data-rowindex'), 10)]);
|
5911
5991
|
}
|
5912
5992
|
selected = true;
|
5913
5993
|
/* istanbul ignore next */
|
@@ -6498,7 +6578,7 @@ var defaultLocale = {
|
|
6498
6578
|
'Server-Error': 'ServerError: Invalid response from'
|
6499
6579
|
};
|
6500
6580
|
|
6501
|
-
var __extends$
|
6581
|
+
var __extends$9 = (undefined && undefined.__extends) || (function () {
|
6502
6582
|
var extendStatics = function (d, b) {
|
6503
6583
|
extendStatics = Object.setPrototypeOf ||
|
6504
6584
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
@@ -6511,7 +6591,7 @@ var __extends$8 = (undefined && undefined.__extends) || (function () {
|
|
6511
6591
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
6512
6592
|
};
|
6513
6593
|
})();
|
6514
|
-
var __decorate$
|
6594
|
+
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
6515
6595
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
6516
6596
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
6517
6597
|
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;
|
@@ -6530,7 +6610,7 @@ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators,
|
|
6530
6610
|
* ```
|
6531
6611
|
*/
|
6532
6612
|
var FileManager = /** @__PURE__ @class */ (function (_super) {
|
6533
|
-
__extends$
|
6613
|
+
__extends$9(FileManager, _super);
|
6534
6614
|
function FileManager(options, element) {
|
6535
6615
|
var _this = _super.call(this, options, element) || this;
|
6536
6616
|
// eslint-disable-next-line
|
@@ -6547,7 +6627,6 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6547
6627
|
_this.uploadItem = [];
|
6548
6628
|
_this.deleteRecords = [];
|
6549
6629
|
_this.isFile = false;
|
6550
|
-
_this.sortBy = 'name';
|
6551
6630
|
_this.isCut = false;
|
6552
6631
|
_this.isSearchCut = false;
|
6553
6632
|
_this.isSearchDrag = false;
|
@@ -6581,6 +6660,8 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6581
6660
|
_this.droppedObjects = [];
|
6582
6661
|
_this.uploadingCount = 0;
|
6583
6662
|
_this.uploadedCount = 0;
|
6663
|
+
//Specifies whether the operating system is MAC or not
|
6664
|
+
_this.isMac = false;
|
6584
6665
|
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu$2);
|
6585
6666
|
return _this;
|
6586
6667
|
}
|
@@ -6676,6 +6757,12 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6676
6757
|
args: [this]
|
6677
6758
|
});
|
6678
6759
|
}
|
6760
|
+
if (this.virtualizationSettings.enable) {
|
6761
|
+
modules.push({
|
6762
|
+
member: 'virtualization',
|
6763
|
+
args: [this]
|
6764
|
+
});
|
6765
|
+
}
|
6679
6766
|
return modules;
|
6680
6767
|
};
|
6681
6768
|
/**
|
@@ -6690,6 +6777,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6690
6777
|
this.allowMultiSelection ? this.selectedItems : this.selectedItems.slice(this.selectedItems.length - 1);
|
6691
6778
|
this.setProperties({ selectedItems: slItems }, true);
|
6692
6779
|
this.fileView = this.view;
|
6780
|
+
this.isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
6693
6781
|
this.setRtl(this.enableRtl);
|
6694
6782
|
this.addEventListeners();
|
6695
6783
|
read(this, (this.path !== this.originalPath) ? initialEnd : finalizeEnd, this.path);
|
@@ -6887,6 +6975,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6887
6975
|
enableRtl: this.enableRtl,
|
6888
6976
|
uploading: this.onUploading.bind(this),
|
6889
6977
|
removing: this.onRemoving.bind(this),
|
6978
|
+
canceling: this.onCancel.bind(this),
|
6890
6979
|
clearing: this.onClearing.bind(this),
|
6891
6980
|
selected: this.onSelected.bind(this),
|
6892
6981
|
success: this.onUploadSuccess.bind(this),
|
@@ -6895,6 +6984,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6895
6984
|
minFileSize: this.uploadSettings.minFileSize,
|
6896
6985
|
maxFileSize: this.uploadSettings.maxFileSize,
|
6897
6986
|
allowedExtensions: this.uploadSettings.allowedExtensions,
|
6987
|
+
directoryUpload: this.uploadSettings.directoryUpload,
|
6898
6988
|
fileListRendering: this.onFileListRender.bind(this)
|
6899
6989
|
});
|
6900
6990
|
this.uploadObj.appendTo('#' + this.element.id + UPLOAD_ID);
|
@@ -6907,6 +6997,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6907
6997
|
this.uploadObj.minFileSize = this.uploadSettings.minFileSize;
|
6908
6998
|
this.uploadObj.maxFileSize = this.uploadSettings.maxFileSize;
|
6909
6999
|
this.uploadObj.allowedExtensions = this.uploadSettings.allowedExtensions;
|
7000
|
+
this.uploadObj.directoryUpload = this.uploadSettings.directoryUpload;
|
6910
7001
|
this.uploadObj.dataBind();
|
6911
7002
|
};
|
6912
7003
|
FileManager.prototype.onBeforeOpen = function (args) {
|
@@ -6956,7 +7047,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6956
7047
|
}
|
6957
7048
|
}
|
6958
7049
|
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
6959
|
-
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }];
|
7050
|
+
args.customFormData = [{ 'path': this.path }, { 'action': action }, { 'data': data }, { 'filename': args.fileData.name }];
|
6960
7051
|
var uploadUrl = this.ajaxSettings.uploadUrl ? this.ajaxSettings.uploadUrl : this.ajaxSettings.url;
|
6961
7052
|
// eslint-disable-next-line
|
6962
7053
|
var ajaxSettings = {
|
@@ -6994,6 +7085,11 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
6994
7085
|
}
|
6995
7086
|
};
|
6996
7087
|
/* istanbul ignore next */
|
7088
|
+
FileManager.prototype.onCancel = function (args) {
|
7089
|
+
var data = JSON.stringify(getValue(this.pathId[this.pathId.length - 1], this.feParent));
|
7090
|
+
args.customFormData = [{ 'path': this.path }, { 'action': 'remove' }, { 'data': data }];
|
7091
|
+
};
|
7092
|
+
/* istanbul ignore next */
|
6997
7093
|
FileManager.prototype.onClearing = function () {
|
6998
7094
|
if (this.isOpened) {
|
6999
7095
|
this.uploadDialogObj.hide();
|
@@ -7264,6 +7360,13 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
7264
7360
|
refresh(this);
|
7265
7361
|
this.notify(sortByChange, {});
|
7266
7362
|
break;
|
7363
|
+
case 'sortBy':
|
7364
|
+
refresh(this);
|
7365
|
+
this.notify(sortByChange, {});
|
7366
|
+
if (this.view === 'Details') {
|
7367
|
+
this.notify(sortColumn, {});
|
7368
|
+
}
|
7369
|
+
break;
|
7267
7370
|
case 'popupTarget':
|
7268
7371
|
if (this.uploadDialogObj) {
|
7269
7372
|
this.uploadDialogObj.target = newProp.popupTarget;
|
@@ -7587,148 +7690,154 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
7587
7690
|
}
|
7588
7691
|
};
|
7589
7692
|
var FileManager_1;
|
7590
|
-
__decorate$
|
7693
|
+
__decorate$9([
|
7591
7694
|
Complex({}, AjaxSettings)
|
7592
7695
|
], FileManager.prototype, "ajaxSettings", void 0);
|
7593
|
-
__decorate$
|
7696
|
+
__decorate$9([
|
7594
7697
|
Property(false)
|
7595
7698
|
], FileManager.prototype, "allowDragAndDrop", void 0);
|
7596
|
-
__decorate$
|
7699
|
+
__decorate$9([
|
7597
7700
|
Property(true)
|
7598
7701
|
], FileManager.prototype, "allowMultiSelection", void 0);
|
7599
|
-
__decorate$
|
7702
|
+
__decorate$9([
|
7600
7703
|
Complex({}, ContextMenuSettings)
|
7601
7704
|
], FileManager.prototype, "contextMenuSettings", void 0);
|
7602
|
-
__decorate$
|
7705
|
+
__decorate$9([
|
7603
7706
|
Property('')
|
7604
7707
|
], FileManager.prototype, "cssClass", void 0);
|
7605
|
-
__decorate$
|
7708
|
+
__decorate$9([
|
7606
7709
|
Complex({}, DetailsViewSettings)
|
7607
7710
|
], FileManager.prototype, "detailsViewSettings", void 0);
|
7608
|
-
__decorate$
|
7711
|
+
__decorate$9([
|
7712
|
+
Complex({}, VirtualizationSettings)
|
7713
|
+
], FileManager.prototype, "virtualizationSettings", void 0);
|
7714
|
+
__decorate$9([
|
7609
7715
|
Property(true)
|
7610
7716
|
], FileManager.prototype, "enableHtmlSanitizer", void 0);
|
7611
|
-
__decorate$
|
7717
|
+
__decorate$9([
|
7612
7718
|
Property(false)
|
7613
7719
|
], FileManager.prototype, "enablePersistence", void 0);
|
7614
|
-
__decorate$
|
7720
|
+
__decorate$9([
|
7615
7721
|
Property('400px')
|
7616
7722
|
], FileManager.prototype, "height", void 0);
|
7617
|
-
__decorate$
|
7723
|
+
__decorate$9([
|
7618
7724
|
Property('LargeIcons')
|
7619
7725
|
], FileManager.prototype, "view", void 0);
|
7620
|
-
__decorate$
|
7726
|
+
__decorate$9([
|
7621
7727
|
Complex({}, NavigationPaneSettings)
|
7622
7728
|
], FileManager.prototype, "navigationPaneSettings", void 0);
|
7623
|
-
__decorate$
|
7729
|
+
__decorate$9([
|
7624
7730
|
Property('/')
|
7625
7731
|
], FileManager.prototype, "path", void 0);
|
7626
|
-
__decorate$
|
7732
|
+
__decorate$9([
|
7627
7733
|
Property(null)
|
7628
7734
|
], FileManager.prototype, "popupTarget", void 0);
|
7629
|
-
__decorate$
|
7735
|
+
__decorate$9([
|
7630
7736
|
Complex({}, SearchSettings)
|
7631
7737
|
], FileManager.prototype, "searchSettings", void 0);
|
7632
|
-
__decorate$
|
7738
|
+
__decorate$9([
|
7633
7739
|
Property()
|
7634
7740
|
], FileManager.prototype, "selectedItems", void 0);
|
7635
|
-
__decorate$
|
7741
|
+
__decorate$9([
|
7636
7742
|
Property(true)
|
7637
7743
|
], FileManager.prototype, "showFileExtension", void 0);
|
7638
|
-
__decorate$
|
7744
|
+
__decorate$9([
|
7639
7745
|
Property(null)
|
7640
7746
|
], FileManager.prototype, "rootAliasName", void 0);
|
7641
|
-
__decorate$
|
7747
|
+
__decorate$9([
|
7642
7748
|
Property(false)
|
7643
7749
|
], FileManager.prototype, "showHiddenItems", void 0);
|
7644
|
-
__decorate$
|
7750
|
+
__decorate$9([
|
7645
7751
|
Property(true)
|
7646
7752
|
], FileManager.prototype, "showThumbnail", void 0);
|
7647
|
-
__decorate$
|
7753
|
+
__decorate$9([
|
7648
7754
|
Property('Ascending')
|
7649
7755
|
], FileManager.prototype, "sortOrder", void 0);
|
7650
|
-
__decorate$
|
7756
|
+
__decorate$9([
|
7757
|
+
Property('name')
|
7758
|
+
], FileManager.prototype, "sortBy", void 0);
|
7759
|
+
__decorate$9([
|
7651
7760
|
Complex({}, ToolbarSettings)
|
7652
7761
|
], FileManager.prototype, "toolbarSettings", void 0);
|
7653
|
-
__decorate$
|
7762
|
+
__decorate$9([
|
7654
7763
|
Complex({}, UploadSettings)
|
7655
7764
|
], FileManager.prototype, "uploadSettings", void 0);
|
7656
|
-
__decorate$
|
7765
|
+
__decorate$9([
|
7657
7766
|
Property('100%')
|
7658
7767
|
], FileManager.prototype, "width", void 0);
|
7659
|
-
__decorate$
|
7768
|
+
__decorate$9([
|
7660
7769
|
Event()
|
7661
7770
|
], FileManager.prototype, "fileLoad", void 0);
|
7662
|
-
__decorate$
|
7771
|
+
__decorate$9([
|
7663
7772
|
Event()
|
7664
7773
|
], FileManager.prototype, "fileOpen", void 0);
|
7665
|
-
__decorate$
|
7774
|
+
__decorate$9([
|
7666
7775
|
Event()
|
7667
7776
|
], FileManager.prototype, "beforeDownload", void 0);
|
7668
|
-
__decorate$
|
7777
|
+
__decorate$9([
|
7669
7778
|
Event()
|
7670
7779
|
], FileManager.prototype, "beforeImageLoad", void 0);
|
7671
|
-
__decorate$
|
7780
|
+
__decorate$9([
|
7672
7781
|
Event()
|
7673
7782
|
], FileManager.prototype, "beforePopupClose", void 0);
|
7674
|
-
__decorate$
|
7783
|
+
__decorate$9([
|
7675
7784
|
Event()
|
7676
7785
|
], FileManager.prototype, "beforePopupOpen", void 0);
|
7677
|
-
__decorate$
|
7786
|
+
__decorate$9([
|
7678
7787
|
Event()
|
7679
7788
|
], FileManager.prototype, "beforeSend", void 0);
|
7680
|
-
__decorate$
|
7789
|
+
__decorate$9([
|
7681
7790
|
Event()
|
7682
7791
|
], FileManager.prototype, "created", void 0);
|
7683
|
-
__decorate$
|
7792
|
+
__decorate$9([
|
7684
7793
|
Event()
|
7685
7794
|
], FileManager.prototype, "destroyed", void 0);
|
7686
|
-
__decorate$
|
7795
|
+
__decorate$9([
|
7687
7796
|
Event()
|
7688
7797
|
], FileManager.prototype, "fileDragStart", void 0);
|
7689
|
-
__decorate$
|
7798
|
+
__decorate$9([
|
7690
7799
|
Event()
|
7691
7800
|
], FileManager.prototype, "fileDragging", void 0);
|
7692
|
-
__decorate$
|
7801
|
+
__decorate$9([
|
7693
7802
|
Event()
|
7694
7803
|
], FileManager.prototype, "fileDragStop", void 0);
|
7695
|
-
__decorate$
|
7804
|
+
__decorate$9([
|
7696
7805
|
Event()
|
7697
7806
|
], FileManager.prototype, "fileDropped", void 0);
|
7698
|
-
__decorate$
|
7807
|
+
__decorate$9([
|
7699
7808
|
Event()
|
7700
7809
|
], FileManager.prototype, "fileSelection", void 0);
|
7701
|
-
__decorate$
|
7810
|
+
__decorate$9([
|
7702
7811
|
Event()
|
7703
7812
|
], FileManager.prototype, "fileSelect", void 0);
|
7704
|
-
__decorate$
|
7813
|
+
__decorate$9([
|
7705
7814
|
Event()
|
7706
7815
|
], FileManager.prototype, "menuClick", void 0);
|
7707
|
-
__decorate$
|
7816
|
+
__decorate$9([
|
7708
7817
|
Event()
|
7709
7818
|
], FileManager.prototype, "menuOpen", void 0);
|
7710
|
-
__decorate$
|
7819
|
+
__decorate$9([
|
7711
7820
|
Event()
|
7712
7821
|
], FileManager.prototype, "failure", void 0);
|
7713
|
-
__decorate$
|
7822
|
+
__decorate$9([
|
7714
7823
|
Event()
|
7715
7824
|
], FileManager.prototype, "popupClose", void 0);
|
7716
|
-
__decorate$
|
7825
|
+
__decorate$9([
|
7717
7826
|
Event()
|
7718
7827
|
], FileManager.prototype, "popupOpen", void 0);
|
7719
|
-
__decorate$
|
7828
|
+
__decorate$9([
|
7720
7829
|
Event()
|
7721
7830
|
], FileManager.prototype, "success", void 0);
|
7722
|
-
__decorate$
|
7831
|
+
__decorate$9([
|
7723
7832
|
Event()
|
7724
7833
|
], FileManager.prototype, "toolbarClick", void 0);
|
7725
|
-
__decorate$
|
7834
|
+
__decorate$9([
|
7726
7835
|
Event()
|
7727
7836
|
], FileManager.prototype, "toolbarCreate", void 0);
|
7728
|
-
__decorate$
|
7837
|
+
__decorate$9([
|
7729
7838
|
Event()
|
7730
7839
|
], FileManager.prototype, "uploadListCreate", void 0);
|
7731
|
-
FileManager = FileManager_1 = __decorate$
|
7840
|
+
FileManager = FileManager_1 = __decorate$9([
|
7732
7841
|
NotifyPropertyChanges
|
7733
7842
|
], FileManager);
|
7734
7843
|
return FileManager;
|
@@ -7882,9 +7991,12 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
7882
7991
|
Toolbar$$1.prototype.toolbarCreateHandler = function () {
|
7883
7992
|
if (!isNullOrUndefined(select('#' + this.getId('SortBy'), this.parent.element))) {
|
7884
7993
|
var items = [
|
7885
|
-
{ id: this.getPupupId('name'), text: getLocaleText(this.parent, 'Name'),
|
7886
|
-
|
7887
|
-
{ id: this.getPupupId('
|
7994
|
+
{ id: this.getPupupId('name'), text: getLocaleText(this.parent, 'Name'),
|
7995
|
+
iconCss: this.parent.sortBy === 'name' ? TB_OPTION_DOT : '' },
|
7996
|
+
{ id: this.getPupupId('size'), text: getLocaleText(this.parent, 'Size'),
|
7997
|
+
iconCss: this.parent.sortBy === 'size' ? TB_OPTION_DOT : '' },
|
7998
|
+
{ id: this.getPupupId('date'), text: getLocaleText(this.parent, 'DateModified'),
|
7999
|
+
iconCss: this.parent.sortBy === '_fm_modified' ? TB_OPTION_DOT : '' },
|
7888
8000
|
{ separator: true },
|
7889
8001
|
{ id: this.getPupupId('ascending'), text: getLocaleText(this.parent, 'Ascending'),
|
7890
8002
|
iconCss: this.parent.sortOrder === 'Ascending' ? TB_OPTION_TICK : '' },
|
@@ -7920,7 +8032,6 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
7920
8032
|
cssClass: getCssClass(this.parent, 'e-caret-hide ' + ROOT_POPUP),
|
7921
8033
|
items: layoutItems, select: this.layoutChange.bind(this),
|
7922
8034
|
enableRtl: this.parent.enableRtl,
|
7923
|
-
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
7924
8035
|
content: '<span class="e-tbar-btn-text">' + getLocaleText(this.parent, 'View') + '</span>'
|
7925
8036
|
});
|
7926
8037
|
this.layoutBtnObj.isStringTemplate = true;
|
@@ -8226,6 +8337,181 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
8226
8337
|
return Toolbar$$1;
|
8227
8338
|
}());
|
8228
8339
|
|
8340
|
+
var Virtualization = /** @__PURE__ @class */ (function () {
|
8341
|
+
function Virtualization(instance) {
|
8342
|
+
this.largeIconsViewItemsCount = 40;
|
8343
|
+
this.filemanagerInstance = instance;
|
8344
|
+
this.largeIconInstance = instance.largeiconsviewModule;
|
8345
|
+
}
|
8346
|
+
// Update the scroller height based on the items count.
|
8347
|
+
Virtualization.prototype.setUlElementHeight = function () {
|
8348
|
+
this.rowItemCount = this.ValidateItemCount(Object.keys(this.largeIconInstance.allItems).length);
|
8349
|
+
this.lastRowCount = (this.largeIconInstance.allItems.length - this.largeIconsViewItemsCount) % this.rowItemCount ?
|
8350
|
+
(this.largeIconInstance.allItems.length - this.largeIconsViewItemsCount) % this.rowItemCount : this.rowItemCount;
|
8351
|
+
this.topElement = this.filemanagerInstance.createElement('div');
|
8352
|
+
this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement, this.largeIconInstance.element.firstElementChild.firstChild);
|
8353
|
+
this.bottomElement = this.filemanagerInstance.createElement('div');
|
8354
|
+
this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement, null);
|
8355
|
+
var marginValue = parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-top')) +
|
8356
|
+
parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-bottom'));
|
8357
|
+
this.listItemHeight = this.largeIconInstance.itemList[0].getBoundingClientRect().height + marginValue;
|
8358
|
+
this.totalHeight = (Object.keys(this.largeIconInstance.allItems).length / this.rowItemCount) * this.listItemHeight;
|
8359
|
+
this.topElement.style.height = 0 + 'px';
|
8360
|
+
this.bottomElement.style.height = this.totalHeight + 'px';
|
8361
|
+
this.topElementHeight = 0;
|
8362
|
+
this.bottomElementHeight = this.totalHeight;
|
8363
|
+
this.listDiff = 0;
|
8364
|
+
this.renderedCount = this.largeIconsViewItemsCount;
|
8365
|
+
};
|
8366
|
+
// Calculated the maximum number of items can be rendered in each row.
|
8367
|
+
Virtualization.prototype.ValidateItemCount = function (dataSourceLength) {
|
8368
|
+
var width = parseFloat(formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth));
|
8369
|
+
var marginValue = parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-right')) +
|
8370
|
+
parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue('margin-left'));
|
8371
|
+
var itemCount = Math.floor(width / (this.largeIconInstance.itemList[0].offsetWidth + marginValue));
|
8372
|
+
if (itemCount > dataSourceLength) {
|
8373
|
+
itemCount = dataSourceLength;
|
8374
|
+
}
|
8375
|
+
return itemCount;
|
8376
|
+
};
|
8377
|
+
// Bind the scroll event for large icons view ul element.
|
8378
|
+
Virtualization.prototype.wireScrollEvent = function (destroy) {
|
8379
|
+
if (!destroy) {
|
8380
|
+
EventHandler.add(this.largeIconInstance.element.firstElementChild, 'scroll', this.onVirtualUiScroll, this);
|
8381
|
+
}
|
8382
|
+
else {
|
8383
|
+
EventHandler.remove(this.largeIconInstance.element.firstElementChild, 'scroll', this.onVirtualUiScroll);
|
8384
|
+
}
|
8385
|
+
};
|
8386
|
+
// Update the top and bottom element height and update the scroll position.
|
8387
|
+
Virtualization.prototype.onVirtualUiScroll = function (e) {
|
8388
|
+
var _a;
|
8389
|
+
var startingHeight = 0;
|
8390
|
+
this.scrollPosition = isNullOrUndefined(this.scrollPosition) ? 0 : this.scrollPosition;
|
8391
|
+
var scroll = this.getscrollerHeight(startingHeight);
|
8392
|
+
this.topElementHeight = this.listItemHeight * Math.floor(scroll / this.listItemHeight);
|
8393
|
+
this.bottomElementHeight = this.totalHeight - this.topElementHeight;
|
8394
|
+
_a = scroll <= this.totalHeight ?
|
8395
|
+
[this.topElementHeight, this.bottomElementHeight] : [this.totalHeight, 0], this.topElementHeight = _a[0], this.bottomElementHeight = _a[1];
|
8396
|
+
if (this.topElementHeight !== parseFloat(this.topElement.style.height)) {
|
8397
|
+
this.topElement.style.height = this.topElementHeight + 'px';
|
8398
|
+
this.bottomElement.style.height = this.bottomElementHeight + 'px';
|
8399
|
+
// checked whether the scrolling is upward/downward
|
8400
|
+
if (scroll > this.scrollPosition) {
|
8401
|
+
var listDiff = Math.round(((this.topElementHeight / this.listItemHeight) - this.listDiff));
|
8402
|
+
this.onNormalScroll(listDiff, true);
|
8403
|
+
}
|
8404
|
+
else {
|
8405
|
+
var listDiff = Math.round((this.listDiff - (this.topElementHeight / this.listItemHeight)));
|
8406
|
+
this.onNormalScroll(listDiff, false);
|
8407
|
+
}
|
8408
|
+
}
|
8409
|
+
this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);
|
8410
|
+
this.scrollPosition = scroll;
|
8411
|
+
this.largeIconInstance.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.largeIconInstance.element));
|
8412
|
+
this.largeIconInstance.items = this.largeIconInstance.allItems.slice(this.renderedCount -
|
8413
|
+
this.largeIconsViewItemsCount, this.renderedCount);
|
8414
|
+
};
|
8415
|
+
// Calculated the scroller height.
|
8416
|
+
Virtualization.prototype.getscrollerHeight = function (startingHeight) {
|
8417
|
+
return ((this.largeIconInstance.element.firstElementChild.scrollTop - startingHeight) <= 0) ? 0 :
|
8418
|
+
(this.largeIconInstance.element.firstElementChild.scrollTop - startingHeight);
|
8419
|
+
};
|
8420
|
+
// Update the UI based on the scrolled position.
|
8421
|
+
Virtualization.prototype.onNormalScroll = function (listDiff, isScrollingDown) {
|
8422
|
+
for (var i = 0; i < listDiff; i++) {
|
8423
|
+
this.updateUI(isScrollingDown);
|
8424
|
+
}
|
8425
|
+
this.updateSelection();
|
8426
|
+
};
|
8427
|
+
// Updating the items in large icons view dynamically.
|
8428
|
+
Virtualization.prototype.updateUI = function (isScrollingDown) {
|
8429
|
+
var _this = this;
|
8430
|
+
if (isScrollingDown) {
|
8431
|
+
this.items = this.largeIconInstance.allItems.slice(this.renderedCount, this.renderedCount + this.rowItemCount);
|
8432
|
+
if (this.items.length > 0) {
|
8433
|
+
this.listElements = ListBase.createListFromJson(createElement, this.items, this.largeIconInstance.listObj);
|
8434
|
+
this.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.listElements));
|
8435
|
+
this.itemList.forEach(function (liEle) {
|
8436
|
+
_this.largeIconInstance.element.firstElementChild.insertBefore(liEle, _this.bottomElement);
|
8437
|
+
});
|
8438
|
+
this.renderedCount = (this.largeIconInstance.allItems.length >= this.renderedCount + this.rowItemCount) ?
|
8439
|
+
this.renderedCount + this.rowItemCount : this.renderedCount + this.lastRowCount;
|
8440
|
+
for (var i_1 = 0; i_1 < this.rowItemCount; i_1++) {
|
8441
|
+
detach(this.topElement.nextElementSibling);
|
8442
|
+
}
|
8443
|
+
}
|
8444
|
+
}
|
8445
|
+
else {
|
8446
|
+
var lastItemIndex = void 0;
|
8447
|
+
var isAllRendered = void 0;
|
8448
|
+
if (this.renderedCount == this.largeIconInstance.allItems.length) {
|
8449
|
+
lastItemIndex = this.renderedCount - (this.largeIconsViewItemsCount - this.rowItemCount + this.lastRowCount);
|
8450
|
+
this.renderedCount = ((this.renderedCount - this.lastRowCount) < this.largeIconsViewItemsCount) ?
|
8451
|
+
this.largeIconsViewItemsCount : (this.renderedCount - this.lastRowCount);
|
8452
|
+
isAllRendered = true;
|
8453
|
+
}
|
8454
|
+
else {
|
8455
|
+
lastItemIndex = this.renderedCount - this.largeIconsViewItemsCount;
|
8456
|
+
this.renderedCount = ((this.renderedCount - this.rowItemCount) < this.largeIconsViewItemsCount) ?
|
8457
|
+
this.largeIconsViewItemsCount : (this.renderedCount - this.rowItemCount);
|
8458
|
+
}
|
8459
|
+
var startItemIndex = (lastItemIndex - this.rowItemCount > 0) ? lastItemIndex - this.rowItemCount : 0;
|
8460
|
+
this.items = this.largeIconInstance.allItems.slice(startItemIndex, lastItemIndex);
|
8461
|
+
if (this.items.length > 0) {
|
8462
|
+
this.listElements = ListBase.createListFromJson(createElement, this.items, this.largeIconInstance.listObj);
|
8463
|
+
this.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.listElements));
|
8464
|
+
for (var len = this.itemList.length; len > 0; len--) {
|
8465
|
+
this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[len - 1], this.topElement.nextElementSibling);
|
8466
|
+
}
|
8467
|
+
for (var i = 0; i < ((isAllRendered) ? this.lastRowCount : this.rowItemCount); i++) {
|
8468
|
+
detach(this.bottomElement.previousElementSibling);
|
8469
|
+
}
|
8470
|
+
}
|
8471
|
+
}
|
8472
|
+
};
|
8473
|
+
// Update the selected item state.
|
8474
|
+
Virtualization.prototype.updateSelection = function () {
|
8475
|
+
for (var i = 0; i < this.filemanagerInstance.selectedItems.length; i++) {
|
8476
|
+
for (var j = 0; j < this.items.length; j++) {
|
8477
|
+
if (this.filemanagerInstance.selectedItems[i] == getValue('name', this.items[j])) {
|
8478
|
+
this.updateCheckState(this.itemList[j]);
|
8479
|
+
}
|
8480
|
+
}
|
8481
|
+
}
|
8482
|
+
};
|
8483
|
+
// Update the check state for items.
|
8484
|
+
Virtualization.prototype.updateCheckState = function (liItem) {
|
8485
|
+
if (this.filemanagerInstance.allowMultiSelection) {
|
8486
|
+
addClass([liItem], [ACTIVE]);
|
8487
|
+
liItem.setAttribute('aria-selected', 'true');
|
8488
|
+
var checkEle = select('.' + FRAME, liItem);
|
8489
|
+
if (!checkEle.classList.contains(CHECK)) {
|
8490
|
+
addClass([checkEle], CHECK);
|
8491
|
+
closest(checkEle, '.' + CB_WRAP).setAttribute('aria-checked', 'true');
|
8492
|
+
}
|
8493
|
+
}
|
8494
|
+
};
|
8495
|
+
/**
|
8496
|
+
* For internal use only - Get the module name.
|
8497
|
+
*
|
8498
|
+
* @returns {string} - returns the module name.
|
8499
|
+
* @private
|
8500
|
+
*/
|
8501
|
+
Virtualization.prototype.getModuleName = function () {
|
8502
|
+
return 'virtualization';
|
8503
|
+
};
|
8504
|
+
Virtualization.prototype.destroy = function () {
|
8505
|
+
if (this.filemanagerInstance.isDestroyed) {
|
8506
|
+
return;
|
8507
|
+
}
|
8508
|
+
if (!isNullOrUndefined(this.largeIconInstance.element.firstElementChild)) {
|
8509
|
+
this.wireScrollEvent(true);
|
8510
|
+
}
|
8511
|
+
};
|
8512
|
+
return Virtualization;
|
8513
|
+
}());
|
8514
|
+
|
8229
8515
|
/**
|
8230
8516
|
* File Manager actions modules
|
8231
8517
|
*/
|
@@ -8240,6 +8526,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8240
8526
|
* @param {IFileManager} parent - specifies the parent element.
|
8241
8527
|
* @hidden
|
8242
8528
|
*/
|
8529
|
+
/* istanbul ignore next */
|
8243
8530
|
function NavigationPane(parent) {
|
8244
8531
|
this.removeNodes = [];
|
8245
8532
|
this.moveNames = [];
|
@@ -8261,9 +8548,9 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8261
8548
|
altEnter: 'alt+enter',
|
8262
8549
|
esc: 'escape',
|
8263
8550
|
del: 'delete',
|
8264
|
-
ctrlX: 'ctrl+x',
|
8265
|
-
ctrlC: 'ctrl+c',
|
8266
|
-
ctrlV: 'ctrl+v',
|
8551
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
8552
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
8553
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
8267
8554
|
ctrlShiftN: 'ctrl+shift+n',
|
8268
8555
|
shiftF10: 'shift+F10',
|
8269
8556
|
f2: 'f2'
|
@@ -8294,6 +8581,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8294
8581
|
hasChildren: 'hasChild', iconCss: '_fm_icon', htmlAttributes: '_fm_htmlAttr', tooltip: 'name'
|
8295
8582
|
},
|
8296
8583
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
8584
|
+
sortOrder: this.parent.navigationPaneSettings.sortOrder,
|
8297
8585
|
nodeSelecting: this.onNodeSelecting.bind(this),
|
8298
8586
|
nodeSelected: this.onNodeSelected.bind(this),
|
8299
8587
|
nodeExpanding: this.onNodeExpand.bind(this),
|
@@ -8415,7 +8703,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8415
8703
|
this.parent.trigger('fileOpen', eventArgs);
|
8416
8704
|
args.cancel = eventArgs.cancel;
|
8417
8705
|
if (args.cancel) {
|
8418
|
-
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0]
|
8706
|
+
this.restrictSelecting = this.isNodeClickCalled ? this.previousSelected[0] !== args.node.getAttribute('data-uid') : false;
|
8419
8707
|
this.treeObj.selectedNodes = this.isNodeClickCalled ? this.previousSelected : this.treeObj.selectedNodes;
|
8420
8708
|
this.previousSelected = this.treeObj.selectedNodes;
|
8421
8709
|
if (!isNullOrUndefined(this.parent) && !isNullOrUndefined(this.parent.contextmenuModule)) {
|
@@ -8453,13 +8741,16 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8453
8741
|
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
8454
8742
|
this.parent.selectedItems = [];
|
8455
8743
|
this.parent.itemData = nodeData;
|
8744
|
+
var previousPath = this.parent.path;
|
8456
8745
|
updatePath(args.node, this.parent.itemData[0], this.parent);
|
8457
|
-
this.
|
8458
|
-
|
8459
|
-
|
8746
|
+
if (previousPath !== this.parent.path) {
|
8747
|
+
this.expandNodeTarget = null;
|
8748
|
+
if (args.node.querySelector('.' + ICONS) && args.node.querySelector('.' + LIST_ITEM) === null) {
|
8749
|
+
this.expandNodeTarget = 'add';
|
8750
|
+
}
|
8751
|
+
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8752
|
+
this.parent.visitedItem = args.node;
|
8460
8753
|
}
|
8461
|
-
read(this.parent, this.isPathDragged ? pasteEnd : pathChanged, this.parent.path);
|
8462
|
-
this.parent.visitedItem = args.node;
|
8463
8754
|
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
8464
8755
|
};
|
8465
8756
|
/* istanbul ignore next */
|
@@ -8517,7 +8808,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8517
8808
|
var currFiles = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feFiles);
|
8518
8809
|
if (this.expandNodeTarget === 'add') {
|
8519
8810
|
var sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
|
8520
|
-
var ul = select('.' + LIST_PARENT, sNode);
|
8811
|
+
var ul = (!isNullOrUndefined(sNode)) ? select('.' + LIST_PARENT, sNode) : null;
|
8521
8812
|
if (isNullOrUndefined(ul)) {
|
8522
8813
|
this.addChild(args.files, this.treeObj.selectedNodes[0], !this.expandTree);
|
8523
8814
|
}
|
@@ -8527,6 +8818,8 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8527
8818
|
if (isNullOrUndefined(currFiles)) {
|
8528
8819
|
setValue(this.parent.pathId[this.parent.pathId.length - 1], args.files, this.parent.feFiles);
|
8529
8820
|
}
|
8821
|
+
if (this.parent.uploadObj.directoryUpload)
|
8822
|
+
this.updateTree(args);
|
8530
8823
|
};
|
8531
8824
|
NavigationPane.prototype.updateTree = function (args) {
|
8532
8825
|
if (this.treeObj) {
|
@@ -8683,6 +8976,9 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8683
8976
|
break;
|
8684
8977
|
case 'navigationPaneSettings':
|
8685
8978
|
read(this.parent, finalizeEnd, '/');
|
8979
|
+
if (e.oldProp.navigationPaneSettings.sortOrder !== e.newProp.navigationPaneSettings.sortOrder) {
|
8980
|
+
this.treeObj.sortOrder = e.newProp.navigationPaneSettings.sortOrder;
|
8981
|
+
}
|
8686
8982
|
break;
|
8687
8983
|
}
|
8688
8984
|
}
|
@@ -8975,13 +9271,15 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8975
9271
|
removeActive(this.parent);
|
8976
9272
|
break;
|
8977
9273
|
case 'del':
|
8978
|
-
this.
|
8979
|
-
|
8980
|
-
|
8981
|
-
|
8982
|
-
|
8983
|
-
|
8984
|
-
|
9274
|
+
if (this.parent.pathId[0] !== this.activeNode.getAttribute('data-uid')) {
|
9275
|
+
this.updateItemData();
|
9276
|
+
if (!hasEditAccess(this.parent.itemData[0])) {
|
9277
|
+
createDeniedDialog(this.parent, this.parent.itemData[0], permissionEdit);
|
9278
|
+
}
|
9279
|
+
else {
|
9280
|
+
this.removeNodes = [];
|
9281
|
+
createDialog(this.parent, 'Delete');
|
9282
|
+
}
|
8985
9283
|
}
|
8986
9284
|
break;
|
8987
9285
|
case 'ctrlC':
|
@@ -9083,6 +9381,9 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9083
9381
|
this.isNameWidth = false;
|
9084
9382
|
this.pasteOperation = false;
|
9085
9383
|
this.uploadOperation = false;
|
9384
|
+
/* istanbul ignore next */
|
9385
|
+
// eslint:disable-next-line
|
9386
|
+
this.actionDivert = false;
|
9086
9387
|
Grid.Inject(Resize, ContextMenu$1, Sort, VirtualScroll);
|
9087
9388
|
this.parent = parent;
|
9088
9389
|
this.element = select('#' + this.parent.element.id + GRID_ID, this.parent.element);
|
@@ -9114,9 +9415,9 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9114
9415
|
home: 'home',
|
9115
9416
|
moveUp: 'uparrow',
|
9116
9417
|
del: 'delete',
|
9117
|
-
ctrlX: 'ctrl+x',
|
9118
|
-
ctrlC: 'ctrl+c',
|
9119
|
-
ctrlV: 'ctrl+v',
|
9418
|
+
ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
|
9419
|
+
ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
|
9420
|
+
ctrlV: this.parent.isMac ? 'cmd+v' : 'ctrl+v',
|
9120
9421
|
ctrlShiftN: 'ctrl+shift+n',
|
9121
9422
|
shiftdel: 'shift+delete',
|
9122
9423
|
ctrlD: 'ctrl+d',
|
@@ -9157,6 +9458,10 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9157
9458
|
},
|
9158
9459
|
enableRtl: this.parent.enableRtl,
|
9159
9460
|
pageSettings: { pageSize: 20 },
|
9461
|
+
// enableVirtualization: this.parent.virtualizationSettings.enable,
|
9462
|
+
enablePersistence: this.parent.enablePersistence,
|
9463
|
+
// enableVirtualMaskRow: true,
|
9464
|
+
// pageSettings: { pageSize: this.parent.virtualizationSettings.detailsViewItemsCount },
|
9160
9465
|
sortSettings: { allowUnsort: false, columns: sortSettings },
|
9161
9466
|
columns: columns,
|
9162
9467
|
recordDoubleClick: this.DblClickEvents.bind(this),
|
@@ -9365,14 +9670,19 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9365
9670
|
}
|
9366
9671
|
};
|
9367
9672
|
DetailsView.prototype.onBeforeDataBound = function (args) {
|
9673
|
+
// if (!this.parent.virtualizationSettings.enable) {
|
9368
9674
|
showSpinner(this.parent.element);
|
9369
9675
|
// eslint-disable-next-line
|
9370
9676
|
var items = getSortedData(this.parent, this.gridObj.dataSource);
|
9371
9677
|
args.result = items;
|
9678
|
+
// }
|
9372
9679
|
};
|
9373
9680
|
/* istanbul ignore next */
|
9374
9681
|
DetailsView.prototype.onDataBound = function () {
|
9375
9682
|
this.createDragObj();
|
9683
|
+
// if ((this.parent.selectedItems.length !== 0 && !this.parent.virtualizationSettings.enable) ||
|
9684
|
+
// ((this.parent.selectedItems.length !== 0 && this.parent.virtualizationSettings.enable &&
|
9685
|
+
// this.element.querySelector('.e-content').scrollTop == 0))) {
|
9376
9686
|
if (this.parent.selectedItems.length !== 0) {
|
9377
9687
|
this.selectRecords(this.parent.selectedItems);
|
9378
9688
|
}
|
@@ -9642,6 +9952,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9642
9952
|
var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
|
9643
9953
|
if (val === '' && !_this.parent.isFiltered) {
|
9644
9954
|
var id = getValue('id', data);
|
9955
|
+
_this.parent.oldPath = _this.parent.path;
|
9645
9956
|
var newPath = _this.parent.path + (isNullOrUndefined(id) ? name_2 : id) + '/';
|
9646
9957
|
_this.parent.setProperties({ path: newPath }, true);
|
9647
9958
|
_this.parent.pathNames.push(name_2);
|
@@ -9927,7 +10238,13 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9927
10238
|
if (!dragLi) {
|
9928
10239
|
return null;
|
9929
10240
|
}
|
9930
|
-
var name
|
10241
|
+
var name;
|
10242
|
+
if (dragLi.getElementsByClassName('e-fe-text')[0]) {
|
10243
|
+
name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
|
10244
|
+
}
|
10245
|
+
else if (dragLi.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling) {
|
10246
|
+
name = dragLi.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText;
|
10247
|
+
}
|
9931
10248
|
if (dragLi && !dragLi.querySelector('.e-active')) {
|
9932
10249
|
this.selectRecords([name]);
|
9933
10250
|
}
|
@@ -10128,6 +10445,10 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10128
10445
|
}
|
10129
10446
|
var len = rows.length;
|
10130
10447
|
if (len > 0) {
|
10448
|
+
// if (this.parent.virtualizationSettings.enable) {
|
10449
|
+
// this.parent.currentItemText = getValue('name', args.data);
|
10450
|
+
// }
|
10451
|
+
// else if (len > 0) {
|
10131
10452
|
// eslint-disable-next-line
|
10132
10453
|
var data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
10133
10454
|
this.parent.currentItemText = getValue('name', data);
|
@@ -10271,7 +10592,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10271
10592
|
};
|
10272
10593
|
DetailsView.prototype.getFocusedItemIndex = function () {
|
10273
10594
|
return (!isNullOrUndefined(this.getFocusedItem())) ?
|
10274
|
-
parseInt(this.getFocusedItem().getAttribute('
|
10595
|
+
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
10275
10596
|
};
|
10276
10597
|
/* istanbul ignore next */
|
10277
10598
|
// eslint:disable-next-line
|
@@ -10310,14 +10631,13 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10310
10631
|
case 'f2':
|
10311
10632
|
case 'moveDown':
|
10312
10633
|
case 'moveUp':
|
10634
|
+
case 'ctrlD':
|
10313
10635
|
e.preventDefault();
|
10314
10636
|
break;
|
10315
10637
|
default:
|
10316
10638
|
break;
|
10317
10639
|
}
|
10318
10640
|
};
|
10319
|
-
/* istanbul ignore next */
|
10320
|
-
// eslint:disable-next-line
|
10321
10641
|
DetailsView.prototype.keyupHandler = function (e) {
|
10322
10642
|
if (!this.isRendered) {
|
10323
10643
|
return;
|
@@ -10394,8 +10714,13 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10394
10714
|
else if (this.gridObj.selectedRowIndex !== -1 && e.action === 'tab') {
|
10395
10715
|
return;
|
10396
10716
|
}
|
10717
|
+
else if (!this.actionDivert) {
|
10718
|
+
this.addHeaderFocus();
|
10719
|
+
this.actionDivert = true;
|
10720
|
+
}
|
10397
10721
|
else {
|
10398
10722
|
this.addFocus(0);
|
10723
|
+
this.actionDivert = false;
|
10399
10724
|
}
|
10400
10725
|
}
|
10401
10726
|
break;
|
@@ -10682,6 +11007,18 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10682
11007
|
addClass([itemElement], [FOCUS, FOCUSED]);
|
10683
11008
|
}
|
10684
11009
|
};
|
11010
|
+
DetailsView.prototype.addHeaderFocus = function () {
|
11011
|
+
var treeFocus = select('.e-row', this.element);
|
11012
|
+
this.gridObj.element.setAttribute('tabindex', '-1');
|
11013
|
+
var nameFocus = select('th.e-fe-grid-name', this.element);
|
11014
|
+
nameFocus.setAttribute('tabindex', '0');
|
11015
|
+
nameFocus.focus();
|
11016
|
+
addClass([nameFocus], [FOCUS, FOCUSED]);
|
11017
|
+
treeFocus.setAttribute('tabindex', '0');
|
11018
|
+
if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
|
11019
|
+
removeClass([treeFocus], [FOCUS, FOCUSED]);
|
11020
|
+
}
|
11021
|
+
};
|
10685
11022
|
DetailsView.prototype.getFocusedItem = function () {
|
10686
11023
|
return select('.' + FOCUSED, this.element);
|
10687
11024
|
};
|
@@ -10893,5 +11230,5 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10893
11230
|
* File Manager all modules
|
10894
11231
|
*/
|
10895
11232
|
|
10896
|
-
export { AjaxSettings, toolbarItems, ToolbarSettings, SearchSettings, columnArray, DetailsViewSettings, fileItems, folderItems, layoutItems, ContextMenuSettings, NavigationPaneSettings, UploadSettings, Column, TOOLBAR_ID, LAYOUT_ID, NAVIGATION_ID, TREE_ID, GRID_ID, LARGEICON_ID, DIALOG_ID, ALT_DIALOG_ID, IMG_DIALOG_ID, EXTN_DIALOG_ID, UPLOAD_DIALOG_ID, RETRY_DIALOG_ID, CONTEXT_MENU_ID, SORTBY_ID, VIEW_ID, SPLITTER_ID, CONTENT_ID, BREADCRUMBBAR_ID, UPLOAD_ID, RETRY_ID, SEARCH_ID, ROOT, CONTROL, CHECK_SELECT, ROOT_POPUP, MOBILE, MOB_POPUP, MULTI_SELECT, FILTER, LAYOUT, NAVIGATION, LAYOUT_CONTENT, LARGE_ICONS, TB_ITEM, LIST_ITEM, LIST_TEXT, LIST_PARENT, TB_OPTION_TICK, TB_OPTION_DOT, BLUR, ACTIVE, HOVER, FOCUS, FOCUSED, CHECK, FRAME, CB_WRAP, ROW, ROWCELL, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, CLONE, DROP_FOLDER, DROP_FILE, FOLDER, ICON_IMAGE, ICON_MUSIC, ICON_VIDEO, LARGE_ICON, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON_FOLDER, SELECTED_ITEMS, TEXT_CONTENT, GRID_HEADER, TEMPLATE_CELL, TREE_VIEW, MENU_ITEM, MENU_ICON, SUBMENU_ICON, GRID_VIEW, ICON_VIEW, ICON_OPEN, ICON_UPLOAD, ICON_CUT, ICON_COPY, ICON_PASTE, ICON_DELETE, ICON_RENAME, ICON_NEWFOLDER, ICON_DETAILS, ICON_SHORTBY, ICON_REFRESH, ICON_SELECTALL, ICON_DOWNLOAD, ICON_OPTIONS, ICON_GRID, ICON_LARGE, ICON_BREADCRUMB, ICON_CLEAR, ICON_DROP_IN, ICON_DROP_OUT, ICON_NO_DROP, ICONS, DETAILS_LABEL, ERROR_CONTENT, STATUS, BREADCRUMBS, RTL, DISPLAY_NONE, COLLAPSED, FULLROW, ICON_COLLAPSIBLE, SPLIT_BAR, HEADER_CHECK, OVERLAY, VALUE, isFile, modelChanged, initialEnd, finalizeEnd, createEnd, filterEnd, beforeDelete, pathDrag, deleteInit, deleteEnd, refreshEnd, resizeEnd, splitterResize, pathChanged, destroy, beforeRequest, upload, skipUpload, afterRequest, download, layoutRefresh, actionFailure, search, openInit, openEnd, selectionChanged, selectAllInit, clearAllInit, clearPathInit, layoutChange, sortByChange, nodeExpand, detailsInit, menuItemData, renameInit, renameEndParent, renameEnd, showPaste, hidePaste, selectedData, cutCopyInit, pasteInit, pasteEnd, cutEnd, hideLayout, updateTreeSelection, treeSelect, sortColumn, pathColumn, searchTextChange, beforeDownload, downloadInit, dropInit, dragEnd, dropPath, dragHelper, dragging, updateSelectionData, methodCall, permissionRead, permissionEdit, permissionEditContents, permissionCopy, permissionUpload, permissionDownload, FileManager, Toolbar$1 as Toolbar, BreadCrumbBar, NavigationPane, DetailsView, LargeIconsView, createDialog, createExtDialog, createImageDialog, ContextMenu$2 as ContextMenu };
|
11233
|
+
export { AjaxSettings, toolbarItems, ToolbarSettings, SearchSettings, columnArray, DetailsViewSettings, VirtualizationSettings, fileItems, folderItems, layoutItems, ContextMenuSettings, NavigationPaneSettings, UploadSettings, Column, TOOLBAR_ID, LAYOUT_ID, NAVIGATION_ID, TREE_ID, GRID_ID, LARGEICON_ID, DIALOG_ID, ALT_DIALOG_ID, IMG_DIALOG_ID, EXTN_DIALOG_ID, UPLOAD_DIALOG_ID, RETRY_DIALOG_ID, CONTEXT_MENU_ID, SORTBY_ID, VIEW_ID, SPLITTER_ID, CONTENT_ID, BREADCRUMBBAR_ID, UPLOAD_ID, RETRY_ID, SEARCH_ID, ROOT, CONTROL, CHECK_SELECT, ROOT_POPUP, MOBILE, MOB_POPUP, MULTI_SELECT, FILTER, LAYOUT, NAVIGATION, LAYOUT_CONTENT, LARGE_ICONS, TB_ITEM, LIST_ITEM, LIST_TEXT, LIST_PARENT, TB_OPTION_TICK, TB_OPTION_DOT, BLUR, ACTIVE, HOVER, FOCUS, FOCUSED, CHECK, FRAME, CB_WRAP, ROW, ROWCELL, EMPTY, EMPTY_CONTENT, EMPTY_INNER_CONTENT, CLONE, DROP_FOLDER, DROP_FILE, FOLDER, ICON_IMAGE, ICON_MUSIC, ICON_VIDEO, LARGE_ICON, LARGE_EMPTY_FOLDER, LARGE_EMPTY_FOLDER_TWO, LARGE_ICON_FOLDER, SELECTED_ITEMS, TEXT_CONTENT, GRID_HEADER, TEMPLATE_CELL, TREE_VIEW, MENU_ITEM, MENU_ICON, SUBMENU_ICON, GRID_VIEW, GRID_CONTENT, ICON_VIEW, ICON_OPEN, ICON_UPLOAD, ICON_CUT, ICON_COPY, ICON_PASTE, ICON_DELETE, ICON_RENAME, ICON_NEWFOLDER, ICON_DETAILS, ICON_SHORTBY, ICON_REFRESH, ICON_SELECTALL, ICON_DOWNLOAD, ICON_OPTIONS, ICON_GRID, ICON_LARGE, ICON_BREADCRUMB, ICON_CLEAR, ICON_DROP_IN, ICON_DROP_OUT, ICON_NO_DROP, ICONS, DETAILS_LABEL, ERROR_CONTENT, STATUS, BREADCRUMBS, RTL, DISPLAY_NONE, COLLAPSED, FULLROW, ICON_COLLAPSIBLE, SPLIT_BAR, HEADER_CHECK, OVERLAY, VALUE, isFile, modelChanged, initialEnd, finalizeEnd, createEnd, filterEnd, beforeDelete, pathDrag, deleteInit, deleteEnd, refreshEnd, resizeEnd, splitterResize, pathChanged, destroy, beforeRequest, upload, skipUpload, afterRequest, download, layoutRefresh, actionFailure, search, openInit, openEnd, selectionChanged, selectAllInit, clearAllInit, clearPathInit, layoutChange, sortByChange, nodeExpand, detailsInit, menuItemData, renameInit, renameEndParent, renameEnd, showPaste, hidePaste, selectedData, cutCopyInit, pasteInit, pasteEnd, cutEnd, hideLayout, updateTreeSelection, treeSelect, sortColumn, pathColumn, searchTextChange, beforeDownload, downloadInit, dropInit, dragEnd, dropPath, dragHelper, dragging, updateSelectionData, methodCall, permissionRead, permissionEdit, permissionEditContents, permissionCopy, permissionUpload, permissionDownload, FileManager, Toolbar$1 as Toolbar, BreadCrumbBar, Virtualization, NavigationPane, DetailsView, LargeIconsView, createDialog, createExtDialog, createImageDialog, ContextMenu$2 as ContextMenu };
|
10897
11234
|
//# sourceMappingURL=ej2-filemanager.es5.js.map
|