mendraw/mendix

Types

Mendix가 전달하는 props 객체

pub type JsProps
pub type ObjectItem
pub type ValueStatus {
  Available
  Unavailable
  Loading
}

Constructors

  • Available
  • Unavailable
  • Loading

Values

pub fn cx(classes: List(#(String, Bool))) -> String

CSS 클래스명 조건부 조합

pub fn from_option(option: option.Option(a)) -> a

Gleam Option을 JS 값으로 변환 (None → undefined)

pub fn get_prop(props: JsProps, key: String) -> option.Option(a)

Mendix props에서 값 추출 (undefined → None)

pub fn get_prop_required(props: JsProps, key: String) -> a

Mendix props에서 항상 존재하는 값 추출

pub fn get_status(obj: a) -> ValueStatus
pub fn get_string_prop(props: JsProps, key: String) -> String

Mendix props에서 문자열 속성값 추출 (undefined → “”)

pub fn has_prop(props: JsProps, key: String) -> Bool

Mendix props에서 키 존재 확인

pub fn object_id(item: ObjectItem) -> String
pub fn to_option(value: a) -> option.Option(a)

JS 값을 Gleam Option으로 변환 (undefined/null → None)

pub fn to_value_status(status: String) -> ValueStatus
Search Document