PopupHelpers Module
Types and nested modules
| Type/Module | Description |
Functions and values
| Function or value | Description |
|
|
Full Usage:
choicePopup title body buttonTrueText buttonFalseText buttonAction dispatch
Parameters:
string
body : ReactElement
buttonTrueText : string
buttonFalseText : string
buttonAction : bool -> MouseEvent -> Unit
dispatch : Msg -> 'a
Returns: 'a
|
|
Full Usage:
choicePopupFunc title body buttonTrueText buttonFalseText buttonAction
Parameters:
string
body : (Msg -> Unit) -> ReactElement
buttonTrueText : string
buttonFalseText : string
buttonAction : bool -> (Msg -> Unit) -> MouseEvent -> Unit
Returns: (Msg -> Unit) -> Model -> ReactElement
|
|
Full Usage:
closablePopup title body foot extraStyle dispatch
Parameters:
string
body : ReactElement
foot : ReactElement
extraStyle : CSSProp list
dispatch : Msg -> Unit
Returns: Unit
|
|
Full Usage:
closablePopupFunc title body foot extraStyle
Parameters:
string
body : (Msg -> Unit) -> ReactElement
foot : (Msg -> Unit) -> ReactElement
extraStyle : CSSProp list
Returns: (Msg -> Unit) -> Model -> ReactElement
|
|
Full Usage:
codeEditor props elems
Parameters:
CodeEditorProps list
elems : ReactElement list
Returns: ReactElement
Modifiers: inline |
|
Full Usage:
confirmationPopup title buttonText body buttonAction dispatch
Parameters:
string
buttonText : string
body : ReactElement
buttonAction : unit -> unit
dispatch : Msg -> unit
Returns: Unit
|
|
Popup with an input textbox and two buttons. The text is reflected in Model.PopupDialogText. Return confirms the dialog, as it does in any other dialog with one obvious action. It used to reach KeyTypes.ScLeaveTextBox, whose job is to hand the keyboard back to the schematic: inside a popup that blurred the box the user had just typed into and did nothing else, which read as the entry having been thrown away. Swallowed here whether or not the action is available, so that Return means one thing inside a dialog rather than confirming it or emptying it depending on whether what has been typed so far is valid.
|
|
Full Usage:
dialogPopupBodyDescriptionAndInt beforeDescription currentDescription beforeInt intDefault valueProblem dispatch
Parameters:
PopupDialogData -> 'a
currentDescription : string
beforeInt : PopupDialogData -> 'b
intDefault : bigint
valueProblem : Model -> string option
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
Create the body of a dialog Popup with a compulsory description and a value, for editing an existing sheet parameter whose name is fixed. The caller seeds Text2 with the current description so that editing only the value leaves it intact. `valueProblem` is asked what is wrong with the value now in the box, and its answer is shown. The OK button is disabled when a slot of the sheet would break at the new value, and used to be disabled in silence - leaving the user to guess which component objected and why, when the constraint that failed carries a sentence written to explain exactly that.
|
Full Usage:
dialogPopupBodyIntAndText beforeText placeholder beforeInt intDefault dispatch
Parameters:
Model -> 'a
placeholder : string
beforeInt : PopupDialogData -> 'b
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
|
|
Full Usage:
dialogPopupBodyNInts beforeInt numOutputsDefault intDefault maxNumOutputs dispatch
Parameters:
PopupDialogData -> 'a
numOutputsDefault : int
intDefault : int
maxNumOutputs : int
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyOnlyBoundedInt beforeInt intDefault minBound maxBound dispatch
Parameters:
PopupDialogData -> 'a
intDefault : int
minBound : int
maxBound : int
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyOnlyInt beforeInt intDefault dispatch
Parameters:
PopupDialogData -> 'a
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyOnlyText before placeholder dispatch model
Parameters:
PopupDialogData -> 'a
placeholder : string
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
|
Full Usage:
dialogPopupBodyOnlyTextWithDefaultValue before placeholder currDescr dispatch model
Parameters:
PopupDialogData -> 'a
placeholder : string
currDescr : string option
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
|
Full Usage:
dialogPopupBodyTextAndInt beforeText placeholder beforeInt intDefault dispatch
Parameters:
PopupDialogData -> 'a
placeholder : string
beforeInt : PopupDialogData -> 'b
intDefault : int
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyTextAndTwoInts focus (beforeText, textPlaceholder) (beforeInt1, beforeInt2) (intDefault1, intDefault2) dispatch
Parameters:
int
beforeText : PopupDialogData -> 'a
textPlaceholder : string
beforeInt1 : PopupDialogData -> 'b
beforeInt2 : PopupDialogData -> 'c
intDefault1 : bigint
intDefault2 : bigint
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyTextDescriptionAndInt beforeText placeholder beforeDescription descriptionPlaceholder beforeInt intDefault nameIsTaken dispatch
Parameters:
PopupDialogData -> 'a
placeholder : string
beforeDescription : PopupDialogData -> 'b
descriptionPlaceholder : string
beforeInt : PopupDialogData -> 'c
intDefault : bigint
nameIsTaken : string -> bool
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
Create the body of a dialog Popup with a name, a compulsory description, and a value. Used to declare a sheet parameter: the description is what a custom component instance of the sheet shows the user when it asks them for a value, so a parameter cannot be declared without one. Name goes to Text, description to Text2, value to Int2. `nameIsTaken` is asked whether the sheet already declares a parameter of that name. Passed in rather than worked out here, so that this file needs to know nothing about where a sheet keeps its parameters.
|
Full Usage:
dialogPopupBodyTwoInts (beforeInt1, beforeInt2) (intDefault1, intDefault2) width2 dispatch
Parameters:
PopupDialogData -> 'a
beforeInt2 : PopupDialogData -> 'b
intDefault1 : bigint
intDefault2 : bigint
width2 : string
dispatch : Msg -> unit
Returns: Model -> ReactElement
|
|
Full Usage:
dialogPopupBodyTwoTexts (beforeText1, placeholder1) (beforeText2, placeholder2) dispatch model
Parameters:
PopupDialogData -> 'a
placeholder1 : string
beforeText2 : PopupDialogData -> 'b
placeholder2 : string
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
|
Full Usage:
dialogPopupRefresh title body extraStyle dispatch
Parameters:
string
body : Model -> ReactElement
extraStyle : CSSProp list
dispatch : Msg -> unit
Returns: Unit
|
|
Full Usage:
dialogVerilogCompBody before moduleName errorDiv errorList showExtraErrors codeToAdd compileButton addButton dispatch model
Parameters:
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
|
|
Full Usage:
dialogVerilogPopup title body saveUpdateText noErrors showingExtraInfo saveButtonAction moreInfoButton cancelAction isDisabled extraStyle dispatch
Parameters:
string
body : Model -> 'a
saveUpdateText : string
noErrors : bool
showingExtraInfo : bool
saveButtonAction : PopupDialogData -> unit
moreInfoButton : PopupDialogData -> unit
cancelAction : PopupDialogData -> Unit
isDisabled : PopupDialogData -> bool
extraStyle : CSSProp list
dispatch : Msg -> 'b
Returns: 'b
|
Popup with an input textbox and two buttons. The text is reflected in Model.PopupDialogText. The Verilog editor. Unlike every other popup here it holds work that exists nowhere else until it is saved, so leaving it is the one irrecoverable thing it can do. `cancelAction` is therefore given all three ways out that are not Save - the Cancel button, the X, and a click on the background - rather than each dispatching ClosePopup for itself. They discard exactly the same edits, so a confirmation on one of them and not the others would be a confirmation the user can miss by clicking somewhere else.
|
Full Usage:
dynamicClosablePopup title body foot extraStyle dispatch
Parameters:
string
body : Model -> ReactElement
foot : Model -> ReactElement
extraStyle : CSSProp list
dispatch : Msg -> Unit
Returns: Unit
|
|
Full Usage:
dynamicConfirmationPopup title buttonText body buttonActionOpt dispatch
Parameters:
string
buttonText : string
body : Model -> ReactElement
buttonActionOpt : (unit -> unit) option
dispatch : Msg -> unit
Returns: Unit
|
|
|
|
|
|
Full Usage:
getErrorList dialogData
Parameters:
PopupDialogData
Returns: ErrorInfo list
|
|
Full Usage:
getImportDecisions dialogData
Parameters:
PopupDialogData
Returns: Map<string, ImportDecision option>
|
|
|
|
|
|
Full Usage:
getIntList dialogData numInputsDefault widthDefault
Parameters:
PopupDialogData
numInputsDefault : int
widthDefault : int
Returns: int list
|
|
Full Usage:
getIntList2 dialogData numInputsDefault lsbDefault
Parameters:
PopupDialogData
numInputsDefault : int
lsbDefault : int
Returns: int list
|
|
|
|
Full Usage:
getMemorySetup dialogData wordWidthDefault
Parameters:
PopupDialogData
wordWidthDefault : int
Returns: int * int * InitMemData * string option
|
|
|
|
|
|
Full Usage:
mapNoDispatch optReact
Parameters:
ReactElement option
Returns: ((Msg -> Unit) -> ReactElement) option
|
|
Full Usage:
newBuildPopup title body foot close extraStyle dispatch model
Parameters:
string
body : (Msg -> unit) -> Model -> ReactElement
foot : DynamicElement
close : DynamicAction
extraStyle : CSSProp list
dispatch : Msg -> Unit
model : Model
Returns: ReactElement
|
|
|
|
Full Usage:
newConfirmationPopup title body buttonActionOpt buttonEnable close dispatch model
Parameters:
string
body : (Msg -> unit) -> Model -> ReactElement
buttonActionOpt : DynamicAction option
buttonEnable : Model -> bool
close : DynamicAction
dispatch : Msg -> unit
model : Model
Returns: ReactElement
|
|
Full Usage:
noDispatch react _dispatch
Parameters:
ReactElement
_dispatch : Msg -> Unit
Returns: ReactElement
|
|
Full Usage:
openInBrowser url _arg3
Parameters:
string
_arg3 : 'a
|
|
|
A parameter's value, typed into a box. A text box parsed as a bigint rather than an Input.number, because a parameter value is a ParamInt and so may be larger than any int: a parameter that gives a wide Constant its value is the case that needs it. The box is uncontrolled, so an unparseable entry stays on screen to be corrected while Int2 goes to None, which is what the red text and the disabled button read.
|
Full Usage:
paramValueError dialogData
Parameters:
PopupDialogData
Returns: ReactElement
|
|
|
|
Full Usage:
showMemoryEditorPopup maybeTitle body maybeFoot extraStyle dispatch
Parameters:
string option
body : MemoryEditorData -> 'a
maybeFoot : ReactElement option
extraStyle : CSSProp list
dispatch : Msg -> 'b
Returns: 'b
|
|
Full Usage:
staticButtonFoot buttonAction buttonText dispatch
Parameters:
MouseEvent -> unit
buttonText : string
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
unclosablePopup maybeTitle body maybeFoot extraStyle dispatch
Parameters:
string option
body : ReactElement
maybeFoot : ReactElement option
extraStyle : CSSProp list
dispatch : 'a
Returns: ReactElement
|
|
Full Usage:
verilogEditorTemplate
Returns: string
|
What the editor holds for a Verilog component that has not been written yet. Named rather than written inline in setInitState below because the cancel path compares against it: a new component whose code is still this has had nothing typed into it, so closing the editor throws nothing away and need not ask. See CatalogueView.createVerilogPopup.
|