diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 01:25:00 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 01:25:00 +0200 |
commit | 7949fcdc683d07689bad5da5d20bfa3eeb5a6a46 (patch) | |
tree | c1bc39dc0e508ee498cf7119f888f513db4bab8f /static/ts/components.ts | |
parent | Add build step for jsdoc. (diff) | |
download | calp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.gz calp-7949fcdc683d07689bad5da5d20bfa3eeb5a6a46.tar.xz |
Move frontend code to subdirectories, to simplify command line flags.
Diffstat (limited to 'static/ts/components.ts')
-rw-r--r-- | static/ts/components.ts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/static/ts/components.ts b/static/ts/components.ts new file mode 100644 index 00000000..e5fabba6 --- /dev/null +++ b/static/ts/components.ts @@ -0,0 +1,40 @@ +import { ComponentDescription } from './components/vevent-description' +import { ComponentEdit } from './components/vevent-edit' +import { VEventDL } from './components/vevent-dl' +import { ComponentBlock } from './components/vevent-block' +import { DateTimeInput } from './components/date-time-input' +import { PopupElement } from './components/popup-element' +import { InputList } from './components/input-list' +import { EditRRule } from './components/edit-rrule' +import { TabGroupElement } from './components/tab-group-element' +import { VEventChangelog } from './components/changelog' +import { SliderInput } from './components/slider' +import { DateJump } from './components/date-jump' + +export { initialize_components } + +function initialize_components() { + + + /* These MUST be created AFTER vcal_objcets and event_calendar_mapping are + inistialized, since their constructors assume that that piece of global + state is available */ + customElements.define('vevent-description', ComponentDescription); + customElements.define('vevent-edit', ComponentEdit); + customElements.define('vevent-dl', VEventDL); + customElements.define('vevent-block', ComponentBlock); + customElements.define('vevent-edit-rrule', EditRRule); + + /* date-time-input should be instansiatable any time, but we do it here + becouse why not */ + + customElements.define('date-time-input', DateTimeInput /*, { extends: 'input' } */) + customElements.define('input-list', InputList); + customElements.define('slider-input', SliderInput); + customElements.define('date-jump', DateJump); + + /* These maybe also require that the global maps are initialized */ + customElements.define('popup-element', PopupElement) + customElements.define('tab-group', TabGroupElement) + customElements.define('vevent-changelog', VEventChangelog); +} |