sheet-happens 0.0.37 → 0.0.39

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/dist/mouse.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CellLayout, CellPropertyFunction, Change, Clickable, Rectangle, RowOrColumnPropertyFunction, SheetMouseEvent, SheetStyle, VisibleLayout, XY } from './types';
2
2
  import { MouseEvent, PointerEvent, RefObject } from 'react';
3
- export declare const useMouse: (hitmapRef: RefObject<Clickable[]>, selection: Rectangle, knobArea: Rectangle | null, editMode: boolean, editData: CellPropertyFunction<string>, sourceData: CellPropertyFunction<string | number | null>, cellReadOnly: CellPropertyFunction<boolean | null>, canSizeColumn: RowOrColumnPropertyFunction<boolean | null>, canSizeRow: RowOrColumnPropertyFunction<boolean | null>, canOrderColumn: RowOrColumnPropertyFunction<boolean | null>, canOrderRow: RowOrColumnPropertyFunction<boolean | null>, cellLayout: CellLayout, visibleCells: VisibleLayout, sheetStyle: SheetStyle, columnGroupKeys: RowOrColumnPropertyFunction<string | number | null>, rowGroupKeys: RowOrColumnPropertyFunction<string | number | null>, onEdit?: ((cell: XY) => void) | undefined, onCommit?: (() => void) | undefined, onKnobAreaChange?: ((knobArea: Rectangle | null) => void) | undefined, onDragOffsetChange?: ((dragOffset: XY | null) => void) | undefined, onDropTargetChange?: ((selection: Rectangle | null) => void) | undefined, onSelectionChange?: ((selection: Rectangle, scrollTo?: boolean | undefined, toHead?: boolean | undefined, dragOperation?: boolean | undefined) => void) | undefined, onInvalidateColumn?: ((column: number) => void) | undefined, onInvalidateRow?: ((row: number) => void) | undefined, onChange?: ((changes: Change[]) => void) | undefined, onColumnOrderChange?: ((indices: number[], order: number) => void) | undefined, onRowOrderChange?: ((indices: number[], order: number) => void) | undefined, onCellWidthChange?: ((indices: number[], value: number) => void) | undefined, onCellHeightChange?: ((indices: number[], value: number) => void) | undefined, onRightClick?: ((e: SheetMouseEvent) => void) | undefined, dontCommitEditOnSelectionChange?: boolean | undefined) => {
3
+ export declare const useMouse: (hitmapRef: RefObject<Clickable[]>, selection: Rectangle, knobArea: Rectangle | null, editMode: boolean, editData: CellPropertyFunction<string>, sourceData: CellPropertyFunction<string | number | null>, cellReadOnly: CellPropertyFunction<boolean | null>, canSizeColumn: RowOrColumnPropertyFunction<boolean | null>, canSizeRow: RowOrColumnPropertyFunction<boolean | null>, canOrderColumn: RowOrColumnPropertyFunction<boolean | null>, canOrderRow: RowOrColumnPropertyFunction<boolean | null>, cellLayout: CellLayout, visibleCells: VisibleLayout, sheetStyle: SheetStyle, columnGroupKeys: RowOrColumnPropertyFunction<string | number | null>, rowGroupKeys: RowOrColumnPropertyFunction<string | number | null>, selectedColumnGroups: Set<string | number | null> | null, selectedRowGroups: Set<string | number | null> | null, onEdit?: ((cell: XY) => void) | undefined, onCommit?: (() => void) | undefined, onKnobAreaChange?: ((knobArea: Rectangle | null) => void) | undefined, onDragIndicesChange?: ((indices: [number[] | null, number[] | null]) => void) | undefined, onDragOffsetChange?: ((dragOffset: XY | null) => void) | undefined, onDropTargetChange?: ((selection: Rectangle | null) => void) | undefined, onSelectionChange?: ((selection: Rectangle, scrollTo?: boolean | undefined, toHead?: boolean | undefined) => void) | undefined, onInvalidateColumn?: ((column: number) => void) | undefined, onInvalidateRow?: ((row: number) => void) | undefined, onChange?: ((changes: Change[]) => void) | undefined, onColumnOrderChange?: ((indices: number[], order: number) => void) | undefined, onRowOrderChange?: ((indices: number[], order: number) => void) | undefined, onCellWidthChange?: ((indices: number[], value: number) => void) | undefined, onCellHeightChange?: ((indices: number[], value: number) => void) | undefined, onRightClick?: ((e: SheetMouseEvent) => void) | undefined, dontCommitEditOnSelectionChange?: boolean | undefined, dontChangeSelectionOnOrderChange?: boolean | undefined) => {
4
4
  knobPosition: XY | null;
5
5
  mouseHandlers: {
6
6
  onPointerLeave: () => void;
package/dist/render.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { CellLayout, CellPropertyFunction, RowOrColumnPropertyFunction, InternalSheetStyle, Rectangle, Selection, Clickable, Style, CellContentType, VisibleLayout, XY } from './types';
2
- export declare const renderSheet: (context: CanvasRenderingContext2D, cellLayout: CellLayout, visibleCells: VisibleLayout, sheetStyle: InternalSheetStyle, cellStyle: CellPropertyFunction<Style>, selection: Rectangle, secondarySelections: Selection[], knobPosition: XY | null, knobArea: Rectangle | null, dragOffset: XY | null, dropTarget: Rectangle | null, columnHeaders: RowOrColumnPropertyFunction<CellContentType>, columnHeaderStyle: RowOrColumnPropertyFunction<Style>, displayData: CellPropertyFunction<CellContentType>, dataOffset: XY) => Clickable[];
2
+ export declare const renderSheet: (context: CanvasRenderingContext2D, cellLayout: CellLayout, visibleCells: VisibleLayout, sheetStyle: InternalSheetStyle, cellStyle: CellPropertyFunction<Style>, selection: Rectangle, secondarySelections: Selection[], knobPosition: XY | null, knobArea: Rectangle | null, dragIndices: [number[] | null, number[] | null], dragOffset: XY | null, dropTarget: Rectangle | null, columnHeaders: RowOrColumnPropertyFunction<CellContentType>, columnHeaderStyle: RowOrColumnPropertyFunction<Style>, displayData: CellPropertyFunction<CellContentType>, columnGroupKeys: RowOrColumnPropertyFunction<string | number | null>, rowGroupKeys: RowOrColumnPropertyFunction<string | number | null>, selectedColumnGroups: Set<string | number | null> | null, selectedRowGroups: Set<string | number | null> | null, dataOffset: XY) => Clickable[];
3
3
  export declare const renderCell: (context: CanvasRenderingContext2D, cellContent: CellContentType, style: Style, defaultCellStyle: Required<Style>, xCoord: number, yCoord: number, cellWidth: number, cellHeight: number) => Clickable[];
package/dist/sheet.d.ts CHANGED
@@ -35,6 +35,7 @@ export declare type SheetProps = {
35
35
  secondarySelections?: Selection[];
36
36
  cacheLayout?: boolean | number;
37
37
  dontCommitEditOnSelectionChange?: boolean;
38
+ dontChangeSelectionOnOrderChange?: boolean;
38
39
  inputComponent?: (x: number, y: number, props: SheetInputProps, commitEditingCell?: (value?: string | number | null) => void) => ReactElement | undefined;
39
40
  renderInside?: (props: SheetRenderProps) => React.ReactNode;
40
41
  renderOutside?: (props: SheetRenderProps) => React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sheet-happens",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "React Spreadsheet",
5
5
  "author": "Luka-M",
6
6
  "license": "MIT",