Selecto.Extensions
(Selecto v0.4.5)
Copy Markdown
Shared extension loading and callback dispatch for the Selecto ecosystem.
Summary
Types
Normalized extension entries: {module, opts}
Functions
Return additional selecto_components views contributed by extensions.
Deep-merge maps recursively.
Resolve extension-provided Ecto->Selecto type mapping.
Extract normalized extension specs from a domain-like map.
Extract normalized extension specs from a selecto/domain-like value.
Apply merge_domain/2 callbacks for extensions in declaration order.
Apply updato_domain/2 callbacks for extensions in declaration order.
Normalize extension specs from any supported format.
Return additional overlay DSL import modules from extension callbacks.
Build and deep-merge extension overlay fragments.
Execute compile-time overlay_setup/2 callbacks.
Types
Functions
@spec components_views(term(), [normalized_spec()]) :: [tuple()]
Return additional selecto_components views contributed by extensions.
Deep-merge maps recursively.
@spec ecto_type_to_selecto_type(term(), [normalized_spec()]) :: atom() | nil
Resolve extension-provided Ecto->Selecto type mapping.
Returns the first non-nil mapping from extensions in declaration order.
@spec from_domain(map()) :: [normalized_spec()]
Extract normalized extension specs from a domain-like map.
@spec from_source(term()) :: [normalized_spec()]
Extract normalized extension specs from a selecto/domain-like value.
@spec merge_domain_extensions(map(), [normalized_spec()]) :: map()
Apply merge_domain/2 callbacks for extensions in declaration order.
@spec merge_updato_domain_extensions(map(), [normalized_spec()]) :: map()
Apply updato_domain/2 callbacks for extensions in declaration order.
@spec normalize_specs(term()) :: [normalized_spec()]
Normalize extension specs from any supported format.
Supported entries:
MyExtension{MyExtension, key: "value"}%{module: MyExtension, opts: [...]}
@spec overlay_dsl_modules([normalized_spec()]) :: [module()]
Return additional overlay DSL import modules from extension callbacks.
@spec overlay_fragments(module(), [normalized_spec()]) :: map()
Build and deep-merge extension overlay fragments.
@spec setup_overlay_extensions(module(), [normalized_spec()]) :: :ok
Execute compile-time overlay_setup/2 callbacks.