Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 57 additions & 6 deletions content/developer/reference/frontend/registries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,50 @@ Reference List

* - Category
- Content
* - :ref:`effects <frontend/registries/effects>`
- implementation for all available effects
* - :ref:`formatters <frontend/registries/formatters>`
- utility functions to format values (mostly used for field values)
* - :ref:`main_components <frontend/registries/main_components>`
- top level components
* - :ref:`parsers <frontend/registries/parsers>`
- utility functions to parse values (mostly used for field values)
* - :ref:`services <frontend/registries/services>`
- all services that should be activated
* - :ref:`systray <frontend/registries/systray>`
- components displayed in the systray zone in the navbar
* - :ref:`user_menuitems <frontend/registries/usermenu>`
- menu items displayed in the user menu (top right of navbar)

.. _frontend/registries/effects:

Effect registry
---------------

The `effects` registry contains the implementations of all available effects.
See the section on the :ref:`effect service <frontend/services/effect_registry>`
for more details.

.. _frontend/registries/formatters:

Formatter registry
------------------

The `formatters` registry contains functions to format values. Each formatter
has the following API:

.. js:function:: format(value[, options])

:param value: a value of a specific type, or `false` if no value is given
:type value: T | false
:param Object options: various options
:returns: string

Formats a value and returns a string

.. seealso::
- :ref:`Parsers registry <frontend/registries/parsers>`

.. _frontend/registries/main_components:

Main components registry
Expand Down Expand Up @@ -143,6 +178,28 @@ this:
Component: LoadingIndicator,
});

.. _frontend/registries/parsers:

Parser registry
---------------

The `parsers` registry contains functions to parse values. Each parser
has the following API:

.. js:function:: parse(value[, options])
:noindex:

:param value: a string representing a value
:type value: string
:param Object options: various options (parser specific)
:returns: T a valid value

Parses a string and returns a value. If the string does not represent a valid
value, parsers can fail and throw errors.

.. seealso::
- :ref:`Formatters registry <frontend/registries/formatters>`

.. _frontend/registries/services:

Service registry
Expand Down Expand Up @@ -245,9 +302,3 @@ Example:
hide: (Math.random() < 0.5),
};
}

Effect registry
---------------

Contains the implementations of all available effects. See the section on the
:ref:`effect service <frontend/services/effect_registry>` for more details.
2 changes: 1 addition & 1 deletion content/developer/reference/frontend/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ A service needs to implement the following interface:

.. js:function:: start(env, deps)

:param Environment env:
:param Environment env: the application environment
:param Object deps: all requested dependencies
:returns: value of service or Promise<value of service>

Expand Down