index.ts 900 B

1234567891011121314151617181920212223242526272829303132333435
  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 removeValuesForNonExistingOptions from '#shared/form/features/removeValuesForNonExistingOrDisabledOptions.ts'
  6. import FieldSelectInput from './FieldSelectInput.vue'
  7. const fieldDefinition = createInput(
  8. FieldSelectInput,
  9. [
  10. 'alternativeBackground',
  11. 'clearable',
  12. 'historicalOptions',
  13. 'multiple',
  14. 'noFiltering',
  15. 'noOptionsLabelTranslation',
  16. 'options',
  17. 'rejectNonExistentValues',
  18. 'sorting',
  19. ],
  20. {
  21. features: [
  22. addLink,
  23. formUpdaterTrigger(),
  24. removeValuesForNonExistingOptions,
  25. ],
  26. },
  27. )
  28. export default {
  29. fieldType: 'select',
  30. definition: fieldDefinition,
  31. }