index.ts 881 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. 'clearable',
  11. 'historicalOptions',
  12. 'multiple',
  13. 'noOptionsLabelTranslation',
  14. 'options',
  15. 'rejectNonExistentValues',
  16. 'sorting',
  17. ],
  18. {
  19. features: [
  20. addLink,
  21. formUpdaterTrigger(),
  22. removeValuesForNonExistingOptions,
  23. ],
  24. },
  25. {
  26. addArrow: true,
  27. },
  28. )
  29. export default {
  30. fieldType: 'select',
  31. definition: fieldDefinition,
  32. }