<commit_before>import { SprkTableModule } from './sprk-table.module';

export default {
  title: 'Components|Table',
  component: SprkTableModule,
};

const modules = {
  imports: [
    SprkTableModule,
  ],
};

export const defaultStory = () => ({
  moduleMetadata: modules,
  template: `
  `,
});

defaultStory.story = {
  name: 'Default',
};<commit_msg>add sprk-table stories for angular<commit_after>import { SprkTableModule } from './sprk-table.module';

export default {
  title: 'Components|Table',
};

const modules = {
  imports: [
    SprkTableModule,
  ],
};

export const columnComparison = () => ({
  moduleMetadata: modules,
  template: `
    <sprk-table idString="table-1">
      <thead sprkTableHead>
        <tr>
          <th>Column Heading</th>
          <th>Column Heading</th>
          <th>Column Heading</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
      </tbody>
    </sprk-table>
  `,
});

export const secondary = () => ({
  moduleMetadata: modules,
  template: `
    <sprk-table
      idString="table-2"
      additionalTableClasses="sprk-b-Table--secondary"
    >
      <thead sprkTableHead>
        <tr>
          <th>Column Heading</th>
          <th>Column Heading</th>
          <th>Column Heading</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
      </tbody>
    </sprk-table>
  `,
});

export const groupedColumns = () => ({
  moduleMetadata: modules,
  template: `
    <sprk-table idString="table-3">
      <thead sprkTableHead>
        <tr>
          <th rowspan="2">Column Heading</th>
          <th colspan="3">Column Heading</th>
          <th rowspan="2">Column Heading</th>
        </tr>
        <tr>
          <th sprkTableGroupedColumn>SubHeading</th>
          <th sprkTableGroupedColumn>SubHeading</th>
          <th sprkTableGroupedColumn>SubHeading</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
          <td>Data 4</td>
          <td>Data 5</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
          <td>Data 4</td>
          <td>Data 5</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
          <td>Data 4</td>
          <td>Data 5</td>
        </tr>
        <tr>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
          <td>Data 4</td>
          <td>Data 5</td>
        </tr>
      </tbody>
    </sprk-table>
  `,
});

export const rowComparison = () => ({
  moduleMetadata: modules,
  template: `
    <sprk-table idString="table-4">
      <thead sprkTableHead>
        <tr>
          <th sprkTableEmptyHeading></th>
          <th>Column Heading</th>
          <th>Column Heading</th>
          <th>Column Heading</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data 1</td>
          <td>Data 2</td>
          <td>Data 3</td>
        </tr>
      </tbody>
    </sprk-table>
  `,
});

export const secondaryRowComparison = () => ({
  moduleMetadata: modules,
  template: `
    <sprk-table idString="table-5">
      <tbody>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data</td>
          <td>Data</td>
          <td class="sprk-o-Stack sprk-o-Stack--end-column">
            <div class="sprk-o-Stack__item">
              <button class="sprk-c-Button sprk-c-Button--secondary" type="button">Learn More</button>
            </div>
          </td>
        </tr>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data</td>
          <td>Data</td>
          <td class="sprk-o-Stack sprk-o-Stack--end-column">
            <div class="sprk-o-Stack__item">
              <button class="sprk-c-Button sprk-c-Button--secondary" type="button">Learn More</button>
            </div>
          </td>
        </tr>
        <tr>
          <th sprkTableRowHeading>Row Heading</th>
          <td>Data</td>
          <td>Data</td>
          <td class="sprk-o-Stack sprk-o-Stack--end-column">
            <div class="sprk-o-Stack__item">
              <button class="sprk-c-Button sprk-c-Button--secondary" type="button">Learn More</button>
            </div>
          </td>
        </tr>
      </tbody>
    </sprk-table>
  `,
});
{'fraction_non_alphanumeric': 0.16843407564510426, 'fraction_numerical': 0.011311417462000707, 'mean_word_length': 1.4852876592007027, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 273, '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': '1894382', 'n_tokens_mistral': 2052, 'n_tokens_neox': 1973, 'n_words': 365}