@guiexpert/table 1.1.0 → 1.1.2

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 (68) hide show
  1. package/index.cjs +11 -11
  2. package/index.js +794 -338
  3. package/lib/table/action/action-id.type.d.ts +12 -0
  4. package/lib/table/action/on-action-triggered.if.d.ts +7 -0
  5. package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +5 -0
  6. package/lib/table/action/shortcut-actionid-mapping.type.d.ts +4 -0
  7. package/lib/table/action/shortcut.service.d.ts +3 -0
  8. package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +3 -0
  9. package/lib/table/color/color-rgb.if.d.ts +5 -0
  10. package/lib/table/color/three-color-gradient-arg.if.d.ts +5 -0
  11. package/lib/table/color/two-color-gradient-arg.if.d.ts +4 -0
  12. package/lib/table/data/common/aligns.d.ts +23 -0
  13. package/lib/table/data/common/area-map-factory.d.ts +6 -0
  14. package/lib/table/data/common/area-map.d.ts +7 -0
  15. package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +4 -0
  16. package/lib/table/data/common/args-render-cell-div.d.ts +17 -0
  17. package/lib/table/data/common/boolean-function.d.ts +12 -0
  18. package/lib/table/data/common/cell-range.d.ts +9 -0
  19. package/lib/table/data/common/checkbox-column-def.d.ts +5 -0
  20. package/lib/table/data/common/checked-type.d.ts +5 -0
  21. package/lib/table/data/common/event/ge-cell-indices.d.ts +3 -0
  22. package/lib/table/data/common/event/ge-key-event.d.ts +5 -0
  23. package/lib/table/data/common/event/ge-model-change-event.d.ts +3 -0
  24. package/lib/table/data/common/event/ge-mouse-event.d.ts +3 -0
  25. package/lib/table/data/common/event/input/table-cell-update-event.d.ts +12 -0
  26. package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +41 -0
  27. package/lib/table/data/common/filter-function.d.ts +8 -0
  28. package/lib/table/data/common/get-t.d.ts +6 -0
  29. package/lib/table/data/common/index-and-px.d.ts +3 -0
  30. package/lib/table/data/common/size.if.d.ts +4 -0
  31. package/lib/table/data/common/sort-item.d.ts +3 -0
  32. package/lib/table/data/common/sort-state.type.d.ts +6 -0
  33. package/lib/table/data/common/tree-arrow.type.d.ts +7 -0
  34. package/lib/table/data/common/tree-row-if.d.ts +3 -0
  35. package/lib/table/data/common/tree-row.d.ts +4 -0
  36. package/lib/table/data/div-scope.type.d.ts +9 -0
  37. package/lib/table/data/event/mouse-target-data.d.ts +3 -0
  38. package/lib/table/data/geo-data.d.ts +3 -0
  39. package/lib/table/data/options/icon.if.d.ts +13 -0
  40. package/lib/table/data/options/sorted-options.if.d.ts +4 -0
  41. package/lib/table/data/options/table-options.if.d.ts +186 -0
  42. package/lib/table/data/side-ident.type.d.ts +3 -0
  43. package/lib/table/data/table-model-and-options.d.ts +3 -0
  44. package/lib/table/data/table-model-and-options.if.d.ts +3 -0
  45. package/lib/table/data/tablemodel/area-ident.type.d.ts +1 -1
  46. package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +4 -0
  47. package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +1 -1
  48. package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +5 -0
  49. package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +4 -0
  50. package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +6 -0
  51. package/lib/table/data/tablemodel/areamodel/area-model.d.ts +3 -0
  52. package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +3 -0
  53. package/lib/table/data/tablemodel/column/column-def.d.ts +3 -0
  54. package/lib/table/data/tablemodel/column/column-def.if.d.ts +113 -0
  55. package/lib/table/data/tablemodel/padding.d.ts +3 -0
  56. package/lib/table/data/tablemodel/table-model.d.ts +186 -0
  57. package/lib/table/data/tablemodel/table-model.if.d.ts +165 -0
  58. package/lib/table/ele-scope.d.ts +4 -0
  59. package/lib/table/event-adapter.d.ts +7 -0
  60. package/lib/table/event-listener.if.d.ts +5 -0
  61. package/lib/table/input-handler.d.ts +14 -0
  62. package/lib/table/instanceof-workaround.d.ts +19 -0
  63. package/lib/table/mouse-handler.d.ts +38 -0
  64. package/lib/table/render-scope.d.ts +1 -1
  65. package/lib/table/renderer/edit/edit-input-pipe.if.d.ts +8 -0
  66. package/lib/table/table-api.d.ts +72 -0
  67. package/lib/table/table-scope.d.ts +148 -0
  68. package/package.json +1 -1
@@ -15,6 +15,11 @@ import { GeKeyEvent } from "./data/common/event/ge-key-event";
15
15
  import { OnActionTriggeredIf } from "./action/on-action-triggered.if";
16
16
  import { ActionId } from "./action/action-id.type";
17
17
  import { ShortcutService } from "./action/shortcut.service";
18
+ /**
19
+ * Class representing a TableScope.
20
+ * @extends RenderScope
21
+ * @implements OnActionTriggeredIf
22
+ */
18
23
  export declare class TableScope extends RenderScope implements OnActionTriggeredIf {
19
24
  protected readonly eventListener: EventListenerIf;
20
25
  mouseHandler: MouseHandler;
@@ -30,28 +35,171 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
30
35
  private mouseStartColumnIndex;
31
36
  private dragFrom;
32
37
  private dragTo;
38
+ /**
39
+ * Creates a TableScope instance.
40
+ *
41
+ * @param {HTMLDivElement} hostElement - The HTML div element that will contain the table.
42
+ * @param {TableModelIf} tableModel - The table model object.
43
+ * @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
44
+ * @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
45
+ * @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
46
+ *
47
+ * @return {TableScope} - The newly created TableScope instance.
48
+ */
33
49
  static create(hostElement: HTMLDivElement, tableModel: TableModelIf, tableOptions?: TableOptionsIf, eventListener?: EventListenerIf, domService?: DomServiceIf): TableScope;
34
50
  constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, domService: DomServiceIf, tableOptions: TableOptionsIf, eventListener: EventListenerIf);
35
51
  onActionTriggered(actionId: ActionId): boolean;
36
52
  updateModelValueAfterEdit(areaIdent: AreaIdent, rowIndex: number, columnIndex: number, value: string): void;
53
+ /**
54
+ * Retrieves the TableApi object.
55
+ *
56
+ * @return {TableApi} The TableApi object.
57
+ */
37
58
  getApi(): TableApi;
59
+ /**
60
+ * Initializes the table. Called by the table component.
61
+ *
62
+ * @function firstInit
63
+ * @memberof TableScope
64
+ *
65
+ * @returns {TableScope} This instance of the table scope.
66
+ */
38
67
  firstInit(): TableScope;
68
+ /**
69
+ * Creates a GeMouseEvent object based on a MouseEvent.
70
+ *
71
+ * @param {MouseEvent} mouseEvent - The MouseEvent object to create the GeMouseEvent from.
72
+ * @return {GeMouseEvent} - The created GeMouseEvent object.
73
+ */
39
74
  createGeMouseEvent(mouseEvent: MouseEvent): GeMouseEvent;
75
+ /**
76
+ * Handles the mouse down event.
77
+ *
78
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
79
+ * @return {void}
80
+ */
40
81
  onMouseDown(mouseEvent: GeMouseEvent): void;
82
+ /**
83
+ * Handles mouse dragging on the frame.
84
+ *
85
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
86
+ */
41
87
  mouseDraggingOnFrame(mouseEvent: GeMouseEvent): void;
88
+ /**
89
+ * Handles the end of mouse dragging event on a frame.
90
+ *
91
+ * @param {GeMouseEvent} mouseEvent - The mouse event object.
92
+ *
93
+ * @returns {void}
94
+ */
42
95
  mouseDraggingEndOnFrame(mouseEvent: GeMouseEvent): void;
96
+ /**
97
+ * Handles the mouse move event.
98
+ *
99
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
100
+ * @return {void}
101
+ */
43
102
  mouseMove(mouseMoveEvent: GeMouseEvent): void;
103
+ /**
104
+ * Triggers the context menu event based on the mouse move event.
105
+ *
106
+ * @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
107
+ * @return {void}
108
+ */
44
109
  contextmenu(mouseMoveEvent: GeMouseEvent): void;
110
+ /**
111
+ * Toggles the expand or collapse state of all items in the body area model.
112
+ *
113
+ * @param {boolean} [expand=true] - Whether to expand or collapse all items. Default is true.
114
+ *
115
+ * @return {void}
116
+ */
45
117
  toggleExpandCollapseAll(expand?: boolean): void;
118
+ /**
119
+ * Toggles the checkbox state of a specific row in a table.
120
+ *
121
+ * @param {number} rowIdx - The index of the row to toggle the checkbox state.
122
+ * @param {number} _colIdx - The index of the column. This parameter is unused.
123
+ * @param {AreaIdent} areaIdent - The identifier of the table area.
124
+ *
125
+ * @return {void} - This method does not return anything.
126
+ */
46
127
  toggleRowCheckbox(rowIdx: number, _colIdx: number, areaIdent: AreaIdent): void;
128
+ /**
129
+ * Handle mouse click events.
130
+ *
131
+ * @param {GeMouseEvent} evt - The mouse click event.
132
+ * @param {GeMouseEvent | undefined} previousEvt - The previous mouse click event, if any.
133
+ * @returns {void}
134
+ */
47
135
  onMouseClicked(evt: GeMouseEvent, previousEvt: GeMouseEvent | undefined): void;
136
+ /**
137
+ * Updates the table (repaint) when an external filter is changed.
138
+ *
139
+ * @param {boolean} clearSelection - Indicates whether to clear the selection model or not. Default value is true.
140
+ * @return {void}
141
+ */
48
142
  externalFilterChanged(clearSelection?: boolean): void;
143
+ /**
144
+ * Handle the double click event on the table header.
145
+ *
146
+ * @param {MouseEvent} event - The mouse event that triggered the double click.
147
+ * @param {number} _rowIdx - The row index of the header.
148
+ * @param {number} colIdx - The column index of the header.
149
+ *
150
+ * @return {void}
151
+ */
49
152
  onHeaderDblClicked(event: MouseEvent, _rowIdx: number, colIdx: number): void;
153
+ /**
154
+ * Changes the focus cell using the specified deltas.
155
+ *
156
+ * @param {number} dx - The delta for the column index.
157
+ * @param {number} dy - The delta for the row index.
158
+ * @return {boolean} - True if the focus cell was changed, false otherwise.
159
+ */
50
160
  private changeFocusCell;
161
+ /**
162
+ * Resizes the column based on the mouse event.
163
+ *
164
+ * @param {GeMouseEvent} mouseEvent - The mouse event that triggered the resize.
165
+ */
51
166
  private resizeColumn;
167
+ /**
168
+ * Clears the selection model, if available.
169
+ *
170
+ * @return {void}
171
+ */
52
172
  private clearSelectionModel;
53
173
  private debugOnce;
174
+ /**
175
+ * Restores the scroll position of the table if auto restore options are enabled.
176
+ *
177
+ * @private
178
+ * @memberof ClassName
179
+ *
180
+ * @returns {void}
181
+ */
54
182
  private autoRestoreScrollPosition;
183
+ /**
184
+ * Automatically restores the sorting state of the table.
185
+ *
186
+ * @private
187
+ * @function autoRestoreSortingState
188
+ * @memberof ClassName
189
+ *
190
+ * @description
191
+ * This method checks if the autoRestoreSortingState option is enabled in the tableOptions.
192
+ * If enabled, it uses the storeSortingService to retrieve the sort items array.
193
+ * If there are sort items present, it applies them to the table's body model using the doSort method.
194
+ *
195
+ * @returns {void}
196
+ */
55
197
  private autoRestoreSortingState;
198
+ /**
199
+ * Restores the collapsed/expanded state of the rows in the table based on the autoRestoreOptions
200
+ * specified in the tableOptions. This method is private and should not be called directly.
201
+ *
202
+ * @private
203
+ */
56
204
  private autoRestoreCollapsedExpandedState;
57
205
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/table",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },