1 import {Component, Host, Input, OnInit} from '@angular/core';
2 import {MarcSimplifiedEditorComponent} from './simplified-editor.component';
3 import {MarcSubfield} from '../marcrecord';
6 * A field that a user can edit, which will later be
11 selector: 'eg-marc-simplified-editor-field',
12 template: '<ng-template></ng-template>'
14 export class MarcSimplifiedEditorFieldComponent implements OnInit {
17 @Input() subfield: string;
18 @Input() defaultValue: string;
20 constructor(@Host() private editor: MarcSimplifiedEditorComponent) {}
23 this.editor.addField({
27 this.defaultValue ? this.defaultValue : '',
33 isControlfield: () => false,
34 indicator: (ind: number) => '0',
35 deleteExactSubfields: (...subfield: MarcSubfield[]) => 0,