aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/javascript/components
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-12 23:29:06 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-13 02:26:51 +0100
commit5e4aa8e9aba34bb101923685c23f0f6681a12812 (patch)
tree0bed50b63266ab65931a027c59e7b901f06d9d82 /doc/ref/javascript/components
parentMade VEventComponent template optional. (diff)
downloadcalp-5e4aa8e9aba34bb101923685c23f0f6681a12812.tar.gz
calp-5e4aa8e9aba34bb101923685c23f0f6681a12812.tar.xz
Add documenttation for javascript rewrite.
Diffstat (limited to 'doc/ref/javascript/components')
-rw-r--r--doc/ref/javascript/components/changelog.texi10
-rw-r--r--doc/ref/javascript/components/date_time_input.texi34
-rw-r--r--doc/ref/javascript/components/edit_rrule.texi10
-rw-r--r--doc/ref/javascript/components/input_list.texi16
-rw-r--r--doc/ref/javascript/components/popup_element.texi40
-rw-r--r--doc/ref/javascript/components/tab_group_element.texi46
-rw-r--r--doc/ref/javascript/components/vevent.texi23
-rw-r--r--doc/ref/javascript/components/vevent_block.texi10
-rw-r--r--doc/ref/javascript/components/vevent_description.texi10
-rw-r--r--doc/ref/javascript/components/vevent_dl.texi11
-rw-r--r--doc/ref/javascript/components/vevent_edit.texi9
11 files changed, 219 insertions, 0 deletions
diff --git a/doc/ref/javascript/components/changelog.texi b/doc/ref/javascript/components/changelog.texi
new file mode 100644
index 00000000..d14fb84e
--- /dev/null
+++ b/doc/ref/javascript/components/changelog.texi
@@ -0,0 +1,10 @@
+@subsection Changelog
+
+@deftp {Web Component for VEvent} VEventChangelog
+@wcindex <vevent-changelog>
+@wcindex vevent-changelog
+@anchor{VEventChangelog}
+@code{<vevent-changelog>}
+
+Display of a VEvents changelog. @ref{ChangeLogEntry}
+@end deftp
diff --git a/doc/ref/javascript/components/date_time_input.texi b/doc/ref/javascript/components/date_time_input.texi
new file mode 100644
index 00000000..f26627d2
--- /dev/null
+++ b/doc/ref/javascript/components/date_time_input.texi
@@ -0,0 +1,34 @@
+@subsection date-time-input
+
+@deftp {Web Component} DateTimeInput
+@wcindex <date-time-input>
+@wcindex date-time-input
+@code {<date-time-input>}
+
+An element for input for date-times. Similar to
+@example
+<input type="date"/>
+<input type="time"/>
+@end example
+But as a single unit.
+
+@deftypeivar DateTimeInput boolean dateonly
+Setting this to true disabled the time part of the input, and makes
+any output only have date components (alternativly, the time component
+set to zero).
+@end deftypeivar
+
+@defcv {Attribute} DateTimeInput dateonly
+Same data as the field dateonly, but as an attribute. Present means
+true, absent means false.
+@end defcv
+
+@deftypeivar DateTimeInput Date value
+Returns current value as a Date object.
+@end deftypeivar
+
+@deftypeivar DateTimeInput string stringValue
+Returns current value as an ISO-8601 formatted string.
+@end deftypeivar
+
+@end deftp
diff --git a/doc/ref/javascript/components/edit_rrule.texi b/doc/ref/javascript/components/edit_rrule.texi
new file mode 100644
index 00000000..21437863
--- /dev/null
+++ b/doc/ref/javascript/components/edit_rrule.texi
@@ -0,0 +1,10 @@
+@subsection Edit RRule
+
+@deftp {Web Component for VEvent} EditRRule
+@wcindex <vevent-edit-rrule>
+@wcindex vevent-edit-rrule
+@code{<vevent-edit-rrule>}
+
+An edit form for a recurrence rule. Searches its template for elements
+with @code{[name="<<field name>>"]}, and binds to those.
+@end deftp
diff --git a/doc/ref/javascript/components/input_list.texi b/doc/ref/javascript/components/input_list.texi
new file mode 100644
index 00000000..bdc00ecb
--- /dev/null
+++ b/doc/ref/javascript/components/input_list.texi
@@ -0,0 +1,16 @@
+@subsection input_list.js
+
+@deftp {Web Component} InputList
+@wcindex <input-list>
+@wcindex input-list
+@code{<input-list>}
+
+A list of identical input fields, which forms a group. For example
+useful to handle keywords.
+
+@deftypeivar DateTimeInput {any[]} value
+The value from each element, except the last which should always be empty.
+Has an unspecified type, since children:s value field might give non-strings.
+@end deftypeivar
+
+@end deftp
diff --git a/doc/ref/javascript/components/popup_element.texi b/doc/ref/javascript/components/popup_element.texi
new file mode 100644
index 00000000..2b76b347
--- /dev/null
+++ b/doc/ref/javascript/components/popup_element.texi
@@ -0,0 +1,40 @@
+@subsection Popup
+
+@deftp {Web Component for VEvent} PopupElement
+@wcindex <popup-element>
+@wcindex popup-element
+@code{<popup-element>}
+
+A (small) floating window containing information, which can be dragged
+arround. Consists of a navigation bar with a few buttons for
+controlling the window, which also works as a drag handle, along with
+an area for contents, which can be resized by the user.
+
+Currently tightly coupled to VEvent's, since their color
+profile is derived from their owning events calendar, and they have
+action buttons for the event in their navigation bar.
+
+@deftypecv {Static Member} PopupElement {PopupElement?} activePopup
+The popup which was most recently interacted with by the user. Used to
+move it on top of all others, as well as sending relevant key events there.
+@end deftypecv
+
+@defcv {Attribute} PopupElement visible
+Present is the popup is currently visible, absent otherwise.
+@end defcv
+
+@deftypeivar PopupElement boolean visible
+See the attribute of the same name.
+@end deftypeivar
+
+@defmethod PopupElement maximize
+Resize the popup window to fill the current viewport (mostly). Is
+probably bonud to the maximize button in the navigation bar.
+@end defmethod
+@end deftp
+
+@deftypefun PopupElement setup_popup_element VEvent
+Create a new popup element for the given VEvent, and ready it for
+editing the event. Used when creating event (through the frontend).
+The return value can safely be ignored.
+@end deftypefun
diff --git a/doc/ref/javascript/components/tab_group_element.texi b/doc/ref/javascript/components/tab_group_element.texi
new file mode 100644
index 00000000..7d9ca412
--- /dev/null
+++ b/doc/ref/javascript/components/tab_group_element.texi
@@ -0,0 +1,46 @@
+@subsection Tab Group Element
+
+@deftp {Web Component for VEvent} TabGroupElement
+@wcindex <tab-group>
+@wcindex tab-group
+@code{<tab-group>}
+
+A group of tabs, where only one can be visible at a time.
+
+@c TODO which form does the HTML document have? For CSS purposes
+
+Each tab consists of two parts, a label which is used for selecting
+it, and a tab-element, which contains the actual content. These two
+should refer to each other as follows:
+
+@verbatim
++---------------+ +----------------+
+| TabLabel | | Tab |
++---------------+ +----------------+
+| id |<----| aria-labeledby |
+| aria-controls |---->| id |
++---------------+ +----------------+
+@end verbatim
+
+Further information about tabs in HTML can be found here:
+@url{https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role}
+
+@defvr {CSS Variable} {--tabcount}
+Each tab element has the style property @code{--tabcount} set to how
+many tabs it has. This is mostly useful to make sure the tab context
+is large enough to fit all tab labels without overflowing.
+@end defvr
+
+@deftypemethod TabGroupElement void addTab {HTMLElement} {label: string?} {title: string?}
+Adds a new tab to the group. The first parameter will make up the body
+of the tab. The label is whath should be shown in the tab selector,
+but defaults to the first letter of the text content of the body node.
+Title is the hoover text of the label.
+@end deftypemethod
+
+@deftypemethod TabGroupElement void removeTab {HTMLElement}
+HTMLElement must be one of the tab bodies in this group. This method
+removes it, along with its TabLabel.
+@end deftypemethod
+
+@end deftp
diff --git a/doc/ref/javascript/components/vevent.texi b/doc/ref/javascript/components/vevent.texi
new file mode 100644
index 00000000..be53a46e
--- /dev/null
+++ b/doc/ref/javascript/components/vevent.texi
@@ -0,0 +1,23 @@
+@subsection vevent
+
+@deftp {Abstract Web Component} ComponentVEvent {uid: string?}
+
+@c TODO what is done in the default constructor,
+@c and the default connectedCallback
+
+This registeres itself, but doesn't redraw
+We do however redraw in connectedCallback
+
+@deftypeivar ComponentVEvent uid uid
+@end deftypeivar
+
+@deftypeivar ComponentVEvent {HTMLTemplateElement?} template
+@end deftypeivar
+
+@deftypemethod ComponentVEvent void redraw (data: VEvent)
+While abstract for this, @emph{must} be overridden for everyone else
+@end deftypemethod
+@end deftp
+
+Note that many of these assume that their initial children are
+configured specifically, that is however not completely documented.
diff --git a/doc/ref/javascript/components/vevent_block.texi b/doc/ref/javascript/components/vevent_block.texi
new file mode 100644
index 00000000..1a0ef160
--- /dev/null
+++ b/doc/ref/javascript/components/vevent_block.texi
@@ -0,0 +1,10 @@
+@subsection VEvent Block
+
+@deftp {Web Component for VEvent} ComponentBlock
+@wcindex <vevent-block>
+@wcindex vevent-block
+@code{<vevent-block>}
+A block in our graphical view.
+
+Unique in that it works quite differently between the week and month view.
+@end deftp
diff --git a/doc/ref/javascript/components/vevent_description.texi b/doc/ref/javascript/components/vevent_description.texi
new file mode 100644
index 00000000..492c8dff
--- /dev/null
+++ b/doc/ref/javascript/components/vevent_description.texi
@@ -0,0 +1,10 @@
+@subsection VEvent Description
+
+@deftp {Web Component for VEvent} ComponentDescription
+@wcindex <vevent-description>
+@wcindex vevent-description
+@code{<vevent-description>}
+
+A text representation of a VEvent. Used as the summary tab of our
+popup windows, and in the sidebar.
+@end deftp
diff --git a/doc/ref/javascript/components/vevent_dl.texi b/doc/ref/javascript/components/vevent_dl.texi
new file mode 100644
index 00000000..26bc8fd4
--- /dev/null
+++ b/doc/ref/javascript/components/vevent_dl.texi
@@ -0,0 +1,11 @@
+@subsection VEvent Description List
+
+@deftp {Web Component for VEvent} VEventDL
+@wcindex <vevent-dl>
+@wcindex vevent-dl
+@code{<vevent-dl>}
+A description list of a vevent, used for debugging.
+
+No guarantees are given about the contents of the data fields, more
+than that they are related to the value in question.
+@end deftp
diff --git a/doc/ref/javascript/components/vevent_edit.texi b/doc/ref/javascript/components/vevent_edit.texi
new file mode 100644
index 00000000..67e9f6b3
--- /dev/null
+++ b/doc/ref/javascript/components/vevent_edit.texi
@@ -0,0 +1,9 @@
+@subsection VEvent Edit
+
+@deftp {Web Component for VEvent} ComponentEdit
+@wcindex <vevent-edit>
+@wcindex vevent-edit
+@code{<vevent-edit>}
+Edit form for a vevent, designed for useful human interaction (and
+thereby not being all-encompassing).
+@end deftp