V13-FE-006: consolidate approved UI and contract hardening
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s

This commit is contained in:
2026-08-13 02:41:00 +09:00
parent d79edae546
commit 3f293d8aa8
1278 changed files with 14384 additions and 1664 deletions
@@ -0,0 +1,20 @@
import type { KbxGridColumn } from '@shared/contracts/kbx-types'
import type { UiGridColumn } from './adapter/contracts'
/** Converts registry-owned KBX columns into the provider-neutral grid contract. */
export function toUiGridColumns(columns: readonly KbxGridColumn[]): UiGridColumn[] {
return columns.map(column => {
if (typeof column.field !== 'string') {
throw new Error(`Grid column field must be a string: ${String(column.field)}`)
}
return {
field: column.field,
header: column.header,
width: typeof column.width === 'number' ? column.width : undefined,
sortable: column.sortable,
filterable: column.filterable,
formatter: column.formatter,
}
})
}