feat(calendar): expose an accessible calendar picker

This commit is contained in:
2026-07-20 17:01:26 +02:00
parent 2ad6e9d60e
commit 68b165db7b
10 changed files with 238 additions and 3 deletions
+9 -3
View File
@@ -1,7 +1,8 @@
import { createElement, lazy } from "react";
import type { PlatformWebModule } from "@govoplan/core-webui";
import type { CalendarPickerUiCapability, PlatformWebModule } from "@govoplan/core-webui";
import "./styles/calendar.css";
import { generatedTranslations } from "./i18n/generatedTranslations";
import CalendarPicker from "./features/calendar/CalendarPicker";
const CalendarPage = lazy(() => import("./features/calendar/CalendarPage"));
@@ -11,6 +12,8 @@ const translations = {
de: generatedTranslations.de
};
const calendarPicker: CalendarPickerUiCapability = { CalendarPicker };
export const calendarModule: PlatformWebModule = {
id: "calendar",
label: "i18n:govoplan-calendar.calendar.adab5090",
@@ -20,8 +23,11 @@ export const calendarModule: PlatformWebModule = {
translations,
navItems: [{ to: "/calendar", label: "i18n:govoplan-calendar.calendar.adab5090", iconName: "calendar", anyOf: eventRead, order: 55 }],
routes: [
{ path: "/calendar", anyOf: eventRead, order: 55, render: ({ settings, auth }) => createElement(CalendarPage, { settings, auth }) }]
{ path: "/calendar", anyOf: eventRead, order: 55, render: ({ settings, auth }) => createElement(CalendarPage, { settings, auth }) }],
uiCapabilities: {
"calendar.picker": calendarPicker
}
};
export default calendarModule;
export default calendarModule;