sheet-happens 0.0.43 → 0.0.45
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/autosize.d.ts +2 -2
- package/dist/clipboard.d.ts +20 -4
- package/dist/constants.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +728 -399
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +728 -399
- package/dist/index.modern.js.map +1 -1
- package/dist/keyboard.d.ts +8 -0
- package/dist/mouse.d.ts +1 -1
- package/dist/props.d.ts +4 -2
- package/dist/render.d.ts +3 -3
- package/dist/sheet.d.ts +11 -5
- package/dist/style.d.ts +0 -1
- package/dist/types.d.ts +10 -4
- package/package.json +1 -1
package/dist/autosize.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RowOrColumnPropertyFunction, CellPropertyFunction, CellContentType, Style } from './types';
|
|
2
|
-
export declare const useAutoSizeColumn: (rows: number[], displayData:
|
|
1
|
+
import { RowOrColumnPropertyFunction, RowOrColumnPropertyStyledFunction, CellPropertyFunction, CellPropertyStyledFunction, CellContentType, Style } from './types';
|
|
2
|
+
export declare const useAutoSizeColumn: (rows: number[], displayData: CellPropertyStyledFunction<CellContentType>, cellStyle: CellPropertyFunction<Style>, columnHeaders: RowOrColumnPropertyStyledFunction<CellContentType>, columnHeaderStyle: RowOrColumnPropertyFunction<Style>, canvasWidth: number) => (x: number) => number;
|
package/dist/clipboard.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import { CellPropertyFunction, Change, Rectangle } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ClipboardPayload, CellPropertyFunction, Change, Rectangle } from './types';
|
|
2
|
+
export declare type ClipboardTable<T = any> = {
|
|
3
|
+
rows: string[][];
|
|
4
|
+
payload?: ClipboardPayload<T>;
|
|
5
|
+
};
|
|
6
|
+
export declare const useClipboardTable: () => {
|
|
7
|
+
peek: ClipboardTable<any> | null | undefined;
|
|
8
|
+
canPaste: () => boolean;
|
|
9
|
+
copyTable: (rows: string[][], payload?: ClipboardPayload<any> | null | undefined) => Promise<void>;
|
|
10
|
+
pasteTable: () => Promise<ClipboardTable<any> | null | undefined>;
|
|
11
|
+
};
|
|
12
|
+
export declare const useClipboardAPI: <T = any>(selection: Rectangle, editData: CellPropertyFunction<string>, cellReadOnly: CellPropertyFunction<boolean>, addListener: boolean, onSelectionChange?: ((selection: Rectangle) => void) | undefined, onChange?: ((changes: Change[]) => void) | undefined, onCopy?: ((selection: Rectangle, rows: string[][], cut: boolean) => ClipboardPayload<T> | null | undefined) | undefined, onPaste?: ((selection: Rectangle, rows: string[][], payload?: ClipboardPayload<T> | undefined) => boolean | null | undefined | Promise<boolean | null | undefined>) | undefined) => {
|
|
13
|
+
clipboardApi: {
|
|
14
|
+
copySelection: (selection: Rectangle, cut?: boolean) => Promise<void>;
|
|
15
|
+
pasteSelection: (selection: Rectangle) => Promise<void>;
|
|
16
|
+
canPasteSelection: () => boolean;
|
|
17
|
+
};
|
|
18
|
+
onClipboardCopy: (cut: boolean) => Promise<void> | undefined;
|
|
19
|
+
onClipboardPaste: (e: any) => Promise<void>;
|
|
20
|
+
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { XY, Rectangle, Selection, Clickable, Direction, Style } from './types';
|
|
|
2
2
|
export declare const INITIAL_MAX_SCROLL: XY;
|
|
3
3
|
export declare const ORIGIN: XY;
|
|
4
4
|
export declare const ONE_ONE: XY;
|
|
5
|
+
export declare const NEG_NEG: XY;
|
|
5
6
|
export declare const NO_CELL: XY;
|
|
6
7
|
export declare const NO_SELECTION: Rectangle;
|
|
7
8
|
export declare const NO_SELECTIONS: Selection[];
|
|
8
9
|
export declare const NO_CLICKABLES: Clickable[];
|
|
9
10
|
export declare const NO_STYLE: {};
|
|
10
|
-
export declare const MAX_SEARCHABLE_INDEX =
|
|
11
|
-
export declare const MAX_XY: XY;
|
|
11
|
+
export declare const MAX_SEARCHABLE_INDEX = 100000;
|
|
12
12
|
export declare const COLORS: {
|
|
13
13
|
selectionBorder: string;
|
|
14
14
|
selectionBackground: string;
|