@syncfusion/ej2-filemanager 25.1.35 → 25.1.37
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/CHANGELOG.md +8 -0
- 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 +49 -19
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +49 -19
- 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 +10 -10
- package/src/file-manager/layout/details-view.d.ts +1 -1
- package/src/file-manager/layout/details-view.js +49 -19
@@ -9751,9 +9751,6 @@ class DetailsView {
|
|
9751
9751
|
this.isNameWidth = false;
|
9752
9752
|
this.pasteOperation = false;
|
9753
9753
|
this.uploadOperation = false;
|
9754
|
-
/* istanbul ignore next */
|
9755
|
-
// eslint:disable-next-line
|
9756
|
-
this.actionDivert = false;
|
9757
9754
|
Grid.Inject(Resize, ContextMenu$1, Sort, VirtualScroll);
|
9758
9755
|
this.parent = parent;
|
9759
9756
|
this.element = select('#' + this.parent.element.id + GRID_ID, this.parent.element);
|
@@ -9932,7 +9929,7 @@ class DetailsView {
|
|
9932
9929
|
this.adjustWidth(columns, 'name');
|
9933
9930
|
for (let i = 0, len = columns.length; i < len; i++) {
|
9934
9931
|
columns[i].headerText = getLocaleText(this.parent, columns[i].headerText);
|
9935
|
-
if (columns[i].field === 'name' && !isNullOrUndefined(columns[i].template)) {
|
9932
|
+
if (columns[i].field === 'name' && !isNullOrUndefined(columns[i].template) && !(typeof columns[i].template === 'function')) {
|
9936
9933
|
const template = columns[i].template;
|
9937
9934
|
columns[i].template = initializeCSPTemplate(function (data) {
|
9938
9935
|
const name = enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(data.name) : data.name;
|
@@ -10975,12 +10972,14 @@ class DetailsView {
|
|
10975
10972
|
eventName: 'keydown'
|
10976
10973
|
});
|
10977
10974
|
EventHandler.add(this.gridObj.element, 'blur', this.removeFocus, this);
|
10975
|
+
EventHandler.add(this.parent.element, 'focusout', this.onBlur, this);
|
10978
10976
|
}
|
10979
10977
|
unWireEvents() {
|
10980
10978
|
this.wireClickEvent(false);
|
10981
10979
|
this.keyboardModule.destroy();
|
10982
10980
|
this.keyboardDownModule.destroy();
|
10983
10981
|
EventHandler.remove(this.gridObj.element, 'blur', this.removeFocus);
|
10982
|
+
EventHandler.remove(this.parent.element, 'focusout', this.onBlur);
|
10984
10983
|
}
|
10985
10984
|
wireClickEvent(toBind) {
|
10986
10985
|
if (toBind) {
|
@@ -11030,6 +11029,19 @@ class DetailsView {
|
|
11030
11029
|
removeFocus() {
|
11031
11030
|
this.addFocus(null);
|
11032
11031
|
}
|
11032
|
+
onBlur(e) {
|
11033
|
+
if ((e.relatedTarget !== null && closest(e.relatedTarget, '.e-grid') !== e.relatedTarget)) {
|
11034
|
+
return;
|
11035
|
+
}
|
11036
|
+
if (!isNullOrUndefined(this.gridObj.element)) {
|
11037
|
+
const thElements = this.gridObj.element.querySelectorAll('th');
|
11038
|
+
for (let i = 0; i < thElements.length; i++) {
|
11039
|
+
if (thElements[i].classList.contains('e-focus')) {
|
11040
|
+
this.addFocus(null);
|
11041
|
+
}
|
11042
|
+
}
|
11043
|
+
}
|
11044
|
+
}
|
11033
11045
|
getFocusedItemIndex() {
|
11034
11046
|
return (!isNullOrUndefined(this.getFocusedItem())) ?
|
11035
11047
|
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
@@ -11078,6 +11090,8 @@ class DetailsView {
|
|
11078
11090
|
break;
|
11079
11091
|
}
|
11080
11092
|
}
|
11093
|
+
/* istanbul ignore next */
|
11094
|
+
// eslint:disable-next-line
|
11081
11095
|
keyupHandler(e) {
|
11082
11096
|
if (!this.isRendered) {
|
11083
11097
|
return;
|
@@ -11108,7 +11122,15 @@ class DetailsView {
|
|
11108
11122
|
this.performDelete();
|
11109
11123
|
break;
|
11110
11124
|
case 'enter':
|
11111
|
-
if (this.gridObj.selectedRowIndex === -1) {
|
11125
|
+
if (this.gridObj.selectedRowIndex === -1 && this.gridObj.allowSorting === true) {
|
11126
|
+
if (!e.target.classList.contains('e-fe-grid-icon')) {
|
11127
|
+
const direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
|
11128
|
+
const currentField = this.gridObj.getColumnByUid(e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid')).field;
|
11129
|
+
this.gridObj.sortColumn(currentField, direction);
|
11130
|
+
if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
|
11131
|
+
this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
|
11132
|
+
}
|
11133
|
+
}
|
11112
11134
|
break;
|
11113
11135
|
}
|
11114
11136
|
rowData = this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data;
|
@@ -11155,13 +11177,8 @@ class DetailsView {
|
|
11155
11177
|
else if (this.gridObj.selectedRowIndex !== -1 && e.action === 'tab') {
|
11156
11178
|
return;
|
11157
11179
|
}
|
11158
|
-
else if (!this.actionDivert) {
|
11159
|
-
this.addHeaderFocus();
|
11160
|
-
this.actionDivert = true;
|
11161
|
-
}
|
11162
11180
|
else {
|
11163
|
-
this.
|
11164
|
-
this.actionDivert = false;
|
11181
|
+
this.addHeaderFocus(e);
|
11165
11182
|
}
|
11166
11183
|
}
|
11167
11184
|
break;
|
@@ -11448,16 +11465,29 @@ class DetailsView {
|
|
11448
11465
|
addClass([itemElement], [FOCUS, FOCUSED]);
|
11449
11466
|
}
|
11450
11467
|
}
|
11451
|
-
addHeaderFocus() {
|
11468
|
+
addHeaderFocus(e) {
|
11452
11469
|
const treeFocus = select('.e-row', this.element);
|
11453
11470
|
this.gridObj.element.setAttribute('tabindex', '-1');
|
11454
|
-
|
11455
|
-
|
11456
|
-
|
11457
|
-
|
11458
|
-
|
11459
|
-
if (
|
11460
|
-
|
11471
|
+
let nameFocus;
|
11472
|
+
if (!isNullOrUndefined(e.target) && e.target.classList.contains('e-defaultcursor')) {
|
11473
|
+
this.addFocus(0);
|
11474
|
+
nameFocus = e.target.nextElementSibling;
|
11475
|
+
}
|
11476
|
+
else if (!isNullOrUndefined(this.gridObj.element.querySelector('.e-focus')) && (this.gridObj.element.querySelector('.e-focus').tagName === 'TH')) {
|
11477
|
+
nameFocus = this.gridObj.element.querySelector('.e-focus').nextElementSibling;
|
11478
|
+
this.addFocus(0);
|
11479
|
+
}
|
11480
|
+
else {
|
11481
|
+
nameFocus = select('th.e-fe-grid-icon', this.element);
|
11482
|
+
}
|
11483
|
+
if (!isNullOrUndefined(nameFocus)) {
|
11484
|
+
nameFocus.setAttribute('tabindex', '0');
|
11485
|
+
nameFocus.focus();
|
11486
|
+
addClass([nameFocus], [FOCUS, FOCUSED]);
|
11487
|
+
treeFocus.setAttribute('tabindex', '0');
|
11488
|
+
if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
|
11489
|
+
removeClass([treeFocus], [FOCUS, FOCUSED]);
|
11490
|
+
}
|
11461
11491
|
}
|
11462
11492
|
}
|
11463
11493
|
getFocusedItem() {
|