@dhtmlx/grid 9.3.10 → 9.3.12
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/README.md +1 -1
- package/codebase/grid.min.css +1 -1
- package/codebase/grid.min.js +3 -3
- package/codebase/grid.min.js.map +1 -1
- package/codebase/types/ts-combobox/sources/types.d.ts +1 -0
- package/codebase/types/ts-grid/sources/Grid.d.ts +15 -0
- package/codebase/types/ts-grid/sources/ProGrid.d.ts +1 -0
- package/codebase/types/ts-grid/sources/helpers/cells.d.ts +8 -1
- package/codebase/types/ts-grid/sources/helpers/locale.d.ts +10 -0
- package/codebase/types/ts-grid/sources/helpers/zoneFocus.d.ts +10 -0
- package/codebase/types/ts-grid/sources/locales/en.d.ts +26 -0
- package/codebase/types/ts-grid/sources/modules/ActiveCell.d.ts +26 -0
- package/codebase/types/ts-grid/sources/modules/BlockSelection.d.ts +0 -1
- package/codebase/types/ts-grid/sources/modules/Selection.d.ts +2 -6
- package/codebase/types/ts-grid/sources/types.d.ts +52 -1
- package/codebase/types/ts-grid/sources/ui/cells.d.ts +28 -2
- package/codebase/types/ts-grid/sources/ui/common.d.ts +7 -0
- package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +3 -0
- package/codebase/types/ts-message/sources/locales/en.d.ts +3 -0
- package/package.json +1 -1
- package/whatsnew.txt +50 -0
|
@@ -29,6 +29,7 @@ export interface IComboboxConfig {
|
|
|
29
29
|
[className: string]: (event: Event, id: Id) => void | boolean;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
ariaLabel?: string;
|
|
32
33
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
33
34
|
cellHeight?: number;
|
|
34
35
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
@@ -8,6 +8,7 @@ import { PrefixSums } from "./helpers/PrefixSums";
|
|
|
8
8
|
import { ISelection } from "./modules/Selection";
|
|
9
9
|
import { EditorType, GridEvents, IAdjustBy, ICellRect, ICol, ICoords, IEventHandlersMap, IGrid, IGridConfig, IRow, IScrollState, ISpan, GridSystemEvents, ISystemEventHandlersMap, IColumnsWidth, SortFunction, IAdjustColumns, IDirection, IFooter, IHeader, INormalizeColumnsParams, ISummaryList, ISortingStates } from "./types";
|
|
10
10
|
import { IContentList, IHeaderFilter } from "./ui/content";
|
|
11
|
+
import { IActiveCell } from "./modules/ActiveCell";
|
|
11
12
|
import { IProContentList } from "./ui/proContent";
|
|
12
13
|
export declare class Grid extends View implements IGrid {
|
|
13
14
|
version: string;
|
|
@@ -19,11 +20,13 @@ export declare class Grid extends View implements IGrid {
|
|
|
19
20
|
content: IContentList | IProContentList;
|
|
20
21
|
selection: ISelection;
|
|
21
22
|
keyManager: IKeyManager;
|
|
23
|
+
$activeCell: IActiveCell;
|
|
22
24
|
protected _touch: ITouchParam;
|
|
23
25
|
protected _destructed: boolean;
|
|
24
26
|
protected _scroll: IScrollState;
|
|
25
27
|
protected _events: IEventSystem<GridSystemEvents, ISystemEventHandlersMap>;
|
|
26
28
|
protected _htmlEvents: any;
|
|
29
|
+
protected _tooltipFocusHandler: (e: Event) => void;
|
|
27
30
|
protected _sortingStates: ISortingStates;
|
|
28
31
|
protected _activeFilters: object;
|
|
29
32
|
protected _dropManager: any;
|
|
@@ -36,6 +39,7 @@ export declare class Grid extends View implements IGrid {
|
|
|
36
39
|
protected _colWidths: PrefixSums;
|
|
37
40
|
protected _rowHeightsRebuild: boolean;
|
|
38
41
|
private _observedEl;
|
|
42
|
+
private _liveRegion;
|
|
39
43
|
private _filterData;
|
|
40
44
|
private _hiddenFilters;
|
|
41
45
|
private _commonSummary;
|
|
@@ -68,6 +72,17 @@ export declare class Grid extends View implements IGrid {
|
|
|
68
72
|
editEnd(withoutSave?: boolean): void;
|
|
69
73
|
getHeaderFilter(colId: Id): IHeaderFilter;
|
|
70
74
|
getSummary(colId?: Id): ISummaryList;
|
|
75
|
+
/**
|
|
76
|
+
* Sends a message to the grid's polite live region, so a screen reader
|
|
77
|
+
* announces a status change that happened without moving focus.
|
|
78
|
+
*/
|
|
79
|
+
announce(message: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* The live region is kept as a sibling of the widget root, outside the
|
|
82
|
+
* `role="grid"` element: a `role="status"` node is not an allowed child of
|
|
83
|
+
* a grid, and the node must survive redraws, so it is not part of the vdom.
|
|
84
|
+
*/
|
|
85
|
+
protected _getLiveRegion(): HTMLElement | null;
|
|
71
86
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/suite/migration/ */
|
|
72
87
|
getSortingState(): {
|
|
73
88
|
dir?: TSortDir;
|
|
@@ -27,6 +27,7 @@ export declare class ProGrid implements IProGrid {
|
|
|
27
27
|
history: IHistory;
|
|
28
28
|
constructor(container: HTMLElement | string | null, config?: IProGridConfig);
|
|
29
29
|
paint(): void;
|
|
30
|
+
announce(message: string): void;
|
|
30
31
|
destructor(): void;
|
|
31
32
|
expand(rowId: Id): void;
|
|
32
33
|
collapse(rowId: Id): void;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { ICell, ICol, IGrid, IRow, ISpan } from "./../types";
|
|
1
|
+
import { ICell, ICellSource, ICellSourceHolder, ICol, IGrid, IRow, ISpan } from "./../types";
|
|
2
2
|
import { Id } from "../../../ts-common/types";
|
|
3
3
|
export declare function getWidth(columns: ICol[], colspan: number, index: number): number;
|
|
4
|
+
export declare function getSourceCellIndex(currentIdx: number, minIdx: number, count: number): number;
|
|
4
5
|
export declare function getSpanHeight(rows: IRow[], span: ISpan): number;
|
|
5
6
|
export declare function getReducedColspan(columns: ICol[], colId: Id, colspan: number): number;
|
|
6
7
|
export declare function getReducedRowspan(initialRows: IRow[], currRows: IRow[], rowIndex: number, span: ISpan): number;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the module that owns the active cell position.
|
|
10
|
+
* @param holder - the grid, or the renderer config built from it
|
|
11
|
+
* @returns the module answering `getCell`, `setCell` and `restoreFocus`
|
|
12
|
+
*/
|
|
13
|
+
export declare function getCellSource(holder: ICellSourceHolder): ICellSource;
|
|
7
14
|
export declare function normalizeCell(cell: ICell, grid: IGrid): ICell;
|
|
8
15
|
export declare function clearCells(grid: any, cells: ICell[]): void;
|
|
9
16
|
export declare function formatValue(value: string, cell: ICell): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ILocaleParams {
|
|
2
|
+
[key: string]: string | number;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Returns a localized string by its key, substituting `{name}` placeholders.
|
|
6
|
+
*
|
|
7
|
+
* The locale object is read on every call, so `dhx.i18n.setLocale("grid", ...)`
|
|
8
|
+
* is picked up without rebuilding anything.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getLocaleString(key: string, params?: ILocaleParams): string;
|
|
@@ -219,6 +219,16 @@ export declare function getColIdFromTarget(target: HTMLElement): string | null;
|
|
|
219
219
|
* @param zone - the zone whose cells should be reset
|
|
220
220
|
*/
|
|
221
221
|
export declare function restoreZoneTabindex(grid: any, zone: FocusZone): void;
|
|
222
|
+
/**
|
|
223
|
+
* Hands focus to the sentinel on one side of the widget so that the browser's own Tab handling
|
|
224
|
+
* continues from the edge of the widget instead of from the boundary cell.
|
|
225
|
+
* The sentinels are the first and the last child of the widget root and are already the widget's
|
|
226
|
+
* entry points, so their own focus listeners are suppressed for this one focus.
|
|
227
|
+
* @param grid - the grid instance
|
|
228
|
+
* @param direction - "forward" for Tab, "backward" for Shift+Tab
|
|
229
|
+
* @returns true if the sentinel was found and focused
|
|
230
|
+
*/
|
|
231
|
+
export declare function exitThroughSentinel(grid: any, direction: "forward" | "backward"): boolean;
|
|
222
232
|
/**
|
|
223
233
|
* Initializes the start focus sentinel for the grid.
|
|
224
234
|
* Attaches a focus listener on the .dhx_grid-focus-sentinel element that redirects
|
|
@@ -3,5 +3,31 @@ declare const locale: {
|
|
|
3
3
|
groupText: string;
|
|
4
4
|
dropAreaTitle: string;
|
|
5
5
|
dropAreaPlaceholder: string;
|
|
6
|
+
aria_sortedAscending: string;
|
|
7
|
+
aria_sortedDescending: string;
|
|
8
|
+
aria_filterApplied: string;
|
|
9
|
+
aria_filterCleared: string;
|
|
10
|
+
aria_rowsLoaded: string;
|
|
11
|
+
aria_valueOutOfRange: string;
|
|
12
|
+
aria_valueBelowMin: string;
|
|
13
|
+
aria_valueAboveMax: string;
|
|
14
|
+
aria_valueClamped: string;
|
|
15
|
+
aria_filter: string;
|
|
16
|
+
aria_filterByDate: string;
|
|
17
|
+
aria_sortBy: string;
|
|
18
|
+
aria_expandGroup: string;
|
|
19
|
+
aria_collapseGroup: string;
|
|
20
|
+
aria_expandRow: string;
|
|
21
|
+
aria_collapseRow: string;
|
|
22
|
+
aria_editContent: string;
|
|
23
|
+
aria_subRow: string;
|
|
24
|
+
aria_enterGrid: string;
|
|
25
|
+
aria_exitGrid: string;
|
|
26
|
+
aria_dragPanel: string;
|
|
27
|
+
aria_panelHeader: string;
|
|
28
|
+
aria_panelFooter: string;
|
|
29
|
+
aria_panelContent: string;
|
|
30
|
+
aria_draggableRows: string;
|
|
31
|
+
aria_rowId: string;
|
|
6
32
|
};
|
|
7
33
|
export default locale;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Id } from "../../../ts-common/types";
|
|
2
|
+
import { ICell, ICellSource, ICol, IGrid, IProGrid, IRow } from "../types";
|
|
3
|
+
export interface IActiveCell extends ICellSource {
|
|
4
|
+
destructor(): void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Keeps the position the keyboard moves over the data when no selection module is initialized.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ActiveCell implements IActiveCell {
|
|
10
|
+
private _grid;
|
|
11
|
+
private _gridId;
|
|
12
|
+
private _cell;
|
|
13
|
+
constructor(grid: IGrid | IProGrid, gridId?: Id);
|
|
14
|
+
/**
|
|
15
|
+
* Moves the active cell. The `ctrlUp` and `shiftUp` modifiers of the selection module are
|
|
16
|
+
* accepted by the shared signature and ignored here: there is no selection to extend.
|
|
17
|
+
* @param row - the row, or the row id, to move to
|
|
18
|
+
* @param col - the column, or the column id, to move to; the first visible column by default
|
|
19
|
+
*/
|
|
20
|
+
setCell(row?: IRow | Id, col?: ICol | Id): void;
|
|
21
|
+
getCell(): ICell | void;
|
|
22
|
+
restoreFocus(): void;
|
|
23
|
+
destructor(): void;
|
|
24
|
+
private _init;
|
|
25
|
+
private _setBrowserFocus;
|
|
26
|
+
}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import { VNode } from "../../../ts-common/dom";
|
|
2
2
|
import { IEventSystem } from "../../../ts-common/events";
|
|
3
|
-
import { ICell, IGrid, IRow, ICol, ISelectionType, IProGrid } from "../types";
|
|
3
|
+
import { ICell, IGrid, IRow, ICol, ISelectionType, IProGrid, ICellSource } from "../types";
|
|
4
4
|
import { Id } from "../../../ts-common/types";
|
|
5
5
|
export interface ISelectionConfig {
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
type?: ISelectionType;
|
|
8
8
|
multiSelection?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export interface ISelection {
|
|
10
|
+
export interface ISelection extends ICellSource {
|
|
11
11
|
config?: ISelectionConfig;
|
|
12
|
-
setCell(rowId?: IRow | Id, colId?: ICol | Id, ctrlUp?: boolean, shiftUp?: boolean): void;
|
|
13
|
-
getCell(): ICell | void;
|
|
14
12
|
getCells(): ICell[];
|
|
15
13
|
removeCell(rowId?: Id, colId?: Id): void;
|
|
16
14
|
disable(): void;
|
|
17
15
|
enable(): void;
|
|
18
16
|
isSelectedCell(row: IRow | Id, column?: ICol | Id): boolean;
|
|
19
17
|
toHTML(): VNode | VNode[];
|
|
20
|
-
/** @internal Restore browser focus */
|
|
21
|
-
restoreFocus(): void;
|
|
22
18
|
}
|
|
23
19
|
export declare enum GridSelectionEvents {
|
|
24
20
|
beforeUnSelect = "beforeUnSelect",
|
|
@@ -11,6 +11,7 @@ import { IGroupOrder, TDisplayMode } from "../../ts-data/sources/datacollection/
|
|
|
11
11
|
import { IGroupItem } from "./ui/components/groupPanel";
|
|
12
12
|
import { ITreeGrid, ITreeGridConfig } from "../../ts-treegrid";
|
|
13
13
|
import { ISelection } from "./modules/Selection";
|
|
14
|
+
import { IActiveCell } from "./modules/ActiveCell";
|
|
14
15
|
import { IProCell, IViewConstructor } from "../../ts-layout";
|
|
15
16
|
import { IRange, IRangeConfig } from "./modules/Range";
|
|
16
17
|
import { PrefixSums } from "./helpers/PrefixSums";
|
|
@@ -20,6 +21,22 @@ import { IHistory, IHistoryConfig } from "./modules/History";
|
|
|
20
21
|
import { IComboFilterConfig, IContentList, IHeaderFilter, IInputFilterConfig } from "./ui/content";
|
|
21
22
|
import { ExportType, ICsvExportConfig, IXlsxExportConfig } from "./modules/Exporter";
|
|
22
23
|
import { IDateFilterConfig, IProContentList, IProHeaderFilter } from "./ui/proContent";
|
|
24
|
+
/**
|
|
25
|
+
* @internal The active-cell contract shared by the selection module and the service active-cell
|
|
26
|
+
* module, so that the key handlers read one position whichever module owns it.
|
|
27
|
+
*/
|
|
28
|
+
export interface ICellSource {
|
|
29
|
+
getCell(): ICell | void;
|
|
30
|
+
setCell(row?: IRow | Id, col?: ICol | Id, ctrlUp?: boolean, shiftUp?: boolean): void;
|
|
31
|
+
restoreFocus(): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal Anything that holds the active cell: the grid itself, or a renderer config.
|
|
35
|
+
*/
|
|
36
|
+
export interface ICellSourceHolder {
|
|
37
|
+
selection: ICellSource;
|
|
38
|
+
$activeCell?: IActiveCell;
|
|
39
|
+
}
|
|
23
40
|
export interface IGrid {
|
|
24
41
|
data: IDataCollection;
|
|
25
42
|
name: "grid" | string;
|
|
@@ -29,7 +46,10 @@ export interface IGrid {
|
|
|
29
46
|
content: IContentList | IProContentList;
|
|
30
47
|
keyManager: IKeyManager;
|
|
31
48
|
export: any;
|
|
49
|
+
/** @internal Service module: present only when no selection module is initialized. */
|
|
50
|
+
$activeCell?: IActiveCell;
|
|
32
51
|
paint(): void;
|
|
52
|
+
announce(message: string): void;
|
|
33
53
|
destructor(): void;
|
|
34
54
|
setColumns(col: ICol[]): void;
|
|
35
55
|
addRowCss(rowId: Id, css: string): void;
|
|
@@ -167,6 +187,7 @@ export interface IGridConfig extends IDragConfig {
|
|
|
167
187
|
$data?: any[];
|
|
168
188
|
$grouped?: IGroupItem[];
|
|
169
189
|
$subRowCells?: Map<Id, ISubRowCell>;
|
|
190
|
+
$cellState?: ICellState;
|
|
170
191
|
}
|
|
171
192
|
export type IProGridConfig = IExtendedGridConfig & ITreeGridConfig;
|
|
172
193
|
export interface IExtendedGridConfig extends IGridConfig {
|
|
@@ -207,8 +228,10 @@ export interface IRendererConfig extends Required<IProGridConfig> {
|
|
|
207
228
|
footerHeight?: number;
|
|
208
229
|
events?: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
209
230
|
selection: any;
|
|
231
|
+
$activeCell?: IActiveCell;
|
|
210
232
|
dropManager: any;
|
|
211
233
|
blockSelection: any;
|
|
234
|
+
range?: IRange;
|
|
212
235
|
sort: ISortingStates;
|
|
213
236
|
filterLocation?: string;
|
|
214
237
|
content?: IContentList;
|
|
@@ -219,6 +242,7 @@ export interface IRendererConfig extends Required<IProGridConfig> {
|
|
|
219
242
|
};
|
|
220
243
|
$renderFrom?: RenderFrom;
|
|
221
244
|
$isDragging?: boolean;
|
|
245
|
+
$rowIndexShift?: number;
|
|
222
246
|
_events?: IEventSystem<GridSystemEvents>;
|
|
223
247
|
}
|
|
224
248
|
export declare enum GridEvents {
|
|
@@ -364,7 +388,8 @@ export declare enum GridSystemEvents {
|
|
|
364
388
|
headerCellTouchMove = "headerCellTouchMove",
|
|
365
389
|
headerCellTouchEnd = "headerCellTouchEnd",
|
|
366
390
|
groupPanelItemTouchMove = "groupPanelItemTouchMove",
|
|
367
|
-
groupPanelItemItemTouchEnd = "groupPanelItemItemTouchEnd"
|
|
391
|
+
groupPanelItemItemTouchEnd = "groupPanelItemItemTouchEnd",
|
|
392
|
+
announce = "announce"
|
|
368
393
|
}
|
|
369
394
|
export interface ISystemEventHandlersMap {
|
|
370
395
|
[key: string]: (...args: any[]) => any;
|
|
@@ -374,6 +399,7 @@ export interface ISystemEventHandlersMap {
|
|
|
374
399
|
[GridSystemEvents.headerCellTouchEnd]: (cell: IHeader, col: ICol, event: TouchEvent) => void;
|
|
375
400
|
[GridSystemEvents.groupPanelItemTouchMove]: (id: string, event: TouchEvent) => void;
|
|
376
401
|
[GridSystemEvents.groupPanelItemItemTouchEnd]: (id: string, event: TouchEvent) => void;
|
|
402
|
+
[GridSystemEvents.announce]: (message: string) => void;
|
|
377
403
|
}
|
|
378
404
|
export interface ICol {
|
|
379
405
|
id: Id;
|
|
@@ -425,6 +451,7 @@ export interface ICol {
|
|
|
425
451
|
$width?: number;
|
|
426
452
|
$fixedWidth?: boolean;
|
|
427
453
|
$customOptions?: any;
|
|
454
|
+
$rowHeader?: boolean;
|
|
428
455
|
}
|
|
429
456
|
export interface IRow {
|
|
430
457
|
id?: Id;
|
|
@@ -671,4 +698,28 @@ export interface IExportGridCell {
|
|
|
671
698
|
v: string | number;
|
|
672
699
|
s: number;
|
|
673
700
|
}
|
|
701
|
+
/**
|
|
702
|
+
* @internal
|
|
703
|
+
* Cell state supplied by a host product that manages selection and editing itself.
|
|
704
|
+
* When it is set, it is the source of truth for the roving tabindex, `aria-selected`,
|
|
705
|
+
* `aria-readonly` and `aria-multiselectable`, and the grid's own selection module is not
|
|
706
|
+
* consulted. When it is not set, the grid behaves exactly as before.
|
|
707
|
+
*
|
|
708
|
+
* A range is a set of row ids by a set of column ids, so that a cell can be tested with two
|
|
709
|
+
* hash lookups: `getCells` runs per visible cell and again per frozen zone, and the column
|
|
710
|
+
* index of a cell is not recoverable there because the fixed-column zones replace
|
|
711
|
+
* `filteredColumns` and reset `$positions.xStart`.
|
|
712
|
+
*/
|
|
713
|
+
export interface ICellState {
|
|
714
|
+
active?: {
|
|
715
|
+
row: Id;
|
|
716
|
+
col: Id;
|
|
717
|
+
};
|
|
718
|
+
ranges?: Array<{
|
|
719
|
+
rows: Set<Id>;
|
|
720
|
+
cols: Set<Id>;
|
|
721
|
+
}>;
|
|
722
|
+
editable?: boolean;
|
|
723
|
+
multiselectable?: boolean;
|
|
724
|
+
}
|
|
674
725
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridEvents, GridSystemEvents, ICoords, IGridConfig, IRendererConfig, ISpan, Split } from "../types";
|
|
2
2
|
import { IDataCollection } from "../../../ts-data";
|
|
3
|
+
import { Id } from "../../../ts-common/types";
|
|
3
4
|
type mouseEvents = GridEvents.cellClick | GridEvents.cellMouseOver | GridEvents.cellMouseDown | GridEvents.cellDblClick | GridEvents.cellRightClick;
|
|
4
5
|
type touchEvents = GridSystemEvents.cellTouchEnd | GridSystemEvents.cellTouchMove;
|
|
5
6
|
declare function handleMouse(rowStart: number, colStart: number, conf: IRendererConfig, type: mouseEvents & touchEvents, e: any): void;
|
|
@@ -13,6 +14,31 @@ export declare function getHandlers(row: number, column: number, conf: IRenderer
|
|
|
13
14
|
ontouchmove: (number | GridSystemEvents | IRendererConfig | typeof handleMouse)[];
|
|
14
15
|
ontouchend: (number | GridSystemEvents | IRendererConfig | typeof handleMouse)[];
|
|
15
16
|
};
|
|
17
|
+
export interface ISpanExtent {
|
|
18
|
+
column: Id;
|
|
19
|
+
colspan: number;
|
|
20
|
+
rowspan: number;
|
|
21
|
+
}
|
|
22
|
+
/** @internal the per-render-pass answer of {@link resolveCellState} */
|
|
23
|
+
export interface IResolvedCellState {
|
|
24
|
+
/** the row and the column of the only cell that carries `tabindex="0"` */
|
|
25
|
+
tabRow: Id;
|
|
26
|
+
tabCol: Id;
|
|
27
|
+
readonly: "true" | "false";
|
|
28
|
+
/** whether `aria-selected` belongs on a cell at all — it does not in row selection mode */
|
|
29
|
+
exposeSelected: boolean;
|
|
30
|
+
isSelected: (rowId: Id, colId: Id) => boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolves everything the cell renderers need to know about selection, focus and editability,
|
|
34
|
+
* once per render pass. This is the hottest path in the product — `getCells` runs per visible
|
|
35
|
+
* cell and again for every frozen zone — so the per-cell work left afterwards is two identity
|
|
36
|
+
* comparisons for the tabindex and one call for `aria-selected`.
|
|
37
|
+
*
|
|
38
|
+
* The state comes from `$cellState` when a host product supplies it, and from the grid's own
|
|
39
|
+
* selection module otherwise.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveCellState(conf: IRendererConfig): IResolvedCellState;
|
|
16
42
|
export declare function getCells(conf: IRendererConfig): any[];
|
|
17
43
|
export declare function getSpans(config: IRendererConfig, mode?: Split): any[];
|
|
18
44
|
export declare function getShifts(conf: IRendererConfig): ICoords;
|
|
@@ -20,8 +46,8 @@ export declare function normalizeSpan(span: ISpan, config: IGridConfig, data: ID
|
|
|
20
46
|
$renderFrom: any[];
|
|
21
47
|
$rowsVisibility: number[];
|
|
22
48
|
$colsVisibility: number[];
|
|
23
|
-
row:
|
|
24
|
-
column:
|
|
49
|
+
row: Id;
|
|
50
|
+
column: Id;
|
|
25
51
|
rowspan?: number;
|
|
26
52
|
colspan?: number;
|
|
27
53
|
text?: string | ((args: import("../types").ISummaryList) => string);
|
|
@@ -5,4 +5,11 @@ export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig
|
|
|
5
5
|
height: number;
|
|
6
6
|
}): IScrollBarWidth;
|
|
7
7
|
export declare function getCurrFixedCols(config: IGridConfig, split: Split.left | Split.right): import("../types").ICol[];
|
|
8
|
+
/**
|
|
9
|
+
* Number of header rows. `aria-rowindex` is a position within the whole grid,
|
|
10
|
+
* so header rows occupy the first indices and body rows are offset by this.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getHeaderRowCount(config: IGridConfig | IRendererConfig): number;
|
|
13
|
+
/** Number of footer rows; they are the last rows of the grid for `aria-rowcount`. */
|
|
14
|
+
export declare function getFooterRowCount(config: IGridConfig | IRendererConfig): number;
|
|
8
15
|
export declare function getNormalizeDateObject(item: string | Date, dateFormat: string): Date | null;
|
|
@@ -15,6 +15,9 @@ export declare class InputEditor implements IEditor {
|
|
|
15
15
|
endEdit(withoutSave?: boolean): void;
|
|
16
16
|
toHTML(value?: string | number): any;
|
|
17
17
|
protected _initHandlers(): void;
|
|
18
|
+
private _setValidity;
|
|
19
|
+
private _isValueInvalid;
|
|
20
|
+
private _getRangeMessage;
|
|
18
21
|
private _isValidWord;
|
|
19
22
|
private _isCorrectRange;
|
|
20
23
|
private _applyValuePattern;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhtmlx/grid",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.12",
|
|
4
4
|
"description": "DHTMLX Grid - JavaScript data grid library. GPL v2 edition for GPL-compatible open-source projects; commercial licenses are available for proprietary and production use.",
|
|
5
5
|
"keywords": ["dhtmlx","grid","datagrid","table","treegrid","data-table","javascript","typescript"],
|
|
6
6
|
"homepage":"https://docs.dhtmlx.com/suite/grid/",
|
package/whatsnew.txt
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
# Version 9.3.12 (September 23, 2026)
|
|
2
|
+
|
|
3
|
+
### Updates
|
|
4
|
+
|
|
5
|
+
- Keyboard access to the cell surface:
|
|
6
|
+
- The grid is entered with a single <kbd>Tab</kbd> press, the arrow keys move between cells, and <kbd>Tab</kbd> leaves the grid, as the WAI-ARIA Grid pattern specifies (**WCAG 2.1.1**, **WCAG 2.4.3**).
|
|
7
|
+
- Cells can now be reached with the keyboard in a grid configured without a selection module.
|
|
8
|
+
|
|
9
|
+
- Structure reported to assistive technology:
|
|
10
|
+
- The row number column is announced as a row header, and the sort state is reported only for columns that can be sorted (**WCAG 1.3.1**, **WCAG 4.1.2**).
|
|
11
|
+
- A merged cell reports how many rows and columns it spans.
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- Fixed <kbd>Tab</kbd> not leaving a grid that has frozen (`leftSplit` / `rightSplit`) columns
|
|
16
|
+
- Fixed the focused cell being scrolled one column short of the viewport edge during horizontal keyboard navigation
|
|
17
|
+
- Fixed the focused cell being scrolled behind the footer instead of above it
|
|
18
|
+
- Fixed the doubled focus indicator on a cell that is both focused and selected
|
|
19
|
+
- Fixed cells rendered with `htmlEnable` being announced as buttons in columns without interactive content
|
|
20
|
+
- Corrected the ARIA structure of the grid so that rows and columns are reported reliably, and the focus helpers are no longer exposed as controls
|
|
21
|
+
- Fixed a script error that occurred after closing an inline editor in a grid with column summaries
|
|
22
|
+
|
|
23
|
+
# Version 9.3.11 (September 14, 2026)
|
|
24
|
+
|
|
25
|
+
### Updates
|
|
26
|
+
|
|
27
|
+
- Modal focus trapping and management:
|
|
28
|
+
- Implemented focus trapping for all modal windows, message dialogs, and popups compliant with **WCAG 2.4.3**.
|
|
29
|
+
- Opening a modal dialog moves keyboard focus to the first actionable element and keeps it within the dialog boundaries until the dialog closes.
|
|
30
|
+
- Closing a dialog restores focus to the previously active cell or trigger element.
|
|
31
|
+
|
|
32
|
+
- Assistive technology support for block selection:
|
|
33
|
+
- The Grid exposes the block selection state to screen readers (**WCAG 1.3.1**, **WCAG 4.1.2**).
|
|
34
|
+
- Selected cell boundaries and multi-cell ranges reflect their `aria-selected` status in the accessibility tree, providing real-time feedback during keyboard and pointer selection.
|
|
35
|
+
|
|
36
|
+
- Localization for ARIA labels:
|
|
37
|
+
- Moved all hardcoded English accessible names and labels into the locale system.
|
|
38
|
+
- Screen reader announcements, button descriptions, and status labels that developers can translate via the standard localization configuration.
|
|
39
|
+
|
|
40
|
+
- Target size improvements for interactive controls:
|
|
41
|
+
- Enlarged hit areas for small interactive elements, including column resize handles and removal/action icons.
|
|
42
|
+
- Reduced accidental or missed clicks on touch-screen devices, accommodating users with motor precision needs.
|
|
43
|
+
|
|
44
|
+
### Fixes
|
|
45
|
+
|
|
46
|
+
- Fixed a console error that occurred when starting block selection in numeric columns or number-formatted cell ranges
|
|
47
|
+
- Fixed broken `aria-labelledby` relationships in sub-rows, eliminating orphaned ID references
|
|
48
|
+
- Corrected invalid ARIA attributes and roles, and fixed the `aria-rowindex` and `aria-rowcount` calculations so that they reflect the overall grid structure, including header rows
|
|
49
|
+
- Fixed an issue where inline cell editors lost or failed to expose their accessible names on the first paint and on subsequent data updates
|
|
50
|
+
|
|
1
51
|
# Version 9.3.10 (August 19, 2026)
|
|
2
52
|
|
|
3
53
|
### Fixes
|