@deephaven/grid 0.7.3-beta.0 → 0.8.0

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.
Files changed (147) hide show
  1. package/dist/CellInputField.d.ts +4 -4
  2. package/dist/CellInputField.d.ts.map +1 -1
  3. package/dist/CellInputField.js +10 -11
  4. package/dist/CellInputField.js.map +1 -1
  5. package/dist/EditableGridModel.d.ts +70 -0
  6. package/dist/EditableGridModel.d.ts.map +1 -0
  7. package/dist/EditableGridModel.js +13 -0
  8. package/dist/EditableGridModel.js.map +1 -0
  9. package/dist/EventHandlerResult.d.ts +17 -0
  10. package/dist/EventHandlerResult.d.ts.map +1 -0
  11. package/dist/EventHandlerResult.js +2 -0
  12. package/dist/EventHandlerResult.js.map +1 -0
  13. package/dist/ExpandableGridModel.d.ts +34 -0
  14. package/dist/ExpandableGridModel.d.ts.map +1 -0
  15. package/dist/ExpandableGridModel.js +7 -0
  16. package/dist/ExpandableGridModel.js.map +1 -0
  17. package/dist/Grid.d.ts +283 -234
  18. package/dist/Grid.d.ts.map +1 -1
  19. package/dist/Grid.js +397 -165
  20. package/dist/Grid.js.map +1 -1
  21. package/dist/GridColorUtils.d.ts +22 -12
  22. package/dist/GridColorUtils.d.ts.map +1 -1
  23. package/dist/GridColorUtils.js +26 -21
  24. package/dist/GridColorUtils.js.map +1 -1
  25. package/dist/GridMetricCalculator.d.ts.map +1 -1
  26. package/dist/GridMetricCalculator.js +8 -4
  27. package/dist/GridMetricCalculator.js.map +1 -1
  28. package/dist/GridModel.d.ts +54 -60
  29. package/dist/GridModel.d.ts.map +1 -1
  30. package/dist/GridModel.js +54 -122
  31. package/dist/GridModel.js.map +1 -1
  32. package/dist/GridMouseHandler.d.ts +23 -24
  33. package/dist/GridMouseHandler.d.ts.map +1 -1
  34. package/dist/GridMouseHandler.js +8 -14
  35. package/dist/GridMouseHandler.js.map +1 -1
  36. package/dist/GridRange.d.ts +2 -2
  37. package/dist/GridRange.d.ts.map +1 -1
  38. package/dist/GridRange.js +1 -1
  39. package/dist/GridRange.js.map +1 -1
  40. package/dist/GridRenderer.d.ts +117 -69
  41. package/dist/GridRenderer.d.ts.map +1 -1
  42. package/dist/GridRenderer.js +183 -168
  43. package/dist/GridRenderer.js.map +1 -1
  44. package/dist/GridUtils.d.ts +4 -4
  45. package/dist/GridUtils.js +4 -4
  46. package/dist/GridUtils.js.map +1 -1
  47. package/dist/KeyHandler.d.ts +10 -7
  48. package/dist/KeyHandler.d.ts.map +1 -1
  49. package/dist/KeyHandler.js +6 -5
  50. package/dist/KeyHandler.js.map +1 -1
  51. package/dist/MockGridData.d.ts +1 -1
  52. package/dist/MockGridData.d.ts.map +1 -1
  53. package/dist/MockGridData.js.map +1 -1
  54. package/dist/MockGridModel.d.ts +39 -12
  55. package/dist/MockGridModel.d.ts.map +1 -1
  56. package/dist/MockGridModel.js +43 -10
  57. package/dist/MockGridModel.js.map +1 -1
  58. package/dist/MockTreeGridModel.d.ts +37 -22
  59. package/dist/MockTreeGridModel.d.ts.map +1 -1
  60. package/dist/MockTreeGridModel.js +38 -20
  61. package/dist/MockTreeGridModel.js.map +1 -1
  62. package/dist/errors/AssertionError.d.ts +5 -0
  63. package/dist/errors/AssertionError.d.ts.map +1 -0
  64. package/dist/errors/AssertionError.js +12 -0
  65. package/dist/errors/AssertionError.js.map +1 -0
  66. package/dist/errors/PasteError.d.ts +1 -1
  67. package/dist/errors/PasteError.d.ts.map +1 -1
  68. package/dist/errors/PasteError.js +1 -2
  69. package/dist/errors/PasteError.js.map +1 -1
  70. package/dist/errors/assertIsDefined.d.ts +3 -0
  71. package/dist/errors/assertIsDefined.d.ts.map +1 -0
  72. package/dist/errors/assertIsDefined.js +8 -0
  73. package/dist/errors/assertIsDefined.js.map +1 -0
  74. package/dist/errors/index.d.ts +2 -0
  75. package/dist/errors/index.d.ts.map +1 -1
  76. package/dist/errors/index.js +2 -1
  77. package/dist/errors/index.js.map +1 -1
  78. package/dist/index.d.ts +1 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +1 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/key-handlers/EditKeyHandler.d.ts +3 -2
  83. package/dist/key-handlers/EditKeyHandler.d.ts.map +1 -1
  84. package/dist/key-handlers/EditKeyHandler.js +10 -9
  85. package/dist/key-handlers/EditKeyHandler.js.map +1 -1
  86. package/dist/key-handlers/PasteKeyHandler.d.ts +3 -5
  87. package/dist/key-handlers/PasteKeyHandler.d.ts.map +1 -1
  88. package/dist/key-handlers/PasteKeyHandler.js +3 -3
  89. package/dist/key-handlers/PasteKeyHandler.js.map +1 -1
  90. package/dist/key-handlers/SelectionKeyHandler.d.ts +5 -5
  91. package/dist/key-handlers/SelectionKeyHandler.d.ts.map +1 -1
  92. package/dist/key-handlers/SelectionKeyHandler.js +16 -15
  93. package/dist/key-handlers/SelectionKeyHandler.js.map +1 -1
  94. package/dist/key-handlers/TreeKeyHandler.d.ts +2 -2
  95. package/dist/key-handlers/TreeKeyHandler.d.ts.map +1 -1
  96. package/dist/key-handlers/TreeKeyHandler.js +14 -12
  97. package/dist/key-handlers/TreeKeyHandler.js.map +1 -1
  98. package/dist/memoizeClear.d.ts +13 -3
  99. package/dist/memoizeClear.d.ts.map +1 -1
  100. package/dist/memoizeClear.js +7 -7
  101. package/dist/memoizeClear.js.map +1 -1
  102. package/dist/mouse-handlers/EditMouseHandler.d.ts +3 -4
  103. package/dist/mouse-handlers/EditMouseHandler.d.ts.map +1 -1
  104. package/dist/mouse-handlers/EditMouseHandler.js +3 -2
  105. package/dist/mouse-handlers/EditMouseHandler.js.map +1 -1
  106. package/dist/mouse-handlers/GridColumnMoveMouseHandler.d.ts +12 -5
  107. package/dist/mouse-handlers/GridColumnMoveMouseHandler.d.ts.map +1 -1
  108. package/dist/mouse-handlers/GridColumnMoveMouseHandler.js +13 -10
  109. package/dist/mouse-handlers/GridColumnMoveMouseHandler.js.map +1 -1
  110. package/dist/mouse-handlers/GridColumnSeparatorMouseHandler.d.ts +24 -3
  111. package/dist/mouse-handlers/GridColumnSeparatorMouseHandler.d.ts.map +1 -1
  112. package/dist/mouse-handlers/GridColumnSeparatorMouseHandler.js +2 -1
  113. package/dist/mouse-handlers/GridColumnSeparatorMouseHandler.js.map +1 -1
  114. package/dist/mouse-handlers/GridHorizontalScrollBarMouseHandler.d.ts +16 -6
  115. package/dist/mouse-handlers/GridHorizontalScrollBarMouseHandler.d.ts.map +1 -1
  116. package/dist/mouse-handlers/GridHorizontalScrollBarMouseHandler.js +41 -37
  117. package/dist/mouse-handlers/GridHorizontalScrollBarMouseHandler.js.map +1 -1
  118. package/dist/mouse-handlers/GridRowMoveMouseHandler.d.ts +10 -3
  119. package/dist/mouse-handlers/GridRowMoveMouseHandler.d.ts.map +1 -1
  120. package/dist/mouse-handlers/GridRowMoveMouseHandler.js +14 -11
  121. package/dist/mouse-handlers/GridRowMoveMouseHandler.js.map +1 -1
  122. package/dist/mouse-handlers/GridRowSeparatorMouseHandler.d.ts +24 -3
  123. package/dist/mouse-handlers/GridRowSeparatorMouseHandler.d.ts.map +1 -1
  124. package/dist/mouse-handlers/GridRowSeparatorMouseHandler.js +4 -3
  125. package/dist/mouse-handlers/GridRowSeparatorMouseHandler.js.map +1 -1
  126. package/dist/mouse-handlers/GridRowTreeMouseHandler.d.ts +8 -3
  127. package/dist/mouse-handlers/GridRowTreeMouseHandler.d.ts.map +1 -1
  128. package/dist/mouse-handlers/GridRowTreeMouseHandler.js +12 -7
  129. package/dist/mouse-handlers/GridRowTreeMouseHandler.js.map +1 -1
  130. package/dist/mouse-handlers/GridScrollBarCornerMouseHandler.d.ts +9 -3
  131. package/dist/mouse-handlers/GridScrollBarCornerMouseHandler.d.ts.map +1 -1
  132. package/dist/mouse-handlers/GridScrollBarCornerMouseHandler.js +2 -1
  133. package/dist/mouse-handlers/GridScrollBarCornerMouseHandler.js.map +1 -1
  134. package/dist/mouse-handlers/GridSelectionMouseHandler.d.ts +15 -9
  135. package/dist/mouse-handlers/GridSelectionMouseHandler.d.ts.map +1 -1
  136. package/dist/mouse-handlers/GridSelectionMouseHandler.js +26 -16
  137. package/dist/mouse-handlers/GridSelectionMouseHandler.js.map +1 -1
  138. package/dist/mouse-handlers/GridSeparatorMouseHandler.d.ts +46 -28
  139. package/dist/mouse-handlers/GridSeparatorMouseHandler.d.ts.map +1 -1
  140. package/dist/mouse-handlers/GridSeparatorMouseHandler.js +57 -74
  141. package/dist/mouse-handlers/GridSeparatorMouseHandler.js.map +1 -1
  142. package/dist/mouse-handlers/GridVerticalScrollBarMouseHandler.d.ts +16 -6
  143. package/dist/mouse-handlers/GridVerticalScrollBarMouseHandler.d.ts.map +1 -1
  144. package/dist/mouse-handlers/GridVerticalScrollBarMouseHandler.js +41 -37
  145. package/dist/mouse-handlers/GridVerticalScrollBarMouseHandler.js.map +1 -1
  146. package/dist/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +3 -3
@@ -1,88 +1,82 @@
1
- export default GridModel;
1
+ import { EventTarget } from 'event-target-shim';
2
+ import { ModelIndex } from './GridMetrics';
3
+ import { GridColor, GridTheme, NullableGridColor } from './GridTheme';
2
4
  /**
3
5
  * Model for a Grid
4
6
  * All of these methods should return very quickly, as they will be called many times in the render cycle.
5
7
  * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).
6
8
  */
7
- declare class GridModel extends EventTarget<Record<string, import("event-target-shim").Event<string>>, "standard"> {
8
- constructor();
9
+ declare abstract class GridModel extends EventTarget {
9
10
  /** Count of rows in the grid */
10
- get rowCount(): number;
11
+ abstract get rowCount(): number;
12
+ /** Count of columns in the grid */
13
+ abstract get columnCount(): number;
11
14
  /** Count of rows that are frozen (or 'floating') at the top */
12
15
  get floatingTopRowCount(): number;
13
16
  /** Count of rows that are frozen at the bottom */
14
17
  get floatingBottomRowCount(): number;
15
- get columnCount(): number;
18
+ /** Count of columns that are frozen (or 'floating') at the left */
16
19
  get floatingLeftColumnCount(): number;
20
+ /** Count of columns that are frozen (or 'floating') at the right */
17
21
  get floatingRightColumnCount(): number;
18
- get isEditable(): boolean;
19
- textForCell(column: any, row: any): string;
20
- textAlignForCell(column: any, row: any): string;
21
- colorForCell(column: any, row: any, theme: any): any;
22
- backgroundColorForCell(column: any, row: any, theme: any): null;
23
- textForColumnHeader(column: any): string;
24
- textForRowHeader(row: any): string;
25
- textForRowFooter(row: any): string;
26
- isEditableRange(range: any): boolean;
27
22
  /**
28
- * @param {number} column The column to check
23
+ * Get the text for the specified cell
24
+ * @param column Column to get the text for
25
+ * @param row Row to get the text for
26
+ * @returns Text for the specified cell
27
+ */
28
+ abstract textForCell(column: ModelIndex, row: ModelIndex): string;
29
+ /**
30
+ * Get the text alignment for the specified cell
31
+ * @param column Column to get the alignment for
32
+ * @param row Row to get the alignment for
33
+ * @returns Text alignment for the specified cell
29
34
  */
30
- isColumnMovable(column: number): boolean;
31
- isRowMovable(row: any): boolean;
32
- get hasExpandableRows(): boolean;
33
- isRowExpandable(row: any): boolean;
34
- isRowExpanded(row: any): boolean;
35
- setRowExpanded(row: any, isExpanded: any): void;
36
- depthForRow(row: any): number;
35
+ textAlignForCell(column: ModelIndex, row: ModelIndex): CanvasTextAlign;
37
36
  /**
38
- * Get the edit text for a cell as a string
39
- * @param {number} x The column to get
40
- * @param {number} y The row to get
41
- * @returns {string} The value to use for editing
37
+ * Get the color for the text in the specified cell
38
+ * @param column Column to get the color for
39
+ * @param row Row to get the color for
40
+ * @param theme Theme applied to the grid
41
+ * @returns Color for the text in the cell
42
42
  */
43
- editValueForCell(x: number, y: number): string;
43
+ colorForCell(column: ModelIndex, row: ModelIndex, theme: GridTheme): GridColor;
44
44
  /**
45
- * Set value in an editable table
46
- * @param {number} x The column to set
47
- * @param {number} y The row to set
48
- * @param {string} value The value to set
49
- * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error
45
+ * Get the background color for the cell
46
+ * @param column Column to get the background color for
47
+ * @param row Row to get the background color for
48
+ * @param theme Theme applied to the grid
49
+ * @returns Background color for the cell
50
50
  */
51
- setValueForCell(x: number, y: number, value: string): Promise<void>;
51
+ backgroundColorForCell(column: ModelIndex, row: ModelIndex, theme: GridTheme): NullableGridColor;
52
52
  /**
53
- * Set value in an editable table
54
- * @param {GridRange[]} ranges The ranges to set
55
- * @param {string} value The value to set
56
- * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error
53
+ * Text for the column header
54
+ * @param column Column to get the header for
55
+ * @returns Text to put in the column header
57
56
  */
58
- setValueForRanges(ranges: any[], value: string): Promise<void>;
57
+ textForColumnHeader(column: ModelIndex): string;
59
58
  /**
60
- * Apply edits to the model
61
- * @param {{
62
- * x: number,
63
- * y: number,
64
- * text: string,
65
- * }[]} edits The edits to apply to the model
59
+ * Text for the row header
60
+ * @param row Row to get the header for
61
+ * @returns Text to put in the row header
66
62
  */
67
- setValues(edits: {
68
- x: number;
69
- y: number;
70
- text: string;
71
- }[]): Promise<void>;
63
+ textForRowHeader(row: ModelIndex): string;
72
64
  /**
73
- * Check if a text value is a valid edit for a cell
74
- * @param {number} x The column to check
75
- * @param {number} y The row to check
76
- * @param {string} value The value to check if it's a valid value or not
77
- * @returns {boolean} returns true if it's a valid value, false otherwise
65
+ * Text for the row footer
66
+ * @param row Row to get the footer for
67
+ * @returns Text to put in the row footer
78
68
  */
79
- isValidForCell(x: number, y: number, value: string): boolean;
69
+ textForRowFooter(row: ModelIndex): string;
80
70
  /**
81
- * Delete ranges from an editable table
82
- * @param {GridRange[]} ranges The ranges to delete
83
- * @returns {unknown} The result of the delete
71
+ * @param column Column to check
72
+ * @returns True if the column is movable
84
73
  */
85
- delete(ranges: any[]): unknown;
74
+ isColumnMovable(column: ModelIndex): boolean;
75
+ /**
76
+ * @param row Row to check
77
+ * @returns True if the row is movable
78
+ */
79
+ isRowMovable(row: ModelIndex): boolean;
86
80
  }
87
- import { EventTarget } from "event-target-shim";
81
+ export default GridModel;
88
82
  //# sourceMappingURL=GridModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridModel.d.ts","sourceRoot":"","sources":["../src/GridModel.js"],"names":[],"mappings":";AAIA;;;;GAIG;AACH;IAWM,cACG;IAXP,gCAAgC;IAChC,uBAEC;IAED,+DAA+D;IAC/D,kCAEC;IAED,kDAAkD;IAClD,qCAEC;IAED,0BAEC;IAED,sCAEC;IAED,uCAEC;IAKD,0BAEC;IAED,2CAEC;IAED,gDAEC;IAED,qDAEC;IAED,gEAEC;IAED,yCAEC;IAED,mCAEC;IAED,mCAEC;IAOD,qCAEC;IAED;;OAEG;IACH,wBAFW,MAAM,WAIhB;IAED,gCAEC;IAED,iCAEC;IAED,mCAEC;IAED,iCAEC;IAED,gDAAkC;IAElC,8BAEC;IAED;;;;;OAKG;IACH,oBAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAIzB;IAED;;;;;OAKG;IACH,0BAJW,KAAW,SACX,MAAM,GACJ,QAAQ,IAAI,CAAC,CAIzB;IAED;;;;;;;OAOG;IACH,iBANW;QACV,CAAK,EAAE,MAAM,CAAC;QACd,CAAK,EAAE,MAAM,CAAC;QACd,IAAQ,EAAE,MAAM,CAAC;KACd,EAAE,iBAIL;IAED;;;;;;OAMG;IACH,kBALW,MAAM,KACN,MAAM,SACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,eAHW,KAAW,GACT,OAAO,CAInB;CACF"}
1
+ {"version":3,"file":"GridModel.d.ts","sourceRoot":"","sources":["../src/GridModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAItE;;;;GAIG;AACH,uBAAe,SAAU,SAAQ,WAAW;IAC1C,gCAAgC;IAChC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAEhC,mCAAmC;IACnC,QAAQ,KAAK,WAAW,IAAI,MAAM,CAAC;IAEnC,+DAA+D;IAC/D,IAAI,mBAAmB,IAAI,MAAM,CAEhC;IAED,kDAAkD;IAClD,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED,mEAAmE;IACnE,IAAI,uBAAuB,IAAI,MAAM,CAEpC;IAED,oEAAoE;IACpE,IAAI,wBAAwB,IAAI,MAAM,CAErC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,MAAM;IAEjE;;;;;OAKG;IACH,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,eAAe;IAItE;;;;;;OAMG;IACH,YAAY,CACV,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,SAAS,GACf,SAAS;IAIZ;;;;;;OAMG;IACH,sBAAsB,CACpB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,SAAS,GACf,iBAAiB;IAIpB;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM;IAI/C;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;IAIzC;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;IAIzC;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO;IAI5C;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO;CAGvC;AAED,eAAe,SAAS,CAAC"}
package/dist/GridModel.js CHANGED
@@ -1,8 +1,5 @@
1
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
-
3
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
-
5
1
  import { EventTarget } from 'event-target-shim';
2
+
6
3
  /* eslint class-methods-use-this: "off" */
7
4
 
8
5
  /* eslint no-unused-vars: "off" */
@@ -12,15 +9,12 @@ import { EventTarget } from 'event-target-shim';
12
9
  * All of these methods should return very quickly, as they will be called many times in the render cycle.
13
10
  * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).
14
11
  */
15
-
16
12
  class GridModel extends EventTarget {
17
13
  /** Count of rows in the grid */
18
- get rowCount() {
19
- return 0;
20
- }
21
- /** Count of rows that are frozen (or 'floating') at the top */
22
14
 
15
+ /** Count of columns in the grid */
23
16
 
17
+ /** Count of rows that are frozen (or 'floating') at the top */
24
18
  get floatingTopRowCount() {
25
19
  return 0;
26
20
  }
@@ -30,168 +24,106 @@ class GridModel extends EventTarget {
30
24
  get floatingBottomRowCount() {
31
25
  return 0;
32
26
  }
27
+ /** Count of columns that are frozen (or 'floating') at the left */
33
28
 
34
- get columnCount() {
35
- return 0;
36
- }
37
29
 
38
30
  get floatingLeftColumnCount() {
39
31
  return 0;
40
32
  }
33
+ /** Count of columns that are frozen (or 'floating') at the right */
34
+
41
35
 
42
36
  get floatingRightColumnCount() {
43
37
  return 0;
44
38
  }
45
- /*
46
- * @returns {boolean} True if the edit functionality is available
39
+ /**
40
+ * Get the text for the specified cell
41
+ * @param column Column to get the text for
42
+ * @param row Row to get the text for
43
+ * @returns Text for the specified cell
47
44
  */
48
45
 
49
46
 
50
- get isEditable() {
51
- return false;
52
- }
53
-
54
- textForCell(column, row) {
55
- return '';
56
- }
57
-
47
+ /**
48
+ * Get the text alignment for the specified cell
49
+ * @param column Column to get the alignment for
50
+ * @param row Row to get the alignment for
51
+ * @returns Text alignment for the specified cell
52
+ */
58
53
  textAlignForCell(column, row) {
59
54
  return 'left';
60
55
  }
61
-
62
- colorForCell(column, row, theme) {
63
- return theme.textColor;
64
- }
65
-
66
- backgroundColorForCell(column, row, theme) {
67
- return null;
68
- }
69
-
70
- textForColumnHeader(column) {
71
- return '';
72
- }
73
-
74
- textForRowHeader(row) {
75
- return '';
76
- }
77
-
78
- textForRowFooter(row) {
79
- return '';
80
- }
81
- /*
82
- * Check if a given range is editable
83
- * @param {GridRange} range The range to check if it is editable
84
- * @returns {boolean} True if the range is editable
85
- */
86
-
87
-
88
- isEditableRange(range) {
89
- return this.isEditable;
90
- }
91
56
  /**
92
- * @param {number} column The column to check
57
+ * Get the color for the text in the specified cell
58
+ * @param column Column to get the color for
59
+ * @param row Row to get the color for
60
+ * @param theme Theme applied to the grid
61
+ * @returns Color for the text in the cell
93
62
  */
94
63
 
95
64
 
96
- isColumnMovable(column) {
97
- return true;
98
- }
99
-
100
- isRowMovable(row) {
101
- return true;
102
- }
103
-
104
- get hasExpandableRows() {
105
- return false;
106
- }
107
-
108
- isRowExpandable(row) {
109
- return false;
110
- }
111
-
112
- isRowExpanded(row) {
113
- return false;
114
- }
115
-
116
- setRowExpanded(row, isExpanded) {}
117
-
118
- depthForRow(row) {
119
- return 0;
65
+ colorForCell(column, row, theme) {
66
+ return theme.textColor;
120
67
  }
121
68
  /**
122
- * Get the edit text for a cell as a string
123
- * @param {number} x The column to get
124
- * @param {number} y The row to get
125
- * @returns {string} The value to use for editing
69
+ * Get the background color for the cell
70
+ * @param column Column to get the background color for
71
+ * @param row Row to get the background color for
72
+ * @param theme Theme applied to the grid
73
+ * @returns Background color for the cell
126
74
  */
127
75
 
128
76
 
129
- editValueForCell(x, y) {
130
- throw new Error('editValueForCell not implemented');
77
+ backgroundColorForCell(column, row, theme) {
78
+ return null;
131
79
  }
132
80
  /**
133
- * Set value in an editable table
134
- * @param {number} x The column to set
135
- * @param {number} y The row to set
136
- * @param {string} value The value to set
137
- * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error
81
+ * Text for the column header
82
+ * @param column Column to get the header for
83
+ * @returns Text to put in the column header
138
84
  */
139
85
 
140
86
 
141
- setValueForCell(x, y, value) {
142
- return _asyncToGenerator(function* () {
143
- throw new Error('setValueForCell not implemented');
144
- })();
87
+ textForColumnHeader(column) {
88
+ return '';
145
89
  }
146
90
  /**
147
- * Set value in an editable table
148
- * @param {GridRange[]} ranges The ranges to set
149
- * @param {string} value The value to set
150
- * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error
91
+ * Text for the row header
92
+ * @param row Row to get the header for
93
+ * @returns Text to put in the row header
151
94
  */
152
95
 
153
96
 
154
- setValueForRanges(ranges, value) {
155
- return _asyncToGenerator(function* () {
156
- throw new Error('setValueForRanges not implemented');
157
- })();
97
+ textForRowHeader(row) {
98
+ return '';
158
99
  }
159
100
  /**
160
- * Apply edits to the model
161
- * @param {{
162
- * x: number,
163
- * y: number,
164
- * text: string,
165
- * }[]} edits The edits to apply to the model
101
+ * Text for the row footer
102
+ * @param row Row to get the footer for
103
+ * @returns Text to put in the row footer
166
104
  */
167
105
 
168
106
 
169
- setValues(edits) {
170
- return _asyncToGenerator(function* () {
171
- throw new Error('setValues not implemented');
172
- })();
107
+ textForRowFooter(row) {
108
+ return '';
173
109
  }
174
110
  /**
175
- * Check if a text value is a valid edit for a cell
176
- * @param {number} x The column to check
177
- * @param {number} y The row to check
178
- * @param {string} value The value to check if it's a valid value or not
179
- * @returns {boolean} returns true if it's a valid value, false otherwise
111
+ * @param column Column to check
112
+ * @returns True if the column is movable
180
113
  */
181
114
 
182
115
 
183
- isValidForCell(x, y, value) {
184
- throw new Error('isValidForCell not implemented');
116
+ isColumnMovable(column) {
117
+ return true;
185
118
  }
186
119
  /**
187
- * Delete ranges from an editable table
188
- * @param {GridRange[]} ranges The ranges to delete
189
- * @returns {unknown} The result of the delete
120
+ * @param row Row to check
121
+ * @returns True if the row is movable
190
122
  */
191
123
 
192
124
 
193
- delete(ranges) {
194
- throw new Error('delete not implemented');
125
+ isRowMovable(row) {
126
+ return true;
195
127
  }
196
128
 
197
129
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/GridModel.js"],"names":["EventTarget","GridModel","rowCount","floatingTopRowCount","floatingBottomRowCount","columnCount","floatingLeftColumnCount","floatingRightColumnCount","isEditable","textForCell","column","row","textAlignForCell","colorForCell","theme","textColor","backgroundColorForCell","textForColumnHeader","textForRowHeader","textForRowFooter","isEditableRange","range","isColumnMovable","isRowMovable","hasExpandableRows","isRowExpandable","isRowExpanded","setRowExpanded","isExpanded","depthForRow","editValueForCell","x","y","Error","setValueForCell","value","setValueForRanges","ranges","setValues","edits","isValidForCell","delete"],"mappings":";;;;AAAA,SAASA,WAAT,QAA4B,mBAA5B;AAEA;;AACA;;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBD,WAAxB,CAAoC;AAClC;AACY,MAARE,QAAQ,GAAG;AACb,WAAO,CAAP;AACD;AAED;;;AACuB,MAAnBC,mBAAmB,GAAG;AACxB,WAAO,CAAP;AACD;AAED;;;AAC0B,MAAtBC,sBAAsB,GAAG;AAC3B,WAAO,CAAP;AACD;;AAEc,MAAXC,WAAW,GAAG;AAChB,WAAO,CAAP;AACD;;AAE0B,MAAvBC,uBAAuB,GAAG;AAC5B,WAAO,CAAP;AACD;;AAE2B,MAAxBC,wBAAwB,GAAG;AAC7B,WAAO,CAAP;AACD;AAED;AACF;AACA;;;AACgB,MAAVC,UAAU,GAAG;AACf,WAAO,KAAP;AACD;;AAEDC,EAAAA,WAAW,CAACC,MAAD,EAASC,GAAT,EAAc;AACvB,WAAO,EAAP;AACD;;AAEDC,EAAAA,gBAAgB,CAACF,MAAD,EAASC,GAAT,EAAc;AAC5B,WAAO,MAAP;AACD;;AAEDE,EAA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ACF;AACA;AACA;AACA;AACA;;;AACQG,EAAAA,iBAAiB,CAACC,MAAD,EAASF,KAAT,EAAgB;AAAA;AACrC,YAAM,IAAIF,KAAJ,CAAU,mCAAV,CAAN;AADqC;AAEtC;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;;AACQK,EAAAA,SAAS,CAACC,KAAD,EAAQ;AAAA;AACrB,YAAM,IAAIN,KAAJ,CAAU,2BAAV,CAAN;AADqB;AAEtB;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACEO,EAAAA,cAAc,CAACT,CAAD,EAAIC,CAAJ,EAAOG,KAAP,EAAc;AAC1B,UAAM,IAAIF,KAAJ,CAAU,gCAAV,CAAN;AACD;AAED;AACF;AACA;AACA;AACA;;;AACEQ,EAAAA,MAAM,CAACJ,MAAD,EAAS;AACb,UAAM,IAAIJ,KAAJ,CAAU,wBAAV,CAAN;AACD;;AAlKiC;;AAqKpC,eAAehC,SAAf","sourcesContent":["import { EventTarget } from 'event-target-shim';\n\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n/**\n * Model for a Grid\n * All of these methods should return very quickly, as they will be called many times in the render cycle.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).\n */\nclass GridModel extends EventTarget {\n /** Count of rows in the grid */\n get rowCount() {\n return 0;\n }\n\n /** Count of rows that are frozen (or 'floating') at the top */\n get floatingTopRowCount() {\n return 0;\n }\n\n /** Count of rows that are frozen at the bottom */\n get floatingBottomRowCount() {\n return 0;\n }\n\n get columnCount() {\n return 0;\n }\n\n get floatingLeftColumnCount() {\n return 0;\n }\n\n get floatingRightColumnCount() {\n return 0;\n }\n\n /*\n * @returns {boolean} True if the edit functionality is available\n */\n get isEditable() {\n return false;\n }\n\n textForCell(column, row) {\n return '';\n }\n\n textAlignForCell(column, row) {\n return 'left';\n }\n\n colorForCell(column, row, theme) {\n return theme.textColor;\n }\n\n backgroundColorForCell(column, row, theme) {\n return null;\n }\n\n textForColumnHeader(column) {\n return '';\n }\n\n textForRowHeader(row) {\n return '';\n }\n\n textForRowFooter(row) {\n return '';\n }\n\n /*\n * Check if a given range is editable\n * @param {GridRange} range The range to check if it is editable\n * @returns {boolean} True if the range is editable\n */\n isEditableRange(range) {\n return this.isEditable;\n }\n\n /**\n * @param {number} column The column to check\n */\n isColumnMovable(column) {\n return true;\n }\n\n isRowMovable(row) {\n return true;\n }\n\n get hasExpandableRows() {\n return false;\n }\n\n isRowExpandable(row) {\n return false;\n }\n\n isRowExpanded(row) {\n return false;\n }\n\n setRowExpanded(row, isExpanded) {}\n\n depthForRow(row) {\n return 0;\n }\n\n /**\n * Get the edit text for a cell as a string\n * @param {number} x The column to get\n * @param {number} y The row to get\n * @returns {string} The value to use for editing\n */\n editValueForCell(x, y) {\n throw new Error('editValueForCell not implemented');\n }\n\n /**\n * Set value in an editable table\n * @param {number} x The column to set\n * @param {number} y The row to set\n * @param {string} value The value to set\n * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error\n */\n async setValueForCell(x, y, value) {\n throw new Error('setValueForCell not implemented');\n }\n\n /**\n * Set value in an editable table\n * @param {GridRange[]} ranges The ranges to set\n * @param {string} value The value to set\n * @returns {Promise<void>} A promise that resolves successfully when the operation is complete, or rejects if there's an error\n */\n async setValueForRanges(ranges, value) {\n throw new Error('setValueForRanges not implemented');\n }\n\n /**\n * Apply edits to the model\n * @param {{\n * x: number,\n * y: number,\n * text: string,\n * }[]} edits The edits to apply to the model\n */\n async setValues(edits) {\n throw new Error('setValues not implemented');\n }\n\n /**\n * Check if a text value is a valid edit for a cell\n * @param {number} x The column to check\n * @param {number} y The row to check\n * @param {string} value The value to check if it's a valid value or not\n * @returns {boolean} returns true if it's a valid value, false otherwise\n */\n isValidForCell(x, y, value) {\n throw new Error('isValidForCell not implemented');\n }\n\n /**\n * Delete ranges from an editable table\n * @param {GridRange[]} ranges The ranges to delete\n * @returns {unknown} The result of the delete\n */\n delete(ranges) {\n throw new Error('delete not implemented');\n }\n}\n\nexport default GridModel;\n"],"file":"GridModel.js"}
1
+ {"version":3,"sources":["../src/GridModel.ts"],"names":["EventTarget","GridModel","floatingTopRowCount","floatingBottomRowCount","floatingLeftColumnCount","floatingRightColumnCount","textAlignForCell","column","row","colorForCell","theme","textColor","backgroundColorForCell","textForColumnHeader","textForRowHeader","textForRowFooter","isColumnMovable","isRowMovable"],"mappings":"AAAA,SAASA,WAAT,QAA4B,mBAA5B;;AAIA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA,MAAeC,SAAf,SAAiCD,WAAjC,CAA6C;AAC3C;;AAGA;;AAGA;AACuB,MAAnBE,mBAAmB,GAAW;AAChC,WAAO,CAAP;AACD;AAED;;;AAC0B,MAAtBC,sBAAsB,GAAW;AACnC,WAAO,CAAP;AACD;AAED;;;AAC2B,MAAvBC,uBAAuB,GAAW;AACpC,WAAO,CAAP;AACD;AAED;;;AAC4B,MAAxBC,wBAAwB,GAAW;AACrC,WAAO,CAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;AAGE;AACF;AACA;AACA;AACA;AACA;AACEC,EAAAA,gBAAgB,CAACC,MAAD,EAAqBC,GAArB,EAAuD;AACrE,WAAO,MAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACEC,EAAAA,YAAY,CACVF,MADU,EAEVC,GAFU,EAGVE,KAHU,EAIC;AACX,WAAOA,KAAK,CAACC,SAAb;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACEC,EAAAA,sBAAsB,CACpBL,MADoB,EAEpBC,GAFoB,EAGpBE,KAHoB,EAID;AACnB,WAAO,IAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACEG,EAAAA,mBAAmB,CAACN,MAAD,EAA6B;AAC9C,WAAO,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACEO,EAAAA,gBAAgB,CAACN,GAAD,EAA0B;AACxC,WAAO,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACEO,EAAAA,gBAAgB,CAACP,GAAD,EAA0B;AACxC,WAAO,EAAP;AACD;AAED;AACF;AACA;AACA;;;AACEQ,EAAAA,eAAe,CAACT,MAAD,EAA8B;AAC3C,WAAO,IAAP;AACD;AAED;AACF;AACA;AACA;;;AACEU,EAAAA,YAAY,CAACT,GAAD,EAA2B;AACrC,WAAO,IAAP;AACD;;AApH0C;;AAuH7C,eAAeP,SAAf","sourcesContent":["import { EventTarget } from 'event-target-shim';\nimport { ModelIndex } from './GridMetrics';\nimport { GridColor, GridTheme, NullableGridColor } from './GridTheme';\n\n/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n/**\n * Model for a Grid\n * All of these methods should return very quickly, as they will be called many times in the render cycle.\n * If data needs to be loaded asynchronously, return something immediately, then trigger an event for the table to refresh (Not yet implemented).\n */\nabstract class GridModel extends EventTarget {\n /** Count of rows in the grid */\n abstract get rowCount(): number;\n\n /** Count of columns in the grid */\n abstract get columnCount(): number;\n\n /** Count of rows that are frozen (or 'floating') at the top */\n get floatingTopRowCount(): number {\n return 0;\n }\n\n /** Count of rows that are frozen at the bottom */\n get floatingBottomRowCount(): number {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the left */\n get floatingLeftColumnCount(): number {\n return 0;\n }\n\n /** Count of columns that are frozen (or 'floating') at the right */\n get floatingRightColumnCount(): number {\n return 0;\n }\n\n /**\n * Get the text for the specified cell\n * @param column Column to get the text for\n * @param row Row to get the text for\n * @returns Text for the specified cell\n */\n abstract textForCell(column: ModelIndex, row: ModelIndex): string;\n\n /**\n * Get the text alignment for the specified cell\n * @param column Column to get the alignment for\n * @param row Row to get the alignment for\n * @returns Text alignment for the specified cell\n */\n textAlignForCell(column: ModelIndex, row: ModelIndex): CanvasTextAlign {\n return 'left';\n }\n\n /**\n * Get the color for the text in the specified cell\n * @param column Column to get the color for\n * @param row Row to get the color for\n * @param theme Theme applied to the grid\n * @returns Color for the text in the cell\n */\n colorForCell(\n column: ModelIndex,\n row: ModelIndex,\n theme: GridTheme\n ): GridColor {\n return theme.textColor;\n }\n\n /**\n * Get the background color for the cell\n * @param column Column to get the background color for\n * @param row Row to get the background color for\n * @param theme Theme applied to the grid\n * @returns Background color for the cell\n */\n backgroundColorForCell(\n column: ModelIndex,\n row: ModelIndex,\n theme: GridTheme\n ): NullableGridColor {\n return null;\n }\n\n /**\n * Text for the column header\n * @param column Column to get the header for\n * @returns Text to put in the column header\n */\n textForColumnHeader(column: ModelIndex): string {\n return '';\n }\n\n /**\n * Text for the row header\n * @param row Row to get the header for\n * @returns Text to put in the row header\n */\n textForRowHeader(row: ModelIndex): string {\n return '';\n }\n\n /**\n * Text for the row footer\n * @param row Row to get the footer for\n * @returns Text to put in the row footer\n */\n textForRowFooter(row: ModelIndex): string {\n return '';\n }\n\n /**\n * @param column Column to check\n * @returns True if the column is movable\n */\n isColumnMovable(column: ModelIndex): boolean {\n return true;\n }\n\n /**\n * @param row Row to check\n * @returns True if the row is movable\n */\n isRowMovable(row: ModelIndex): boolean {\n return true;\n }\n}\n\nexport default GridModel;\n"],"file":"GridModel.js"}
@@ -1,31 +1,30 @@
1
- export default GridMouseHandler;
1
+ /// <reference types="react" />
2
+ import { EventHandlerResult } from './EventHandlerResult';
3
+ import Grid from './Grid';
4
+ import { GridPoint } from './GridUtils';
5
+ /**
6
+ * Some events we listen to are a native mouse event, and others are wrapped with React's SyntheticEvent.
7
+ * The GridMouseHandler shouldn't care though - the properties it accesses should be common on both types of events.
8
+ */
9
+ export declare type GridMouseEvent = MouseEvent | React.MouseEvent;
10
+ export declare type GridMouseHandlerFunctionName = 'onDown' | 'onMove' | 'onDrag' | 'onLeave' | 'onClick' | 'onContextMenu' | 'onDoubleClick' | 'onUp' | 'onWheel';
2
11
  /**
3
12
  * Define a region in the grid that interacts with the mouse on a grid.
4
13
  * Return true from any of the events to indicate they're consumed, and stopPropagation/preventDefault will be called.
5
14
  */
6
- declare class GridMouseHandler {
7
- static FUNCTION_NAMES: Readonly<{
8
- DOWN: string;
9
- MOVE: string;
10
- DRAG: string;
11
- LEAVE: string;
12
- CLICK: string;
13
- CONTEXT_MENU: string;
14
- DOUBLE_CLICK: string;
15
- UP: string;
16
- WHEEL: string;
17
- }>;
18
- constructor(order?: number);
15
+ export declare class GridMouseHandler {
19
16
  order: number;
20
- cursor: any;
21
- onDown(gridPoint: any, grid: any, event: any): boolean;
22
- onMove(gridPoint: any, grid: any, event: any): boolean;
23
- onDrag(gridPoint: any, grid: any, event: any): boolean;
24
- onLeave(gridPoint: any, grid: any, event: any): boolean;
25
- onClick(gridPoint: any, grid: any, event: any): boolean;
26
- onContextMenu(gridPoint: any, grid: any, event: any): boolean;
27
- onDoubleClick(gridPoint: any, grid: any, event: any): boolean;
28
- onUp(gridPoint: any, grid: any, event: any): boolean;
29
- onWheel(gridPoint: any, grid: any, event: any): boolean;
17
+ constructor(order?: number);
18
+ cursor: string | null;
19
+ onDown(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
20
+ onMove(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
21
+ onDrag(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
22
+ onLeave(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
23
+ onClick(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
24
+ onContextMenu(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
25
+ onDoubleClick(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
26
+ onUp(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
27
+ onWheel(gridPoint: GridPoint, grid: Grid, event: GridMouseEvent): EventHandlerResult;
30
28
  }
29
+ export default GridMouseHandler;
31
30
  //# sourceMappingURL=GridMouseHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridMouseHandler.d.ts","sourceRoot":"","sources":["../src/GridMouseHandler.js"],"names":[],"mappings":";AAEA;;;GAGG;AACH;IACE;;;;;;;;;;OAUG;IAIH,4BAEC;IADC,cAAkB;IAIpB,YAAc;IAEd,uDAEC;IAED,uDAEC;IAED,uDAEC;IAED,wDAEC;IAED,wDAEC;IAED,8DAEC;IAED,8DAEC;IAED,qDAEC;IAED,wDAEC;CACF"}
1
+ {"version":3,"file":"GridMouseHandler.d.ts","sourceRoot":"","sources":["../src/GridMouseHandler.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,oBAAY,cAAc,GAAG,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;AAE3D,oBAAY,4BAA4B,GACpC,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,eAAe,GACf,eAAe,GACf,MAAM,GACN,SAAS,CAAC;AAEd;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,KAAK,EAAE,MAAM,CAAC;gBAIF,KAAK,SAAO;IAKxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B,MAAM,CACJ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,MAAM,CACJ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,MAAM,CACJ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,aAAa,CACX,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,aAAa,CACX,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,IAAI,CACF,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;IAIrB,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,cAAc,GACpB,kBAAkB;CAGtB;AAED,eAAe,gBAAgB,CAAC"}
@@ -4,16 +4,23 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
4
4
 
5
5
  /* eslint no-unused-vars: "off" */
6
6
 
7
+ /**
8
+ * Some events we listen to are a native mouse event, and others are wrapped with React's SyntheticEvent.
9
+ * The GridMouseHandler shouldn't care though - the properties it accesses should be common on both types of events.
10
+ */
11
+
7
12
  /**
8
13
  * Define a region in the grid that interacts with the mouse on a grid.
9
14
  * Return true from any of the events to indicate they're consumed, and stopPropagation/preventDefault will be called.
10
15
  */
11
- class GridMouseHandler {
16
+ export class GridMouseHandler {
12
17
  // What order this mouse handler should trigger in
13
18
  // Default to well below any of the GRID mouse handlers 100-1000+
14
19
  constructor() {
15
20
  var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 5000;
16
21
 
22
+ _defineProperty(this, "order", void 0);
23
+
17
24
  _defineProperty(this, "cursor", null);
18
25
 
19
26
  this.order = order;
@@ -57,18 +64,5 @@ class GridMouseHandler {
57
64
  }
58
65
 
59
66
  }
60
-
61
- _defineProperty(GridMouseHandler, "FUNCTION_NAMES", Object.freeze({
62
- DOWN: 'onDown',
63
- MOVE: 'onMove',
64
- DRAG: 'onDrag',
65
- LEAVE: 'onLeave',
66
- CLICK: 'onClick',
67
- CONTEXT_MENU: 'onContextMenu',
68
- DOUBLE_CLICK: 'onDoubleClick',
69
- UP: 'onUp',
70
- WHEEL: 'onWheel'
71
- }));
72
-
73
67
  export default GridMouseHandler;
74
68
  //# sourceMappingURL=GridMouseHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/GridMouseHandler.js"],"names":["GridMouseHandler","constructor","order","onDown","gridPoint","grid","event","onMove","onDrag","onLeave","onClick","onContextMenu","onDoubleClick","onUp","onWheel","Object","freeze","DOWN","MOVE","DRAG","LEAVE","CLICK","CONTEXT_MENU","DOUBLE_CLICK","UP","WHEEL"],"mappings":";;AAAA;;AACA;;AACA;AACA;AACA;AACA;AACA,MAAMA,gBAAN,CAAuB;AAarB;AACA;AACAC,EAAAA,WAAW,GAAe;AAAA,QAAdC,KAAc,uEAAN,IAAM;;AAAA,oCAKjB,IALiB;;AACxB,SAAKA,KAAL,GAAaA,KAAb;AACD,GAjBoB,CAmBrB;;;AAGAC,EAAAA,MAAM,CAACC,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC7B,WAAO,KAAP;AACD;;AAEDC,EAAAA,MAAM,CAACH,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC7B,WAAO,KAAP;AACD;;AAEDE,EAAAA,MAAM,CAACJ,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC7B,WAAO,KAAP;AACD;;AAEDG,EAAAA,OAAO,CAACL,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC9B,WAAO,KAAP;AACD;;AAEDI,EAAAA,OAAO,CAACN,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC9B,WAAO,KAAP;AACD;;AAEDK,EAAAA,aAAa,CAACP,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AACpC,WAAO,KAAP;AACD;;AAEDM,EAAAA,aAAa,CAACR,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AACpC,WAAO,KAAP;AACD;;AAEDO,EAAAA,IAAI,CAACT,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC3B,WAAO,KAAP;AACD;;AAEDQ,EAAAA,OAAO,CAACV,SAAD,EAAYC,IAAZ,EAAkBC,KAAlB,EAAyB;AAC9B,WAAO,KAAP;AACD;;AAxDoB;;gBAAjBN,gB,oBACoBe,MAAM,CAACC,MAAP,CAAc;AACpCC,EAAAA,IAAI,EAAE,QAD8B;AAEpCC,EAAAA,IAAI,EAAE,QAF8B;AAGpCC,EAAAA,IAAI,EAAE,QAH8B;AAIpCC,EAAAA,KAAK,EAAE,SAJ6B;AAKpCC,EAAAA,KAAK,EAAE,SAL6B;AAMpCC,EAAAA,YAAY,EAAE,eANsB;AAOpCC,EAAAA,YAAY,EAAE,eAPsB;AAQpCC,EAAAA,EAAE,EAAE,MARgC;AASpCC,EAAAA,KAAK,EAAE;AAT6B,CAAd,C;;AA0D1B,eAAezB,gBAAf","sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\n/**\n * Define a region in the grid that interacts with the mouse on a grid.\n * Return true from any of the events to indicate they're consumed, and stopPropagation/preventDefault will be called.\n */\nclass GridMouseHandler {\n static FUNCTION_NAMES = Object.freeze({\n DOWN: 'onDown',\n MOVE: 'onMove',\n DRAG: 'onDrag',\n LEAVE: 'onLeave',\n CLICK: 'onClick',\n CONTEXT_MENU: 'onContextMenu',\n DOUBLE_CLICK: 'onDoubleClick',\n UP: 'onUp',\n WHEEL: 'onWheel',\n });\n\n // What order this mouse handler should trigger in\n // Default to well below any of the GRID mouse handlers 100-1000+\n constructor(order = 5000) {\n this.order = order;\n }\n\n // Cursor to use if this returns true from any function\n cursor = null;\n\n onDown(gridPoint, grid, event) {\n return false;\n }\n\n onMove(gridPoint, grid, event) {\n return false;\n }\n\n onDrag(gridPoint, grid, event) {\n return false;\n }\n\n onLeave(gridPoint, grid, event) {\n return false;\n }\n\n onClick(gridPoint, grid, event) {\n return false;\n }\n\n onContextMenu(gridPoint, grid, event) {\n return false;\n }\n\n onDoubleClick(gridPoint, grid, event) {\n return false;\n }\n\n onUp(gridPoint, grid, event) {\n return false;\n }\n\n onWheel(gridPoint, grid, event) {\n return false;\n }\n}\n\nexport default GridMouseHandler;\n"],"file":"GridMouseHandler.js"}
1
+ {"version":3,"sources":["../src/GridMouseHandler.ts"],"names":["GridMouseHandler","constructor","order","onDown","gridPoint","grid","event","onMove","onDrag","onLeave","onClick","onContextMenu","onDoubleClick","onUp","onWheel"],"mappings":";;AAAA;;AACA;;AAKA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAN,CAAuB;AAG5B;AACA;AACAC,EAAAA,WAAW,GAAe;AAAA,QAAdC,KAAc,uEAAN,IAAM;;AAAA;;AAAA,oCAKF,IALE;;AACxB,SAAKA,KAAL,GAAaA,KAAb;AACD,GAP2B,CAS5B;;;AAGAC,EAAAA,MAAM,CACJC,SADI,EAEJC,IAFI,EAGJC,KAHI,EAIgB;AACpB,WAAO,KAAP;AACD;;AAEDC,EAAAA,MAAM,CACJH,SADI,EAEJC,IAFI,EAGJC,KAHI,EAIgB;AACpB,WAAO,KAAP;AACD;;AAEDE,EAAAA,MAAM,CACJJ,SADI,EAEJC,IAFI,EAGJC,KAHI,EAIgB;AACpB,WAAO,KAAP;AACD;;AAEDG,EAAAA,OAAO,CACLL,SADK,EAELC,IAFK,EAGLC,KAHK,EAIe;AACpB,WAAO,KAAP;AACD;;AAEDI,EAAAA,OAAO,CACLN,SADK,EAELC,IAFK,EAGLC,KAHK,EAIe;AACpB,WAAO,KAAP;AACD;;AAEDK,EAAAA,aAAa,CACXP,SADW,EAEXC,IAFW,EAGXC,KAHW,EAIS;AACpB,WAAO,KAAP;AACD;;AAEDM,EAAAA,aAAa,CACXR,SADW,EAEXC,IAFW,EAGXC,KAHW,EAIS;AACpB,WAAO,KAAP;AACD;;AAEDO,EAAAA,IAAI,CACFT,SADE,EAEFC,IAFE,EAGFC,KAHE,EAIkB;AACpB,WAAO,KAAP;AACD;;AAEDQ,EAAAA,OAAO,CACLV,SADK,EAELC,IAFK,EAGLC,KAHK,EAIe;AACpB,WAAO,KAAP;AACD;;AAlF2B;AAqF9B,eAAeN,gBAAf","sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\nimport { EventHandlerResult } from './EventHandlerResult';\nimport Grid from './Grid';\nimport { GridPoint } from './GridUtils';\n\n/**\n * Some events we listen to are a native mouse event, and others are wrapped with React's SyntheticEvent.\n * The GridMouseHandler shouldn't care though - the properties it accesses should be common on both types of events.\n */\nexport type GridMouseEvent = MouseEvent | React.MouseEvent;\n\nexport type GridMouseHandlerFunctionName =\n | 'onDown'\n | 'onMove'\n | 'onDrag'\n | 'onLeave'\n | 'onClick'\n | 'onContextMenu'\n | 'onDoubleClick'\n | 'onUp'\n | 'onWheel';\n\n/**\n * Define a region in the grid that interacts with the mouse on a grid.\n * Return true from any of the events to indicate they're consumed, and stopPropagation/preventDefault will be called.\n */\nexport class GridMouseHandler {\n order: number;\n\n // What order this mouse handler should trigger in\n // Default to well below any of the GRID mouse handlers 100-1000+\n constructor(order = 5000) {\n this.order = order;\n }\n\n // Cursor to use if this returns true from any function\n cursor: string | null = null;\n\n onDown(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onMove(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onDrag(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onLeave(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onClick(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onContextMenu(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onDoubleClick(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onUp(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n\n onWheel(\n gridPoint: GridPoint,\n grid: Grid,\n event: GridMouseEvent\n ): EventHandlerResult {\n return false;\n }\n}\n\nexport default GridMouseHandler;\n"],"file":"GridMouseHandler.js"}
@@ -19,7 +19,7 @@ export declare enum SELECTION_DIRECTION {
19
19
  LEFT = "LEFT",
20
20
  RIGHT = "RIGHT"
21
21
  }
22
- declare class GridRange {
22
+ export declare class GridRange {
23
23
  startColumn: GridRangeIndex;
24
24
  startRow: GridRangeIndex;
25
25
  endColumn: GridRangeIndex;
@@ -197,7 +197,7 @@ declare class GridRange {
197
197
  * @param row The row index
198
198
  * @returns True if the cell is within the provided ranges, false otherwise.
199
199
  */
200
- static containsCell(ranges: GridRange[], column: number, row: number): boolean;
200
+ static containsCell(ranges: GridRange[], column: GridRangeIndex, row: GridRangeIndex): boolean;
201
201
  /**
202
202
  * Iterate through each cell in the provided ranges
203
203
  * @param ranges The ranges to iterate through
@@ -1 +1 @@
1
- {"version":3,"file":"GridRange.d.ts","sourceRoot":"","sources":["../src/GridRange.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG,MAAM,GAAG,IAAI,CAAC;AAC3C,aAAK,SAAS,GAAG,cAAc,CAAC;AAChC,aAAK,UAAU,GAAG,cAAc,CAAC;AACjC,aAAK,QAAQ,GAAG,cAAc,CAAC;AAC/B,aAAK,WAAW,GAAG,cAAc,CAAC;AAElC,oBAAY,QAAQ,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,W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