@syncfusion/ej2-filemanager 33.2.6 → 33.2.13

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.
Files changed (90) hide show
  1. package/dist/ej2-filemanager.min.js +2 -2
  2. package/dist/ej2-filemanager.umd.min.js +2 -2
  3. package/dist/ej2-filemanager.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-filemanager.es2015.js +290 -8
  5. package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
  6. package/dist/es6/ej2-filemanager.es5.js +291 -8
  7. package/dist/es6/ej2-filemanager.es5.js.map +1 -1
  8. package/dist/global/ej2-filemanager.min.js +2 -2
  9. package/dist/global/ej2-filemanager.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +6 -6
  12. package/src/file-manager/layout/details-view.d.ts +10 -0
  13. package/src/file-manager/layout/details-view.js +291 -8
  14. package/styles/bds-lite.css +3 -7
  15. package/styles/bds.css +6 -10
  16. package/styles/bootstrap-dark-lite.css +0 -4
  17. package/styles/bootstrap-dark.css +0 -4
  18. package/styles/bootstrap-lite.css +0 -4
  19. package/styles/bootstrap.css +0 -4
  20. package/styles/bootstrap4-lite.css +3 -7
  21. package/styles/bootstrap4.css +6 -10
  22. package/styles/bootstrap5-dark-lite.css +3 -7
  23. package/styles/bootstrap5-dark.css +5 -9
  24. package/styles/bootstrap5-lite.css +3 -7
  25. package/styles/bootstrap5.3-lite.css +3 -7
  26. package/styles/bootstrap5.3.css +5 -9
  27. package/styles/bootstrap5.css +5 -9
  28. package/styles/fabric-dark-lite.css +3 -7
  29. package/styles/fabric-dark.css +3 -7
  30. package/styles/fabric-lite.css +3 -7
  31. package/styles/fabric.css +3 -7
  32. package/styles/file-manager/_bds-definition.scss +6 -6
  33. package/styles/file-manager/_bootstrap4-definition.scss +6 -6
  34. package/styles/file-manager/_bootstrap5-dark-definition.scss +5 -5
  35. package/styles/file-manager/_bootstrap5-definition.scss +5 -5
  36. package/styles/file-manager/_bootstrap5.3-definition.scss +5 -5
  37. package/styles/file-manager/_fabric-dark-definition.scss +3 -3
  38. package/styles/file-manager/_fabric-definition.scss +3 -3
  39. package/styles/file-manager/_fluent-dark-definition.scss +5 -5
  40. package/styles/file-manager/_fluent-definition.scss +5 -5
  41. package/styles/file-manager/_layout.scss +0 -1
  42. package/styles/file-manager/_material-dark-definition.scss +6 -6
  43. package/styles/file-manager/_material-definition.scss +6 -6
  44. package/styles/file-manager/_tailwind-dark-definition.scss +6 -6
  45. package/styles/file-manager/_tailwind-definition.scss +6 -6
  46. package/styles/file-manager/bds.css +6 -10
  47. package/styles/file-manager/bootstrap-dark.css +0 -4
  48. package/styles/file-manager/bootstrap.css +0 -4
  49. package/styles/file-manager/bootstrap4.css +6 -10
  50. package/styles/file-manager/bootstrap5-dark.css +5 -9
  51. package/styles/file-manager/bootstrap5.3.css +5 -9
  52. package/styles/file-manager/bootstrap5.css +5 -9
  53. package/styles/file-manager/fabric-dark.css +3 -7
  54. package/styles/file-manager/fabric.css +3 -7
  55. package/styles/file-manager/fluent-dark.css +5 -9
  56. package/styles/file-manager/fluent.css +5 -9
  57. package/styles/file-manager/fluent2.css +0 -4
  58. package/styles/file-manager/highcontrast-light.css +0 -4
  59. package/styles/file-manager/highcontrast.css +0 -4
  60. package/styles/file-manager/material-dark.css +6 -10
  61. package/styles/file-manager/material.css +6 -10
  62. package/styles/file-manager/material3-dark.css +0 -4
  63. package/styles/file-manager/material3.css +0 -4
  64. package/styles/file-manager/tailwind-dark.css +6 -10
  65. package/styles/file-manager/tailwind.css +6 -10
  66. package/styles/file-manager/tailwind3.css +0 -4
  67. package/styles/fluent-dark-lite.css +2 -6
  68. package/styles/fluent-dark.css +5 -9
  69. package/styles/fluent-lite.css +2 -6
  70. package/styles/fluent.css +5 -9
  71. package/styles/fluent2-lite.css +0 -4
  72. package/styles/fluent2.css +0 -4
  73. package/styles/highcontrast-light-lite.css +0 -4
  74. package/styles/highcontrast-light.css +0 -4
  75. package/styles/highcontrast-lite.css +0 -4
  76. package/styles/highcontrast.css +0 -4
  77. package/styles/material-dark-lite.css +3 -7
  78. package/styles/material-dark.css +6 -10
  79. package/styles/material-lite.css +3 -7
  80. package/styles/material.css +6 -10
  81. package/styles/material3-dark-lite.css +0 -4
  82. package/styles/material3-dark.css +0 -4
  83. package/styles/material3-lite.css +0 -4
  84. package/styles/material3.css +0 -4
  85. package/styles/tailwind-dark-lite.css +3 -7
  86. package/styles/tailwind-dark.css +6 -10
  87. package/styles/tailwind-lite.css +3 -7
  88. package/styles/tailwind.css +6 -10
  89. package/styles/tailwind3-lite.css +0 -4
  90. package/styles/tailwind3.css +0 -4
@@ -11364,6 +11364,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11364
11364
  this.dragObj = null;
11365
11365
  this.startIndex = null;
11366
11366
  this.firstItemIndex = null;
11367
+ this.currentColumnIndex = 0;
11367
11368
  this.isSelectionUpdate = false;
11368
11369
  this.currentSelectedItem = [];
11369
11370
  this.count = 0;
@@ -11371,6 +11372,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11371
11372
  this.isLoaded = false;
11372
11373
  this.isNameWidth = false;
11373
11374
  this.isMultiSelect = false;
11375
+ this.isTabKeypressed = false;
11374
11376
  this.pasteOperation = false;
11375
11377
  this.uploadOperation = false;
11376
11378
  this.nextFocusIndex = null;
@@ -11382,6 +11384,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11382
11384
  altEnter: 'alt+enter',
11383
11385
  esc: 'escape',
11384
11386
  tab: 'tab',
11387
+ shiftTab: 'shift+tab',
11385
11388
  moveDown: 'downarrow',
11386
11389
  ctrlEnd: 'ctrl+end',
11387
11390
  ctrlHome: 'ctrl+home',
@@ -11404,6 +11407,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11404
11407
  end: 'end',
11405
11408
  home: 'home',
11406
11409
  moveUp: 'uparrow',
11410
+ moveLeft: 'leftarrow',
11411
+ moveRight: 'rightarrow',
11407
11412
  del: 'delete',
11408
11413
  ctrlX: this.parent.isMac ? 'cmd+x' : 'ctrl+x',
11409
11414
  ctrlC: this.parent.isMac ? 'cmd+c' : 'ctrl+c',
@@ -11879,7 +11884,11 @@ var DetailsView = /** @__PURE__ @class */ (function () {
11879
11884
  }
11880
11885
  };
11881
11886
  DetailsView.prototype.onSortColumn = function () {
11882
- if (this.parent.sortOrder !== 'None') {
11887
+ var _this = this;
11888
+ var columns = this.gridObj.columns;
11889
+ var isValidSortField = !isNullOrUndefined(columns) &&
11890
+ columns.some(function (col) { return col.field === _this.parent.sortBy; });
11891
+ if (this.parent.sortOrder !== 'None' && isValidSortField) {
11883
11892
  this.gridObj.sortModule.sortColumn(this.parent.sortBy, this.parent.sortOrder);
11884
11893
  }
11885
11894
  else {
@@ -12737,8 +12746,21 @@ var DetailsView = /** @__PURE__ @class */ (function () {
12737
12746
  }
12738
12747
  };
12739
12748
  DetailsView.prototype.getFocusedItemIndex = function () {
12740
- return (!isNullOrUndefined(this.getFocusedItem())) ?
12741
- parseInt(this.getFocusedItem().getAttribute('aria-rowindex'), 10) - 1 : null;
12749
+ var focusedItem = this.getFocusedItem();
12750
+ if (isNullOrUndefined(focusedItem)) {
12751
+ return null;
12752
+ }
12753
+ if (focusedItem.classList.contains('e-rowcell')) {
12754
+ return this.getRowIndexFromParent(focusedItem);
12755
+ }
12756
+ return parseInt(focusedItem.getAttribute('aria-rowindex'), 10) - 1;
12757
+ };
12758
+ DetailsView.prototype.getRowIndexFromParent = function (focusedItem) {
12759
+ var parentRow = focusedItem.parentElement;
12760
+ if (parentRow && parentRow.classList.contains('e-row')) {
12761
+ return parseInt(parentRow.getAttribute('aria-rowindex'), 10) - 1;
12762
+ }
12763
+ return null;
12742
12764
  };
12743
12765
  /* istanbul ignore next */
12744
12766
  DetailsView.prototype.keydownHandler = function (e) {
@@ -12767,6 +12789,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
12767
12789
  case 'ctrlLeft':
12768
12790
  case 'shiftLeft':
12769
12791
  case 'csLeft':
12792
+ case 'tab':
12793
+ case 'shiftTab':
12770
12794
  case 'esc':
12771
12795
  case 'del':
12772
12796
  case 'shiftdel':
@@ -12776,6 +12800,8 @@ var DetailsView = /** @__PURE__ @class */ (function () {
12776
12800
  case 'f2':
12777
12801
  case 'moveDown':
12778
12802
  case 'moveUp':
12803
+ case 'moveLeft':
12804
+ case 'moveRight':
12779
12805
  case 'ctrlD':
12780
12806
  e.preventDefault();
12781
12807
  break;
@@ -12856,12 +12882,18 @@ var DetailsView = /** @__PURE__ @class */ (function () {
12856
12882
  break;
12857
12883
  case 'ctrlHome':
12858
12884
  case 'tab':
12885
+ case 'shiftTab':
12859
12886
  if (!isNullOrUndefined(gridItems[0])) {
12860
12887
  if (!this.parent.allowMultiSelection && e.action === 'ctrlHome') {
12861
12888
  this.gridObj.selectRow(0);
12862
12889
  }
12863
- else if (this.gridObj.selectedRowIndex !== -1 && e.action === 'tab') {
12864
- return;
12890
+ else if (e.action === 'shiftTab') {
12891
+ this.handleReverseTabNavigation(e);
12892
+ }
12893
+ else if (e.action === 'tab') {
12894
+ this.isTabKeypressed = true;
12895
+ this.addHeaderFocus(e);
12896
+ this.isTabKeypressed = false;
12865
12897
  }
12866
12898
  else {
12867
12899
  this.addHeaderFocus(e);
@@ -12931,6 +12963,10 @@ var DetailsView = /** @__PURE__ @class */ (function () {
12931
12963
  case 'moveDown':
12932
12964
  this.moveFunction(gridItems, e, selIndex);
12933
12965
  break;
12966
+ case 'moveLeft':
12967
+ case 'moveRight':
12968
+ this.moveColumn(e);
12969
+ break;
12934
12970
  case 'end':
12935
12971
  lastItem = [getValue(this.parent.hasId ? 'id' : 'name', gridItems[gridLength - 1])];
12936
12972
  this.parent.setProperties({ selectedItems: lastItem }, true);
@@ -13061,6 +13097,72 @@ var DetailsView = /** @__PURE__ @class */ (function () {
13061
13097
  }
13062
13098
  this.addFocus(nextItem);
13063
13099
  };
13100
+ DetailsView.prototype.moveColumn = function (e) {
13101
+ var focusedItem = this.getFocusedItem();
13102
+ if (isNullOrUndefined(focusedItem)) {
13103
+ return;
13104
+ }
13105
+ var isHeaderFocused = focusedItem.classList.contains('e-headercell');
13106
+ var isRowFocused = focusedItem.classList.contains('e-row');
13107
+ var isCellFocused = focusedItem.classList.contains('e-rowcell');
13108
+ if (!isHeaderFocused && !isRowFocused && !isCellFocused) {
13109
+ return;
13110
+ }
13111
+ if (isHeaderFocused) {
13112
+ var headers = Array.from(this.element.querySelectorAll('th.e-headercell:not(.e-fe-checkbox)'));
13113
+ var currentIndex = headers.indexOf(focusedItem);
13114
+ if (currentIndex === -1) {
13115
+ return;
13116
+ }
13117
+ var nextIndex = this.getNextColumnIndex(currentIndex, headers.length, e.action === 'moveRight');
13118
+ // eslint-disable-next-line security/detect-object-injection
13119
+ var headerElement = headers[nextIndex];
13120
+ focusedItem.setAttribute('tabindex', '-1');
13121
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13122
+ headerElement.setAttribute('tabindex', '0');
13123
+ headerElement.focus();
13124
+ addClass([headerElement], [FOCUS, FOCUSED]);
13125
+ }
13126
+ else if (isRowFocused || isCellFocused) {
13127
+ var row = (isRowFocused ? focusedItem : focusedItem.parentElement);
13128
+ if (!isRowFocused && (!row || !row.classList.contains('e-row'))) {
13129
+ return;
13130
+ }
13131
+ var cells = Array.from(row.querySelectorAll('.e-rowcell'));
13132
+ if (cells.length === 0) {
13133
+ return;
13134
+ }
13135
+ var currentCellIndex = this.currentColumnIndex || 0;
13136
+ var nextColumnIndex = this.getNextColumnIndex(currentCellIndex, cells.length, e.action === 'moveRight');
13137
+ this.currentColumnIndex = nextColumnIndex;
13138
+ if (isRowFocused) {
13139
+ removeClass([row], [FOCUS, FOCUSED]);
13140
+ row.setAttribute('tabindex', '-1');
13141
+ }
13142
+ else {
13143
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13144
+ focusedItem.setAttribute('tabindex', '-1');
13145
+ }
13146
+ this.clearCellFocus(cells);
13147
+ // eslint-disable-next-line security/detect-object-injection
13148
+ var nextCell = cells[nextColumnIndex];
13149
+ nextCell.setAttribute('tabindex', '0');
13150
+ addClass([nextCell], [FOCUS, FOCUSED]);
13151
+ nextCell.focus();
13152
+ }
13153
+ };
13154
+ DetailsView.prototype.clearCellFocus = function (cells) {
13155
+ for (var i = 0; i < cells.length; i++) {
13156
+ cells[i].setAttribute('tabindex', '-1');
13157
+ removeClass([cells[i]], [FOCUS, FOCUSED]);
13158
+ }
13159
+ };
13160
+ DetailsView.prototype.getNextColumnIndex = function (currentIndex, maxLength, isRight) {
13161
+ if (isRight) {
13162
+ return Math.min(currentIndex + 1, maxLength - 1);
13163
+ }
13164
+ return Math.max(currentIndex - 1, 0);
13165
+ };
13064
13166
  DetailsView.prototype.checkRowsKey = function (items, indexValue, focIndex, e) {
13065
13167
  if (this.gridObj.checkAllRows === 'Uncheck' || this.gridObj.checkAllRows === 'Intermediate') {
13066
13168
  if (e.action !== 'csHome' && e.action !== 'csEnd') {
@@ -13146,18 +13248,58 @@ var DetailsView = /** @__PURE__ @class */ (function () {
13146
13248
  if (fItem) {
13147
13249
  fItem.removeAttribute('tabindex');
13148
13250
  removeClass([fItem], [FOCUS, FOCUSED]);
13251
+ if (fItem.classList.contains('e-rowcell')) {
13252
+ var parentRow = fItem.parentElement;
13253
+ if (parentRow) {
13254
+ removeClass([parentRow], [FOCUS, FOCUSED]);
13255
+ parentRow.removeAttribute('tabindex');
13256
+ }
13257
+ }
13258
+ if (fItem.classList.contains('e-row')) {
13259
+ var focusedCells = fItem.querySelectorAll('.e-rowcell');
13260
+ for (var i = 0; i < focusedCells.length; i++) {
13261
+ if (focusedCells[i].classList.contains('e-focus') || focusedCells[i].classList.contains('e-focused')) {
13262
+ focusedCells[i].removeAttribute('tabindex');
13263
+ removeClass([focusedCells[i]], [FOCUS, FOCUSED]);
13264
+ }
13265
+ }
13266
+ }
13149
13267
  }
13150
13268
  if (!isNullOrUndefined(itemElement)) {
13151
13269
  this.gridObj.element.setAttribute('tabindex', '-1');
13152
- itemElement.setAttribute('tabindex', '0');
13153
- itemElement.focus();
13154
- addClass([itemElement], [FOCUS, FOCUSED]);
13270
+ var targetRow = itemElement;
13271
+ targetRow.setAttribute('tabindex', '0');
13272
+ var cells = targetRow.querySelectorAll('.e-rowcell');
13273
+ this.clearCellFocus(Array.from(cells));
13274
+ targetRow.focus();
13275
+ addClass([targetRow], [FOCUS, FOCUSED]);
13276
+ this.currentColumnIndex = 0;
13155
13277
  }
13156
13278
  };
13157
13279
  DetailsView.prototype.addHeaderFocus = function (e) {
13158
13280
  var treeFocus = select('.e-row', this.element);
13159
13281
  this.gridObj.element.setAttribute('tabindex', '-1');
13282
+ var isHeaderFocused = this.getFocusedItem();
13160
13283
  var nameFocus;
13284
+ var focusedRow = select('.e-row.e-focus', this.element);
13285
+ var gridIconCell;
13286
+ if (!isNullOrUndefined(focusedRow) && this.isTabKeypressed) {
13287
+ gridIconCell = select('.e-rowcell.e-fe-grid-icon', focusedRow);
13288
+ }
13289
+ else {
13290
+ if (this.isTabKeypressed) {
13291
+ var activeCell = this.getFocusedItem();
13292
+ if (activeCell && activeCell.classList.contains('e-rowcell')) {
13293
+ gridIconCell = select('.e-rowcell.e-fe-grid-icon', activeCell.closest('.e-row'));
13294
+ }
13295
+ else {
13296
+ gridIconCell = select('.e-rowcell.e-fe-grid-icon', this.element);
13297
+ }
13298
+ }
13299
+ }
13300
+ if (this.tryNavigateToNextCellInRow(focusedRow, gridIconCell, isHeaderFocused)) {
13301
+ return;
13302
+ }
13161
13303
  if (!isNullOrUndefined(e.target) && e.target.classList.contains('e-defaultcursor')) {
13162
13304
  this.addFocus(0);
13163
13305
  nameFocus = e.target.nextElementSibling;
@@ -13179,6 +13321,147 @@ var DetailsView = /** @__PURE__ @class */ (function () {
13179
13321
  }
13180
13322
  }
13181
13323
  };
13324
+ DetailsView.prototype.tryNavigateToNextCellInRow = function (focusedRow, gridIconCell, isHeaderFocused) {
13325
+ if ((!isNullOrUndefined(focusedRow) || !isNullOrUndefined(gridIconCell)) && (!isNullOrUndefined(isHeaderFocused) && !isHeaderFocused.classList.contains('e-headercell'))) {
13326
+ if (!isNullOrUndefined(gridIconCell)) {
13327
+ var activeCell = this.getFocusedItem();
13328
+ if (activeCell && activeCell.classList.contains('e-rowcell')) {
13329
+ var row = activeCell.parentElement;
13330
+ var cells = row ? Array.from(row.querySelectorAll('.e-rowcell')) : [];
13331
+ var currentIndex = cells.indexOf(activeCell);
13332
+ var nextIndex = currentIndex + 1;
13333
+ if (nextIndex < cells.length) {
13334
+ this.currentColumnIndex = nextIndex;
13335
+ activeCell.setAttribute('tabindex', '-1');
13336
+ removeClass([activeCell], [FOCUS, FOCUSED]);
13337
+ // eslint-disable-next-line security/detect-object-injection
13338
+ var nextCell = cells[nextIndex];
13339
+ nextCell.setAttribute('tabindex', '0');
13340
+ addClass([nextCell], [FOCUS, FOCUSED]);
13341
+ nextCell.focus();
13342
+ return true;
13343
+ }
13344
+ else {
13345
+ var currentRow = activeCell.parentElement;
13346
+ var rows = this.gridObj.getRows();
13347
+ var currentRowIndex = rows.indexOf(currentRow);
13348
+ if (currentRowIndex !== -1) {
13349
+ var nextRow = this.gridObj.getRowByIndex(currentRowIndex + 1);
13350
+ if (!isNullOrUndefined(nextRow)) {
13351
+ activeCell.setAttribute('tabindex', '-1');
13352
+ removeClass([activeCell], [FOCUS, FOCUSED]);
13353
+ this.addFocus(currentRowIndex + 1);
13354
+ return true;
13355
+ }
13356
+ else {
13357
+ activeCell.setAttribute('tabindex', '-1');
13358
+ removeClass([activeCell], [FOCUS, FOCUSED]);
13359
+ activeCell.blur();
13360
+ return true;
13361
+ }
13362
+ }
13363
+ return false;
13364
+ }
13365
+ }
13366
+ var focusedRow_1 = this.getFocusedItem();
13367
+ if (!isNullOrUndefined(focusedRow_1) && focusedRow_1.classList.contains('e-row')) {
13368
+ focusedRow_1.setAttribute('tabindex', '-1');
13369
+ removeClass([focusedRow_1], [FOCUS, FOCUSED]);
13370
+ }
13371
+ gridIconCell.setAttribute('tabindex', '0');
13372
+ addClass([gridIconCell], [FOCUS, FOCUSED]);
13373
+ gridIconCell.focus();
13374
+ return true;
13375
+ }
13376
+ }
13377
+ return false;
13378
+ };
13379
+ DetailsView.prototype.handleReverseTabNavigation = function (e) {
13380
+ e.preventDefault();
13381
+ var focusedItem = this.getFocusedItem();
13382
+ var headers = Array.from(this.element.querySelectorAll('th.e-headercell:not(.e-fe-checkbox)'));
13383
+ if (headers.length === 0) {
13384
+ return;
13385
+ }
13386
+ if (!isNullOrUndefined(focusedItem) && focusedItem.classList.contains('e-rowcell')) {
13387
+ var row = focusedItem.parentElement;
13388
+ var cells = row ? Array.from(row.querySelectorAll('.e-rowcell:not(.e-gridchkbox)')) : [];
13389
+ var currentTargetIndex = cells.indexOf(focusedItem);
13390
+ var prevIndex = currentTargetIndex - 1;
13391
+ // eslint-disable-next-line security/detect-object-injection
13392
+ var targetElement = prevIndex >= 0 ? cells[prevIndex] : row;
13393
+ focusedItem.setAttribute('tabindex', '-1');
13394
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13395
+ targetElement.setAttribute('tabindex', '0');
13396
+ addClass([targetElement], [FOCUS, FOCUSED]);
13397
+ targetElement.focus();
13398
+ return;
13399
+ }
13400
+ if (!isNullOrUndefined(focusedItem) && focusedItem.classList.contains('e-row')) {
13401
+ var rows = this.gridObj.getRows();
13402
+ var currentRowIndex = rows.indexOf(focusedItem);
13403
+ if (currentRowIndex > 0) {
13404
+ var previousRow = rows[currentRowIndex - 1];
13405
+ var previousRowCells = Array.from(previousRow.querySelectorAll('.e-rowcell:not(.e-gridchkbox)'));
13406
+ var lastCell = previousRowCells[previousRowCells.length - 1];
13407
+ focusedItem.setAttribute('tabindex', '-1');
13408
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13409
+ lastCell.setAttribute('tabindex', '0');
13410
+ addClass([lastCell], [FOCUS, FOCUSED]);
13411
+ lastCell.focus();
13412
+ return;
13413
+ }
13414
+ focusedItem.setAttribute('tabindex', '-1');
13415
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13416
+ this.moveFocusToHeader(headers[headers.length - 1]);
13417
+ return;
13418
+ }
13419
+ if (!isNullOrUndefined(focusedItem) && focusedItem.classList.contains('e-headercell')) {
13420
+ var currentIndex = headers.indexOf(focusedItem);
13421
+ if (currentIndex > 0) {
13422
+ this.moveFocusToHeader(headers[currentIndex - 1]);
13423
+ }
13424
+ else if (currentIndex === 0) {
13425
+ this.clearDetailsFocus();
13426
+ }
13427
+ return;
13428
+ }
13429
+ if (!isNullOrUndefined(focusedItem)) {
13430
+ this.moveFocusToHeader(headers[headers.length - 1]);
13431
+ }
13432
+ };
13433
+ DetailsView.prototype.moveFocusToHeader = function (header) {
13434
+ var focusedItem = this.getFocusedItem();
13435
+ if (!isNullOrUndefined(focusedItem)) {
13436
+ focusedItem.setAttribute('tabindex', '-1');
13437
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13438
+ }
13439
+ header.setAttribute('tabindex', '0');
13440
+ header.focus();
13441
+ addClass([header], [FOCUS, FOCUSED]);
13442
+ };
13443
+ DetailsView.prototype.clearDetailsFocus = function () {
13444
+ var focusedItem = this.getFocusedItem();
13445
+ if (!isNullOrUndefined(focusedItem)) {
13446
+ focusedItem.setAttribute('tabindex', '-1');
13447
+ removeClass([focusedItem], [FOCUS, FOCUSED]);
13448
+ }
13449
+ var breadcrumbBar = select('.' + BREADCRUMBS, this.parent.element);
13450
+ if (!isNullOrUndefined(breadcrumbBar)) {
13451
+ var searchInput = breadcrumbBar.querySelector('input[aria-label="Search"]');
13452
+ if (!isNullOrUndefined(searchInput)) {
13453
+ searchInput.setAttribute('tabindex', '0');
13454
+ searchInput.focus();
13455
+ }
13456
+ else {
13457
+ var lastBreadcrumb = breadcrumbBar.querySelector('.e-address-list-item:last-child');
13458
+ if (!isNullOrUndefined(lastBreadcrumb)) {
13459
+ lastBreadcrumb.setAttribute('tabindex', '0');
13460
+ lastBreadcrumb.focus();
13461
+ }
13462
+ }
13463
+ }
13464
+ };
13182
13465
  DetailsView.prototype.getFocusedItem = function () {
13183
13466
  return select('.' + FOCUSED, this.element);
13184
13467
  };