defaultFieldDefinition.ts 708 B

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