<commit_before>import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
import { DatePipe } from '@angular/common';

import { ShoutService } from '../../common/shout.service';
import {
    AuthService,
    Person,
    PersonAddress
} from 'mh-core';

@Component({
    selector: 'mh-person-edit',
    templateUrl: 'person-edit.component.html',
    styleUrls: ['person-edit.component.scss']
})

export class PersonEditComponent {

    private _pwFormControl: FormControl;
    private _pwRandCheckbox: FormControl;

    @Input()
    set person(person: Person) {
        if (person) {
            // this.form.patchValue(person);
            this.initForm(person);
        }
    };

    @Output() savePerson: EventEmitter<Person> = new EventEmitter<Person>();

    form: FormGroup;
    submitted: boolean;
    options: any = {};
    randomPassword: boolean = true;
    persons: Array<Person>;

    constructor(private shout: ShoutService,
                private fb: FormBuilder,
                private auth: AuthService,
                private datePipe: DatePipe) {
        this.options = { // TODO: pull this from the settings table/store
            marital: [
                {value: 'single', viewValue: 'Single'},
                {value: 'married', viewValue: 'Married'},
                {value: 'widdow', viewValue: 'Widdow'},
                {value: 'divorce-living', viewValue: 'Living in Divorce'},
                {value: 'divorce-active', viewValue: 'Divorced'}
            ]
        };
    }<commit_msg>Typo: widdow -> widow<commit_after>import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
import { DatePipe } from '@angular/common';

import { ShoutService } from '../../common/shout.service';
import {
    AuthService,
    Person,
    PersonAddress
} from 'mh-core';

@Component({
    selector: 'mh-person-edit',
    templateUrl: 'person-edit.component.html',
    styleUrls: ['person-edit.component.scss']
})

export class PersonEditComponent {

    private _pwFormControl: FormControl;
    private _pwRandCheckbox: FormControl;

    @Input()
    set person(person: Person) {
        if (person) {
            // this.form.patchValue(person);
            this.initForm(person);
        }
    };

    @Output() savePerson: EventEmitter<Person> = new EventEmitter<Person>();

    form: FormGroup;
    submitted: boolean;
    options: any = {};
    randomPassword: boolean = true;
    persons: Array<Person>;

    constructor(private shout: ShoutService,
                private fb: FormBuilder,
                private auth: AuthService,
                private datePipe: DatePipe) {
        this.options = { // TODO: pull this from the settings table/store
            marital: [
                {value: 'single', viewValue: 'Single'},
                {value: 'married', viewValue: 'Married'},
                {value: 'widow', viewValue: 'Widow'},
                {value: 'divorce-living', viewValue: 'Living in Divorce'},
                {value: 'divorce-active', viewValue: 'Divorced'}
            ]
        };
    }
{'fraction_non_alphanumeric': 0.12977805178791615, 'fraction_numerical': 0.0, 'mean_word_length': 2.485499462943072, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '4932646', 'n_tokens_mistral': 946, 'n_tokens_neox': 909, 'n_words': 226}