search field utilities - present
name_ = Form.prop .name (\v m -> { m | name = v })
model =
{ name = "name" |> Present.init signature "John"
}
view =
{ name = model |> ( name_ |> Present.single Present.string )
{-
( "name"
, { field = model.name
, prop = name_
}
, { isPresent = True -- model.name |> Present.string
}
)
-}
}
( String
, form
, { opts | isPresent : Basics.Bool }
)
field name, form and isPresent
Model (Getto.Field.Form.Model form Attribute a) opts
single value model
Model (Getto.Field.Form.Between form Attribute a) opts
gteq-lteq value model
Getto.Field.Model Attribute a
no-attribute Field
Getto.Field.Form.Prop form Attribute a
Prop for no-attribute Field
Getto.Field.Model attr a -> Basics.Bool
presence method
init : String -> value -> String -> Field value
construct Field
"name" |> Present.init signature ""
single : Presenter attr a -> Getto.Field.Form.Prop form attr a -> form -> Model (Getto.Field.Form.Model form attr a) {}
construct Single
form |> ( name_ |> Present.single Present.string )
between : { gteq : model -> Model (Getto.Field.Form.Model form attr a) opts, lteq : model -> Model (Getto.Field.Form.Model form attr a) opts } -> String -> model -> Model (Getto.Field.Form.Between form attr a) {}
construct Between
form |>
( "age" |> Present.between
{ gteq = age_gteq_ |> Present.single Present.string
, lteq = age_lteq_ |> Present.single Present.string
}
)
string : Presenter attr String
string is not empty
set : Presenter attr (Set a)
set is not empty
present : (a -> Basics.Bool) -> Presenter attr a
field value is present