Formless.Transform.Row
- Package
- purescript-halogen-formless
- Repository
- thomashoneyman/purescript-halogen-formless
#mkInputFields Source
mkInputFields :: forall xs form inputs. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeInputFieldsFromRow xs inputs inputs => form Record InputField
A function to transform a row of labels into a InputFields. This allows you
to go directly from a custom form newtype to an inputs record without having to
fill in any values. Requires that all members have an instance of the
Initial
type class (all monoidal values do by default, along with some
other primitives).
#MakeInputFieldsFromRow Source
class MakeInputFieldsFromRow (xs :: RowList Type) (row :: Row Type) (to :: Row Type) | xs -> to where
The class that provides the Builder implementation to efficiently transform a row into a proper InputFields by wrapping it in newtypes and supplying initial values
Members
mkInputFieldsFromRowBuilder :: Proxy xs -> Proxy row -> FromScratch to
Instances
MakeInputFieldsFromRow Nil row ()
(IsSymbol name, Initial i, Cons name (InputField e i o) trash row, MakeInputFieldsFromRow tail row from, Row1Cons name (InputField e i o) from to) => MakeInputFieldsFromRow (Cons name (InputField e i o) tail) row to
#SProxies Source
type SProxies form = forall xs row inputs. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeSProxies xs row => Record row
A type to collect constraints necessary to apply to prove that a record of SProxies is compatible with your form type.
#mkSProxies Source
mkSProxies :: forall form xs inputs row. RowToList inputs xs => Newtype (form Record InputField) (Record inputs) => MakeSProxies xs row => Proxy form -> Record row
A helper function to produce a record of SProxies given a form spec, to save you the boilerplate of writing them all out.
#MakeSProxies Source
class MakeSProxies (xs :: RowList Type) (to :: Row Type) | xs -> to where
The class used to build up a new record of symbol proxies from an input row list.
Members
makeSProxiesBuilder :: Proxy xs -> FromScratch to
Instances
MakeSProxies Nil ()
(IsSymbol name, Row1Cons name (Proxy name) from to, MakeSProxies tail from) => MakeSProxies (Cons name x tail) to
- Modules
- Formless
- Formless.
Action - Formless.
Class. Initial - Formless.
Component - Formless.
Data. FormFieldResult - Formless.
Internal. Component - Formless.
Internal. Debounce - Formless.
Internal. Transform - Formless.
Query - Formless.
Retrieve - Formless.
Transform. Record - Formless.
Transform. Row - Formless.
Types. Component - Formless.
Types. Form - Formless.
Validation