[{"name":"Ginger.Category","comment":"\n\n\n# Definition\n\n@docs Category\n\n\n# Conversions\n\n@docs toString\n@docs fromString\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Category","comment":" ","args":[],"cases":[["Agenda",[]],["Article",[]],["Artifact",[]],["Audio",[]],["Collection",[]],["Document",[]],["Event",[]],["Image",[]],["Location",[]],["Media",[]],["Meta",[]],["News",[]],["Person",[]],["Text",[]],["Video",[]],["Website",[]],["Custom",["String.String"]]]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder (List.NonEmpty.NonEmpty Ginger.Category.Category)"},{"name":"fromString","comment":" ","type":"String.String -> Ginger.Category.Category"},{"name":"toString","comment":" ","type":"Ginger.Category.Category -> String.String"}],"binops":[]},{"name":"Ginger.Id","comment":" The Ginger resource id. We 'tag' the resource id with type `Int`\nusing [elm-tagged](https://package.elm-lang.org/packages/joneshf/elm-tagged/2.1.1/).\nThis helps us to not mix up some other `Int` with a resource id by accident.\n\n_The only way to construct a `ResourceId` is by decoding one from some json or\nparsing it out of an url path. This is rather strict and there might be some times\nyou just need to create a random `ResourceId` for whatever reason, this hasn't\ncome up so far, but file an issue if it does._\n\n\n# Definition\n\n@docs ResourceId\n\n\n# Convert\n\n@docs toInt\n@docs toString\n\n\n# Decode and Encode\n\n@docs fromUrl\n@docs fromJson\n@docs toJson\n\n","unions":[],"aliases":[{"name":"ResourceId","comment":" ","args":[],"type":"Tagged.Tagged Ginger.Id.Resource Basics.Int"}],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Id.ResourceId"},{"name":"fromUrl","comment":" ","type":"Url.Parser.Parser (Ginger.Id.ResourceId -> a) a"},{"name":"toInt","comment":" ","type":"Ginger.Id.ResourceId -> Basics.Int"},{"name":"toJson","comment":" ","type":"Ginger.Id.ResourceId -> Json.Encode.Value"},{"name":"toString","comment":" ","type":"Ginger.Id.ResourceId -> String.String"}],"binops":[]},{"name":"Ginger.Media","comment":"\n\n\n# Definitions\n\n@docs Media\n@docs MediaClass\n@docs VideoData\n\n\n# Build & Query\n\n@docs imageUrl\n@docs videoData\n@docs imageClassToString\n@docs empty\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Media","comment":" ","args":[],"cases":[["Image",["Dict.Dict String.String String.String"]],["Video",["Ginger.Media.VideoData"]],["Empty",[]]]},{"name":"MediaClass","comment":" ","args":[],"cases":[["Avatar",[]],["Thumbnail",[]],["Card",[]],["Small",[]],["Medium",[]],["Large",[]],["Cinemascope",[]],["Custom",["String.String"]]]}],"aliases":[{"name":"VideoData","comment":" ","args":[],"type":"{ embedCode : String.String, width : Basics.Int, height : Basics.Int }"}],"values":[{"name":"empty","comment":" ","type":"Ginger.Media.Media"},{"name":"fromJson","comment":" Decode image and video data\n","type":"Json.Decode.Decoder Ginger.Media.Media"},{"name":"imageClassToString","comment":" ","type":"Ginger.Media.MediaClass -> String.String"},{"name":"imageUrl","comment":" The image url with a given `MediaClass`\n","type":"Ginger.Media.MediaClass -> Ginger.Media.Media -> Maybe.Maybe String.String"},{"name":"videoData","comment":" The video data.\n","type":"Ginger.Media.Media -> Maybe.Maybe Ginger.Media.VideoData"}],"binops":[]},{"name":"Ginger.Predicate","comment":"\n\n\n# Definition\n\n@docs Predicate\n\n\n# Conversions\n\n@docs toString\n@docs fromString\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Predicate","comment":" ","args":[],"cases":[["IsAbout",[]],["HasAuthor",[]],["HasDepiction",[]],["HasDocument",[]],["HasBanner",[]],["HasPart",[]],["HasRelation",[]],["Custom",["String.String"]]]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Predicate.Predicate"},{"name":"fromString","comment":" ","type":"String.String -> Ginger.Predicate.Predicate"},{"name":"toString","comment":" ","type":"Ginger.Predicate.Predicate -> String.String"}],"binops":[]},{"name":"Ginger.Request","comment":"\n\n\n# Requests\n\nHere are some examples of how you might get Ginger resources.\n\n    import Ginger.Request as Request\n        exposing\n            ( Ordering(..)\n            , QueryParam(..)\n            , SortField(..)\n            )\n\n    query : Cmd Msg\n    query =\n        Request.resourceQuery GotSearchResults\n            [ Text \"amsterdam\" ]\n\n    events : Cmd Msg\n    events =\n        Request.resourceQuery GotEvents\n            [ Upcoming\n            , HasCategory Event\n            , SortBy StartDate Asc\n            ]\n\n@docs resourceById\n@docs resourceByPath\n@docs resourceByName\n@docs resourceQuery\n@docs locationQuery\n\n\n# Search\n\n@docs Results\n\n@docs QueryParam\n@docs Ordering\n@docs SortField\n@docs Operator\n\n@docs queryParamsToBuilder\n\n","unions":[{"name":"Operator","comment":" ","args":[],"cases":[["EQ",[]],["LTE",[]],["LT",[]],["GT",[]],["GTE",[]],["MatchPhrase",[]]]},{"name":"Ordering","comment":" ","args":[],"cases":[["Asc",[]],["Desc",[]]]},{"name":"QueryParam","comment":" Some of these params only work if `mod_elasticsearch` is enabled\n","args":[],"cases":[["ExcludeCategory",["Ginger.Category.Category"]],["Facet",["String.String"]],["Filter",["String.String","Ginger.Request.Operator","String.String"]],["HasCategory",["Ginger.Category.Category"]],["HasObjectId",["Ginger.Id.ResourceId"]],["HasObjectName",["String.String"]],["HasSubjectId",["Ginger.Id.ResourceId"]],["HasSubjectName",["String.String"]],["IsUnfinished",[]],["IsUpcoming",[]],["Limit",["Basics.Int"]],["Offset",["Basics.Int"]],["PromoteCategory",["Ginger.Category.Category"]],["SortBy",["Ginger.Request.SortField","Ginger.Request.Ordering"]],["Text",["String.String"]],["Custom",["String.String","String.String"]]]},{"name":"SortField","comment":" ","args":[],"cases":[["PublicationDate",[]],["StartDate",[]]]}],"aliases":[{"name":"Results","comment":" ","args":["a"],"type":"{ results : List.List a, facets : Json.Decode.Value, total : Basics.Int }"}],"values":[{"name":"locationQuery","comment":" ","type":"(Result.Result Http.Error (Ginger.Request.Results Ginger.Resource.Extra.Location) -> msg) -> List.List Ginger.Request.QueryParam -> Platform.Cmd.Cmd msg"},{"name":"queryParamsToBuilder","comment":" Convert this modules `QueryParm` to elm/url `QueryParameter` values\nto use with Url.Builder.\n","type":"List.List Ginger.Request.QueryParam -> List.List Url.Builder.QueryParameter"},{"name":"resourceById","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Ginger.Id.ResourceId -> Cmd msg\n    request toMsg id =\n        Request.resourceById toMsg id\n\n","type":"(Result.Result Http.Error (Ginger.Resource.ResourceWith Ginger.Resource.Edges) -> msg) -> Ginger.Id.ResourceId -> Platform.Cmd.Cmd msg"},{"name":"resourceByName","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Cmd msg\n    request toMsg =\n        Request.resourceByName toMsg \"home\"\n\n","type":"(Result.Result Http.Error (Ginger.Resource.ResourceWith Ginger.Resource.Edges) -> msg) -> String.String -> Platform.Cmd.Cmd msg"},{"name":"resourceByPath","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Cmd msg\n    request toMsg =\n        Request.resourceByPath toMsg \"/news\"\n\n","type":"(Result.Result Http.Error (Ginger.Resource.ResourceWith Ginger.Resource.Edges) -> msg) -> String.String -> Platform.Cmd.Cmd msg"},{"name":"resourceQuery","comment":"\n\n    request : Http.Request Http.Error (List Resource)\n    request =\n        Request.resourceQuery [ Text \"amsterdam\" ]\n\n","type":"(Result.Result Http.Error (Ginger.Request.Results (Ginger.Resource.ResourceWith Ginger.Resource.Edges)) -> msg) -> List.List Ginger.Request.QueryParam -> Platform.Cmd.Cmd msg"}],"binops":[]},{"name":"Ginger.Resource","comment":"\n\n\n# Definitions\n\n@docs ResourceWith\n\n@docs Edges\n@docs Edge\n@docs Block\n@docs BlockType\n\n\n# Access data\n\n@docs category\n@docs depiction\n@docs depictions\n@docs edgesWithPredicate\n\n\n# Decode\n\n@docs fromJsonWithEdges\n@docs fromJsonWithoutEdges\n\n","unions":[{"name":"BlockType","comment":" ","args":[],"cases":[["Text",[]],["Header",[]],["Page",[]],["Custom",["String.String"]]]}],"aliases":[{"name":"Block","comment":" ","args":[],"type":"{ body : Ginger.Translation.Translation, name : String.String, type_ : Ginger.Resource.BlockType, relatedRscId : Maybe.Maybe Ginger.Id.ResourceId, properties : Json.Decode.Value }"},{"name":"Edge","comment":" A connection to a resource named by `Predicate`\n","args":[],"type":"{ predicate : Ginger.Predicate.Predicate, resource : Ginger.Resource.ResourceWith {} }"},{"name":"Edges","comment":" The record we use to extend `ResourceWith a`.\n\nYou can render a list of resource depictions like so:\n\n    viewDepictions : ResourceWith Edges -> List (Html msg)\n    viewDepictions resource =\n        List.map viewImage <|\n            depictions Media.Medium resource\n\nThis next example won't compile because you need a `ResourceWith Edges`\nand this signature indicates they are missing.\n\n    viewDepictions : ResourceWith {} -> List (Html msg)\n    viewDepictions resource =\n        List.map viewImage <|\n            depictions Media.Medium resource\n\n","args":[],"type":"{ edges : List.List Ginger.Resource.Edge }"},{"name":"ResourceWith","comment":" An Elm representation of a Ginger resource.\n\nNote the `a` in the record definition, this an extensible record.\nThis means it includes _at least_ all of these fields but may have others\nas well. This lets us reason about whether the edges are included in the data,\ncompile time. The Ginger REST API includes edges nested only one level deep,\nbut since the edges are also resources we can re-use this datatype like\n`ResourceWith {}`. This tells use there are _no_ other fields besides the ones here.\n\nSo you'll see this used in function signatures like:\n\n    ResourceWith Edges -- has edges\n\n    ResourceWith {} -- does not have the edges\n\n    ResourceWith a -- might have them but the code that's using this doesn't really care\n\n_Note: the `ResourceWith {}` might actually have edges, they are just not fetched._\n\n","args":["a"],"type":"{ a | id : Ginger.Id.ResourceId, title : Ginger.Translation.Translation, body : Ginger.Translation.Translation, subtitle : Ginger.Translation.Translation, summary : Ginger.Translation.Translation, path : String.String, category : List.NonEmpty.NonEmpty Ginger.Category.Category, properties : Json.Decode.Value, publicationDate : Maybe.Maybe Time.Posix, media : Ginger.Media.Media, blocks : List.List Ginger.Resource.Block }"}],"values":[{"name":"category","comment":" The category of a `ResourceWith`.\n\nEvery resource has _one_ category, but can be part of a hierarchy of other\ncategories. For example `news` is part of `text > article > news`. This function\nwill always return the `Category` stored with the `ResourceWith`.\n\n_Note: there hasn't been the need to expose any of the parent categories so far,\nif there is please file an issue._\n\n","type":"Ginger.Resource.ResourceWith a -> Ginger.Category.Category"},{"name":"depiction","comment":" The image url of the `ResourceWith` depiction.\n\nReturns the image url if there is a depiction _and_ the mediaclass exists.\n\n","type":"Ginger.Media.MediaClass -> Ginger.Resource.ResourceWith Ginger.Resource.Edges -> Maybe.Maybe String.String"},{"name":"depictions","comment":" The image urls of the `ResourceWith` depictions\n\nReturns a list of image urls if there is a depiction _and_ the mediaclass exists.\n\n","type":"Ginger.Media.MediaClass -> Ginger.Resource.ResourceWith Ginger.Resource.Edges -> List.List String.String"},{"name":"edgesWithPredicate","comment":" Return all edges with a given predicate.\n\nThe returned resources won't have any edges themselves, indicated by the `{}`\nin `ResourceWith {}`.\n\n","type":"Ginger.Predicate.Predicate -> Ginger.Resource.ResourceWith Ginger.Resource.Edges -> List.List (Ginger.Resource.ResourceWith {})"},{"name":"fromJsonWithEdges","comment":" Decode a `ResourceWith` that has edges.\n","type":"Json.Decode.Decoder (Ginger.Resource.ResourceWith Ginger.Resource.Edges)"},{"name":"fromJsonWithoutEdges","comment":" Decode a `ResourceWith` that does not have edges.\n","type":"Json.Decode.Decoder (Ginger.Resource.ResourceWith {})"}],"binops":[]},{"name":"Ginger.Resource.Extra","comment":"\n\n\n# Location\n\n@docs Location\n@docs locationFromJson\n\n\n# Author\n\n@docs AuthorName\n@docs authorName\n@docs authorNameFromJson\n\n\n# Event\n\n@docs EventDate\n@docs eventDate\n@docs eventDateFromJson\n\n","unions":[],"aliases":[{"name":"AuthorName","comment":" ","args":[],"type":"{ firstName : String.String, middleName : String.String, lastNamePrefix : String.String, lastName : String.String }"},{"name":"EventDate","comment":" ","args":[],"type":"{ dateStart : Maybe.Maybe Time.Posix, dateEnd : Maybe.Maybe Time.Posix }"},{"name":"Location","comment":" ","args":[],"type":"{ id : Ginger.Id.ResourceId, lat : Basics.Float, lng : Basics.Float }"}],"values":[{"name":"authorName","comment":" ","type":"Ginger.Resource.ResourceWith Ginger.Resource.Edges -> Maybe.Maybe Ginger.Resource.Extra.AuthorName"},{"name":"authorNameFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.AuthorName"},{"name":"eventDate","comment":" ","type":"Ginger.Resource.ResourceWith a -> Maybe.Maybe Ginger.Resource.Extra.EventDate"},{"name":"eventDateFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.EventDate"},{"name":"locationFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.Location"}],"binops":[]},{"name":"Ginger.Translation","comment":"\n\n\n# Definitions\n\n@docs Translation\n@docs Language\n\n\n# Conversion\n\n@docs toString\n@docs toStringEscaped\n@docs withDefault\n@docs isEmpty\n@docs fromList\n@docs toIso639\n\n\n# Html\n\n@docs text\n@docs html\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Language","comment":" ","args":[],"cases":[["EN",[]],["NL",[]],["ZH",[]]]},{"name":"Translation","comment":" ","args":[],"cases":[]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Translation.Translation"},{"name":"fromList","comment":" Construct a Translation from a list of Language and String value pairs\n","type":"List.List ( Ginger.Translation.Language, String.String ) -> Ginger.Translation.Translation"},{"name":"html","comment":" Translate and render as Html markup\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> List.List (Html.Html msg)"},{"name":"isEmpty","comment":" Checks if translated String is empty.\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> Basics.Bool"},{"name":"text","comment":" Translate and render as Html text\n\nWe try to unescape the escaped characters but if that fails we'll render the `Translation` as is.\n\nHtml elements will be filtered out and the text will be joined.\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> Html.Html msg"},{"name":"toIso639","comment":" Convert a Language to an [Iso639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) String\n","type":"Ginger.Translation.Language -> String.String"},{"name":"toString","comment":" Get the translated String value.\n\n_Unescapes character entity references, strips Html nodes and defaults to an empty String._\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> String.String"},{"name":"toStringEscaped","comment":" Get the _original_ translated String value as returned by the REST api.\n\n_Defaults to an empty String._\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> String.String"},{"name":"withDefault","comment":" Get the translated String value.\n\nThe first argument is the fallback Language.\n\n_Attempt fallback if translated value is missing, defaults to an empty String._\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Language -> Ginger.Translation.Translation -> String.String"}],"binops":[]},{"name":"Ginger.Util","comment":" This module contains some useful functions for parsing and rendering `Html`.\n\n\n# Conditional views\n\n@docs viewIf\n@docs viewIfNot\n@docs viewEither\n\n\n# Optional views\n\n@docs viewMaybe\n@docs viewMaybeWithDefault\n\n\n# Parse Html\n\n@docs stripHtml\n@docs toHtml\n\n\n# String manipulation\n\n@docs truncate\n\n","unions":[],"aliases":[],"values":[{"name":"stripHtml","comment":" Remove all Html nodes from a String\n\n    example :: String\n    example =\n        stripHtml \"<p>Hola!</p>\"\n\n    --> \"Hola!\"\n\n_This unescapes html unicode characters as well.\nIf parsing fails the original String is returned_\n\n","type":"String.String -> String.String"},{"name":"toHtml","comment":" Convert a String to Html\n\n_This unescapes html unicode characters as well_\n\n","type":"String.String -> List.List (Html.Html msg)"},{"name":"truncate","comment":" Truncate a String and append `...` if the String is longer than provided length\n\n\n    example : String\n    example =\n        truncate 10 \"Truncate a String and append `...` if the String is longer than provided length\"\n\n    --> \"Truncate a...\"\n\n","type":"Basics.Int -> String.String -> String.String"},{"name":"viewEither","comment":" If the boolean expression evaluates to `True`, render some html, otherwise,\nrender some other html.\n\n    view : Model -> Html msg\n    view model =\n        , article []\n            [ h1 [] [ text model.title ]\n            , p []\n                [ viewEither (model.category == Category.Article)\n                    (\\_ -> text \"article\")\n                    (\\_ -> text \"something else\")\n                ]\n            ]\n\n","type":"Basics.Bool -> (() -> Html.Html msg) -> (() -> Html.Html msg) -> Html.Html msg"},{"name":"viewIf","comment":" Render some html if a boolean expression evaluates to `True`.\n\n    view : Model -> Html msg\n    view model =\n        article []\n            [ h1 [] [ text model.title ]\n            , viewIf\n                (model.category == Category.Article)\n                (\\_ -> p [] [ text \"article\" ])\n            ]\n\n","type":"Basics.Bool -> (() -> Html.Html msg) -> Html.Html msg"},{"name":"viewIfNot","comment":" Render some html if a boolean expression evaluates to `False`.\n","type":"Basics.Bool -> (() -> Html.Html msg) -> Html.Html msg"},{"name":"viewMaybe","comment":" Maybe, the resource has an author. Render what's in the `maybe`, or nothing.\n\n    view : Model -> Html msg\n    view model =\n        article []\n            [ h1 [] [ text \"Article\" ]\n            , viewMaybe model.author\n                (\\authorName -> p [] [ text authorName ])\n            ]\n\n","type":"Maybe.Maybe a -> (a -> Html.Html msg) -> Html.Html msg"},{"name":"viewMaybeWithDefault","comment":" Render something else if there's nothing in the `maybe`.\n\n    view : Model -> Html msg\n    view model =\n        article []\n            [ h1 [] [ text \"Article\" ]\n            , p []\n                [ viewMaybeWithDefault model.author\n                    (\\_ -> text \"Anonymous\")\n                    (\\authorName -> text authorName)\n                ]\n            ]\n\n","type":"Maybe.Maybe a -> (() -> Html.Html msg) -> (a -> Html.Html msg) -> Html.Html msg"}],"binops":[]}]