# Bone Flow #048 Table

Package documentation baseline: v1.0.32  
Runtime: BoneTable 1.0.16  
HTML Functional Class: `bf-table`

## Responsibility

#048 Table displays structured rows/columns and hosts Cell Renderers. #049 Grid owns cell editing, #073 Pagination owns page navigation, #121 Timeline owns time control, and #002 Bone Joint owns Joint/WAIT/FIFO/BLOCKED behavior.


## Parent snap / inheritParent

`inheritParent` is a formal Runtime-owned Table Property (`boolean`, default `true`). It controls **Table itself -> parent element** layout and is independent from Cell Renderer `snapToCell`.

- `true`: `bone-table--inherit-parent`, `data-inherit-parent="true"`, `width:100%`, `max-width:100%`.
- `false`: `bone-table--free`, `data-inherit-parent="false"`, `display:inline-block`, `width:auto`, `max-width:100%`; the inner table uses content width.
- Functional Class attribute: `data-table-inherit-parent="true|false"`.
- Formal source: `BoneTable.getPropertySchema()` / `getPropertyDefaults()` / `getPropertyDefinition("inheritParent")`.

Do not confuse this with `snapToCell`, which controls **Cell Renderer -> Table cell** fitting.

## Cell Element contract

Column default:

```json
{"key":"status","label":"状態","cellElement":{"renderer":"020","props":{"position":"center"},"snapToCell":true}}
```

Per-cell override:

```json
{"status":"重要","$cells":{"status":{"renderer":"017","props":{"tag":"strong"},"snapToCell":true}}}
```

`cellElement` contains `renderer / props / snapToCell`. `snapToCell` defaults to `true`.

## Cell Renderer Registry

Built-ins: `plain`, `017` Text, `018` Icon, `020` Label, `021` Shape, `029` NumberBox, `054` Display Timeline. Future UIs register through `BoneTable.registerCellRenderer()` instead of adding per-component branches to #048.

For #017 Text, #048 supplies an automatic unique DOM id per Table instance/row/column when the caller did not provide an explicit id.

A renderer may publish a static `propertySchema` or a provider function. The generic Table Property Editor generates only the selected renderer's properties and stores them in `cellElement.props`.

## #054 integration

#054 reads its Property Schema directly from `BoneDisplayTimeline.getPropertySchema()`. #048 does not duplicate the #054 property list.

For `timeAxisMode="group-first"`, #048 assigns sequential `groupIndex` values across #054 cells in the same column. A row-level `$cells.<key>.props.groupIndex` explicitly supplied by the caller overrides automatic assignment.

#054 uses `afterLayout()` after the Table is attached to the DOM, then rerenders on width changes so Shape Comment geometry is correct before user interaction. #048 does not force #054 height.

## Target column editing

The test-page Cell Element editor provides `+ / -`: add a column plus blank row fields, or remove the selected column plus matching row data and `$cells` overrides.

## Full guide

Use DOC-0048 for the complete Japanese/English operation guide, including Table properties, Columns, Rows, Cell Element, selected UI properties, future UI registration, security, QA, and Completion gates.


## Empty rows / structural renderers

`displayRowCount` is a non-negative integer minimum display-row count (0 = automatic). When `showEmptyRows` is true, missing rows are padded as value-less rows; real rows are never truncated.

`showEmptyRows` defaults to true. Empty rows retain Table grid lines. Normal value renderers stay empty; renderers registered with `renderEmpty:true` may still draw structural UI. #054 uses this for empty timeline grid display, and NumberBox voucher renderers can use the same contract for value-less voucher rulings.


## v1.0.24 Runtime Schema visibility
- The test page renders the formal Table Property definition directly from `BoneTable.getPropertySchema()`.
- Defaults come from `BoneTable.getPropertyDefaults()` and individual definitions from `BoneTable.getPropertyDefinition(key)`.
- The page does not maintain a duplicate handwritten Table schema.

## v1.0.24 tableStyle
正式Property `tableStyle` を追加。standard / striped / bordered / borderless / hover / compact / striped-hover / striped-bordered / compact-bordered の9種。個別 striped / hover / bordered / compact を明示した場合はPreset結果を上書きする。


## Automatic Cell Renderer Provider contract

- #048 does not compare consumer UI runtimes to hard-coded exact versions.
- Registered renderer runtime versions are resolved from the loaded component `componentId`.
- New conforming UIs expose `getTableCellRendererDefinition()` / `tableCellRendererDefinition` or call `BoneTable.registerCellRendererProvider()`.
- `BoneTable.discoverCellRenderers()` adds them without a #048 source change.
- `bone-table-cell-renderer-registry-change` updates the test-page selector and Used Components grid.


## #029 Voucher snap alignment (#048 v1.0.31)

For a `cellElement:{renderer:"029",snapToCell:true}`, #048 now owns full-height
cell alignment and the voucher's vertical line reach, even when neighboring
cells determine a taller Table row. The behavior is scoped to snapped #029
Table cells; neither `BoneNumberBox` nor non-snapped elements are modified.
The cell `td` exposes `data-cell-renderer="029"` for stable Table-owned styling.


<!-- #048 package 1.0.32; Runtime 1.0.16; #017 Text base preserved. -->
