handsontable 14.0.0-next-dd92f79-20231124 → 14.0.0-next-88de277-20231127

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/3rdparty/walkontable/src/overlay/_base.js +2 -2
  2. package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
  3. package/3rdparty/walkontable/src/renderer/columnHeaders.js +1 -1
  4. package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
  5. package/3rdparty/walkontable/src/renderer/rows.js +1 -1
  6. package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
  7. package/3rdparty/walkontable/src/selection/manager.js +20 -6
  8. package/3rdparty/walkontable/src/selection/manager.mjs +20 -6
  9. package/base.js +2 -2
  10. package/base.mjs +2 -2
  11. package/core.js +1 -1
  12. package/core.mjs +1 -1
  13. package/dataMap/replaceData.js +3 -1
  14. package/dataMap/replaceData.mjs +3 -1
  15. package/dist/handsontable.css +62 -44
  16. package/dist/handsontable.full.css +62 -44
  17. package/dist/handsontable.full.js +123 -302
  18. package/dist/handsontable.full.min.css +5 -5
  19. package/dist/handsontable.full.min.js +64 -64
  20. package/dist/handsontable.js +123 -302
  21. package/dist/handsontable.min.css +5 -5
  22. package/dist/handsontable.min.js +19 -19
  23. package/dist/languages/all.js +2 -24
  24. package/dist/languages/all.min.js +1 -1
  25. package/dist/languages/en-US.js +1 -12
  26. package/dist/languages/en-US.min.js +1 -1
  27. package/dist/languages/pl-PL.js +1 -12
  28. package/dist/languages/pl-PL.min.js +1 -1
  29. package/editors/dateEditor/dateEditor.js +0 -7
  30. package/editors/dateEditor/dateEditor.mjs +1 -8
  31. package/editors/handsontableEditor/handsontableEditor.js +0 -7
  32. package/editors/handsontableEditor/handsontableEditor.mjs +1 -8
  33. package/editors/passwordEditor/passwordEditor.js +4 -0
  34. package/editors/passwordEditor/passwordEditor.mjs +5 -1
  35. package/helpers/a11y.js +2 -2
  36. package/helpers/a11y.mjs +1 -1
  37. package/helpers/dom/element.js +0 -29
  38. package/helpers/dom/element.mjs +0 -28
  39. package/helpers/mixed.js +2 -2
  40. package/helpers/mixed.mjs +2 -2
  41. package/i18n/constants.js +1 -14
  42. package/i18n/constants.mjs +1 -14
  43. package/i18n/languages/en-US.js +1 -12
  44. package/i18n/languages/en-US.mjs +1 -12
  45. package/i18n/languages/pl-PL.js +1 -12
  46. package/i18n/languages/pl-PL.mjs +1 -12
  47. package/languages/all.js +2 -24
  48. package/languages/en-US.js +1 -12
  49. package/languages/en-US.mjs +1 -12
  50. package/languages/index.js +2 -24
  51. package/languages/pl-PL.js +1 -12
  52. package/languages/pl-PL.mjs +1 -12
  53. package/package.json +1 -1
  54. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -3
  55. package/plugins/collapsibleColumns/collapsibleColumns.mjs +3 -4
  56. package/plugins/columnSorting/columnSorting.js +4 -30
  57. package/plugins/columnSorting/columnSorting.mjs +6 -32
  58. package/plugins/contextMenu/menu/menuItemRenderer.js +0 -12
  59. package/plugins/contextMenu/menu/menuItemRenderer.mjs +2 -14
  60. package/plugins/dropdownMenu/dropdownMenu.js +1 -2
  61. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -3
  62. package/plugins/filters/ui/input.js +3 -0
  63. package/plugins/filters/ui/input.mjs +3 -0
  64. package/plugins/hiddenColumns/hiddenColumns.js +0 -44
  65. package/plugins/hiddenColumns/hiddenColumns.mjs +1 -45
  66. package/plugins/hiddenRows/hiddenRows.js +0 -44
  67. package/plugins/hiddenRows/hiddenRows.mjs +1 -45
  68. package/plugins/multiColumnSorting/multiColumnSorting.js +0 -21
  69. package/plugins/multiColumnSorting/multiColumnSorting.mjs +1 -22
  70. package/plugins/nestedRows/nestedRows.js +1 -2
  71. package/plugins/nestedRows/nestedRows.mjs +1 -2
  72. package/plugins/nestedRows/ui/headers.js +3 -3
  73. package/plugins/nestedRows/ui/headers.mjs +4 -4
  74. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -3
  75. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -4
  76. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -1
  77. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -1
  78. package/renderers/dateRenderer/dateRenderer.js +0 -5
  79. package/renderers/dateRenderer/dateRenderer.mjs +0 -5
  80. package/renderers/handsontableRenderer/handsontableRenderer.js +0 -5
  81. package/renderers/handsontableRenderer/handsontableRenderer.mjs +0 -5
  82. package/renderers/selectRenderer/selectRenderer.js +0 -5
  83. package/renderers/selectRenderer/selectRenderer.mjs +0 -5
  84. package/selection/highlight/types/focus.js +2 -0
  85. package/selection/highlight/types/focus.mjs +2 -0
  86. package/selection/selection.js +0 -1
  87. package/selection/selection.mjs +0 -1
  88. package/tableView.js +35 -2
  89. package/tableView.mjs +35 -2
@@ -18,8 +18,7 @@ import { rangeEach } from "../../helpers/number.mjs";
18
18
  import { warn } from "../../helpers/console.mjs";
19
19
  import { addClass, hasClass, removeClass, fastInnerText, removeAttribute, setAttribute } from "../../helpers/dom/element.mjs";
20
20
  import { stopImmediatePropagation } from "../../helpers/dom/event.mjs";
21
- import { A11Y_DESCRIPTION, A11Y_EXPANDED, A11Y_HIDDEN } from "../../helpers/a11y.mjs";
22
- import { COLUMN_HEADER_DESCRIPTION_COLLAPSE_COLUMN, COLUMN_HEADER_DESCRIPTION_EXPAND_COLUMN } from "../../i18n/constants.mjs";
21
+ import { A11Y_EXPANDED, A11Y_HIDDEN } from "../../helpers/a11y.mjs";
23
22
  export const PLUGIN_KEY = 'collapsibleColumns';
24
23
  export const PLUGIN_PRIORITY = 290;
25
24
  const SETTING_KEYS = ['nestedHeaders'];
@@ -545,7 +544,7 @@ function _onAfterGetColHeader2(column, TH, headerLevel) {
545
544
 
546
545
  // Add ARIA tags
547
546
  if (isAriaTagsEnabled) {
548
- setAttribute(TH, [A11Y_EXPANDED(false), A11Y_DESCRIPTION(this.hot.getTranslatedPhrase(COLUMN_HEADER_DESCRIPTION_EXPAND_COLUMN))]);
547
+ setAttribute(TH, ...A11Y_EXPANDED(false));
549
548
  }
550
549
  } else {
551
550
  addClass(collapsibleElement, 'expanded');
@@ -553,7 +552,7 @@ function _onAfterGetColHeader2(column, TH, headerLevel) {
553
552
 
554
553
  // Add ARIA tags
555
554
  if (isAriaTagsEnabled) {
556
- setAttribute(TH, [A11Y_EXPANDED(true), A11Y_DESCRIPTION(this.hot.getTranslatedPhrase(COLUMN_HEADER_DESCRIPTION_COLLAPSE_COLUMN))]);
555
+ setAttribute(TH, ...A11Y_EXPANDED(true));
557
556
  }
558
557
  }
559
558
  if (isAriaTagsEnabled) {
@@ -17,7 +17,6 @@ var _domHelpers = require("./domHelpers");
17
17
  var _rootComparator = require("./rootComparator");
18
18
  var _sortService = require("./sortService");
19
19
  var _a11y = require("../../helpers/a11y");
20
- var _constants = require("../../i18n/constants");
21
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
21
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
23
22
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
@@ -30,7 +29,6 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 50;
30
29
  const APPEND_COLUMN_CONFIG_STRATEGY = exports.APPEND_COLUMN_CONFIG_STRATEGY = 'append';
31
30
  const REPLACE_COLUMN_CONFIG_STRATEGY = exports.REPLACE_COLUMN_CONFIG_STRATEGY = 'replace';
32
31
  const SHORTCUTS_GROUP = PLUGIN_KEY;
33
- const SORTING_INDICATOR_CLASS = 'columnSortingIndicator';
34
32
  (0, _sortService.registerRootComparator)(PLUGIN_KEY, _rootComparator.rootComparator);
35
33
  _pluginHooks.default.getSingleton().register('beforeColumnSort');
36
34
  _pluginHooks.default.getSingleton().register('afterColumnSort');
@@ -673,28 +671,6 @@ class ColumnSorting extends _base.BasePlugin {
673
671
  }
674
672
  }
675
673
 
676
- /**
677
- * Update sorting indicator.
678
- *
679
- * @private
680
- * @param {number} column Visual column index.
681
- * @param {HTMLElement} headerSpanElement Header span element.
682
- */
683
- updateSortingIndicator(column, headerSpanElement) {
684
- const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
685
- const ariaTags = this.hot.getSettings().ariaTags;
686
- const showSortIndicator = pluginSettingsForColumn.indicator;
687
- const isColumnSorted = this.columnStatesManager.isColumnSorted(column);
688
- const indicatorElement = headerSpanElement.querySelector(`.${SORTING_INDICATOR_CLASS}`);
689
- if (showSortIndicator && isColumnSorted && !indicatorElement) {
690
- (0, _element.appendElement)(headerSpanElement, {
691
- tagName: 'div',
692
- className: SORTING_INDICATOR_CLASS,
693
- attributes: ariaTags ? [(0, _a11y.A11Y_HIDDEN)()] : []
694
- });
695
- }
696
- }
697
-
698
674
  /**
699
675
  * Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called
700
676
  * for `updateSettings` in specific situations.
@@ -723,7 +699,7 @@ class ColumnSorting extends _base.BasePlugin {
723
699
  wasClickableHeaderClicked(event, column) {
724
700
  const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
725
701
  const headerActionEnabled = pluginSettingsForColumn.headerAction;
726
- return headerActionEnabled && ((0, _element.hasClass)(event.target, _utils.HEADER_SPAN_CLASS) || (0, _element.hasClass)(event.target, SORTING_INDICATOR_CLASS));
702
+ return headerActionEnabled && (0, _element.hasClass)(event.target, _utils.HEADER_SPAN_CLASS);
727
703
  }
728
704
  /**
729
705
  * Callback for the `onAfterOnCellMouseDown` hook.
@@ -772,14 +748,12 @@ function _onAfterGetColHeader2(column, TH) {
772
748
  return;
773
749
  }
774
750
  const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
775
- const ariaTags = this.hot.getSettings().ariaTags;
776
751
  const showSortIndicator = pluginSettingsForColumn.indicator;
777
752
  const headerActionEnabled = pluginSettingsForColumn.headerAction;
778
- const currentSortState = this.columnStatesManager.getSortOrderOfColumn(column);
779
753
  this.updateHeaderClasses(headerSpanElement, this.columnStatesManager, column, showSortIndicator, headerActionEnabled);
780
- this.updateSortingIndicator(column, headerSpanElement);
781
- if (ariaTags) {
782
- (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_SORT)(currentSortState ? `${currentSortState}ending` : 'none'), (0, _a11y.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(_constants.COLUMN_HEADER_DESCRIPTION_SORT_ROWS))]);
754
+ if (this.hot.getSettings().ariaTags) {
755
+ const currentSortState = this.columnStatesManager.getSortOrderOfColumn(column);
756
+ (0, _element.setAttribute)(TH, ...(0, _a11y.A11Y_SORT)(currentSortState ? `${currentSortState}ending` : 'none'));
783
757
  }
784
758
  }
785
759
  function _onAfterLoadData2(initialLoad) {
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
8
  function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
9
- import { addClass, appendElement, hasClass, removeClass, setAttribute } from "../../helpers/dom/element.mjs";
9
+ import { addClass, hasClass, removeClass, setAttribute } from "../../helpers/dom/element.mjs";
10
10
  import { isUndefined, isDefined } from "../../helpers/mixed.mjs";
11
11
  import { isObject } from "../../helpers/object.mjs";
12
12
  import { isFunction } from "../../helpers/function.mjs";
@@ -19,14 +19,12 @@ import { HEADER_SPAN_CLASS, getNextSortOrder, areValidSortStates, getHeaderSpanE
19
19
  import { getClassesToRemove, getClassesToAdd } from "./domHelpers.mjs";
20
20
  import { rootComparator } from "./rootComparator.mjs";
21
21
  import { registerRootComparator, sort } from "./sortService/index.mjs";
22
- import { A11Y_DESCRIPTION, A11Y_HIDDEN, A11Y_SORT } from "../../helpers/a11y.mjs";
23
- import { COLUMN_HEADER_DESCRIPTION_SORT_ROWS } from "../../i18n/constants.mjs";
22
+ import { A11Y_SORT } from "../../helpers/a11y.mjs";
24
23
  export const PLUGIN_KEY = 'columnSorting';
25
24
  export const PLUGIN_PRIORITY = 50;
26
25
  export const APPEND_COLUMN_CONFIG_STRATEGY = 'append';
27
26
  export const REPLACE_COLUMN_CONFIG_STRATEGY = 'replace';
28
27
  const SHORTCUTS_GROUP = PLUGIN_KEY;
29
- const SORTING_INDICATOR_CLASS = 'columnSortingIndicator';
30
28
  registerRootComparator(PLUGIN_KEY, rootComparator);
31
29
  Hooks.getSingleton().register('beforeColumnSort');
32
30
  Hooks.getSingleton().register('afterColumnSort');
@@ -669,28 +667,6 @@ export class ColumnSorting extends BasePlugin {
669
667
  }
670
668
  }
671
669
 
672
- /**
673
- * Update sorting indicator.
674
- *
675
- * @private
676
- * @param {number} column Visual column index.
677
- * @param {HTMLElement} headerSpanElement Header span element.
678
- */
679
- updateSortingIndicator(column, headerSpanElement) {
680
- const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
681
- const ariaTags = this.hot.getSettings().ariaTags;
682
- const showSortIndicator = pluginSettingsForColumn.indicator;
683
- const isColumnSorted = this.columnStatesManager.isColumnSorted(column);
684
- const indicatorElement = headerSpanElement.querySelector(`.${SORTING_INDICATOR_CLASS}`);
685
- if (showSortIndicator && isColumnSorted && !indicatorElement) {
686
- appendElement(headerSpanElement, {
687
- tagName: 'div',
688
- className: SORTING_INDICATOR_CLASS,
689
- attributes: ariaTags ? [A11Y_HIDDEN()] : []
690
- });
691
- }
692
- }
693
-
694
670
  /**
695
671
  * Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called
696
672
  * for `updateSettings` in specific situations.
@@ -719,7 +695,7 @@ export class ColumnSorting extends BasePlugin {
719
695
  wasClickableHeaderClicked(event, column) {
720
696
  const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
721
697
  const headerActionEnabled = pluginSettingsForColumn.headerAction;
722
- return headerActionEnabled && (hasClass(event.target, HEADER_SPAN_CLASS) || hasClass(event.target, SORTING_INDICATOR_CLASS));
698
+ return headerActionEnabled && hasClass(event.target, HEADER_SPAN_CLASS);
723
699
  }
724
700
  /**
725
701
  * Callback for the `onAfterOnCellMouseDown` hook.
@@ -767,14 +743,12 @@ function _onAfterGetColHeader2(column, TH) {
767
743
  return;
768
744
  }
769
745
  const pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];
770
- const ariaTags = this.hot.getSettings().ariaTags;
771
746
  const showSortIndicator = pluginSettingsForColumn.indicator;
772
747
  const headerActionEnabled = pluginSettingsForColumn.headerAction;
773
- const currentSortState = this.columnStatesManager.getSortOrderOfColumn(column);
774
748
  this.updateHeaderClasses(headerSpanElement, this.columnStatesManager, column, showSortIndicator, headerActionEnabled);
775
- this.updateSortingIndicator(column, headerSpanElement);
776
- if (ariaTags) {
777
- setAttribute(TH, [A11Y_SORT(currentSortState ? `${currentSortState}ending` : 'none'), A11Y_DESCRIPTION(this.hot.getTranslatedPhrase(COLUMN_HEADER_DESCRIPTION_SORT_ROWS))]);
749
+ if (this.hot.getSettings().ariaTags) {
750
+ const currentSortState = this.columnStatesManager.getSortOrderOfColumn(column);
751
+ setAttribute(TH, ...A11Y_SORT(currentSortState ? `${currentSortState}ending` : 'none'));
778
752
  }
779
753
  }
780
754
  function _onAfterLoadData2(initialLoad) {
@@ -5,8 +5,6 @@ exports.createMenuItemRenderer = createMenuItemRenderer;
5
5
  var _utils = require("./utils");
6
6
  var _element = require("../../../helpers/dom/element");
7
7
  var _a11y = require("../../../helpers/a11y");
8
- const SUBMENU_INDICATOR_CLASSNAME = 'submenuIndicator';
9
-
10
8
  /**
11
9
  * Creates the menu renderer function.
12
10
  *
@@ -39,16 +37,6 @@ function createMenuItemRenderer(mainTableHot) {
39
37
  const isFocusable = !(0, _utils.isItemDisabled)(item, mainTableHot) && !(0, _utils.isItemSelectionDisabled)(item) && !(0, _utils.isItemSeparator)(item);
40
38
  (0, _element.setAttribute)(TD, [(0, _a11y.A11Y_MENU_ITEM)(), (0, _a11y.A11Y_LABEL)(itemValue), ...(isFocusable ? [(0, _a11y.A11Y_TABINDEX)(-1)] : []), ...((0, _utils.isItemDisabled)(item, mainTableHot) ? [(0, _a11y.A11Y_DISABLED)()] : []), ...((0, _utils.isItemSubMenu)(item) ? [(0, _a11y.A11Y_EXPANDED)(false)] : [])]);
41
39
  }
42
- if ((0, _utils.isItemSubMenu)(item)) {
43
- const submenuIndicatorElement = TD.querySelector('.submenuIndicator');
44
- if (!submenuIndicatorElement) {
45
- (0, _element.appendElement)(TD, {
46
- tagName: 'div',
47
- attributes: mainTableHot.getSettings().ariaTags ? [(0, _a11y.A11Y_HIDDEN)()] : [],
48
- className: SUBMENU_INDICATOR_CLASSNAME
49
- });
50
- }
51
- }
52
40
  TD.className = '';
53
41
  TD.appendChild(wrapper);
54
42
  if ((0, _utils.isItemSeparator)(item)) {
@@ -1,8 +1,6 @@
1
1
  import { isItemSubMenu, isItemDisabled, isItemSelectionDisabled, isItemSeparator } from "./utils.mjs";
2
- import { addClass, appendElement, empty, fastInnerHTML, setAttribute } from "../../../helpers/dom/element.mjs";
3
- import { A11Y_DISABLED, A11Y_EXPANDED, A11Y_HIDDEN, A11Y_LABEL, A11Y_MENU_ITEM, A11Y_TABINDEX } from "../../../helpers/a11y.mjs";
4
- const SUBMENU_INDICATOR_CLASSNAME = 'submenuIndicator';
5
-
2
+ import { addClass, empty, fastInnerHTML, setAttribute } from "../../../helpers/dom/element.mjs";
3
+ import { A11Y_DISABLED, A11Y_EXPANDED, A11Y_LABEL, A11Y_MENU_ITEM, A11Y_TABINDEX } from "../../../helpers/a11y.mjs";
6
4
  /**
7
5
  * Creates the menu renderer function.
8
6
  *
@@ -35,16 +33,6 @@ export function createMenuItemRenderer(mainTableHot) {
35
33
  const isFocusable = !isItemDisabled(item, mainTableHot) && !isItemSelectionDisabled(item) && !isItemSeparator(item);
36
34
  setAttribute(TD, [A11Y_MENU_ITEM(), A11Y_LABEL(itemValue), ...(isFocusable ? [A11Y_TABINDEX(-1)] : []), ...(isItemDisabled(item, mainTableHot) ? [A11Y_DISABLED()] : []), ...(isItemSubMenu(item) ? [A11Y_EXPANDED(false)] : [])]);
37
35
  }
38
- if (isItemSubMenu(item)) {
39
- const submenuIndicatorElement = TD.querySelector('.submenuIndicator');
40
- if (!submenuIndicatorElement) {
41
- appendElement(TD, {
42
- tagName: 'div',
43
- attributes: mainTableHot.getSettings().ariaTags ? [A11Y_HIDDEN()] : [],
44
- className: SUBMENU_INDICATOR_CLASSNAME
45
- });
46
- }
47
- }
48
36
  TD.className = '';
49
37
  TD.appendChild(wrapper);
50
38
  if (isItemSeparator(item)) {
@@ -12,7 +12,6 @@ var _itemsFactory = require("../contextMenu/itemsFactory");
12
12
  var _menu = require("../contextMenu/menu");
13
13
  var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
14
14
  var _predefinedItems = require("../contextMenu/predefinedItems");
15
- var _constants = require("../../i18n/constants");
16
15
  var _a11y = require("../../helpers/a11y");
17
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
17
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
@@ -490,7 +489,7 @@ function _onAfterGetColHeader2(col, TH) {
490
489
  button.type = 'button';
491
490
  button.tabIndex = -1;
492
491
  if (this.hot.getSettings().ariaTags) {
493
- (0, _element.setAttribute)(button, [(0, _a11y.A11Y_LABEL)(this.hot.getTranslatedPhrase(_constants.COLUMN_HEADER_LABEL_OPEN_MENU))]);
492
+ (0, _element.setAttribute)(button, [(0, _a11y.A11Y_HIDDEN)(), (0, _a11y.A11Y_LABEL)(' ')]);
494
493
  (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_HASPOPUP)('menu')]);
495
494
  }
496
495
 
@@ -15,8 +15,7 @@ import { ItemsFactory } from "../contextMenu/itemsFactory.mjs";
15
15
  import { Menu } from "../contextMenu/menu/index.mjs";
16
16
  import Hooks from "../../pluginHooks.mjs";
17
17
  import { COLUMN_LEFT, COLUMN_RIGHT, REMOVE_COLUMN, CLEAR_COLUMN, READ_ONLY, ALIGNMENT, SEPARATOR } from "../contextMenu/predefinedItems/index.mjs";
18
- import { COLUMN_HEADER_LABEL_OPEN_MENU } from "../../i18n/constants.mjs";
19
- import { A11Y_LABEL, A11Y_HASPOPUP } from "../../helpers/a11y.mjs";
18
+ import { A11Y_HASPOPUP, A11Y_HIDDEN, A11Y_LABEL } from "../../helpers/a11y.mjs";
20
19
  Hooks.getSingleton().register('afterDropdownMenuDefaultOptions');
21
20
  Hooks.getSingleton().register('beforeDropdownMenuShow');
22
21
  Hooks.getSingleton().register('afterDropdownMenuShow');
@@ -485,7 +484,7 @@ function _onAfterGetColHeader2(col, TH) {
485
484
  button.type = 'button';
486
485
  button.tabIndex = -1;
487
486
  if (this.hot.getSettings().ariaTags) {
488
- setAttribute(button, [A11Y_LABEL(this.hot.getTranslatedPhrase(COLUMN_HEADER_LABEL_OPEN_MENU))]);
487
+ setAttribute(button, [A11Y_HIDDEN(), A11Y_LABEL(' ')]);
489
488
  setAttribute(TH, [A11Y_HASPOPUP('menu')]);
490
489
  }
491
490
 
@@ -63,8 +63,11 @@ class InputUI extends _base.BaseUI {
63
63
  */
64
64
  build() {
65
65
  super.build();
66
+ const icon = this.hot.rootDocument.createElement('div');
66
67
  _classPrivateFieldSet(this, _input, this._element.firstChild);
67
68
  (0, _element.addClass)(this._element, 'htUIInput');
69
+ (0, _element.addClass)(icon, 'htUIInputIcon');
70
+ this._element.appendChild(icon);
68
71
  this.update();
69
72
  }
70
73
 
@@ -60,8 +60,11 @@ export class InputUI extends BaseUI {
60
60
  */
61
61
  build() {
62
62
  super.build();
63
+ const icon = this.hot.rootDocument.createElement('div');
63
64
  _classPrivateFieldSet(this, _input, this._element.firstChild);
64
65
  addClass(this._element, 'htUIInput');
66
+ addClass(icon, 'htUIInputIcon');
67
+ this._element.appendChild(icon);
65
68
  this.update();
66
69
  }
67
70
 
@@ -14,8 +14,6 @@ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
14
14
  var _hideColumn = _interopRequireDefault(require("./contextMenuItem/hideColumn"));
15
15
  var _showColumn = _interopRequireDefault(require("./contextMenuItem/showColumn"));
16
16
  var _translations = require("../../translations");
17
- var _a11y = require("../../helpers/a11y");
18
- var _constants = require("../../i18n/constants");
19
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
18
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
21
19
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
@@ -32,8 +30,6 @@ _pluginHooks.default.getSingleton().register('beforeUnhideColumns');
32
30
  _pluginHooks.default.getSingleton().register('afterUnhideColumns');
33
31
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'hiddenColumns';
34
32
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 310;
35
- const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenColumnIndicator';
36
- const AFTER_INDICATOR_CLASSNAME = 'afterHiddenColumnIndicator';
37
33
 
38
34
  /* eslint-disable jsdoc/require-description-complete-sentence */
39
35
 
@@ -143,7 +139,6 @@ const AFTER_INDICATOR_CLASSNAME = 'afterHiddenColumnIndicator';
143
139
  */
144
140
  var _settings = /*#__PURE__*/new WeakMap();
145
141
  var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
146
- var _clearIndicatorElements = /*#__PURE__*/new WeakSet();
147
142
  var _onModifyColWidth = /*#__PURE__*/new WeakSet();
148
143
  var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
149
144
  var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
@@ -193,12 +188,6 @@ class HiddenColumns extends _base.BasePlugin {
193
188
  * @returns {number}
194
189
  */
195
190
  _classPrivateMethodInitSpec(this, _onModifyColWidth);
196
- /**
197
- * Remove the indicator elements from the provided column header element.
198
- *
199
- * @param {HTMLElement} TH Column header element.
200
- */
201
- _classPrivateMethodInitSpec(this, _clearIndicatorElements);
202
191
  /**
203
192
  * Cached plugin settings.
204
193
  *
@@ -288,15 +277,8 @@ class HiddenColumns extends _base.BasePlugin {
288
277
  * Disables the plugin functionality for this Handsontable instance.
289
278
  */
290
279
  disablePlugin() {
291
- const clearColHeader = (columnIndex, TH) => {
292
- _classPrivateMethodGet(this, _clearIndicatorElements, _clearIndicatorElements2).call(this, TH);
293
- };
294
280
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
295
281
  _classPrivateFieldSet(this, _settings, {});
296
- this.hot.addHook('afterGetColHeader', clearColHeader);
297
- this.hot.addHookOnce('afterViewRender', () => {
298
- this.hot.removeHook('afterGetColHeader', clearColHeader);
299
- });
300
282
  super.disablePlugin();
301
283
  this.resetCellsMeta();
302
284
  }
@@ -448,11 +430,6 @@ class HiddenColumns extends _base.BasePlugin {
448
430
  }
449
431
  }
450
432
  exports.HiddenColumns = HiddenColumns;
451
- function _clearIndicatorElements2(TH) {
452
- Array.from(TH.querySelectorAll(`.${AFTER_INDICATOR_CLASSNAME}, .${BEFORE_INDICATOR_CLASSNAME}`)).forEach(element => {
453
- element.remove();
454
- });
455
- }
456
433
  function _onModifyColWidth2(width, column) {
457
434
  // Hook is triggered internally only for the visible columns. Conditional will be handled for the API
458
435
  // calls of the `getColWidth` function on not visible indexes.
@@ -524,35 +501,14 @@ function _onModifyCopyableRange2(ranges) {
524
501
  return newRanges;
525
502
  }
526
503
  function _onAfterGetColHeader2(column, TH) {
527
- const areAriaTagsEnabled = this.hot.getSettings().ariaTags;
528
- const beforeHiddenColumnIndicatorElement = TH.querySelector('.beforeHiddenColumnIndicator');
529
- const afterHiddenColumnIndicatorElement = TH.querySelector('.afterHiddenColumnIndicator');
530
504
  if (!_classPrivateFieldGet(this, _settings).indicators || column < 0) {
531
- beforeHiddenColumnIndicatorElement === null || beforeHiddenColumnIndicatorElement === void 0 || beforeHiddenColumnIndicatorElement.remove();
532
- afterHiddenColumnIndicatorElement === null || afterHiddenColumnIndicatorElement === void 0 || afterHiddenColumnIndicatorElement.remove();
533
505
  return;
534
506
  }
535
507
  const classList = [];
536
508
  if (column >= 1 && this.isHidden(column - 1)) {
537
- if (!afterHiddenColumnIndicatorElement) {
538
- const attributesToAdd = areAriaTagsEnabled ? [(0, _a11y.A11Y_LABEL)(this.hot.getTranslatedPhrase(_constants.COLUMN_HEADER_LABEL_AFTER_HIDDEN_COLUMN))] : [];
539
- (0, _element.appendElement)(TH, {
540
- tagName: 'div',
541
- attributes: attributesToAdd,
542
- className: AFTER_INDICATOR_CLASSNAME
543
- });
544
- }
545
509
  classList.push('afterHiddenColumn');
546
510
  }
547
511
  if (column < this.hot.countCols() - 1 && this.isHidden(column + 1)) {
548
- if (!beforeHiddenColumnIndicatorElement) {
549
- const attributesToAdd = areAriaTagsEnabled ? [(0, _a11y.A11Y_LABEL)(this.hot.getTranslatedPhrase(_constants.COLUMN_HEADER_LABEL_BEFORE_HIDDEN_COLUMN))] : [];
550
- (0, _element.appendElement)(TH, {
551
- tagName: 'div',
552
- attributes: attributesToAdd,
553
- className: BEFORE_INDICATOR_CLASSNAME
554
- });
555
- }
556
512
  classList.push('beforeHiddenColumn');
557
513
  }
558
514
  (0, _element.addClass)(TH, classList);
@@ -10,7 +10,7 @@ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _
10
10
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11
11
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
12
12
  import { BasePlugin } from "../base/index.mjs";
13
- import { addClass, appendElement } from "../../helpers/dom/element.mjs";
13
+ import { addClass } from "../../helpers/dom/element.mjs";
14
14
  import { rangeEach } from "../../helpers/number.mjs";
15
15
  import { arrayEach, arrayMap, arrayReduce } from "../../helpers/array.mjs";
16
16
  import { isObject } from "../../helpers/object.mjs";
@@ -20,16 +20,12 @@ import Hooks from "../../pluginHooks.mjs";
20
20
  import hideColumnItem from "./contextMenuItem/hideColumn.mjs";
21
21
  import showColumnItem from "./contextMenuItem/showColumn.mjs";
22
22
  import { HidingMap } from "../../translations/index.mjs";
23
- import { A11Y_LABEL } from "../../helpers/a11y.mjs";
24
- import { COLUMN_HEADER_LABEL_AFTER_HIDDEN_COLUMN, COLUMN_HEADER_LABEL_BEFORE_HIDDEN_COLUMN } from "../../i18n/constants.mjs";
25
23
  Hooks.getSingleton().register('beforeHideColumns');
26
24
  Hooks.getSingleton().register('afterHideColumns');
27
25
  Hooks.getSingleton().register('beforeUnhideColumns');
28
26
  Hooks.getSingleton().register('afterUnhideColumns');
29
27
  export const PLUGIN_KEY = 'hiddenColumns';
30
28
  export const PLUGIN_PRIORITY = 310;
31
- const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenColumnIndicator';
32
- const AFTER_INDICATOR_CLASSNAME = 'afterHiddenColumnIndicator';
33
29
 
34
30
  /* eslint-disable jsdoc/require-description-complete-sentence */
35
31
 
@@ -139,7 +135,6 @@ const AFTER_INDICATOR_CLASSNAME = 'afterHiddenColumnIndicator';
139
135
  */
140
136
  var _settings = /*#__PURE__*/new WeakMap();
141
137
  var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
142
- var _clearIndicatorElements = /*#__PURE__*/new WeakSet();
143
138
  var _onModifyColWidth = /*#__PURE__*/new WeakSet();
144
139
  var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
145
140
  var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
@@ -189,12 +184,6 @@ export class HiddenColumns extends BasePlugin {
189
184
  * @returns {number}
190
185
  */
191
186
  _classPrivateMethodInitSpec(this, _onModifyColWidth);
192
- /**
193
- * Remove the indicator elements from the provided column header element.
194
- *
195
- * @param {HTMLElement} TH Column header element.
196
- */
197
- _classPrivateMethodInitSpec(this, _clearIndicatorElements);
198
187
  /**
199
188
  * Cached plugin settings.
200
189
  *
@@ -284,15 +273,8 @@ export class HiddenColumns extends BasePlugin {
284
273
  * Disables the plugin functionality for this Handsontable instance.
285
274
  */
286
275
  disablePlugin() {
287
- const clearColHeader = (columnIndex, TH) => {
288
- _classPrivateMethodGet(this, _clearIndicatorElements, _clearIndicatorElements2).call(this, TH);
289
- };
290
276
  this.hot.columnIndexMapper.unregisterMap(this.pluginName);
291
277
  _classPrivateFieldSet(this, _settings, {});
292
- this.hot.addHook('afterGetColHeader', clearColHeader);
293
- this.hot.addHookOnce('afterViewRender', () => {
294
- this.hot.removeHook('afterGetColHeader', clearColHeader);
295
- });
296
278
  super.disablePlugin();
297
279
  this.resetCellsMeta();
298
280
  }
@@ -443,11 +425,6 @@ export class HiddenColumns extends BasePlugin {
443
425
  super.destroy();
444
426
  }
445
427
  }
446
- function _clearIndicatorElements2(TH) {
447
- Array.from(TH.querySelectorAll(`.${AFTER_INDICATOR_CLASSNAME}, .${BEFORE_INDICATOR_CLASSNAME}`)).forEach(element => {
448
- element.remove();
449
- });
450
- }
451
428
  function _onModifyColWidth2(width, column) {
452
429
  // Hook is triggered internally only for the visible columns. Conditional will be handled for the API
453
430
  // calls of the `getColWidth` function on not visible indexes.
@@ -519,35 +496,14 @@ function _onModifyCopyableRange2(ranges) {
519
496
  return newRanges;
520
497
  }
521
498
  function _onAfterGetColHeader2(column, TH) {
522
- const areAriaTagsEnabled = this.hot.getSettings().ariaTags;
523
- const beforeHiddenColumnIndicatorElement = TH.querySelector('.beforeHiddenColumnIndicator');
524
- const afterHiddenColumnIndicatorElement = TH.querySelector('.afterHiddenColumnIndicator');
525
499
  if (!_classPrivateFieldGet(this, _settings).indicators || column < 0) {
526
- beforeHiddenColumnIndicatorElement === null || beforeHiddenColumnIndicatorElement === void 0 || beforeHiddenColumnIndicatorElement.remove();
527
- afterHiddenColumnIndicatorElement === null || afterHiddenColumnIndicatorElement === void 0 || afterHiddenColumnIndicatorElement.remove();
528
500
  return;
529
501
  }
530
502
  const classList = [];
531
503
  if (column >= 1 && this.isHidden(column - 1)) {
532
- if (!afterHiddenColumnIndicatorElement) {
533
- const attributesToAdd = areAriaTagsEnabled ? [A11Y_LABEL(this.hot.getTranslatedPhrase(COLUMN_HEADER_LABEL_AFTER_HIDDEN_COLUMN))] : [];
534
- appendElement(TH, {
535
- tagName: 'div',
536
- attributes: attributesToAdd,
537
- className: AFTER_INDICATOR_CLASSNAME
538
- });
539
- }
540
504
  classList.push('afterHiddenColumn');
541
505
  }
542
506
  if (column < this.hot.countCols() - 1 && this.isHidden(column + 1)) {
543
- if (!beforeHiddenColumnIndicatorElement) {
544
- const attributesToAdd = areAriaTagsEnabled ? [A11Y_LABEL(this.hot.getTranslatedPhrase(COLUMN_HEADER_LABEL_BEFORE_HIDDEN_COLUMN))] : [];
545
- appendElement(TH, {
546
- tagName: 'div',
547
- attributes: attributesToAdd,
548
- className: BEFORE_INDICATOR_CLASSNAME
549
- });
550
- }
551
507
  classList.push('beforeHiddenColumn');
552
508
  }
553
509
  addClass(TH, classList);
@@ -14,8 +14,6 @@ var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
14
14
  var _hideRow = _interopRequireDefault(require("./contextMenuItem/hideRow"));
15
15
  var _showRow = _interopRequireDefault(require("./contextMenuItem/showRow"));
16
16
  var _translations = require("../../translations");
17
- var _a11y = require("../../helpers/a11y");
18
- var _constants = require("../../i18n/constants");
19
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
18
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
21
19
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
@@ -32,8 +30,6 @@ _pluginHooks.default.getSingleton().register('beforeUnhideRows');
32
30
  _pluginHooks.default.getSingleton().register('afterUnhideRows');
33
31
  const PLUGIN_KEY = exports.PLUGIN_KEY = 'hiddenRows';
34
32
  const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
35
- const AFTER_INDICATOR_CLASSNAME = 'afterHiddenRowIndicator';
36
- const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenRowIndicator';
37
33
 
38
34
  /* eslint-disable jsdoc/require-description-complete-sentence */
39
35
 
@@ -143,7 +139,6 @@ const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenRowIndicator';
143
139
  */
144
140
  var _settings = /*#__PURE__*/new WeakMap();
145
141
  var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
146
- var _clearIndicatorElements = /*#__PURE__*/new WeakSet();
147
142
  var _onModifyRowHeight = /*#__PURE__*/new WeakSet();
148
143
  var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
149
144
  var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
@@ -193,12 +188,6 @@ class HiddenRows extends _base.BasePlugin {
193
188
  * @returns {number}
194
189
  */
195
190
  _classPrivateMethodInitSpec(this, _onModifyRowHeight);
196
- /**
197
- * Remove the indicator elements from the provided row header element.
198
- *
199
- * @param {HTMLElement} TH Column header element.
200
- */
201
- _classPrivateMethodInitSpec(this, _clearIndicatorElements);
202
191
  /**
203
192
  * Cached settings from Handsontable settings.
204
193
  *
@@ -288,15 +277,8 @@ class HiddenRows extends _base.BasePlugin {
288
277
  * Disables the plugin functionality for this Handsontable instance.
289
278
  */
290
279
  disablePlugin() {
291
- const clearRowHeader = (columnIndex, TH) => {
292
- _classPrivateMethodGet(this, _clearIndicatorElements, _clearIndicatorElements2).call(this, TH);
293
- };
294
280
  this.hot.rowIndexMapper.unregisterMap(this.pluginName);
295
281
  _classPrivateFieldSet(this, _settings, {});
296
- this.hot.addHook('afterGetRowHeader', clearRowHeader);
297
- this.hot.addHookOnce('afterViewRender', () => {
298
- this.hot.removeHook('afterGetRowHeader', clearRowHeader);
299
- });
300
282
  super.disablePlugin();
301
283
  this.resetCellsMeta();
302
284
  }
@@ -445,11 +427,6 @@ class HiddenRows extends _base.BasePlugin {
445
427
  }
446
428
  }
447
429
  exports.HiddenRows = HiddenRows;
448
- function _clearIndicatorElements2(TH) {
449
- Array.from(TH.querySelectorAll(`.${AFTER_INDICATOR_CLASSNAME}, .${BEFORE_INDICATOR_CLASSNAME}`)).forEach(element => {
450
- element.remove();
451
- });
452
- }
453
430
  function _onModifyRowHeight2(height, row) {
454
431
  // Hook is triggered internally only for the visible rows. Conditional will be handled for the API
455
432
  // calls of the `getRowHeight` function on not visible indexes.
@@ -516,35 +493,14 @@ function _onModifyCopyableRange2(ranges) {
516
493
  return newRanges;
517
494
  }
518
495
  function _onAfterGetRowHeader2(row, TH) {
519
- const areAriaTagsEnabled = this.hot.getSettings().ariaTags;
520
- const beforeHiddenRowIndicatorElement = TH.querySelector('.beforeHiddenRowIndicator');
521
- const afterHiddenRowIndicatorElement = TH.querySelector('.afterHiddenRowIndicator');
522
496
  if (!_classPrivateFieldGet(this, _settings).indicators || row < 0) {
523
- beforeHiddenRowIndicatorElement === null || beforeHiddenRowIndicatorElement === void 0 || beforeHiddenRowIndicatorElement.remove();
524
- afterHiddenRowIndicatorElement === null || afterHiddenRowIndicatorElement === void 0 || afterHiddenRowIndicatorElement.remove();
525
497
  return;
526
498
  }
527
499
  const classList = [];
528
500
  if (row >= 1 && this.isHidden(row - 1)) {
529
- if (!afterHiddenRowIndicatorElement) {
530
- const attributesToAdd = areAriaTagsEnabled ? [(0, _a11y.A11Y_LABEL)(this.hot.getTranslatedPhrase(_constants.ROW_HEADER_LABEL_AFTER_HIDDEN_ROW))] : [];
531
- (0, _element.appendElement)(TH, {
532
- tagName: 'div',
533
- attributes: attributesToAdd,
534
- className: AFTER_INDICATOR_CLASSNAME
535
- });
536
- }
537
501
  classList.push('afterHiddenRow');
538
502
  }
539
503
  if (row < this.hot.countRows() - 1 && this.isHidden(row + 1)) {
540
- if (!beforeHiddenRowIndicatorElement) {
541
- const attributesToAdd = areAriaTagsEnabled ? [(0, _a11y.A11Y_LABEL)(this.hot.getTranslatedPhrase(_constants.ROW_HEADER_LABEL_BEFORE_HIDDEN_ROW))] : [];
542
- (0, _element.appendElement)(TH, {
543
- tagName: 'div',
544
- attributes: attributesToAdd,
545
- className: BEFORE_INDICATOR_CLASSNAME
546
- });
547
- }
548
504
  classList.push('beforeHiddenRow');
549
505
  }
550
506
  (0, _element.addClass)(TH, classList);