<commit_before>module Test.View exposing (..)

import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Events.Extra exposing (onClickStopPropagation)
import Toolkit.Helpers exposing (..)
import Toolkit.Operators exposing (..)
import Ext.Function exposing (..)
import Ext.Function.Infix exposing (..)
import List.Extra as List
import Maybe.Extra as Maybe
import String.Extra as String


createItems model =
    model.list .|> createItem model.selectedIdx


createItem selectedIdx idx =
    let
        tabIndexValue =
            if idx == selectedIdx then
                0
            else
                -1
    in
        li [ tabindex tabIndexValue ] [ idx |> toString >> String.append "item no: " >> text ]


init =
    ul [] (createItems createModel)


createModel =
    { list = List.range 0 10
    , selectedIdx = 0
    }


type alias Model =
    { list : List Int
    , selectedIdx : Int
    }<commit_msg>View changes<commit_after>module Test.View exposing (..)

import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Events.Extra exposing (onClickStopPropagation)
import Toolkit.Helpers exposing (..)
import Toolkit.Operators exposing (..)
import Ext.Function exposing (..)
import Ext.Function.Infix exposing (..)
import List.Extra as List
import Maybe.Extra as Maybe
import String.Extra as String


createItems model =
    model.list .|> createItem model.selectedIdx


createItem selectedIdx idx =
    let
        tabIndexValue =
            if idx == selectedIdx then
                0
            else
                -1
    in
        li [ tabindex tabIndexValue ] [ idx |> toString >> String.append "item no: " >> text ]


init selectedIndex =
    let
        viewModel =
            { list = List.range 0 10
            , selectedIdx = selectedIndex
            }
    in
        ul [] (createItems viewModel)


type alias ViewModel =
    { list : List Int
    , selectedIdx : Int
    }
{'fraction_non_alphanumeric': 0.09272183449651047, 'fraction_numerical': 0.005483549351944167, 'mean_word_length': 2.328358208955224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4972689', 'n_tokens_mistral': 590, 'n_tokens_neox': 556, 'n_words': 176}