SelectoComponents.Views.System behaviour (selecto_components v0.3.12)

Formal contract for pluggable SelectoComponents view systems.

A view system is the module referenced in the views configuration tuple:

{:graph, SelectoComponents.Views.Graph, "Graph View", %{}}

Any module used in that position can implement this behavior directly, or use SelectoComponents.Views.System to wire callbacks to separate modules.

Additional view-local modules (for example drill-down handlers, option normalizers, pagination/query helpers) are optional implementation details and are not part of this behavior contract.

This enables external packages (for example selecto_components_workflow) to integrate without relying on naming conventions like #{module}.Process.

Link to this section Summary

Link to this section Types

Link to this type

columns_map()

@type columns_map() :: map()
@type filtered() :: term()
@type options() :: map()
@type params() :: map()
@type selecto() :: term()
@type view_meta() :: map()
@type view_set() :: map()

Link to this section Callbacks

Link to this callback

form_component()

@callback form_component() :: module()
Link to this callback

initial_state(selecto, options)

@callback initial_state(selecto(), options()) :: map()
Link to this callback

param_to_state(params, options)

@callback param_to_state(params(), options()) :: map()
Link to this callback

result_component()

@callback result_component() :: module()
Link to this callback

view(options, params, columns_map, filtered, selecto)

@callback view(options(), params(), columns_map(), filtered(), selecto()) ::
  {view_set(), view_meta()}