@syncfusion/ej2-filemanager 25.1.35 → 25.1.38
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 +16 -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 +50 -21
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +50 -20
- 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/layout/details-view.d.ts +1 -1
- package/src/file-manager/layout/details-view.js +50 -20
@@ -9960,9 +9960,6 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9960
9960
|
this.isNameWidth = false;
|
9961
9961
|
this.pasteOperation = false;
|
9962
9962
|
this.uploadOperation = false;
|
9963
|
-
/* istanbul ignore next */
|
9964
|
-
// eslint:disable-next-line
|
9965
|
-
this.actionDivert = false;
|
9966
9963
|
Grid.Inject(Resize, ContextMenu$1, Sort, VirtualScroll);
|
9967
9964
|
this.parent = parent;
|
9968
9965
|
this.element = select('#' + this.parent.element.id + GRID_ID, this.parent.element);
|
@@ -10130,7 +10127,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10130
10127
|
field: 'name', headerText: getLocaleText(this.parent, 'Name'), width: 'auto', minWidth: 120, headerTextAlign: 'Left',
|
10131
10128
|
template: initializeCSPTemplate(function (data) {
|
10132
10129
|
var name = enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(data.name) : data.name;
|
10133
|
-
return "<div class=\"e-fe-text\">" + name + "</div><div class=\"e-fe-date\">" + data._fm_modified + "</div
|
10130
|
+
return "<div class=\"e-fe-text\">" + name + "</div><div class=\"e-fe-date\">" + data._fm_modified + "</div><span class=\"e-fe-size\">" + data.size + "</span>";
|
10134
10131
|
})
|
10135
10132
|
}
|
10136
10133
|
];
|
@@ -10140,7 +10137,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10140
10137
|
this.adjustWidth(columns, 'name');
|
10141
10138
|
var _loop_1 = function (i, len) {
|
10142
10139
|
columns[i].headerText = getLocaleText(this_1.parent, columns[i].headerText);
|
10143
|
-
if (columns[i].field === 'name' && !isNullOrUndefined(columns[i].template)) {
|
10140
|
+
if (columns[i].field === 'name' && !isNullOrUndefined(columns[i].template) && !(typeof columns[i].template === 'function')) {
|
10144
10141
|
var template_1 = columns[i].template;
|
10145
10142
|
columns[i].template = initializeCSPTemplate(function (data) {
|
10146
10143
|
var name = enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(data.name) : data.name;
|
@@ -11191,12 +11188,14 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11191
11188
|
eventName: 'keydown'
|
11192
11189
|
});
|
11193
11190
|
EventHandler.add(this.gridObj.element, 'blur', this.removeFocus, this);
|
11191
|
+
EventHandler.add(this.parent.element, 'focusout', this.onBlur, this);
|
11194
11192
|
};
|
11195
11193
|
DetailsView.prototype.unWireEvents = function () {
|
11196
11194
|
this.wireClickEvent(false);
|
11197
11195
|
this.keyboardModule.destroy();
|
11198
11196
|
this.keyboardDownModule.destroy();
|
11199
11197
|
EventHandler.remove(this.gridObj.element, 'blur', this.removeFocus);
|
11198
|
+
EventHandler.remove(this.parent.element, 'focusout', this.onBlur);
|
11200
11199
|
};
|
11201
11200
|
DetailsView.prototype.wireClickEvent = function (toBind) {
|
11202
11201
|
if (toBind) {
|
@@ -11246,6 +11245,19 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11246
11245
|
DetailsView.prototype.removeFocus = function () {
|
11247
11246
|
this.addFocus(null);
|
11248
11247
|
};
|
11248
|
+
DetailsView.prototype.onBlur = function (e) {
|
11249
|
+
if ((e.relatedTarget !== null && closest(e.relatedTarget, '.e-grid') !== e.relatedTarget)) {
|
11250
|
+
return;
|
11251
|
+
}
|
11252
|
+
if (!isNullOrUndefined(this.gridObj.element)) {
|
11253
|
+
var thElements = this.gridObj.element.querySelectorAll('th');
|
11254
|
+
for (var i = 0; i < thElements.length; i++) {
|
11255
|
+
if (thElements[i].classList.contains('e-focus')) {
|
11256
|
+
this.addFocus(null);
|
11257
|
+
}
|
11258
|
+
}
|
11259
|
+
}
|
11260
|
+
};
|
11249
11261
|
DetailsView.prototype.getFocusedItemIndex = function () {
|
11250
11262
|
return (!isNullOrUndefined(this.getFocusedItem())) ?
|
11251
11263
|
parseInt(this.getFocusedItem().getAttribute('data-rowindex'), 10) : null;
|
@@ -11294,6 +11306,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11294
11306
|
break;
|
11295
11307
|
}
|
11296
11308
|
};
|
11309
|
+
/* istanbul ignore next */
|
11310
|
+
// eslint:disable-next-line
|
11297
11311
|
DetailsView.prototype.keyupHandler = function (e) {
|
11298
11312
|
if (!this.isRendered) {
|
11299
11313
|
return;
|
@@ -11324,7 +11338,15 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11324
11338
|
this.performDelete();
|
11325
11339
|
break;
|
11326
11340
|
case 'enter':
|
11327
|
-
if (this.gridObj.selectedRowIndex === -1) {
|
11341
|
+
if (this.gridObj.selectedRowIndex === -1 && this.gridObj.allowSorting === true) {
|
11342
|
+
if (!e.target.classList.contains('e-fe-grid-icon')) {
|
11343
|
+
var direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
|
11344
|
+
var currentField = this.gridObj.getColumnByUid(e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid')).field;
|
11345
|
+
this.gridObj.sortColumn(currentField, direction);
|
11346
|
+
if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
|
11347
|
+
this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
|
11348
|
+
}
|
11349
|
+
}
|
11328
11350
|
break;
|
11329
11351
|
}
|
11330
11352
|
rowData = this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data;
|
@@ -11371,13 +11393,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11371
11393
|
else if (this.gridObj.selectedRowIndex !== -1 && e.action === 'tab') {
|
11372
11394
|
return;
|
11373
11395
|
}
|
11374
|
-
else if (!this.actionDivert) {
|
11375
|
-
this.addHeaderFocus();
|
11376
|
-
this.actionDivert = true;
|
11377
|
-
}
|
11378
11396
|
else {
|
11379
|
-
this.
|
11380
|
-
this.actionDivert = false;
|
11397
|
+
this.addHeaderFocus(e);
|
11381
11398
|
}
|
11382
11399
|
}
|
11383
11400
|
break;
|
@@ -11664,16 +11681,29 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
11664
11681
|
addClass([itemElement], [FOCUS, FOCUSED]);
|
11665
11682
|
}
|
11666
11683
|
};
|
11667
|
-
DetailsView.prototype.addHeaderFocus = function () {
|
11684
|
+
DetailsView.prototype.addHeaderFocus = function (e) {
|
11668
11685
|
var treeFocus = select('.e-row', this.element);
|
11669
11686
|
this.gridObj.element.setAttribute('tabindex', '-1');
|
11670
|
-
var nameFocus
|
11671
|
-
|
11672
|
-
|
11673
|
-
|
11674
|
-
|
11675
|
-
if (
|
11676
|
-
|
11687
|
+
var nameFocus;
|
11688
|
+
if (!isNullOrUndefined(e.target) && e.target.classList.contains('e-defaultcursor')) {
|
11689
|
+
this.addFocus(0);
|
11690
|
+
nameFocus = e.target.nextElementSibling;
|
11691
|
+
}
|
11692
|
+
else if (!isNullOrUndefined(this.gridObj.element.querySelector('.e-focus')) && (this.gridObj.element.querySelector('.e-focus').tagName === 'TH')) {
|
11693
|
+
nameFocus = this.gridObj.element.querySelector('.e-focus').nextElementSibling;
|
11694
|
+
this.addFocus(0);
|
11695
|
+
}
|
11696
|
+
else {
|
11697
|
+
nameFocus = select('th.e-fe-grid-icon', this.element);
|
11698
|
+
}
|
11699
|
+
if (!isNullOrUndefined(nameFocus)) {
|
11700
|
+
nameFocus.setAttribute('tabindex', '0');
|
11701
|
+
nameFocus.focus();
|
11702
|
+
addClass([nameFocus], [FOCUS, FOCUSED]);
|
11703
|
+
treeFocus.setAttribute('tabindex', '0');
|
11704
|
+
if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
|
11705
|
+
removeClass([treeFocus], [FOCUS, FOCUSED]);
|
11706
|
+
}
|
11677
11707
|
}
|
11678
11708
|
};
|
11679
11709
|
DetailsView.prototype.getFocusedItem = function () {
|