@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
@@ -4770,7 +4770,7 @@ class LargeIconsView {
|
|
4770
4770
|
this.items = this.allItems = getSortedData(this.parent, this.items);
|
4771
4771
|
}
|
4772
4772
|
iconsView.classList.remove(DISPLAY_NONE);
|
4773
|
-
if (this.parent.enableVirtualization && this.allItems.length > 0) {
|
4773
|
+
if (this.parent.enableVirtualization && this.allItems.length > 0 && !isNullOrUndefined(this.parent.virtualizationModule)) {
|
4774
4774
|
this.parent.virtualizationModule.setUIVirtualization();
|
4775
4775
|
}
|
4776
4776
|
this.listElements = ListBase.createListFromJson(createElement, this.items, this.listObj);
|
@@ -4812,7 +4812,7 @@ class LargeIconsView {
|
|
4812
4812
|
this.getItemCount();
|
4813
4813
|
this.addEventListener();
|
4814
4814
|
this.wireEvents();
|
4815
|
-
if (this.parent.enableVirtualization && this.allItems.length > 0) {
|
4815
|
+
if (this.parent.enableVirtualization && this.allItems.length > 0 && !isNullOrUndefined(this.parent.virtualizationModule)) {
|
4816
4816
|
this.parent.virtualizationModule.setUlElementHeight();
|
4817
4817
|
this.parent.virtualizationModule.wireScrollEvent(false);
|
4818
4818
|
}
|
@@ -7487,6 +7487,11 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
7487
7487
|
//Specifies whether the operating system is MAC or not
|
7488
7488
|
this.isMac = false;
|
7489
7489
|
this.dragSelectedItems = [];
|
7490
|
+
this.onScrollHandler = () => {
|
7491
|
+
if (!isNullOrUndefined(this.contextmenuModule) && !isNullOrUndefined(this.contextmenuModule.contextMenu)) {
|
7492
|
+
this.contextmenuModule.contextMenu.close();
|
7493
|
+
}
|
7494
|
+
};
|
7490
7495
|
FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu);
|
7491
7496
|
}
|
7492
7497
|
/**
|
@@ -8111,6 +8116,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
8111
8116
|
this.wireSelectOnDragEvent(true);
|
8112
8117
|
}
|
8113
8118
|
EventHandler.add(window, 'resize', this.resizeHandler, this);
|
8119
|
+
if (this.contextMenuSettings.visible) {
|
8120
|
+
this.element.addEventListener('scroll', this.onScrollHandler, true);
|
8121
|
+
}
|
8114
8122
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
8115
8123
|
keyAction: this.keyActionHandler.bind(this),
|
8116
8124
|
keyConfigs: this.keyConfigs,
|
@@ -8120,6 +8128,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
8120
8128
|
unWireEvents() {
|
8121
8129
|
this.wireSelectOnDragEvent(false);
|
8122
8130
|
EventHandler.remove(window, 'resize', this.resizeHandler);
|
8131
|
+
if (this.contextMenuSettings.visible) {
|
8132
|
+
this.element.removeEventListener('scroll', this.onScrollHandler, true);
|
8133
|
+
}
|
8123
8134
|
this.keyboardModule.destroy();
|
8124
8135
|
}
|
8125
8136
|
onDragStart(event) {
|
@@ -8177,16 +8188,18 @@ let FileManager = FileManager_1 = class FileManager extends Component {
|
|
8177
8188
|
}
|
8178
8189
|
}
|
8179
8190
|
selectItems() {
|
8180
|
-
this.dragSelectedItems = [];
|
8181
8191
|
const dragRect = this.dragSelectElement.getBoundingClientRect();
|
8192
|
+
if (dragRect.height > 0 && dragRect.width > 0) {
|
8193
|
+
this.dragSelectedItems = [];
|
8194
|
+
removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
|
8195
|
+
removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
|
8196
|
+
}
|
8182
8197
|
const allItems = selectAll(this.viewElem.classList.contains('e-large-icons') ? '.e-list-item' : '.e-row', this.viewElem);
|
8183
|
-
removeClass(selectAll('.e-active', this.viewElem), ['e-active', 'e-focus']);
|
8184
|
-
removeClass(selectAll('.e-check', this.viewElem), ['e-check']);
|
8185
8198
|
for (const item of allItems) {
|
8186
8199
|
const itemRect = item.getBoundingClientRect();
|
8187
8200
|
if (!(dragRect.right < itemRect.left || dragRect.left > itemRect.right
|
8188
8201
|
|| dragRect.bottom < itemRect.top || dragRect.top > itemRect.bottom)
|
8189
|
-
&& (
|
8202
|
+
&& (dragRect.height > 0 && dragRect.width > 0)) {
|
8190
8203
|
if (this.viewElem.classList.contains('e-large-icons')) {
|
8191
8204
|
item.classList.add('e-active');
|
8192
8205
|
this.dragSelectedItems.push(item.getAttribute('title'));
|
@@ -11059,9 +11072,7 @@ class DetailsView {
|
|
11059
11072
|
/* istanbul ignore next */
|
11060
11073
|
onDataBound() {
|
11061
11074
|
this.createDragObj();
|
11062
|
-
if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization)
|
11063
|
-
((this.parent.selectedItems.length !== 0 && this.parent.enableVirtualization &&
|
11064
|
-
this.element.querySelector('.e-content').scrollTop === 0))) {
|
11075
|
+
if ((this.parent.selectedItems.length !== 0 && !this.parent.enableVirtualization)) {
|
11065
11076
|
this.selectRecords(this.parent.selectedItems);
|
11066
11077
|
}
|
11067
11078
|
if (this.isPasteOperation === true && (!isNullOrUndefined(this.gridObj.getDataRows()) && this.gridObj.getDataRows().length > 0)) {
|
@@ -11821,7 +11832,9 @@ class DetailsView {
|
|
11821
11832
|
if (this.gridObj.getSelectedRowIndexes().length !== 1) {
|
11822
11833
|
const lastItemIndex = this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length - 2];
|
11823
11834
|
const lastItem = this.gridObj.getRowByIndex(lastItemIndex);
|
11824
|
-
lastItem
|
11835
|
+
if (!isNullOrUndefined(lastItem)) {
|
11836
|
+
lastItem.querySelector('.e-checkselect').setAttribute('tabindex', '-1');
|
11837
|
+
}
|
11825
11838
|
}
|
11826
11839
|
item.querySelector('.e-rowcell.e-fe-checkbox').removeAttribute('tabindex');
|
11827
11840
|
}
|
@@ -11886,11 +11899,17 @@ class DetailsView {
|
|
11886
11899
|
onDeSelection(args) {
|
11887
11900
|
/* istanbul ignore next */
|
11888
11901
|
if (!this.parent.allowMultiSelection && isNullOrUndefined(args.data)) {
|
11889
|
-
this.gridObj.getRowByIndex(args.rowIndex)
|
11902
|
+
const item = this.gridObj.getRowByIndex(args.rowIndex);
|
11903
|
+
if (!isNullOrUndefined(item)) {
|
11904
|
+
item.removeAttribute('tabindex');
|
11905
|
+
}
|
11890
11906
|
}
|
11891
11907
|
else if (this.gridObj.getSelectedRowIndexes().length > 1) {
|
11892
11908
|
const lastItemIndex = this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length - 2];
|
11893
|
-
this.gridObj.getRowByIndex(lastItemIndex)
|
11909
|
+
const lastItem = this.gridObj.getRowByIndex(lastItemIndex);
|
11910
|
+
if (!isNullOrUndefined(lastItem)) {
|
11911
|
+
lastItem.querySelector('.e-checkselect').removeAttribute('tabindex');
|
11912
|
+
}
|
11894
11913
|
}
|
11895
11914
|
if (this.gridObj.selectedRowIndex === -1) {
|
11896
11915
|
this.gridObj.element.setAttribute('tabindex', '0');
|