All files / app/form/plugin plugin.component.html

59.74% Statements 46/77
50% Branches 6/12
0% Functions 0/4
50% Lines 18/36

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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 682x 2x 2x   2x 2x     1x   2x 2x 1x 1x                               2x 2x 1x 1x                               2x 2x 1x 1x                                
<ng-container [formGroup]="group">
  <label [for]="id + '-tag'" i18n>Tag:</label>
  <input [id]="id + '-tag'" type="text" formControlName="tag" [attr.disabled]="true">
 
  <label [for]="id + '-title'" i18n>Name:</label>
  <input [id]="id + '-title'"
         type="text"
         [formControl]="name"
         (blur)="validate($any($event.target))">
 
  <label [for]="id + '-config'" i18n>Config:</label>
  @if (!editingConfig && !config) {
    <div>
      <button type="button" (click)="editingConfig = true" i18n>+ Add Config</button>
    </div>
  } @else {
    <app-json [id]="id + '-config'"
              fieldName="config"
              [group]="group"></app-json>
    @if (configErrors.length) {
      <span><!-- Errors --></span>
      @for (e of configErrors; track e) {
        <div>
          <span class="error">{{ e }}</span>
        </div>
      }
    }
  }
 
  <label [for]="id + '-defaults'" i18n>Defaults:</label>
  @if (!editingDefaults && !defaults) {
    <div>
      <button type="button" (click)="editingDefaults = true" i18n>+ Add Defaults</button>
    </div>
  } @else {
    <app-json [id]="id + '-defaults'"
              fieldName="defaults"
              [group]="group"></app-json>
    @if (defaultsErrors.length) {
      <span><!-- Errors --></span>
      @for (e of defaultsErrors; track e) {
        <div>
          <span class="error">{{ e }}</span>
        </div>
      }
    }
  }
 
  <label [for]="id + '-schema'" i18n>Schema:</label>
  @if (!editingSchema && !schema) {
    <div>
      <button type="button" (click)="editingSchema = true" i18n>+ Add Schema</button>
    </div>
  } @else {
    <app-json [id]="id + '-schema'"
              fieldName="schema"
              [group]="group"></app-json>
    @if (schemaErrors.length) {
      <span><!-- Errors --></span>
      @for (e of schemaErrors; track e) {
        <div>
          <span class="error">{{ e }}</span>
        </div>
      }
    }
  }
</ng-container>