### Full Example Definition File in JavaScript Source: https://docs.google.com/document/d/1dy2p-A3uR9BTs7rKlz3bPCe9i0qZJ5B-l569OklivtA/view/document/d/1dy2p-A3uR9BTs7rKlz3bPCe9i0qZJ5B-l569OklivtA/edit_tab=t.0_bookmark=id.gd9yye44lnyh Provides a comprehensive example of a `definitions.sourceflow.mjs` file, showcasing a variety of component properties including strings, formatted text, select options, repeaters, file uploads, modules, and nested templates/objects. ```javascript export default { component: 'ExampleComponent', label: 'Example Component', component_category: 'default', propSchema: [ { name: 'title', label: 'title', type: 'string', defaultValue: 'Hello world!' }, { name: 'description', label: 'description', type: 'formatted_text' }, { name: 'buttonText', bs_col_width: 4, type: 'string', defaultValue: 'Click me!', isRequired: true }, { name: 'buttonClass', bs_col_width: 4, type: 'string', defaultValue: '', options: [ { label: 'Primary', value: 'btn-primary' }, { label: 'Secondary', value: 'btn-secondary' }, { label: 'Danger', value: 'btn-danger' } ], allowMultipleOptions: false, isRequired: true }, { name: 'sponsors', type: 'repeater' }, { name: 'icon', label: 'icon', type: 'file' }, { name: 'myRandomNameForModuleID', type: 'modules' }, { name: 'template', type: 'template', template_item_label: 'Module Items', template_schema: [ { label: 'Field1', name: 'field1', category_id: 'cb62ab14-dfac-43f6-89ab-a283445584a4', allowMultipleOptions: true /** Allow multiple category values to be selected**/ }, { label: 'Field2Module', name: 'field2Module', type: 'modules' } ] }, { name: 'massive_object_one', label: 'massive_object_one', type: 'object', object_schema: [ { label: 'Field 1', name: 'image1', type: 'file', defaultValue: { id: '32248875-332a-4111-8a1c-f5e1a3752936' } } ] }, { name: 'massive_object_two', label: 'massive_object_two', type: 'object', object_schema: [ { label: 'Field 1', name: 'image1', type: 'file', defaultValue: { id: '32248875-332a-4111-8a1c-f5e1a3752936' } } ] }, { name: 'massive_object_three', label: 'massive_object_three', type: 'object', object_schema: [ { label: 'Field 1', name: 'image1', type: 'file', defaultValue: { url: 'https://placehold.co/300' } } ] }, { name: 'blogs', label: 'blogs', type: 'template', template_item_label: 'Blog', template_schema: [ { label: 'Field0 - Repeater', name: 'Field0-Repeater', type: 'repeater' }, { label: 'Field1', name: 'field1', category_id: 'cb62ab14-dfac-43f6-89ab-a283445584a4', allowMultipleOptions: true, type: 'string', defaultValue: 'Hello world!' }, { label: 'Field2', name: 'field2', type: 'number', defaultValue: 0 }, { label: 'Field3', name: 'field3', type: 'boolean', defaultValue: false }, { label: 'Field4', name: 'field4', type: 'array', options: [], defaultValue: [] }, { label: 'Field5', name: 'field5', type: 'file' }, { label: 'Field6', name: 'field6', type: 'formatted_text', defaultValue: '' }, { label: 'Field 7', name: 'field7', type: 'object', object_schema: [ { label: 'Field 7.1', name: 'field7.1', type: 'string', defaultValue: 'Hello world!' } ] }, { label: 'Field 8', name: 'field8', type: 'template', template_schema: [ { label: 'Field 8. name', name: 'name', type: 'string', defaultValue: 'Hello world!' } ] } ] } ] }; ``` -------------------------------- ### Example Definition File Structure in JavaScript Source: https://docs.google.com/document/d/1dy2p-A3uR9BTs7rKlz3bPCe9i0qZJ5B-l569OklivtA/view/document/d/1dy2p-A3uR9BTs7rKlz3bPCe9i0qZJ5B-l569OklivtA/edit_tab=t.0_bookmark=id.gd9yye44lnyh Demonstrates the structure of a JavaScript definition file for a component, including various prop types like object, template, and repeater. It shows how to define nested schemas and options for form fields. ```javascript export default { component: 'CTA', label: 'Call to Action', component_category: 'default', propSchema: [ { name: 'myobject', label: 'My Object', type: 'object', object_schema: [ { name: 'field1', label: 'Field 1', type: 'string' }, { name: 'field2', label: 'Field 2', type: 'template', /** We can even put templates inside objects **/ template_schema: [ { name: 'something', label: 'Something', type: 'string' }, { name: 'somethingElse', label: 'Something Else', type: 'number' }, ] }, ] }, { name: 'mytemplate', label: 'My Template', type: 'template', template_schema: [ /** other fields **/ { label: 'Field1 - String linked with Category Example', name: 'field1', category_id: 'cb62ab14-dfac-43f6-89ab-a283445584a4', allowMultipleOptions: true, type: 'string', defaultValue: 'Hello world!' }, { name: 'Field8 - Object Example', label: 'Field8', type: 'object', /** We can even put objects inside templates **/ object_schema: [ { name: 'Field8.1', label: 'Field8.1', type: 'string', defaultValue: 'Hello world!' }, /** more nested fields **/ ] }, ], isRequired: false } ] }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.