streaksheet
Advanced tools
Comparing version 0.8.35 to 0.8.36
@@ -147,2 +147,3 @@ import * as React from 'react'; | ||
export interface StreakSheetRef<T, C extends ComponentType<CellProps<T>>> { | ||
clearCellSelection(): void; | ||
enterEditMode(sectionKey: string, columnKey: string, rowKey: string, queuedValue?: any): void; | ||
@@ -149,0 +150,0 @@ expandGroupBar(): void; |
@@ -530,17 +530,17 @@ "use strict"; | ||
return { | ||
clearCellSelection: function clearCellSelection() { | ||
updateSelection({ | ||
type: 'CLEAR', | ||
keepAnchor: false | ||
}); | ||
}, | ||
enterEditMode: function enterEditMode(sectionKey, columnKey, rowKey, queuedValue) { | ||
var cellIndexes = cellKeysToIndexes({ | ||
type: 'ROW_DATA_CELL', | ||
columnKey: columnKey, | ||
sectionKey: sectionKey, | ||
rowKey: rowKey | ||
}); | ||
if (!cellIndexes) { | ||
throw new Error('invalid rowKeys provided'); | ||
} | ||
updateSelection({ | ||
type: 'MOVE_TO_CELL', | ||
cellIndexes: cellIndexes | ||
type: 'MOVE_TO_CELL_KEYS', | ||
cellKeys: { | ||
type: 'ROW_DATA_CELL', | ||
sectionKey: sectionKey, | ||
rowKey: rowKey, | ||
columnKey: columnKey | ||
} | ||
}); | ||
@@ -547,0 +547,0 @@ setCellBeingEdited({ |
import { ColumnInfo, Section } from '.'; | ||
import { CellIndexes, CellRegion } from './internalTypes'; | ||
import { CellIndexes, CellKeys, CellRegion } from './internalTypes'; | ||
import SectionRelativeRowMatcher from './SectionRelativeRowMatcher'; | ||
@@ -58,4 +58,7 @@ import { CellDataMappers } from './useCellDataMappers'; | ||
}; | ||
declare type CellSelectionAction = PrimitiveCellSelectionAction | AdvancedCellSelectionAction; | ||
declare type CellSelectionAction = PrimitiveCellSelectionAction | AdvancedCellSelectionAction | { | ||
type: 'MOVE_TO_CELL_KEYS'; | ||
cellKeys: CellKeys; | ||
}; | ||
export declare function useCellSelection<T>(mappers: CellDataMappers<T>, columns: ColumnInfo[], sections: Section[], getEffectiveSectionRowCount: (section: Section) => number, matcher: SectionRelativeRowMatcher, doesCellHaveData?: (rowKey: string, sectionKey: string, columnKey: string, data: T) => boolean): CellSelectionManager; | ||
export {}; |
@@ -83,2 +83,10 @@ "use strict"; | ||
switch (action.type) { | ||
case 'MOVE_TO_CELL_KEYS': | ||
{ | ||
return [{ | ||
start: action.cellKeys, | ||
end: action.cellKeys | ||
}]; | ||
} | ||
case 'EXPAND_DOWN': | ||
@@ -85,0 +93,0 @@ case 'EXPAND_LEFT': |
{ | ||
"name": "streaksheet", | ||
"version": "0.8.35", | ||
"version": "0.8.36", | ||
"author": "Chris Cowan <agentme49@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
814254
7180