{"expireTime":9007200821600205000,"key":"gatsby-plugin-mdx-entire-payload-d0191cbd5eef1f58d1b7bc2698f91e40-","val":{"mdast":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The MapSchema is identical in function to ","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":43,"offset":43},"indent":[]}},{"type":"linkReference","identifier":"objectschema","label":"ObjectSchema","referenceType":"shortcut","children":[{"type":"text","value":"ObjectSchema","position":{"start":{"line":2,"column":44,"offset":44},"end":{"line":2,"column":56,"offset":56},"indent":[]}}],"position":{"start":{"line":2,"column":43,"offset":43},"end":{"line":2,"column":57,"offset":57},"indent":[]}},{"type":"text","value":" but its shape and merge functions\nwill cast your object to an immutable map. ","position":{"start":{"line":2,"column":57,"offset":57},"end":{"line":3,"column":44,"offset":135},"indent":[1]}},{"type":"emphasis","children":[{"type":"text","value":"This is especially useful when working with immutable \ndata structures as all data creation can be handled by your schema. Just describe the shapes that \nyour apis will return and Enty will automatically construct all of your maps and lists for you.","position":{"start":{"line":3,"column":45,"offset":136},"end":{"line":5,"column":96,"offset":385},"indent":[1,1]}}],"position":{"start":{"line":3,"column":44,"offset":135},"end":{"line":5,"column":97,"offset":386},"indent":[1,1]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":5,"column":97,"offset":386},"indent":[1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Params","position":{"start":{"line":7,"column":4,"offset":391},"end":{"line":7,"column":10,"offset":397},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":388},"end":{"line":7,"column":10,"offset":397},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"new MapSchema(shape: {[key: string]: Schema});\n","position":{"start":{"line":8,"column":1,"offset":398},"end":{"line":11,"column":4,"offset":455},"indent":[1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"shape","position":{"start":{"line":12,"column":5,"offset":460},"end":{"line":12,"column":10,"offset":465},"indent":[]}}],"position":{"start":{"line":12,"column":1,"offset":456},"end":{"line":12,"column":11,"offset":466},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":13,"column":3,"offset":469},"end":{"line":13,"column":8,"offset":474},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":467},"end":{"line":13,"column":10,"offset":476},"indent":[]}},{"type":"inlineCode","value":"{[key: string]: StructuralSchema}","position":{"start":{"line":13,"column":10,"offset":476},"end":{"line":13,"column":45,"offset":511},"indent":[]}},{"type":"break","position":{"start":{"line":13,"column":45,"offset":511},"end":{"line":14,"column":1,"offset":514},"indent":[1]}},{"type":"strong","children":[{"type":"text","value":"default:","position":{"start":{"line":14,"column":3,"offset":516},"end":{"line":14,"column":11,"offset":524},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":514},"end":{"line":14,"column":13,"offset":526},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":14,"column":13,"offset":526},"end":{"line":14,"column":14,"offset":527},"indent":[]}},{"type":"inlineCode","value":"{}","position":{"start":{"line":14,"column":14,"offset":527},"end":{"line":14,"column":18,"offset":531},"indent":[]}}],"position":{"start":{"line":13,"column":1,"offset":467},"end":{"line":14,"column":18,"offset":531},"indent":[1]}},{"type":"paragraph","children":[{"type":"text","value":"A javascript object that describes the relationships to other schemas. \n","position":{"start":{"line":16,"column":1,"offset":533},"end":{"line":17,"column":1,"offset":605},"indent":[1]}},{"type":"emphasis","children":[{"type":"text","value":"Note: you only have to define the keys that hold relationships.","position":{"start":{"line":17,"column":2,"offset":606},"end":{"line":17,"column":65,"offset":669},"indent":[]}}],"position":{"start":{"line":17,"column":1,"offset":605},"end":{"line":17,"column":66,"offset":670},"indent":[]}}],"position":{"start":{"line":16,"column":1,"offset":533},"end":{"line":17,"column":66,"offset":670},"indent":[1]}},{"type":"code","lang":"js","meta":null,"value":"const person = new EntitySchema('person')\nperson.shape = new MapSchema({\n    friend: person,\n    enemy: person\n});","position":{"start":{"line":19,"column":1,"offset":672},"end":{"line":25,"column":4,"offset":796},"indent":[1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Methods","position":{"start":{"line":27,"column":4,"offset":801},"end":{"line":27,"column":11,"offset":808},"indent":[]}}],"position":{"start":{"line":27,"column":1,"offset":798},"end":{"line":27,"column":11,"offset":808},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".normalize()","position":{"start":{"line":28,"column":5,"offset":813},"end":{"line":28,"column":17,"offset":825},"indent":[]}}],"position":{"start":{"line":28,"column":1,"offset":809},"end":{"line":28,"column":17,"offset":825},"indent":[]}},{"type":"jsx","value":"<Normalize />","position":{"start":{"line":29,"column":1,"offset":826},"end":{"line":29,"column":14,"offset":839},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".denormalize()","position":{"start":{"line":31,"column":5,"offset":845},"end":{"line":31,"column":19,"offset":859},"indent":[]}}],"position":{"start":{"line":31,"column":1,"offset":841},"end":{"line":31,"column":19,"offset":859},"indent":[]}},{"type":"jsx","value":"<Denormalize />","position":{"start":{"line":32,"column":1,"offset":860},"end":{"line":32,"column":16,"offset":875},"indent":[]}},{"type":"export","value":"export const _frontmatter = {\"id\":\"map-schema\",\"title\":\"Map Schema\",\"group\":\"Enty Immutable\"}","position":{"start":{"line":36,"column":1,"offset":879},"end":{"line":36,"column":94,"offset":972},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":36,"column":94,"offset":972}}},"scopeImports":["import React from 'react'"],"scopeIdentifiers":["React"],"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"id\": \"map-schema\",\n  \"title\": \"Map Schema\",\n  \"group\": \"Enty Immutable\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Normalize = makeShortcode(\"Normalize\");\nvar Denormalize = makeShortcode(\"Denormalize\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"The MapSchema is identical in function to \", \"[ObjectSchema]\", \" but its shape and merge functions\\nwill cast your object to an immutable map. \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"This is especially useful when working with immutable\\ndata structures as all data creation can be handled by your schema. Just describe the shapes that\\nyour apis will return and Enty will automatically construct all of your maps and lists for you.\")), mdx(\"h2\", null, \"Params\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"new MapSchema(shape: {[key: string]: Schema});\\n\\n\")), mdx(\"h3\", null, \"shape\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{[key: string]: StructuralSchema}\"), mdx(\"br\", {\n    parentName: \"p\"\n  }), \"\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"default:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{}\")), mdx(\"p\", null, \"A javascript object that describes the relationships to other schemas.\\n\", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Note: you only have to define the keys that hold relationships.\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"const person = new EntitySchema('person')\\nperson.shape = new MapSchema({\\n    friend: person,\\n    enemy: person\\n});\\n\")), mdx(\"h2\", null, \"Methods\"), mdx(\"h3\", null, \".normalize()\"), mdx(Normalize, {\n    mdxType: \"Normalize\"\n  }), mdx(\"h3\", null, \".denormalize()\"), mdx(Denormalize, {\n    mdxType: \"Denormalize\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {\n  \"id\": \"map-schema\",\n  \"title\": \"Map Schema\",\n  \"group\": \"Enty Immutable\"\n};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\nconst Normalize = makeShortcode(\"Normalize\");\nconst Denormalize = makeShortcode(\"Denormalize\");\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <p>{`The MapSchema is identical in function to `}{`[ObjectSchema]`}{` but its shape and merge functions\nwill cast your object to an immutable map. `}<em parentName=\"p\">{`This is especially useful when working with immutable\ndata structures as all data creation can be handled by your schema. Just describe the shapes that\nyour apis will return and Enty will automatically construct all of your maps and lists for you.`}</em></p>\n    <h2>{`Params`}</h2>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`new MapSchema(shape: {[key: string]: Schema});\n\n`}</code></pre>\n    <h3>{`shape`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong><inlineCode parentName=\"p\">{`{[key: string]: StructuralSchema}`}</inlineCode><br parentName=\"p\"></br>{`\n`}<strong parentName=\"p\">{`default:`}</strong>{` `}<inlineCode parentName=\"p\">{`{}`}</inlineCode></p>\n    <p>{`A javascript object that describes the relationships to other schemas.\n`}<em parentName=\"p\">{`Note: you only have to define the keys that hold relationships.`}</em></p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`const person = new EntitySchema('person')\nperson.shape = new MapSchema({\n    friend: person,\n    enemy: person\n});\n`}</code></pre>\n    <h2>{`Methods`}</h2>\n    <h3>{`.normalize()`}</h3>\n    <Normalize mdxType=\"Normalize\" />\n    <h3>{`.denormalize()`}</h3>\n    <Denormalize mdxType=\"Denormalize\" />\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}