enumNames: range()

in packages/ketcher-react/src/script/ui/data/schema/struct-schema.js [197:324]


        enumNames: range(1, 33).map((item) => 'R' + item),
      },
    },
  },
};

export const labelEdit = {
  title: 'Label Edit',
  type: 'object',
  required: ['label'],
  properties: {
    label: {
      title: 'Atom',
      default: '',
      invalidMessage: 'Wrong atom symbol',
      type: 'string',
    },
  },
};

export const attachmentPoints = {
  title: 'Attachment Points',
  type: 'object',
  properties: {
    primary: {
      title: 'Primary attachment point',
      type: 'boolean',
    },
    secondary: {
      title: 'Secondary attachment point',
      type: 'boolean',
    },
  },
};

export const bond = {
  title: 'Bond',
  type: 'object',
  required: ['type'],
  properties: {
    type: {
      title: 'Type',
      enum: [
        '',
        'single',
        'up',
        'down',
        'updown',
        'double',
        'crossed',
        'triple',
        'aromatic',
        'any',
        'hydrogen',
        'singledouble',
        'singlearomatic',
        'doublearomatic',
        'dative',
      ],
      enumNames: [
        '',
        'Single',
        'Single Up',
        'Single Down',
        'Single Up/Down',
        'Double',
        'Double Cis/Trans',
        'Triple',
        'Aromatic',
        'Any',
        'Hydrogen',
        'Single/Double',
        'Single/Aromatic',
        'Double/Aromatic',
        'Dative',
      ],
      default: 'single',
    },
    topology: {
      title: 'Topology',
      enum: [null, 0, 1, 2],
      enumNames: ['', 'Either', 'Ring', 'Chain'],
      default: 0,
    },
    customQuery: {
      title: 'Custom Query',
      pattern: '[^ ]',
      type: 'string',
      invalidMessage: 'Invalid custom query',
    },
    center: {
      title: 'Reacting Center',
      enum: [null, 0, -1, 1, 2, 4, 8, 12], // 5, 9, 13
      enumNames: [
        '',
        'Unmarked',
        'Not center',
        'Center',
        'No change',
        'Made/broken',
        'Order changes',
        'Made/broken and changes',
      ], // "Order changes" x 3
      default: 0,
    },
    cip: {
      title: 'CIP',
      type: 'string',
      enum: ['E', 'Z', 'M', 'P'],
    },
  },
};

const sgroup = {
  title: 'SGroup',
  type: 'object',
  required: ['type'],
  oneOf: [
    {
      ...sdataCustomSchema,
    },
    {
      key: 'MUL',
      title: 'Multiple group',
      type: 'object',
      properties: {
        type: { enum: ['MUL'] },
        mul: {