AshSDUI.Resource.Info (ash_sdui v0.2.0)

Copy Markdown View Source

Introspection API for AshSDUI.Resource DSL entities.

Summary

Functions

Reads the :default_component option from the sdui block, or nil.

Returns the Ash resource this module annotates.

Returns the configured gettext backend module, or nil.

Returns the configured gettext domain (default: "sdui").

Resolves the display label for a DSL entity.

Reads all ui_binding entities from the sdui block, or [].

Reads a named ui_field entity from the sdui block.

Reads all ui_field entities from the sdui block, or [].

Reads all ui_intent entities from the sdui block, or [].

Reads a named ui_nested_form entity from the sdui block.

Reads all ui_nested_form entities from the sdui block, or [].

Reads all ui_query entities from the sdui block, or [].

Reads a named view entity from the sdui block.

Reads all view entities from the sdui block, or [].

Functions

default_component(resource)

Reads the :default_component option from the sdui block, or nil.

for_resource(module)

Returns the Ash resource this module annotates.

For inline Ash extensions, returns the module itself. For standalone UI modules (use AshSDUI.Resource.Standalone), returns the for_resource.

gettext_backend(module)

Returns the configured gettext backend module, or nil.

gettext_domain(module)

Returns the configured gettext domain (default: "sdui").

resolve_label(entity, backend_or_module, domain \\ nil)

Resolves the display label for a DSL entity.

Priority:

  1. label
  2. label_key via Gettext when a backend is configured
  3. titleized name

ui_bindings(resource)

Reads all ui_binding entities from the sdui block, or [].

ui_field(resource, name)

Reads a named ui_field entity from the sdui block.

ui_fields(resource)

Reads all ui_field entities from the sdui block, or [].

ui_intents(resource)

Reads all ui_intent entities from the sdui block, or [].

ui_nested_form(resource, relationship)

Reads a named ui_nested_form entity from the sdui block.

ui_nested_forms(resource)

Reads all ui_nested_form entities from the sdui block, or [].

ui_queries(resource)

Reads all ui_query entities from the sdui block, or [].

view(resource, name)

Reads a named view entity from the sdui block.

views(resource)

Reads all view entities from the sdui block, or [].