index.ts 717 B

123456789101112131415161718192021
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import createInput from '#shared/form/core/createInput.ts'
  3. import addLink from '#shared/form/features/addLink.ts'
  4. import formUpdaterTrigger from '#shared/form/features/formUpdaterTrigger.ts'
  5. import { autoCompleteProps } from '../FieldAutoComplete/index.ts'
  6. import FieldExternalDataSourceWrapper from './FieldExternalDataSourceWrapper.vue'
  7. const fieldDefinition = createInput(
  8. FieldExternalDataSourceWrapper,
  9. [...autoCompleteProps, 'object', 'searchTemplateRenderContext'],
  10. { features: [addLink, formUpdaterTrigger()] },
  11. { addArrow: true },
  12. )
  13. export default {
  14. fieldType: 'externalDataSource',
  15. definition: fieldDefinition,
  16. }