[{"name":"AgGrid","comment":" AgGrid integration for elm.\n\n\n# Data Types\n\n@docs Aggregation, ColumnDef, FilterType, LockPosition, PinningType, Renderer, RowGroupPanelVisibility\n@docs RowSelection, StateChange\n\n\n# Grid\n\n@docs GridConfig, grid\n\n\n# Defaults\n\n@docs defaultGridConfig, defaultSettings\n\n\n# Events\n\n@docs onCellChanged, onCellDoubleClicked, onSelectionChange\n\n\n# ColumnState\n\n@docs ColumnState, onColumnStateChanged, columnStatesDecoder, columnStatesEncoder\n\n\n# FilterState\n\n@docs FilterState, onFilterStateChanged, filterStatesEncoder, filterStatesDecoder\n\n\n# Sidebar\n\n@docs Sidebar, SidebarType, SidebarPosition, defaultSidebar\n\n","unions":[{"name":"Aggregation","comment":" Variants to aggregate values for a grouped column.\n","args":[],"cases":[["AvgAggregation",[]],["CountAggregation",[]],["CustomAggregation",["String.String"]],["FirstAggregation",[]],["LastAggregation",[]],["MaxAggregation",[]],["MinAggregation",[]],["NoAggregation",[]],["SumAggregation",[]]]},{"name":"FilterType","comment":" Possible filter options for columns.\n","args":[],"cases":[["NumberFilter",[]],["StringFilter",[]],["SetFilter",[]],["NoFilter",[]]]},{"name":"LockPosition","comment":" Lock a column to position to left or right to always have this column displayed in that position.\n\nOr can be configured to not lock in one position and move the column freely.\n\n","args":[],"cases":[["LockToLeft",[]],["LockToRight",[]],["NoPositionLock",[]]]},{"name":"PinningType","comment":" Possible options to pin a column.\n","args":[],"cases":[["PinnedToLeft",[]],["PinnedToRight",[]],["Unpinned",[]]]},{"name":"Renderer","comment":" The `Renderer` expresses how the data is retrieved from the list of data\nand rendered to the view.\n\nThe editor and renderer views in the table depend on the type.\nFor example, a `BoolRenderer` is displayed and can be edited with a checkbox\nin the table.\n\nThe `Renderer` may need a function to read the value for the cell from the\nrecords.\n\n\n### Example\n\nIf the data is list of `Product`, the `Renderer` to display the column for\nthe `title` might be defined as:\n\n    type alias Product =\n        { title : String }\n\n    -- Column definitions:\n    [{ renderer = StringRenderer .title, ... }]\n\n","args":["dataType"],"cases":[["AppRenderer",["{ componentName : String.String, componentParams : Maybe.Maybe Json.Encode.Value }","dataType -> String.String"]],["BoolRenderer",["dataType -> Basics.Bool"]],["CurrencyRenderer",["{ countryCode : String.String, currency : String.String }","dataType -> Maybe.Maybe String.String"]],["DecimalRenderer",["{ countryCode : String.String, decimalPlaces : Basics.Int }","dataType -> Maybe.Maybe String.String"]],["FloatRenderer",["dataType -> Basics.Float"]],["GroupRenderer",["dataType -> String.String"]],["IntRenderer",["dataType -> Basics.Int"]],["MaybeFloatRenderer",["dataType -> Maybe.Maybe Basics.Float"]],["MaybeIntRenderer",["dataType -> Maybe.Maybe Basics.Int"]],["MaybeStringRenderer",["dataType -> Maybe.Maybe String.String"]],["NoRenderer",[]],["PercentRenderer",["{ countryCode : String.String, decimalPlaces : Basics.Int }","dataType -> Maybe.Maybe String.String"]],["SelectionRenderer",["dataType -> String.String","List.List String.String"]],["StringRenderer",["dataType -> String.String"]]]},{"name":"RowGroupPanelVisibility","comment":" Row Group Panel allows the users to control which columns the rows are grouped by.\n","args":[],"cases":[["AlwaysVisible",[]],["NeverVisible",[]],["OnlyWhenGroupingVisible",[]]]},{"name":"RowSelection","comment":" Type of row selection, set to either `SingleRowSelection` or `MultipleRowSelection` to enable selection.\n\n  - `SingleRowSelection` will use single row selection, such that when you select a row, any previously selected row gets unselected.\n  - `MultipleRowSelection` allows multiple rows to be selected.\n  - `NoRowSelection` will not perform a row selection, only selecting the cell.\n\n","args":[],"cases":[["MultipleRowSelection",[]],["NoRowSelection",[]],["SingleRowSelection",[]]]},{"name":"SidebarPosition","comment":" Position for the sidebar.\n","args":[],"cases":[["SidebarLeft",[]],["SidebarRight",[]]]},{"name":"SidebarType","comment":" Possible options for displayed sidebars.\n","args":[],"cases":[["ColumnSidebar",[]],["FilterSidebar",[]]]}],"aliases":[{"name":"ColumnDef","comment":" Column definition.\n\nRequires `field`, `renderer`, `headerName`, and `settings` to be defined\nfor each column.\n\n  - `field`: name of the column and specifically used to decode data\n    properly (e.g. from events)\n\n  - `renderer`: used to render data to a cell (for more information see\n    the documentation for `Renderer`)\n\n  - `headerName`: displayed text in the column header\n\n  - `settings`: allows to customize each column - a `defaultSettings`\n    record is offered, which can be adjusted to your own needs to reduce\n    the implemenation overhead.\n\n\n### Example\n\n    let\n        defaultSettings =\n            AgGrid.defaultSettings\n    in\n    [ { field = \"id\"\n      , renderer = IntRenderer .id\n      , headerName = \"Id\"\n      , settings = defaultSettings\n      }\n    , { field = \"title\"\n      , renderer = StringRenderer .title\n      , headerName = \"Product\"\n      , settings =\n            { defaultSettings\n                | editable = False\n                , pinned = AgGrid.PinnedToLeft\n            }\n      }\n    ]\n\n","args":["dataType"],"type":"{ field : String.String, renderer : AgGrid.Renderer dataType, headerName : String.String, settings : AgGrid.ColumnSettings }"},{"name":"ColumnState","comment":" Column state.\n\nCan be used to evaluate the current table state whenever a change to the structure of the table\nhappens (e.g. sorting, order, sizing, or visiblity of columns changed).\n\nMight be used to persist the table state of the user to the localstorage or some other external\nstorage. Column states can be restored through the `columnState` on the `GridConfig`.\n\n","args":[],"type":"{ aggFunc : Maybe.Maybe String.String, colId : String.String, flex : Maybe.Maybe Basics.Int, hide : Maybe.Maybe Basics.Bool, pinned : Maybe.Maybe String.String, pivot : Maybe.Maybe Basics.Bool, pivotIndex : Maybe.Maybe Basics.Int, rowGroup : Maybe.Maybe Basics.Bool, rowGroupIndex : Maybe.Maybe Basics.Int, sort : Maybe.Maybe String.String, sortIndex : Maybe.Maybe Basics.Int, width : Basics.Int }"},{"name":"FilterState","comment":" Filter state.\n\nCan be used to evaluate the current filter configuration whenever a filter on a column gets changed.\n\nMight be used to persist the filters applied to the table for the users to the localstorage or some\nother external storage. Filter states can be restored through the `filterState` on the `GridConfig`.\n\n","args":[],"type":"{ filterType : String.String, filter : Maybe.Maybe String.String, type_ : Maybe.Maybe String.String, values : List.List String.String }"},{"name":"GridConfig","comment":" Grid configurations.\n","args":["dataType"],"type":"{ autoGroupColumnDef : { cellRendererParams : { suppressCount : Basics.Bool, checkbox : Basics.Bool }, headerName : Maybe.Maybe String.String, minWidth : Maybe.Maybe Basics.Int, resizable : Basics.Bool }, autoSizeColumns : Basics.Bool, cacheQuickFilter : Basics.Bool, columnStates : List.List AgGrid.ColumnState, detailRenderer : Maybe.Maybe { componentName : String.String, componentParams : Maybe.Maybe Json.Encode.Value, rowHeight : Maybe.Maybe Basics.Int }, disableResizeOnScroll : Basics.Bool, filterStates : Dict.Dict String.String AgGrid.FilterState, groupDefaultExpanded : Basics.Int, groupIncludeFooter : Basics.Bool, groupIncludeTotalFooter : Basics.Bool, groupSelectsChildren : Basics.Bool, isRowSelectable : dataType -> Basics.Bool, pagination : Basics.Bool, quickFilterText : String.String, rowHeight : Maybe.Maybe Basics.Int, rowId : Maybe.Maybe (dataType -> String.String), rowGroupPanelShow : AgGrid.RowGroupPanelVisibility, rowMultiSelectWithClick : Basics.Bool, rowSelection : AgGrid.RowSelection, selectedIds : List.List String.String, sideBar : AgGrid.Sidebar, size : String.String, suppressMenuHide : Basics.Bool, suppressRowClickSelection : Basics.Bool, sizeToFitAfterFirstDataRendered : Basics.Bool, stopEditingWhenCellsLoseFocus : Basics.Bool, themeClasses : Maybe.Maybe String.String, suppressRowDeselection : Basics.Bool }"},{"name":"Sidebar","comment":" Sidebar configuration.\n","args":[],"type":"{ panels : List.List AgGrid.SidebarType, defaultToolPanel : Maybe.Maybe AgGrid.SidebarType, position : AgGrid.SidebarPosition }"},{"name":"StateChange","comment":" Change event data for a table state changes.\n","args":["type_"],"type":"{ event : { type_ : AgGrid.EventType }, states : type_ }"}],"values":[{"name":"columnStatesDecoder","comment":" Decoder for the current column states.\n\nCan be used to retrieve and decode the column states from an external storage.\n\n","type":"Json.Decode.Decoder (List.List AgGrid.ColumnState)"},{"name":"columnStatesEncoder","comment":" Encode a collection of `ColumnState`.\n\nCan be used to persist the current list of `ColumnState` for the grid to an external storage.\n\n","type":"List.List AgGrid.ColumnState -> Json.Encode.Value"},{"name":"defaultGridConfig","comment":" Retrieve a `GridConfig` record with default configuration.\n\nCan be used when implementing the grid.\n\n        { autoGroupColumnDef =\n            { cellRendererParams =\n                { suppressCount = False\n                , checkbox = False\n                }\n            , headerName = Nothing\n            , minWidth = Nothing\n            , resizable = True\n            }\n        , autoSizeColumns = False\n        , cacheQuickFilter = False\n        , columnStates = []\n        , detailRenderer = Nothing\n        , disableResizeOnScroll = False\n        , filterStates = Dict.empty\n        , groupDefaultExpanded = 0\n        , groupIncludeFooter = False\n        , groupIncludeTotalFooter = False\n        , groupSelectsChildren = False\n        , isRowSelectable = always True\n        , pagination = False\n        , quickFilterText = \"\"\n        , rowGroupPanelShow = NeverVisible\n        , rowHeight = Nothing\n        , rowMultiSelectWithClick = False\n        , rowSelection = MultipleRowSelection\n        , selectedIds = []\n        , sideBar = defaultSidebar\n        , size = \"65vh\"\n        , sizeToFitAfterFirstDataRendered = True\n        , stopEditingWhenCellsLoseFocus = True\n        , suppressMenuHide = False\n        , suppressRowClickSelection = False\n        , suppressRowDeselection = False\n        , themeClasses = Nothing\n        }\n\n","type":"AgGrid.GridConfig dataType"},{"name":"defaultSettings","comment":" Retrieve a `ColumnSettings` record with default configuration.\n\nCan be used when implementing column configurations for the table.\n\nDefault column settings:\n\n    { aggFunc = NoAggregation\n    , checkboxSelection = False\n    , editable = False\n    , enablePivot = True\n    , enableRowGroup = True\n    , enableValue = True\n    , filter = SetFilter\n    , filterParams =\n        { buttons = [ ClearButton ]\n        , closeOnApply = False\n        }\n    , filterValueGetter = Nothing\n    , headerCheckboxSelection = False\n    , hide = False\n    , lockPosition = NoLock\n    , minWidth = Nothing\n    , pinned = Unpinned\n    , resizable = True\n    , rowGroup = False\n    , showDisabledCheckboxes = False\n    , sortable = True\n    , suppressColumnsToolPanel = False\n    , suppressFiltersToolPanel = False\n    , suppressMenu = False\n    , suppressSizeToFit = True\n    , valueFormatter = Nothing\n    , valueGetter = Nothing\n    , valueParser = Nothing\n    , valueSetter = Nothing\n    , width = Nothing\n    }\n\n","type":"AgGrid.ColumnSettings"},{"name":"defaultSidebar","comment":" Retrieve a `Sidebar` with default configuration.\n\nCan be used to ease the sidebar configuration.\n\n        { panels = []\n        , defaultToolPanel = Nothing\n        , position = SidebarRight\n        }\n\n","type":"AgGrid.Sidebar"},{"name":"filterStatesDecoder","comment":" Decoder for the filter states.\n\nCan be used to retrieve and decode the filter states from an external storage.\n\n","type":"Json.Decode.Decoder (Dict.Dict String.String AgGrid.FilterState)"},{"name":"filterStatesEncoder","comment":" Encode a collection of `FilterState`.\n\nCan be used to persist the current collection of `FilterState` for the grid to an external storage.\n\n","type":"Dict.Dict String.String AgGrid.FilterState -> Json.Encode.Value"},{"name":"grid","comment":" Defines the data grid.\n\n\n## Example\n\n    let\n        gridConfig =\n            AgGrid.defaultGridConfig\n                |> (\\config -> { config | themeClasses = Just \"ag-theme-balham ag-basic\" })\n\n        events =\n            [ onCellChanged rowDecoder UpdateProduct ]\n\n        defaultSettings =\n            AgGrid.defaultSettings\n                |> (\\settings -> { settings | editable = True })\n\n        columns =\n            [ { field = \"id\"\n              , renderer = IntRenderer .id\n              , headerName = \"Id\"\n              , settings = { defaultSettings | enablePivot = False }\n              }\n            , { field = \"title\"\n              , renderer = StringRenderer .title\n              , headerName = \"Product\"\n              , settings = { defaultSettings | filter = StringFilter }\n              }\n            ]\n\n        data =\n            model.products\n    in\n    grid gridConfig events columns data\n\n","type":"AgGrid.GridConfig dataType -> List.List (Html.Attribute msg) -> List.List (AgGrid.ColumnDef dataType) -> List.List dataType -> Html.Html msg"},{"name":"onCellChanged","comment":" Detect change events on cells.\n\nDecodes the changed row according to the provided `dataDecoder` and passes the result to\nthe message `toMsg`.\n\nHandles the `cellValueChanged` event from Ag Grid.\n\n","type":"Json.Decode.Decoder dataType -> (Result.Result Json.Decode.Error dataType -> msg) -> Html.Attribute msg"},{"name":"onCellDoubleClicked","comment":" Detect doubleclick events on cells.\n\nDecodes the row of the clicked cell according to the provided `dataDecoder` and the field\nname of the clicked cells as tuple and passes the result to the message `toMsg`.\n\nHandles the `cellDoubleClicked` event from Ag Grid.\n\n","type":"Json.Decode.Decoder dataType -> (( Result.Result Json.Decode.Error dataType, String.String ) -> msg) -> Html.Attribute msg"},{"name":"onColumnStateChanged","comment":" Detect change events to the table structure (e.g. sorting or moved columns).\n\nDecodes the `EventType` of the change and the current states of the grid columns and passes\nthe result to the `toMsg`.\n\n","type":"(AgGrid.StateChange (List.List AgGrid.ColumnState) -> msg) -> Html.Attribute msg"},{"name":"onFilterStateChanged","comment":" Detect change events to the table filters.\n\nDecodes the `EventType` of the change and the filter configuration of the grid columns and passes\nthe result to the `toMsg`.\n\n","type":"(AgGrid.StateChange (Dict.Dict String.String AgGrid.FilterState) -> msg) -> Html.Attribute msg"},{"name":"onSelectionChange","comment":" Detect selection change events.\n\nSends the current selection of [nodes](https://www.ag-grid.com/javascript-data-grid/row-object/) to the `toMsg`.\n\n","type":"Json.Decode.Decoder node -> (Result.Result Json.Decode.Error (List.List node) -> msg) -> Html.Attribute msg"}],"binops":[]}]