<commit_before>import icon from 'react-icons/lib/go/puzzle'

export const myObject = {
  type: 'object',
  name: 'myObject',
  title: 'My object',
  icon,
  fields: [
    {
      name: 'first',
      type: 'string',
      title: 'First'
    },
    {
      name: 'second',
      type: 'string',
      title: 'Second'
    }
  ]
}

export default {
  name: 'objectsTest',
  type: 'document',
  title: 'Objects test',
  preview: {
    select: {
      title: 'myObject.first'
    }
  },
  fieldsets: [{name: 'recursive', title: 'Recursive', options: {collapsable: true}}],
  fields: [
    {
      name: 'myObject',
      type: 'myObject',
      title: 'MyObject',
      description: 'The first field here should be the title'
    },
    {
      name: 'fieldWithObjectType',
      title: 'Field of object type',
      type: 'object',
      description:
        'This is a field of (anonymous, inline) object type. Values here should never get a `_type` property',
      fields: [
        {name: 'field1', type: 'string', description: 'This is a string field'},
        {
          name: 'field2',
          type: 'myObject',
          title: 'A field of myObject',
          description: 'This is another field of "myObject"'
        }
      ]
    },
    {
      name: 'recursive',
      title: 'This field is of type objectsTest',
      type: 'objectsTest',
      fieldset: 'recursive'
    },
    {
      name: 'collapsibleObject',
      title: 'Collapsible object',
      type: 'object',
      options: {collapsible: true, collapsed: false},
      description:
        'This is a field of (anonymous, inline) object type. Values here should never get a `_type` property',
      fields: [
        {name: 'field1', type: 'string', description: 'This is a string field'},
        {name: 'field2', type: 'string', description: 'This is a collapsed field'}
      ]
    }
  ]
}<commit_msg>[test-studio] Add inline object without preview select to objects schema<commit_after>import icon from 'react-icons/lib/go/puzzle'

export const myObject = {
  type: 'object',
  name: 'myObject',
  title: 'My object',
  icon,
  fields: [
    {
      name: 'first',
      type: 'string',
      title: 'First'
    },
    {
      name: 'second',
      type: 'string',
      title: 'Second'
    }
  ]
}

export default {
  name: 'objectsTest',
  type: 'document',
  title: 'Objects test',
  preview: {
    select: {
      title: 'myObject.first'
    }
  },
  fieldsets: [{name: 'recursive', title: 'Recursive', options: {collapsable: true}}],
  fields: [
    {
      name: 'myObject',
      type: 'myObject',
      title: 'MyObject',
      description: 'The first field here should be the title'
    },
    {
      name: 'fieldWithObjectType',
      title: 'Field of object type',
      type: 'object',
      description:
        'This is a field of (anonymous, inline) object type. Values here should never get a `_type` property',
      fields: [
        {name: 'field1', type: 'string', description: 'This is a string field'},
        {
          name: 'field2',
          type: 'myObject',
          title: 'A field of myObject',
          description: 'This is another field of "myObject"'
        }
      ]
    },
    {
      name: 'recursive',
      title: 'This field is of type objectsTest',
      type: 'objectsTest',
      fieldset: 'recursive'
    },
    {
      name: 'collapsibleObject',
      title: 'Collapsible object',
      type: 'object',
      options: {collapsible: true, collapsed: false},
      description:
        'This is a field of (anonymous, inline) object type. Values here should never get a `_type` property',
      fields: [
        {name: 'field1', type: 'string', description: 'This is a string field'},
        {name: 'field2', type: 'string', description: 'This is a collapsed field'}
      ]
    },
    {
      name: 'events',
      title: 'Events',
      type: 'array',
      of: [
        {
          name: 'mbwEvent',
          type: 'object',
          preview: {
            prepare({where, what}) {
              return {
                title: where,
                subtitle: (what || []).join(', '),
                media: () => (where || '').slice(0, 1)
              }
            }
          },
          fields: [
            {
              name: 'where',
              title: 'Where',
              description: 'Victoriagade? Baghaven? Koelschip?',
              type: 'string',
              validation: Rule => Rule.required()
            },
            {
              name: 'what',
              title: 'What',
              description: 'Party? Bottle release? Tap takeover?',
              type: 'array',
              of: [{type: 'string'}],
              validation: Rule => Rule.min(1)
            }
          ]
        }
      ]
    }
  ]
}
{'fraction_non_alphanumeric': 0.13807531380753138, 'fraction_numerical': 0.002301255230125523, 'mean_word_length': 1.8940677966101696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6874182', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1426, 'n_words': 431}