[{"name":"MultiSelect","comment":" A select component for multi selection with local data.\n\n\n# Architecture\n\n@docs SmartSelect, Msg, init, view, viewCustom, subscriptions, update\n\n\n# Query\n\n@docs selected\n\n\n# Additional configuration\n\n@docs setSelected\n\n","unions":[{"name":"Msg","comment":" Opaque type representing cases to be passed to SmartSelect.update\n","args":["a"],"cases":[]},{"name":"SmartSelect","comment":" The opaque type representing a particular smart select instance.\n","args":["msg","a"],"cases":[]}],"aliases":[],"values":[{"name":"init","comment":" Instantiates and returns a smart select. Takes a function that expects a SmartSelect.Msg and returns an externally defined msg.\n","type":"(MultiSelect.Msg a -> msg) -> MultiSelect.SmartSelect msg a"},{"name":"selected","comment":" Get the currently selected entities, if any.\n","type":"MultiSelect.SmartSelect msg a -> List.List a"},{"name":"setSelected","comment":" It is possible that the select is instantiated on your model before data representing\na previous selection is loaded. Use this function to update the picked selection in\nthe select when the appropriate data is received.\n","type":"List.List a -> MultiSelect.SmartSelect msg a -> MultiSelect.SmartSelect msg a"},{"name":"subscriptions","comment":" Events external to the smart select to which it is subscribed.\n","type":"MultiSelect.SmartSelect msg a -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the provided smart select and receive the updated select instance and a cmd to run.\n","type":"MultiSelect.Msg a -> MultiSelect.SmartSelect msg a -> ( MultiSelect.SmartSelect msg a, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The smart select view for selecting multiple options at a time with local data.\n\n  - `options` takes a list of the data being selected from.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `viewSelectedOptionFn` takes a function that expects and instance of the data being selected from and returns html to render a selected option.\n\n","type":"{ options : List.List a, optionLabelFn : a -> String.String, viewSelectedOptionFn : a -> Html.Html msg } -> MultiSelect.SmartSelect msg a -> Html.Html msg"},{"name":"viewCustom","comment":" The smart select view for selecting multiple options at a time with local data.\n\n  - `isDisabled` takes a boolean that indicates whether or not the select can be opened.\n  - `options` takes a list of the data being selected from.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `optionDescriptionFn` takes a function that expects an instance of the data being selected from and returns a string describing the instance, i.e. if the label is \"Garden Hose\", the description may be \"30 ft\".\n  - `viewSelectedOptionFn` takes a function that expects an instance of the data being selected from and returns html to render a selected option.\n  - `optionsContainerMaxHeight` takes a float that specifies the max height of the container of the selectable options.\n  - `searchFn` takes a function that expects the search text and the items to search and returns the filtered items.\n  - `selectTitle` takes a string to label the select in its closed state and non-selected state.\n  - `noResultsForMsg` takes a function that expects a string and returns a message indicating that the search for the provided string returned no results.\n  - `noOptionsMsg` takes a string to indicate that no options exist in the select.\n\n```elm\nimport MultiSelect\nimport Html exposing (Html, div)\n\ntype Msg\n    = ...\n\ntype alias Product =\n    { name : String\n    , description : String\n    , price : Float\n    }\n\ntype alias Model =\n    { ...\n    , select : MultiSelect.SmartSelect Msg Product\n    , products : List Product\n    }\n\nviewSelectedProduct : Product -> Html Msg\nviewSelectedProduct product =\n    div []\n        [ text (product.name ++ \" - \" ++ (\"$\" ++ String.fromFloat product.price)) ]\n\nviewCustomProductSelect : Model -> Html Msg\nviewCustomProductSelect model =\n    MultiSelect.viewCustom\n        { isDisabled = False\n        , options = model.products\n        , optionLabelFn = .name\n        , optionDescriptionFn = \\option -> \"$\" ++ String.fromFloat option.price\n        , viewSelectedOptionFn = viewSelectedProduct\n        , optionsContainerMaxHeight = 500\n        , searchFn = \\searchText allOptions ->\n            List.filter (\\option ->\n                String.contains (String.toLower searchText) (String.toLower option.name) ||\n                String.contains (String.toLower searchText) (String.toLower option.description)\n            ) allOptions\n        , selectTitle = \"Select a Product\"\n        , noResultsForMsg = \\searchText -> \"No results found for: \" ++ searchText\n        , noOptionsMsg = \"There are no options to select\"\n        }\n```\n\n","type":"{ isDisabled : Basics.Bool, options : List.List a, optionLabelFn : a -> String.String, optionDescriptionFn : a -> String.String, viewSelectedOptionFn : a -> Html.Html msg, optionsContainerMaxHeight : Basics.Float, searchFn : String.String -> List.List a -> List.List a, selectTitle : String.String, noResultsForMsg : String.String -> String.String, noOptionsMsg : String.String } -> MultiSelect.SmartSelect msg a -> Html.Html msg"}],"binops":[]},{"name":"MultiSelectRemote","comment":" A select component for multi selection with remote data.\n\n\n# Architecture\n\n@docs SmartSelect, Msg, init, view, viewCustom, subscriptions, update\n\n\n# Query\n\n@docs selected\n\n\n# Externally Triggered Actions\n\n@docs setSelected\n\n","unions":[{"name":"Msg","comment":" Opaque type representing cases to be passed to SmartSelect.update\n","args":["a"],"cases":[]},{"name":"SmartSelect","comment":" The opaque type representing a particular smart select instance.\n","args":["msg","a"],"cases":[]}],"aliases":[],"values":[{"name":"init","comment":" Instantiates and returns a smart select.\n\n  - `internalMsg` takes a function that expects a SmartSelect.Msg and returns an externally defined msg.\n  - `characterSearchThreshold` takes an integer that specifies how many characters need to be typed before triggering the remote query.\n  - `debounceDuration` takes a float that specifies the duration in milliseconds between the last keypress and remote query being triggered.\n\n","type":"{ internalMsg : MultiSelectRemote.Msg a -> msg, characterSearchThreshold : Basics.Int, debounceDuration : Basics.Float } -> MultiSelectRemote.SmartSelect msg a"},{"name":"selected","comment":" Get the currently selected entities if any.\n","type":"MultiSelectRemote.SmartSelect msg a -> List.List a"},{"name":"setSelected","comment":" It is possible that the select is instantiated on your model before data representing\na previous selection is loaded. Use this function to update the picked selection in\nthe select when the appropriate data is received.\n","type":"List.List a -> MultiSelectRemote.SmartSelect msg a -> MultiSelectRemote.SmartSelect msg a"},{"name":"subscriptions","comment":" Events external to the smart select to which it is subscribed.\n","type":"MultiSelectRemote.SmartSelect msg a -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the provided smart select and receive the updated select instance and a cmd to run.\n\n    type alias RemoteSearchAttrs a =\n        { headers : List Header\n        , url : String -> String\n        , optionDecoder : Decoder a\n        }\n\n","type":"MultiSelectRemote.Msg a -> SmartSelect.Utilities.RemoteQueryAttrs a -> MultiSelectRemote.SmartSelect msg a -> ( MultiSelectRemote.SmartSelect msg a, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The smart select view for selecting multiple options at a time with local data.\n\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `viewSelectedOptionFn` takes a function that expects an instance of the data being selected from and returns html to render a selected option.\n\n","type":"{ optionLabelFn : a -> String.String, viewSelectedOptionFn : a -> Html.Html msg } -> MultiSelectRemote.SmartSelect msg a -> Html.Html msg"},{"name":"viewCustom","comment":" The smart select view for selecting multiple options at a time with local data.\n\n  - `isDisabled` takes a boolean that indicates whether or not the select can be opened.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `optionDescriptionFn` takes a function that expects an instance of the data being selected from and returns a string describing the instance, i.e. if the label is \"Garden Hose\", the description may be \"30 ft\".\n  - `viewSelectedOptionFn` takes a function that expects and instance of the data being selected from and returns html to render a selected option.\n  - `optionsContainerMaxHeight` takes a float that specifies the max height of the container of the selectable options.\n  - `spinnerColor` takes a `Color` for the loading spinner.\n  - `selectTitle` takes a string to label the select in its closed state and non-selected state.\n  - `characterThresholdPrompt` takes a function that expects an int and returns a string indicating how many more characters need to be entered to trigger the query.\n  - `queryErrorMsg` takes a string to indicate that an error has occured while querying data.\n  - `noResultsForMsg` takes a function that expects a string and returns a message indicating that the search for the provided string returned no results.\n  - `noOptionsMsg` takes a string to indicate that no options exist in the select.\n\n```elm\nimport MultiSelectRemote\nimport Html exposing (Html)\nimport Color\n\ntype Msg\n    = ...\n\ntype alias Product =\n    { name : String\n    , description : String\n    , price : Float\n    }\n\ntype alias Model =\n    { ...\n    , select : MultiSelectRemote.SmartSelect Msg Product\n    }\n\nviewSelectedProduct : Product -> Html Msg\nviewSelectedProduct product =\n    div []\n        [ text (product.name ++ \" - \" ++ (\"$\" ++ String.fromFloat product.price)) ]\n\nviewCustomProductSelect : Model -> Html Msg\nviewCustomProductSelect model =\n    MultiSelectRemote.viewCustom\n        { isDisabled = False\n        , optionLabelFn = .name\n        , optionDescriptionFn = \\option -> \"$\" ++ String.fromFloat option.price\n        , viewSelectedOptionFn = viewSelecteProduct\n        , optionsContainerMaxHeight = 500\n        , spinnerColor = Color.rgb255 0 0 0\n        , selectTitle = \"Select a Product\"\n        , characterThresholdPrompt =\n            \\difference ->\n                if difference > 1 then\n                    \"Please enter \" ++ String.fromInt difference ++ \" more characters to search for a Product\"\n\n                else if difference == 1 then\n                    \"Please enter 1 more character to search for a Product\"\n\n                else\n                    \"\"\n        , queryErrorMsg = \"An error occured while querying Products\"\n        , noResultsForMsg = \\searchText -> \"No results found for: \" ++ searchText\n        , noOptionsMsg = \"There are no options to select\"\n        }\n```\n\n","type":"{ isDisabled : Basics.Bool, optionLabelFn : a -> String.String, optionDescriptionFn : a -> String.String, viewSelectedOptionFn : a -> Html.Html msg, optionsContainerMaxHeight : Basics.Float, spinnerColor : Color.Color, selectTitle : String.String, characterThresholdPrompt : Basics.Int -> String.String, queryErrorMsg : String.String, noResultsForMsg : String.String -> String.String, noOptionsMsg : String.String } -> MultiSelectRemote.SmartSelect msg a -> Html.Html msg"}],"binops":[]},{"name":"SingleSelect","comment":" A select component for a single selection with local data.\n\n\n# Architecture\n\n@docs SmartSelect, Msg, init, view, viewCustom, subscriptions, update\n\n\n# Query\n\n@docs selected\n\n\n# Additional configuration\n\n@docs setSelected\n\n","unions":[{"name":"Msg","comment":" Opaque type representing cases to be passed to SmartSelect.update\n","args":["a"],"cases":[]},{"name":"SmartSelect","comment":" The opaque type representing a particular smart select instance.\n","args":["msg","a"],"cases":[]}],"aliases":[],"values":[{"name":"init","comment":" Instantiates and returns a smart select. Takes a function that expects a SmartSelect.Msg and returns an externally defined msg.\n","type":"(SingleSelect.Msg a -> msg) -> SingleSelect.SmartSelect msg a"},{"name":"selected","comment":" Get the currently selected entity if any.\n","type":"SingleSelect.SmartSelect msg a -> Maybe.Maybe a"},{"name":"setSelected","comment":" It is possible that the select is instantiated on your model before data representing\na previous selection is loaded. Use this function to update the picked selection in\nthe select when the appropriate data is received.\n","type":"Maybe.Maybe a -> SingleSelect.SmartSelect msg a -> SingleSelect.SmartSelect msg a"},{"name":"subscriptions","comment":" Events external to the smart select to which it is subscribed.\n","type":"SingleSelect.SmartSelect msg a -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the provided smart select and receive the updated select instance and a cmd to run.\n","type":"SingleSelect.Msg a -> SingleSelect.SmartSelect msg a -> ( SingleSelect.SmartSelect msg a, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The smart select view for selecting one option at a time with local data.\n\n  - `options` takes a list of the data being selected from.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n\n","type":"{ options : List.List a, optionLabelFn : a -> String.String } -> SingleSelect.SmartSelect msg a -> Html.Html msg"},{"name":"viewCustom","comment":" The customizable smart select view for selecting one option at a time with local data.\n\n  - `isDisabled` takes a boolean that indicates whether or not the select can be opened.\n  - `options` takes a list of the data being selected from.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `optionDescriptionFn` takes a function that expects an instance of the data being selected from and returns a string describing the instance, i.e. if the label is \"Garden Hose\", the description may be \"30 ft\".\n  - `optionsContainerMaxHeight` takes a float that specifies the max height of the container of the selectable options.\n  - `searchFn` takes a function that expects the search text and the items to search and returns the filtered items.\n  - `selectTitle` takes a string to label the select in its closed state and non-selected state.\n  - `searchPrompt` takes a string to indicate what is being searched for.\n  - `noResultsForMsg` takes a function that expects a string and returns a message indicating that the search for the provided string returned no results.\n  - `noOptionsMsg` takes a string to indicate that no options exist in the select.\n\n```elm\nimport SingleSelect\nimport Html exposing (Html)\n\ntype Msg\n    = ...\n\ntype alias Product =\n    { name : String\n    , description : String\n    , price : Float\n    }\n\ntype alias Model =\n    { ...\n    , select : SingleSelect.SmartSelect Msg Product\n    , products : List Product\n    }\n\nviewCustomProductSelect : Model -> Html Msg\nviewCustomProductSelect model =\n    SingleSelect.viewCustom\n        { isDisabled = False\n        , options = model.products\n        , optionLabelFn = .name\n        , optionDescriptionFn = \\option -> \"$\" ++ String.fromFloat option.price\n        , optionsContainerMaxHeight = 500\n        , searchFn = \\searchText allOptions ->\n            List.filter (\\option ->\n                String.contains (String.toLower searchText) (String.toLower option.name) ||\n                String.contains (String.toLower searchText) (String.toLower option.description)\n            ) allOptions\n        , selectTitle = \"Select a Product\"\n        , searchPrompt = \"Search for a Product\"\n        , noResultsForMsg = \\searchText -> \"No results found for: \" ++ searchText\n        , noOptionsMsg = \"There are no options to select\"\n        }\n```\n\n","type":"{ isDisabled : Basics.Bool, options : List.List a, optionLabelFn : a -> String.String, optionDescriptionFn : a -> String.String, optionsContainerMaxHeight : Basics.Float, searchFn : String.String -> List.List a -> List.List a, selectTitle : String.String, searchPrompt : String.String, noResultsForMsg : String.String -> String.String, noOptionsMsg : String.String } -> SingleSelect.SmartSelect msg a -> Html.Html msg"}],"binops":[]},{"name":"SingleSelectRemote","comment":" A select component for a single selection with remote data.\n\n\n# Architecture\n\n@docs SmartSelect, Msg, init, view, viewCustom, subscriptions, update\n\n\n# Query\n\n@docs selected\n\n\n# Externally Triggered Actions\n\n@docs setSelected\n\n","unions":[{"name":"Msg","comment":" Opaque type representing cases to be passed to SmartSelect.update\n","args":["a"],"cases":[]},{"name":"SmartSelect","comment":" The opaque type representing a particular smart select instance.\n","args":["msg","a"],"cases":[]}],"aliases":[],"values":[{"name":"init","comment":" Instantiates and returns a smart select.\n\n  - `internalMsg` takes a function that expects a SmartSelect.Msg and returns an externally defined msg.\n  - `characterSearchThreshold` takes an integer that specifies how many characters need to be typed before triggering the remote query.\n  - `debounceDuration` takes a float that specifies the duration in milliseconds between the last keypress and remote query being triggered.\n\n","type":"{ internalMsg : SingleSelectRemote.Msg a -> msg, characterSearchThreshold : Basics.Int, debounceDuration : Basics.Float } -> SingleSelectRemote.SmartSelect msg a"},{"name":"selected","comment":" Get the currently selected entity if any.\n","type":"SingleSelectRemote.SmartSelect msg a -> Maybe.Maybe a"},{"name":"setSelected","comment":" It is possible that the select is instantiated on your model before data representing\na previous selection is loaded. Use this function to update the picked selection in\nthe select when the appropriate data is received.\n","type":"Maybe.Maybe a -> SingleSelectRemote.SmartSelect msg a -> SingleSelectRemote.SmartSelect msg a"},{"name":"subscriptions","comment":" Events external to the smart select to which it is subscribed.\n","type":"SingleSelectRemote.SmartSelect msg a -> Platform.Sub.Sub msg"},{"name":"update","comment":" Update the provided smart select and receive the updated select instance and a cmd to run.\n\n    type alias RemoteSearchAttrs a =\n        { headers : List Header\n        , url : String -> String\n        , optionDecoder : Decoder a\n        }\n\n","type":"SingleSelectRemote.Msg a -> SmartSelect.Utilities.RemoteQueryAttrs a -> SingleSelectRemote.SmartSelect msg a -> ( SingleSelectRemote.SmartSelect msg a, Platform.Cmd.Cmd msg )"},{"name":"view","comment":" The smart select view for selecting one option at a time with remote data. Takes a function\nthat expects an instance of the data being selected from and returns a string naming/labeling the\ninstance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n","type":"(a -> String.String) -> SingleSelectRemote.SmartSelect msg a -> Html.Html msg"},{"name":"viewCustom","comment":" The customizable smart select view for selecting one option at a time with remote data. It expects the following arguments (in order):\n\n  - `isDisabled` takes a boolean that indicates whether or not the select can be opened.\n  - `optionLabelFn` takes a function that expects an instance of the data being selected from and returns a string naming/labeling the instance, i.e. if it is a \"Product\" being selected, the label may be \"Garden Hose\".\n  - `optionDescriptionFn` takes a function that expects an instance of the data being selected from and returns a string describing the instance, i.e. if the label is \"Garden Hose\", the description may be \"30 ft\".\n  - `optionsContainerMaxHeight` takes a float that specifies the max height of the container of the selectable options.\n  - `spinnerColor` takes a `Color` for the loading spinner.\n  - `selectTitle` takes a string to label the select in its closed state and non-selected state.\n  - `searchPrompt` takes a string to indicate what is being searched for.\n  - `characterThresholdPrompt` takes a function that expects an int and returns a string indicating how many more characters need to be entered to trigger the query.\n  - `queryErrorMsg` takes a string to indicate that an error has occured while querying data.\n  - `noResultsForMsg` takes a function that expects a string and returns a message indicating that the search for the provided string returned no results.\n  - `noOptionsMsg` takes a string to indicate that no options exist in the select.\n\n```elm\nimport SingleSelectRemote\nimport Html exposing (Html)\nimport Color\n\ntype Msg\n    = ...\n\ntype alias Product =\n    { name : String\n    , description : String\n    , price : Float\n    }\n\ntype alias Model =\n    { ...\n    , select : SingleSelectRemote.SmartSelect Msg Product\n    }\n\nviewCustomProductSelect : Model -> Html Msg\nviewCustomProductSelect model =\n    SingleSelectRemote.viewCustom\n        { isDisabled = False\n        , optionLabelFn = .name\n        , optionDescriptionFn = \\option -> \"$\" ++ String.fromFloat option.price\n        , optionsContainerMaxHeight = 500\n        , spinnerColor = Color.rgb255 0 0 0\n        , selectTitle = \"Select a Product\"\n        , searchPrompt = \"Search for a Product\"\n        , characterThresholdPrompt =\n            \\difference ->\n                if difference > 1 then\n                    \"Please enter \" ++ String.fromInt difference ++ \" more characters to search for a Product\"\n\n                else if difference == 1 then\n                    \"Please enter 1 more character to search for a Product\"\n\n                else\n                    \"\"\n        , queryErrorMsg = \"An error occured while querying Products\"\n        , noResultsForMsg = \\searchText -> \"No results found for: \" ++ searchText\n        , noOptionsMsg = \"There are no options to select\"\n        }\n```\n\n","type":"{ isDisabled : Basics.Bool, optionLabelFn : a -> String.String, optionDescriptionFn : a -> String.String, optionsContainerMaxHeight : Basics.Float, spinnerColor : Color.Color, selectTitle : String.String, searchPrompt : String.String, characterThresholdPrompt : Basics.Int -> String.String, queryErrorMsg : String.String, noResultsForMsg : String.String -> String.String, noOptionsMsg : String.String } -> SingleSelectRemote.SmartSelect msg a -> Html.Html msg"}],"binops":[]}]