From 327b322b9583f760cd02ddad7a2a8890df26cc8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 23 Jun 2022 01:39:08 +0200 Subject: work --- static/vevent.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'static/vevent.ts') diff --git a/static/vevent.ts b/static/vevent.ts index 6a2c6f0f..a7f67a7f 100644 --- a/static/vevent.ts +++ b/static/vevent.ts @@ -555,3 +555,32 @@ function xml_to_vcal(xml: Element): VEvent { return new VEvent(property_map, component_list) } + + +class MultiInstanceVEvent extends VEvent { + + private base_event: VEvent | null = null; + private overlayProperties: Map; + + constructor(parent: VEvent) { + super(); + + this.base_event = parent; + + this.overlayProperties = new Map + + /* Add this to alternative set of parent */ + } + + setProperty(key: string, value: any, type?: ical_type) { + /* TODO type resolution a setPropertyInternal */ + this.overlayProperties.set(key.toUpperCase(), value); + } + + getProperty(key: string): any | any[] | undefined { + let a = this.overlayProperties.get(key.toUpperCase()) + if (a !== undefined) return a + return super.getProperty(key) + } + +} -- cgit v1.2.3