= {
+ title: 'Library / Edit Content / File Field',
+ component: DotEditContentFileFieldComponent,
+ decorators: [
+ applicationConfig({
+ providers: [
+ provideHttpClient(),
+ {
+ provide: DotMessageService,
+ useValue : MessageServiceMock
+ }
+ ]
+ }),
+ moduleMetadata({
+ imports: [
+ BrowserAnimationsModule,
+ FormsModule,
+ ],
+ providers: [
+ FileFieldStore
+ ]
+ })
+ ],
+ render: (args) => ({
+ props: args,
+ template: `
+
+ Current value: {{ value }}
+ `
+ })
+};
+export default meta;
+
+type Story = StoryObj;
+
+export const FileField: Story = {
+ args: {
+ value: '',
+ field: {...FILE_FIELD_MOCK}
+ }
+};
+
+export const ImageField: Story = {
+ args: {
+ value: '',
+ field: {...IMAGE_FIELD_MOCK}
+ }
+};
+
+export const BinaryField: Story = {
+ args: {
+ value: '',
+ field: {...BINARY_FIELD_MOCK}
+ }
+};
diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/utils/mocks.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/utils/mocks.ts
new file mode 100644
index 000000000000..699f6714e56b
--- /dev/null
+++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/utils/mocks.ts
@@ -0,0 +1,42 @@
+import { MockDotMessageService } from "@dotcms/utils-testing";
+
+const MESSAGES_MOCK = {
+ 'dot.file.field.action.choose.file': 'Choose File',
+ 'dot.file.field.action.create.new.file': 'Create New File',
+ 'dot.file.field.action.create.new.file.label': 'File Name',
+ 'dot.file.field.action.import.from.url.error.message':
+ 'The URL you requested is not valid. Please try again.',
+ 'dot.file.field.action.import.from.url': 'Import from URL',
+ 'dot.file.field.action.remove': 'Remove',
+ 'dot.file.field.dialog.create.new.file.header': 'File Details',
+ 'dot.file.field.dialog.import.from.url.header': 'URL',
+ 'dot.file.field.drag.and.drop.error.could.not.load.message':
+ 'Couldn't load the file. Please try again or',
+ 'dot.file.field.drag.and.drop.error.file.maxsize.exceeded.message':
+ 'The file weight exceeds the limits of {0}, please reduce size before uploading.',
+ 'dot.file.field.drag.and.drop.error.file.not.supported.message':
+ 'This type of file is not supported, Please select a {0} file.',
+ 'dot.file.field.drag.and.drop.error.multiple.files.dropped.message':
+ 'You can only upload one file at a time.',
+ 'dot.file.field.drag.and.drop.error.server.error.message':
+ 'Something went wrong, please try again or contact our support team.',
+ 'dot.file.field.drag.and.drop.message': 'Drag and Drop or',
+ 'dot.file.field.error.type.file.not.extension': "Please add the file's extension",
+ 'dot.file.field.error.type.file.not.supported.message':
+ 'This type of file is not supported. Please use a {0} file.',
+ 'dot.file.field.file.bytes': 'Bytes',
+ 'dot.file.field.file.dimension': 'Dimension',
+ 'dot.file.field.file.size': 'File Size',
+ 'dot.file.field.import.from.url.error.file.not.supported.message':
+ 'This type of file is not supported, Please import a {0} file.',
+ 'dot.file.field.action.generate.with.dotai': 'Generate with dotAI',
+ 'dot.file.field.action.select.existing.file': 'Select Existing File',
+ 'dot.common.cancel': 'Cancel',
+ 'dot.common.edit': 'Edit',
+ 'dot.common.import': 'Import',
+ 'dot.common.remove': 'Remove',
+ 'dot.common.save': 'Save',
+ 'error.form.validator.required': 'This field is required',
+};
+
+export const MessageServiceMock = new MockDotMessageService(MESSAGES_MOCK);
\ No newline at end of file