<commit_before>/*
 * @flow
 */

import type {ModuleID, ExtendedModule} from '../../types/Stats';

import BlacklistTableBody from './BlacklistTableBody';
import Button from '../Bootstrap/Button';
import OffsetPageAnchor from '../OffsetPageAnchor';
import React from 'react';
import Unit from '../Unit';
import {
  RequiredByPanel,
  RequirementsPanel,
} from './ModulePanels';

type Props = {
  blacklistedModulesIds: Array<ModuleID>,
  removedModules: Array<ExtendedModule>,
  onIncludeModule: (moduleID: ModuleID) => void,
};

export default function BlasklistTable(props: Props) {
  const blacklistedModulesList = props.blacklistedModulesIds.map(
    (id) => props.removedModules.filter((module) => module.id === id),
  );
  const removedModules = props.removedModules.filter(
    (module) => !props.blacklistedModulesIds.includes(module.id),
  );

  const sum = props.removedModules.reduce(
    (sum, module) => sum + module.size,
    0,
  );

  return (
    <table className="table table-hover" cellPadding="0" cellSpacing="0">
      <thead>
        <tr>
          <th>Name</th>
          <th>Size</th>
          <th>Dependants</th>
          <th>Imports</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        {blacklistedModulesList.map((modules, i) =>
          modules.map((eModule, ii) => (
            <tr key={eModule.id}>
              <td className="vert-align">
                <OffsetPageAnchor anchor={String(eModule.id)} />
                <span className="help-block">
                  {eModule.name}
                </span>
              </td>
              <td className="vert-align">
                <Unit bytes={eModule.size} />
              </td>
              <td className="vert-align">
                <RequiredByPanel eModule={eModule} />
              </td>
              <td className="vert-align">
                <RequirementsPanel eModule={eModule} />
              </td><commit_msg>Remove some bunus help-text markup<commit_after>/*
 * @flow
 */

import type {ModuleID, ExtendedModule} from '../../types/Stats';

import BlacklistTableBody from './BlacklistTableBody';
import Button from '../Bootstrap/Button';
import OffsetPageAnchor from '../OffsetPageAnchor';
import React from 'react';
import Unit from '../Unit';
import {
  RequiredByPanel,
  RequirementsPanel,
} from './ModulePanels';

type Props = {
  blacklistedModulesIds: Array<ModuleID>,
  removedModules: Array<ExtendedModule>,
  onIncludeModule: (moduleID: ModuleID) => void,
};

export default function BlasklistTable(props: Props) {
  const blacklistedModulesList = props.blacklistedModulesIds.map(
    (id) => props.removedModules.filter((module) => module.id === id),
  );
  const removedModules = props.removedModules.filter(
    (module) => !props.blacklistedModulesIds.includes(module.id),
  );

  const sum = props.removedModules.reduce(
    (sum, module) => sum + module.size,
    0,
  );

  return (
    <table className="table table-hover" cellPadding="0" cellSpacing="0">
      <thead>
        <tr>
          <th>Name</th>
          <th>Size</th>
          <th>Dependants</th>
          <th>Imports</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        {blacklistedModulesList.map((modules, i) =>
          modules.map((eModule, ii) => (
            <tr key={eModule.id}>
              <td className="vert-align">
                <OffsetPageAnchor anchor={String(eModule.id)} />
                {eModule.name}
              </td>
              <td className="vert-align">
                <Unit bytes={eModule.size} />
              </td>
              <td className="vert-align">
                <RequiredByPanel eModule={eModule} />
              </td>
              <td className="vert-align">
                <RequirementsPanel eModule={eModule} />
              </td>
{'fraction_non_alphanumeric': 0.14648182055976983, 'fraction_numerical': 0.0015694480774261052, 'mean_word_length': 2.28804815133276, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 81, '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': '1870867', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1121, 'n_words': 228}