Skip to main content

Crate hyle_dioxus

Crate hyle_dioxus 

Source
Expand description

Dioxus integration for hyle.

Provides hooks and context utilities for building data-driven UIs with hyle in Dioxus applications, calling the hyle crate directly without any WASM bridge.

§Quick start

use std::sync::Arc;
use dioxus::prelude::*;
use hyle_dioxus::{use_context_provider, HyleConfig, use_data, HyleAdapter, use_adapter_config};

fn app() -> Element {
    use_context_provider(|| HyleConfig { blueprint: Arc::new(my_blueprint()) });
    use_adapter_config!(make_rest_adapter("http://localhost:3001/api"));
    rsx! { Router::<Route> {} }
}

Re-exports§

pub use filter::FilterField;
pub use filter::FilterField;
pub use filter::FormFilterField;
pub use filter::FormFilterField;

Macros§

use_adapter_config
Provide a HyleAdapter as Dioxus context.

Structs§

Blueprint
BoundMutateInput
Input for a BoundMutation — like MutateInput but without model.
BoundMutation
A mutation handle with model pre-bound.
BoundMutations
Create/update/delete handles with model pre-bound.
Column
DioxusMutationOptions
Field
Forma
FormaField
HyleAdapter
Unified adapter stored in Dioxus context.
HyleComponents
A map of component overrides for value cells and filter inputs.
HyleConfig
Hyle configuration stored in Dioxus context.
HyleFilterFieldProps
Props passed to a custom render function supplied to FilterField.
HyleFiltersState
State returned by use_filters.
HyleFormState
State returned by use_form.
HyleListState
State returned by use_list.
HyleMutation
A mutation handle.
HyleValueProps
Props passed to a custom value cell renderer in HyleComponents.
Manifest
Model
PurifyError
Query
Sort
UseFiltersOptions
Options for use_filters.
UseFormOptions
Options for use_form.

Enums§

FieldType
FormaContext
Which rendering context to use when deriving a query from a forma.
FormaFieldType
How a forma field type is described in a runtime forma definition. Strings correspond to primitive names or entity names (for references).
HyleSourceState
The result of a source adapter call.
Primitive

Functions§

FilterField
A reactive filter input derived from HyleFiltersState.
FormFilterField
Like FilterField but intended for form contexts: boolean fields render as a self-labelling checkbox (label on the right) instead of a 3-state select, matching the React FilterBoolean checkbox appearance.
field_type_key
Derive the HyleComponents key string from a FieldType.
form_body
Convert an IndexMap<String, String> (e.g. a parsed HTML form body) into a JSON Value object.
make_fullstack_adapter
use_context_provider
Convenience re-export so callers don’t need to import use_context_provider directly. Provide some context via the tree and return a reference to it
use_data
Reactively resolve data for a query.
use_dioxus_mutation
use_filters
Reactive filter/form state with validation.
use_form
Auto-wired form hook. Derives edit/create mode from the query, reads the appropriate mutation from HyleAdapterConfig context, and delegates filter state to use_filters.
use_forma
Fetch a forma definition from the "forma" model and derive a query for the target table.
use_fullstack_source
use_hyle_components
Read HyleComponents from Dioxus context, if provided.
use_list
Reactive list view with pagination and sort signals.
use_list_with_filters
Reactive list view driven by a live HyleFiltersState.
use_manifest
Reactively derive a Manifest from a query.
use_mutation
Returns create/update/delete mutation handles with model pre-bound.

Type Aliases§

DioxusFieldChangeFn
A single per-field Dioxus transform function.
DioxusFieldChangeMap
A map of per-field Dioxus transform functions (keyed by field name).
HyleFilterField
Dioxus specialisation of hyle::HyleFilterField — the render field carries an optional per-field Dioxus render closure.
InvalidationSignal
Row
Source
UseSource
A reactive source handle — ReadOnlySignal<HyleSourceState>.
Value