Header menu logo issie

PopupHelpers Module

Types and nested modules

Type/Module Description

Constants

CERSCProps

CERSCState

CodeEditorReactStatefulComponent

DynamicAction

DynamicElement

Functions and values

Function or value Description

buildPopup title body foot close extraStyle dispatch model

Full Usage: buildPopup title body foot close extraStyle dispatch model

Parameters:
Returns: ReactElement

Base popup builder function, used by other popup generators

title : string
body : (Msg -> Unit) -> Model -> 'a
foot : (Msg -> Unit) -> Model -> 'b
close : (Msg -> Unit) -> MouseEvent -> unit
extraStyle : CSSProp list
dispatch : Msg -> Unit
model : Model
Returns: ReactElement

choicePopup title body buttonTrueText buttonFalseText buttonAction dispatch

Full Usage: choicePopup title body buttonTrueText buttonFalseText buttonAction dispatch

Parameters:
    title : string
    body : ReactElement
    buttonTrueText : string
    buttonFalseText : string
    buttonAction : bool -> MouseEvent -> Unit
    dispatch : Msg -> 'a

Returns: 'a

A static choice dialog popup.

title : string
body : ReactElement
buttonTrueText : string
buttonFalseText : string
buttonAction : bool -> MouseEvent -> Unit
dispatch : Msg -> 'a
Returns: 'a

choicePopupFunc title body buttonTrueText buttonFalseText buttonAction

Full Usage: choicePopupFunc title body buttonTrueText buttonFalseText buttonAction

Parameters:
Returns: (Msg -> Unit) -> Model -> ReactElement

A static choice dialog popup returning the popup function

title : string
body : (Msg -> Unit) -> ReactElement
buttonTrueText : string
buttonFalseText : string
buttonAction : bool -> (Msg -> Unit) -> MouseEvent -> Unit
Returns: (Msg -> Unit) -> Model -> ReactElement

closablePopup title body foot extraStyle dispatch

Full Usage: closablePopup title body foot extraStyle dispatch

Parameters:
Returns: Unit

Create a popup and add it to the page. Body and foot are static content. Can be closed by the ClosePopup message.

title : string
body : ReactElement
foot : ReactElement
extraStyle : CSSProp list
dispatch : Msg -> Unit
Returns: Unit

closablePopupFunc title body foot extraStyle

Full Usage: closablePopupFunc title body foot extraStyle

Parameters:
Returns: (Msg -> Unit) -> Model -> ReactElement

As closablePopup but accept functions and return the popup function Can be closed by the ClosePopup message.

title : string
body : (Msg -> Unit) -> ReactElement
foot : (Msg -> Unit) -> ReactElement
extraStyle : CSSProp list
Returns: (Msg -> Unit) -> Model -> ReactElement

codeEditor props elems

Full Usage: codeEditor props elems

Parameters:
Returns: ReactElement
Modifiers: inline
props : CodeEditorProps list
elems : ReactElement list
Returns: ReactElement

confirmationPopup title buttonText body buttonAction dispatch

Full Usage: confirmationPopup title buttonText body buttonAction dispatch

Parameters:
    title : string
    buttonText : string
    body : ReactElement
    buttonAction : unit -> unit
    dispatch : Msg -> unit

Returns: Unit

A static confirmation popup.

title : string
buttonText : string
body : ReactElement
buttonAction : unit -> unit
dispatch : Msg -> unit
Returns: Unit

dialogPopup title body buttonText buttonAction isDisabled extraStyle dispatch

Full Usage: dialogPopup title body buttonText buttonAction isDisabled extraStyle dispatch

Parameters:
Returns: Unit

Popup with an input textbox and two buttons. The text is reflected in Model.PopupDialogText.

title : string
body : Model -> ReactElement
buttonText : string
buttonAction : Model -> unit
isDisabled : Model -> bool
extraStyle : CSSProp list
dispatch : Msg -> unit
Returns: Unit

dialogPopupBodyIntAndText beforeText placeholder beforeInt intDefault dispatch

Full Usage: dialogPopupBodyIntAndText beforeText placeholder beforeInt intDefault dispatch

Parameters:
    beforeText : Model -> 'a
    placeholder : string
    beforeInt : PopupDialogData -> 'b
    intDefault : int
    dispatch : Msg -> unit

Returns: Model -> ReactElement

Create the body of a dialog Popup with both text and int.

beforeText : Model -> 'a
placeholder : string
beforeInt : PopupDialogData -> 'b
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyMemorySetup intDefault dispatch model

Full Usage: dialogPopupBodyMemorySetup intDefault dispatch model

Parameters:
    intDefault : int
    dispatch : Msg -> unit
    model : Model

Returns: ReactElement

Create the body of a memory dialog popup: asks for AddressWidth and WordWidth, two integers.

intDefault : int
dispatch : Msg -> unit
model : Model
Returns: ReactElement

dialogPopupBodyNInts beforeInt numOutputsDefault intDefault maxNumOutputs dispatch

Full Usage: dialogPopupBodyNInts beforeInt numOutputsDefault intDefault maxNumOutputs dispatch

Parameters:
    beforeInt : PopupDialogData -> 'a
    numOutputsDefault : int
    intDefault : int
    maxNumOutputs : int
    dispatch : Msg -> unit

Returns: Model -> ReactElement
beforeInt : PopupDialogData -> 'a
numOutputsDefault : int
intDefault : int
maxNumOutputs : int
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyOnlyBoundedInt beforeInt intDefault minBound maxBound dispatch

Full Usage: dialogPopupBodyOnlyBoundedInt beforeInt intDefault minBound maxBound dispatch

Parameters:
    beforeInt : PopupDialogData -> 'a
    intDefault : int
    minBound : int
    maxBound : int
    dispatch : Msg -> unit

Returns: Model -> ReactElement

Create the body of a dialog Popup with only an int whose value is bounded

beforeInt : PopupDialogData -> 'a
intDefault : int
minBound : int
maxBound : int
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyOnlyInt beforeInt intDefault dispatch

Full Usage: dialogPopupBodyOnlyInt beforeInt intDefault dispatch

Parameters:
Returns: Model -> ReactElement

Create the body of a dialog Popup with only an int.

beforeInt : PopupDialogData -> 'a
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyOnlyText before placeholder dispatch model

Full Usage: dialogPopupBodyOnlyText before placeholder dispatch model

Parameters:
Returns: ReactElement

Create the body of a dialog Popup with only text.

before : PopupDialogData -> 'a
placeholder : string
dispatch : Msg -> unit
model : Model
Returns: ReactElement

dialogPopupBodyOnlyTextWithDefaultValue before placeholder currDescr dispatch model

Full Usage: dialogPopupBodyOnlyTextWithDefaultValue before placeholder currDescr dispatch model

Parameters:
    before : PopupDialogData -> 'a
    placeholder : string
    currDescr : string option
    dispatch : Msg -> unit
    model : Model

Returns: ReactElement

Create the body of a dialog Popup with only text for sheet description (can have an initial value + allow empty).

before : PopupDialogData -> 'a
placeholder : string
currDescr : string option
dispatch : Msg -> unit
model : Model
Returns: ReactElement

dialogPopupBodyTextAndInt beforeText placeholder beforeInt intDefault dispatch

Full Usage: dialogPopupBodyTextAndInt beforeText placeholder beforeInt intDefault dispatch

Parameters:
Returns: Model -> ReactElement

Create the body of a dialog Popup with both text and int.

beforeText : PopupDialogData -> 'a
placeholder : string
beforeInt : PopupDialogData -> 'b
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyTextAndTwoInts focus (beforeText, textPlaceholder) (beforeInt1, beforeInt2) (intDefault1, intDefault2) dispatch

Full Usage: dialogPopupBodyTextAndTwoInts focus (beforeText, textPlaceholder) (beforeInt1, beforeInt2) (intDefault1, intDefault2) dispatch

Parameters:
Returns: Model -> ReactElement

Create the body of a dialog Popup with text and two ints. focus: which of the boxes has initial focus (= 1,2,3)

focus : int
beforeText : PopupDialogData -> 'a
textPlaceholder : string
beforeInt1 : PopupDialogData -> 'b
beforeInt2 : PopupDialogData -> 'c
intDefault1 : bigint
intDefault2 : bigint
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupBodyTwoInts (beforeInt1, beforeInt2) (intDefault1, intDefault2) width2 dispatch

Full Usage: dialogPopupBodyTwoInts (beforeInt1, beforeInt2) (intDefault1, intDefault2) width2 dispatch

Parameters:
Returns: Model -> ReactElement

Create the body of a dialog Popup with two ints.

beforeInt1 : PopupDialogData -> 'a
beforeInt2 : PopupDialogData -> 'b
intDefault1 : bigint
intDefault2 : bigint
width2 : string
dispatch : Msg -> unit
Returns: Model -> ReactElement

dialogPopupRefresh title body extraStyle dispatch

Full Usage: dialogPopupRefresh title body extraStyle dispatch

Parameters:
Returns: Unit
title : string
body : Model -> ReactElement
extraStyle : CSSProp list
dispatch : Msg -> unit
Returns: Unit

dialogVerilogCompBody before moduleName errorDiv errorList showExtraErrors codeToAdd compileButton addButton dispatch model

Full Usage: dialogVerilogCompBody before moduleName errorDiv errorList showExtraErrors codeToAdd compileButton addButton dispatch model

Parameters:
Returns: ReactElement

Create the body of a Verilog Editor Popup.

before : PopupDialogData -> 'a
moduleName : string option
errorDiv : ReactElement
errorList : ErrorInfo list
showExtraErrors : bool
codeToAdd : string option
compileButton : PopupDialogData -> Unit
addButton : PopupDialogData -> string * ReplaceType * int * int -> unit
dispatch : Msg -> unit
model : Model
Returns: ReactElement

dialogVerilogPopup title body saveUpdateText noErrors showingExtraInfo saveButtonAction moreInfoButton isDisabled extraStyle dispatch

Full Usage: dialogVerilogPopup title body saveUpdateText noErrors showingExtraInfo saveButtonAction moreInfoButton isDisabled extraStyle dispatch

Parameters:
Returns: Unit

Popup with an input textbox and two buttons. The text is reflected in Model.PopupDialogText.

title : string
body : Model -> ReactElement
saveUpdateText : string
noErrors : bool
showingExtraInfo : bool
saveButtonAction : PopupDialogData -> unit
moreInfoButton : PopupDialogData -> unit
isDisabled : PopupDialogData -> bool
extraStyle : CSSProp list
dispatch : Msg -> unit
Returns: Unit

dynamicClosablePopup title body foot extraStyle dispatch

Full Usage: dynamicClosablePopup title body foot extraStyle dispatch

Parameters:
Returns: Unit

Body and foot are functions that take a string of text and produce a reactElement. The meaning of the input string to those functions is the content of PopupDialogText (i.e. in a dialog popup, the string is the current value of the input box.).

title : string
body : Model -> ReactElement
foot : Model -> ReactElement
extraStyle : CSSProp list
dispatch : Msg -> Unit
Returns: Unit

dynamicClosablePopupFunc title body foot extraStyle

Full Usage: dynamicClosablePopupFunc title body foot extraStyle

Parameters:
Returns: (Msg -> Unit) -> Model -> ReactElement

As dynamicClosablePopup but accept functions of dispatch and return the popup function

title : string
body : (Msg -> Unit) -> Model -> 'a
foot : (Msg -> Unit) -> Model -> 'b
extraStyle : CSSProp list
Returns: (Msg -> Unit) -> Model -> ReactElement

dynamicConfirmationPopup title buttonText body buttonActionOpt dispatch

Full Usage: dynamicConfirmationPopup title buttonText body buttonActionOpt dispatch

Parameters:
    title : string
    buttonText : string
    body : Model -> ReactElement
    buttonActionOpt : (unit -> unit) option
    dispatch : Msg -> unit

Returns: Unit
title : string
buttonText : string
body : Model -> ReactElement
buttonActionOpt : (unit -> unit) option
dispatch : Msg -> unit
Returns: Unit

dynamicProgressPopupFunc title cancel

Full Usage: dynamicProgressPopupFunc title cancel

Parameters:
Returns: (Msg -> Unit) -> Model -> ReactElement

Popup to track progress of some long operation. Progress is captured via two dialog integers, current and max number. Typically the number is number of steps. The popup display is controlled by model.PopupDialog integers. Progress model updates must change these.

title : string
cancel : (Msg -> Unit) -> Unit
Returns: (Msg -> Unit) -> Model -> ReactElement

getCode dialogData

Full Usage: getCode dialogData

Parameters:
Returns: string
dialogData : PopupDialogData
Returns: string

getErrorList dialogData

Full Usage: getErrorList dialogData

Parameters:
Returns: ErrorInfo list
dialogData : PopupDialogData
Returns: ErrorInfo list

getImportDecisions dialogData

Full Usage: getImportDecisions dialogData

Parameters:
Returns: Map<string, ImportDecision option>
dialogData : PopupDialogData
Returns: Map<string, ImportDecision option>

getInt dialogData

Full Usage: getInt dialogData

Parameters:
Returns: int
dialogData : PopupDialogData
Returns: int

getInt2 dialogData

Full Usage: getInt2 dialogData

Parameters:
Returns: bigint
dialogData : PopupDialogData
Returns: bigint

getIntList dialogData numInputsDefault widthDefault

Full Usage: getIntList dialogData numInputsDefault widthDefault

Parameters:
Returns: int list
dialogData : PopupDialogData
numInputsDefault : int
widthDefault : int
Returns: int list

getIntList2 dialogData numInputsDefault lsbDefault

Full Usage: getIntList2 dialogData numInputsDefault lsbDefault

Parameters:
Returns: int list
dialogData : PopupDialogData
numInputsDefault : int
lsbDefault : int
Returns: int list

getMemoryEditor model

Full Usage: getMemoryEditor model

Parameters:
Returns: MemoryEditorData
model : Model
Returns: MemoryEditorData

getMemorySetup dialogData wordWidthDefault

Full Usage: getMemorySetup dialogData wordWidthDefault

Parameters:
Returns: int * int * InitMemData * string option
dialogData : PopupDialogData
wordWidthDefault : int
Returns: int * int * InitMemData * string option

getText dialogData

Full Usage: getText dialogData

Parameters:
Returns: string
dialogData : PopupDialogData
Returns: string

getText2 dialogData

Full Usage: getText2 dialogData

Parameters:
Returns: string
dialogData : PopupDialogData
Returns: string

mapNoDispatch optReact

Full Usage: mapNoDispatch optReact

Parameters:
Returns: ((Msg -> Unit) -> ReactElement) option
optReact : ReactElement option
Returns: ((Msg -> Unit) -> ReactElement) option

newBuildPopup title body foot close extraStyle dispatch model

Full Usage: newBuildPopup title body foot close extraStyle dispatch model

Parameters:
Returns: ReactElement

Base popup builder function, used by other popup generators: close function depends on (dynamic) model. OK button is enabled based on return from body function

title : string
body : (Msg -> unit) -> Model -> ReactElement
foot : DynamicElement
close : DynamicAction
extraStyle : CSSProp list
dispatch : Msg -> Unit
model : Model
Returns: ReactElement

newButtonFoot buttonAction buttonText closeAction enable dispatch model

Full Usage: newButtonFoot buttonAction buttonText closeAction enable dispatch model

Parameters:
    buttonAction : (Msg -> unit) -> Model -> unit
    buttonText : string
    closeAction : (Msg -> unit) -> Model -> unit
    enable : Model -> bool
    dispatch : Msg -> unit
    model : Model

Returns: ReactElement
buttonAction : (Msg -> unit) -> Model -> unit
buttonText : string
closeAction : (Msg -> unit) -> Model -> unit
enable : Model -> bool
dispatch : Msg -> unit
model : Model
Returns: ReactElement

newConfirmationPopup title body buttonActionOpt buttonEnable close dispatch model

Full Usage: newConfirmationPopup title body buttonActionOpt buttonEnable close dispatch model

Parameters:
Returns: ReactElement
title : string
body : (Msg -> unit) -> Model -> ReactElement
buttonActionOpt : DynamicAction option
buttonEnable : Model -> bool
close : DynamicAction
dispatch : Msg -> unit
model : Model
Returns: ReactElement

noDispatch react _dispatch

Full Usage: noDispatch react _dispatch

Parameters:
Returns: ReactElement
react : ReactElement
_dispatch : Msg -> Unit
Returns: ReactElement

openInBrowser url _arg3

Full Usage: openInBrowser url _arg3

Parameters:
    url : string
    _arg3 : 'a

url : string
_arg3 : 'a

preventDefault e

Full Usage: preventDefault e

Parameters:
e : ClipboardEvent

showMemoryEditorPopup maybeTitle body maybeFoot extraStyle dispatch

Full Usage: showMemoryEditorPopup maybeTitle body maybeFoot extraStyle dispatch

Parameters:
Returns: 'b
maybeTitle : string option
body : MemoryEditorData -> 'a
maybeFoot : ReactElement option
extraStyle : CSSProp list
dispatch : Msg -> 'b
Returns: 'b

staticButtonFoot buttonAction buttonText dispatch

Full Usage: staticButtonFoot buttonAction buttonText dispatch

Parameters:
    buttonAction : MouseEvent -> unit
    buttonText : string
    dispatch : Msg -> unit

Returns: ReactElement
buttonAction : MouseEvent -> unit
buttonText : string
dispatch : Msg -> unit
Returns: ReactElement

unclosablePopup maybeTitle body maybeFoot extraStyle dispatch

Full Usage: unclosablePopup maybeTitle body maybeFoot extraStyle dispatch

Parameters:
Returns: ReactElement

Unclosable popup.

maybeTitle : string option
body : ReactElement
maybeFoot : ReactElement option
extraStyle : CSSProp list
dispatch : 'a
Returns: ReactElement

Type something to start searching.