From 410404cfdd54c083b6609fd52334e02d320145d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 10 Nov 2021 01:40:22 +0100 Subject: Re-modularize javascript. This moves almost everything out of globals.ts, into sepparate files. Things are still slightly to tightly coupled. But that is worked on. --- static/elements.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 static/elements.ts (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts new file mode 100644 index 00000000..06e0e31f --- /dev/null +++ b/static/elements.ts @@ -0,0 +1,30 @@ +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 { TabElement } from './components/tab-element' + +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); + + /* date-time-input should be instansiatable any time, but we do it here + becouse why not */ + + customElements.define('date-time-input', DateTimeInput /*, { extends: 'input' } */) + + /* These maybe also require that the global maps are initialized */ + customElements.define('popup-element', PopupElement) + customElements.define('tab-element', TabElement) +} -- cgit v1.2.3 From e1a05a727f91622bfcf2c7c9025592c51f1abd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 19 Nov 2021 16:43:12 +0100 Subject: Add input-list custom element. --- static/elements.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts index 06e0e31f..720f8abb 100644 --- a/static/elements.ts +++ b/static/elements.ts @@ -5,6 +5,7 @@ import { ComponentBlock } from './components/vevent-block' import { DateTimeInput } from './components/date-time-input' import { PopupElement } from './components/popup-element' import { TabElement } from './components/tab-element' +import { InputList } from './components/input-list' export { initialize_components } @@ -23,6 +24,7 @@ function initialize_components() { becouse why not */ customElements.define('date-time-input', DateTimeInput /*, { extends: 'input' } */) + customElements.define('input-list', InputList); /* These maybe also require that the global maps are initialized */ customElements.define('popup-element', PopupElement) -- cgit v1.2.3 From 3bd26b63adf49ec1b3f52897008738f13b864451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 19 Nov 2021 16:45:06 +0100 Subject: Add basic rrule tab. --- static/elements.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts index 720f8abb..db834fd9 100644 --- a/static/elements.ts +++ b/static/elements.ts @@ -6,6 +6,7 @@ import { DateTimeInput } from './components/date-time-input' import { PopupElement } from './components/popup-element' import { TabElement } from './components/tab-element' import { InputList } from './components/input-list' +import { EditRRule } from './components/edit-rrule' export { initialize_components } @@ -19,6 +20,7 @@ function initialize_components() { 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 */ -- cgit v1.2.3 From e7d80fcfa91f92c712110d58151df0f8f1e6ed86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 21 Nov 2021 16:08:08 +0100 Subject: Rework popup components. Previously popups were driven through some CSS hacks, which used labels with specific positioning, and z-index changes. This never really worked, and led the rest of the tree to be unmanagable. This commit replaces that system with a simpler one, which is being driven by javascript. This also allowed a much simpler tree, which allowed us to - make the popups rezisable (with a resize anchor) - move the window handle to above (configurable) - Add and remove tabs without having manually reflow where all labels are --- static/elements.ts | 2 -- 1 file changed, 2 deletions(-) (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts index db834fd9..b499556f 100644 --- a/static/elements.ts +++ b/static/elements.ts @@ -4,7 +4,6 @@ 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 { TabElement } from './components/tab-element' import { InputList } from './components/input-list' import { EditRRule } from './components/edit-rrule' @@ -30,5 +29,4 @@ function initialize_components() { /* These maybe also require that the global maps are initialized */ customElements.define('popup-element', PopupElement) - customElements.define('tab-element', TabElement) } -- cgit v1.2.3 From e71f0c20adc4dc2f49bca99a859241fdadf376d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 30 Nov 2021 01:09:53 +0100 Subject: Rework tab system. This sepparates popup-elements from their tabbed contents, allowing clearer sepparations of concerns, along with easier adding and removing of tabs to the tabset! --- static/elements.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts index b499556f..870a27e6 100644 --- a/static/elements.ts +++ b/static/elements.ts @@ -6,6 +6,7 @@ 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' export { initialize_components } @@ -29,4 +30,5 @@ function initialize_components() { /* These maybe also require that the global maps are initialized */ customElements.define('popup-element', PopupElement) + customElements.define('tab-group', TabGroupElement) } -- cgit v1.2.3 From 6c537f3f60aaac8ae850f8ecaefc2a0d04a8431e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 2 Dec 2021 01:51:28 +0100 Subject: Add basic changelog view --- static/elements.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/elements.ts') diff --git a/static/elements.ts b/static/elements.ts index 870a27e6..199839f6 100644 --- a/static/elements.ts +++ b/static/elements.ts @@ -7,6 +7,7 @@ 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' export { initialize_components } @@ -31,4 +32,5 @@ function initialize_components() { /* 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); } -- cgit v1.2.3