@guiexpert/table 1.1.90 → 1.1.91

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 (205) hide show
  1. package/README.md +3 -1
  2. package/css/main.css +50 -4
  3. package/css/table-classes.css +30 -0
  4. package/css/table-color-classes.css +3 -1
  5. package/css/table-color-vars.css +4 -2
  6. package/css/table-tree.css +13 -1
  7. package/index.cjs +80 -89
  8. package/index.d.ts +192 -184
  9. package/index.js +3229 -1580
  10. package/lib/common/debounce.d.ts +1 -0
  11. package/lib/common/decorator/avoid-double-execution.decorator.d.ts +2 -0
  12. package/lib/common/escape-html.d.ts +22 -0
  13. package/lib/common/generator/column-def-generator-service.d.ts +2 -1
  14. package/lib/common/generator/domain/property-type.d.ts +19 -0
  15. package/lib/common/generator/domain/value-info.d.ts +2 -1
  16. package/lib/common/generator/json-service.d.ts +1 -0
  17. package/lib/common/generator/property-type.service.d.ts +3 -2
  18. package/lib/common/generator/scheme-generator-service.d.ts +3 -1
  19. package/lib/common/generator/string-util.d.ts +7 -0
  20. package/lib/common/throttle.d.ts +1 -0
  21. package/lib/table/action/action-id.type.d.ts +5 -1
  22. package/lib/table/action/on-action-triggered.if.d.ts +2 -1
  23. package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +3 -1
  24. package/lib/table/action/shortcut-actionid-mapping.type.d.ts +3 -1
  25. package/lib/table/action/shortcut-util.d.ts +12 -0
  26. package/lib/table/action/shortcut.service.d.ts +5 -3
  27. package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +3 -1
  28. package/lib/table/aria/aria-grid-info.d.ts +76 -0
  29. package/lib/table/aria/aria-ids.d.ts +56 -0
  30. package/lib/table/aria/aria-texts.d.ts +34 -0
  31. package/lib/table/aria/aria-texts.if.d.ts +88 -0
  32. package/lib/table/aria/live-announcer.d.ts +53 -0
  33. package/lib/table/aria/tree-aria-info.d.ts +58 -0
  34. package/lib/table/checkbox/all-rows-checkbox-model.d.ts +31 -0
  35. package/lib/table/checkbox/checkbox-model.d.ts +3 -2
  36. package/lib/table/checkbox/checkbox-model.if.d.ts +2 -1
  37. package/lib/table/checkbox/tree-checkbox-model.d.ts +19 -4
  38. package/lib/table/color/color-rgb.d.ts +2 -1
  39. package/lib/table/color/color-rgb.if.d.ts +2 -0
  40. package/lib/table/color/ge-css-color-util.d.ts +25 -2
  41. package/lib/table/color/three-color-gradient-arg.d.ts +3 -2
  42. package/lib/table/color/three-color-gradient-arg.if.d.ts +3 -1
  43. package/lib/table/color/two-color-gradient-arg.d.ts +3 -2
  44. package/lib/table/color/two-color-gradient-arg.if.d.ts +3 -1
  45. package/lib/table/crud/column-widths.d.ts +2 -1
  46. package/lib/table/crud/column-widths.if.d.ts +1 -0
  47. package/lib/table/crud/crud-action.d.ts +1 -0
  48. package/lib/table/crud/crud-object-edit.d.ts +25 -3
  49. package/lib/table/crud/crud-object-view.d.ts +6 -0
  50. package/lib/table/crud/crud-options.d.ts +35 -4
  51. package/lib/table/crud/crud-options.if.d.ts +3 -2
  52. package/lib/table/crud/crud-table-model-factory.d.ts +64 -8
  53. package/lib/table/crud/url-info.d.ts +2 -1
  54. package/lib/table/crud/url-info.if.d.ts +1 -0
  55. package/lib/table/crud/urls.if.d.ts +2 -1
  56. package/lib/table/css-vars.d.ts +1 -0
  57. package/lib/table/data/chunk/chunk.data-event.d.ts +3 -2
  58. package/lib/table/data/chunk/chunk.data-event.if.d.ts +2 -1
  59. package/lib/table/data/chunk/request-chunk.d.ts +2 -1
  60. package/lib/table/data/chunk/request-chunk.if.d.ts +1 -0
  61. package/lib/table/data/common/aligns.d.ts +18 -0
  62. package/lib/table/data/common/area-map-factory.d.ts +3 -2
  63. package/lib/table/data/common/area-map.d.ts +3 -1
  64. package/lib/table/data/common/area-map.type.d.ts +1 -0
  65. package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +6 -4
  66. package/lib/table/data/common/args-render-cell-div.d.ts +5 -3
  67. package/lib/table/data/common/boolean-function.d.ts +10 -0
  68. package/lib/table/data/common/cell-range.d.ts +16 -7
  69. package/lib/table/data/common/checkbox-column-def.d.ts +6 -4
  70. package/lib/table/data/common/checked-type.d.ts +2 -0
  71. package/lib/table/data/common/event/ge-cell-indices.d.ts +2 -0
  72. package/lib/table/data/common/event/ge-key-event.d.ts +2 -0
  73. package/lib/table/data/common/event/ge-model-change-event.d.ts +16 -2
  74. package/lib/table/data/common/event/ge-mouse-event.d.ts +52 -4
  75. package/lib/table/data/common/event/ge-scroll-event.d.ts +27 -1
  76. package/lib/table/data/common/event/input/table-cell-update-event.d.ts +14 -10
  77. package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +3 -1
  78. package/lib/table/data/common/filter-function.d.ts +2 -0
  79. package/lib/table/data/common/get-t.d.ts +2 -0
  80. package/lib/table/data/common/index-and-px.d.ts +2 -0
  81. package/lib/table/data/common/size-unit.type.d.ts +2 -0
  82. package/lib/table/data/common/size.d.ts +13 -2
  83. package/lib/table/data/common/size.if.d.ts +3 -1
  84. package/lib/table/data/common/sizes.d.ts +133 -1
  85. package/lib/table/data/common/sort-item.d.ts +16 -3
  86. package/lib/table/data/common/sort-state.type.d.ts +2 -0
  87. package/lib/table/data/common/tree-arrow.type.d.ts +2 -0
  88. package/lib/table/data/common/tree-row-if.d.ts +22 -1
  89. package/lib/table/data/common/tree-row.d.ts +3 -1
  90. package/lib/table/data/common/value-label.d.ts +2 -1
  91. package/lib/table/data/common/value-label.if.d.ts +1 -0
  92. package/lib/table/data/div-scope.type.d.ts +2 -0
  93. package/lib/table/data/event/mouse-target-data.d.ts +5 -3
  94. package/lib/table/data/geo-data.d.ts +2 -0
  95. package/lib/table/data/options/auto-restore-options.d.ts +32 -1
  96. package/lib/table/data/options/auto-restore-options.if.d.ts +8 -0
  97. package/lib/table/data/options/default-row-heights.d.ts +20 -2
  98. package/lib/table/data/options/default-row-heights.if.d.ts +4 -1
  99. package/lib/table/data/options/header-group-options.d.ts +3 -2
  100. package/lib/table/data/options/header-group-options.if.d.ts +3 -4
  101. package/lib/table/data/options/icon.d.ts +2 -1
  102. package/lib/table/data/options/icon.if.d.ts +2 -0
  103. package/lib/table/data/options/sorted-options.d.ts +3 -2
  104. package/lib/table/data/options/sorted-options.if.d.ts +3 -1
  105. package/lib/table/data/options/table-options.d.ts +37 -13
  106. package/lib/table/data/options/table-options.if.d.ts +117 -44
  107. package/lib/table/data/options/tree-options.d.ts +3 -2
  108. package/lib/table/data/options/tree-options.if.d.ts +3 -1
  109. package/lib/table/data/side-ident.type.d.ts +2 -0
  110. package/lib/table/data/table-model-and-options.d.ts +5 -3
  111. package/lib/table/data/table-model-and-options.if.d.ts +4 -2
  112. package/lib/table/data/tablemodel/area-ident.type.d.ts +4 -0
  113. package/lib/table/data/tablemodel/areamodel/abstract-area-model.d.ts +10 -9
  114. package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +6 -4
  115. package/lib/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +13 -12
  116. package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +9 -7
  117. package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +16 -14
  118. package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +35 -31
  119. package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +153 -11
  120. package/lib/table/data/tablemodel/areamodel/area-model.d.ts +66 -104
  121. package/lib/table/data/tablemodel/areamodel/area-model.if.d.ts +56 -50
  122. package/lib/table/data/tablemodel/areamodel/async-area-model-object-array.d.ts +5 -5
  123. package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +14 -3
  124. package/lib/table/data/tablemodel/areamodel/cover-grid-body-model.d.ts +10 -8
  125. package/lib/table/data/tablemodel/areamodel/has-default-row-height-if.d.ts +1 -0
  126. package/lib/table/data/tablemodel/areamodel/object-array-holder.if.d.ts +1 -0
  127. package/lib/table/data/tablemodel/cellgroup/cell-group-ext.d.ts +3 -2
  128. package/lib/table/data/tablemodel/cellgroup/cell-group.d.ts +2 -1
  129. package/lib/table/data/tablemodel/cellgroup/cell-group.if.d.ts +28 -0
  130. package/lib/table/data/tablemodel/cellgroup/cellgroup-factory.d.ts +4 -3
  131. package/lib/table/data/tablemodel/column/column-def.d.ts +67 -10
  132. package/lib/table/data/tablemodel/column/column-def.if.d.ts +63 -96
  133. package/lib/table/data/tablemodel/column/column-visibility.d.ts +6 -0
  134. package/lib/table/data/tablemodel/cover-grid-table-model.d.ts +11 -10
  135. package/lib/table/data/tablemodel/padding.d.ts +2 -0
  136. package/lib/table/data/tablemodel/table-model.d.ts +75 -14
  137. package/lib/table/data/tablemodel/table-model.if.d.ts +52 -8
  138. package/lib/table/ele-scope.d.ts +36 -5
  139. package/lib/table/event-adapter.d.ts +17 -10
  140. package/lib/table/event-checkbox-changed-handler.d.ts +2 -1
  141. package/lib/table/event-listener.if.d.ts +42 -9
  142. package/lib/table/factory/cover-grid-factory.d.ts +4 -3
  143. package/lib/table/factory/table-factory.d.ts +103 -64
  144. package/lib/table/factory/tree-factory.d.ts +45 -3
  145. package/lib/table/focus/event-focus-changed-listener.if.d.ts +5 -3
  146. package/lib/table/focus/focus-model.d.ts +7 -5
  147. package/lib/table/focus/focus-model.if.d.ts +22 -1
  148. package/lib/table/focus/focus.type.d.ts +2 -0
  149. package/lib/table/input-handler.d.ts +5 -1
  150. package/lib/table/instanceof-workaround.d.ts +16 -0
  151. package/lib/table/license-manager.d.ts +2 -0
  152. package/lib/table/mouse-handler.d.ts +18 -9
  153. package/lib/table/render-scope.d.ts +115 -25
  154. package/lib/table/renderer/action/action-event-listener.if.d.ts +2 -1
  155. package/lib/table/renderer/action/action-event.d.ts +4 -3
  156. package/lib/table/renderer/action/action-event.if.d.ts +2 -1
  157. package/lib/table/renderer/action/actions-cell-renderer.d.ts +8 -7
  158. package/lib/table/renderer/cell-group-ext-cell-renderer.d.ts +8 -7
  159. package/lib/table/renderer/cell-render.if.d.ts +41 -4
  160. package/lib/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +7 -5
  161. package/lib/table/renderer/checkbox-cell-renderer.d.ts +8 -5
  162. package/lib/table/renderer/date-to-int-date-cell-renderer.d.ts +6 -5
  163. package/lib/table/renderer/date-to-iso-cell-renderer.d.ts +6 -5
  164. package/lib/table/renderer/date-to-locale-date-cell-renderer.d.ts +6 -5
  165. package/lib/table/renderer/date-to-tec-cell-renderer.d.ts +6 -5
  166. package/lib/table/renderer/edit/edit-cell-renderer.type.d.ts +2 -1
  167. package/lib/table/renderer/edit/edit-input-pipe-for-number.d.ts +2 -1
  168. package/lib/table/renderer/edit/edit-input-pipe.if.d.ts +2 -0
  169. package/lib/table/renderer/edit/input-cell-renderer.d.ts +6 -5
  170. package/lib/table/renderer/edit/select-cell-renderer.d.ts +7 -6
  171. package/lib/table/renderer/male-female-to-icon-cell-renderer.d.ts +19 -6
  172. package/lib/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +11 -6
  173. package/lib/table/renderer/number-cell-renderer.d.ts +6 -5
  174. package/lib/table/renderer/positive-and-negative-number-renderer.d.ts +6 -5
  175. package/lib/table/renderer/progress-bar-cell-renderer.d.ts +12 -6
  176. package/lib/table/renderer/renderer-cleanup-fn.type.d.ts +1 -0
  177. package/lib/table/renderer/renderer.d.ts +3 -2
  178. package/lib/table/renderer/simple-array-cell-renderer.d.ts +6 -5
  179. package/lib/table/renderer/star-rating-cell-renderer.d.ts +12 -6
  180. package/lib/table/renderer/true-false-cell-renderer.d.ts +17 -5
  181. package/lib/table/resize-handler.d.ts +3 -1
  182. package/lib/table/selection/event-selection-changed-listener.if.d.ts +2 -1
  183. package/lib/table/selection/multi-rows-selection-model.d.ts +7 -4
  184. package/lib/table/selection/selection-model.d.ts +112 -10
  185. package/lib/table/selection/selection-model.if.d.ts +48 -3
  186. package/lib/table/selection/selection-service.d.ts +35 -7
  187. package/lib/table/selection/selection.type.d.ts +3 -0
  188. package/lib/table/service/abstract-store-state.service.d.ts +1 -1
  189. package/lib/table/service/convenience-dom.service.d.ts +36 -13
  190. package/lib/table/service/copy-service.d.ts +18 -4
  191. package/lib/table/service/copy-service.if.d.ts +4 -3
  192. package/lib/table/service/data/collapsed-expanded.data.d.ts +1 -0
  193. package/lib/table/service/data/html-style.type.d.ts +1 -0
  194. package/lib/table/service/dom-service.if.d.ts +30 -0
  195. package/lib/table/service/excel-service.d.ts +24 -1
  196. package/lib/table/service/excel-service.if.d.ts +7 -0
  197. package/lib/table/service/ge-filter.service.d.ts +1 -0
  198. package/lib/table/service/simple-dom-service.d.ts +3 -1
  199. package/lib/table/service/store-state-collapsed-expand.service.d.ts +4 -3
  200. package/lib/table/service/store-state-scroll-pos.service.d.ts +3 -2
  201. package/lib/table/service/store-state-sorting.service.d.ts +4 -3
  202. package/lib/table/service/tree-row.service.d.ts +5 -1
  203. package/lib/table/table-api.d.ts +296 -550
  204. package/lib/table/table-scope.d.ts +213 -86
  205. package/package.json +23 -8
@@ -1,16 +1,23 @@
1
- import { GeModelChangeEvent } from './data/common/event/ge-model-change-event';
2
- import { GeMouseEvent } from './data/common/event/ge-mouse-event';
3
- import { GeScrollEvent } from './data/common/event/ge-scroll-event';
4
- import { EventListenerIf } from './event-listener.if';
5
- import { SelectionModelIf } from './selection/selection-model.if';
6
- import { FocusModelIf } from './focus/focus-model.if';
1
+ import { GeModelChangeEvent } from './data/common/event/ge-model-change-event.js';
2
+ import { GeMouseEvent } from './data/common/event/ge-mouse-event.js';
3
+ import { GeScrollEvent } from './data/common/event/ge-scroll-event.js';
4
+ import { EventListenerIf } from './event-listener.if.js';
5
+ import { SelectionModelIf } from './selection/selection-model.if.js';
6
+ import { FocusModelIf } from './focus/focus-model.if.js';
7
7
 
8
8
  /**
9
- * EventAdapter class implements the EventListenerIf interface.
10
- * It provides empty implementations for all the event listener methods.
9
+ * Empty implementation of {@link EventListenerIf} – extend it and override only the events you need.
11
10
  *
12
- * @class
13
- * @implements {EventListenerIf}
11
+ * @example
12
+ * class TreeEvents extends EventAdapter {
13
+ * override onCheckboxChanged(rows: any[]): void {
14
+ * console.log(`${rows.length} rows checked`);
15
+ * }
16
+ * }
17
+ *
18
+ * @see Training: [Events and a context menu of your own](https://gui.expert/training/events-and-context-menu/)
19
+ *
20
+ * @category Events
14
21
  */
15
22
  export declare class EventAdapter implements EventListenerIf {
16
23
  onCheckboxChanged(_evt: any[]): void;
@@ -1,5 +1,6 @@
1
- import { EventAdapter } from './event-adapter';
1
+ import { EventAdapter } from './event-adapter.js';
2
2
 
3
+ /** @category Events */
3
4
  export declare class EventCheckboxChangedHandler extends EventAdapter {
4
5
  private readonly onCheckboxChangedCallback;
5
6
  constructor(onCheckboxChangedCallback: (evt: any[]) => void);
@@ -1,25 +1,58 @@
1
- import { GeMouseEvent } from './data/common/event/ge-mouse-event';
2
- import { GeModelChangeEvent } from './data/common/event/ge-model-change-event';
3
- import { GeScrollEvent } from './data/common/event/ge-scroll-event';
4
- import { SelectionModelIf } from './selection/selection-model.if';
5
- import { FocusModelIf } from './focus/focus-model.if';
6
- import { EventFocusChangedListenerIf } from './focus/event-focus-changed-listener.if';
7
- import { EventSelectionChangedListenerIf } from './selection/event-selection-changed-listener.if';
1
+ import { GeMouseEvent } from './data/common/event/ge-mouse-event.js';
2
+ import { GeModelChangeEvent } from './data/common/event/ge-model-change-event.js';
3
+ import { GeScrollEvent } from './data/common/event/ge-scroll-event.js';
4
+ import { SelectionModelIf } from './selection/selection-model.if.js';
5
+ import { FocusModelIf } from './focus/focus-model.if.js';
6
+ import { EventFocusChangedListenerIf } from './focus/event-focus-changed-listener.if.js';
7
+ import { EventSelectionChangedListenerIf } from './selection/event-selection-changed-listener.if.js';
8
8
 
9
9
  /**
10
- * Interface representing an event listener.
10
+ * Receives the events of a table – the fifth argument of `new TableScope(…)`.
11
+ * Extend {@link EventAdapter} and override only the methods you need.
11
12
  *
12
- * @interface
13
+ * In the framework wrappers the same events arrive as callback props (`mouseClicked`, `selectionChanged` …),
14
+ * Vue events, Angular outputs or bubbling `CustomEvent`s of the Web Component.
15
+ *
16
+ * @example
17
+ * class OrderEvents extends EventAdapter {
18
+ * override onMouseClicked(evt: GeMouseEvent): void {
19
+ * if (evt.areaIdent === "body" && evt.clickCount === 2) {
20
+ * const order = tableModel.getBodyModel().getRowByIndex(evt.rowIndex); // displayed row → object
21
+ * console.log("double-click on", order);
22
+ * }
23
+ * }
24
+ * override onSelectionChanged(model: SelectionModelIf): void {
25
+ * console.log(model.getRanges());
26
+ * }
27
+ * }
28
+ * new TableScope(host, tableModel, new SimpleDomService(), new TableOptions(), new OrderEvents()).firstInit();
29
+ *
30
+ * @see Training: [Events and a context menu of your own](https://gui.expert/training/events-and-context-menu/)
31
+ *
32
+ * @category Events
13
33
  */
14
34
  export interface EventListenerIf extends EventFocusChangedListenerIf, EventSelectionChangedListenerIf {
35
+ /** Right-click on the table. Call `evt.originalEvent?.preventDefault()` to suppress the browser menu (e.g. for an own menu). */
15
36
  onContextmenu(evt: GeMouseEvent): void;
37
+ /** The mouse moved over the table (cell under the mouse in `evt`). Called often – keep it cheap. */
16
38
  onMouseMoved(evt: GeMouseEvent): void;
39
+ /** A drag with the mouse ended (column resize, column move or range selection). */
17
40
  onMouseDraggingEnd(evt: GeMouseEvent): void;
41
+ /** The mouse is being dragged; `evt.draggingX` / `evt.draggingY` hold the distance. */
18
42
  onMouseDragging(evt: GeMouseEvent): void;
43
+ /**
44
+ * A click on the table. A double-click on the same cell is reported again with `clickCount === 2`
45
+ * (after the first click with `clickCount === 1`).
46
+ */
19
47
  onMouseClicked(evt: GeMouseEvent): void;
48
+ /** Checked rows changed (row checkboxes, tree checkboxes) – the argument holds all checked rows. */
20
49
  onCheckboxChanged(evt: any[]): void;
50
+ /** Cells were edited – `evt.cells` holds row and column index of each; the new value is already in the model (your row object). */
21
51
  onModelChanged(evt: GeModelChangeEvent): void;
52
+ /** The table was scrolled. */
22
53
  onScroll(evt: GeScrollEvent): void;
54
+ /** The selection changed – read it from {@link SelectionModelIf.getRanges}. */
23
55
  onSelectionChanged(model: SelectionModelIf): void;
56
+ /** The focused cell changed – read it from {@link FocusModelIf.getFocus}. */
24
57
  onFocusChanged(model: FocusModelIf): void;
25
58
  }
@@ -1,7 +1,8 @@
1
- import { CoverGridTableModel } from '../data/tablemodel/cover-grid-table-model';
2
- import { CellRendererIf } from '../renderer/cell-render.if';
3
- import { TableOptionsIf } from '../data/options/table-options.if';
1
+ import { CoverGridTableModel } from '../data/tablemodel/cover-grid-table-model.js';
2
+ import { CellRendererIf } from '../renderer/cell-render.if.js';
3
+ import { TableOptionsIf } from '../data/options/table-options.if.js';
4
4
 
5
+ /** @category Table model */
5
6
  export declare class CoverGridFactory {
6
7
  static createCoverGridModel<T>(items: T[], cellRenderer: CellRendererIf, coverWidth?: number, coverHeight?: number, width?: number, firstRowPaddingTop?: number): CoverGridTableModel<T>;
7
8
  static createCoverGrisDefaultOptions(defaultRowHeight: number, getStorageKeyFn?: () => string): TableOptionsIf;
@@ -1,69 +1,123 @@
1
- import { AreaModelIf } from '../data/tablemodel/areamodel/area-model.if';
2
- import { DefaultRowHeightsIf } from '../data/options/default-row-heights.if';
3
- import { ColumnDefIf } from '../data/tablemodel/column/column-def.if';
4
- import { GetT } from '../data/common/get-t';
5
- import { TableOptionsIf } from '../data/options/table-options.if';
6
- import { TableModelIf } from '../data/tablemodel/table-model.if';
7
- import { TableModel } from '../data/tablemodel/table-model';
8
- import { SelectionModelIf } from '../selection/selection-model.if';
1
+ import { AreaModelIf } from '../data/tablemodel/areamodel/area-model.if.js';
2
+ import { DefaultRowHeightsIf } from '../data/options/default-row-heights.if.js';
3
+ import { ColumnDefIf } from '../data/tablemodel/column/column-def.if.js';
4
+ import { GetT } from '../data/common/get-t.js';
5
+ import { TableOptionsIf } from '../data/options/table-options.if.js';
6
+ import { TableModelIf } from '../data/tablemodel/table-model.if.js';
7
+ import { TableModel } from '../data/tablemodel/table-model.js';
8
+ import { SelectionModelIf } from '../selection/selection-model.if.js';
9
9
 
10
- export type CreateTableModelPara = {
10
+ /**
11
+ * Parameters of {@link TableFactory.createTableModel} – pass any subset (`Partial<CreateTableModelPara>`).
12
+ *
13
+ * Three typical combinations:
14
+ *
15
+ * | You have … | Pass | Training |
16
+ * |---|---|---|
17
+ * | an array of objects | `rows` (+ `properties` or `columnDefs`) | [chapter 12](https://gui.expert/training/array-to-table-model/), [13](https://gui.expert/training/column-definitions/) |
18
+ * | rows of values (CSV, matrix) | `headerData`, `bodyData`, `footerData`, `columnSizes` | [chapter 14](https://gui.expert/training/array-of-arrays/) |
19
+ * | own area models | `headerAreaModel`, `bodyAreaModel`, `footerAreaModel` + `columnDefs` | [chapter 15–17](https://gui.expert/training/custom-area-model/) |
20
+ *
21
+ * Everything not given is derived: column definitions from `properties` or the keys of the first row
22
+ * (header label = key in upper case, width 200 px), area models from the data, row heights from
23
+ * `tableOptions.defaultRowHeights`.
24
+ *
25
+ * @example
26
+ * const tableModel = TableFactory.createTableModel({
27
+ * rows: orders, // Order[]
28
+ * columnDefs: [new ColumnDef("id", "ID", px80, allRight), new ColumnDef("customer", "Customer", px180)],
29
+ * fixedLeftColumnCount: 1,
30
+ * tableOptions
31
+ * });
32
+ *
33
+ * @category Table model
34
+ */
35
+ export interface CreateTableModelPara {
36
+ /** Model of the header. Default: one header row from the `headerLabel`s of `columnDefs`, or `headerData`. */
11
37
  headerAreaModel: AreaModelIf;
38
+ /** Model of the body. Default: built from `rows` (objects or tree rows) or `bodyData`. See {@link AreaModel} for own models. */
12
39
  bodyAreaModel: AreaModelIf;
40
+ /** Model of the footer. Default: `footerData`, otherwise no footer. Totals that follow the filter: an own {@link AreaModel}. */
13
41
  footerAreaModel: AreaModelIf;
42
+ /** Number of columns fixed on the left (side "west"). Default 0. */
14
43
  fixedLeftColumnCount: number;
44
+ /** Number of columns fixed on the right (side "east"). Default 0. */
15
45
  fixedRightColumnCount: number;
46
+ /** Show a checkbox column for every row. Default false. */
16
47
  rowCheckboxVisible: boolean;
48
+ /** Row heights of header, body and footer in px. Default: `tableOptions.defaultRowHeights`, otherwise 34 / 34 / 34. */
17
49
  defaultRowHeights: DefaultRowHeightsIf;
50
+ /** The columns: property, header label, width, classes, renderers, sorting, editing. See {@link ColumnDef}. */
18
51
  columnDefs: ColumnDefIf[];
52
+ /** Column widths in px – the simple alternative to `columnDefs` (e.g. with `bodyData`). */
19
53
  columnSizes: number[];
54
+ /** A width in px for all columns; -1 (default) = use the column definitions. */
20
55
  overridingColumnWidth: number;
56
+ /** Number of columns. Default: derived from `columnDefs`, `headerData` or `columnSizes`. */
21
57
  columnCount: number;
58
+ /** Width of the parent element in px, used for percentage column widths before the first render (default 400). */
22
59
  parentSize: number;
60
+ /** Selection model factory. Default: `tableOptions.getSelectionModel`. */
23
61
  getSelectionModel: GetT<SelectionModelIf>;
62
+ /** The rows as objects (`T[]`) or tree rows from {@link TreeFactory.buildTreeRows}. */
24
63
  rows: any[];
64
+ /** Which properties of `rows` become columns, in this order (ignored if `columnDefs` is given). */
25
65
  properties: string[];
66
+ /** The body as rows of values (`any[][]`). */
26
67
  bodyData: any[][];
68
+ /** Header rows as values – several rows are possible. */
27
69
  headerData: string[][];
70
+ /** Footer rows as values (static – they don't follow filter or edits). */
28
71
  footerData: string[][];
72
+ /** Options of the table; the factory reads `defaultRowHeights`, `getSelectionModel` and `showCheckboxWihoutExtraColumn`. */
29
73
  tableOptions: TableOptionsIf;
30
- };
74
+ }
75
+ /**
76
+ * Creates {@link TableModelIf table models} from data – the usual way to start a table.
77
+ *
78
+ * - {@link createTableModel} – the universal entry point with named parameters ({@link CreateTableModelPara}).
79
+ * - {@link buildByTypedRows} – rows + column definitions (+ options, fixed columns).
80
+ * - {@link createByObjectArray} – rows + header/footer rows as data.
81
+ * - {@link createByAreaModels} – three area models of your own.
82
+ *
83
+ * Trees: build the rows with {@link TreeFactory.buildTreeRows} first, then pass them as `rows`.
84
+ *
85
+ * @example
86
+ * // all keys of the first row become columns
87
+ * const simple = TableFactory.createTableModel({ rows: orders });
88
+ *
89
+ * // choose and order the columns – typed
90
+ * const properties: (keyof Order)[] = ["id", "date", "customer", "total"];
91
+ * const selected = TableFactory.createTableModel({ rows: orders, properties });
92
+ *
93
+ * // rows of values with a header and a footer row
94
+ * const csv = TableFactory.createTableModel({
95
+ * headerData: [["ID", "City"]],
96
+ * bodyData: [[1, "Berlin"], [2, "Paris"]],
97
+ * footerData: [["", "2 rows"]],
98
+ * columnSizes: [80, 160]
99
+ * });
100
+ *
101
+ * @see Training: [Array&lt;T&gt; → TableModel](https://gui.expert/training/array-to-table-model/),
102
+ * [Array of arrays](https://gui.expert/training/array-of-arrays/)
103
+ *
104
+ * @category Table model
105
+ */
31
106
  export declare class TableFactory {
32
107
  /**
33
- * TableFactory
34
- *
35
- * This class is responsible for creating table models based on various
36
- * parameters and configurations. TableFactory provides different methods
37
- * to create these models that must comply with TableModelIf interface.
38
- *
39
- * Methods:
40
- *
41
- * createTableModel(p: Partial<{...}>): TableModelIf
42
- * Receives a set of parameters as a Partial object with a number of properties
43
- * and returns an instance of an object that complies to TableModelIf interface.
44
- * Refer to the method's documentation for details.
45
- *
46
- * buildByTypedRowsParam(param: {rows: T[]; columnDefs: ColumnDefIf[]; tableOptions?: TableOptionsIf; fixedLeftColumnCount?: number; fixedRightColumnCount?: number}): TableModelIf
47
- * Receives a parameter object with essential properties needed to build the table model,
48
- * including rows (type T array), column definitions (ColumnDefIf array),
49
- * optional table options (TableOptionsIf object), and optional fixed column counts,
50
- * and returns an instance of TableModelIf.
108
+ * Creates a table model from any subset of {@link CreateTableModelPara}.
109
+ * Missing parts are derived (see {@link CreateTableModelPara}).
51
110
  *
52
- * buildByTypedRows(rows: T[], columnDefs: ColumnDefIf[], tableOptions?: TableOptionsIf, fixedLeftColumnCount?: number, fixedRightColumnCount?: number): TableModelIf
53
- * Similar to `buildByTypedRowsParam` but accepts separate parameters instead of a single parameter object.
111
+ * @param p - rows, column definitions, area models, fixed columns, options …
112
+ * @returns the table model for `new TableScope(host, tableModel, …)` or the `tableModel` input of a framework wrapper
54
113
  *
55
- * createByObjectArrayParam(param: {rows: T[]; header?: string[][]; footer?: string[][]; fixedLeftColumnCount?: number; fixedRightColumnCount?: number; rowCheckboxVisible?: boolean; defaultRowHeights?: DefaultRowHeightsIf; columnDefs?: ColumnDefIf[]; columnSizes?: number[]}): TableModelIf
56
- * Similar to `createTableModel` but accepts an object parameter with properties required to create a table, including row data, header and footer multi-line data, fixed column counts, visibility of row checkbox, default row heights, column definitions, and column sizes, and returns a TableModelIf instance.
57
- *
58
- * createByAreaModels(headerAreaModel: AreaModelIf, bodyAreaModel: AreaModelIf, footerAreaModel: AreaModelIf, fixedLeftColumnCount: number, fixedRightColumnCount: number, rowCheckboxVisible: boolean, defaultRowHeights: DefaultRowHeightsIf): TableModelIf
59
- * Accepts area models for header, body, and footer, along with fixed column counts, visibility of row checkbox, and default row heights, to create a table model.
60
- *
61
- * createByAreaModelsParam(param: {headerAreaModel?: AreaModelIf; bodyAreaModel: AreaModelIf; footerAreaModel?: AreaModelIf; fixedLeftColumnCount?: number; fixedRightColumnCount?: number; rowCheckboxVisible?: boolean; defaultRowHeights?: DefaultRowHeightsIf; columnDefs?: ColumnDefIf[]; columnSizes?: number[]; overridingColumnWidth?: number; columnCount?: number}): TableModelIf
62
- * Similar to `createByAreaModels` but accepts an object parameter with the required and optional properties to create the table model.
63
- *
64
- * createByObjectArray(rows: T[], header: string[][], footer: string[][], fixedLeftColumnCount: number, fixedRightColumnCount: number, rowCheckboxVisible: boolean, defaultRowHeights: DefaultRowHeightsIf): TableModelIf
65
- * Allows to create a table model utilizing object array data for rows, header, and footer along with the specified configurations.
66
- * Please consult each method's documentation for detailed explanation of their functionality.
114
+ * @example
115
+ * const tableModel = TableFactory.createTableModel({
116
+ * rows: orders,
117
+ * columnDefs,
118
+ * fixedLeftColumnCount: 1,
119
+ * footerAreaModel: new OrderTotalsFooterModel(() => tableModel.getBodyModel())
120
+ * });
67
121
  */
68
122
  static createTableModel(p: Partial<CreateTableModelPara>): TableModelIf;
69
123
  /**
@@ -156,16 +210,8 @@ export declare class TableFactory {
156
210
  * rowCheckboxVisible: true,
157
211
  * defaultRowHeights: new DefaultRowHeights(40, 50, 40),
158
212
  * columnDefs: [
159
- * {
160
- * property: 'name',
161
- * headerLabel: 'Name',
162
- * width: 100
163
- * },
164
- * {
165
- * property: 'age',
166
- * headerLabel: 'Age',
167
- * width: 50
168
- * }
213
+ * new ColumnDef('name', 'Name', px100),
214
+ * new ColumnDef('age', 'Age', px50)
169
215
  * ],
170
216
  * columnSizes: [100, 50]
171
217
  * };
@@ -307,19 +353,12 @@ export declare class TableFactory {
307
353
  *
308
354
  * Note: You need to import the `AreaModelArrayOfArrays` and `AreaModelHidden` classes from the respective package/module before using this method.
309
355
  *
310
- * @example
311
- * ```typescript
312
- * // Given the following array of objects:
313
- * const rows = [{field1: 'data11', field2: 'data12'}, {field1: 'data21', field2: 'data22'}];
314
- *
315
- * // And a set of column definitions:
316
- * const columnDefs: ColumnDefIf[] = [{headerLabel: 'Field 1', property: 'field1'}, {headerLabel: 'Field 2', property: 'field2'}];
317
- *
318
- * // You can create a TableModel like following:
319
- * let tableModel = TableFactory.createByObjectArray(rows, undefined, undefined, 0, 0, false, new DefaultRowHeights(), columnDefs);
320
- * ```
356
+ * Simpler with named parameters: {@link createTableModel}.
321
357
  *
322
- * Reference: For more details regarding the `DefaultRowHeightsIf`, `ColumnDefIf`, `AreaModelIf`, and `AreaModelArrayOfArrays` classes/interfaces, please refer to the respective API documents.
358
+ * @example
359
+ * const rows = [{ field1: "data11", field2: "data12" }, { field1: "data21", field2: "data22" }];
360
+ * const columnDefs: ColumnDefIf[] = [new ColumnDef("field1", "Field 1"), new ColumnDef("field2", "Field 2")];
361
+ * const tableModel = TableFactory.createByObjectArray(rows, undefined, undefined, 0, 0, false, new DefaultRowHeights(), columnDefs);
323
362
  */
324
363
  static createByObjectArray<T>(rows: T[], header: string[][] | undefined, footer: string[][] | undefined, fixedLeftColumnCount: number | undefined, fixedRightColumnCount: number | undefined, rowCheckboxVisible: boolean | undefined, defaultRowHeights: DefaultRowHeightsIf | undefined, columnDefs: ColumnDefIf[], columnSizes?: number[]): TableModel;
325
364
  }
@@ -1,8 +1,10 @@
1
- import { TreeRowIf } from '../data/common/tree-row-if';
1
+ import { TreeRowIf } from '../data/common/tree-row-if.js';
2
2
 
3
3
  /**
4
4
  * Expanded state of a new tree row: a fixed value for all rows, or a function per row
5
5
  * (e.g. `(_data, deep) => deep < 1` → only the top level is open).
6
+ *
7
+ * @category Tree & checkboxes
6
8
  */
7
9
  export type TreeRowExpandedFn<T> = (data: T, deep: number) => boolean;
8
10
  /**
@@ -15,28 +17,68 @@ export type TreeRowExpandedFn<T> = (data: T, deep: number) => boolean;
15
17
  * @example
16
18
  * // open the first level only
17
19
  * TreeFactory.buildTreeRows(data, { expanded: (_row, deep) => deep === 0 });
20
+ *
21
+ * @category Tree & checkboxes
18
22
  */
19
23
  export interface TreeFactoryOptions<T> {
20
24
  /** Property that holds the child objects. Default: "children". */
21
25
  childrenProperty?: string;
22
26
  /** Expanded state of the rows. Default: true (everything open, as before). */
23
27
  expanded?: boolean | TreeRowExpandedFn<T>;
24
- /** Maximum depth. Default: 12. */
28
+ /** Maximum depth of a row (0 = top level only); deeper children are skipped with a console warning. Default: 12. */
25
29
  deepMaxLimit?: number;
26
30
  }
31
+ /**
32
+ * Turns hierarchical data into {@link TreeRow tree rows} for a tree table. Pass the result as `rows`
33
+ * to {@link TableFactory.createTableModel} – the factory then creates an {@link AreaModelTree}; the first
34
+ * column shows the arrows.
35
+ *
36
+ * @example
37
+ * interface Node { label: string; total: number; children?: Node[] }
38
+ *
39
+ * const rows = TreeFactory.buildTreeRows<Node>(nodes, {
40
+ * childrenProperty: "children",
41
+ * expanded: (row, deep) => deep === 0 // open only the first level
42
+ * });
43
+ * const tableModel = TableFactory.createTableModel({
44
+ * rows,
45
+ * columnDefs: [new ColumnDef("label", "Name", px300, bodyLeft), new ColumnDef("total", "Total", px120, allRight)]
46
+ * });
47
+ *
48
+ * @see Training: [Tree table with checkboxes](https://gui.expert/training/tree-table/)
49
+ *
50
+ * @category Tree & checkboxes
51
+ */
27
52
  export declare class TreeFactory {
28
53
  /**
29
54
  * Builds tree rows (input for `TableFactory.createTableModel({ rows })`) from nested objects.
30
55
  *
31
56
  * @param data - the top-level objects
32
57
  * @param childrenPropertyOrOptions - name of the children property (default "children") or {@link TreeFactoryOptions}
33
- * @param deepMaxLimit - maximum depth (default 12; ignored when options are passed)
58
+ * @param deepMaxLimit - maximum depth of a row, 0 = top level only (default 12; ignored when options are passed)
34
59
  * @param expanded - expanded state of the rows (default true; ignored when options are passed)
35
60
  *
36
61
  * @example
37
62
  * const rows = TreeFactory.buildTreeRows<OrderNode>(data, { childrenProperty: "children", expanded: false });
38
63
  */
39
64
  static buildTreeRows<T>(data: T[], childrenPropertyOrOptions?: string | TreeFactoryOptions<T>, deepMaxLimit?: number, expanded?: boolean | TreeRowExpandedFn<T>): TreeRowIf<T>[];
65
+ /**
66
+ * Appends the child rows of `data` (recursively) to `parent` – used by {@link buildTreeRows}.
67
+ * No row deeper than `deepMaxLimit` is created: the children of a row at depth `deepMaxLimit` are
68
+ * skipped with a console warning.
69
+ *
70
+ * @param data - the object whose children are added
71
+ * @param childrenProperty - name of the children property (default "children")
72
+ * @param parent - the tree row of `data` (default: a new, expanded top-level row)
73
+ * @param deep - depth of `parent` (0 = top level)
74
+ * @param deepMaxLimit - maximum depth of a created row (default 12)
75
+ * @param expanded - expanded state of the new rows (default true)
76
+ * @returns `parent`
77
+ *
78
+ * @example
79
+ * const root = TreeFactory.buildTreeRow<OrderNode>(nodes[0], "children");
80
+ * console.log(root.children?.length);
81
+ */
40
82
  static buildTreeRow<T>(data: T, childrenProperty?: string, parent?: TreeRowIf<T>, deep?: number, deepMaxLimit?: number, expanded?: boolean | TreeRowExpandedFn<T>): TreeRowIf<T>;
41
83
  private static toExpandedFn;
42
84
  }
@@ -1,4 +1,4 @@
1
- import { FocusModelIf } from './focus-model.if';
1
+ import { FocusModelIf } from './focus-model.if.js';
2
2
 
3
3
  /**
4
4
  * `EventFocusChangedListenerIf` is an interface that defines a contract for classes that wish to listen for changes in focus in a
@@ -29,11 +29,13 @@ import { FocusModelIf } from './focus-model.if';
29
29
  * ```
30
30
  *
31
31
  * ## See Also
32
- * - [FocusModelIf](./FocusModel.md) for focus management.
33
- * - [EventAdapter](./EventAdapter.md) for a class that implements this and other listener interfaces.
32
+ * - {@link FocusModelIf} for focus management.
33
+ * - {@link EventAdapter} for a class that implements this and other listener interfaces.
34
34
  *
35
35
  * @interface
36
36
  * @method onFocusChanged - method to be called with an instance of the `FocusModelIf` interface whenever a focus event occurs
37
+ *
38
+ * @category Events
37
39
  */
38
40
  export interface EventFocusChangedListenerIf {
39
41
  onFocusChanged(model: FocusModelIf): void;
@@ -1,6 +1,6 @@
1
- import { FocusType } from './focus.type';
2
- import { FocusModelIf } from './focus-model.if';
3
- import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if';
1
+ import { FocusType } from './focus.type.js';
2
+ import { FocusModelIf } from './focus-model.if.js';
3
+ import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if.js';
4
4
 
5
5
  /**
6
6
  * The `FocusModel` class is an implementation of the `FocusModelIf` interface.
@@ -40,11 +40,13 @@ import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if';
40
40
  * focusModel.setFocus(2, 3);
41
41
  * ```
42
42
  *
43
- * @see [FocusType](./FocusType.md)
44
- * @see [EventFocusChangedListenerIf](./EventFocusChangedListenerIf.md)
43
+ * @see {@link FocusType}
44
+ * @see {@link EventFocusChangedListenerIf}
45
45
  *
46
46
  * @class
47
47
  * @implements {FocusModelIf}
48
+ *
49
+ * @category Selection & focus
48
50
  */
49
51
  export declare class FocusModel implements FocusModelIf {
50
52
  selectionType: FocusType;
@@ -1,13 +1,34 @@
1
- import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if';
1
+ import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if.js';
2
2
 
3
+ /**
4
+ * The focused cell of a table (moved by click and arrow keys; F2 edits it). The implementation is {@link FocusModel};
5
+ * changes are reported to {@link EventListenerIf.onFocusChanged}.
6
+ *
7
+ * @example
8
+ * override onFocusChanged(model: FocusModelIf): void {
9
+ * const [row, col] = model.getFocus();
10
+ * console.log(`focus on row ${row}, column ${col}`);
11
+ * }
12
+ *
13
+ * @category Selection & focus
14
+ */
3
15
  export interface FocusModelIf {
16
+ /** The registered listeners. */
4
17
  getEventFocusChangedListeners(): EventFocusChangedListenerIf[];
18
+ /** Get notified when the focus moves. */
5
19
  addEventFocusChangedListener(listener: EventFocusChangedListenerIf): void;
20
+ /** Stop notifications. */
6
21
  removeEventFocusChangedListener(listener: EventFocusChangedListenerIf): void;
22
+ /** No cell has the focus afterwards. */
7
23
  clear(): void;
24
+ /** Moves the focus to a body cell. */
8
25
  setFocus(rowIndex: number, columnIndex: number): void;
26
+ /** Has this cell the focus? */
9
27
  hasFocus(rowIndex: number, columnIndex: number): boolean;
28
+ /** `[rowIndex, columnIndex]` of the focused cell (-1 if none). */
10
29
  getFocus(): [number, number];
30
+ /** Did the focus change since {@link clearChanged}? */
11
31
  hasChanged(): boolean;
32
+ /** Resets {@link hasChanged}. */
12
33
  clearChanged(): void;
13
34
  }
@@ -25,5 +25,7 @@
25
25
  * @see FocusModel#setFocus
26
26
  * @see FocusModelIf
27
27
  * @type
28
+ *
29
+ * @category Selection & focus
28
30
  */
29
31
  export type FocusType = "none" | "cell" | "row";
@@ -1,14 +1,18 @@
1
- import { TableScope } from './table-scope';
1
+ import { TableScope } from './table-scope.js';
2
2
 
3
3
  /**
4
4
  * Class representing an input handler for table input fields (HTMLSelectElement, HTMLTextAreaElement, HTMLInputElement).
5
5
  *
6
6
  * @class
7
7
  * @memberOf module:input
8
+ *
9
+ * @category Internals
8
10
  */
9
11
  export declare class InputHandler {
10
12
  protected tableScope: TableScope;
11
13
  constructor(tableScope: TableScope);
14
+ /** Escape in the cell editor cancels the editing: the old value stays, nothing is committed. */
15
+ private onHostElementKeyDown;
12
16
  /**
13
17
  * Handles the onHostElementChanged event.
14
18
  * In case that the element is an input field, the tableScope.updateModelValueAfterEdit() method is triggered.
@@ -4,6 +4,8 @@
4
4
  * @param {any} row - The row to be checked.
5
5
  *
6
6
  * @return {boolean} - true if the row is a tree row, false otherwise.
7
+ *
8
+ * @category Utilities
7
9
  */
8
10
  export declare function isTreeRow(row: any): boolean;
9
11
  /**
@@ -11,6 +13,8 @@ export declare function isTreeRow(row: any): boolean;
11
13
  *
12
14
  * @param {any} model - The model object to check.
13
15
  * @return {boolean} - True if the model is an AreaModelTree, false otherwise.
16
+ *
17
+ * @category Utilities
14
18
  */
15
19
  export declare function isAreaModelTree(model: any): boolean;
16
20
  /**
@@ -18,5 +22,17 @@ export declare function isAreaModelTree(model: any): boolean;
18
22
  *
19
23
  * @param {any} o - The object to be checked.
20
24
  * @returns {boolean} - True if the object is a CheckboxColumnDef, false otherwise.
25
+ *
26
+ * @category Utilities
27
+ */
28
+ /**
29
+ * True for a {@link CheckboxCellRenderer} – also from another copy of the core (no `instanceof`).
30
+ *
31
+ * @example
32
+ * isCheckboxCellRenderer(new CheckboxCellRenderer()); // true
33
+ *
34
+ * @since 1.1.91
35
+ * @category Utilities
21
36
  */
37
+ export declare function isCheckboxCellRenderer(o: any): boolean;
22
38
  export declare function isCheckboxColumnDef(o: any): boolean;
@@ -3,6 +3,8 @@
3
3
  * As it's a singleton class, it only allows one instance of itself to exist.
4
4
  *
5
5
  * Usage: LicenseManager.getInstance().setLicenseKey('Your API key');
6
+ *
7
+ * @category Table & API
6
8
  */
7
9
  export declare class LicenseManager {
8
10
  private static instance;
@@ -1,14 +1,18 @@
1
- import { TableScope } from './table-scope';
2
- import { GeMouseEvent } from './data/common/event/ge-mouse-event';
1
+ import { TableScope } from './table-scope.js';
2
+ import { GeMouseEvent } from './data/common/event/ge-mouse-event.js';
3
3
 
4
4
  /**
5
5
  * Class representing a MouseHandler.
6
6
  * @class
7
+ *
8
+ * @category Internals
7
9
  */
8
10
  export declare class MouseHandler {
9
11
  protected tableScope: TableScope;
10
12
  /**
11
- * Represents the delay in milliseconds between two consecutive double clicks.
13
+ * Programmatic clicks (`element.click()`, `event.detail === 0`): two clicks on the same cell within this delay (ms)
14
+ * count as a double click. Real mouse clicks use the click count of the browser (`event.detail`), i.e. the
15
+ * double-click speed of the operating system.
12
16
  *
13
17
  * @type {number}
14
18
  */
@@ -17,9 +21,11 @@ export declare class MouseHandler {
17
21
  startMouseEvent?: GeMouseEvent;
18
22
  geMouseEvent?: GeMouseEvent;
19
23
  geMouseEventOld?: GeMouseEvent;
20
- private expandedAll;
21
24
  private lastClickedCellKey;
25
+ /** The second click of a double click that was already reported (clickCount 2) – its "dblclick" is not. */
26
+ private reportedDoubleClick?;
22
27
  private mouseDown;
28
+ private repaintAfterMouseUp;
23
29
  private dragging;
24
30
  constructor(tableScope: TableScope);
25
31
  /**
@@ -39,6 +45,10 @@ export declare class MouseHandler {
39
45
  * @return {void}
40
46
  */
41
47
  private onHostElementClicked;
48
+ /** "area:row:column" of the cell of an event target ('' outside of a cell). */
49
+ private getCellKey;
50
+ /** A click that triggers an action on its own: row checkbox, tree arrow, "expand/collapse all", header group toggle. */
51
+ private isClickAction;
42
52
  /**
43
53
  * Handles the double click event on the host element.
44
54
  * This method is private.
@@ -56,12 +66,11 @@ export declare class MouseHandler {
56
66
  */
57
67
  private publishGeMouseEvent;
58
68
  /**
59
- * Update the collapsed/expanded state of a tree row.
60
- *
61
- * @param {TreeRowIf<any>} tr - The tree row object.
62
- * @returns {void}
69
+ * True if the click went to a form control, button, link or editable element inside the table (e.g. rendered by
70
+ * a custom cell renderer or the cell editor). Such a click must not repaint: the repaint re-creates the cells,
71
+ * the element would lose the focus and the user's input.
63
72
  */
64
- private updateCollapsedExpandedState;
73
+ private isInteractiveCellElement;
65
74
  private getArrowColumnIndex;
66
75
  private onMouseDown;
67
76
  private onMouseMove;