<commit_before>// @flow
import React from 'react';
import ProjectLink from '@ncigdc/components/Links/ProjectLink';
import CaseLink from '@ncigdc/components/Links/CaseLink';
import AnnotationLink from '@ncigdc/components/Links/AnnotationLink';
import { ForTsvExport } from '@ncigdc/components/DownloadTableToTsvButton';
import { Th, Td } from '@ncigdc/uikit/Table';

/*
- UUID: default (shorten UUID on the UI)
- Case UUID: hidden
- Case Submitter ID: default
- Program: hidden
- Project: default
- Entity Type: default
- Entity UUID: hidden
- Entity Submitter ID: default
- Category: default
- Classification: default
- Created Date: default
- Status: hidden
- Notes: hidden
*/

const annotationsTableModel = [
  {
    name: 'UUID',
    id: 'annotation_id',
    downloadable: true,
    sortable: true,
    th: () => <Th key="annotation_id" rowSpan="2">UUID</Th>,
    td: ({ node, index }) =>
      <Td>
        <AnnotationLink
          uuid={node.annotation_id}
          id={`row-${index}-annotation-link`}
          merge
          whitelist={['filters']}
        >
          {node.annotation_id.substr(0, 8)}
        </AnnotationLink>
        <ForTsvExport>
          {node.annotation_id}
        </ForTsvExport>
      </Td>,
  },
  {
    name: 'Case UUID',
    id: 'case_id',
    downloadable: true,
    hidden: true,
    th: () => <Th key="case_id" rowSpan="2">Case UUID</Th>,
    td: ({ node, index }) =>
      <Td>
        {node.case_id}
      </Td>,
  },
  {
    name: 'Case ID',
    id: 'case_submitter_id',
    downloadable: true,
    sortable: true,
    th: () => <Th key="case_submitter_id" rowSpan="2">Case ID</Th>,
    td: ({ node, index }) =>
      <Td>
        <CaseLink
          uuid={node.case_id}
          id={`row-${index}-case_submitter_id-link`}
          merge
          whitelist={['filters']}
        >
          {node.case_submitter_id}
        </CaseLink>
        <ForTsvExport>
          {node.case_id}
        </ForTsvExport>
      </Td>,
  },
  {
    name: 'Program',<commit_msg>🐛 PRTL-1587 use case_submitter_id in ants tsv<commit_after>// @flow
import React from 'react';
import ProjectLink from '@ncigdc/components/Links/ProjectLink';
import CaseLink from '@ncigdc/components/Links/CaseLink';
import AnnotationLink from '@ncigdc/components/Links/AnnotationLink';
import { ForTsvExport } from '@ncigdc/components/DownloadTableToTsvButton';
import { Th, Td } from '@ncigdc/uikit/Table';

/*
- UUID: default (shorten UUID on the UI)
- Case UUID: hidden
- Case Submitter ID: default
- Program: hidden
- Project: default
- Entity Type: default
- Entity UUID: hidden
- Entity Submitter ID: default
- Category: default
- Classification: default
- Created Date: default
- Status: hidden
- Notes: hidden
*/

const annotationsTableModel = [
  {
    name: 'UUID',
    id: 'annotation_id',
    downloadable: true,
    sortable: true,
    th: () => <Th key="annotation_id" rowSpan="2">UUID</Th>,
    td: ({ node, index }) =>
      <Td>
        <AnnotationLink
          uuid={node.annotation_id}
          id={`row-${index}-annotation-link`}
          merge
          whitelist={['filters']}
        >
          {node.annotation_id.substr(0, 8)}
        </AnnotationLink>
        <ForTsvExport>
          {node.annotation_id}
        </ForTsvExport>
      </Td>,
  },
  {
    name: 'Case UUID',
    id: 'case_id',
    downloadable: true,
    hidden: true,
    th: () => <Th key="case_id" rowSpan="2">Case UUID</Th>,
    td: ({ node, index }) =>
      <Td>
        {node.case_id}
      </Td>,
  },
  {
    name: 'Case ID',
    id: 'case_submitter_id',
    downloadable: true,
    sortable: true,
    th: () => <Th key="case_submitter_id" rowSpan="2">Case ID</Th>,
    td: ({ node, index }) =>
      <Td>
        <CaseLink
          uuid={node.case_id}
          id={`row-${index}-case_submitter_id-link`}
          merge
          whitelist={['filters']}
        >
          {node.case_submitter_id}
        </CaseLink>
        <ForTsvExport>
          {node.case_submitter_id}
        </ForTsvExport>
      </Td>,
  },
  {
    name: 'Program',
{'fraction_non_alphanumeric': 0.15150024594195768, 'fraction_numerical': 0.003443187407771766, 'mean_word_length': 2.476068376068376, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6437188', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1369, 'n_words': 299}