All files / lib/dynamic-form-action dynamic-form-dialog.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 5/5
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                    13x 13x     48x     12x       12x       12x      
import { DynamicFormElement } from '../dynamic-form-element/dynamic-form-element';
import { DynamicForm } from '../dynamic-form/dynamic-form';
import { DynamicFormDefinition } from '../dynamic-form/dynamic-form-definition';
import { DynamicFormBuilder } from '../dynamic-form/dynamic-form.builder';
import { DynamicFormAction } from './dynamic-form-action';
 
export class DynamicFormDialog extends DynamicForm {
  protected _action: DynamicFormAction;
 
  constructor(builder: DynamicFormBuilder, action: DynamicFormAction, definition: DynamicFormDefinition, model: any) {
    super(builder, definition, model);
    this._action = action;
  }
 
  get action(): DynamicFormAction { return this._action; }
 
  protected override getChildren(): DynamicFormElement[] {
    return this._builder.createFormElements(this, this, this.definition.children);
  }
 
  protected override getHeaderActions(): DynamicFormAction[] {
    return this._builder.createFormActions(this.action.root, this.action, this.definition.headerActions);
  }
 
  protected override getFooterActions(): DynamicFormAction[] {
    return this._builder.createFormActions(this.action.root, this.action, this.definition.footerActions);
  }
}