index.ts 642 B

123456789101112131415161718192021
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import createInput from '#shared/form/core/createInput.ts'
  3. import { filesSizeError } from './features/filesSizeError.ts'
  4. import { filesTypeError } from './features/filesTypeError.ts'
  5. import { multipleFilesError } from './features/multipleFilesError.ts'
  6. import FieldFileInput from './FieldFileInput.vue'
  7. const fieldDefinition = createInput(
  8. FieldFileInput,
  9. ['multiple', 'capture', 'accept', 'allowedFiles'],
  10. {
  11. features: [multipleFilesError, filesSizeError, filesTypeError],
  12. },
  13. )
  14. export default {
  15. fieldType: 'file',
  16. definition: fieldDefinition,
  17. }