lino_react.react.renderer

Functions

find(itter, target[, key])

Returns the index of an element in a callable which can be use a key function

Classes

Renderer(front_end)

A front-end renderer that uses the React Javascript framework.

lino_react.react.renderer.find(itter, target, key=None)

Returns the index of an element in a callable which can be use a key function

class lino_react.react.renderer.Renderer(front_end)

Bases: JsRenderer, JsCacheRenderer

A front-end renderer that uses the React Javascript framework.

write_lino_js(f)

Creates what is known as window.App.state.site_data in React code.

Parameters:

f -- File object

Returns:

1

action2json(v)

Converts global list of all actions to json format.

get_request_url(ar, *args, **kw)

Used for turn requests into urls

action_call_on_instance(obj, ar, ba, request_kwargs={}, **status)

Note that ba.actor may differ from ar.actor when defined on a different actor. Remember e.g. the "Must read eID card" action button in eid_info of newcomers.NewClients (20140422).

Obj:

The database object

Ar:

The action request

Ba:

The bound action

Request_kwargs:

keyword arguments to forwarded to the child action request

Any keyword other arguments are forwarded to ar2js().

get_action_icon(action)

Uses an internal mapping for icon names to convert existing icons into react-usable. :param action: :return: str: a icon name for either prime-react or icon8

ar2js(ar, obj, **status)

Implements lino.core.renderer.HtmlRenderer.ar2js().

py2js_converter(v)

Additional converting logic for serializing Python values to json.

request_handler(ar, *args, **kw)

Generates js string for action button calls.

lino_js_parts_chunked(actorId)

Like lino_js_parts, but for actor_level data

actions2json(actions_list)

Converts of all the boundactions of an actor to json format.