diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 01:39:08 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 01:39:08 +0200 |
commit | 327b322b9583f760cd02ddad7a2a8890df26cc8b (patch) | |
tree | d0a73d5df0011233f3eaa5d9a54d1317fad50bbc /static/vevent.ts | |
parent | Minor cleanup in recurrence generate. (diff) | |
download | calp-327b322b9583f760cd02ddad7a2a8890df26cc8b.tar.gz calp-327b322b9583f760cd02ddad7a2a8890df26cc8b.tar.xz |
workuid-stuff-2
Diffstat (limited to '')
-rw-r--r-- | static/vevent.ts | 29 |
1 files changed, 29 insertions, 0 deletions
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<string, VEventValue | VEventValue[]>; + + 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) + } + +} |