Skip to content

Commit

Permalink
feat(edit-content) fix lint file #28831
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra committed Jun 26, 2024
1 parent ff96063 commit b0dc7c0
Showing 1 changed file with 90 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,94 @@
{{ field.name }}
</label>

@switch (field.fieldType) { @case (fieldTypes.SELECT) {
<dot-edit-content-select-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.RADIO) {
<dot-edit-content-radio-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.TEXT) {
<dot-edit-content-text-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.TEXTAREA) {
<dot-edit-content-text-area [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.CHECKBOX) {
<dot-edit-content-checkbox-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.MULTI_SELECT) {
<dot-edit-content-multi-select-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
} @case (calendarTypes.includes(field.fieldType) ? field.fieldType : '') {
<dot-edit-content-calendar-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.TAG) {
<dot-edit-content-tag-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.JSON) {
<dot-edit-content-json-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.BINARY) {
<dot-edit-content-binary-field
[formControlName]="field.variable"
[contentlet]="contentlet"
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.CUSTOM_FIELD) {
<dot-edit-content-custom-field
[field]="field"
[contentType]="contentType"
[attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.BLOCK_EDITOR) {
<dot-block-editor
[formControlName]="field.variable"
[contentlet]="contentlet"
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.KEY_VALUE) {
<dot-edit-content-key-value
[formControlName]="field.variable"
[attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.WYSIWYG) {
<dot-edit-content-wysiwyg-field [field]="field" [attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.HOST_FOLDER) {
<dot-edit-content-host-folder-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
} @case (fieldTypes.CATEGORY) {
<dot-edit-content-category-field
[attr.data-testId]="'field-' + field.variable"
[contentlet]="contentlet"
[field]="field" />
} } @if (field.hint) {
<small [attr.data-testId]="'hint-' + field.variable">{{ field.hint }}</small>
@switch (field.fieldType) {
@case (fieldTypes.SELECT) {
<dot-edit-content-select-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.RADIO) {
<dot-edit-content-radio-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.TEXT) {
<dot-edit-content-text-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.TEXTAREA) {
<dot-edit-content-text-area
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.CHECKBOX) {
<dot-edit-content-checkbox-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.MULTI_SELECT) {
<dot-edit-content-multi-select-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (calendarTypes.includes(field.fieldType) ? field.fieldType : '') {
<dot-edit-content-calendar-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.TAG) {
<dot-edit-content-tag-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.JSON) {
<dot-edit-content-json-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.BINARY) {
<dot-edit-content-binary-field
[formControlName]="field.variable"
[contentlet]="contentlet"
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.CUSTOM_FIELD) {
<dot-edit-content-custom-field
[field]="field"
[contentType]="contentType"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.BLOCK_EDITOR) {
<dot-block-editor
[formControlName]="field.variable"
[contentlet]="contentlet"
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.KEY_VALUE) {
<dot-edit-content-key-value
[formControlName]="field.variable"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.WYSIWYG) {
<dot-edit-content-wysiwyg-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.HOST_FOLDER) {
<dot-edit-content-host-folder-field
[field]="field"
[attr.data-testId]="'field-' + field.variable" />
}
@case (fieldTypes.CATEGORY) {
<dot-edit-content-category-field
[attr.data-testId]="'field-' + field.variable"
[contentlet]="contentlet"
[field]="field" />
}
}
@if (field.hint) {
<small [attr.data-testId]="'hint-' + field.variable">{{ field.hint }}</small>
}

0 comments on commit b0dc7c0

Please sign in to comment.