<commit_before>import { Component, Input, ContentChild, Output, EventEmitter } from '@angular/core';

import { SectionHeaderComponent } from './section-header.component';
import './section.scss';

@Component({
  selector: 'swui-section',
  template: `
    <section>
      <header
        [class.swui-section-collapsible]="sectionCollapsible"
        class="swui-section-header"
        *ngIf="headerComp || sectionTitle">
        <button
          *ngIf="sectionCollapsible"
          class="swui-section-toggle"
          (click)="onSectionClicked()"
          type="button"
          title="Toggle Content Visibility">
          <span
            [class.icon-arrow-down]="!sectionCollapsed"
            [class.icon-arrow-right]="sectionCollapsed">
          </span>
        </button>
        <ng-content select="swui-section-header"></ng-content>
        <h1 *ngIf="sectionTitle" [innerHTML]="sectionTitle"></h1>
      </header>
      <div class="swui-section-content" *ngIf="!sectionCollapsed">
        <ng-content></ng-content>
      </div>
    </section>
  `,
  host: {
    class: 'swui-section'
  }
})
export class SectionComponent {

  @Input() sectionCollapsed: boolean = false;
  @Input() sectionCollapsible: boolean = true;
  @Input() sectionTitle: string;

  @Output() onToggle = new EventEmitter();

  @ContentChild(SectionHeaderComponent) headerComp: SectionHeaderComponent;

  onSectionClicked() {
    this.sectionCollapsed = !this.sectionCollapsed;
    this.onToggle.emit(this.sectionCollapsed);
  }

}<commit_msg>(breaking): change `onToggle` to `toggle` in section<commit_after>import { Component, Input, ContentChild, Output, EventEmitter } from '@angular/core';

import { SectionHeaderComponent } from './section-header.component';
import './section.scss';

@Component({
  selector: 'swui-section',
  template: `
    <section>
      <header
        [class.swui-section-collapsible]="sectionCollapsible"
        class="swui-section-header"
        *ngIf="headerComp || sectionTitle">
        <button
          *ngIf="sectionCollapsible"
          class="swui-section-toggle"
          (click)="onSectionClicked()"
          type="button"
          title="Toggle Content Visibility">
          <span
            [class.icon-arrow-down]="!sectionCollapsed"
            [class.icon-arrow-right]="sectionCollapsed">
          </span>
        </button>
        <ng-content select="swui-section-header"></ng-content>
        <h1 *ngIf="sectionTitle" [innerHTML]="sectionTitle"></h1>
      </header>
      <div class="swui-section-content" *ngIf="!sectionCollapsed">
        <ng-content></ng-content>
      </div>
    </section>
  `,
  host: {
    class: 'swui-section'
  }
})
export class SectionComponent {

  @Input() sectionCollapsed: boolean = false;
  @Input() sectionCollapsible: boolean = true;
  @Input() sectionTitle: string;

  @Output() toggle = new EventEmitter();

  @ContentChild(SectionHeaderComponent) headerComp: SectionHeaderComponent;

  onSectionClicked() {
    this.sectionCollapsed = !this.sectionCollapsed;
    this.toggle.emit(this.sectionCollapsed);
  }

}
{'fraction_non_alphanumeric': 0.14581312641448432, 'fraction_numerical': 0.0012932428063368898, 'mean_word_length': 3.130841121495327, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3096242', 'n_tokens_mistral': 925, 'n_tokens_neox': 915, 'n_words': 160}