module ArrayBased.Model exposing (..) import Array import Dict import InputTable.Model type alias Model = { tableState : InputTable.Model.TableState RowData Person , postMessage : String , incompleteColumnAndText : Maybe ( Int, String ) , headerIdsToRemoteIds : Dict.Dict String String , isLoadingInitialRows : Bool } type alias RowData = Array.Array Cell type alias Cell = { value : String , link : Maybe String } type alias CellUpdate = { rowId : String , columnId : String , value : String , remoteId : String , isBoolUpdate : Bool , boolValue : Bool , isMultiUpdate : Bool } type alias DataFromServer = { headers : List HeaderData , accordionHeaders : Maybe (List HeaderData) , rows : List ApiRowData , incompleteColumn : Maybe Int , incompleteText : String , headerIdsToRemoteIds : Dict.Dict String String , sideBarHeaders : Maybe (List SideBarHeaderData) , tableAction : Maybe String , showVisibleColumnsUi : Bool , hasSideTable : Bool , sideRows : List (InputTable.Model.SideRow Person) , sideTableAction : String , sideTablePreposition : String , rowIdsToTitles : Dict.Dict String String } type alias HeaderData = { id : String , title : String , subType : String , visible : Bool , options : List String , displayedTextOptions : List String , hasNumericalValues : Bool , description : Maybe String } type alias SideBarHeaderData = { id : String , title : String , subType : String , options : List String , displayedTextOptions : List String , hasNumericalValues : Bool , description : Maybe String } type alias ApiRowData = { id : String , checkboxDisabledMsg : Maybe String , cells : Array.Array Cell , accordionRows : Maybe (List (InputTable.Model.AccordionRow RowData)) , rowFocusUrl : Maybe String } type alias PostReply = { updates : List PostReplyUpdate , status : String } type alias PostReplyUpdate = { rowId : String , columnId : Int , value : String } type alias ColumnsPostReply = { status : String } type alias Person = { name : String , email : String } type alias Question = { title : String , response : String }