canvas-datagrid 0.4.5 → 0.4.7
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/CHANGELOG.md +24 -0
- package/dist/canvas-datagrid.debug.js +3052 -1520
- package/dist/canvas-datagrid.debug.map +1 -1
- package/dist/canvas-datagrid.js +1 -1
- package/dist/canvas-datagrid.module.js +1 -1
- package/dist/canvas-datagrid.module.js.map +1 -1
- package/dist/types.d.ts +301 -75
- package/lib/component.js +1 -2
- package/lib/contextMenu.js +10 -102
- package/lib/defaults.js +3 -0
- package/lib/docs.js +13 -5
- package/lib/dom.js +2 -1
- package/lib/draw.js +75 -58
- package/lib/events/index.js +155 -231
- package/lib/intf.js +24 -219
- package/lib/main.js +2 -0
- package/lib/publicMethods.js +9 -378
- package/lib/selections/index.js +986 -0
- package/lib/selections/type.d.ts +38 -0
- package/lib/selections/util.js +1319 -0
- package/package.json +5 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The descriptor for a cells range.
|
|
3
|
+
* For example: `{startRow: 1, startCol: 1, endRow: 2, endColumn: 2}` is a range with four cells.
|
|
4
|
+
* And `{startRow: 1, endRow: 2}` is a range with two rows.
|
|
5
|
+
* - For the cells block, four properties are required.
|
|
6
|
+
* - For the rows, `startRow` and `endRow` are required.
|
|
7
|
+
* - For the columns, `startCol` and `endColumn` are required.
|
|
8
|
+
*/
|
|
9
|
+
type RangeDescriptor = {
|
|
10
|
+
startRow?: number;
|
|
11
|
+
startColumn?: number;
|
|
12
|
+
endRow?: number;
|
|
13
|
+
endColumn?: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The descriptor for a selection
|
|
18
|
+
* @see SelectionType
|
|
19
|
+
*/
|
|
20
|
+
type SelectionDescriptor = {
|
|
21
|
+
type: number;
|
|
22
|
+
} & RangeDescriptor;
|
|
23
|
+
|
|
24
|
+
type ContextForSelectionAction = {
|
|
25
|
+
rows?: number;
|
|
26
|
+
columns?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type RectangleObject = {
|
|
30
|
+
top: number;
|
|
31
|
+
bottom: number;
|
|
32
|
+
left: number;
|
|
33
|
+
right: number;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type ClipboardInterface = {
|
|
37
|
+
setData: (mimeType: string, data: any) => any;
|
|
38
|
+
};
|