feat: sync GridSmart agendas and use event-relative demo time

Support script and URL sources, automatic Sessionize polling, staff-linked service sessions, chronological agenda blocks, and inline Placeholders. Fix demo mode to use the active event date and document deployed behavior with regression coverage.
This commit is contained in:
Lago committed 2026-10-11 08:39:15 +02:00
1 parent 40f24cf5f7
commit c0fbf495dc
27 files changed
+1215 -60

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
export function normalizeSessionizeSource(value: string): string | null {
let source = value.trim();
if (!source) return null;
if (source.startsWith('<')) {
const document = new DOMParser().parseFromString(source, 'text/html');
const scripts = document.querySelectorAll('script[src]');
if (scripts.length !== 1) throw new Error('Paste one Sessionize script tag or URL');
source = scripts[0].getAttribute('src') || '';
}
let url: URL;
try { url = new URL(source); } catch { throw new Error('Enter a valid Sessionize URL or script tag'); }
if (url.protocol !== 'https:' || url.hostname !== 'sessionize.com' || url.port
|| url.username || url.password || !/^\/api\/v2\/[a-z0-9]+\/view\/(All|GridSmart)$/i.test(url.pathname)) {
throw new Error('Use a Sessionize HTTPS All or GridSmart endpoint');
}
url.search = '';
url.hash = '';
return url.href;
}