AshUi.Phoenix (ash_ui_phoenix v0.1.0)

Copy Markdown View Source

Primary Phoenix integration for routed AshUi resources.

The routes/1 macro discovers route declarations from Ash domains and mounts each resource through the shared LiveView host. At runtime this module creates or upserts the page's :mount action with the transport session, caches its compiled patch table, renders the current resource row, routes binding keys to Ash actions, reloads notification-backed relationships, and reconciles the resource's URL projection.

Host applications keep ownership of their endpoint, router, session, authentication, and static assets. Authored UI remains in resource :view calculations; Phoenix supplies transport only.

Summary

Functions

client_dispatch_params(binding, args \\ %{})

configured_resource(otp_app, key)

configured_resource!(otp_app, key)

mount(resource, params, session, socket, opts \\ [])

@spec mount(module(), map(), map(), Phoenix.LiveView.Socket.t(), keyword()) ::
  {:ok, Phoenix.LiveView.Socket.t()}

otp_app(conn_or_socket_or_assigns, opts \\ [])

render_resource(resource_module, context \\ %{}, opts \\ [])

render_resource!(resource_module, context \\ %{}, opts \\ [])

render_shell(assigns)

Attributes

  • ash_ui_record (:any) - Defaults to nil.
  • ash_ui_changed (:any) - Defaults to :all.
  • ash_ui_mount_error (:string) - Defaults to nil.

routes(opts)

(macro)

runtime_handle_event(arg1, params, socket)

@spec runtime_handle_event(String.t(), map(), Phoenix.LiveView.Socket.t()) ::
  {:noreply, Phoenix.LiveView.Socket.t()}

runtime_handle_info(notification, socket)

@spec runtime_handle_info(term(), Phoenix.LiveView.Socket.t()) ::
  {:noreply, Phoenix.LiveView.Socket.t()}

runtime_handle_params(params, uri, socket)

@spec runtime_handle_params(
  map(),
  String.t() | map() | nil,
  Phoenix.LiveView.Socket.t()
) ::
  {:noreply, Phoenix.LiveView.Socket.t()}

runtime_terminate(reason, socket)

@spec runtime_terminate(term(), Phoenix.LiveView.Socket.t()) :: :ok

telemetry_child_spec(name)