Implement typed template library and rendering

This commit is contained in:
2026-08-02 12:38:38 +02:00
parent 142c3a26f1
commit b65b905b6e
28 changed files with 4385 additions and 104 deletions
+35
View File
@@ -0,0 +1,35 @@
import { createElement, lazy } from "react";
import type { PlatformWebModule } from "@govoplan/core-webui";
import "./styles/templates.css";
const TemplatesPage = lazy(() => import("./features/templates/TemplatesPage"));
const readScopes = [
"templates:template:read",
"templates:template:write",
"templates:template:publish",
"templates:template:render",
"templates:template:admin"
];
export const templatesModule: PlatformWebModule = {
id: "templates",
label: "Templates",
version: "0.1.14",
optionalDependencies: ["files", "dist_lists", "campaigns", "audit"],
navItems: [{
to: "/templates",
label: "Templates",
iconName: "layout-template",
anyOf: readScopes,
order: 75
}],
routes: [{
path: "/templates",
anyOf: readScopes,
order: 75,
render: ({ settings, auth }) => createElement(TemplatesPage, { settings, auth })
}]
};
export default templatesModule;