@rowsncolumns/grid 9.0.4 → 13.2.32
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/LICENSE.md +100 -0
- package/Readme.md +53 -59
- package/dist/cjs/Cell.d.ts +35 -0
- package/dist/cjs/Cell.d.ts.map +1 -0
- package/dist/cjs/Cell.js +29 -0
- package/dist/{CellOverlay.d.ts → cjs/CellOverlay.d.ts} +5 -5
- package/dist/cjs/CellOverlay.d.ts.map +1 -0
- package/dist/cjs/CellOverlay.js +126 -0
- package/dist/cjs/Context.d.ts +8 -0
- package/dist/cjs/Context.d.ts.map +1 -0
- package/dist/cjs/Context.js +13 -0
- package/dist/{FillHandle.d.ts → cjs/FillHandle.d.ts} +2 -1
- package/dist/cjs/FillHandle.d.ts.map +1 -0
- package/dist/cjs/FillHandle.js +26 -0
- package/dist/cjs/Grid.d.ts +558 -0
- package/dist/cjs/Grid.d.ts.map +1 -0
- package/dist/cjs/Grid.js +2446 -0
- package/dist/{GridLine.d.ts → cjs/GridLine.d.ts} +2 -1
- package/dist/cjs/GridLine.d.ts.map +1 -0
- package/dist/cjs/GridLine.js +10 -0
- package/dist/cjs/Image.d.ts +11 -0
- package/dist/cjs/Image.d.ts.map +1 -0
- package/dist/cjs/Image.js +57 -0
- package/dist/cjs/MemoizedGrid.d.ts +49 -0
- package/dist/cjs/MemoizedGrid.d.ts.map +1 -0
- package/dist/cjs/MemoizedGrid.js +105 -0
- package/dist/cjs/Selection.d.ts +5 -0
- package/dist/cjs/Selection.d.ts.map +1 -0
- package/dist/cjs/Selection.js +10 -0
- package/dist/{helpers.d.ts → cjs/helpers.d.ts} +59 -39
- package/dist/cjs/helpers.d.ts.map +1 -0
- package/dist/cjs/helpers.js +1409 -0
- package/dist/{hooks → cjs/hooks}/useCopyPaste.d.ts +3 -2
- package/dist/cjs/hooks/useCopyPaste.d.ts.map +1 -0
- package/dist/cjs/hooks/useCopyPaste.js +230 -0
- package/dist/{hooks → cjs/hooks}/useEditable.d.ts +21 -8
- package/dist/cjs/hooks/useEditable.d.ts.map +1 -0
- package/dist/cjs/hooks/useEditable.js +491 -0
- package/dist/{hooks → cjs/hooks}/useFilter.d.ts +3 -2
- package/dist/cjs/hooks/useFilter.d.ts.map +1 -0
- package/dist/cjs/hooks/useFilter.js +97 -0
- package/dist/{hooks → cjs/hooks}/useImage.d.ts +1 -0
- package/dist/cjs/hooks/useImage.d.ts.map +1 -0
- package/dist/cjs/hooks/useImage.js +80 -0
- package/dist/{hooks → cjs/hooks}/usePagination.d.ts +3 -2
- package/dist/cjs/hooks/usePagination.d.ts.map +1 -0
- package/dist/cjs/hooks/usePagination.js +53 -0
- package/dist/{hooks → cjs/hooks}/useSizer.d.ts +28 -29
- package/dist/cjs/hooks/useSizer.d.ts.map +1 -0
- package/dist/cjs/hooks/useSizer.js +176 -0
- package/dist/{hooks → cjs/hooks}/useTooltip.d.ts +2 -1
- package/dist/cjs/hooks/useTooltip.d.ts.map +1 -0
- package/dist/cjs/hooks/useTooltip.js +82 -0
- package/dist/{hooks → cjs/hooks}/useUndo.d.ts +2 -1
- package/dist/cjs/hooks/useUndo.d.ts.map +1 -0
- package/dist/cjs/hooks/useUndo.js +87 -0
- package/dist/cjs/index.d.ts +19 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +29 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/{types.d.ts → cjs/types.d.ts} +8 -3
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/{types.js → cjs/types.js} +7 -8
- package/dist/cjs/utils.d.ts +9 -0
- package/dist/cjs/utils.d.ts.map +1 -0
- package/dist/cjs/utils.js +58 -0
- package/dist/cjs/vitest.config.d.ts +3 -0
- package/dist/cjs/vitest.config.d.ts.map +1 -0
- package/dist/cjs/vitest.config.js +24 -0
- package/dist/esm/Cell.d.ts +35 -0
- package/dist/esm/Cell.d.ts.map +1 -0
- package/dist/esm/Cell.js +24 -0
- package/dist/esm/CellOverlay.d.ts +21 -0
- package/dist/esm/CellOverlay.d.ts.map +1 -0
- package/dist/esm/CellOverlay.js +120 -0
- package/dist/esm/Context.d.ts +8 -0
- package/dist/esm/Context.d.ts.map +1 -0
- package/dist/esm/Context.js +9 -0
- package/dist/esm/FillHandle.d.ts +8 -0
- package/dist/esm/FillHandle.d.ts.map +1 -0
- package/dist/{FillHandle.js → esm/FillHandle.js} +5 -11
- package/dist/esm/Grid.d.ts +558 -0
- package/dist/esm/Grid.d.ts.map +1 -0
- package/dist/esm/Grid.js +2451 -0
- package/dist/esm/GridLine.d.ts +5 -0
- package/dist/esm/GridLine.d.ts.map +1 -0
- package/dist/esm/GridLine.js +7 -0
- package/dist/esm/Image.d.ts +11 -0
- package/dist/esm/Image.d.ts.map +1 -0
- package/dist/esm/Image.js +53 -0
- package/dist/esm/MemoizedGrid.d.ts +49 -0
- package/dist/esm/MemoizedGrid.d.ts.map +1 -0
- package/dist/esm/MemoizedGrid.js +98 -0
- package/dist/esm/Selection.d.ts +5 -0
- package/dist/esm/Selection.d.ts.map +1 -0
- package/dist/esm/Selection.js +7 -0
- package/dist/esm/helpers.d.ts +281 -0
- package/dist/esm/helpers.d.ts.map +1 -0
- package/dist/esm/helpers.js +1260 -0
- package/dist/esm/hooks/useCopyPaste.d.ts +53 -0
- package/dist/esm/hooks/useCopyPaste.d.ts.map +1 -0
- package/dist/{hooks → esm/hooks}/useCopyPaste.js +40 -46
- package/dist/esm/hooks/useEditable.d.ts +253 -0
- package/dist/esm/hooks/useEditable.d.ts.map +1 -0
- package/dist/esm/hooks/useEditable.js +482 -0
- package/dist/esm/hooks/useFilter.d.ts +69 -0
- package/dist/esm/hooks/useFilter.d.ts.map +1 -0
- package/dist/{hooks → esm/hooks}/useFilter.js +22 -42
- package/dist/esm/hooks/useImage.d.ts +13 -0
- package/dist/esm/hooks/useImage.d.ts.map +1 -0
- package/dist/esm/hooks/useImage.js +76 -0
- package/dist/esm/hooks/usePagination.d.ts +69 -0
- package/dist/esm/hooks/usePagination.d.ts.map +1 -0
- package/dist/esm/hooks/usePagination.js +47 -0
- package/dist/esm/hooks/useSizer.d.ts +114 -0
- package/dist/esm/hooks/useSizer.d.ts.map +1 -0
- package/dist/esm/hooks/useSizer.js +176 -0
- package/dist/esm/hooks/useTooltip.d.ts +43 -0
- package/dist/esm/hooks/useTooltip.d.ts.map +1 -0
- package/dist/esm/hooks/useTooltip.js +80 -0
- package/dist/esm/hooks/useUndo.d.ts +36 -0
- package/dist/esm/hooks/useUndo.d.ts.map +1 -0
- package/dist/{hooks → esm/hooks}/useUndo.js +16 -25
- package/dist/esm/index.d.ts +19 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/esm/types.d.ts +70 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +68 -0
- package/dist/esm/utils.d.ts +9 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +104 -0
- package/dist/esm/vitest.config.d.ts +3 -0
- package/dist/esm/vitest.config.d.ts.map +1 -0
- package/dist/esm/vitest.config.js +22 -0
- package/package.json +28 -29
- package/dist/Cell.d.ts +0 -23
- package/dist/Cell.js +0 -55
- package/dist/Cell.js.map +0 -1
- package/dist/CellOverlay.js +0 -116
- package/dist/CellOverlay.js.map +0 -1
- package/dist/FillHandle.js.map +0 -1
- package/dist/Grid.d.ts +0 -385
- package/dist/Grid.js +0 -1684
- package/dist/Grid.js.map +0 -1
- package/dist/GridLine.js +0 -13
- package/dist/GridLine.js.map +0 -1
- package/dist/Image.d.ts +0 -8
- package/dist/Image.js +0 -50
- package/dist/Image.js.map +0 -1
- package/dist/Selection.d.ts +0 -4
- package/dist/Selection.js +0 -9
- package/dist/Selection.js.map +0 -1
- package/dist/helpers.js +0 -1033
- package/dist/helpers.js.map +0 -1
- package/dist/hooks/useCopyPaste.js.map +0 -1
- package/dist/hooks/useEditable.js +0 -477
- package/dist/hooks/useEditable.js.map +0 -1
- package/dist/hooks/useFilter.js.map +0 -1
- package/dist/hooks/useImage.js +0 -42
- package/dist/hooks/useImage.js.map +0 -1
- package/dist/hooks/usePagination.js +0 -73
- package/dist/hooks/usePagination.js.map +0 -1
- package/dist/hooks/useSelection.d.ts +0 -175
- package/dist/hooks/useSelection.js +0 -982
- package/dist/hooks/useSelection.js.map +0 -1
- package/dist/hooks/useSizer.js +0 -150
- package/dist/hooks/useSizer.js.map +0 -1
- package/dist/hooks/useTooltip.js +0 -106
- package/dist/hooks/useTooltip.js.map +0 -1
- package/dist/hooks/useTouch.d.ts +0 -21
- package/dist/hooks/useTouch.js +0 -73
- package/dist/hooks/useTouch.js.map +0 -1
- package/dist/hooks/useUndo.js.map +0 -1
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -61
- package/dist/index.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -8
- package/dist/utils.js +0 -153
- package/dist/utils.js.map +0 -1
- package/src/Cell.tsx +0 -100
- package/src/CellOverlay.tsx +0 -191
- package/src/FillHandle.tsx +0 -37
- package/src/Grid.tsx +0 -2677
- package/src/GridLine.tsx +0 -23
- package/src/Image.tsx +0 -43
- package/src/Selection.tsx +0 -9
- package/src/helpers.ts +0 -1455
- package/src/hooks/useCopyPaste.ts +0 -265
- package/src/hooks/useEditable.tsx +0 -945
- package/src/hooks/useFilter.tsx +0 -233
- package/src/hooks/useImage.ts +0 -57
- package/src/hooks/usePagination.tsx +0 -153
- package/src/hooks/useSelection.ts +0 -1440
- package/src/hooks/useSizer.ts +0 -312
- package/src/hooks/useTooltip.tsx +0 -172
- package/src/hooks/useTouch.ts +0 -116
- package/src/hooks/useUndo.ts +0 -134
- package/src/index.tsx +0 -46
- package/src/tests/Grid.spec.tsx +0 -47
- package/src/tests/helpers.test.ts +0 -292
- package/src/tests/usePagination.test.ts +0 -28
- package/src/tests/useSelection.test.ts +0 -27
- package/src/tests/useUndo.test.ts +0 -73
- package/src/types.ts +0 -69
- package/src/utils.tsx +0 -287
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridLine.d.ts","sourceRoot":"","sources":["../../GridLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiBnC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
var react_konva_1 = require("react-konva");
|
|
6
|
+
var GridLine = function (props) {
|
|
7
|
+
var points = props.points, stroke = props.stroke, strokeWidth = props.strokeWidth, offsetY = props.offsetY, offsetX = props.offsetX;
|
|
8
|
+
return (react_1.default.createElement(react_konva_1.Line, { points: points, stroke: stroke, strokeWidth: strokeWidth, offsetY: offsetY, offsetX: offsetX, shadowForStrokeEnabled: false, strokeScaleEnabled: false, hitStrokeWidth: 0, listening: false, perfectDrawEnabled: false, lineCap: "square" }));
|
|
9
|
+
};
|
|
10
|
+
exports.default = GridLine;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ShapeConfig } from "konva/lib/Shape";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface ImageProps extends ShapeConfig {
|
|
4
|
+
url: string;
|
|
5
|
+
spacing?: number;
|
|
6
|
+
horizontalAlignment?: "left" | "right" | "center";
|
|
7
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
8
|
+
enableCache?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Image: React.MemoExoticComponent<(props: ImageProps) => React.JSX.Element | null>;
|
|
11
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAA2C,MAAM,OAAO,CAAC;AAMhE,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClD,iBAAiB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,KAAK,oCAAgB,UAAU,8BA4D1C,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Image = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
var react_konva_1 = require("react-konva");
|
|
7
|
+
var useImage_1 = tslib_1.__importDefault(require("./hooks/useImage"));
|
|
8
|
+
exports.Image = (0, react_1.memo)(function (props) {
|
|
9
|
+
var url = props.url, _a = props.spacing, spacing = _a === void 0 ? 1 : _a, horizontalAlignment = props.horizontalAlignment, verticalAlignment = props.verticalAlignment, _b = props.width, containerWidth = _b === void 0 ? 0 : _b, _c = props.height, containerHeight = _c === void 0 ? 0 : _c, _d = props.enableCache, enableCache = _d === void 0 ? false : _d, rest = tslib_1.__rest(props, ["url", "spacing", "horizontalAlignment", "verticalAlignment", "width", "height", "enableCache"]);
|
|
10
|
+
var _e = props.width, width = _e === void 0 ? 0 : _e, _f = props.height, height = _f === void 0 ? 0 : _f, _g = props.x, x = _g === void 0 ? 0 : _g, _h = props.y, y = _h === void 0 ? 0 : _h;
|
|
11
|
+
var imageRef = (0, react_1.useRef)(null);
|
|
12
|
+
var _j = (0, useImage_1.default)({
|
|
13
|
+
url: url,
|
|
14
|
+
}), image = _j.image, imageWidth = _j.width, imageHeight = _j.height, status = _j.status;
|
|
15
|
+
var aspectRatio = (0, react_1.useMemo)(function () {
|
|
16
|
+
return Math.min((width - spacing) / imageWidth, (height - spacing) / imageHeight);
|
|
17
|
+
}, [imageWidth, imageHeight, width, height, spacing]);
|
|
18
|
+
x = x + spacing;
|
|
19
|
+
y = y + spacing;
|
|
20
|
+
width = Math.min(imageWidth, aspectRatio * imageWidth);
|
|
21
|
+
height = Math.min(imageHeight, aspectRatio * imageHeight);
|
|
22
|
+
(0, react_1.useEffect)(function () {
|
|
23
|
+
if (enableCache && imageRef.current) {
|
|
24
|
+
imageRef.current.cache();
|
|
25
|
+
}
|
|
26
|
+
// `image` must be a dependency: when `url` swaps between already-loaded images (an AOP chip's
|
|
27
|
+
// ic-flow → ic-session on completion), the shared image cache answers synchronously — `status`
|
|
28
|
+
// stays "loaded" and the dimensions are unchanged, so without it the Konva node keeps blitting
|
|
29
|
+
// the PREVIOUS icon's cached bitmap (scene graph updated, canvas stale) until a full remount.
|
|
30
|
+
}, [enableCache, status, width, height, image]);
|
|
31
|
+
if (status !== "loaded") {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
x = x + getHorizontalOffset(horizontalAlignment, containerWidth, width);
|
|
35
|
+
y = y + getVerticalOffset(verticalAlignment, containerHeight, height);
|
|
36
|
+
return (react_1.default.createElement(react_konva_1.Image, tslib_1.__assign({ ref: imageRef }, rest, { x: x, y: y, height: height, width: width, image: image })));
|
|
37
|
+
});
|
|
38
|
+
var getHorizontalOffset = function (horizontalAlignment, containerWidth, imageWidth) {
|
|
39
|
+
switch (horizontalAlignment) {
|
|
40
|
+
case "center":
|
|
41
|
+
return (containerWidth - imageWidth) / 2;
|
|
42
|
+
case "right":
|
|
43
|
+
return containerWidth - imageWidth;
|
|
44
|
+
default:
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var getVerticalOffset = function (verticalAlignment, containerHeight, imageHeight) {
|
|
49
|
+
switch (verticalAlignment) {
|
|
50
|
+
case "middle":
|
|
51
|
+
return (containerHeight - imageHeight) / 2;
|
|
52
|
+
case "bottom":
|
|
53
|
+
return containerHeight - imageHeight - 1; // Cater for border;
|
|
54
|
+
default:
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type Konva from "konva";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import type { GridProps } from "./Grid";
|
|
5
|
+
type RefAttribute = {
|
|
6
|
+
ref: React.Ref<Konva.Stage>;
|
|
7
|
+
};
|
|
8
|
+
type MemoizedGridProps = {
|
|
9
|
+
cells: ReactNode[];
|
|
10
|
+
gridLines: ReactNode[];
|
|
11
|
+
gridLinesFrozenRow: ReactNode[];
|
|
12
|
+
gridLinesFrozenColumn: ReactNode[];
|
|
13
|
+
gridLinesFrozenIntersection: ReactNode[];
|
|
14
|
+
cellOverlays: ReactNode[];
|
|
15
|
+
cellBackgrounds: ReactNode[];
|
|
16
|
+
frozenRowCellOverlays: ReactNode[];
|
|
17
|
+
frozenColumnCellOverlays: ReactNode[];
|
|
18
|
+
frozenRowCellBackgrounds: ReactNode[];
|
|
19
|
+
frozenColumnCellBackgrounds: ReactNode[];
|
|
20
|
+
frozenIntersectionCellOverlays: ReactNode[];
|
|
21
|
+
frozenIntersectionCellBackgrounds: ReactNode[];
|
|
22
|
+
frozenRowCells: ReactNode[];
|
|
23
|
+
frozenRowHeaderCells: ReactNode[];
|
|
24
|
+
frozenColumnCells: ReactNode[];
|
|
25
|
+
frozenColumnHeaderCells: ReactNode[];
|
|
26
|
+
frozenIntersectionCells: ReactNode[];
|
|
27
|
+
frozenIntersectionRowHeaderCells: ReactNode[];
|
|
28
|
+
frozenIntersectionColumnHeaderCells: ReactNode[];
|
|
29
|
+
frozenRowShadowComponent: React.JSX.Element | null;
|
|
30
|
+
frozenColumnShadowComponent: React.JSX.Element | null;
|
|
31
|
+
frozenColumnWidth: number;
|
|
32
|
+
frozenRowHeight: number;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
frozenSpacing: number;
|
|
36
|
+
scrollTop: number;
|
|
37
|
+
scrollLeft: number;
|
|
38
|
+
headerRowHeight: number;
|
|
39
|
+
headerColumnWidth: number;
|
|
40
|
+
stageProps?: GridProps["stageProps"];
|
|
41
|
+
listening?: boolean;
|
|
42
|
+
showHeaders?: boolean;
|
|
43
|
+
wrapper?: GridProps["wrapper"];
|
|
44
|
+
rowHeaderStageRef?: React.RefObject<Konva.Stage | null>;
|
|
45
|
+
columnHeaderStageRef?: React.RefObject<Konva.Stage | null>;
|
|
46
|
+
};
|
|
47
|
+
export declare const MemoizedGrid: React.FunctionComponent<MemoizedGridProps & RefAttribute>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=MemoizedGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoizedGrid.d.ts","sourceRoot":"","sources":["../../MemoizedGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAmC,MAAM,OAAO,CAAC;AAGxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAOxC,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CAC7B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,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,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACxD,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CAC5D,CAAC;AAyBF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAChD,iBAAiB,GAAG,YAAY,CA2HjC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemoizedGrid = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
var react_konva_1 = require("react-konva");
|
|
7
|
+
var helpers_1 = require("./helpers");
|
|
8
|
+
var useResizeListener = function (layerRef) {
|
|
9
|
+
(0, helpers_1.useIsomorphicLayoutEffect)(function () {
|
|
10
|
+
if (helpers_1.canUseDOM) {
|
|
11
|
+
var handler_1 = function () {
|
|
12
|
+
if (layerRef.current) {
|
|
13
|
+
layerRef.current.getCanvas().pixelRatio = (0, helpers_1.getDevicePixelRatio)();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var visibilityHandler_1 = function () {
|
|
17
|
+
var _a;
|
|
18
|
+
if (document.visibilityState === "visible") {
|
|
19
|
+
(_a = layerRef.current) === null || _a === void 0 ? void 0 : _a.batchDraw();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
window.addEventListener("resize", handler_1);
|
|
23
|
+
window.addEventListener("visibilitychange", visibilityHandler_1);
|
|
24
|
+
return function () {
|
|
25
|
+
window.removeEventListener("resize", handler_1);
|
|
26
|
+
window.removeEventListener("visibilitychange", visibilityHandler_1);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}, []);
|
|
30
|
+
};
|
|
31
|
+
exports.MemoizedGrid = (0, react_1.memo)((0, react_1.forwardRef)(function (props, forwardedRef) {
|
|
32
|
+
var cells = props.cells, gridLines = props.gridLines, cellOverlays = props.cellOverlays, cellBackgrounds = props.cellBackgrounds, frozenRowCells = props.frozenRowCells, frozenRowHeaderCells = props.frozenRowHeaderCells, gridLinesFrozenRow = props.gridLinesFrozenRow, frozenRowShadowComponent = props.frozenRowShadowComponent, frozenRowCellOverlays = props.frozenRowCellOverlays, frozenRowCellBackgrounds = props.frozenRowCellBackgrounds, frozenColumnCellBackgrounds = props.frozenColumnCellBackgrounds, gridLinesFrozenColumn = props.gridLinesFrozenColumn, frozenColumnCells = props.frozenColumnCells, frozenColumnHeaderCells = props.frozenColumnHeaderCells, frozenColumnShadowComponent = props.frozenColumnShadowComponent, frozenColumnCellOverlays = props.frozenColumnCellOverlays, gridLinesFrozenIntersection = props.gridLinesFrozenIntersection, frozenIntersectionCells = props.frozenIntersectionCells, frozenIntersectionCellOverlays = props.frozenIntersectionCellOverlays, frozenIntersectionCellBackgrounds = props.frozenIntersectionCellBackgrounds, frozenIntersectionRowHeaderCells = props.frozenIntersectionRowHeaderCells, frozenIntersectionColumnHeaderCells = props.frozenIntersectionColumnHeaderCells, frozenColumnWidth = props.frozenColumnWidth, frozenRowHeight = props.frozenRowHeight, width = props.width, height = props.height, frozenSpacing = props.frozenSpacing, scrollTop = props.scrollTop, scrollLeft = props.scrollLeft, headerRowHeight = props.headerRowHeight, headerColumnWidth = props.headerColumnWidth, showHeaders = props.showHeaders, listening = props.listening, columnHeaderStageRef = props.columnHeaderStageRef, rowHeaderStageRef = props.rowHeaderStageRef;
|
|
33
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
|
+
react_1.default.createElement(react_konva_1.Stage, { width: width, height: height, ref: forwardedRef, listening: listening, className: "rnc-cell-stage print:mt-[var(--rnc-print-top-margin)] print:ml-[var(--rnc-print-left-margin)]" },
|
|
35
|
+
react_1.default.createElement(CellLayer, { cells: cells, gridLines: gridLines, cellOverlays: cellOverlays, cellBackgrounds: cellBackgrounds, frozenRowCells: frozenRowCells, gridLinesFrozenRow: gridLinesFrozenRow, frozenRowShadowComponent: frozenRowShadowComponent, frozenRowCellOverlays: frozenRowCellOverlays, frozenRowCellBackgrounds: frozenRowCellBackgrounds, frozenColumnCellBackgrounds: frozenColumnCellBackgrounds, gridLinesFrozenColumn: gridLinesFrozenColumn, frozenColumnCells: frozenColumnCells, frozenColumnShadowComponent: frozenColumnShadowComponent, frozenColumnCellOverlays: frozenColumnCellOverlays, gridLinesFrozenIntersection: gridLinesFrozenIntersection, frozenIntersectionCells: frozenIntersectionCells, frozenIntersectionCellOverlays: frozenIntersectionCellOverlays, frozenIntersectionCellBackgrounds: frozenIntersectionCellBackgrounds, frozenColumnWidth: frozenColumnWidth, frozenRowHeight: frozenRowHeight, frozenSpacing: frozenSpacing, scrollTop: scrollTop, scrollLeft: scrollLeft, width: width, height: height })),
|
|
36
|
+
showHeaders ? (react_1.default.createElement(react_konva_1.Stage, { width: width, height: headerRowHeight, listening: false, ref: columnHeaderStageRef, className: "rnc-header-stage absolute top-0 left-0 print:hidden" },
|
|
37
|
+
react_1.default.createElement(ColumnHeader, { frozenColumnWidth: frozenColumnWidth, frozenRowHeight: frozenRowHeight, frozenSpacing: frozenSpacing, frozenHeaderCells: frozenColumnHeaderCells, frozenIntersectionHeaderCells: frozenIntersectionColumnHeaderCells, scrollLeft: scrollLeft }))) : null,
|
|
38
|
+
showHeaders ? (react_1.default.createElement(react_konva_1.Stage, { width: headerColumnWidth, height: height, listening: false, ref: rowHeaderStageRef, className: "rnc-header-stage absolute top-0 left-0 print:hidden" },
|
|
39
|
+
react_1.default.createElement(RowHeader, { frozenColumnWidth: frozenColumnWidth, frozenRowHeight: frozenRowHeight, frozenSpacing: frozenSpacing, frozenHeaderCells: frozenRowHeaderCells, frozenIntersectionHeaderCells: frozenIntersectionRowHeaderCells, scrollTop: scrollTop }))) : null));
|
|
40
|
+
}));
|
|
41
|
+
/**
|
|
42
|
+
* Canvas layer to draw row headers
|
|
43
|
+
*/
|
|
44
|
+
var ColumnHeader = (0, react_1.memo)(function (_a) {
|
|
45
|
+
var frozenColumnWidth = _a.frozenColumnWidth, frozenRowHeight = _a.frozenRowHeight, scrollLeft = _a.scrollLeft, frozenSpacing = _a.frozenSpacing, frozenHeaderCells = _a.frozenHeaderCells, frozenIntersectionHeaderCells = _a.frozenIntersectionHeaderCells;
|
|
46
|
+
// Pixel ratio in sync
|
|
47
|
+
var layerRef = (0, react_1.useRef)(null);
|
|
48
|
+
useResizeListener(layerRef);
|
|
49
|
+
return (react_1.default.createElement(react_konva_1.Layer, { draggable: false, listening: false, imageSmoothingEnabled: false, ref: layerRef },
|
|
50
|
+
react_1.default.createElement(react_konva_1.Group, { offsetY: 0, offsetX: scrollLeft }, frozenHeaderCells),
|
|
51
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: 0, clipY: 0, clipWidth: frozenColumnWidth + frozenSpacing, clipHeight: frozenRowHeight + frozenSpacing }, frozenIntersectionHeaderCells)));
|
|
52
|
+
});
|
|
53
|
+
ColumnHeader.displayName = "ColumnHeader";
|
|
54
|
+
/**
|
|
55
|
+
* Canvas layer to draw column headers
|
|
56
|
+
*/
|
|
57
|
+
var RowHeader = (0, react_1.memo)(function (_a) {
|
|
58
|
+
var frozenColumnWidth = _a.frozenColumnWidth, frozenRowHeight = _a.frozenRowHeight, scrollTop = _a.scrollTop, frozenSpacing = _a.frozenSpacing, frozenHeaderCells = _a.frozenHeaderCells, frozenIntersectionHeaderCells = _a.frozenIntersectionHeaderCells;
|
|
59
|
+
// Pixel ratio in sync
|
|
60
|
+
var layerRef = (0, react_1.useRef)(null);
|
|
61
|
+
useResizeListener(layerRef);
|
|
62
|
+
return (react_1.default.createElement(react_konva_1.Layer, { draggable: false, listening: false, imageSmoothingEnabled: false, ref: layerRef },
|
|
63
|
+
react_1.default.createElement(react_konva_1.Group, { offsetY: scrollTop, offsetX: 0 }, frozenHeaderCells),
|
|
64
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: 0, clipY: 0, clipWidth: frozenColumnWidth + frozenSpacing, clipHeight: frozenRowHeight + frozenSpacing }, frozenIntersectionHeaderCells)));
|
|
65
|
+
});
|
|
66
|
+
RowHeader.displayName = "RowHeader";
|
|
67
|
+
/**
|
|
68
|
+
* Canvas layer to draw cells
|
|
69
|
+
*/
|
|
70
|
+
var CellLayer = (0, react_1.memo)(function (props) {
|
|
71
|
+
var cells = props.cells, gridLines = props.gridLines, cellOverlays = props.cellOverlays, cellBackgrounds = props.cellBackgrounds, frozenRowCells = props.frozenRowCells, gridLinesFrozenRow = props.gridLinesFrozenRow, frozenRowShadowComponent = props.frozenRowShadowComponent, frozenRowCellOverlays = props.frozenRowCellOverlays, frozenRowCellBackgrounds = props.frozenRowCellBackgrounds, gridLinesFrozenColumn = props.gridLinesFrozenColumn, frozenColumnCells = props.frozenColumnCells, frozenColumnShadowComponent = props.frozenColumnShadowComponent, frozenColumnCellOverlays = props.frozenColumnCellOverlays, frozenColumnCellBackgrounds = props.frozenColumnCellBackgrounds, gridLinesFrozenIntersection = props.gridLinesFrozenIntersection, frozenIntersectionCells = props.frozenIntersectionCells, frozenIntersectionCellOverlays = props.frozenIntersectionCellOverlays, frozenIntersectionCellBackgrounds = props.frozenIntersectionCellBackgrounds, frozenColumnWidth = props.frozenColumnWidth, frozenRowHeight = props.frozenRowHeight, width = props.width, height = props.height, frozenSpacing = props.frozenSpacing, scrollTop = props.scrollTop, scrollLeft = props.scrollLeft;
|
|
72
|
+
// Pixel ratio in sync
|
|
73
|
+
var layerRef = (0, react_1.useRef)(null);
|
|
74
|
+
useResizeListener(layerRef);
|
|
75
|
+
return (react_1.default.createElement(react_konva_1.Layer, { draggable: false, ref: layerRef },
|
|
76
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: frozenColumnWidth, clipY: frozenRowHeight, clipWidth: width - frozenColumnWidth, clipHeight: height - frozenRowHeight },
|
|
77
|
+
react_1.default.createElement(react_konva_1.Group, { offsetY: scrollTop, offsetX: scrollLeft },
|
|
78
|
+
gridLines,
|
|
79
|
+
cellBackgrounds,
|
|
80
|
+
cellOverlays,
|
|
81
|
+
cells)),
|
|
82
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: frozenColumnWidth, clipY: 0, clipWidth: width - frozenColumnWidth, clipHeight: frozenRowHeight + frozenSpacing },
|
|
83
|
+
react_1.default.createElement(react_konva_1.Group, { offsetY: 0, offsetX: scrollLeft },
|
|
84
|
+
gridLinesFrozenRow,
|
|
85
|
+
frozenRowCellBackgrounds,
|
|
86
|
+
frozenRowCellOverlays,
|
|
87
|
+
frozenRowCells,
|
|
88
|
+
frozenRowShadowComponent)),
|
|
89
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: 0, clipY: frozenRowHeight, clipWidth: frozenColumnWidth + frozenSpacing, clipHeight: height - frozenRowHeight },
|
|
90
|
+
react_1.default.createElement(react_konva_1.Group, { offsetY: scrollTop, offsetX: 0 },
|
|
91
|
+
gridLinesFrozenColumn,
|
|
92
|
+
frozenColumnCellBackgrounds,
|
|
93
|
+
frozenColumnCellOverlays,
|
|
94
|
+
frozenColumnCells,
|
|
95
|
+
frozenColumnShadowComponent)),
|
|
96
|
+
react_1.default.createElement(react_konva_1.Group, { clipX: 0, clipY: 0, clipWidth: frozenColumnWidth + frozenSpacing, clipHeight: frozenRowHeight + frozenSpacing },
|
|
97
|
+
gridLinesFrozenIntersection,
|
|
98
|
+
frozenIntersectionCellBackgrounds,
|
|
99
|
+
frozenIntersectionCellOverlays,
|
|
100
|
+
frozenIntersectionCells,
|
|
101
|
+
frozenRowShadowComponent,
|
|
102
|
+
frozenColumnShadowComponent)));
|
|
103
|
+
});
|
|
104
|
+
CellLayer.displayName = "CellLayer";
|
|
105
|
+
exports.MemoizedGrid.displayName = "MemoizedGrid";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Selection.d.ts","sourceRoot":"","sources":["../../Selection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG7C,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAEtC,CAAC;AAIH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var utils_1 = require("./utils");
|
|
6
|
+
var Selection = (0, react_1.memo)(function (props) {
|
|
7
|
+
return (0, utils_1.createHTMLBox)(tslib_1.__assign({ strokeWidth: 1 }, props));
|
|
8
|
+
});
|
|
9
|
+
Selection.displayName = "Selection";
|
|
10
|
+
exports.default = Selection;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
import type { FrameCallbackType } from "scheduler";
|
|
3
|
+
import type { CellInterface, CellMetaData, GridRange, InstanceInterface, ItemSizer, SelectionArea } from "./Grid";
|
|
4
|
+
import { Direction, RowRange } from "./types";
|
|
3
5
|
export declare enum Align {
|
|
4
6
|
start = "start",
|
|
5
7
|
end = "end",
|
|
@@ -27,8 +29,9 @@ interface IRowStopIndex extends Omit<IItemMetaData, "itemType" | "index" | "offs
|
|
|
27
29
|
startIndex: number;
|
|
28
30
|
containerHeight: number;
|
|
29
31
|
scrollTop: number;
|
|
32
|
+
visibleRowRanges?: RowRange[];
|
|
30
33
|
}
|
|
31
|
-
export declare const getRowStopIndexForStartIndex: ({ startIndex, rowCount, rowHeight, columnWidth, scrollTop, containerHeight, instanceProps, scale, }: IRowStopIndex) => number;
|
|
34
|
+
export declare const getRowStopIndexForStartIndex: ({ startIndex, rowCount, rowHeight, columnWidth, scrollTop, containerHeight, instanceProps, scale, visibleRowRanges, }: IRowStopIndex) => number;
|
|
32
35
|
export declare const getColumnStartIndexForOffset: ({ rowHeight, columnWidth, rowCount, columnCount, instanceProps, offset, scale, }: Omit<IItemMetaData, "index" | "itemType">) => number;
|
|
33
36
|
interface IColumnStopIndex extends Omit<IItemMetaData, "itemType" | "index" | "offset" | "rowCount"> {
|
|
34
37
|
startIndex: number;
|
|
@@ -36,15 +39,17 @@ interface IColumnStopIndex extends Omit<IItemMetaData, "itemType" | "index" | "o
|
|
|
36
39
|
scrollLeft: number;
|
|
37
40
|
}
|
|
38
41
|
export declare const getColumnStopIndexForStartIndex: ({ startIndex, rowHeight, columnWidth, instanceProps, containerWidth, scrollLeft, columnCount, scale, }: IColumnStopIndex) => number;
|
|
39
|
-
export declare const getBoundedCells: (area:
|
|
42
|
+
export declare const getBoundedCells: (area: GridRange | null | undefined) => Set<string>;
|
|
40
43
|
export declare const itemKey: ({ rowIndex, columnIndex }: CellInterface) => string;
|
|
41
|
-
export declare const getRowOffset: ({ index, rowHeight, columnWidth, instanceProps, scale, }: Omit<IGetItemMetadata, "itemType">) => number;
|
|
42
|
-
export declare const getColumnOffset: ({ index, rowHeight, columnWidth, instanceProps, scale, }: Omit<IGetItemMetadata, "itemType">) => number;
|
|
44
|
+
export declare const getRowOffset: ({ index, rowHeight, columnWidth, instanceProps, scale, readonly, visibleRowRanges, }: Omit<IGetItemMetadata, "itemType">) => number;
|
|
45
|
+
export declare const getColumnOffset: ({ index, rowHeight, columnWidth, instanceProps, scale, readonly, }: Omit<IGetItemMetadata, "itemType">) => number;
|
|
43
46
|
export declare const getRowHeight: (index: number, instanceProps: InstanceInterface) => number;
|
|
44
47
|
export declare const getColumnWidth: (index: number, instanceProps: InstanceInterface) => number;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
type IGetItemMetadata = Pick<IItemMetaData, "itemType" | "index" | "rowHeight" | "columnWidth" | "instanceProps" | "scale"> & {
|
|
49
|
+
readonly?: boolean;
|
|
50
|
+
visibleRowRanges?: RowRange[];
|
|
51
|
+
};
|
|
52
|
+
export declare const getItemMetadata: ({ itemType, index, rowHeight, columnWidth, instanceProps, scale, readonly, visibleRowRanges, }: IGetItemMetadata) => CellMetaData;
|
|
48
53
|
export declare const getEstimatedTotalHeight: (rowCount: number, instanceProps: InstanceInterface) => number;
|
|
49
54
|
export declare const getEstimatedTotalWidth: (columnCount: number, instanceProps: InstanceInterface) => number;
|
|
50
55
|
export declare const cellIdentifier: (rowIndex: number, columnIndex: number) => string;
|
|
@@ -56,6 +61,8 @@ export declare const cellIdentifier: (rowIndex: number, columnIndex: number) =>
|
|
|
56
61
|
export declare function throttle<T extends Function>(func: T, limit: number): T;
|
|
57
62
|
export declare function debounce<T extends Function>(cb: T, wait?: number): T;
|
|
58
63
|
export declare function rafThrottle(callback: Function): (e: any) => void;
|
|
64
|
+
export declare const scheduleIdlePriorityCallback: (callback: FrameCallbackType) => import("scheduler").CallbackNode;
|
|
65
|
+
export declare function ricThrottle(callback: Function): (e: any) => void;
|
|
59
66
|
export interface AlignmentProps extends Omit<IItemMetaData, "offset"> {
|
|
60
67
|
containerHeight: number;
|
|
61
68
|
containerWidth: number;
|
|
@@ -84,21 +91,14 @@ export declare const selectionFromActiveCell: (activeCell: CellInterface | null)
|
|
|
84
91
|
* Check if a selection are spans multiple cells
|
|
85
92
|
* @param sel
|
|
86
93
|
*/
|
|
87
|
-
export declare const selectionSpansCells: (sel:
|
|
94
|
+
export declare const selectionSpansCells: (sel: GridRange | undefined) => boolean;
|
|
88
95
|
/**
|
|
89
96
|
* When user tries to drag a selection
|
|
90
97
|
* @param initialSelection
|
|
91
98
|
* @param from
|
|
92
99
|
* @param to
|
|
93
100
|
*/
|
|
94
|
-
export declare const newSelectionFromDrag: (initialSelection: SelectionArea, from: CellInterface, to: CellInterface, topBound: number | undefined, leftBound: number | undefined, rowCount: number, columnCount: number) =>
|
|
95
|
-
bounds: {
|
|
96
|
-
top: number;
|
|
97
|
-
left: number;
|
|
98
|
-
bottom: number;
|
|
99
|
-
right: number;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
101
|
+
export declare const newSelectionFromDrag: (initialSelection: SelectionArea, from: CellInterface, to: CellInterface, topBound: number | undefined, leftBound: number | undefined, rowCount: number, columnCount: number) => SelectionArea;
|
|
102
102
|
/**
|
|
103
103
|
* Clamp cell coordinates to be inside activeCell and selection
|
|
104
104
|
* @param coords
|
|
@@ -122,31 +122,31 @@ export declare const prepareClipboardData: (rows: (string | undefined)[][]) => [
|
|
|
122
122
|
* @param selectionBounds
|
|
123
123
|
* @param direction
|
|
124
124
|
*/
|
|
125
|
-
export declare const findNextCellWithinBounds: (activeCellBounds:
|
|
125
|
+
export declare const findNextCellWithinBounds: (activeCellBounds: GridRange, selectionBounds: GridRange, direction?: Direction) => CellInterface | null;
|
|
126
126
|
/**
|
|
127
127
|
* Check if 2 areas overlap
|
|
128
128
|
* @param area1
|
|
129
129
|
* @param area2
|
|
130
130
|
*/
|
|
131
|
-
export declare const areaIntersects: (area1:
|
|
131
|
+
export declare const areaIntersects: (area1: GridRange, area2: GridRange | undefined) => boolean;
|
|
132
132
|
/**
|
|
133
133
|
* Check if area is inside another area
|
|
134
134
|
* @param needle
|
|
135
135
|
* @param haystack
|
|
136
136
|
*/
|
|
137
|
-
export declare const areaInsideArea: (needle:
|
|
137
|
+
export declare const areaInsideArea: (needle: GridRange, haystack: GridRange) => boolean;
|
|
138
138
|
/**
|
|
139
139
|
* Check if two areas are equal
|
|
140
140
|
* @param area1
|
|
141
141
|
* @param area2
|
|
142
142
|
*/
|
|
143
|
-
export declare const isAreasEqual: (area1:
|
|
143
|
+
export declare const isAreasEqual: (area1: GridRange | undefined, area2: GridRange | undefined) => boolean;
|
|
144
144
|
/**
|
|
145
145
|
* Get maximum bound of an area, caters to merged cells
|
|
146
146
|
* @param area
|
|
147
147
|
* @param boundGetter
|
|
148
148
|
*/
|
|
149
|
-
export declare const extendAreaToMergedCells: (_area:
|
|
149
|
+
export declare const extendAreaToMergedCells: (_area: GridRange, mergedCells: GridRange[]) => GridRange;
|
|
150
150
|
/**
|
|
151
151
|
* Convert 2 cells to bounds
|
|
152
152
|
* @param start
|
|
@@ -155,16 +155,31 @@ export declare const extendAreaToMergedCells: (_area: AreaProps, mergedCells: Ar
|
|
|
155
155
|
*
|
|
156
156
|
* 2 loops O(n)
|
|
157
157
|
*/
|
|
158
|
-
export declare const cellRangeToBounds: (start: CellInterface, end: CellInterface, spanMerges: boolean | undefined, getCellBounds: (cell: CellInterface) =>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
export declare const cellRangeToBounds: (start: CellInterface, end: CellInterface, spanMerges: boolean | undefined, getCellBounds: (cell: CellInterface) => GridRange, selectionLeftbound?: number, selectionTopBound?: number) => {
|
|
159
|
+
startRowIndex: number;
|
|
160
|
+
startColumnIndex: number;
|
|
161
|
+
endColumnIndex: number;
|
|
162
|
+
endRowIndex: number;
|
|
163
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Create a range out of a cell
|
|
166
|
+
* @param param0
|
|
167
|
+
* @returns
|
|
168
|
+
*/
|
|
169
|
+
export declare const cellToArea: ({ rowIndex, columnIndex, }: CellInterface) => GridRange;
|
|
164
170
|
/**
|
|
165
171
|
* Check if its being rendered in Browser or SSR
|
|
166
172
|
*/
|
|
167
173
|
export declare const canUseDOM: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Make a font-family value safe for CSS font shorthand (canvas
|
|
176
|
+
* `ctx.font`). Family names that aren't a single safe identifier
|
|
177
|
+
* (leading digit, spaces with odd characters, slashes, …) must be
|
|
178
|
+
* quoted or the shorthand is invalid; generic families (sans-serif,
|
|
179
|
+
* serif, monospace, …) must stay unquoted to keep their generic
|
|
180
|
+
* meaning. Accepts a single family or a comma-separated stack.
|
|
181
|
+
*/
|
|
182
|
+
export declare const toCssFontFamily: (family: string) => string;
|
|
168
183
|
/**
|
|
169
184
|
* Simple Canvas element to measure text size
|
|
170
185
|
*
|
|
@@ -188,7 +203,7 @@ type IOptions = {
|
|
|
188
203
|
};
|
|
189
204
|
export declare const AutoSizerCanvas: (defaults?: AutoSizerProps) => {
|
|
190
205
|
context: CanvasRenderingContext2D | null;
|
|
191
|
-
measureText: (text: string
|
|
206
|
+
measureText: (text: string, shouldWrap?: boolean, boundedWidth?: number) => {
|
|
192
207
|
width: number;
|
|
193
208
|
height: number;
|
|
194
209
|
};
|
|
@@ -197,21 +212,21 @@ export declare const AutoSizerCanvas: (defaults?: AutoSizerProps) => {
|
|
|
197
212
|
};
|
|
198
213
|
export declare const autoSizerCanvas: {
|
|
199
214
|
context: CanvasRenderingContext2D | null;
|
|
200
|
-
measureText: (text: string
|
|
215
|
+
measureText: (text: string, shouldWrap?: boolean, boundedWidth?: number) => {
|
|
201
216
|
width: number;
|
|
202
217
|
height: number;
|
|
203
218
|
};
|
|
204
219
|
setFont: (options?: IOptions) => void;
|
|
205
220
|
reset: () => void;
|
|
206
221
|
};
|
|
207
|
-
export declare const isNull: (value: any) =>
|
|
208
|
-
export declare const isEqualCells: (a: CellInterface | null, b: CellInterface | null) => boolean;
|
|
222
|
+
export declare const isNull: (value: any) => value is undefined | null | "";
|
|
223
|
+
export declare const isEqualCells: (a: CellInterface | null | undefined, b: CellInterface | null | undefined) => boolean;
|
|
209
224
|
/**
|
|
210
225
|
* Simple utility function to check if cell is within bounds
|
|
211
226
|
* @param cell
|
|
212
227
|
* @param bounds
|
|
213
228
|
*/
|
|
214
|
-
export declare const isCellWithinBounds: (cell: CellInterface, bounds
|
|
229
|
+
export declare const isCellWithinBounds: (cell: CellInterface, bounds?: GridRange) => boolean;
|
|
215
230
|
/**
|
|
216
231
|
* Find next row Index
|
|
217
232
|
* @param rowIndex
|
|
@@ -219,7 +234,7 @@ export declare const isCellWithinBounds: (cell: CellInterface, bounds: AreaProps
|
|
|
219
234
|
*/
|
|
220
235
|
export type HiddenType = (i: number) => boolean;
|
|
221
236
|
export declare const clampIndex: (index: number, isHidden: HiddenType | undefined, direction: Direction) => number;
|
|
222
|
-
type ValueGetter = (
|
|
237
|
+
type ValueGetter = (sheetId: number, rowIndex: number, columnIndex: number) => string | number | undefined | null;
|
|
223
238
|
/**
|
|
224
239
|
* Find a cell with content if the current cell is out of the current dataregion
|
|
225
240
|
* [
|
|
@@ -237,7 +252,7 @@ type ValueGetter = (cell: CellInterface) => string | number | undefined;
|
|
|
237
252
|
* @param direction
|
|
238
253
|
* @param limit
|
|
239
254
|
*/
|
|
240
|
-
export declare const findNextContentfulCell: (activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => CellInterface;
|
|
255
|
+
export declare const findNextContentfulCell: (sheetId: number, activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => CellInterface;
|
|
241
256
|
/**
|
|
242
257
|
* Find the next cell
|
|
243
258
|
* @param activeCell
|
|
@@ -246,16 +261,21 @@ export declare const findNextContentfulCell: (activeCell: CellInterface, getValu
|
|
|
246
261
|
* @param direction
|
|
247
262
|
* @param limit
|
|
248
263
|
*/
|
|
249
|
-
export declare const findLastContentfulCell: (activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => CellInterface;
|
|
264
|
+
export declare const findLastContentfulCell: (sheetId: number, activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => CellInterface;
|
|
250
265
|
/**
|
|
251
266
|
* Ex
|
|
252
267
|
*/
|
|
253
|
-
export declare const findNextCellInDataRegion: (activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => number;
|
|
254
|
-
export declare const focusableNodeNames: Set<string>;
|
|
268
|
+
export declare const findNextCellInDataRegion: (sheetId: number, activeCell: CellInterface, getValue: ValueGetter, isHidden: HiddenType | undefined, direction: Direction, limit: number) => number;
|
|
255
269
|
/**
|
|
256
270
|
* Converts a value to string
|
|
257
271
|
* @param value
|
|
258
272
|
*/
|
|
259
273
|
export declare const castToString: (value: any) => string | undefined;
|
|
260
|
-
export declare const isArrowKey: (
|
|
274
|
+
export declare const isArrowKey: (key: string) => boolean;
|
|
275
|
+
export declare const getScrollIncrement: (delta: number, minDim?: number) => number;
|
|
276
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
277
|
+
export declare const useCallbackRef: <T extends (...args: any[]) => any>(callback: T | undefined) => T;
|
|
278
|
+
export declare const getDevicePixelRatio: () => number;
|
|
279
|
+
export declare const getPreviousCellInDirection: (cell: CellInterface, direction?: Direction | undefined) => CellInterface | undefined;
|
|
261
280
|
export {};
|
|
281
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAmB,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,aAAa,EACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,SAAS,EAAY,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExD,oBAAY,KAAK;IACf,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,QAAQ;IAClB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,SAAS,CAA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