pysepal.sepalwidgets.vue_app.MapApp#

class pysepal.sepalwidgets.vue_app.MapApp(*args, **kwargs)[source]#

The map application shell. Render it with MapApp.element(...).

An application is a Solara component, and this is the shell it renders: MapApp.element(...) mounts the language selector and lets every nested element follow the locale. Constructing the widget directly gives the bare layout only – no selector, and nothing that follows a language change, because outside a render there is no render loop. It is not a way to assemble an application.

Instantiate the MapApp class.

Parameters:
  • theme_toggle (ThemeToggle, optional) – Theme toggle widget

  • theme_state (ThemeState, optional) – Shared theme state; defaults to the current scope’s.

  • locales (iterable of str, optional) – Locale codes the selector MapApp.element mounts will offer, normally messages.available_locales(). Unused when a language_selector is supplied, and by the bare widget, which mounts no selector.

  • initial_step (int, optional) – Initial step to display

  • model (HasTraits, optional) – Deprecated. Links matching traitlets with this model, but only the model given at construction: MapApp.element ignores a new one on a later render. Pass current_step/on_current_step and step_open/on_step_open instead.

  • **kwargs – Additional parameters

Attributes

app_icon

A trait for unicode strings.

app_title

A trait for unicode strings.

current_step

An integer trait.

dialog_fullscreen

A boolean (True, False) trait.

dialog_width

An integer trait.

docs_url

A trait for unicode strings.

drawer_width

Current drawer pixel width (collapsed or expanded).

initial_step

An integer trait.

is_pinned

A boolean (True, False) trait.

language_selector

An instance of a Python list.

main_map

An instance of a Python list.

repo_url

A trait for unicode strings.

right_panel

An instance of a Python list.

right_panel_config

An instance of a Python dict.

right_panel_content

An instance of a Python list.

right_panel_footer

Widgets pinned below the scrolling sections, e.g. a persistent action bar.

right_panel_open

A boolean (True, False) trait.

right_panel_width

An integer trait.

step_open

A boolean (True, False) trait.

steps_data

An instance of a Python list.

template_file

A trait for unicode strings.

theme_toggle

An instance of a Python list.

window_height

Browser window size, pushed from Vue on mount and resize.

window_width

An integer trait.

Methods

__init__

Instantiate the MapApp class.

element

Let Reacton render the selector before constructing the widget shell.

set_model

Set or change the bound model.

unlink_model

Remove all model links and cleanup.

vue_handle_right_panel_action

Handle right panel actions from step activation.

vue_handle_step_activation

Handle step activation from Vue component.

vue_handle_step_change

Handle step activation/deactivation from Vue component.

vue_handle_step_deactivation

Handle step deactivation from Vue component.

vue_set_drawer_width

Receive the real drawer pixel width from Vue on mount/mini-toggle.

vue_set_window_size

Receive the real browser window size from Vue on mount/resize.

MapApp.__init__(theme_toggle=None, theme_state=None, locales=None, initial_step=None, model=None, **kwargs)[source]#

Instantiate the MapApp class.

Parameters:
  • theme_toggle (ThemeToggle, optional) – Theme toggle widget

  • theme_state (ThemeState, optional) – Shared theme state; defaults to the current scope’s.

  • locales (iterable of str, optional) – Locale codes the selector MapApp.element mounts will offer, normally messages.available_locales(). Unused when a language_selector is supplied, and by the bare widget, which mounts no selector.

  • initial_step (int, optional) – Initial step to display

  • model (HasTraits, optional) – Deprecated. Links matching traitlets with this model, but only the model given at construction: MapApp.element ignores a new one on a later render. Pass current_step/on_current_step and step_open/on_step_open instead.

  • **kwargs – Additional parameters

classmethod MapApp.element(**kwargs)[source]#

Let Reacton render the selector before constructing the widget shell.

MapApp.set_model(model)[source]#

Set or change the bound model.

Parameters:
  • model (HasTraits) – New model to bind with

  • deprecated: (..) – 4.2.0: MapApp(model=…) is deprecated and binds only the model passed on the first render. Drive the steps with props instead: MapApp.element(current_step=step.value, on_current_step=step.set), and the same for step_open.

Remove all model links and cleanup.

Deprecated since version 4.2.0: MapApp(model=…) is deprecated and binds only the model passed on the first render. Drive the steps with props instead: MapApp.element(current_step=step.value, on_current_step=step.set), and the same for step_open.

MapApp.vue_handle_right_panel_action(action)[source]#

Handle right panel actions from step activation.

MapApp.vue_handle_step_activation(step_id)[source]#

Handle step activation from Vue component.

Parameters:

step_id (int) – The ID of the step being activated

MapApp.vue_handle_step_change(step_id, is_open)[source]#

Handle step activation/deactivation from Vue component.

Parameters:
  • step_id (int) – The ID of the step being changed

  • is_open (bool) – Whether the step is being opened or closed

MapApp.vue_handle_step_deactivation(*args)[source]#

Handle step deactivation from Vue component.

MapApp.vue_set_drawer_width(width)[source]#

Receive the real drawer pixel width from Vue on mount/mini-toggle.

MapApp.vue_set_window_size(size)[source]#

Receive the real browser window size from Vue on mount/resize.