@jielga/tmdatagrid 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -352,12 +352,19 @@ type TMDataGridEditRowProjection = {
352
352
  * reads a form's store directly - it is mounted for one cell at a time.
353
353
  */
354
354
  type TMDataGridEditState = {
355
- /** The cell whose editor is open; `columnId: null` is a whole row (row mode). */
355
+ /**
356
+ * The cell the last open gesture named - where the caret goes. In row mode
357
+ * the whole row is editing whatever this says, so there it is only the
358
+ * caret's cell, and `null` for the lane's pencil, which names no column.
359
+ */
356
360
  active: {
357
361
  rowId: string;
358
362
  columnId: string | null;
359
363
  } | null;
360
- /** Rows with a live form. In cell mode at most one; in batch, many. */
364
+ /**
365
+ * Rows with a live form. In cell mode at most one; in row, cellConfirm and
366
+ * batch, as many as the user opened - which rows are editing.
367
+ */
361
368
  openRowIds: ReadonlyArray<string>;
362
369
  rows: Record<string, TMDataGridEditRowProjection>;
363
370
  /** Phase 4 - rows being created, not yet in `data`. */
@@ -395,8 +402,13 @@ type TMDataGridEditorArgs = {
395
402
  cancel: () => void;
396
403
  size: TMDataGridSize;
397
404
  /**
398
- * Whether this editor should take the focus on mount. True for a single
399
- * opened cell; in row mode only the row's first editable cell gets it.
405
+ * @deprecated The grid places the caret itself, once per open gesture, so
406
+ * honouring this is optional and it will go in the next major. It focuses
407
+ * `data-dg-part="editor-input"` when the editor publishes it and the first
408
+ * focusable element inside the editor otherwise, which is why a custom
409
+ * editor that ignores this prop still gets the caret. False under
410
+ * `editMode: "row"`, where a whole row of editors is mounted at once and
411
+ * only the named cell may take it.
400
412
  */
401
413
  autoFocus: boolean;
402
414
  /**
@@ -471,7 +483,11 @@ type TMDataGridEditApi = {
471
483
  canEditCell: (row: ErasedRow, column: ErasedColumn) => boolean;
472
484
  /** Whether the row takes edits at all - the edit lane's pencil gate. */
473
485
  canEditRow: (row: ErasedRow) => boolean;
474
- /** Opens an editor. `columnId: null` opens the whole row (row mode). */
486
+ /**
487
+ * Opens an editor. In row mode the whole row opens either way and `columnId`
488
+ * only says which cell takes the caret; `null` (the lane's pencil) leaves it
489
+ * to the row's first editable cell.
490
+ */
475
491
  begin: (target: {
476
492
  rowId: string;
477
493
  columnId: string | null;