<commit_before><template>
<td>
  <div class="flexrow">
    <span class="value flexrow-item">
      {{ value }}
    </span>
    <vue-slider
      class="flexrow-item slider"
      ref="slider"
      v-model="value"
      v-bind="options"
    />
    <button class="button flexrow-item" @click="setValue(1)">1</button>
    <button class="button flexrow-item" @click="setValue(4)">4</button>
    <button class="button flexrow-item" @click="setValue(8)">8</button>
  </div>
</td>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
import VueSlider from 'vue-slider-component'

export default {
  name: 'time-slider-cell',

  data () {
    return {
      value: this.duration,
      options: {
        show: true,
        width: 400,
        min: 0,
        max: 10,
        interval: 0.5,
        lazy: true,
        piecewise: true,
        tooltip: 'hover',
        tooltipDir: 'bottom',
        tooltipStyle: {
          'background-color': '#FFFFFF',
          color: '$grey-strong666',
          'z-index': 2000
        },
        processStyle: {
          'background-color': '#8F91EB'
        }
      }
    }
  },

  components: {
    VueSlider
  },

  props: {
    'task-id': {
      type: String,
      default: ''
    },
    duration: {
      type: Number,
      default: 0
    }
  },

  computed: {
    ...mapGetters([
    ])
  },

  methods: {
    ...mapActions([
    ]),

    setValue (value) {
      this.value = value
    }
  },

  watch: {
    value () {
      this.$emit('change', {taskId: this.taskId, duration: this.value})
    }
  }
}
</script>

<style lang="scss" scoped>
.value {
  font-size: 1.5em;
  font-weight: bold;
  width: 20px;
}

.slider {
  cursor: pointer;
}
</style><commit_msg>Fix time slider following lib upgrade<commit_after><template>
<td>
  <div class="flexrow">
    <span class="value flexrow-item">
      {{ value }}
    </span>
    <vue-slider
      class="flexrow-item slider"
      ref="slider"
      v-model="value"
      v-bind="options"
    />
    <button class="button flexrow-item" @click="setValue(1)">1</button>
    <button class="button flexrow-item" @click="setValue(4)">4</button>
    <button class="button flexrow-item" @click="setValue(8)">8</button>
  </div>
</td>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
import VueSlider from 'vue-slider-component'
import 'vue-slider-component/theme/antd.css'

export default {
  name: 'time-slider-cell',

  data () {
    return {
      value: this.duration,
      options: {
        show: true,
        width: 400,
        min: 0,
        max: 10,
        interval: 0.5,
        lazy: true,
        piecewise: true,
        tooltip: 'focus',
        tooltipPlacement: 'bottom',
        processStyle: {
          'background-color': '#8F91EB'
        },
        railStyle: {
          background: '#CCC'
        }
      }
    }
  },

  components: {
    VueSlider
  },

  props: {
    'task-id': {
      type: String,
      default: ''
    },
    duration: {
      type: Number,
      default: 0
    }
  },

  computed: {
    ...mapGetters([
    ])
  },

  methods: {
    ...mapActions([
    ]),

    setValue (value) {
      this.value = value
    }
  },

  watch: {
    value () {
      this.$emit('change', {
        taskId: this.taskId, duration: this.value
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.value {
  font-size: 1.5em;
  font-weight: bold;
  width: 30px;
}

.slider {
  cursor: pointer;
}
</style>
{'fraction_non_alphanumeric': 0.16493356441363374, 'fraction_numerical': 0.014731369150779897, 'mean_word_length': 2.0218150087260036, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '1872220', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1195, 'n_words': 240}