diff --git a/content/developer/reference/frontend/registries.rst b/content/developer/reference/frontend/registries.rst index e696f4194..9c54fd115 100644 --- a/content/developer/reference/frontend/registries.rst +++ b/content/developer/reference/frontend/registries.rst @@ -106,8 +106,14 @@ Reference List * - Category - Content + * - :ref:`effects ` + - implementation for all available effects + * - :ref:`formatters ` + - utility functions to format values (mostly used for field values) * - :ref:`main_components ` - top level components + * - :ref:`parsers ` + - utility functions to parse values (mostly used for field values) * - :ref:`services ` - all services that should be activated * - :ref:`systray ` @@ -115,6 +121,35 @@ Reference List * - :ref:`user_menuitems ` - 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 ` +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/main_components: Main components registry @@ -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/services: Service registry @@ -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 ` for more details. \ No newline at end of file diff --git a/content/developer/reference/frontend/services.rst b/content/developer/reference/frontend/services.rst index 623716921..fb6add488 100644 --- a/content/developer/reference/frontend/services.rst +++ b/content/developer/reference/frontend/services.rst @@ -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