View Source LiveNavigator.History (live_navigator v0.1.8)

User navigation history

Link to this section Summary

Types

Specifies the page view. :view field stores the Phoenix.LiveView module of the page, :action contains the live view action which is usualy stored in :live_action assign, :url is the full URL of page and the :name is the page alias that can be specified in navigation-related functions (such as push_patch/2 or push_navigate/2) with an :as option.

t()

Link to this section Types

@type action() :: atom()
@type id() :: pos_integer()
@type index() :: integer() | name()
@type name() :: atom()
@type spec() :: %LiveNavigator.History{
  action: action(),
  id: id(),
  name: name() | nil,
  url: url(),
  view: view()
}

Specifies the page view. :view field stores the Phoenix.LiveView module of the page, :action contains the live view action which is usualy stored in :live_action assign, :url is the full URL of page and the :name is the page alias that can be specified in navigation-related functions (such as push_patch/2 or push_navigate/2) with an :as option.

@type t() :: [spec() | [spec()]]
@type url() :: binary()
@type view() :: module()

Link to this section Functions

Link to this function

find(history, idx \\ -1)

View Source
@spec find(t(), integer() | name() | url() | spec()) :: spec() | nil
Link to this function

new(navigator, name \\ nil)

View Source
@spec new(LiveNavigator.t(), name()) :: spec()
Link to this function

new(url, view, action, name \\ nil)

View Source
@spec new(url(), view(), action(), name()) :: spec()
@spec put(t(), spec() | [spec()]) :: t()
Link to this function

put_stacked(history, spec)

View Source
@spec put_stacked(t(), spec()) :: t()
Link to this function

replace(arg1, id, spec, unstack)

View Source
@spec replace(t(), id(), spec(), boolean()) :: t()
@spec reverse(t()) :: t()
@spec stack_preceding(t()) :: spec() | nil
@spec stack_top(t()) :: spec() | nil