<commit_before><template lang="pug">
  doc-view(:toc="toc")
    template(slot-scope="{ namespace }")
      section(v-if="usage")#usage
        section-head(value="Generic.Pages.usage")
        example(
          :new-in="usage.new"
          :file="`${folder}/${usage.file}`"
          :inverted="usage.inverted"
          :has-inverted="!usage.uninverted"
          :id="`usage-${-1}`"
          :key="usage.file"
          :desc="usage.desc"
        )

      section#api
        section-head(value="Generic.Pages.api")
        v-card
          v-tabs(
            v-model="tab"
            color="grey lighten-3"
            slider-color="primary"
          )
            v-tab(
              v-for="(tab, i) in tabs"
              :href="`#${tab}`"
              :key="i"
              v-show="hasTab(tab)"
            ) {{ tab.replace(/([A-Z])/g, ' $1') }}
          v-card-title
            v-select(
              label="Component"
              hide-details
              single-line
              v-bind:items="components"
              v-model="current"
              auto
              :disabled="components.length < 2"
            )
            v-spacer
            v-spacer.hidden-sm-and-down
            v-text-field(
              append-icon="search"
              label="Search..."
              single-line
              hide-details
              v-model="search"
            )
          v-tabs-items(touchless v-model="tab").white
            v-tab-item(
              v-for="(tabItem, i) in tabs"
              :id="tabItem"
              :key="i"
            )
              v-card(flat v-if="hasTab(tabItem)")
                parameters(
                  :headers="headers[tabItem]"
                  :items="currentApi[tabItem]"
                  :namespace="namespace"
                  :search="search"
                  :target="current"
                  :type="tabItem"
                  :key="`${tabItem}${namespace}${current}`"
                )

      section(v-if="supplemental.length > 0")#supplemental
        section-head(value="Generic.Pages.supplemental")
        component(
          v-for="sup in supplemental"
          :key="sup"
          :is="sup"
        )

      slot(name="top")
      section(v-if="examples.length > 1")#examples
        section-head(value="Generic.Pages.examples")
        example(
          :header="`${example.header}`"
          :new-in="example.new"
          :file="`${folder}/${example.file}`"
          :inverted="example.inverted"
          :has-inverted="!example.uninverted"
          :id="`example-${camelCaseToDash(example.file)}`"
          :key="example.file"
          :desc="example.desc"
          v-for="(example, i) in examples.slice(1)"
        )
      section-head {{ $t('Generic.Pages.examples') }}

      slot
</template>

<script>
  // Utilities
  import { mapState } from 'vuex'
  import { camel, capitalize, kebab } from '@/util/helpers'

  export default {
    inheritAttrs: false,

    data () {
      return {
        current: null,
        id: '',
        headers: {
          params: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.type'), value: 'type', align: 'left' },
            { text: this.$t('Generic.Pages.default'), value: 'default', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          props: [
            { text: this.$t('Generic.Pages.options'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.type'), value: 'type', align: 'left' },
            { text: this.$t('Generic.Pages.default'), value: 'default', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          slots: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          scopedSlots: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.props'), value: 'props', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          events: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          functional: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ]
        },
        search: null,
        tab: null,
        tabs: ['props', 'slots', 'scopedSlots', 'params', 'events', 'functional']
      }
    },

    props: {
      data: Object
    },

    computed: {
      ...mapState({
        api: state => state.api
      }),
      components () {
        let components = (this.data.components || []).slice()

        if (this.data.component) {
          components.unshift(this.data.component)
        }
<commit_msg>fix: tab bug in api section<commit_after><template lang="pug">
  doc-view(:toc="toc")
    template(slot-scope="{ namespace }")
      section(v-if="usage")#usage
        section-head(value="Generic.Pages.usage")
        example(
          :new-in="usage.new"
          :file="`${folder}/${usage.file}`"
          :inverted="usage.inverted"
          :has-inverted="!usage.uninverted"
          :id="`usage-${-1}`"
          :key="usage.file"
          :desc="usage.desc"
        )

      section#api
        section-head(value="Generic.Pages.api")
        v-card
          v-tabs(
            v-model="tab"
            color="grey lighten-3"
            slider-color="primary"
          )
            v-tab(
              v-for="(tab, i) in tabs"
              :href="`#${tab}`"
              :key="i"
              v-show="hasTab(tab)"
            ) {{ tab.replace(/([A-Z])/g, ' $1') }}
          v-card-title
            v-select(
              label="Component"
              hide-details
              single-line
              v-bind:items="components"
              v-model="current"
              auto
              :disabled="components.length < 2"
            )
            v-spacer
            v-spacer.hidden-sm-and-down
            v-text-field(
              append-icon="search"
              label="Search..."
              single-line
              hide-details
              v-model="search"
            )
          v-tabs-items(touchless v-model="tab").white
            v-tab-item(
              v-for="(tabItem, i) in tabs"
              :id="tabItem"
              :key="i"
            )
              v-card(flat v-if="hasTab(tabItem)")
                parameters(
                  :headers="headers[tabItem]"
                  :items="currentApi[tabItem]"
                  :namespace="namespace"
                  :search="search"
                  :target="current"
                  :type="tabItem"
                  :key="`${tabItem}${namespace}${current}`"
                )

      section(v-if="supplemental.length > 0")#supplemental
        section-head(value="Generic.Pages.supplemental")
        component(
          v-for="sup in supplemental"
          :key="sup"
          :is="sup"
        )

      slot(name="top")
      section(v-if="examples.length > 1")#examples
        section-head(value="Generic.Pages.examples")
        example(
          :header="`${example.header}`"
          :new-in="example.new"
          :file="`${folder}/${example.file}`"
          :inverted="example.inverted"
          :has-inverted="!example.uninverted"
          :id="`example-${camelCaseToDash(example.file)}`"
          :key="example.file"
          :desc="example.desc"
          v-for="(example, i) in examples.slice(1)"
        )
      section-head {{ $t('Generic.Pages.examples') }}

      slot
</template>

<script>
  // Utilities
  import { mapState } from 'vuex'
  import { camel, capitalize, kebab } from '@/util/helpers'

  export default {
    inheritAttrs: false,

    data () {
      return {
        current: null,
        id: '',
        headers: {
          params: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.type'), value: 'type', align: 'left' },
            { text: this.$t('Generic.Pages.default'), value: 'default', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          props: [
            { text: this.$t('Generic.Pages.options'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.type'), value: 'type', align: 'left' },
            { text: this.$t('Generic.Pages.default'), value: 'default', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          slots: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          scopedSlots: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.props'), value: 'props', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          events: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ],
          functional: [
            { text: this.$t('Generic.Pages.name'), value: 'name', align: 'left' },
            { text: this.$t('Generic.Pages.description'), value: 'description', align: 'left' }
          ]
        },
        search: null,
        tab: null,
        tabs: ['props', 'slots', 'scopedSlots', 'params', 'events', 'functional']
      }
    },

    props: {
      data: Object
    },

    watch: {
      currentApi () {
        if (!this.currentApi.hasOwnProperty(this.tab)) this.tab = 'props'
      }
    },

    computed: {
      ...mapState({
        api: state => state.api
      }),
      components () {
        let components = (this.data.components || []).slice()

        if (this.data.component) {
          components.unshift(this.data.component)
        }

{'fraction_non_alphanumeric': 0.17306422710553618, 'fraction_numerical': 0.0013203810242384231, 'mean_word_length': 1.6623148380617625, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5709339', 'n_tokens_mistral': 3162, 'n_tokens_neox': 3097, 'n_words': 525}