defaultFieldDefinition.ts 794 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { FormDefaultProps } from '#shared/types/form.ts'
  3. import addBlurEvent from '../features/addBlurEvent.ts'
  4. import formLocaleDir from '../features/formLocaleDir.ts'
  5. import hideField from '../features/hideField.ts'
  6. import translateWrapperProps from '../features/translateWrapperProps.ts'
  7. import type { FormKitTypeDefinition } from '@formkit/core'
  8. const defaultProps: (keyof FormDefaultProps)[] = [
  9. 'formId',
  10. 'labelSrOnly',
  11. 'labelPlaceholder',
  12. 'internal',
  13. ]
  14. const defaulfFieldDefinition: Required<
  15. Pick<FormKitTypeDefinition, 'props' | 'features'>
  16. > = {
  17. features: [translateWrapperProps, hideField, addBlurEvent, formLocaleDir],
  18. props: defaultProps,
  19. }
  20. export default defaulfFieldDefinition