export default class GridData extends TableData { constructor(displayObject: any, role: any, domIdPrefix: any); /** * hierarchical level of the grid within other structures * @access public * @param {Number} val - aria-level is an integer greater than or equal to 1 */ set level(arg: number); /** * hierarchical level of the grid within other structures * @access public * @param {Number} val - aria-level is an integer greater than or equal to 1 */ get level(): number; /** * user may select more then one item from the current grid * @access public * @param {boolean} val - aria-multiselectable is set to true, multiple items * in the grid can be selected. The default value is false */ set multiselectable(arg: boolean); /** * The user may select more then one item from the current grid * @access public * @param {boolean} val - aria-multiselectable is set to true, multiple items * in the grid can be selected. The default value is false */ get multiselectable(): boolean; /** * Sets whether the grid is editable or not * @access public * @param {boolean} value - true if the element should be read only, false for read and editable */ set readOnly(arg: boolean); /** * Retrieves whether the grid is editable or not * @access public * @returns {boolean} true if the element should be read only, false for read and editable */ get readOnly(): boolean; /** * @inheritdoc */ _onKeyDown(evt: any): void; /** * Handles updating the target data when the up arrow key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataUp(targetData: TargetData): boolean; /** * Handles updating the target data when the down arrow key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataDown(targetData: TargetData): boolean; /** * Handles updating the target data when the left arrow key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataLeft(targetData: TargetData): boolean; /** * Handles updating the target data when the right arrow key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataRight(targetData: TargetData): boolean; /** * Handles updating the target data when the home key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataHome(targetData: TargetData): boolean; /** * Handles updating the target data when the end key is pressed * @access protected * * @param {!TargetData} targetData - target data to update/mutate for which * DisplayObject has focus vs which should get focus as a result of the * keystroke * @returns {boolean} true if focus should potentially be moved, * false if potentially moving focus should be skipped (e.g. the treegrid * emitting an event to handle expanding/collapsing a row instead of moving * focus) */ _updateTargetDataEnd(targetData: TargetData): boolean; /** * For targetData that has been updated based on which keycode was pressed, * this finds the DisplayObject that should get focus next. * @access protected * * @param {!TargetData} targetData - the updated target data based on what * currently has focus and which key was pressed * @returns {?createjs.DisplayObject} the DisplayObject that should receive * focus. null if there is no DisplayObject that focus should move to. */ _findNextTarget(targetData: TargetData): createjs.DisplayObject | null; /** * Sends focus to the specified target, along with updating the tabIndex of the * target and the DisplayObject that currently has focus in order to maintain * proper tab order according to WAI-ARIA practices. * @access private * * @param {?createjs.DisplayObject} nextTarget - DisplayObject to send focus to. * null if focus should not be moved. * @param {!TargetData} targetData - target data convering the DisplayObject * that previously had focused and where focus should move to within the grid * @param {!SyntheticEvent} evt - React event */ _focusToNextTarget(nextTarget: createjs.DisplayObject | null, targetData: TargetData, evt: SyntheticEvent): void; /** * Converts the element that currently has focus to TargetData describing is * position within the grid. * @access protected * * @param {!DOMElement} elem - element that currently has focus * @returns {?TargetData} target data for the DisplayObject that currently has * focus. null if there is no match. */ _focusableElemToTargetData(elem: DOMElement): TargetData | null; /** * Searches a table section for the DisplayObject whose AccessibilityObject domId * matches the specified id. * @access protected * * @param {!string} id - id to search for * @param {createjs.DisplayObject} tableSectionDisplayObject - DisplayObject * for the table section to search * @param {Number} sectionIndex - index of which table section to search * @returns {?TargetData} target data for the DisplayObject that currently has * focus. null if there is no match. */ _searchSection(id: string, tableSectionDisplayObject: createjs.DisplayObject, sectionIndex: number): TargetData | null; /** * Searches a row for the DisplayObject whose AccessibilityObject domId * matches the specified id. * @access protected * * @param {!string} id - id to search for * @param {createjs.DisplayObject} rowDisplayObject - DisplayObject * for the row to search * @param {Number} sectionIndex - index of which table section is being searched * @param {Number} rowIndex - index of which row to search * @returns {?TargetData} target data for the DisplayObject that currently has * focus. null if there is no match. */ _searchRow(id: string, rowDisplayObject: createjs.DisplayObject, sectionIndex: number, rowIndex: number): TargetData | null; /** * Searches a cell for the DisplayObject whose AccessibilityObject domId * matches the specified id. * @access protected * * @param {!string} id - id to search for * @param {createjs.DisplayObject} cellDisplayObject - DisplayObject * for the cell to search * @param {Number} sectionIndex - index of which table section is being searched * @param {Number} rowIndex - index of which row being search * @param {Number} colIndex - index of which column to search * @returns {?TargetData} target data for the DisplayObject that currently has * focus. null if there is no match. */ _searchCell(id: string, cellDisplayObject: createjs.DisplayObject, sectionIndex: number, rowIndex: number, colIndex: number): TargetData | null; } export type TargetData = { /** * - DisplayObject that currently * has focus */ displayObject: createjs.DisplayObject; /** * - index into the GridData's children array for * which section of the table contains the DisplayObject that currently or should * receive focus */ sectionIndex: number; /** * - index into the table section's AccessibilityObject * children array for which row contains the DisplayObject that currently or should * receive focus */ rowIndex: number; /** * - index into the row's AccessibilityObject children * array for which table cell either has or contains the DIsplayObject that * currently or should receive focus. -1 if the row itself has or should receive * focus (this value is only applicable to treegrid role). */ colIndex: number; /** * - index into the cell's AccessibilityObject * children array for which has focus. -1 if the cell itself has focus, which * should only occur in the case of the cell having a tabIndex set and therefore * this child elements should not be focusable. */ cellChildIndex: number; /** * - For TreeGridData if rowIndex might * have been changed, the index of the row that contains or is the item that * currently has focus. Otherwise, undefined. */ currFocusRowIndex: number | null; /** * - For TreeGridData if rowIndex might * have been changed, the index of the section that contains or is the item that * currently has focus. Otherwise, undefined. */ currFocusSectionIndex: number | null; }; import TableData from "./TableData";