Idris2Doc : Web.Async.Widget

Web.Async.Widget

(source)

Reexports

import public Web.Async.I18n
import public Web.Async.Widget.Types

Definitions

disabledEdit : Has JSErr es => Ref t -> EditRes a -> JS es ()
  Sets the `disabled` attribute of the given element
if the given values is not a `Valid`.

This is useful for disabling components such as buttons
in the UI in case of invalid user input.

Totality: total
Visibility: export
endOnRemove : DOMLocal => Widget t -> JS es (Widget t)
  Adjusts a widget in such a way that its input streams ends
as soon as one of its nodes are removed from the DOM.

This is used in utilities such as `bindEd` or `Web.Async.List`, where
external events decide when a node is removed from the UI.

Totality: total
Visibility: export
voidRef : Ref t -> Ref Void
Totality: total
Visibility: export
attributesWithID : LIO io => (0 t : HTMLTag s) -> List (Attribute t) -> io (Ref t, List (Attribute t))
  Adds a unique ID to the given list of attributes if it does not yet
already have an ID attribute, and returns the updated list plus the ID.

Totality: total
Visibility: export
nodeWithID : LIO io => HTMLNode -> io (Maybe (Ref Void, HTMLNode))
  Adds a unique ID to the given HTML node if it does not yet
already have an ID and returns the updated node plus its ID.

Returns `Nothing` in case the node in question is a `Raw` node
or a `Text` node.

Totality: total
Visibility: export
validateRes : DOMLocal => Ref t -> {auto 0 _ : ValidityTag t} -> EditRes s -> Act ()
  Sets or unsets a custom validity message at the given node plus
sets a custom attribute (`data-validity`).

Totality: total
Visibility: export
textIn : DOMLocal => InputType -> List (Attribute Input) -> String -> JS es (Widget String)
  An input element that emits `String` events.

Totality: total
Visibility: export
valIn : DOMLocal => InputType -> List (Attribute Input) -> String -> (String -> EditRes e) -> JS es (Widget (EditRes e))
  A validated input element that emits events of type
`EditRes e`.

A custom validity message is set in case of invalid input.

Totality: total
Visibility: export
read : DOMLocal => Decode t => String -> EditRes t
Totality: total
Visibility: export
onFileIn : Sink e => (FileEv -> e) -> Attribute Input
Totality: total
Visibility: export
fileIn : DOMLocal => Attributes Input -> JS es (Widget (EditRes FileEv))
Totality: total
Visibility: export
selEntries : DOMLocal => Eq t => List (SelectEntry t) -> List (Attribute Select) -> Maybe t -> JS es (Widget (EditRes t))
  A select element displaying the values of type `v`
shown in the given list.

It fires events of type `t`, and uses two functions, one for
converting elements to events and one for displaying elements.

Totality: total
Visibility: export
sel : DOMLocal => Eq t => (v -> t) -> (v -> String) -> List v -> List (Attribute Select) -> Maybe t -> JS es (Widget (EditRes t))
  A select element displaying the values of type `v`
shown in the given list.

It fires events of type `t`, and uses two functions, one for
converting elements to events and one for displaying elements.

Totality: total
Visibility: export
txtEdit : DOMLocal => (String -> EditRes t) -> InputType -> (Maybe t -> String) -> List (Attribute Input) -> Editor t
Totality: total
Visibility: export
selEdit : DOMLocal => Interpolation t => Eq t => List t -> List (Attribute Select) -> Editor t
Totality: total
Visibility: export
hiddenDiv : Ref Div -> HTMLNode
Totality: total
Visibility: export
bindEd : DOMLocal => (a -> Editor b) -> (Maybe b -> Maybe a) -> Editor a -> Editor b
Totality: total
Visibility: export