handsontable 14.0.0-next-104f8c6-20231124 → 14.0.0-next-23212d5-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/renderer/columnHeaders.js +1 -1
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +1 -1
- 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/focusCatcher/focusDetector.js +1 -1
- package/core/focusCatcher/focusDetector.mjs +2 -2
- package/core.js +1 -1
- package/core.mjs +1 -1
- package/dist/handsontable.css +62 -44
- package/dist/handsontable.full.css +62 -44
- package/dist/handsontable.full.js +119 -306
- package/dist/handsontable.full.min.css +5 -5
- package/dist/handsontable.full.min.js +64 -64
- package/dist/handsontable.js +119 -306
- 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/helpers/a11y.js +0 -2
- package/helpers/a11y.mjs +0 -1
- package/helpers/dom/element.js +0 -29
- package/helpers/dom/element.mjs +0 -28
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- 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/filters.js +10 -1
- package/plugins/filters/filters.mjs +10 -1
- package/plugins/filters/menu/focusController.js +29 -10
- package/plugins/filters/menu/focusController.mjs +29 -10
- 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/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 +4 -0
- package/tableView.mjs +4 -0
@@ -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
|
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);
|
@@ -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
|
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 hideRowItem from "./contextMenuItem/hideRow.mjs";
|
21
21
|
import showRowItem from "./contextMenuItem/showRow.mjs";
|
22
22
|
import { HidingMap } from "../../translations/index.mjs";
|
23
|
-
import { A11Y_LABEL } from "../../helpers/a11y.mjs";
|
24
|
-
import { ROW_HEADER_LABEL_AFTER_HIDDEN_ROW, ROW_HEADER_LABEL_BEFORE_HIDDEN_ROW } from "../../i18n/constants.mjs";
|
25
23
|
Hooks.getSingleton().register('beforeHideRows');
|
26
24
|
Hooks.getSingleton().register('afterHideRows');
|
27
25
|
Hooks.getSingleton().register('beforeUnhideRows');
|
28
26
|
Hooks.getSingleton().register('afterUnhideRows');
|
29
27
|
export const PLUGIN_KEY = 'hiddenRows';
|
30
28
|
export const PLUGIN_PRIORITY = 320;
|
31
|
-
const AFTER_INDICATOR_CLASSNAME = 'afterHiddenRowIndicator';
|
32
|
-
const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenRowIndicator';
|
33
29
|
|
34
30
|
/* eslint-disable jsdoc/require-description-complete-sentence */
|
35
31
|
|
@@ -139,7 +135,6 @@ const BEFORE_INDICATOR_CLASSNAME = 'beforeHiddenRowIndicator';
|
|
139
135
|
*/
|
140
136
|
var _settings = /*#__PURE__*/new WeakMap();
|
141
137
|
var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
|
142
|
-
var _clearIndicatorElements = /*#__PURE__*/new WeakSet();
|
143
138
|
var _onModifyRowHeight = /*#__PURE__*/new WeakSet();
|
144
139
|
var _onAfterGetCellMeta = /*#__PURE__*/new WeakSet();
|
145
140
|
var _onModifyCopyableRange = /*#__PURE__*/new WeakSet();
|
@@ -189,12 +184,6 @@ export class HiddenRows extends BasePlugin {
|
|
189
184
|
* @returns {number}
|
190
185
|
*/
|
191
186
|
_classPrivateMethodInitSpec(this, _onModifyRowHeight);
|
192
|
-
/**
|
193
|
-
* Remove the indicator elements from the provided row header element.
|
194
|
-
*
|
195
|
-
* @param {HTMLElement} TH Column header element.
|
196
|
-
*/
|
197
|
-
_classPrivateMethodInitSpec(this, _clearIndicatorElements);
|
198
187
|
/**
|
199
188
|
* Cached settings from Handsontable settings.
|
200
189
|
*
|
@@ -284,15 +273,8 @@ export class HiddenRows extends BasePlugin {
|
|
284
273
|
* Disables the plugin functionality for this Handsontable instance.
|
285
274
|
*/
|
286
275
|
disablePlugin() {
|
287
|
-
const clearRowHeader = (columnIndex, TH) => {
|
288
|
-
_classPrivateMethodGet(this, _clearIndicatorElements, _clearIndicatorElements2).call(this, TH);
|
289
|
-
};
|
290
276
|
this.hot.rowIndexMapper.unregisterMap(this.pluginName);
|
291
277
|
_classPrivateFieldSet(this, _settings, {});
|
292
|
-
this.hot.addHook('afterGetRowHeader', clearRowHeader);
|
293
|
-
this.hot.addHookOnce('afterViewRender', () => {
|
294
|
-
this.hot.removeHook('afterGetRowHeader', clearRowHeader);
|
295
|
-
});
|
296
278
|
super.disablePlugin();
|
297
279
|
this.resetCellsMeta();
|
298
280
|
}
|
@@ -440,11 +422,6 @@ export class HiddenRows extends BasePlugin {
|
|
440
422
|
super.destroy();
|
441
423
|
}
|
442
424
|
}
|
443
|
-
function _clearIndicatorElements2(TH) {
|
444
|
-
Array.from(TH.querySelectorAll(`.${AFTER_INDICATOR_CLASSNAME}, .${BEFORE_INDICATOR_CLASSNAME}`)).forEach(element => {
|
445
|
-
element.remove();
|
446
|
-
});
|
447
|
-
}
|
448
425
|
function _onModifyRowHeight2(height, row) {
|
449
426
|
// Hook is triggered internally only for the visible rows. Conditional will be handled for the API
|
450
427
|
// calls of the `getRowHeight` function on not visible indexes.
|
@@ -511,35 +488,14 @@ function _onModifyCopyableRange2(ranges) {
|
|
511
488
|
return newRanges;
|
512
489
|
}
|
513
490
|
function _onAfterGetRowHeader2(row, TH) {
|
514
|
-
const areAriaTagsEnabled = this.hot.getSettings().ariaTags;
|
515
|
-
const beforeHiddenRowIndicatorElement = TH.querySelector('.beforeHiddenRowIndicator');
|
516
|
-
const afterHiddenRowIndicatorElement = TH.querySelector('.afterHiddenRowIndicator');
|
517
491
|
if (!_classPrivateFieldGet(this, _settings).indicators || row < 0) {
|
518
|
-
beforeHiddenRowIndicatorElement === null || beforeHiddenRowIndicatorElement === void 0 || beforeHiddenRowIndicatorElement.remove();
|
519
|
-
afterHiddenRowIndicatorElement === null || afterHiddenRowIndicatorElement === void 0 || afterHiddenRowIndicatorElement.remove();
|
520
492
|
return;
|
521
493
|
}
|
522
494
|
const classList = [];
|
523
495
|
if (row >= 1 && this.isHidden(row - 1)) {
|
524
|
-
if (!afterHiddenRowIndicatorElement) {
|
525
|
-
const attributesToAdd = areAriaTagsEnabled ? [A11Y_LABEL(this.hot.getTranslatedPhrase(ROW_HEADER_LABEL_AFTER_HIDDEN_ROW))] : [];
|
526
|
-
appendElement(TH, {
|
527
|
-
tagName: 'div',
|
528
|
-
attributes: attributesToAdd,
|
529
|
-
className: AFTER_INDICATOR_CLASSNAME
|
530
|
-
});
|
531
|
-
}
|
532
496
|
classList.push('afterHiddenRow');
|
533
497
|
}
|
534
498
|
if (row < this.hot.countRows() - 1 && this.isHidden(row + 1)) {
|
535
|
-
if (!beforeHiddenRowIndicatorElement) {
|
536
|
-
const attributesToAdd = areAriaTagsEnabled ? [A11Y_LABEL(this.hot.getTranslatedPhrase(ROW_HEADER_LABEL_BEFORE_HIDDEN_ROW))] : [];
|
537
|
-
appendElement(TH, {
|
538
|
-
tagName: 'div',
|
539
|
-
attributes: attributesToAdd,
|
540
|
-
className: BEFORE_INDICATOR_CLASSNAME
|
541
|
-
});
|
542
|
-
}
|
543
499
|
classList.push('beforeHiddenRow');
|
544
500
|
}
|
545
501
|
addClass(TH, classList);
|
@@ -9,8 +9,6 @@ var _element = require("../../helpers/dom/element");
|
|
9
9
|
var _rootComparator = require("./rootComparator");
|
10
10
|
var _utils2 = require("./utils");
|
11
11
|
var _domHelpers = require("./domHelpers");
|
12
|
-
var _a11y = require("../../helpers/a11y");
|
13
|
-
var _constants = require("../../i18n/constants");
|
14
12
|
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; }
|
15
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
16
14
|
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); }
|
@@ -272,25 +270,6 @@ class MultiColumnSorting extends _columnSorting.ColumnSorting {
|
|
272
270
|
}
|
273
271
|
}
|
274
272
|
|
275
|
-
/**
|
276
|
-
* Update sorting indicator.
|
277
|
-
*
|
278
|
-
* @private
|
279
|
-
* @param {number} column Visual column index.
|
280
|
-
* @param {HTMLElement} headerSpanElement Header span element.
|
281
|
-
*/
|
282
|
-
updateSortingIndicator(column, headerSpanElement) {
|
283
|
-
super.updateSortingIndicator(column, headerSpanElement);
|
284
|
-
const indicatorElement = headerSpanElement.querySelector('.columnSortingIndicator');
|
285
|
-
if (!indicatorElement || !this.hot.getSettings().ariaTags || !this.columnStatesManager.isColumnSorted(column) || this.columnStatesManager.getNumberOfSortedColumns() <= 1) {
|
286
|
-
return;
|
287
|
-
}
|
288
|
-
const multiColumnSortingOrder = this.columnStatesManager.getIndexOfColumnInSortQueue(column) + 1;
|
289
|
-
const a11yLabelAttribute = (0, _a11y.A11Y_LABEL)(`${this.hot.getTranslatedPhrase(_constants.COLUMN_HEADER_LABEL_MULTI_COLUMN_SORT_ORDER)} ${multiColumnSortingOrder}.`);
|
290
|
-
(0, _element.removeAttribute)(indicatorElement, (0, _a11y.A11Y_HIDDEN)()[0]);
|
291
|
-
(0, _element.setAttribute)(indicatorElement, ...a11yLabelAttribute);
|
292
|
-
}
|
293
|
-
|
294
273
|
/**
|
295
274
|
* Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called
|
296
275
|
* for `updateSettings` in specific situations.
|
@@ -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
|
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.
|
@@ -365,8 +365,7 @@ class NestedRows extends _base.BasePlugin {
|
|
365
365
|
/**
|
366
366
|
* Updates the plugin's state.
|
367
367
|
*
|
368
|
-
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the
|
369
|
-
* following configuration options:
|
368
|
+
* This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the following configuration options:
|
370
369
|
* - [`nestedRows`](@/api/options.md#nestedrows)
|
371
370
|
*/
|
372
371
|
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)
|
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)
|
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 {
|
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)
|
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)
|
106
|
+
setAttribute(TH, [A11Y_EXPANDED(true)]);
|
107
107
|
}
|
108
108
|
}
|
109
109
|
innerDiv.appendChild(buttonsContainer);
|
@@ -44,9 +44,6 @@ function autocompleteRenderer(hotInstance, TD, row, col, prop, value, cellProper
|
|
44
44
|
|
45
45
|
TD.insertBefore(ARROW, TD.firstChild);
|
46
46
|
(0, _element.addClass)(TD, 'htAutocomplete');
|
47
|
-
if (isAriaEnabled) {
|
48
|
-
TD.setAttribute(...(0, _a11y.A11Y_HASPOPUP)('listbox'));
|
49
|
-
}
|
50
47
|
if (!hotInstance.acArrowListener) {
|
51
48
|
const eventManager = new _eventManager.default(hotInstance);
|
52
49
|
|
@@ -2,7 +2,7 @@ import { htmlRenderer } from "../htmlRenderer/index.mjs";
|
|
2
2
|
import { textRenderer } from "../textRenderer/index.mjs";
|
3
3
|
import EventManager from "../../eventManager.mjs";
|
4
4
|
import { addClass, hasClass } from "../../helpers/dom/element.mjs";
|
5
|
-
import {
|
5
|
+
import { A11Y_HIDDEN } from "../../helpers/a11y.mjs";
|
6
6
|
export const RENDERER_TYPE = 'autocomplete';
|
7
7
|
|
8
8
|
/**
|
@@ -39,9 +39,6 @@ export function autocompleteRenderer(hotInstance, TD, row, col, prop, value, cel
|
|
39
39
|
|
40
40
|
TD.insertBefore(ARROW, TD.firstChild);
|
41
41
|
addClass(TD, 'htAutocomplete');
|
42
|
-
if (isAriaEnabled) {
|
43
|
-
TD.setAttribute(...A11Y_HASPOPUP('listbox'));
|
44
|
-
}
|
45
42
|
if (!hotInstance.acArrowListener) {
|
46
43
|
const eventManager = new EventManager(hotInstance);
|
47
44
|
|
@@ -3,8 +3,6 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.dateRenderer = dateRenderer;
|
5
5
|
var _autocompleteRenderer = require("../autocompleteRenderer");
|
6
|
-
var _a11y = require("../../helpers/a11y");
|
7
|
-
var _element = require("../../helpers/dom/element");
|
8
6
|
const RENDERER_TYPE = exports.RENDERER_TYPE = 'date';
|
9
7
|
|
10
8
|
/**
|
@@ -21,8 +19,5 @@ const RENDERER_TYPE = exports.RENDERER_TYPE = 'date';
|
|
21
19
|
*/
|
22
20
|
function dateRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
23
21
|
_autocompleteRenderer.autocompleteRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
24
|
-
if (hotInstance.getSettings().ariaTags) {
|
25
|
-
(0, _element.setAttribute)(TD, [(0, _a11y.A11Y_HASPOPUP)('dialog'), (0, _a11y.A11Y_EXPANDED)('false')]);
|
26
|
-
}
|
27
22
|
}
|
28
23
|
dateRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -1,6 +1,4 @@
|
|
1
1
|
import { autocompleteRenderer } from "../autocompleteRenderer/index.mjs";
|
2
|
-
import { A11Y_EXPANDED, A11Y_HASPOPUP } from "../../helpers/a11y.mjs";
|
3
|
-
import { setAttribute } from "../../helpers/dom/element.mjs";
|
4
2
|
export const RENDERER_TYPE = 'date';
|
5
3
|
|
6
4
|
/**
|
@@ -17,8 +15,5 @@ export const RENDERER_TYPE = 'date';
|
|
17
15
|
*/
|
18
16
|
export function dateRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
19
17
|
autocompleteRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
20
|
-
if (hotInstance.getSettings().ariaTags) {
|
21
|
-
setAttribute(TD, [A11Y_HASPOPUP('dialog'), A11Y_EXPANDED('false')]);
|
22
|
-
}
|
23
18
|
}
|
24
19
|
dateRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -3,8 +3,6 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.handsontableRenderer = handsontableRenderer;
|
5
5
|
var _autocompleteRenderer = require("../autocompleteRenderer");
|
6
|
-
var _a11y = require("../../helpers/a11y");
|
7
|
-
var _element = require("../../helpers/dom/element");
|
8
6
|
const RENDERER_TYPE = exports.RENDERER_TYPE = 'handsontable';
|
9
7
|
|
10
8
|
/**
|
@@ -21,8 +19,5 @@ const RENDERER_TYPE = exports.RENDERER_TYPE = 'handsontable';
|
|
21
19
|
*/
|
22
20
|
function handsontableRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
23
21
|
_autocompleteRenderer.autocompleteRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
24
|
-
if (hotInstance.getSettings().ariaTags) {
|
25
|
-
(0, _element.setAttribute)(TD, [(0, _a11y.A11Y_HASPOPUP)('true'), (0, _a11y.A11Y_EXPANDED)('false')]);
|
26
|
-
}
|
27
22
|
}
|
28
23
|
handsontableRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -1,6 +1,4 @@
|
|
1
1
|
import { autocompleteRenderer } from "../autocompleteRenderer/index.mjs";
|
2
|
-
import { A11Y_EXPANDED, A11Y_HASPOPUP } from "../../helpers/a11y.mjs";
|
3
|
-
import { setAttribute } from "../../helpers/dom/element.mjs";
|
4
2
|
export const RENDERER_TYPE = 'handsontable';
|
5
3
|
|
6
4
|
/**
|
@@ -17,8 +15,5 @@ export const RENDERER_TYPE = 'handsontable';
|
|
17
15
|
*/
|
18
16
|
export function handsontableRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
19
17
|
autocompleteRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
20
|
-
if (hotInstance.getSettings().ariaTags) {
|
21
|
-
setAttribute(TD, [A11Y_HASPOPUP('true'), A11Y_EXPANDED('false')]);
|
22
|
-
}
|
23
18
|
}
|
24
19
|
handsontableRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -3,8 +3,6 @@
|
|
3
3
|
exports.__esModule = true;
|
4
4
|
exports.selectRenderer = selectRenderer;
|
5
5
|
var _textRenderer = require("../textRenderer");
|
6
|
-
var _a11y = require("../../helpers/a11y");
|
7
|
-
var _element = require("../../helpers/dom/element");
|
8
6
|
const RENDERER_TYPE = exports.RENDERER_TYPE = 'select';
|
9
7
|
|
10
8
|
/**
|
@@ -19,8 +17,5 @@ const RENDERER_TYPE = exports.RENDERER_TYPE = 'select';
|
|
19
17
|
*/
|
20
18
|
function selectRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
21
19
|
_textRenderer.textRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
22
|
-
if (hotInstance.getSettings().ariaTags) {
|
23
|
-
(0, _element.setAttribute)(TD, ...(0, _a11y.A11Y_HASPOPUP)('listbox'));
|
24
|
-
}
|
25
20
|
}
|
26
21
|
selectRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -1,6 +1,4 @@
|
|
1
1
|
import { textRenderer } from "../textRenderer/index.mjs";
|
2
|
-
import { A11Y_HASPOPUP } from "../../helpers/a11y.mjs";
|
3
|
-
import { setAttribute } from "../../helpers/dom/element.mjs";
|
4
2
|
export const RENDERER_TYPE = 'select';
|
5
3
|
|
6
4
|
/**
|
@@ -15,8 +13,5 @@ export const RENDERER_TYPE = 'select';
|
|
15
13
|
*/
|
16
14
|
export function selectRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
|
17
15
|
textRenderer.apply(this, [hotInstance, TD, row, col, prop, value, cellProperties]);
|
18
|
-
if (hotInstance.getSettings().ariaTags) {
|
19
|
-
setAttribute(TD, ...A11Y_HASPOPUP('listbox'));
|
20
|
-
}
|
21
16
|
}
|
22
17
|
selectRenderer.RENDERER_TYPE = RENDERER_TYPE;
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
4
4
|
exports.createHighlight = createHighlight;
|
5
5
|
var _src = require("../../../3rdparty/walkontable/src");
|
6
6
|
var _visualSelection = _interopRequireDefault(require("../visualSelection"));
|
7
|
+
var _a11y = require("../../../helpers/a11y");
|
7
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8
9
|
/**
|
9
10
|
* Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
|
@@ -20,6 +21,7 @@ function createHighlight(_ref) {
|
|
20
21
|
} = _ref;
|
21
22
|
return new _visualSelection.default({
|
22
23
|
className: 'current',
|
24
|
+
headerAttributes: [(0, _a11y.A11Y_SELECTED)()],
|
23
25
|
border: {
|
24
26
|
width: 2,
|
25
27
|
color: '#4b89ff',
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { HIGHLIGHT_FOCUS_TYPE } from "../../../3rdparty/walkontable/src/index.mjs";
|
2
2
|
import VisualSelection from "../visualSelection.mjs";
|
3
|
+
import { A11Y_SELECTED } from "../../../helpers/a11y.mjs";
|
3
4
|
/**
|
4
5
|
* Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
|
5
6
|
* can present on the table only one at the time.
|
@@ -15,6 +16,7 @@ export function createHighlight(_ref) {
|
|
15
16
|
} = _ref;
|
16
17
|
return new VisualSelection({
|
17
18
|
className: 'current',
|
19
|
+
headerAttributes: [A11Y_SELECTED()],
|
18
20
|
border: {
|
19
21
|
width: 2,
|
20
22
|
color: '#4b89ff',
|