index.ts 930 B

123456789101112131415161718192021222324252627282930313233343536
  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. 'noInitialAutoPreselect',
  20. ],
  21. {
  22. features: [
  23. addLink,
  24. formUpdaterTrigger(),
  25. removeValuesForNonExistingOptions,
  26. ],
  27. },
  28. )
  29. export default {
  30. fieldType: 'select',
  31. definition: fieldDefinition,
  32. }