AshBackpex.LiveResource.Info (Ash Backpex v0.1.6)

View Source

Auto-generated introspection functions for AshBackpex LiveResources.

This module uses Spark.InfoGenerator to create helper functions for inspecting the DSL configuration of AshBackpex LiveResources at runtime.

Available Functions

The generated functions allow you to introspect a LiveResource's configuration:

Usage

# Get the Ash resource for a LiveResource
AshBackpex.LiveResource.Info.backpex_resource(MyAppWeb.Admin.PostLive)
# => MyApp.Blog.Post

# Get configured fields
AshBackpex.LiveResource.Info.backpex_fields(MyAppWeb.Admin.PostLive)
# => [%AshBackpex.LiveResource.Dsl.Field{attribute: :title, ...}, ...]

These functions are primarily useful for debugging, testing, or building tools that need to inspect LiveResource configurations.

Summary

Functions

The create action to be used when creating resources. Will default to the primary create action.

The create action to be used when creating resources. Will default to the primary create action.

Changeset to use when creating items. Additional metadata is passed as a keyword list via the third parameter

Changeset to use when creating items. Additional metadata is passed as a keyword list via the third parameter

The destroy action to be used when destroying resources. Will default to the primary destroy action.

The destroy action to be used when destroying resources. Will default to the primary destroy action.

backpex.fields DSL entities

backpex.filters DSL entities

If the layout fills out the entire width.

The name of the generated column used for full text search.

The name of the generated column used for full text search.

Order that will be used when no other order options are given. Defaults to the primary key, ascending.

Order that will be used when no other order options are given. Defaults to the primary key, ascending.

backpex.item_actions DSL entities

backpex.item_actions DSL options

Default Backpex actions to remove from the live resource

Default Backpex actions to remove from the live resource

The liveview layout, e.g.: {MyAppWeb.Layouts, :admin}

The liveview layout, e.g.: {MyAppWeb.Layouts, :admin}

An optional list of hooks to attach to the mount lifecycle. Passing a single value is also accepted. See https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#on_mount/1

An optional list of hooks to attach to the mount lifecycle. Passing a single value is also accepted. See https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#on_mount/1

backpex DSL options

Panels to be displayed in the admin create/edit forms. Format: [panel_key: "Panel Title"]

Panels to be displayed in the admin create/edit forms. Format: [panel_key: "Panel Title"]

The default page size number.

The default page size number.

The page size numbers you can choose from.

The page size numbers you can choose from.

The plural name for the resource taht will appear i nthe admin. E.g., "Posts"

The plural name for the resource taht will appear i nthe admin. E.g., "Posts"

PubSub configuration.

PubSub configuration.

The read action to be used when reading resources. Will default to the primary read action.

The read action to be used when reading resources. Will default to the primary read action.

The Ash resource that the Backpex Live resource should be connect to.

The Ash resource that the Backpex Live resource should be connect to.

If the "Save & Continue editing" button is shown on form views.

The singular name for the resource that will appear in the admin. E.g., "Post"

The singular name for the resource that will appear in the admin. E.g., "Post"

The update action to be used when updating resources. Will default to the primary update action.

The update action to be used when updating resources. Will default to the primary update action.

Changeset to use when updating items. Additional metadata is passed as a keyword list via the third parameter

Changeset to use when updating items. Additional metadata is passed as a keyword list via the third parameter

Functions

backpex_create_action(dsl_or_extended)

@spec backpex_create_action(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The create action to be used when creating resources. Will default to the primary create action.

backpex_create_action!(dsl_or_extended)

@spec backpex_create_action!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The create action to be used when creating resources. Will default to the primary create action.

backpex_create_changeset(dsl_or_extended)

@spec backpex_create_changeset(dsl_or_extended :: module() | map()) ::
  {:ok, (any(), any(), any() -> any())} | :error

Changeset to use when creating items. Additional metadata is passed as a keyword list via the third parameter:

  • :assigns - the assigns
  • :target - the name of the form target that triggered the changeset call. Default to nil if the call was not triggered by a form field.

backpex_create_changeset!(dsl_or_extended)

@spec backpex_create_changeset!(dsl_or_extended :: module() | map()) ::
  (any(), any(), any() -> any()) | no_return()

Changeset to use when creating items. Additional metadata is passed as a keyword list via the third parameter:

  • :assigns - the assigns
  • :target - the name of the form target that triggered the changeset call. Default to nil if the call was not triggered by a form field.

backpex_destroy_action(dsl_or_extended)

@spec backpex_destroy_action(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The destroy action to be used when destroying resources. Will default to the primary destroy action.

backpex_destroy_action!(dsl_or_extended)

@spec backpex_destroy_action!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The destroy action to be used when destroying resources. Will default to the primary destroy action.

backpex_fields(dsl_or_extended)

@spec backpex_fields(dsl_or_extended :: module() | map()) :: [struct()]

backpex.fields DSL entities

backpex_filters(dsl_or_extended)

@spec backpex_filters(dsl_or_extended :: module() | map()) :: [struct()]

backpex.filters DSL entities

backpex_fluid?(dsl_or_extended)

@spec backpex_fluid?(dsl_or_extended :: module() | map()) :: boolean()

If the layout fills out the entire width.

backpex_full_text_search(dsl_or_extended)

@spec backpex_full_text_search(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The name of the generated column used for full text search.

backpex_full_text_search!(dsl_or_extended)

@spec backpex_full_text_search!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The name of the generated column used for full text search.

backpex_init_order(dsl_or_extended)

@spec backpex_init_order(dsl_or_extended :: module() | map()) ::
  {:ok, (any() -> any()) | {module(), list()}} | :error

Order that will be used when no other order options are given. Defaults to the primary key, ascending.

backpex_init_order!(dsl_or_extended)

@spec backpex_init_order!(dsl_or_extended :: module() | map()) ::
  ((any() -> any()) | {module(), list()}) | no_return()

Order that will be used when no other order options are given. Defaults to the primary key, ascending.

backpex_item_actions(dsl_or_extended)

@spec backpex_item_actions(dsl_or_extended :: module() | map()) :: [struct()]

backpex.item_actions DSL entities

backpex_item_actions_options(dsl_or_extended)

@spec backpex_item_actions_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

backpex.item_actions DSL options

Returns a map containing the and any configured or default values.

backpex_item_actions_strip_default(dsl_or_extended)

@spec backpex_item_actions_strip_default(dsl_or_extended :: module() | map()) ::
  {:ok, [atom()]} | :error

Default Backpex actions to remove from the live resource

backpex_item_actions_strip_default!(dsl_or_extended)

@spec backpex_item_actions_strip_default!(dsl_or_extended :: module() | map()) ::
  [atom()] | no_return()

Default Backpex actions to remove from the live resource

backpex_layout(dsl_or_extended)

@spec backpex_layout(dsl_or_extended :: module() | map()) ::
  {:ok, (any() -> any()) | {:module, atom()}} | :error

The liveview layout, e.g.: {MyAppWeb.Layouts, :admin}

backpex_layout!(dsl_or_extended)

@spec backpex_layout!(dsl_or_extended :: module() | map()) ::
  ((any() -> any()) | {:module, atom()}) | no_return()

The liveview layout, e.g.: {MyAppWeb.Layouts, :admin}

backpex_on_mount(dsl_or_extended)

@spec backpex_on_mount(dsl_or_extended :: module() | map()) ::
  {:ok, :mod_arg | atom() | [:mod_arg | atom()]} | :error

An optional list of hooks to attach to the mount lifecycle. Passing a single value is also accepted. See https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#on_mount/1

backpex_on_mount!(dsl_or_extended)

@spec backpex_on_mount!(dsl_or_extended :: module() | map()) ::
  (:mod_arg | atom() | [:mod_arg | atom()]) | no_return()

An optional list of hooks to attach to the mount lifecycle. Passing a single value is also accepted. See https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#on_mount/1

backpex_options(dsl_or_extended)

@spec backpex_options(dsl_or_extended :: module() | map()) :: %{
  required(atom()) => any()
}

backpex DSL options

Returns a map containing the and any configured or default values.

backpex_panels(dsl_or_extended)

@spec backpex_panels(dsl_or_extended :: module() | map()) :: {:ok, keyword()} | :error

Panels to be displayed in the admin create/edit forms. Format: [panel_key: "Panel Title"]

backpex_panels!(dsl_or_extended)

@spec backpex_panels!(dsl_or_extended :: module() | map()) :: keyword() | no_return()

Panels to be displayed in the admin create/edit forms. Format: [panel_key: "Panel Title"]

backpex_per_page_default(dsl_or_extended)

@spec backpex_per_page_default(dsl_or_extended :: module() | map()) ::
  {:ok, integer()} | :error

The default page size number.

backpex_per_page_default!(dsl_or_extended)

@spec backpex_per_page_default!(dsl_or_extended :: module() | map()) ::
  integer() | no_return()

The default page size number.

backpex_per_page_options(dsl_or_extended)

@spec backpex_per_page_options(dsl_or_extended :: module() | map()) ::
  {:ok, [integer()]} | :error

The page size numbers you can choose from.

backpex_per_page_options!(dsl_or_extended)

@spec backpex_per_page_options!(dsl_or_extended :: module() | map()) ::
  [integer()] | no_return()

The page size numbers you can choose from.

backpex_plural_name(dsl_or_extended)

@spec backpex_plural_name(dsl_or_extended :: module() | map()) ::
  {:ok, String.t()} | :error

The plural name for the resource taht will appear i nthe admin. E.g., "Posts"

backpex_plural_name!(dsl_or_extended)

@spec backpex_plural_name!(dsl_or_extended :: module() | map()) ::
  String.t() | no_return()

The plural name for the resource taht will appear i nthe admin. E.g., "Posts"

backpex_pubsub(dsl_or_extended)

@spec backpex_pubsub(dsl_or_extended :: module() | map()) ::
  {:ok, topic: String.t(), server: atom()} | :error

PubSub configuration.

backpex_pubsub!(dsl_or_extended)

@spec backpex_pubsub!(dsl_or_extended :: module() | map()) ::
  [topic: String.t(), server: atom()] | no_return()

PubSub configuration.

backpex_read_action(dsl_or_extended)

@spec backpex_read_action(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The read action to be used when reading resources. Will default to the primary read action.

backpex_read_action!(dsl_or_extended)

@spec backpex_read_action!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The read action to be used when reading resources. Will default to the primary read action.

backpex_resource(dsl_or_extended)

@spec backpex_resource(dsl_or_extended :: module() | map()) :: {:ok, atom()} | :error

The Ash resource that the Backpex Live resource should be connect to.

backpex_resource!(dsl_or_extended)

@spec backpex_resource!(dsl_or_extended :: module() | map()) :: atom() | no_return()

The Ash resource that the Backpex Live resource should be connect to.

backpex_save_and_continue_button?(dsl_or_extended)

@spec backpex_save_and_continue_button?(dsl_or_extended :: module() | map()) ::
  boolean()

If the "Save & Continue editing" button is shown on form views.

backpex_singular_name(dsl_or_extended)

@spec backpex_singular_name(dsl_or_extended :: module() | map()) ::
  {:ok, String.t()} | :error

The singular name for the resource that will appear in the admin. E.g., "Post"

backpex_singular_name!(dsl_or_extended)

@spec backpex_singular_name!(dsl_or_extended :: module() | map()) ::
  String.t() | no_return()

The singular name for the resource that will appear in the admin. E.g., "Post"

backpex_update_action(dsl_or_extended)

@spec backpex_update_action(dsl_or_extended :: module() | map()) ::
  {:ok, atom()} | :error

The update action to be used when updating resources. Will default to the primary update action.

backpex_update_action!(dsl_or_extended)

@spec backpex_update_action!(dsl_or_extended :: module() | map()) ::
  atom() | no_return()

The update action to be used when updating resources. Will default to the primary update action.

backpex_update_changeset(dsl_or_extended)

@spec backpex_update_changeset(dsl_or_extended :: module() | map()) ::
  {:ok, (any(), any(), any() -> any())} | :error

Changeset to use when updating items. Additional metadata is passed as a keyword list via the third parameter:

  • :assigns - the assigns
  • :target - the name of the form target that triggered the changeset call. Default to nil if the call was not triggered by a form field.

backpex_update_changeset!(dsl_or_extended)

@spec backpex_update_changeset!(dsl_or_extended :: module() | map()) ::
  (any(), any(), any() -> any()) | no_return()

Changeset to use when updating items. Additional metadata is passed as a keyword list via the third parameter:

  • :assigns - the assigns
  • :target - the name of the form target that triggered the changeset call. Default to nil if the call was not triggered by a form field.