Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/ui-app/src/adapters/taskList.ts
T

22 lines
800 B
TypeScript

import { toTaskListModel, type TaskListData, type TaskListModel } from "@toolctrl/view-models";
import { renderTaskList } from "@toolctrl/ui-subframe";
import { defineAdapter } from "./defineAdapter.js";
/**
* Normalizes the domain {@link TaskListData} into the {@link TaskListModel}
* prop-model the UI implementation renders (M015). Reuses the VM's pure
* `toTaskListModel` mapper so the Subframe / mock renderers stay dumb and
* swappable (M017 hot-swap drill). Backs both the standalone `/tasks` browser
* and the embedded entity "Tasks tab" (DoD 8).
*/
export function toTaskListProps(vm: TaskListData): TaskListModel {
return toTaskListModel(vm);
}
export const taskListAdapter = defineAdapter({
name: "taskList",
toProps: toTaskListProps,
defaultRenderer: renderTaskList,
});