@dhtmlx/chart 9.3.4 → 9.3.5

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.
@@ -34,3 +34,4 @@ export declare function getReverseScrollState(grid: any): {
34
34
  x: number;
35
35
  y: number;
36
36
  };
37
+ export declare function getColumnHeaderText(col: ICol): string;
@@ -1,27 +1,49 @@
1
+ /**
2
+ * Creates keyboard event handlers for grid navigation, editing, and zone transitions.
3
+ * Initializes focus sentinels and returns a map of key handlers used by KeyManager.
4
+ * Each handler routes to zone-specific logic (header/footer) or body cell navigation
5
+ * depending on the current focus position.
6
+ * @param grid - the grid instance (IProGrid or IExtendedGrid)
7
+ * @returns an object mapping key names to their handler functions
8
+ */
1
9
  export declare function getKeysHandlers(grid: any): {
2
- enter: () => void;
10
+ enter: (e: any) => void;
11
+ f2: () => void;
3
12
  space: (e: any) => void;
4
- escape: () => void;
13
+ escape: (e: any) => void;
5
14
  tab: (e: any) => void;
6
15
  delete: () => void;
7
16
  "shift+tab": (e: any) => void;
8
- arrowUp: (event: any) => void;
17
+ arrowUp: (e: any) => void;
18
+ "shift+enter": (e: any) => void;
9
19
  "ctrl+z": () => void;
10
20
  "ctrl+shift+z": () => void;
11
21
  "ctrl+enter": () => void;
12
- "ctrl+arrowUp": (event: any) => void;
13
- "shift+arrowUp": (event: any) => void;
14
- "ctrl+shift+arrowUp": (event: any) => void;
15
- arrowDown: (event: any) => void;
16
- "ctrl+arrowDown": (event: any) => void;
17
- "shift+arrowDown": (event: any) => void;
18
- "ctrl+shift+arrowDown": (event: any) => void;
19
- arrowRight: (event: any) => void;
20
- "ctrl+arrowRight": (event: any) => void;
21
- "shift+arrowRight": (event: any) => void;
22
- "ctrl+shift+arrowRight": (event: any) => void;
23
- arrowLeft: (event: any) => void;
24
- "ctrl+arrowLeft": (event: any) => void;
25
- "shift+arrowLeft": (event: any) => void;
26
- "ctrl+shift+arrowLeft": (event: any) => void;
22
+ "ctrl+arrowUp": (e: any) => void;
23
+ "shift+arrowUp": (e: any) => void;
24
+ "ctrl+shift+arrowUp": (e: any) => void;
25
+ arrowDown: (e: any) => void;
26
+ "ctrl+arrowDown": (e: any) => void;
27
+ "shift+arrowDown": (e: any) => void;
28
+ "ctrl+shift+arrowDown": (e: any) => void;
29
+ arrowRight: (e: any) => void;
30
+ "ctrl+arrowRight": (e: any) => void;
31
+ "shift+arrowRight": (e: any) => void;
32
+ "ctrl+shift+arrowRight": (e: any) => void;
33
+ arrowLeft: (e: any) => void;
34
+ "ctrl+arrowLeft": (e: any) => void;
35
+ "shift+arrowLeft": (e: any) => void;
36
+ "ctrl+shift+arrowLeft": (e: any) => void;
37
+ pageDown: (e: any) => void;
38
+ pageUp: (e: any) => void;
39
+ "shift+pageDown": (e: any) => void;
40
+ "shift+pageUp": (e: any) => void;
41
+ home: (e: any) => void;
42
+ end: (e: any) => void;
43
+ "shift+home": (e: any) => void;
44
+ "shift+end": (e: any) => void;
45
+ "ctrl+home": (e: any) => void;
46
+ "ctrl+end": (e: any) => void;
47
+ "ctrl+shift+home": (e: any) => void;
48
+ "ctrl+shift+end": (e: any) => void;
27
49
  };
@@ -0,0 +1,9 @@
1
+ import { IGrid, ICol, IRow } from "../types";
2
+ export declare function isColumnEditable(column: ICol, config: {
3
+ editable?: boolean;
4
+ }): boolean;
5
+ export declare function toggleBooleanCell(grid: IGrid, row: IRow, column: ICol): void;
6
+ export declare function startCellEdit(grid: IGrid, selected: {
7
+ row: IRow;
8
+ column: ICol;
9
+ }): void;
@@ -0,0 +1,23 @@
1
+ import { IGrid, IDirection, IProGrid, ICol, IRow } from "../types";
2
+ import { IRangeSelection } from "../modules/Range";
3
+ interface IMoveConf {
4
+ grid: IGrid | IProGrid;
5
+ dir: IDirection;
6
+ rangedIndex: number;
7
+ columns?: ICol[];
8
+ event?: KeyboardEvent;
9
+ toEnd?: boolean;
10
+ shiftUp?: boolean;
11
+ }
12
+ export declare function move(config: IMoveConf): void;
13
+ export declare function applyRangeMove(proGrid: IProGrid, target: ICol | IRow, rangedCell: IRangeSelection, dir: IDirection, shiftUp: boolean): void;
14
+ export declare function getRangedIndex(grid: IGrid | IProGrid, direction: "up" | "down" | "left" | "right"): number;
15
+ export declare function getActiveCell(grid: IGrid | IProGrid, cellSelection: boolean): {
16
+ row: IRow;
17
+ column: ICol;
18
+ } | null;
19
+ export declare function walkVisibleRows(grid: IGrid | IProGrid, fromRowId: any, steps: number): any;
20
+ export declare function getNextVisibleRowId(grid: IGrid | IProGrid, currentRowId: any, direction: 1 | -1): import("../../../ts-common/types").Id;
21
+ export declare function isTreeColumn(grid: IGrid | IProGrid, colId: any): boolean;
22
+ export declare function navigateToCell(grid: any, cellSelection: boolean, rowId: any, colId: any): void;
23
+ export {};
@@ -0,0 +1,239 @@
1
+ import { ICol } from "../types";
2
+ export type FocusZone = "header" | "body" | "footer" | "groupPanel";
3
+ /**
4
+ * Detects which focus zone the event target belongs to.
5
+ * Walks up the DOM tree to determine if the target is in the header, footer, body, or group panel.
6
+ * Span cells require special disambiguation since they exist across multiple zones.
7
+ * @param event - the DOM event whose target will be inspected
8
+ * @returns the zone containing the event target
9
+ */
10
+ export declare function detectFocusZone(event: Event): FocusZone;
11
+ /**
12
+ * Returns all visible (non-hidden) columns in their configured order.
13
+ * @param grid - the grid instance
14
+ * @returns an array of visible column configs
15
+ */
16
+ export declare function getVisibleColumns(grid: any): ICol[];
17
+ /**
18
+ * Determines which split section a column belongs to based on its index
19
+ * relative to leftSplit and rightSplit boundaries.
20
+ * @param grid - the grid instance
21
+ * @param colId - the column ID to look up
22
+ * @returns "left" for left-fixed, "right" for right-fixed, or "center" for scrollable columns
23
+ */
24
+ export declare function getColumnSplitSection(grid: any, colId: string): "left" | "center" | "right";
25
+ /**
26
+ * Returns the number of rows in a header or footer zone.
27
+ * Uses the internal $headerHeightMap / $footerHeightMap arrays.
28
+ * @param grid - the grid instance
29
+ * @param zone - the focus zone to query
30
+ * @returns the row count for the zone, or 0 if zone is not header/footer
31
+ */
32
+ export declare function getZoneRowCount(grid: any, zone: FocusZone): number;
33
+ /**
34
+ * Finds a zone cell element in the DOM by column ID and row index.
35
+ * Checks span cells first since they overlay regular cells, then falls back
36
+ * to regular header/footer cells. Searches section-specific containers first
37
+ * for performance, falling back to the entire grid root.
38
+ * @param grid - the grid instance
39
+ * @param zone - the focus zone to search in
40
+ * @param colId - the column ID attribute to match
41
+ * @param rowIndex - the row index attribute to match
42
+ * @returns the matching DOM element, or null if not found
43
+ */
44
+ export declare function findZoneCell(grid: any, zone: FocusZone, colId: string, rowIndex: number): HTMLElement | null;
45
+ /**
46
+ * Scrolls the grid horizontally to ensure a column is visible in the viewport.
47
+ * Skips fixed (left/right split) columns since they are always visible.
48
+ * Calculates the column position relative to the scrollable area and adjusts
49
+ * the scroll offset if the column is outside the visible range.
50
+ * @param grid - the grid instance
51
+ * @param colId - the column ID to make visible
52
+ */
53
+ export declare function ensureZoneCellVisible(grid: any, colId: string): void;
54
+ /**
55
+ * Resolves the actual owning cell for a position that may be covered by a colspan or rowspan.
56
+ * Scans all rows (0..rowIndex) and columns (0..colIndex) to find any cell whose
57
+ * colspan+rowspan coverage includes the target position. Handles colspan-only,
58
+ * rowspan-only, and combined span cases uniformly.
59
+ * @param zone - the focus zone (determines whether to use "header" or "footer" config)
60
+ * @param colId - the target column ID
61
+ * @param rowIndex - the target row index
62
+ * @param columns - the visible columns array
63
+ * @returns the owning cell's colId and rowIndex (unchanged if no span covers the position)
64
+ */
65
+ export declare function resolveSpanTarget(zone: FocusZone, colId: string, rowIndex: number, columns: ICol[]): {
66
+ colId: string;
67
+ rowIndex: number;
68
+ };
69
+ /**
70
+ * Moves focus horizontally within a header/footer zone (ArrowLeft/ArrowRight).
71
+ * Preserves the logical navigation row (navRowIndex) across rowspan cells so that
72
+ * horizontal movement stays on the same logical level. Handles colspan skip when
73
+ * moving right past a multi-column cell.
74
+ * @param grid - the grid instance
75
+ * @param event - the keyboard event (will be preventDefault'd)
76
+ * @param zone - the current focus zone
77
+ * @param direction - horizontal direction to move
78
+ */
79
+ export declare function moveZoneFocus(grid: any, event: KeyboardEvent, zone: FocusZone, direction: "left" | "right"): void;
80
+ /**
81
+ * Moves focus vertically within a header/footer zone (ArrowUp/ArrowDown).
82
+ * When moving down past a rowspan cell, starts from the span's last row.
83
+ * Returns false when reaching the zone boundary, signaling the caller
84
+ * to handle the transition to body or adjacent zone.
85
+ * @param grid - the grid instance
86
+ * @param event - the keyboard event (will be preventDefault'd)
87
+ * @param zone - the current focus zone
88
+ * @param direction - vertical direction to move
89
+ * @returns true if focus moved within the zone, false if at the boundary
90
+ */
91
+ export declare function moveZoneFocusVertical(grid: any, event: KeyboardEvent, zone: FocusZone, direction: "up" | "down"): boolean;
92
+ /**
93
+ * Moves focus via Tab/Shift+Tab within a header/footer zone.
94
+ * Advances column-by-column with row wrapping: when reaching the last column,
95
+ * moves to the first column of the next row (and vice versa for backward).
96
+ * Skips cells that resolve back to the current cell (due to spans) and retries
97
+ * if a cell is not found in the DOM (virtualized columns).
98
+ * Does NOT call preventDefault for exit cases — the caller decides.
99
+ * @param grid - the grid instance
100
+ * @param event - the keyboard event (preventDefault'd only on successful move)
101
+ * @param zone - the current focus zone
102
+ * @param direction - tab direction: "forward" for Tab, "backward" for Shift+Tab
103
+ * @returns "moved" on success, "exit-end" if past the last cell, "exit-start" if before the first
104
+ */
105
+ export declare function moveZoneFocusTab(grid: any, event: KeyboardEvent, zone: FocusZone, direction: "forward" | "backward"): "moved" | "exit-start" | "exit-end";
106
+ /**
107
+ * Checks if the active body cell is in the first visible column.
108
+ * Works with both cell selection and block (range) selection modes.
109
+ * @param grid - the grid instance
110
+ * @returns true if the selection is on the first column or no selection exists
111
+ */
112
+ export declare function isAtFirstColumn(grid: any): boolean;
113
+ /**
114
+ * Checks if a header/footer cell is a content cell (contains a filter widget).
115
+ * Content cells have the dhx_grid-custom-content-cell class.
116
+ * @param target - the DOM element to check
117
+ * @returns true if the element is a content cell
118
+ */
119
+ export declare function isContentCell(target: HTMLElement): boolean;
120
+ /**
121
+ * Activates the inner widget of a content cell (Enter on a filter cell).
122
+ * Sets tabindex="0" on the inner input/select and focuses it.
123
+ * Attaches an Escape keydown listener directly on the inner element to handle
124
+ * widgets that call stopPropagation (e.g., ComboFilter closing its popup).
125
+ * @param target - the content cell DOM element
126
+ */
127
+ export declare function activateContentCell(target: HTMLElement): void;
128
+ /**
129
+ * Deactivates the inner widget of a content cell (Escape from an active filter).
130
+ * Restores tabindex="-1" on the inner element, removes the Escape listener,
131
+ * and returns focus to the outer cell.
132
+ * @param cell - the content cell DOM element to deactivate
133
+ */
134
+ export declare function deactivateContentCell(cell: HTMLElement): void;
135
+ /**
136
+ * Triggers column sorting on a header cell via keyboard (Enter/Space/Shift+Enter).
137
+ * Matches the click-based sort logic from ExtendedGrid.
138
+ * Skips content cells (filters) and colspan cells.
139
+ * After the sort triggers a re-render, restores focus to the same cell.
140
+ * @param grid - the grid instance
141
+ * @param event - the keyboard event
142
+ * @param isModifierKey - if true, toggles multi-sort behavior (Shift+Enter)
143
+ */
144
+ export declare function triggerHeaderSort(grid: any, event: KeyboardEvent, isModifierKey?: boolean): void;
145
+ /**
146
+ * Sets focus on a zone cell using the roving tabindex pattern.
147
+ * Scrolls the column into view first (the cell may not exist in the DOM due to
148
+ * virtualized rendering), then sets tabindex="0" and focuses the target cell.
149
+ * Updates the sentinel state to track the last active position and logical navigation row.
150
+ * @param grid - the grid instance
151
+ * @param zone - the focus zone containing the cell
152
+ * @param colId - the column ID of the cell to focus
153
+ * @param rowIndex - the row index of the cell to focus
154
+ * @param prevCell - the previously focused cell (will get tabindex="-1")
155
+ * @param navRowIndex - the logical navigation row to store (defaults to rowIndex)
156
+ * @returns true if focus was set successfully, false if the cell was not found
157
+ */
158
+ export declare function setZoneCellFocus(grid: any, zone: FocusZone, colId: string, rowIndex: number, prevCell?: HTMLElement, navRowIndex?: number): boolean;
159
+ /**
160
+ * Transitions focus from a header/footer zone to the body data area.
161
+ * Selects the first or last row in the specified column, using either
162
+ * cell selection or block (range) selection depending on the grid config.
163
+ * Falls back to manual focus if restoreFocus() doesn't reach the cell
164
+ * (e.g., fixed columns outside .dhx_grid_data).
165
+ * @param grid - the grid instance
166
+ * @param colId - the column to focus in the body
167
+ * @param position - "first" to select the first row, "last" to select the last row
168
+ */
169
+ export declare function transitionToBody(grid: any, colId: string, position: "first" | "last"): void;
170
+ /**
171
+ * Transitions focus from the body data area to a header/footer zone.
172
+ * Resolves span targets and sets focus on the appropriate zone cell.
173
+ * @param grid - the grid instance
174
+ * @param zone - the target zone to transition to
175
+ * @param colId - the column to focus in the zone
176
+ * @param rowIndex - the row index in the zone (defaults to the last row)
177
+ */
178
+ export declare function transitionFromBodyToZone(grid: any, zone: FocusZone, colId: string, rowIndex?: number): void;
179
+ /**
180
+ * Checks if the active body cell is on the first data row.
181
+ * Works with both cell selection and block (range) selection modes.
182
+ * @param grid - the grid instance
183
+ * @returns true if the selection is on the first row or no selection exists
184
+ */
185
+ export declare function isAtFirstRow(grid: any): boolean;
186
+ /**
187
+ * Checks if the active body cell is on the last data row.
188
+ * For tree grids, considers the deepest last child as the last row.
189
+ * Works with both cell selection and block (range) selection modes.
190
+ * @param grid - the grid instance
191
+ * @returns true if the selection is on the last row or no selection exists
192
+ */
193
+ export declare function isAtLastRow(grid: any): boolean;
194
+ /**
195
+ * Checks if the grid has a footer zone with at least one row.
196
+ * @param grid - the grid instance
197
+ * @returns true if footer row count is greater than 0
198
+ */
199
+ export declare function hasFooter(grid: any): boolean;
200
+ /**
201
+ * Returns the column ID of the currently active body cell.
202
+ * Reads from range selection (xStart) or cell selection depending on config.
203
+ * @param grid - the grid instance
204
+ * @returns the active column ID, or null if no cell is selected
205
+ */
206
+ export declare function getActiveColumnId(grid: any): string | null;
207
+ /**
208
+ * Extracts the column ID from a DOM element's data-dhx-id attribute.
209
+ * @param target - the DOM element to read from
210
+ * @returns the column ID string, or null if the attribute is missing
211
+ */
212
+ export declare function getColIdFromTarget(target: HTMLElement): string | null;
213
+ /**
214
+ * Resets all zone cells and their inner elements to tabindex="-1".
215
+ * Called when leaving a zone to ensure the sentinel remains the sole Tab entry point.
216
+ * Also resets inner filter inputs/selects (including ComboFilter inputs
217
+ * that don't get tabindex via VDOM).
218
+ * @param grid - the grid instance
219
+ * @param zone - the zone whose cells should be reset
220
+ */
221
+ export declare function restoreZoneTabindex(grid: any, zone: FocusZone): void;
222
+ /**
223
+ * Initializes the start focus sentinel for the grid.
224
+ * Attaches a focus listener on the .dhx_grid-focus-sentinel element that redirects
225
+ * focus to the stored header cell position (or the first cell on initial entry).
226
+ * Validates the stored column and row index before focusing.
227
+ * Only runs once per grid instance (tracked via sentinelStateMap).
228
+ * @param grid - the grid instance
229
+ */
230
+ export declare function initFocusSentinel(grid: any): void;
231
+ /**
232
+ * Initializes the end focus sentinel for backward Tab entry.
233
+ * When Shift+Tab from outside the grid lands on the end sentinel,
234
+ * redirects focus to the footer's last cell, or to the header's first cell
235
+ * if the grid has no footer.
236
+ * Only runs once per sentinel element (tracked via data-dhx-initialized attribute).
237
+ * @param grid - the grid instance
238
+ */
239
+ export declare function initEndSentinel(grid: any): void;
@@ -67,6 +67,7 @@ export interface IBlockSelection {
67
67
  * This method is for internal use and should not be called directly
68
68
  */
69
69
  toHTML(): VNode | VNode[];
70
+ restoreFocus(): void;
70
71
  }
71
72
  export declare class BlockSelection implements IBlockSelection {
72
73
  config: IBlockSelectionConfig;
@@ -92,6 +93,7 @@ export declare class BlockSelection implements IBlockSelection {
92
93
  disable(): void;
93
94
  isDisabled(): boolean;
94
95
  destructor(): void;
96
+ restoreFocus(): void;
95
97
  toHTML(): VNode | null;
96
98
  private _calculateClippedGeometry;
97
99
  private _getAreaNode;
@@ -17,6 +17,8 @@ export interface ISelection {
17
17
  enable(): void;
18
18
  isSelectedCell(row: IRow | Id, column?: ICol | Id): boolean;
19
19
  toHTML(): VNode | VNode[];
20
+ /** @internal Restore browser focus */
21
+ restoreFocus(): void;
20
22
  }
21
23
  export declare enum GridSelectionEvents {
22
24
  beforeUnSelect = "beforeUnSelect",
@@ -38,6 +40,7 @@ export declare class Selection implements ISelection {
38
40
  private _gridId;
39
41
  private _selectedCell;
40
42
  private _selectedCells;
43
+ private _selectedSet;
41
44
  constructor(grid: IGrid | IProGrid, config?: ISelectionConfig, events?: IEventSystem<any>, gridId?: Id);
42
45
  setCell(row?: IRow | Id, col?: ICol | Id, ctrlUp?: boolean, shiftUp?: boolean): void;
43
46
  removeCell(rowId?: Id, colId?: Id): void;
@@ -45,8 +48,9 @@ export declare class Selection implements ISelection {
45
48
  getCells(): ICell[];
46
49
  disable(): void;
47
50
  enable(): void;
48
- toHTML(): VNode | VNode[];
49
51
  isSelectedCell(row: IRow | Id, column?: ICol | Id): boolean;
52
+ restoreFocus(): void;
53
+ toHTML(): VNode | VNode[];
50
54
  private _setCell;
51
55
  private _removeCell;
52
56
  private _removeCells;
@@ -54,5 +58,6 @@ export declare class Selection implements ISelection {
54
58
  private _toHTML;
55
59
  private _isUnselected;
56
60
  private _findIndex;
61
+ private _cellKey;
57
62
  private _setBrowserFocus;
58
63
  }
@@ -416,6 +416,7 @@ export interface ICol {
416
416
  };
417
417
  $uniqueData?: any[];
418
418
  $activeFilterData?: any[];
419
+ $index?: number;
419
420
  $width?: number;
420
421
  $fixedWidth?: boolean;
421
422
  $customOptions?: any;
@@ -11,6 +11,7 @@ export declare class CheckboxEditor implements IEditor {
11
11
  protected _checkbox: HTMLInputElement;
12
12
  protected _input: HTMLInputElement;
13
13
  protected _checked: boolean;
14
+ protected _parent: HTMLElement;
14
15
  constructor(row: IRow, col: ICol, config: IRendererConfig);
15
16
  endEdit(): void;
16
17
  toHTML(): any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dhtmlx/chart",
3
- "version": "9.3.4",
4
- "description": "DHTMLX Chart JavaScript chart library with 11 chart types, mixed charts, real-time updates, and deep customization",
3
+ "version": "9.3.5",
4
+ "description": "DHTMLX Chart - JavaScript chart library. GPL v2 edition for GPL-compatible open-source projects; commercial licenses are available for proprietary and production use.",
5
5
  "keywords": ["dhtmlx","chart","charts","graph","visualization","javascript","typescript"],
6
6
  "homepage":"https://docs.dhtmlx.com/suite/chart/",
7
7
  "license": "GPL-2.0-only",
package/whatsnew.txt CHANGED
@@ -1,3 +1,6 @@
1
+ Version 9.3.5 (July 1, 2026)
2
+ ----------------------------
3
+
1
4
  Version 9.3.4 (June 2, 2026)
2
5
  ----------------------------
3
6