Show:
  1. /**
  2. * A base class for `A.FormBuilderAvailableField`.
  3. *
  4. * @class A.FormBuilderAvailableField
  5. * @extends A.PropertyBuilderAvailableField
  6. * @param {Object} config Object literal specifying widget configuration
  7. * properties.
  8. * @constructor
  9. */
  10. var FormBuilderAvailableField = A.Component.create({
  11. /**
  12. * Static property provides a string to identify the class.
  13. *
  14. * @property NAME
  15. * @type String
  16. * @static
  17. */
  18. NAME: 'availableField',
  19. /**
  20. * Static property used to define the default attribute
  21. * configuration for the `A.FormBuilderAvailableField`.
  22. *
  23. * @property ATTRS
  24. * @type Object
  25. * @static
  26. */
  27. ATTRS: {
  28. /**
  29. * List of hidden attributes.
  30. *
  31. * @attribute hiddenAttributes
  32. * @type Array
  33. */
  34. hiddenAttributes: {
  35. validator: A.Lang.isArray
  36. },
  37. /**
  38. * Collection of options.
  39. *
  40. * @attribute options
  41. * @type Object
  42. */
  43. options: {
  44. validator: A.Lang.isObject
  45. },
  46. /**
  47. * Specifies a predefined value for the input field.
  48. *
  49. * @attribute predefinedValue
  50. */
  51. predefinedValue: {},
  52. /**
  53. * List of read-only input fields.
  54. *
  55. * @attribute readOnlyAttributes
  56. * @type Array
  57. */
  58. readOnlyAttributes: {
  59. validator: A.Lang.isArray
  60. },
  61. /**
  62. * Checks if an input field is required. In other words, it needs
  63. * content to be valid.
  64. *
  65. * @attribute required
  66. * @type Boolean
  67. */
  68. required: {
  69. validator: A.Lang.isBoolean
  70. },
  71. /**
  72. * If `true` the label is showed.
  73. *
  74. * @attribute showLabel
  75. * @default true
  76. * @type Boolean
  77. */
  78. showLabel: {
  79. validator: A.Lang.isBoolean,
  80. value: true
  81. },
  82. /**
  83. * Hint to help the user to fill the input field.
  84. *
  85. * @attribute tip
  86. * @type String
  87. */
  88. tip: {
  89. validator: A.Lang.isString
  90. },
  91. /**
  92. * Checks if the input field is unique or not.
  93. *
  94. * @attribute unique
  95. * @type Boolean
  96. */
  97. unique: {
  98. validator: A.Lang.isBoolean
  99. }
  100. },
  101. /**
  102. * Static property used to define which component it extends.
  103. *
  104. * @property EXTENDS
  105. * @type String
  106. * @static
  107. */
  108. EXTENDS: A.PropertyBuilderAvailableField
  109. });
  110. A.FormBuilderAvailableField = FormBuilderAvailableField;