<commit_before>// @flow

import React from 'react';

import DownloadButton from '@ncigdc/components/DownloadButton';

const MetadataDropdownButton = ({ files }) => (
  <DownloadButton
    url={`${GDC_AUTH}api/files`}
    size={files.files.length}
    filename='metadata.cart'
    activeText="Downloading"
    inactiveText="Metadata"
    fields={[
      'state',
      'access',
      'md5sum',
      'data_format',
      'data_type',
      'data_category',
      'file_name',
      'file_size',
      'file_id',
      'platform',
      'experimental_strategy',
      'center.short_name',
      'cases.case_id',
      'cases.project.project_id',
      'annotations.annotation_id',
      'annotations.entity_id',
      'tags',
      'submitter_id',
      'archive.archive_id',
      'archive.submitter_id',
      'archive.revision',
      'associated_entities.entity_id',
      'associated_entities.entity_type',
      'associated_entities.case_id',
      'analysis.analysis_id',
      'analysis.workflow_type',
      'analysis.updated_datetime',
      'analysis.input_files.file_id',
      'analysis.metadata.read_groups.read_group_id',
      'analysis.metadata.read_groups.is_paired_end',
      'analysis.metadata.read_groups.read_length',
      'analysis.metadata.read_groups.library_name',
      'analysis.metadata.read_groups.sequencing_center',
      'analysis.metadata.read_groups.sequencing_date',
      'downstream_analyses.output_files.access',
      'downstream_analyses.output_files.file_id',
      'downstream_analyses.output_files.file_name',
      'downstream_analyses.output_files.data_category',
      'downstream_analyses.output_files.data_type',
      'downstream_analyses.output_files.data_format',
      'downstream_analyses.workflow_type',
      'downstream_analyses.output_files.file_size',
      'index_files.file_i',
    ]}
    extraParams={{
      expand: [
        'metadata_files',
        'annotations',
        'archive',
        'associated_entities',
        'center',
        'analysis',
        'analysis.input_files',
        'analysis.metadata',
        'analysis.metadata_files',
        'analysis.downstream_analyses',
        'analysis.downstream_analyses.output_files',
        'reference_genome',
        'index_file',
        'cases',<commit_msg>🐛 [PRTL-826] download metadata fix (#1360)<commit_after>// @flow

import React from 'react';

import DownloadButton from '@ncigdc/components/DownloadButton';

const MetadataDropdownButton = ({ files }) => (
  <DownloadButton
    url={`${API}files`}
    size={files.files.length}
    filename='metadata.cart'
    activeText="Downloading"
    inactiveText="Metadata"
    fields={[
      'state',
      'access',
      'md5sum',
      'data_format',
      'data_type',
      'data_category',
      'file_name',
      'file_size',
      'file_id',
      'platform',
      'experimental_strategy',
      'center.short_name',
      'cases.case_id',
      'cases.project.project_id',
      'annotations.annotation_id',
      'annotations.entity_id',
      'tags',
      'submitter_id',
      'archive.archive_id',
      'archive.submitter_id',
      'archive.revision',
      'associated_entities.entity_id',
      'associated_entities.entity_type',
      'associated_entities.case_id',
      'analysis.analysis_id',
      'analysis.workflow_type',
      'analysis.updated_datetime',
      'analysis.input_files.file_id',
      'analysis.metadata.read_groups.read_group_id',
      'analysis.metadata.read_groups.is_paired_end',
      'analysis.metadata.read_groups.read_length',
      'analysis.metadata.read_groups.library_name',
      'analysis.metadata.read_groups.sequencing_center',
      'analysis.metadata.read_groups.sequencing_date',
      'downstream_analyses.output_files.access',
      'downstream_analyses.output_files.file_id',
      'downstream_analyses.output_files.file_name',
      'downstream_analyses.output_files.data_category',
      'downstream_analyses.output_files.data_type',
      'downstream_analyses.output_files.data_format',
      'downstream_analyses.workflow_type',
      'downstream_analyses.output_files.file_size',
      'index_files.file_id',
    ]}
    extraParams={{
      expand: [
        'metadata_files',
        'annotations',
        'archive',
        'associated_entities',
        'center',
        'analysis',
        'analysis.input_files',
        'analysis.metadata',
        'analysis.metadata_files',
        'analysis.downstream_analyses',
        'analysis.downstream_analyses.output_files',
        'reference_genome',
        'index_file',
        'cases',
{'fraction_non_alphanumeric': 0.1258436751578489, 'fraction_numerical': 0.001959503592423253, 'mean_word_length': 3.058303886925795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5107113', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1398, 'n_words': 162}