mendraw/mendix
Provides typed access to common Mendix client values.
Types
A typed ObjectItem value used by the mendix capability.
pub type ObjectItem
A typed ValueStatus value used by the mendix capability.
pub type ValueStatus {
Available
Unavailable
Loading
}
Constructors
-
AvailableThe
Availablevariant. -
UnavailableThe
Unavailablevariant. -
LoadingThe
Loadingvariant.
Values
pub fn cx(classes classes: List(#(String, Bool))) -> String
Joins the class names whose conditions are enabled.
pub fn from_option(option option: option.Option(a)) -> a
Converts an option into nullable JavaScript data.
pub fn get_prop(
props props: JsProps,
key key: String,
) -> option.Option(a)
Returns an optional Mendix property.
pub fn get_prop_required(
props props: JsProps,
key key: String,
) -> a
Returns a required Mendix property.
pub fn get_status(obj obj: a) -> ValueStatus
Returns the typed status of a Mendix value.
pub fn get_string_prop(
props props: JsProps,
key key: String,
) -> String
Returns a Mendix property as text.
pub fn has_prop(props props: JsProps, key key: String) -> Bool
Reports whether a Mendix property is present.
pub fn object_id(item item: ObjectItem) -> String
Returns the Mendix object identifier.
pub fn to_option(value value: a) -> option.Option(a)
Converts nullable JavaScript data into an option.
pub fn to_value_status(status status: String) -> ValueStatus
Converts a Mendix status string into a typed status.