Overrides DSL

v0.0.1

The state section and the data_loader and events entities of a resource's table and form blocks name the modules that replace parts of the runtime. Each key takes a module that uses the matching Gervaz module, so super reaches the default of the callback you override. Only the module option of state, and a form's events module, replace a whole subsystem. Gervaz does not read the module option of a table's events or of either data_loader.

Table state

Replaces how table state is built. It sits at mishka_gervaz.table.state.

OptionTypeDefaultDescription
moduleatomnoneReplaces the whole state module. Every other key of the block is then ignored. The module must use MishkaGervaz.Table.Web.State. Call default_init/3 to reach the default init/3, because super would call your module again.
columnatomnoneColumn builder module. Must use MishkaGervaz.Table.Web.State.ColumnBuilder. Builds columns from DSL and resource configuration.
filteratomnoneFilter builder module. Must use MishkaGervaz.Table.Web.State.FilterBuilder. Builds filters from DSL and resource configuration.
actionatomnoneAction builder module. Must use MishkaGervaz.Table.Web.State.ActionBuilder. Builds row actions and bulk actions from configuration.
presentationatomnonePresentation module. Must use MishkaGervaz.Table.Web.State.Presentation. Resolves UI adapter, templates, and presentation options.
url_syncatomnoneURL sync module. Must use MishkaGervaz.Table.Web.State.UrlSync. Handles URL state synchronization.
accessatomnoneAccess module. Must use MishkaGervaz.Table.Web.State.Access. Handles access control for records and actions.

Table data_loader

Replaces how table data is loaded. The module argument works as the module option. It sits at mishka_gervaz.table.data_loader.

Call: data_loader module

Arguments:

ArgumentTypeDefaultDescription
moduleatomnoneAccepted by the DSL. Gervaz does not read it. Name the sub-builders instead.

Options:

OptionTypeDefaultDescription
queryatomnoneQuery builder module. Must use MishkaGervaz.Table.Web.DataLoader.QueryBuilder. Builds queries with filters and sorting.
filter_parseratomnoneFilter parser module. Must use MishkaGervaz.Table.Web.DataLoader.FilterParser. Parses raw filter values from form submissions.
paginationatomnonePagination handler module. Must use MishkaGervaz.Table.Web.DataLoader.PaginationHandler. Handles page loading and pagination calculations.
tenantatomnoneTenant resolver module. Must use MishkaGervaz.Table.Web.DataLoader.TenantResolver. Resolves tenant and read actions based on state.
hooksatomnoneHook runner module. Must use MishkaGervaz.Table.Web.DataLoader.HookRunner. Executes hooks during data loading.
relationatomnoneRelation loader module. Must use MishkaGervaz.Table.Web.DataLoader.RelationLoader. Loads options for relation filters (search, load_more, resolve_selected).

Table events

Replaces how table events are handled. The module argument works as the module option. It sits at mishka_gervaz.table.events.

Call: events module

Arguments:

ArgumentTypeDefaultDescription
moduleatomnoneAccepted by the DSL. Gervaz does not read it. Name the sub-builders instead.

Options:

OptionTypeDefaultDescription
sanitizationatomnoneSanitization handler module. Must use MishkaGervaz.Table.Web.Events.SanitizationHandler. Handles input sanitization to prevent XSS.
recordatomnoneRecord handler module. Must use MishkaGervaz.Table.Web.Events.RecordHandler. Handles record CRUD operations.
selectionatomnoneSelection handler module. Must use MishkaGervaz.Table.Web.Events.SelectionHandler. Manages row selection state.
bulk_actionatomnoneBulk action handler module. Must use MishkaGervaz.Table.Web.Events.BulkActionHandler. Executes bulk actions on selected records.
hooksatomnoneHook runner module. Must use MishkaGervaz.Table.Web.Events.HookRunner. Executes hooks during event handling.
relation_filteratomnoneRelation filter handler module. Must use MishkaGervaz.Table.Web.Events.RelationFilterHandler. Handles relation filter events (search, load_more, focus, close_dropdown, toggle).

Form state

Replaces how form state is built. It sits at mishka_gervaz.form.state.

OptionTypeDefaultDescription
moduleatomnoneReplaces the whole state module. Every other key of the block is then ignored. The module must use MishkaGervaz.Form.Web.State. Call default_init/3 to reach the default init/3, because super would call your module again.
fieldatomnoneField builder module. Must use MishkaGervaz.Form.Web.State.FieldBuilder. Builds field configs from DSL and resource configuration.
groupatomnoneGroup builder module. Must use MishkaGervaz.Form.Web.State.GroupBuilder. Builds group layout from DSL configuration.
stepatomnoneStep builder module. Must use MishkaGervaz.Form.Web.State.StepBuilder. Builds wizard/tab steps from DSL configuration.
presentationatomnonePresentation module. Must use MishkaGervaz.Form.Web.State.Presentation. Resolves UI adapter, templates, and presentation options.
accessatomnoneAccess module. Must use MishkaGervaz.Form.Web.State.Access. Handles access control for form actions.

Form data_loader

Replaces how form data is loaded. The module argument works as the module option. It sits at mishka_gervaz.form.data_loader.

Call: data_loader module

Arguments:

ArgumentTypeDefaultDescription
moduleatomnoneAccepted by the DSL. Gervaz does not read it. Name the sub-builders instead.

Options:

OptionTypeDefaultDescription
recordatomnoneRecord loader module. Must use MishkaGervaz.Form.Web.DataLoader.RecordLoader. Loads records for edit mode and creates AshPhoenix.Form structs.
tenantatomnoneTenant resolver module. Must use MishkaGervaz.Form.Web.DataLoader.TenantResolver. Resolves tenant and actions based on state.
relationatomnoneRelation loader module. Must use MishkaGervaz.Form.Web.DataLoader.RelationLoader. Loads options for relation/select fields.
hooksatomnoneHook runner module. Must use MishkaGervaz.Form.Web.DataLoader.HookRunner. Executes hooks during data loading. The value is compiled into the config, but no built-in template or handler reads it.

Form events

Replaces how form events are handled. The module argument works as the module option. It sits at mishka_gervaz.form.events.

Call: events module

Arguments:

ArgumentTypeDefaultDescription
moduleatomnoneReplaces the whole events module. The module must use MishkaGervaz.Form.Web.Events.

Options:

OptionTypeDefaultDescription
sanitizationatomnoneSanitization handler module. Must use MishkaGervaz.Form.Web.Events.SanitizationHandler. Handles input sanitization to prevent XSS.
validationatomnoneValidation handler module. Must use MishkaGervaz.Form.Web.Events.ValidationHandler. Handles phx-change form validation.
submitatomnoneSubmit handler module. Must use MishkaGervaz.Form.Web.Events.SubmitHandler. Handles phx-submit form creation and updates.
stepatomnoneStep handler module. Must use MishkaGervaz.Form.Web.Events.StepHandler. Handles wizard step navigation (next, prev, goto).
uploadatomnoneUpload handler module. Must use MishkaGervaz.Form.Web.Events.UploadHandler. Handles file upload events.
relationatomnoneRelation handler module. Must use MishkaGervaz.Form.Web.Events.RelationHandler. Handles relation field search/select/clear events.
hooksatomnoneHook runner module. Must use MishkaGervaz.Form.Web.Events.HookRunner. Executes hooks during event handling.