Skip to content

Commit

Permalink
feat(editor-content): implement the new file field #29871
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Sep 13, 2024
1 parent 8269ffc commit 796a528
Show file tree
Hide file tree
Showing 36 changed files with 21 additions and 4,952 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
[contentlet]="contentlet"
[field]="field" />
}
@case (fieldTypes.FILE) {
<dot-edit-content-file-field
[formControlName]="field.variable"
[attr.data-testId]="'field-' + field.variable" />
}
}
@if (field.hint) {
<small [attr.data-testId]="'hint-' + field.variable">{{ field.hint }}</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DotFieldRequiredDirective } from '@dotcms/ui';

import { DotEditContentBinaryFieldComponent } from '../../fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component';
import { DotEditContentFieldsModule } from '../../fields/dot-edit-content-fields.module';
import { DotEditContentFileFieldComponent } from '../../fields/dot-edit-content-file-field/dot-edit-content-file-field.component';
import { DotEditContentKeyValueComponent } from '../../fields/dot-edit-content-key-value/dot-edit-content-key-value.component';
import { DotEditContentWYSIWYGFieldComponent } from '../../fields/dot-edit-content-wysiwyg-field/dot-edit-content-wysiwyg-field.component';
import { CALENDAR_FIELD_TYPES } from '../../models/dot-edit-content-field.constant';
Expand All @@ -31,7 +32,8 @@ import { FIELD_TYPES } from '../../models/dot-edit-content-field.enum';
BlockEditorModule,
DotEditContentBinaryFieldComponent,
DotEditContentKeyValueComponent,
DotEditContentWYSIWYGFieldComponent
DotEditContentWYSIWYGFieldComponent,
DotEditContentFileFieldComponent
]
})
export class DotEditContentFieldComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const defaultResolutionFn: FnResolutionValue = (contentlet, field) =>
*/
export const resolutionValue: Record<FIELD_TYPES, FnResolutionValue> = {
[FIELD_TYPES.BINARY]: defaultResolutionFn,
[FIELD_TYPES.FILE]: defaultResolutionFn,
[FIELD_TYPES.BLOCK_EDITOR]: defaultResolutionFn,
[FIELD_TYPES.CHECKBOX]: defaultResolutionFn,
[FIELD_TYPES.CONSTANT]: defaultResolutionFn,
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 796a528

Please sign in to comment.