@syncfusion/ej2-filemanager 34.1.29 → 34.1.33

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 (78) 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 +62 -31
  5. package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
  6. package/dist/es6/ej2-filemanager.es5.js +62 -31
  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 +9 -9
  12. package/src/file-manager/layout/details-view.js +39 -23
  13. package/src/file-manager/layout/large-icons-view.js +16 -6
  14. package/src/file-manager/pop-up/dialog.js +7 -2
  15. package/styles/bds-lite.css +5 -0
  16. package/styles/bds.css +5 -0
  17. package/styles/bootstrap-dark-lite.css +5 -0
  18. package/styles/bootstrap-dark.css +5 -0
  19. package/styles/bootstrap-lite.css +5 -0
  20. package/styles/bootstrap.css +5 -0
  21. package/styles/bootstrap4-lite.css +5 -0
  22. package/styles/bootstrap4.css +5 -0
  23. package/styles/bootstrap5-dark-lite.css +5 -0
  24. package/styles/bootstrap5-dark.css +5 -0
  25. package/styles/bootstrap5-lite.css +5 -0
  26. package/styles/bootstrap5.3-lite.css +5 -0
  27. package/styles/bootstrap5.3.css +5 -0
  28. package/styles/bootstrap5.css +5 -0
  29. package/styles/fabric-dark-lite.css +5 -0
  30. package/styles/fabric-dark.css +5 -0
  31. package/styles/fabric-lite.css +5 -0
  32. package/styles/fabric.css +5 -0
  33. package/styles/file-manager/_layout.scss +5 -0
  34. package/styles/file-manager/bds.css +5 -0
  35. package/styles/file-manager/bootstrap-dark.css +5 -0
  36. package/styles/file-manager/bootstrap.css +5 -0
  37. package/styles/file-manager/bootstrap4.css +5 -0
  38. package/styles/file-manager/bootstrap5-dark.css +5 -0
  39. package/styles/file-manager/bootstrap5.3.css +5 -0
  40. package/styles/file-manager/bootstrap5.css +5 -0
  41. package/styles/file-manager/fabric-dark.css +5 -0
  42. package/styles/file-manager/fabric.css +5 -0
  43. package/styles/file-manager/fluent-dark.css +5 -0
  44. package/styles/file-manager/fluent.css +5 -0
  45. package/styles/file-manager/fluent2.css +5 -0
  46. package/styles/file-manager/highcontrast-light.css +5 -0
  47. package/styles/file-manager/highcontrast.css +5 -0
  48. package/styles/file-manager/material-dark.css +5 -0
  49. package/styles/file-manager/material.css +5 -0
  50. package/styles/file-manager/material3-dark.css +5 -0
  51. package/styles/file-manager/material3.css +5 -0
  52. package/styles/file-manager/tailwind-dark.css +5 -0
  53. package/styles/file-manager/tailwind.css +5 -0
  54. package/styles/file-manager/tailwind3.css +5 -0
  55. package/styles/fluent-dark-lite.css +5 -0
  56. package/styles/fluent-dark.css +5 -0
  57. package/styles/fluent-lite.css +5 -0
  58. package/styles/fluent.css +5 -0
  59. package/styles/fluent2-lite.css +5 -0
  60. package/styles/fluent2.css +5 -0
  61. package/styles/highcontrast-light-lite.css +5 -0
  62. package/styles/highcontrast-light.css +5 -0
  63. package/styles/highcontrast-lite.css +5 -0
  64. package/styles/highcontrast.css +5 -0
  65. package/styles/material-dark-lite.css +5 -0
  66. package/styles/material-dark.css +5 -0
  67. package/styles/material-lite.css +5 -0
  68. package/styles/material.css +5 -0
  69. package/styles/material3-dark-lite.css +5 -0
  70. package/styles/material3-dark.css +5 -0
  71. package/styles/material3-lite.css +5 -0
  72. package/styles/material3.css +5 -0
  73. package/styles/tailwind-dark-lite.css +5 -0
  74. package/styles/tailwind-dark.css +5 -0
  75. package/styles/tailwind-lite.css +5 -0
  76. package/styles/tailwind.css +5 -0
  77. package/styles/tailwind3-lite.css +5 -0
  78. package/styles/tailwind3.css +5 -0
@@ -4230,6 +4230,7 @@ function onFolderDialogOpen(parent) {
4230
4230
  createInput(ele, getLocaleText(parent, 'Content-NewFolder'));
4231
4231
  }
4232
4232
  ele.parentElement.nextElementSibling.innerHTML = '';
4233
+ ele.setAttribute('aria-invalid', 'false');
4233
4234
  ele.oninput = () => {
4234
4235
  onValidate(parent, ele);
4235
4236
  };
@@ -4254,6 +4255,7 @@ function onRenameDialogOpen(parent) {
4254
4255
  createInput(inputEle, getLocaleText(parent, 'Content-Rename'));
4255
4256
  }
4256
4257
  inputEle.parentElement.nextElementSibling.innerHTML = '';
4258
+ inputEle.setAttribute('aria-invalid', 'false');
4257
4259
  inputEle.oninput = () => {
4258
4260
  onValidate(parent, inputEle);
4259
4261
  };
@@ -4333,7 +4335,7 @@ function getOptions(parent, text, e, details) {
4333
4335
  case 'NewFolder':
4334
4336
  options.dialogName = 'Create Folder';
4335
4337
  options.header = getLocaleText(parent, 'Header-NewFolder');
4336
- options.content = '<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>';
4338
+ options.content = '<input type="text" value="New folder" id="newname" aria-invalid="false" aria-describedby="newname_error"><div id="newname_error" class="e-fe-error" role="alert"></div>';
4337
4339
  options.buttons = [
4338
4340
  {
4339
4341
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Create') },
@@ -4376,7 +4378,7 @@ function getOptions(parent, text, e, details) {
4376
4378
  case 'Rename':
4377
4379
  options.dialogName = 'Rename';
4378
4380
  options.header = getLocaleText(parent, 'Header-Rename');
4379
- options.content = '<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>';
4381
+ options.content = '<input type="text" class="e-input" id="rename" aria-invalid="false" aria-describedby="rename_error"><div id="rename_error" class="e-fe-error" role="alert"></div>';
4380
4382
  options.buttons = [
4381
4383
  {
4382
4384
  buttonModel: { isPrimary: true, content: getLocaleText(parent, 'Button-Save') },
@@ -4627,9 +4629,11 @@ function onValidate(parent, ele) {
4627
4629
  addInvalid(parent, ele);
4628
4630
  }
4629
4631
  else if (ele.value === '') {
4632
+ ele.setAttribute('aria-invalid', 'true');
4630
4633
  ele.parentElement.nextElementSibling.innerHTML = getLocaleText(parent, 'Validation-Empty');
4631
4634
  }
4632
4635
  else {
4636
+ ele.setAttribute('aria-invalid', 'false');
4633
4637
  ele.parentElement.nextElementSibling.innerHTML = '';
4634
4638
  }
4635
4639
  }
@@ -4657,6 +4661,7 @@ function onSubmitValidate(parent, ele) {
4657
4661
  */
4658
4662
  function addInvalid(parent, ele) {
4659
4663
  const error = getLocaleText(parent, 'Validation-Invalid').replace('{0}', '"' + ele.value + '"');
4664
+ ele.setAttribute('aria-invalid', 'true');
4660
4665
  if (parent.enableHtmlSanitizer) {
4661
4666
  ele.parentElement.nextElementSibling.textContent = error;
4662
4667
  }
@@ -6083,12 +6088,22 @@ class LargeIconsView {
6083
6088
  }
6084
6089
  }
6085
6090
  spaceKey(fItem) {
6086
- if (!isNullOrUndefined(fItem) && !fItem.classList.contains(ACTIVE)) {
6087
- const fileSelectionArgs = this.triggerSelection('select', fItem);
6088
- if (fileSelectionArgs.cancel !== true) {
6089
- this.addActive(fItem);
6090
- this.parent.notify(selectionChanged, {});
6091
- this.triggerSelect('select', fItem);
6091
+ if (!isNullOrUndefined(fItem)) {
6092
+ if (!fItem.classList.contains(ACTIVE)) {
6093
+ const fileSelectionArgs = this.triggerSelection('select', fItem);
6094
+ if (fileSelectionArgs.cancel !== true) {
6095
+ this.addActive(fItem);
6096
+ this.parent.notify(selectionChanged, {});
6097
+ this.triggerSelect('select', fItem);
6098
+ }
6099
+ }
6100
+ else {
6101
+ const fileSelectionArgs = this.triggerSelection('unselect', fItem);
6102
+ if (fileSelectionArgs.cancel !== true) {
6103
+ this.removeActive(fItem);
6104
+ this.parent.notify(selectionChanged, {});
6105
+ this.triggerSelect('unselect', fItem);
6106
+ }
6092
6107
  }
6093
6108
  }
6094
6109
  }
@@ -12610,11 +12625,15 @@ class DetailsView {
12610
12625
  case 'enter':
12611
12626
  if (this.gridObj.selectedRowIndex === -1 && this.gridObj.allowSorting === true) {
12612
12627
  if (!e.target.classList.contains('e-fe-grid-icon')) {
12613
- const direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
12614
- const currentField = this.gridObj.getColumnByUid(e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid')).field;
12615
- this.gridObj.sortColumn(currentField, direction);
12616
- if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
12617
- this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
12628
+ const headerDiv = e.target.querySelector('.e-headercelldiv');
12629
+ if (headerDiv) {
12630
+ const mappingUid = headerDiv.getAttribute('data-mappinguid');
12631
+ const direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
12632
+ const currentField = this.gridObj.getColumnByUid(mappingUid).field;
12633
+ this.gridObj.sortColumn(currentField, direction);
12634
+ if (!isNullOrUndefined(this.getFocusedItem().nextSibling)) {
12635
+ this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
12636
+ }
12618
12637
  }
12619
12638
  }
12620
12639
  break;
@@ -12656,21 +12675,19 @@ class DetailsView {
12656
12675
  case 'ctrlHome':
12657
12676
  case 'tab':
12658
12677
  case 'shiftTab':
12659
- if (!isNullOrUndefined(gridItems[0])) {
12660
- if (!this.parent.allowMultiSelection && e.action === 'ctrlHome') {
12661
- this.gridObj.selectRow(0);
12662
- }
12663
- else if (e.action === 'shiftTab') {
12664
- this.handleReverseTabNavigation(e);
12665
- }
12666
- else if (e.action === 'tab') {
12667
- this.isTabKeypressed = true;
12668
- this.addHeaderFocus(e);
12669
- this.isTabKeypressed = false;
12670
- }
12671
- else {
12672
- this.addHeaderFocus(e);
12673
- }
12678
+ if (!this.parent.allowMultiSelection && e.action === 'ctrlHome') {
12679
+ this.gridObj.selectRow(0);
12680
+ }
12681
+ else if (e.action === 'shiftTab') {
12682
+ this.handleReverseTabNavigation(e);
12683
+ }
12684
+ else if (e.action === 'tab') {
12685
+ this.isTabKeypressed = true;
12686
+ this.addHeaderFocus(e);
12687
+ this.isTabKeypressed = false;
12688
+ }
12689
+ else {
12690
+ this.addHeaderFocus(e);
12674
12691
  }
12675
12692
  break;
12676
12693
  case 'ctrlEnd':
@@ -12848,6 +12865,14 @@ class DetailsView {
12848
12865
  this.gridObj.selectRows(selRowIndeces);
12849
12866
  this.addFocus(lItem);
12850
12867
  }
12868
+ else if (e.action === 'space' && this.isSelected(selRowIndeces, focIndex)) {
12869
+ const indexToRemove = selRowIndeces.indexOf(focIndex);
12870
+ if (indexToRemove > -1) {
12871
+ selRowIndeces.splice(indexToRemove, 1);
12872
+ this.gridObj.selectRows(selRowIndeces);
12873
+ this.addFocus(focIndex);
12874
+ }
12875
+ }
12851
12876
  else if (e.action === 'shiftSpace') {
12852
12877
  this.gridObj.selectRow(selIndex);
12853
12878
  }
@@ -13088,9 +13113,11 @@ class DetailsView {
13088
13113
  nameFocus.setAttribute('tabindex', '0');
13089
13114
  nameFocus.focus();
13090
13115
  addClass([nameFocus], [FOCUS, FOCUSED]);
13091
- treeFocus.setAttribute('tabindex', '0');
13092
- if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
13093
- removeClass([treeFocus], [FOCUS, FOCUSED]);
13116
+ if (!isNullOrUndefined(treeFocus)) {
13117
+ treeFocus.setAttribute('tabindex', '0');
13118
+ if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
13119
+ removeClass([treeFocus], [FOCUS, FOCUSED]);
13120
+ }
13094
13121
  }
13095
13122
  }
13096
13123
  }
@@ -13156,6 +13183,10 @@ class DetailsView {
13156
13183
  if (headers.length === 0) {
13157
13184
  return;
13158
13185
  }
13186
+ if (isNullOrUndefined(focusedItem)) {
13187
+ this.moveFocusToHeader(headers[headers.length - 1]);
13188
+ return;
13189
+ }
13159
13190
  if (!isNullOrUndefined(focusedItem) && focusedItem.classList.contains('e-rowcell')) {
13160
13191
  const row = focusedItem.parentElement;
13161
13192
  const cells = row ? Array.from(row.querySelectorAll('.e-rowcell:not(.e-gridchkbox)')) : [];