handsontable 14.0.0-next-dd92f79-20231124 → 14.0.0-next-88de277-20231127
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/3rdparty/walkontable/src/overlay/_base.js +2 -2
- package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +1 -1
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +2 -2
- package/3rdparty/walkontable/src/renderer/rows.js +1 -1
- package/3rdparty/walkontable/src/renderer/rows.mjs +2 -2
- package/3rdparty/walkontable/src/selection/manager.js +20 -6
- package/3rdparty/walkontable/src/selection/manager.mjs +20 -6
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +1 -1
- package/core.mjs +1 -1
- package/dataMap/replaceData.js +3 -1
- package/dataMap/replaceData.mjs +3 -1
- package/dist/handsontable.css +62 -44
- package/dist/handsontable.full.css +62 -44
- package/dist/handsontable.full.js +123 -302
- package/dist/handsontable.full.min.css +5 -5
- package/dist/handsontable.full.min.js +64 -64
- package/dist/handsontable.js +123 -302
- package/dist/handsontable.min.css +5 -5
- package/dist/handsontable.min.js +19 -19
- package/dist/languages/all.js +2 -24
- package/dist/languages/all.min.js +1 -1
- package/dist/languages/en-US.js +1 -12
- package/dist/languages/en-US.min.js +1 -1
- package/dist/languages/pl-PL.js +1 -12
- package/dist/languages/pl-PL.min.js +1 -1
- package/editors/dateEditor/dateEditor.js +0 -7
- package/editors/dateEditor/dateEditor.mjs +1 -8
- package/editors/handsontableEditor/handsontableEditor.js +0 -7
- package/editors/handsontableEditor/handsontableEditor.mjs +1 -8
- package/editors/passwordEditor/passwordEditor.js +4 -0
- package/editors/passwordEditor/passwordEditor.mjs +5 -1
- package/helpers/a11y.js +2 -2
- package/helpers/a11y.mjs +1 -1
- package/helpers/dom/element.js +0 -29
- package/helpers/dom/element.mjs +0 -28
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/i18n/constants.js +1 -14
- package/i18n/constants.mjs +1 -14
- package/i18n/languages/en-US.js +1 -12
- package/i18n/languages/en-US.mjs +1 -12
- package/i18n/languages/pl-PL.js +1 -12
- package/i18n/languages/pl-PL.mjs +1 -12
- package/languages/all.js +2 -24
- package/languages/en-US.js +1 -12
- package/languages/en-US.mjs +1 -12
- package/languages/index.js +2 -24
- package/languages/pl-PL.js +1 -12
- package/languages/pl-PL.mjs +1 -12
- package/package.json +1 -1
- package/plugins/collapsibleColumns/collapsibleColumns.js +2 -3
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +3 -4
- package/plugins/columnSorting/columnSorting.js +4 -30
- package/plugins/columnSorting/columnSorting.mjs +6 -32
- package/plugins/contextMenu/menu/menuItemRenderer.js +0 -12
- package/plugins/contextMenu/menu/menuItemRenderer.mjs +2 -14
- package/plugins/dropdownMenu/dropdownMenu.js +1 -2
- package/plugins/dropdownMenu/dropdownMenu.mjs +2 -3
- package/plugins/filters/ui/input.js +3 -0
- package/plugins/filters/ui/input.mjs +3 -0
- package/plugins/hiddenColumns/hiddenColumns.js +0 -44
- package/plugins/hiddenColumns/hiddenColumns.mjs +1 -45
- package/plugins/hiddenRows/hiddenRows.js +0 -44
- package/plugins/hiddenRows/hiddenRows.mjs +1 -45
- package/plugins/multiColumnSorting/multiColumnSorting.js +0 -21
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +1 -22
- package/plugins/nestedRows/nestedRows.js +1 -2
- package/plugins/nestedRows/nestedRows.mjs +1 -2
- package/plugins/nestedRows/ui/headers.js +3 -3
- package/plugins/nestedRows/ui/headers.mjs +4 -4
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -3
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +1 -4
- package/renderers/checkboxRenderer/checkboxRenderer.js +0 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -1
- package/renderers/dateRenderer/dateRenderer.js +0 -5
- package/renderers/dateRenderer/dateRenderer.mjs +0 -5
- package/renderers/handsontableRenderer/handsontableRenderer.js +0 -5
- package/renderers/handsontableRenderer/handsontableRenderer.mjs +0 -5
- package/renderers/selectRenderer/selectRenderer.js +0 -5
- package/renderers/selectRenderer/selectRenderer.mjs +0 -5
- package/selection/highlight/types/focus.js +2 -0
- package/selection/highlight/types/focus.mjs +2 -0
- package/selection/selection.js +0 -1
- package/selection/selection.mjs +0 -1
- package/tableView.js +35 -2
- package/tableView.mjs +35 -2
package/tableView.mjs
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
2
|
import "core-js/modules/es.error.cause.js";
|
3
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
3
4
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
4
5
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
5
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
7
8
|
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); }
|
9
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
8
10
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
9
11
|
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
10
12
|
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
@@ -28,11 +30,25 @@ var _mouseDown = /*#__PURE__*/new WeakMap();
|
|
28
30
|
var _table = /*#__PURE__*/new WeakMap();
|
29
31
|
var _lastWidth = /*#__PURE__*/new WeakMap();
|
30
32
|
var _lastHeight = /*#__PURE__*/new WeakMap();
|
33
|
+
var _getAriaColcount = /*#__PURE__*/new WeakSet();
|
34
|
+
var _updateAriaColcount = /*#__PURE__*/new WeakSet();
|
31
35
|
class TableView {
|
32
36
|
/**
|
33
37
|
* @param {Hanstontable} hotInstance Instance of {@link Handsontable}.
|
34
38
|
*/
|
35
39
|
constructor(hotInstance) {
|
40
|
+
/**
|
41
|
+
* Update the `aria-colcount` attribute by the provided value.
|
42
|
+
*
|
43
|
+
* @param {number} delta The number of columns to add or remove to the aria tag.
|
44
|
+
*/
|
45
|
+
_classPrivateMethodInitSpec(this, _updateAriaColcount);
|
46
|
+
/**
|
47
|
+
* Return the value of the `aria-colcount` attribute.
|
48
|
+
*
|
49
|
+
* @returns {number} The value of the `aria-colcount` attribute.
|
50
|
+
*/
|
51
|
+
_classPrivateMethodInitSpec(this, _getAriaColcount);
|
36
52
|
/**
|
37
53
|
* Instance of {@link Handsontable}.
|
38
54
|
*
|
@@ -269,7 +285,7 @@ class TableView {
|
|
269
285
|
}
|
270
286
|
if (this.settings.ariaTags) {
|
271
287
|
setAttribute(_classPrivateFieldGet(this, _table), [A11Y_PRESENTATION()]);
|
272
|
-
setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(
|
288
|
+
setAttribute(rootElement, [A11Y_TREEGRID(), A11Y_ROWCOUNT(-1), A11Y_COLCOUNT(this.hot.countCols()), A11Y_MULTISELECTABLE()]);
|
273
289
|
}
|
274
290
|
this.THEAD = rootDocument.createElement('THEAD');
|
275
291
|
_classPrivateFieldGet(this, _table).appendChild(this.THEAD);
|
@@ -662,6 +678,13 @@ class TableView {
|
|
662
678
|
}
|
663
679
|
this.hot.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
664
680
|
_classPrivateFieldSet(this, _rowHeadersCount, headerRenderers.length);
|
681
|
+
if (this.hot.getSettings().ariaTags) {
|
682
|
+
// Update the aria-colcount attribute.
|
683
|
+
// Only needs to be done once after initialization/data update.
|
684
|
+
if (_classPrivateMethodGet(this, _getAriaColcount, _getAriaColcount2).call(this) === this.hot.countCols()) {
|
685
|
+
_classPrivateMethodGet(this, _updateAriaColcount, _updateAriaColcount2).call(this, _classPrivateFieldGet(this, _rowHeadersCount));
|
686
|
+
}
|
687
|
+
}
|
665
688
|
return headerRenderers;
|
666
689
|
},
|
667
690
|
columnHeaders: () => {
|
@@ -1154,6 +1177,10 @@ class TableView {
|
|
1154
1177
|
const span = rootDocument.createElement('span');
|
1155
1178
|
div.className = 'relative';
|
1156
1179
|
span.className = 'colHeader';
|
1180
|
+
if (this.settings.ariaTags) {
|
1181
|
+
setAttribute(div, ...A11Y_PRESENTATION());
|
1182
|
+
setAttribute(span, ...A11Y_PRESENTATION());
|
1183
|
+
}
|
1157
1184
|
this.updateCellHeader(span, visualColumnIndex, label, headerLevel);
|
1158
1185
|
div.appendChild(span);
|
1159
1186
|
TH.appendChild(div);
|
@@ -1297,7 +1324,6 @@ class TableView {
|
|
1297
1324
|
getRowHeadersCount() {
|
1298
1325
|
return _classPrivateFieldGet(this, _rowHeadersCount);
|
1299
1326
|
}
|
1300
|
-
|
1301
1327
|
/**
|
1302
1328
|
* Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.
|
1303
1329
|
*
|
@@ -1308,4 +1334,11 @@ class TableView {
|
|
1308
1334
|
this.eventManager.destroy();
|
1309
1335
|
}
|
1310
1336
|
}
|
1337
|
+
function _getAriaColcount2() {
|
1338
|
+
return parseInt(this.hot.rootElement.getAttribute(A11Y_COLCOUNT()[0]), 10);
|
1339
|
+
}
|
1340
|
+
function _updateAriaColcount2(delta) {
|
1341
|
+
const colCount = _classPrivateMethodGet(this, _getAriaColcount, _getAriaColcount2).call(this) + delta;
|
1342
|
+
setAttribute(this.hot.rootElement, ...A11Y_COLCOUNT(colCount));
|
1343
|
+
}
|
1311
1344
|
export default TableView;
|