AshSDUI.Runtime.State (ash_sdui v0.2.0)

Copy Markdown View Source

Shared runtime state helpers for SDUI views and components.

Summary

Functions

apply_selection(state, params)

@spec apply_selection(AshSDUI.View.State.t() | nil, map()) :: AshSDUI.View.State.t()

apply_workflow(state, params)

@spec apply_workflow(AshSDUI.View.State.t() | nil, map()) :: AshSDUI.View.State.t()

mark_binding_refreshed(state, binding_name)

@spec mark_binding_refreshed(AshSDUI.View.State.t() | nil, atom()) ::
  AshSDUI.View.State.t()

normalize(state)

@spec normalize(AshSDUI.View.State.t() | map() | nil | struct()) :: map()

refresh_meta(state, binding_name)

@spec refresh_meta(AshSDUI.View.State.t() | map() | nil, atom() | nil) :: map()

refresh_snapshot(bindings, state)

@spec refresh_snapshot(map(), AshSDUI.View.State.t() | nil) :: map()

selected_records(state, records)

@spec selected_records(AshSDUI.View.State.t() | map() | nil, list() | nil) :: list()

state_slice(state, state_key)

@spec state_slice(
  AshSDUI.View.State.t() | map() | nil,
  atom() | String.t() | [atom() | String.t()] | nil
) :: term()

update(state, fun)

@spec update(AshSDUI.View.State.t() | nil, (AshSDUI.View.State.t() ->
                                        AshSDUI.View.State.t())) ::
  AshSDUI.View.State.t()