handsontable 0.0.0-next-c81ae8e-20231123 → 0.0.0-next-a77544c-20231123

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.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (65) hide show
  1. package/3rdparty/walkontable/src/selection/manager.js +20 -6
  2. package/3rdparty/walkontable/src/selection/manager.mjs +20 -6
  3. package/base.js +2 -2
  4. package/base.mjs +2 -2
  5. package/core.js +1 -1
  6. package/core.mjs +1 -1
  7. package/dist/handsontable.css +62 -44
  8. package/dist/handsontable.full.css +62 -44
  9. package/dist/handsontable.full.js +82 -281
  10. package/dist/handsontable.full.min.css +5 -5
  11. package/dist/handsontable.full.min.js +101 -101
  12. package/dist/handsontable.js +82 -281
  13. package/dist/handsontable.min.css +5 -5
  14. package/dist/handsontable.min.js +32 -32
  15. package/dist/languages/all.js +2 -24
  16. package/dist/languages/all.min.js +1 -1
  17. package/dist/languages/en-US.js +1 -12
  18. package/dist/languages/en-US.min.js +1 -1
  19. package/dist/languages/pl-PL.js +1 -12
  20. package/dist/languages/pl-PL.min.js +1 -1
  21. package/helpers/a11y.js +0 -2
  22. package/helpers/a11y.mjs +0 -1
  23. package/helpers/dom/element.js +0 -29
  24. package/helpers/dom/element.mjs +0 -28
  25. package/helpers/mixed.js +1 -1
  26. package/helpers/mixed.mjs +1 -1
  27. package/i18n/constants.js +1 -27
  28. package/i18n/constants.mjs +1 -14
  29. package/i18n/languages/en-US.js +1 -12
  30. package/i18n/languages/en-US.mjs +1 -12
  31. package/i18n/languages/pl-PL.js +1 -12
  32. package/i18n/languages/pl-PL.mjs +1 -12
  33. package/languages/all.js +2 -24
  34. package/languages/en-US.js +1 -12
  35. package/languages/en-US.mjs +1 -12
  36. package/languages/index.js +2 -24
  37. package/languages/pl-PL.js +1 -12
  38. package/languages/pl-PL.mjs +1 -12
  39. package/package.json +1 -1
  40. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -3
  41. package/plugins/collapsibleColumns/collapsibleColumns.mjs +3 -4
  42. package/plugins/columnSorting/columnSorting.js +4 -30
  43. package/plugins/columnSorting/columnSorting.mjs +6 -32
  44. package/plugins/contextMenu/menu/menuItemRenderer.js +0 -12
  45. package/plugins/contextMenu/menu/menuItemRenderer.mjs +2 -14
  46. package/plugins/dropdownMenu/dropdownMenu.js +1 -2
  47. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -3
  48. package/plugins/filters/ui/input.js +3 -0
  49. package/plugins/filters/ui/input.mjs +3 -0
  50. package/plugins/filters/ui/select.js +0 -6
  51. package/plugins/filters/ui/select.mjs +0 -6
  52. package/plugins/hiddenColumns/hiddenColumns.js +1 -45
  53. package/plugins/hiddenColumns/hiddenColumns.mjs +1 -45
  54. package/plugins/hiddenRows/hiddenRows.js +1 -45
  55. package/plugins/hiddenRows/hiddenRows.mjs +1 -45
  56. package/plugins/multiColumnSorting/multiColumnSorting.js +0 -21
  57. package/plugins/multiColumnSorting/multiColumnSorting.mjs +1 -22
  58. package/plugins/nestedRows/nestedRows.js +1 -2
  59. package/plugins/nestedRows/nestedRows.mjs +1 -2
  60. package/plugins/nestedRows/ui/headers.js +3 -3
  61. package/plugins/nestedRows/ui/headers.mjs +4 -4
  62. package/selection/highlight/types/focus.js +6 -0
  63. package/selection/highlight/types/focus.mjs +6 -0
  64. package/tableView.js +2 -0
  65. package/tableView.mjs +2 -0
@@ -5,12 +5,10 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
5
5
  import { APPEND_COLUMN_CONFIG_STRATEGY, ColumnSorting } from "../columnSorting/index.mjs";
6
6
  import { registerRootComparator } from "../columnSorting/sortService/index.mjs";
7
7
  import { wasHeaderClickedProperly } from "../columnSorting/utils.mjs";
8
- import { addClass, removeClass, setAttribute, removeAttribute } from "../../helpers/dom/element.mjs";
8
+ import { addClass, removeClass } from "../../helpers/dom/element.mjs";
9
9
  import { rootComparator } from "./rootComparator.mjs";
10
10
  import { warnAboutPluginsConflict } from "./utils.mjs";
11
11
  import { getClassesToAdd, getClassesToRemove } from "./domHelpers.mjs";
12
- import { A11Y_HIDDEN, A11Y_LABEL } from "../../helpers/a11y.mjs";
13
- import { COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER } from "../../i18n/constants.mjs";
14
12
  export const PLUGIN_KEY = 'multiColumnSorting';
15
13
  export const PLUGIN_PRIORITY = 170;
16
14
  const CONFLICTED_PLUGIN_KEY = 'columnSorting';
@@ -269,25 +267,6 @@ export class MultiColumnSorting extends ColumnSorting {
269
267
  }
270
268
  }
271
269
 
272
- /**
273
- * Update sorting indicator.
274
- *
275
- * @private
276
- * @param {number} column Visual column index.
277
- * @param {HTMLElement} headerSpanElement Header span element.
278
- */
279
- updateSortingIndicator(column, headerSpanElement) {
280
- super.updateSortingIndicator(column, headerSpanElement);
281
- const indicatorElement = headerSpanElement.querySelector('.columnSortingIndicator');
282
- if (!indicatorElement || !this.hot.getSettings().ariaTags || !this.columnStatesManager.isColumnSorted(column) || this.columnStatesManager.getNumberOfSortedColumns() <= 1) {
283
- return;
284
- }
285
- const multiColumnSortingOrder = this.columnStatesManager.getIndexOfColumnInSortQueue(column) + 1;
286
- const a11yLabelAttribute = A11Y_LABEL(`${this.hot.getTranslatedPhrase(COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER)} ${multiColumnSortingOrder}.`);
287
- removeAttribute(indicatorElement, A11Y_HIDDEN()[0]);
288
- setAttribute(indicatorElement, ...a11yLabelAttribute);
289
- }
290
-
291
270
  /**
292
271
  * Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called
293
272
  * for `updateSettings` in specific situations.
@@ -367,8 +367,7 @@ class NestedRows extends _base.BasePlugin {
367
367
  /**
368
368
  * Updates the plugin's state.
369
369
  *
370
- * This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
371
- * following configuration options:
370
+ * This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the following configuration options:
372
371
  * - [`nestedRows`](@/api/options.md#nestedrows)
373
372
  */
374
373
  updatePlugin() {
@@ -361,8 +361,7 @@ export class NestedRows extends BasePlugin {
361
361
  /**
362
362
  * Updates the plugin's state.
363
363
  *
364
- * This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
365
- * following configuration options:
364
+ * This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the following configuration options:
366
365
  * - [`nestedRows`](@/api/options.md#nestedrows)
367
366
  */
368
367
  updatePlugin() {
@@ -6,7 +6,6 @@ var _number = require("../../../helpers/number");
6
6
  var _element = require("../../../helpers/dom/element");
7
7
  var _base = _interopRequireDefault(require("./_base"));
8
8
  var _a11y = require("../../../helpers/a11y");
9
- var _constants = require("../../../i18n/constants");
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
10
  /**
12
11
  * Class responsible for the UI in the Nested Rows' row headers.
@@ -25,6 +24,7 @@ class HeadersUI extends _base.default {
25
24
  return {
26
25
  indicatorContainer: 'ht_nestingLevels',
27
26
  parent: 'ht_nestingParent',
27
+ indicator: 'ht_nestingLevel',
28
28
  emptyIndicator: 'ht_nestingLevel_empty',
29
29
  button: 'ht_nestingButton',
30
30
  expandButton: 'ht_nestingExpand',
@@ -102,12 +102,12 @@ class HeadersUI extends _base.default {
102
102
  if (this.collapsingUI.areChildrenCollapsed(rowIndex)) {
103
103
  (0, _element.addClass)(buttonsContainer, `${HeadersUI.CSS_CLASSES.button} ${HeadersUI.CSS_CLASSES.expandButton}`);
104
104
  if (ariaEnabled) {
105
- (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_EXPANDED)(false), (0, _a11y.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(_constants.ROW_HEADER_DESCRIPTION_EXPAND_ROW))]);
105
+ (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_EXPANDED)(false)]);
106
106
  }
107
107
  } else {
108
108
  (0, _element.addClass)(buttonsContainer, `${HeadersUI.CSS_CLASSES.button} ${HeadersUI.CSS_CLASSES.collapseButton}`);
109
109
  if (ariaEnabled) {
110
- (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_EXPANDED)(true), (0, _a11y.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(_constants.ROW_HEADER_DESCRIPTION_COLLAPSE_ROW))]);
110
+ (0, _element.setAttribute)(TH, [(0, _a11y.A11Y_EXPANDED)(true)]);
111
111
  }
112
112
  }
113
113
  innerDiv.appendChild(buttonsContainer);
@@ -2,8 +2,7 @@ import { arrayEach } from "../../../helpers/array.mjs";
2
2
  import { rangeEach } from "../../../helpers/number.mjs";
3
3
  import { addClass, setAttribute } from "../../../helpers/dom/element.mjs";
4
4
  import BaseUI from "./_base.mjs";
5
- import { A11Y_DESCRIPTION, A11Y_EXPANDED, A11Y_HIDDEN } from "../../../helpers/a11y.mjs";
6
- import { ROW_HEADER_DESCRIPTION_COLLAPSE_ROW, ROW_HEADER_DESCRIPTION_EXPAND_ROW } from "../../../i18n/constants.mjs";
5
+ import { A11Y_EXPANDED, A11Y_HIDDEN } from "../../../helpers/a11y.mjs";
7
6
  /**
8
7
  * Class responsible for the UI in the Nested Rows' row headers.
9
8
  *
@@ -21,6 +20,7 @@ class HeadersUI extends BaseUI {
21
20
  return {
22
21
  indicatorContainer: 'ht_nestingLevels',
23
22
  parent: 'ht_nestingParent',
23
+ indicator: 'ht_nestingLevel',
24
24
  emptyIndicator: 'ht_nestingLevel_empty',
25
25
  button: 'ht_nestingButton',
26
26
  expandButton: 'ht_nestingExpand',
@@ -98,12 +98,12 @@ class HeadersUI extends BaseUI {
98
98
  if (this.collapsingUI.areChildrenCollapsed(rowIndex)) {
99
99
  addClass(buttonsContainer, `${HeadersUI.CSS_CLASSES.button} ${HeadersUI.CSS_CLASSES.expandButton}`);
100
100
  if (ariaEnabled) {
101
- setAttribute(TH, [A11Y_EXPANDED(false), A11Y_DESCRIPTION(this.hot.getTranslatedPhrase(ROW_HEADER_DESCRIPTION_EXPAND_ROW))]);
101
+ setAttribute(TH, [A11Y_EXPANDED(false)]);
102
102
  }
103
103
  } else {
104
104
  addClass(buttonsContainer, `${HeadersUI.CSS_CLASSES.button} ${HeadersUI.CSS_CLASSES.collapseButton}`);
105
105
  if (ariaEnabled) {
106
- setAttribute(TH, [A11Y_EXPANDED(true), A11Y_DESCRIPTION(this.hot.getTranslatedPhrase(ROW_HEADER_DESCRIPTION_COLLAPSE_ROW))]);
106
+ setAttribute(TH, [A11Y_EXPANDED(true)]);
107
107
  }
108
108
  }
109
109
  innerDiv.appendChild(buttonsContainer);
@@ -11,15 +11,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
  *
12
12
  * @param {object} highlightParams A configuration object to create a highlight.
13
13
  * @param {Function} highlightParams.cellCornerVisible Function to determine if cell's corner should be visible.
14
+ * @param {Function} highlightParams.cellAttributes Array of cell attributes.
15
+ * @param {Function} highlightParams.headerAttributes Array of header attributes.
14
16
  * @returns {Selection}
15
17
  */
16
18
  function createHighlight(_ref) {
17
19
  let {
18
20
  cellCornerVisible,
21
+ cellAttributes,
22
+ headerAttributes,
19
23
  ...restOptions
20
24
  } = _ref;
21
25
  return new _visualSelection.default({
22
26
  className: 'current',
27
+ cellAttributes,
28
+ focusedHeaderAttributes: headerAttributes,
23
29
  border: {
24
30
  width: 2,
25
31
  color: '#4b89ff',
@@ -6,15 +6,21 @@ import VisualSelection from "../visualSelection.mjs";
6
6
  *
7
7
  * @param {object} highlightParams A configuration object to create a highlight.
8
8
  * @param {Function} highlightParams.cellCornerVisible Function to determine if cell's corner should be visible.
9
+ * @param {Function} highlightParams.cellAttributes Array of cell attributes.
10
+ * @param {Function} highlightParams.headerAttributes Array of header attributes.
9
11
  * @returns {Selection}
10
12
  */
11
13
  export function createHighlight(_ref) {
12
14
  let {
13
15
  cellCornerVisible,
16
+ cellAttributes,
17
+ headerAttributes,
14
18
  ...restOptions
15
19
  } = _ref;
16
20
  return new VisualSelection({
17
21
  className: 'current',
22
+ cellAttributes,
23
+ focusedHeaderAttributes: headerAttributes,
18
24
  border: {
19
25
  width: 2,
20
26
  color: '#4b89ff',
package/tableView.js CHANGED
@@ -1158,6 +1158,8 @@ class TableView {
1158
1158
  const span = rootDocument.createElement('span');
1159
1159
  div.className = 'relative';
1160
1160
  span.className = 'colHeader';
1161
+ (0, _element.setAttribute)(div, ...(0, _a11y.A11Y_PRESENTATION)());
1162
+ (0, _element.setAttribute)(span, ...(0, _a11y.A11Y_PRESENTATION)());
1161
1163
  this.updateCellHeader(span, visualColumnIndex, label, headerLevel);
1162
1164
  div.appendChild(span);
1163
1165
  TH.appendChild(div);
package/tableView.mjs CHANGED
@@ -1154,6 +1154,8 @@ class TableView {
1154
1154
  const span = rootDocument.createElement('span');
1155
1155
  div.className = 'relative';
1156
1156
  span.className = 'colHeader';
1157
+ setAttribute(div, ...A11Y_PRESENTATION());
1158
+ setAttribute(span, ...A11Y_PRESENTATION());
1157
1159
  this.updateCellHeader(span, visualColumnIndex, label, headerLevel);
1158
1160
  div.appendChild(span);
1159
1161
  TH.appendChild(div);