import { EditorProperties, EditorProperty } from "@iplusplus/y-model" export type PropertyGridValues = { property: EditorProperty value: unknown }[] export function getPropertyGridValues(data: Record, props: EditorProperties): PropertyGridValues { return props.map(p => ({ property: p, value: data[p.name] === undefined ? p.valueType.getDefaultValue() : data[p.name], })) }