@syncfusion/ej2-filemanager 28.2.5 → 28.2.9
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/dist/ej2-filemanager.min.js +2 -2
- 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 +31 -12
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +31 -12
- 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/package.json +11 -11
- package/src/file-manager/base/file-manager.d.ts +1 -0
- package/src/file-manager/base/file-manager.js +17 -4
- package/src/file-manager/layout/details-view.js +12 -6
- package/src/file-manager/layout/large-icons-view.js +2 -2
@@ -4926,7 +4926,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4926
4926
|
this.items = this.allItems = getSortedData(this.parent, this.items);
|
4927
4927
|
}
|
4928
4928
|
iconsView.classList.remove(DISPLAY_NONE);
|
4929
|
-
if (this.parent.enableVirtualization && this.allItems.length > 0) {
|
4929
|
+
if (this.parent.enableVirtualization && this.allItems.length > 0 && !isNullOrUndefined(this.parent.virtualizationModule)) {
|
4930
4930
|
this.parent.virtualizationModule.setUIVirtualization();
|
4931
4931
|
}
|
4932
4932
|
this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
|
@@ -4968,7 +4968,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4968
4968
|
this.getItemCount();
|
4969
4969
|
this.addEventListener();
|
4970
4970
|
this.wireEvents();
|
4971
|
-
if (this.parent.enableVirtualization && this.allItems.length > 0) {
|
4971
|
+
if (this.parent.enableVirtualization && this.allItems.length > 0 && !isNullOrUndefined(this.parent.virtualizationModule)) {
|
4972
4972
|
this.parent.virtualizationModule.setUlElementHeight();
|
4973
4973
|
this.parent.virtualizationModule.wireScrollEvent(false);
|
4974
4974
|
}
|
@@ -7670,6 +7670,11 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
7670
7670
|
//Specifies whether the operating system is MAC or not
|
7671
7671
|
_this.isMac = false;
|
7672
7672
|
_this.dragSelectedItems = [];
|
7673
|
+
_this.onScrollHandler = function () {
|
7674
|
+
if (!isNullOrUndefined(_this.contextmenuModule) && !isNullOrUndefined(_this.contextmenuModule.contextMenu)) {
|
7675
|
+
_this.contextmenuModule.contextMenu.close();
|
7676
|
+
}
|
7677
|
+
};
|
7673
7678
|
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
|
7674
7679
|
return _this;
|
7675
7680
|
}
|
@@ -8296,6 +8301,9 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
8296
8301
|
this.wireSelectOnDragEvent(true);
|
8297
8302
|
}
|
8298
8303
|
EventHandler.add(window, 'resize', this.resizeHandler, this);
|
8304
|
+
if (this.contextMenuSettings.visible) {
|
8305
|
+
this.element.addEventListener('scroll', this.onScrollHandler, true);
|
8306
|
+
}
|
8299
8307
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
8300
8308
|
keyAction: this.keyActionHandler.bind(this),
|
8301
8309
|
keyConfigs: this.keyConfigs,
|
@@ -8305,6 +8313,9 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
8305
8313
|
FileManager.prototype.unWireEvents = function () {
|
8306
8314
|
this.wireSelectOnDragEvent(false);
|
8307
8315
|
EventHandler.remove(window, 'resize', this.resizeHandler);
|
8316
|
+
if (this.contextMenuSettings.visible) {
|
8317
|
+
this.element.removeEventListener('scroll', this.onScrollHandler, true);
|
8318
|
+
}
|
8308
8319
|
this.keyboardModule.destroy();
|
8309
8320
|
};
|
8310
8321
|
FileManager.prototype.onDragStart = function (event) {
|
@@ -8362,17 +8373,19 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
8362
8373
|
}
|
8363
8374
|
};
|
8364
8375
|
FileManager.prototype.selectItems = function () {
|
8365
|
-
this.dragSelectedItems = [];
|
8366
8376
|
var dragRect = this.dragSelectElement.getBoundingClientRect();
|
8377
|
+
if (dragRect.height > 0 && dragRect.width > 0) {
|
8378
|
+
this.dragSelectedItems = [];
|
8379
|
+
removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
|
8380
|
+
removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
|
8381
|
+
}
|
8367
8382
|
var allItems = selectAll(this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-row', this.viewElem);
|
8368
|
-
removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
|
8369
|
-
removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
|
8370
8383
|
for (var _i = 0, allItems_1 = allItems; _i < allItems_1.length; _i++) {
|
8371
8384
|
var item = allItems_1[_i];
|
8372
8385
|
var itemRect = item.getBoundingClientRect();
|
8373
8386
|
if (!(dragRect.right < itemRect.left || dragRect.left > itemRect.right
|
8374
8387
|
|| dragRect.bottom < itemRect.top || dragRect.top > itemRect.bottom)
|
8375
|
-
&& (
|
8388
|
+
&& (dragRect.height > 0 && dragRect.width > 0)) {
|
8376
8389
|
if (this.viewElem.classList.contains('e-large-icons')) {
|
8377
8390
|
item.classList.add('e-active');
|
8378
8391
|
this.dragSelectedItems.push(item.getAttribute('title'));
|
@@ -11270,9 +11283,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11270
11283
|
/* istanbul ignore next */
|
11271
11284
|
DetailsView.prototype.onDataBound = function () {
|
11272
11285
|
this.createDragObj();
|
11273
|
-
if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization)
|
11274
|
-
((this.parent.selectedItems.length !== 0 && this.parent.enableVirtualization &&
|
11275
|
-
this.element.querySelector('.e-content').scrollTop === 0))) {
|
11286
|
+
if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization)) {
|
11276
11287
|
this.selectRecords(this.parent.selectedItems);
|
11277
11288
|
}
|
11278
11289
|
if (this.isPasteOperation === true && (!isNullOrUndefined(this.gridObj.getDataRows()) && this.gridObj.getDataRows().length > 0)) {
|
@@ -12035,7 +12046,9 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
12035
12046
|
if (this.gridObj.getSelectedRowIndexes().length !== 1) {
|
12036
12047
|
var lastItemIndex = this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length - 2];
|
12037
12048
|
var lastItem = this.gridObj.getRowByIndex(lastItemIndex);
|
12038
|
-
lastItem
|
12049
|
+
if (!isNullOrUndefined(lastItem)) {
|
12050
|
+
lastItem.querySelector('.e-checkselect').setAttribute('tabindex', '-1');
|
12051
|
+
}
|
12039
12052
|
}
|
12040
12053
|
item.querySelector('.e-rowcell.e-fe-checkbox').removeAttribute('tabindex');
|
12041
12054
|
}
|
@@ -12100,11 +12113,17 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
12100
12113
|
DetailsView.prototype.onDeSelection = function (args) {
|
12101
12114
|
/* istanbul ignore next */
|
12102
12115
|
if (!this.parent.allowMultiSelection && isNullOrUndefined(args.data)) {
|
12103
|
-
this.gridObj.getRowByIndex(args.rowIndex)
|
12116
|
+
var item = this.gridObj.getRowByIndex(args.rowIndex);
|
12117
|
+
if (!isNullOrUndefined(item)) {
|
12118
|
+
item.removeAttribute('tabindex');
|
12119
|
+
}
|
12104
12120
|
}
|
12105
12121
|
else if (this.gridObj.getSelectedRowIndexes().length > 1) {
|
12106
12122
|
var lastItemIndex = this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length - 2];
|
12107
|
-
this.gridObj.getRowByIndex(lastItemIndex)
|
12123
|
+
var lastItem = this.gridObj.getRowByIndex(lastItemIndex);
|
12124
|
+
if (!isNullOrUndefined(lastItem)) {
|
12125
|
+
lastItem.querySelector('.e-checkselect').removeAttribute('tabindex');
|
12126
|
+
}
|
12108
12127
|
}
|
12109
12128
|
if (this.gridObj.selectedRowIndex === -1) {
|
12110
12129
|
this.gridObj.element.setAttribute('tabindex', '0');
|