Aurora. Uix. Templates. Basic. Actions. EmbedsMany
(Aurora UIX v0.1.4-rc.0)
Copy Markdown
Provides helpers for managing one-to-many association actions in Aurora UIX index layouts.
This module sets up and modifies actions for header, footer, and row elements in form layouts
that represent embeds-many associations. It ensures that default actions are present and
allows for further customization via the Actions.modify_actions/2 function.
Key Features
- Adds default actions for headers, footers, and rows in embeds-many association tables.
- Integrates with the Aurora UIX action modification pipeline.
- Provides helpers for rendering "new", "show", "edit", and "delete" child links in form layouts.
Key Constraints
- Expects the
assignsmap to include an:auixkey with required subkeys for actions. - Designed for use within Phoenix LiveView templates and Aurora UIX layouts.
Summary
Functions
Renders a button for adding/saving a new entry in an embeds-many association form.
Renders a button for enabling the addition of a new entry in the footer of an embeds-many association form.
Renders a button for enabling the addition of a new entry in the header of an embeds-many association form.
Renders a button for removing an existing entry in an embeds-many association form.
Sets up actions for the embeds-many field rendering layout by adding defaults and applying modifications.
Functions
@spec add_entry(map()) :: Phoenix.LiveView.Rendered.t()
Renders a button for adding/saving a new entry in an embeds-many association form.
Parameters
assigns(map()) - Assigns map containing association and entity context.
Returns
Phoenix.LiveView.Rendered.t() - Rendered button component.
@spec header_enable_add_entry(map()) :: Phoenix.LiveView.Rendered.t()
Renders a button for enabling the addition of a new entry in the header of an embeds-many association form.
Parameters
assigns(map()) - Assigns map containing association and entity context.
Returns
Phoenix.LiveView.Rendered.t() - Rendered button component.
@spec remove_entry(map()) :: Phoenix.LiveView.Rendered.t()
Renders a button for removing an existing entry in an embeds-many association form.
Parameters
assigns(map()) - Assigns map containing association and entity context.
Returns
Phoenix.LiveView.Rendered.t() - Rendered button component with confirmation dialog.
Sets up actions for the embeds-many field rendering layout by adding defaults and applying modifications.
Parameters
assigns(map()) - Assigns map containing the layout tree and context.- Must include
:auixkey with required subkeys.
- Must include
Returns
map() - The updated assigns with actions set.