Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/ui-app/src/adapters/integrationsCatalog.ts
T
2026-07-08 16:15:37 +02:00

22 lines
926 B
TypeScript

import { toIntegrationCatalogModel, type IntegrationCatalogData, type IntegrationCatalogModel } from "@hivegrid/view-models";
import { renderIntegrationsCatalog } from "@hivegrid/ui-subframe";
import { defineAdapter } from "./defineAdapter.js";
/**
* Normalizes the domain {@link IntegrationCatalogData} into the
* {@link IntegrationCatalogModel} prop-model the UI implementation renders
* (M015). Reuses the VM's pure `toIntegrationCatalogModel` mapper so the
* Subframe / mock renderers stay dumb and swappable (M017 hot-swap drill).
* Backs the integrations catalog main view (R-P5, D-P5 A6).
*/
export function toIntegrationsCatalogProps(vm: IntegrationCatalogData): IntegrationCatalogModel {
return toIntegrationCatalogModel(vm);
}
export const integrationsCatalogAdapter = defineAdapter({
name: "integrationsCatalog",
toProps: toIntegrationsCatalogProps,
defaultRenderer: renderIntegrationsCatalog,
});