id
stringlengths
12
53
messages
listlengths
3
3
code_demostore-theme_876bde47
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.rich-text.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--xp {\n width: 80%;\n}\n\n.container--newsletter{\n max-height: 350px;\n}\n\n```" } ]
code_demostore-theme_3ec1d3fc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.store-header.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.headerRow--menu-link :global(.vtex-menu-2-x-styledLink) {\n color: #ffffff;\n font-size: 14px;\n}\n\n.headerRow--main-header .headerRowBackground {\n background-color: #212222;\n padding: 1.5em 0;\n}\n/*\n.headerRow--main-header :global(a) {\n margin: 0 auto;\n} */\n\n.headerRow--main-topbar :global(.vtex-menu-2-x-styledLink) {\n color: #727273;\n font-size: 14px;\n}\n\n.headerRow--main-header-mobile .headerRowBackground {\n background-color: #212222;\n padding: 1.5em 0;\n}\n\n```" } ]
code_demostore-theme_c11d8140
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.store-components.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n@import url('https://fonts.googleapis.com/css?family=Playfair+Display:700|Roboto&display=swap');\n\n.notificationBarContainer {\n background-color: #E6F1E6;\n color: #03034E;\n font-weight: 700;\n font-size: 12px;\n text-decoration: underline;\n}\n\n.searchBarContainer {\n max-width: 265px;\n}\n\n.infoCardContainer--info-card-home {\n max-width: 1520px;\n margin: 0 auto;\n background-color: #E6F1E6;\n padding: 0px;\n}\n\n.newsletter {\n color: #727273;\n max-width: 1528px;\n padding-top: 1rem;\n}\n\n/* #newsletter-input {\n background-color: #ffffff;\n} */\n\n.newsletter .container {\n padding: 0 0 20px 0;\n}\n\n.label {\n color: #727273;\n font-size: 18px;\n}\n\n.inputGroup {\n padding-bottom: 4px;\n display: flex;\n color: #fff;\n}\n\n/* .inputGroup input {\n background-color: #ffffff;\n color: #727273;\n border: 2px solid #E3E4E6;\n box-sizing: border-box;\n border-radius: 4px;\n} */\n\n/* .inputGroup input::placeholder {\n color: #fff;\n font-size: 16px;\n} */\n\n.imageElement--storePrint {\n max-height: 300px;\n margin-bottom: 20px;\n}\n\n.infoCardTextContainer--depbanner {\n min-height: 400px;\n}\n\n@media only screen and (min-width: 640px) {\n .label {\n font-size: 40px;\n }\n\n .infoCardContainer--info-card-home .infoCardTextContainer {\n width: 30%;\n }\n\n .infoCardContainer--info-card-home .infoCardImageContainer {\n width: 70%;\n }\n\n .imageElement--storePrint {\n margin-bottom: 0px;\n max-height: 600px;\n }\n}\n\n.imageElement {\n\n}\n/*\n.shippingContainer {\n background: red;\n}\n\n\n.shippingContainer .items-start {\n width: 50%;\n} */\n\n```" } ]
code_demostore-theme_82f5e69e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.flex-menu.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n display: block;\n}\n.menuItem {\n width: 100%;\n}\n```" } ]
code_demostore-theme_86c57e5f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.flex-layout.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRow--deals {\n background-color: #a7afbd;\n padding: 14px 0px;\n}\n\n.flexRow--newsletter {\n background-color: #e8ccc9;\n padding-bottom: 2rem;\n}\n\n.flexRow--pinkRow {\n background-color: #e8ccc9;\n padding-bottom: 3rem;\n margin-top: 15px;\n margin-bottom: 35px;\n}\n\n/* .flexColChild--newsletter :global(p) {\n margin-bottom: 0;\n} */\n\n/* .flexColChild--newsletter :global(.buttonContainer) {\n padding: 0;\n background: red;\n} */\n\n.flexRow--deals .stretchChildrenWidth {\n align-items: center;\n}\n\n.flexRow--deals .flexCol {\n align-items: center;\n}\n\n.flexCol--filterCol {\n max-width: 500px;\n min-width: 230px;\n}\n\n.flexCol--productCountCol {\n align-items: flex-start;\n}\n\n.flexCol--orderByCol {\n align-items: flex-end;\n}\n\n.flexCol--orderByMobileCol {\n width: 42%;\n}\n\n.flexCol--filterMobileCol {\n width: 38%;\n}\n\n.flexCol--switcherMobileCol {\n width: 20%;\n}\n\n@media only screen and (min-width: 640px) {\n .flexColChild--pinkCol {\n width: 50%;\n }\n}\n\n\n/* Footer */\n.flexRow--footer-row {\n padding-top: 10px;\n padding-bottom: 10px;\n background: lightgrey;\n}\n\n.flexRow--footer-row {\n text-align: right;\n}\n\n/* .flexRow--footer-row :global(a) {\n color: #E3E4E6;\n font-size: 14px;\n} */\n\n/* @media only screen and (max-width: 640px) {\n .flexRow--footer-row :global(li) {\n display: block;\n }\n} */\n\n/* .flexRow--footer-row :global(img) {\n filter: brightness(2);\n} */\n\n\n/* Product */\n.flexRow--product-main {\n color: #727273\n}\n\n```" } ]
code_demostore-theme_208574f0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.breadcrumb.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n /* background: red; */\n margin-top: 20px;\n}\n\n```" } ]
code_demostore-theme_2af5f45c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/css/vtex.slider-layout.css from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.slide--styles {\n width: 80% !important\n}\n\n.slideChildrenContainer {\n text-align: center;\n margin-top: 25px;\n}\n\n```" } ]
code_demostore-theme_7b7b731f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/styles/configs/style.json from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [\n 3, 2.25, 1.5, 1.25, 1, 0.875, 0.75\n ],\n \"spacing\": [0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 8, 16],\n \"customMedia\": [\n { \"s\": 20 },\n { \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n { \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n { \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n { \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#03044e\",\n \"action-primary\": \"#52BAB7\",\n \"action-secondary\": \"#E8CCC9\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#f2f4f5\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-background\": {\n \"action-primary\": \"#45A6A3\",\n \"action-secondary\": \"#DCC0BD\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#3D9391\",\n \"action-secondary\": \"#CAABA8\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"link\": \"#0F3E99\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#979899\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#52bab7\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"visited-text\": {\n \"link\": \"#0c389f\"\n },\n \"hover-text\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"active-text\": {\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"border\": {\n \"action-primary\": \"#52BAB7\",\n \"action-secondary\": \"#F7EEED\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#e3e4e6\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-border\": {\n \"action-primary\": \"#45A6A3\",\n \"action-secondary\": \"#DCC0BD\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-border\": {\n \"action-primary\": \"#3D9391\",\n \"action-secondary\": \"#CAABA8\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"disabled\": \"#979899\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\",\n \"muted-1\": \"#ffffff\",\n \"muted-2\": \"#ffffff\",\n \"muted-3\": \"#3f3f40\",\n \"muted-4\": \"#3f3f40\",\n \"muted-5\": \"#3f3f40\"\n },\n \"hover-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n },\n \"active-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n }\n },\n \"borderWidths\": [0, 0.125, 0.25, 0.5, 1, 2],\n \"borderRadius\": [0, 0.125, 0.25, 0.5, 1],\n \"widths\": [1, 2, 4, 8, 16],\n \"maxWidths\": [1, 2, 4, 8, 16, 32, 48, 64, 96],\n \"heights\": [1, 2, 4, 8, 16],\n \"sizes\": [\n {\"name\": \"small\", \"value\": 2},\n {\"name\": \"regular\", \"value\": 2.5},\n {\"name\": \"large\", \"value\": 3}\n ],\n \"typography\":{\n \"measure\": [30, 34, 20],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"3rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-2\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"2.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-3\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"1.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-4\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.5rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-5\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-6\": {\n \"fontFamily\": \"Playfair Display, serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"body\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"small\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"Roboto, San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"code\": {\n \"fontFamily\": \"Consolas, monaco, monospace\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n }\n }\n },\n \"opacity\": [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.025, 0]\n}\n\n```" } ]
code_demostore-theme_dbe1c847
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/product.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.product\": {\n \"children\": [\n \"flex-layout.row#product-breadcrumb\",\n \"flex-layout.row#product-main\",\n \"shelf#related\"\n ]\n },\n\n \"shelf#related\": {\n \"blocks\": [\"product-summary.shelf\"],\n \"props\": {\n \"recomendation\": \"editor.relatedProducts.similars\",\n \"orderBy\": \"OrderByTopSaleDESC\",\n \"productList\": {\n \"maxItems\": 10,\n \"itemsPerPage\": 5,\n \"minItemsPerPage\": 1.5,\n \"scroll\": \"BY_PAGE\",\n \"arrows\": true,\n \"titleText\": \"More options for this style\"\n }\n }\n },\n\n\n\n \"flex-layout.row#product-breadcrumb\": {\n \"props\": {\n \"marginTop\": 20\n },\n \"children\": [\"breadcrumb\"]\n },\n \"flex-layout.row#product-main\": {\n \"props\": {\n \"colGap\": 9,\n \"rowGap\": 7,\n \"marginTop\": 4,\n \"marginBottom\": 7,\n \"paddingTop\": 7,\n \"paddingBottom\": 7,\n \"blockClass\": \"product-main\"\n },\n \"children\": [\n \"flex-layout.col#stack\",\n \"flex-layout.col#right-col\"\n ]\n },\n\n \"stack-layout\": {\n \"children\": [\n \"flex-layout.row#product-image\",\n \"product-specification-badges\"\n ]\n },\n\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"Group\",\n \"specificationName\": \"On Sale\",\n \"visibleWhen\": \"True\",\n \"displayValue\": \"SPECIFICATION_NAME\"\n }\n },\n\n \"flex-layout.col#stack\": {\n \"children\": [\"stack-layout\"],\n \"props\": {\n \"width\": \"70%\",\n \"rowGap\": 0\n }\n },\n\n \"flex-layout.row#product-image\": {\n \"children\": [\"product-images\"]\n },\n\n \"product-images\": {\n \"props\": {\n \"displayThumbnailsArrows\": true,\n \"thumbnailsOrientation\": \"vertical\"\n }\n },\n\n \"flex-layout.col#right-col\": {\n \"props\": {\n \"preventVerticalStretch\": true,\n \"rowGap\": 0\n },\n \"children\": [\n \"product-name\",\n \"product-price#product-details\",\n \"sku-selector\",\n \"flex-layout.row#buy-button\",\n \"shipping-simulator\",\n \"share#default\"\n ]\n },\n\n \"product-price#product-details\": {\n \"props\": {\n \"showInstallments\": true,\n \"showSavings\": true\n }\n },\n\n \"flex-layout.row#buy-button\": {\n \"props\": {\n \"marginTop\": 4,\n \"marginBottom\": 7\n },\n \"children\": [\"buy-button\"]\n },\n\n \"share#default\": {\n \"props\": {\n \"social\": {\n \"Facebook\": true,\n \"WhatsApp\": true,\n \"Twitter\": false,\n \"Pinterest\": true\n }\n }\n }\n}\n\n```" } ]
code_demostore-theme_93bfe7dc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/search.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.search\": {\n \"blocks\": [\"search-result-layout#search\"]\n },\n\n \"search-result-layout#search\": {\n \"blocks\": [\n \"search-result-layout.desktop\",\n \"search-not-found-layout\"\n ]\n },\n \"search-result-layout.desktop\": {\n \"children\": [\n \"flex-layout.row#did-you-mean\",\n \"flex-layout.row#suggestion\",\n \"flex-layout.row#banner-one\",\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#searchtitle\",\n \"flex-layout.row#result\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"preventRouteChange\": false,\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n }\n }\n },\n \"flex-layout.row#result\": {\n \"children\": [\"flex-layout.col#filter\", \"flex-layout.col#content\"],\n \"props\": {\n \"preventHorizontalStretch\": true,\n \"fullWidth\": true\n }\n },\n\n \"flex-layout.row#searchtitle\": {\n \"children\": [\"search-title.v2\"]\n },\n\n \"flex-layout.row#did-you-mean\": {\n \"children\": [\"did-you-mean\"]\n },\n \"flex-layout.row#suggestion\": {\n \"children\": [\"search-suggestions\"]\n },\n \"flex-layout.row#banner-one\": {\n \"children\": [\"search-banner#one\"]\n },\n \"search-banner#one\": {\n \"props\": {\n \"area\": \"one\",\n \"blockClass\": \"myBanner\",\n \"horizontalAlignment\": \"center\"\n }\n },\n \"flex-layout.row#searchbread\": {\n \"children\": [\"breadcrumb.search\"],\n \"props\": {\n \"preserveLayoutOnMobile\": true,\n \"fullWidth\": true\n }\n },\n\n \"store.search#brand\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"orderByField\": \"OrderByReleaseDateDESC\",\n \"hideUnavailableItems\": true,\n \"maxItemsPerPage\": 10\n }\n }\n },\n \"store.search#department\": {\n \"blocks\": [\"search-result-layout#department\"]\n },\n\n \"store.search#category\": {\n \"blocks\": [\"search-result-layout#cat\"]\n },\n\n \"store.search#subcategory\": {\n \"blocks\": [\"search-result-layout#cat\"]\n },\n\n \"search-result-layout#department\": {\n \"blocks\": [\n \"search-result-layout.desktop#dep\",\n \"search-result-layout.mobile#dep\",\n \"search-not-found-layout\"\n ]\n },\n \"search-result-layout#cat\": {\n \"blocks\": [\n \"search-result-layout.desktop#cat\",\n \"search-result-layout.mobile#cat\",\n \"search-not-found-layout\"\n ]\n },\n\n \"info-card#depbanner\": {\n \"props\": {\n \"imageUrl\": \"https://image.shutterstock.com/z/stock-photo-party-with-best-friends-group-of-cheerful-young-people-enjoying-home-party-with-snacks-and-drinks-492006757.jpg\",\n \"callToActionMode\": \"none\",\n \"isFullModeStyle\": true,\n \"headline\": \" \",\n \"blockClass\": \"depbanner\"\n }\n },\n\n \"search-result-layout.desktop#dep\": {\n \"children\": [\n \"flex-layout.row#depBanner\",\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#searchtitle\",\n \"flex-layout.row#result\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n }\n }\n },\n \"search-result-layout.desktop#cat\": {\n \"children\": [\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#searchtitle\",\n \"flex-layout.row#result\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n }\n }\n },\n \"flex-layout.col#filter\": {\n \"children\": [\"filter-navigator.v3\"],\n \"props\": {\n \"blockClass\": \"filterCol\"\n }\n },\n \"order-by\": {\n \"props\": {\n \"hiddenOptions\": [\n \"OrderByReleaseDateDESC\",\n \"OrderByNameASC\",\n \"OrderByNameDESC\"\n ]\n }\n },\n \"flex-layout.col#content\": {\n \"children\": [\n \"flex-layout.row#searchinfo\",\n \"flex-layout.row#fetchprevious\",\n \"flex-layout.row#products\",\n \"flex-layout.row#fetchmore\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"flex-layout.row#searchinfo\": {\n \"children\": [\"flex-layout.col#productCount\", \"flex-layout.col#orderby\"]\n },\n \"flex-layout.col#productCount\": {\n \"children\": [\"total-products.v2\"],\n \"props\": {\n \"blockClass\": \"productCountCol\"\n }\n },\n \"flex-layout.col#orderby\": {\n \"children\": [\"order-by.v2\"],\n \"props\": {\n \"blockClass\": \"orderByCol\"\n }\n },\n \"flex-layout.row#fetchprevious\": {\n \"props\": {\n \"marginBottom\": 3\n },\n \"children\": [\"search-fetch-previous\"]\n },\n \"flex-layout.row#fetchmore\": {\n \"props\": {\n \"marginTop\": 3\n },\n \"children\": [\"search-fetch-more\"]\n },\n \"flex-layout.row#products\": {\n \"children\": [\"search-content\"]\n },\n \"search-content\": {\n \"blocks\": [\"gallery\", \"not-found\"]\n },\n\n \"flex-layout.row#depBanner\": {\n \"children\": [\n \"info-card#depbanner\"\n ]\n },\n\n \"search-result-layout.mobile#dep\": {\n \"children\": [\n \"flex-layout.row#depBanner\",\n \"flex-layout.row#searchinfomobile\",\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#productCountMobile\",\n \"flex-layout.row#contentmobile\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n }\n }\n },\n \"search-result-layout.mobile#cat\": {\n \"children\": [\n \"flex-layout.row#searchinfomobile\",\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#productCountMobile\",\n \"flex-layout.row#contentmobile\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n }\n }\n },\n \"flex-layout.row#contentmobile\": {\n \"children\": [\"search-content\"],\n \"props\": {\n \"preserveLayoutOnMobile\": true\n }\n },\n\n \"flex-layout.row#searchinfomobile\": {\n \"children\": [\n \"flex-layout.col#orderByMobile\",\n \"flex-layout.col#filterMobile\",\n \"flex-layout.col#switcherMobile\"\n ],\n \"props\": {\n \"preserveLayoutOnMobile\": true,\n \"colSizing\": \"auto\",\n \"colJustify\": \"around\"\n }\n },\n\n \"flex-layout.col#orderByMobile\": {\n \"children\": [\"order-by.v2\"],\n \"props\": {\n \"blockClass\": \"orderByMobileCol\"\n }\n },\n\n \"flex-layout.row#productCountMobile\": {\n \"children\": [\"total-products.v2\"],\n \"props\": {\n \"blockClass\": \"productCountMobileRow\"\n }\n },\n\n \"flex-layout.col#filterMobile\": {\n \"children\": [\"filter-navigator.v3\"],\n \"props\": {\n \"blockClass\": \"filterMobileCol\"\n }\n },\n \"flex-layout.col#switcherMobile\": {\n \"children\": [\"search-layout-switcher\"],\n \"props\": {\n \"blockClass\": \"switcherMobileCol\"\n }\n },\n \"search-not-found-layout\": {\n \"children\": [\"flex-layout.row#searchbread\", \"flex-layout.row#notfound\"]\n },\n\n \"flex-layout.row#notfound\": {\n \"children\": [\"not-found\"],\n \"props\": {\n \"fullWidth\": true\n }\n },\n\n \"breadcrumb\": {\n \"props\": {\n \"showOnMobile\": true\n }\n },\n\n \"gallery\": {\n \"blocks\": [\"product-summary.shelf\"]\n }\n}\n\n```" } ]
code_demostore-theme_06b66e52
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/home/newsletter.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"flex-layout.row#newsletter\": {\n \"children\": [\n \"flex-layout.col#newsletter\"\n ],\n \"props\": {\n \"blockClass\": \"newsletter\",\n \"marginTop\": 5\n }\n },\n \"flex-layout.col#newsletter\": {\n \"children\": [\n \"rich-text#newsletter\",\n \"rich-text#style-text\",\n \"flex-layout.row#newsletter-container\"\n ],\n \"props\": {\n \"blockClass\": \"newsletter\"\n }\n },\n \"rich-text#style-text\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"Be first to receive exclusive offers and updates\",\n \"blockClass\": \"newsletter\",\n \"textColor\": \"c-muted-1\"\n }\n },\n\n \"rich-text#newsletter\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"Join our mailing list\",\n \"textColor\": \"c-muted-1\",\n \"font\": \"t-heading-2\"\n }\n },\n\n \"flex-layout.row#newsletter-container\": {\n \"children\": [\n \"newsletter#home\"\n ],\n \"props\": {\n \"blockClass\": \"newsletterContainer\"\n }\n },\n\n \"newsletter#home\": {\n \"props\": {\n \"hideLabel\": true,\n \"placeholder\": \"\"\n }\n }\n}\n\n```" } ]
code_demostore-theme_57b95859
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/home/styles-section.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n\n{\n \"slider-layout#styles\": {\n \"props\": {\n \"itemsPerPage\": {\n \"desktop\": 1,\n \"tablet\": 1,\n \"mobile\": 1\n },\n \"blockClass\": \"styles\",\n \"showPaginationDots\": \"never\"\n },\n \"children\": [\n \"image#style1\",\n \"image#style2\"\n ]\n },\n \"image#style1\": {\n \"props\": {\n \"src\":\"https://user-images.githubusercontent.com/194400/49531010-48dad180-f8b1-11e8-8d89-1e61320e1d82.png\"\n }\n },\n \"image#style2\": {\n \"props\": {\n \"src\": \"https://user-images.githubusercontent.com/194400/49531010-48dad180-f8b1-11e8-8d89-1e61320e1d82.png\"\n }\n }\n}\n\n```" } ]
code_demostore-theme_92c6e532
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/home/home.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.home\": {\n \"blocks\": [\n \"flex-layout.row#slider\",\n \"shelf#new-arrivals\",\n \"shelf#clearance\",\n \"flex-layout.row#newsletter\",\n \"rich-text#brands\",\n \"flex-layout.row#brands\",\n \"rich-text#instagram\",\n \"flex-layout.row#instagram\"\n ]\n },\n\n \"carousel#home\": {\n \"props\": {\n \"autoplay\": true,\n \"autoplaySpeed\": 4,\n \"banners\": [\n {\n \"image\": \"assets/chrome1.png\"\n }\n ],\n \"height\": 440,\n \"showArrows\": true,\n \"showDots\": true\n }\n },\n\n \"flex-layout.row#slider\": {\n \"children\": [\n // \"slider-layout#styles\",\n \"carousel#home\"\n ]\n },\n\n \"flex-layout.row#brands\": {\n \"children\": [\n \"slider-layout#brands\"\n ],\n \"props\": {\n \"marginTop\": 4,\n \"marginBottom\": 8\n }\n },\n\n \"shelf#new-arrivals\": {\n \"blocks\": [\"product-summary.shelf\"],\n \"props\": {\n \"orderBy\": \"OrderByTopSaleDESC\",\n \"paginationDotsVisibility\": \"never\",\n \"collection\": \"139\",\n \"productList\": {\n \"maxItems\": 9,\n \"itemsPerPage\": 3,\n \"minItemsPerPage\": 1.5,\n \"scroll\": \"BY_PAGE\",\n \"arrows\": true,\n \"titleText\": \"New arrivals\"\n }\n }\n },\n\n \"shelf#clearance\": {\n \"blocks\": [\"product-summary.shelf\"],\n \"props\": {\n \"orderBy\": \"OrderByTopSaleDESC\",\n \"collection\": \"140\",\n \"paginationDotsVisibility\": \"desktopOnly\",\n \"productList\": {\n \"maxItems\": 9,\n \"itemsPerPage\": 3,\n \"minItemsPerPage\": 1.5,\n \"scroll\": \"BY_PAGE\",\n \"arrows\": true,\n \"titleText\": \"Clearance\"\n }\n }\n }\n}\n\n```" } ]
code_demostore-theme_ba6ce8d9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/home/instagram.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"rich-text#instagram\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"Visit us on Instagram\",\n \"blockClass\": \"ocasiao\",\n \"textColor\": \"c-muted-1\",\n \"font\": \"t-heading-2\"\n }\n },\n\n \"flex-layout.row#instagram\": {\n \"children\": [\n \"flex-layout.col#instagram-post1\",\n \"flex-layout.col#instagram-post2\",\n \"flex-layout.col#instagram-post3\",\n \"flex-layout.col#instagram-post4\"\n ]\n },\n \"flex-layout.col#instagram-post1\": {\n \"children\": [\n \"sandbox#instagram-post1\"\n ]\n },\n \"flex-layout.col#instagram-post2\": {\n \"children\": [\n \"sandbox#instagram-post2\"\n ]\n },\n \"flex-layout.col#instagram-post3\": {\n \"children\": [\n \"sandbox#instagram-post3\"\n ]\n },\n \"flex-layout.col#instagram-post4\": {\n \"children\": [\n \"sandbox#instagram-post4\"\n ]\n },\n \"sandbox#instagram-post1\": {\n \"props\": {\n \"initialContent\": \"<iframe src=\\\"https://www.instagram.com/p/B973Qp8BacC/embed\\\" height=460 frameBorder=\\\"0\\\"/>\"\n }\n },\n \"sandbox#instagram-post2\": {\n \"props\": {\n \"initialContent\": \"<iframe src=\\\"https://www.instagram.com/p/BpVBfuOF-CZ/embed\\\" height=460 frameBorder=\\\"0\\\"/>\"\n }\n },\n \"sandbox#instagram-post3\": {\n \"props\": {\n \"initialContent\": \"<iframe src=\\\"https://www.instagram.com/p/ByG0svWlxlQ/embed\\\" height=460 frameBorder=\\\"0\\\"/>\"\n }\n },\n \"sandbox#instagram-post4\": {\n \"props\": {\n \"initialContent\": \"<iframe src=\\\"https://www.instagram.com/p/ByGlA3gl6wS/embed\\\" height=460 frameBorder=\\\"0\\\"/>\"\n }\n }\n}\n\n```" } ]
code_demostore-theme_26e89bec
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/home/brands.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"rich-text#brands\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"Our brands\",\n \"blockClass\": \"ocasiao\",\n \"textColor\": \"c-muted-1\",\n \"font\": \"t-heading-2\"\n }\n },\n\n \"slider-layout#brands\": {\n \"children\": [\n \"image#brand-1\",\n \"image#brand-2\",\n \"image#brand-3\",\n \"image#brand-4\",\n \"image#brand-5\",\n \"image#brand-6\",\n \"image#brand-7\",\n \"image#brand-8\"\n ],\n \"props\": {\n \"itemsPerPage\": {\n \"desktop\": 4,\n \"tablet\": 4,\n \"phone\": 2\n },\n \"navigationStep\": 2,\n \"showPaginationDots\": \"never\"\n }\n },\n\n \"image#brand-1\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square1.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-2\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square2.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-3\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square3.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-4\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square4.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-5\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square5.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-6\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square6.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-7\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square7.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n },\n\n \"image#brand-8\": {\n \"props\": {\n \"src\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square8.png\",\n \"maxWidth\": \"140px\",\n \"maxHeight\": \"100px\",\n \"link\": \"https://alfredo--appliancetheme.myvtex.com/major-appliances\"\n }\n }\n}\n\n```" } ]
code_demostore-theme_5271c7eb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/footer/footer.json from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"footer\": {\n \"blocks\": [\"footer-layout.desktop\", \"footer-layout.mobile\"]\n },\n \"footer-layout.desktop\": {\n \"children\": [\n \"flex-layout.row#footer-1-desktop\"\n ]\n },\n \"flex-layout.row#footer-1-desktop\": {\n \"children\": [\n \"flex-layout.col#footer-left-desktop\",\n \"flex-layout.col#footer-right-desktop\"\n ],\n \"props\": {\n \"blockClass\": \"footer-row\",\n \"paddingTop\": 7,\n \"paddingBottom\": 7\n }\n },\n\n \"flex-layout.col#footer-left-desktop\": {\n \"children\": [\"vtex.menu@2.x:menu#category-menu\"],\n \"props\": {\n \"blockClass\": \"footer-menu\"\n }\n },\n\n \"flex-layout.col#footer-right-desktop\": {\n \"children\": [\"accepted-payment-methods\"],\n \"props\": {\n \"blockClass\": \"footer-payment-methods\"\n }\n },\n\n \"accepted-payment-methods\": {\n \"props\": {\n \"paymentMethods\": [\"MasterCard\", \"Visa\", \"Diners Club\"]\n }\n },\n \"footer-layout.mobile\": {\n\n \"children\": [\n \"flex-layout.row#mid-footer\"\n ]\n },\n \"flex-layout.row#mid-footer\": {\n \"props\": {\n \"blockClass\": \"footer-row\"\n },\n \"children\": [\n \"flex-layout.col#colFoot\"\n ]\n },\n\n \"flex-layout.col#colFoot\": {\n \"children\": [\n \"vtex.menu@2.x:menu#footer\"\n ]\n },\n \"vtex.menu@2.x:menu#footer\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#category-electronics\",\n \"menu-item#category-major-appliances\",\n \"menu-item#category-small-appliances\"\n ]\n }\n}\n\n```" } ]
code_demostore-theme_41d976db
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/custom/styles-page.json from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#styles\": {\n \"blocks\": [\n \"flex-layout.row#style-slider\",\n \"shelf#styles\",\n \"flex-layout.row#pink\",\n \"search-result#styles\"\n ]\n },\n\n \"flex-layout.row#style-slider\": {\n \"children\": [\n \"info-card#styles\"\n ]\n },\n\n \"info-card#styles\": {\n \"props\": {\n \"imageUrl\": \"https://image.shutterstock.com/z/stock-photo-party-with-best-friends-group-of-cheerful-young-people-enjoying-home-party-with-snacks-and-drinks-492006757.jpg\",\n \"callToActionMode\": \"none\",\n \"isFullModeStyle\": true,\n \"headline\": \" \",\n \"blockClass\": \"depbanner\"\n }\n },\n\n \"shelf#styles\": {\n \"blocks\": [\"product-summary.shelf\"],\n \"props\": {\n \"orderBy\": \"OrderByTopSaleDESC\",\n \"paginationDotsVisibility\": \"never\",\n \"collection\": \"139\",\n \"productList\": {\n \"maxItems\": 10,\n \"itemsPerPage\": 3,\n \"minItemsPerPage\": 1.5,\n \"scroll\": \"BY_PAGE\",\n \"arrows\": true,\n \"titleText\": \"\"\n }\n }\n },\n\n \"flex-layout.row#pink\": {\n \"props\":{\n \"horizontalAlign\": \"center\",\n \"blockClass\": \"pinkRow\"\n },\n \"children\": [\n \"flex-layout.col#pink\"\n ]\n },\n\n \"flex-layout.col#pink\": {\n \"props\":{\n \"blockClass\": \"pinkCol\",\n \"horizontalAlign\": \"center\",\n \"verticalAlign\": \"center\"\n\n },\n \"children\": [\n \"rich-text#concepts-title\",\n \"rich-text#concepts\"\n ]\n },\n\n \"rich-text#concepts-title\": {\n \"props\": {\n \"font\": \"t-heading-2\",\n \"textColor\": \"c-muted-1\",\n \"text\": \"A new concept\",\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\"\n }\n },\n\n \"rich-text#concepts\": {\n \"props\": {\n \"textColor\": \"c-muted-1\",\n \"text\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque id consectetur erat. Etiam nulla eros, scelerisque laoreet consequat sit amet, pharetra nec nibh. Nulla porta non sapien sed feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ullamcorper justo enim, dictum vehicula mauris volutpat quis.\",\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\"\n }\n },\n\n \"search-result#styles\": {\n \"blocks\": [\n \"gallery\",\n \"not-found\",\n \"order-by\",\n \"total-products\",\n \"search-title\"\n ],\n \"props\": {\n \"context\": {\n \"maxItemsPerPage\": 2,\n \"orderByField\": \"OrderByReleaseDateDESC\"\n },\n \"pagination\": \"show-more\"\n }\n }\n\n}\n\n```" } ]
code_demostore-theme_a1de2d81
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/header/category-menu.json from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vtex.menu@2.x:menu#category-menu\": {\n \"children\": [\n \"menu-item#category-electronics\",\n \"menu-item#category-major-appliances\",\n \"menu-item#category-small-appliances\"\n ]\n },\n \"menu-item#category-electronics\": {\n \"props\": {\n \"id\": \"menu-item-category-electronics\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"categoryId\": 153,\n \"type\": \"internal\",\n \"href\": \"/electronics/\",\n \"noFollow\": true,\n \"tagTitle\": \"Electronics\",\n \"text\": \"Electronics\"\n }\n }\n },\n\n \"menu-item#category-major-appliances\": {\n \"props\": {\n \"id\": \"menu-item-category-major-appliances\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"categoryId\": \"151\",\n \"type\": \"internal\",\n \"href\": \"/major-appliances/\",\n \"noFollow\": true,\n \"tagTitle\": \"Major Appliances\",\n \"text\": \"Major Appliances\"\n }\n }\n },\n \"menu-item#category-small-appliances\": {\n \"props\": {\n \"id\": \"menu-item-category-small-appliances\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"categoryId\": 152,\n \"type\": \"internal\",\n \"href\": \"/small-appliances\",\n \"noFollow\": true,\n \"tagTitle\": \"Small appliances\",\n \"text\": \"Small appliances\"\n }\n }\n },\n \"menu-item#login\": {\n \"props\": {\n \"id\": \"menu-item-custom-login\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/account\",\n \"noFollow\": true,\n \"tagTitle\": \"My account\",\n \"text\": \"My account\"\n }\n }\n }\n}\n\n```" } ]
code_demostore-theme_ed016fdd
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of demostore-theme/store/blocks/header/header.jsonc from the demostore-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"header\": {\n \"blocks\": [\n \"header-layout.desktop\",\n \"header-layout.mobile\"\n ]\n },\n \"header.full\": {\n \"blocks\": [\n \"header-layout.desktop\",\n \"header-layout.mobile\"\n ]\n },\n \"header-layout.desktop\": {\n \"children\": [\n \"header-row#4-desktop\",\n \"header-row#5-desktop\"\n ]\n },\n\n \"header-row#4-desktop\": {\n \"children\": [\n \"logo#desktop\"\n ],\n \"props\": {\n \"sticky\": true,\n \"blockClass\": \"main-header\"\n }\n },\n\n \"autocomplete-result-list.v2\": {\n \"blocks\": [\"product-summary.shelf\"]\n },\n \"search-bar\": {\n \"blocks\": [\"autocomplete-result-list.v2\"],\n \"props\": {\n \"openAutocompleteOnFocus\": true\n }\n },\n\n \"header-row#5-desktop\": {\n \"children\": [\n \"vtex.menu@2.x:menu#category-menu\",\n \"header-spacer\",\n \"header-spacer\",\n \"search-bar\",\n \"login\",\n \"minicart\"\n ],\n \"props\": {\n \"blockClass\": \"main-topbar\"\n }\n },\n\n \"logo#desktop\": {\n \"props\": {\n \"title\": \"Logo\",\n \"href\": \"/\",\n \"url\": \"https://appliancetheme.vteximg.com.br/arquivos/flatflat-logo-large.png\",\n \"width\": \"110\"\n }\n },\n\n \"minicart\": {\n \"blocks\": [\n \"product-summary\"\n ],\n \"props\": {\n \"type\": \"popup\",\n \"showRemoveButton\": true,\n \"showDiscount\": true,\n \"showSku\": true,\n \"labelMiniCartEmpty\": \"\",\n \"labelButtonFinishShopping\": \"Go to checkout\",\n \"enableQuantitySelector\": true,\n \"maxQuantity\": 10,\n \"labelClasses\": \"gray\"\n }\n },\n\n \"header-layout.mobile\": {\n \"children\": [\n \"header-row#1-mobile\"\n ]\n },\n\n\n \"header-row#1-mobile\": {\n \"children\": [\n \"drawer\",\n \"logo#mobile\",\n \"header-spacer\",\n \"header-spacer\",\n \"minicart\"\n ],\n \"props\": {\n \"sticky\": true,\n \"blockClass\": \"main-header-mobile\"\n }\n },\n\n \"drawer\": {\n \"children\": [\n \"menu#drawer\"\n ]\n },\n\n \"menu#drawer\": {\n \"children\": [\n \"menu-item#category-electronics\",\n \"menu-item#category-major-appliances\",\n \"menu-item#category-small-appliances\",\n \"menu-item#login\"\n ],\n \"props\": {\n \"orientation\": \"vertical\"\n }\n },\n\n \"logo#mobile\": {\n \"props\": {\n \"title\": \"Logo\",\n \"href\": \"/\",\n \"url\": \"https://storecomponents.vteximg.com.br/arquivos/store-theme-logo-mobile.png\",\n \"width\": \"70\"\n }\n }\n}\n\n```" } ]
code_olark_d47e39b2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of olark/docs/README.md from the olark VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n📢 Use this project, [contribute](https://github.com/vtex-apps/olark) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Olark\n\n<!-- DOCS-IGNORE:start -->\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n<!-- DOCS-IGNORE:end -->\n\nIntegration with [Olark](https://www.olark.com/) chat box.\n\n## Configuration\n\nIt is possible to install in your store either by using App Store or the VTEX IO Toolbelt.\n\n### Using VTEX App Store\n\n1. Access the **Apps** section in your account's admin page and look for the Olark box;\n2. Then, click on the **Install** button;\n3. You'll see a warning message about needing to enter the necessary configurations. Scroll down and type in your **Olark ID**.\n4. Click on **Save**.\n\n### Using VTEX IO Toolbelt\n\n1. [Install](https://vtex.io/docs/recipes/development/installing-an-app/) the `vtex.olark@0.x` app. You can confirm that the app has now been installed by running `vtex ls` again. \n2. Access the **Apps** section in your account's admin page and look for the NAME OF THE APP box. Once you find it, click on the box.\n3. Fill in the **Olark ID** field.\n4. Click on **Save**.\n\n<!-- DOCS-IGNORE:start -->\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n<!-- DOCS-IGNORE:end -->\n\n```" } ]
code_pixel-events_c4801043
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/messages/pt.json from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/test\": \"teste\",\n \"store/test\": \"teste\"\n}\n```" } ]
code_pixel-events_6be8d7a5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/messages/en.json from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/test\": \"test\",\n \"store/test\": \"test\"\n}\n\n```" } ]
code_pixel-events_8e65ce54
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/messages/es.json from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/test\": \"teste\",\n \"store/test\": \"teste\"\n}\n```" } ]
code_pixel-events_5cb882d0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/docs/README.md from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# VTEX React App Template\n\nOur guide repository to structure for react apps, that should be used as a template.\n\nWe use `yarn` as our default package manager, before coding make sure to run yarn on: `root` and `react` folders.\n\n## Some features:\n\n### Tests\n\nFor testing we use `@vtex/test-tools`, our own testing framework based on `react-testing-library`, the tests should be located on the `react/__tests__` folder. For references, visit our [repository](https://github.com/vtex/test-tools).\n\n### Hooks\n\nHusky hooks tha runs on every `pre-commit` and `pre-push`.\n\n### Intl Equalizer\n\nTool for equalizing the messages located on the `messages` folder/builder. It's configured to use the **en.json** as the default file for comparison. For references, visit our [repository](https://github.com/vtex/intl-equalizer).\n\n### Lint + Formatting\n\nTS lint configured with Prettier and .Config.\n\n### Available Scripts\n\n```json\n{\n \"lint\": \"cd ./react && yarn lint\",\n \"test\": \"cd ./react && yarn test\",\n \"lint:locales\": \"intl-equalizer\",\n \"locales:fix\": \"intl-equalizer --fix\",\n \"verify\": \"yarn lint && yarn lint:locales && yarn test\"\n}\n```\n\n### Ci\n\n#### Install:\n\n```yml\ninstall:\n commands:\n - echo Installing Packages...\n - cd react\n - npm install\n - echo Packages installed!\n```\n\n#### Pre-build:\n\n```yml\npre_build:\n commands:\n - echo Running tests...\n - npm run verify\n - echo Lint and tests finished!\n```\n\n```" } ]
code_pixel-events_8d218eaa
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/react/package.json from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"lint\": \"tsc --noEmit && eslint --quiet --fix --ext ts,tsx .\",\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"apollo-client\": \"^2.6.3\",\n \"react\": \"^16.8.6\",\n \"react-apollo\": \"^2.5.8\",\n \"react-dom\": \"^16.8.6\",\n \"react-intl\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@types/graphql\": \"^14.2.2\",\n \"@types/react\": \"^16.8.22\",\n \"@types/react-intl\": \"^2.3.18\",\n \"@vtex/test-tools\": \"^0.3.2\",\n \"@vtex/tsconfig\": \"^0.2.0\",\n \"eslint\": \"5.x\",\n \"eslint-config-vtex-react\": \"^5.1.0\",\n \"prettier\": \"^1.18.2\",\n \"prop-types\": \"^15.7.2\",\n \"typescript\": \"3.5.2\"\n }\n}\n\n```" } ]
code_pixel-events_149c73d0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of pixel-events/react/__tests__/index.test.tsx from the pixel-events VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\ndescribe('Orders List Scenarios', () => {\n it('should work', () => {\n expect(1).toBe(1)\n })\n})\n\n```" } ]
code_add-to-cart-button_57d8e02d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/it-IT.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Articolo aggiunto al carrello\",\n \"store/add-to-cart.failure\": \"Si è verificato un errore. L'articolo non è stato aggiunto al carrello.\",\n \"store/add-to-cart.see-cart\": \"Visualizza carello\",\n \"store/add-to-cart.add-to-cart\": \"Aggiungi al carrello\",\n \"store/add-to-cart.label-unavailable\": \"Non disponibile\",\n \"store/add-to-cart.select-sku-variations\": \"Selezionare un'opzione per ogni variante\",\n \"admin/editor.add-to-cart.title\": \"Pulsante \\\"Aggiungi al carrello\\\"\",\n \"admin/editor.add-to-cart.text.title\": \"Testo del pulsante\",\n \"admin/editor.add-to-cart.text.description\": \"Testo del pulsante, ad es. \\\"Aggiungi al carrello\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Testo del pulsante non disponibile\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Testo del pulsante quando il prodotto non è disponibile.\"\n}\n\n```" } ]
code_add-to-cart-button_cd75cccf
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/th-TH.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"เพิ่มสินค้าลงในรถเข็นของคุณแล้ว\",\n \"store/add-to-cart.failure\": \"มีบางอย่างผิดพลาดและเพิ่มสินค้าลงในรถเข็นของคุณไม่ได้!\",\n \"store/add-to-cart.see-cart\": \"ดูรถเข็น\",\n \"store/add-to-cart.add-to-cart\": \"เพิ่มลงในรถเข็น\",\n \"store/add-to-cart.label-unavailable\": \"ไม่พร้อมจำหน่าย\",\n \"store/add-to-cart.select-sku-variations\": \"กรุณาเลือกตัวเลือกของแต่ละรุ่นสินค่า\",\n \"admin/editor.add-to-cart.title\": \"ปุ่มเพิ่มลงในรถเข็น\",\n \"admin/editor.add-to-cart.text.title\": \"ข้อความบนปุ่ม\",\n \"admin/editor.add-to-cart.text.description\": \"ข้อความบนปุ่ม เช่น \\\"เพิมลงในรถเข็น\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"ไม่มีข้อความบนปุ่ม\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"ข้อความบนปุ่มเมื่อผลิตถัณฑ์ไม่พร้อมจำหน่าย\"\n}\n\n```" } ]
code_add-to-cart-button_c2713902
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/ko-KR.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"장바구니에 추가 된 품목\",\n \"store/add-to-cart.failure\": \"문제가 발생하여 상품이 장바구니에 추가되지 않았습니다!\",\n \"store/add-to-cart.see-cart\": \"장바구니 보기\",\n \"store/add-to-cart.add-to-cart\": \"장바구니에 담기\",\n \"store/add-to-cart.label-unavailable\": \"구매할 수 없음\",\n \"store/add-to-cart.select-sku-variations\": \"각 변형의 옵션을 선택하세요.\",\n \"admin/editor.add-to-cart.title\": \"장바구니 버튼\",\n \"admin/editor.add-to-cart.text.title\": \"버튼 텍스트\",\n \"admin/editor.add-to-cart.text.description\": \"버튼의 텍스트 (예: \\\"장바구니에 담기\\\")\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"버튼 텍스트를 사용할 수 없음\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"제품을 사용할 수 없는 경우 버튼 텍스트입니다.\"\n}\n\n```" } ]
code_add-to-cart-button_2066ab7b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/nn-NO.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Vare lagt til i handlevognen\",\n \"store/add-to-cart.failure\": \"Noe gikk galt og varen ble ikke lagt til i handlekurven!\",\n \"store/add-to-cart.see-cart\": \"Vis handlekurv\",\n \"store/add-to-cart.add-to-cart\": \"Legg i handlekurv\",\n \"store/add-to-cart.label-unavailable\": \"Utilgjengelig\",\n \"store/add-to-cart.select-sku-variations\": \"Velg et alternativ for hver variant\",\n \"admin/editor.add-to-cart.title\": \"\\\"Legg i handlekurv\\\"-knapp\",\n \"admin/editor.add-to-cart.text.title\": \"Tekst knapp\",\n \"admin/editor.add-to-cart.text.description\": \"Tekst på knappen, f. eks. \\\"Legg i handlekurv\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Tekst på knappen er ikke tilgjengelig\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Tekst på knappen når produktet er utilgjengelig.\"\n}\n\n```" } ]
code_add-to-cart-button_ef3424c9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/ja-JP.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"カートに追加された項目\",\n \"store/add-to-cart.failure\": \"エラーが発生しました。項目はカートに追加されていません!\",\n \"store/add-to-cart.see-cart\": \"カートを閲覧する\",\n \"store/add-to-cart.add-to-cart\": \"カートに追加する\",\n \"store/add-to-cart.label-unavailable\": \"利用不可\",\n \"store/add-to-cart.select-sku-variations\": \"それぞれのバリエーションのオプションを選択してください\",\n \"admin/editor.add-to-cart.title\": \"カートに追加するボタン\",\n \"admin/editor.add-to-cart.text.title\": \"ボタンテキスト\",\n \"admin/editor.add-to-cart.text.description\": \"ボタンのテキストです。例. 「カートに追加する」\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"ボタンテキストは利用できません\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"製品が入手できない時のボタンテキストです。\"\n}\n\n```" } ]
code_add-to-cart-button_4e074a23
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/bg-BG.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Артикулът е добавен в количката ви\",\n \"store/add-to-cart.failure\": \"Нещо се обърка и продуктът не беше добавен в количката ви!\",\n \"store/add-to-cart.see-cart\": \"Преглед на количката\",\n \"store/add-to-cart.add-to-cart\": \"Добавяне в количката\",\n \"store/add-to-cart.label-unavailable\": \"Не е налично\",\n \"store/add-to-cart.select-sku-variations\": \"Направете избор за всеки вариант\",\n \"admin/editor.add-to-cart.title\": \"Бутон за добавяне в количката\",\n \"admin/editor.add-to-cart.text.title\": \"Текст на бутона\",\n \"admin/editor.add-to-cart.text.description\": \"Текст на бутона, напр. „Добавяне в количката“\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Не е наличен текст на бутона\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Текст на бутона, когато продуктът не е наличен.\"\n}\n\n```" } ]
code_add-to-cart-button_8167c1fd
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/id-ID.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Item ditambahkan ke troli Anda\",\n \"store/add-to-cart.failure\": \"Terjadi kesalahan sehingga item tidak ditambahkan ke troli Anda!\",\n \"store/add-to-cart.see-cart\": \"Lihat troli\",\n \"store/add-to-cart.add-to-cart\": \"Tambahkan ke troli\",\n \"store/add-to-cart.label-unavailable\": \"Tidak tersedia\",\n \"store/add-to-cart.select-sku-variations\": \"Pilih opsi dari tiap variasi\",\n \"admin/editor.add-to-cart.title\": \"Tombol Tambahkan ke troli\",\n \"admin/editor.add-to-cart.text.title\": \"Tombol teks\",\n \"admin/editor.add-to-cart.text.description\": \"Teks tombol, mis. \\\"Tambahkan ke troli\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Teks tombol tidak tersedia\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Teks tombol saat produk tidak tersedia.\"\n}\n\n```" } ]
code_add-to-cart-button_cdd0ea60
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/pt.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Item adicionado ao carrinho\",\n \"store/add-to-cart.failure\": \"Algo deu errado e não foi possível adicionar o item ao seu carrinho.\",\n \"store/add-to-cart.see-cart\": \"Ver carrinho\",\n \"store/add-to-cart.add-to-cart\": \"Adicionar ao carrinho\",\n \"store/add-to-cart.label-unavailable\": \"Indisponível\",\n \"store/add-to-cart.select-sku-variations\": \"Por favor, selecione uma opção de cada variação.\",\n \"admin/editor.add-to-cart.title\": \"Botão de adicionar ao carrinho\",\n \"admin/editor.add-to-cart.text.title\": \"Texto do botão\",\n \"admin/editor.add-to-cart.text.description\": \"Texto do botão, ex.: \\\"Adicionar ao carrinho\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Texto do botão (indisponível)\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Texto do botão quando o produto não está disponível.\"\n}\n```" } ]
code_add-to-cart-button_1ec98dc3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/ar-SA.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"تمت إضافة المنتج إلى السلة بنجاح\",\n \"store/add-to-cart.failure\": \"حدث خطأ ولم تتم إضافة العنصر إلى سلة التسوق الخاصة بك!\",\n \"store/add-to-cart.see-cart\": \"عرض عربة التسوق\",\n \"store/add-to-cart.add-to-cart\": \"أضف الى السلة\",\n \"store/add-to-cart.label-unavailable\": \"غير متاح\",\n \"store/add-to-cart.select-sku-variations\": \"الرجاء تحديد خيار من كل متغير\",\n \"admin/editor.add-to-cart.title\": \"عملية \\\"أضف إلى عربة التسوق\\\"\",\n \"admin/editor.add-to-cart.text.title\": \"Button text\",\n \"admin/editor.add-to-cart.text.description\": \"نص الزر، على سبيل المثال، \\\"إضافة إلى عربة التسوق\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"نص الزر غير متوفر\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"نص الزر عندما يكون المنتج غير متوفر.\"\n}\n\n```" } ]
code_add-to-cart-button_8c462ef0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/en.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Item added to your cart\",\n \"store/add-to-cart.failure\": \"Something went wrong and the item was not added to your cart!\",\n \"store/add-to-cart.see-cart\": \"View Cart\",\n \"store/add-to-cart.add-to-cart\": \"Add to Cart\",\n \"store/add-to-cart.label-unavailable\": \"Unavailable\",\n \"store/add-to-cart.select-sku-variations\": \"Please select an option for each variation\",\n \"admin/editor.add-to-cart.title\": \"\\\"Add to Cart\\\" Button\",\n \"admin/editor.add-to-cart.text.title\": \"Button text\",\n \"admin/editor.add-to-cart.text.description\": \"Text displayed on button, e.g.: \\\"Add to Cart\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Button text (unavailable)\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Text displayed on button when the product is unavailable.\"\n}\n```" } ]
code_add-to-cart-button_8c32d692
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/no-NO.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Vare lagt til i handlevognen\",\n \"store/add-to-cart.failure\": \"Noe gikk galt og varen ble ikke lagt til i handlekurven!\",\n \"store/add-to-cart.see-cart\": \"Vis handlekurv\",\n \"store/add-to-cart.add-to-cart\": \"Legg i handlekurv\",\n \"store/add-to-cart.label-unavailable\": \"Utilgjengelig\",\n \"store/add-to-cart.select-sku-variations\": \"Velg et alternativ for hver variant\",\n \"admin/editor.add-to-cart.title\": \"\\\"Legg i handlekurv\\\"-knapp\",\n \"admin/editor.add-to-cart.text.title\": \"Tekst knapp\",\n \"admin/editor.add-to-cart.text.description\": \"Tekst på knappen, f. eks. \\\"Legg i handlekurv\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Tekst på knappen er ikke tilgjengelig\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Tekst på knappen når produktet er utilgjengelig.\"\n}\n\n```" } ]
code_add-to-cart-button_3c8773ef
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/ro-RO.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Articol adăugat în coșul tău\",\n \"store/add-to-cart.failure\": \"A apărut o eroare, iar articolul nu a fost adăugat în coșul tău!\",\n \"store/add-to-cart.see-cart\": \"Vizualizează coșul\",\n \"store/add-to-cart.add-to-cart\": \"Adaugă în coș\",\n \"store/add-to-cart.label-unavailable\": \"Indisponibil\",\n \"store/add-to-cart.select-sku-variations\": \"Te rugăm să selectezi o opțiune pentru fiecare variație\",\n \"admin/editor.add-to-cart.title\": \"Buton Adaugă în coș\",\n \"admin/editor.add-to-cart.text.title\": \"Text buton\",\n \"admin/editor.add-to-cart.text.description\": \"Textul butonului, de exemplu „Adaugă în coș”\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Text buton indisponibil\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Textul butonului atunci când un produs e indisponibil.\"\n}\n\n```" } ]
code_add-to-cart-button_ca54628b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/de-DE.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Artikel in den Warenkorb gelegt\",\n \"store/add-to-cart.failure\": \"Etwas ging schief und der Artikel wurde nicht in Ihren Warenkorb gelegt!\",\n \"store/add-to-cart.see-cart\": \"Warenkorb anzeigen\",\n \"store/add-to-cart.add-to-cart\": \"In den Warenkorb legen\",\n \"store/add-to-cart.label-unavailable\": \"Nicht verfügbar\",\n \"store/add-to-cart.select-sku-variations\": \"Bitte wählen Sie für jede Variante eine Option aus\",\n \"admin/editor.add-to-cart.title\": \"In den Warenkorb legen\",\n \"admin/editor.add-to-cart.text.title\": \"Text der Schaltfläche\",\n \"admin/editor.add-to-cart.text.description\": \"Text der Schaltfläche, z. B. \\\"In den Warenkorb\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Schaltflächentext nicht verfügbar\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Schaltflächentext, wenn das Produkt nicht verfügbar ist.\"\n}\n\n```" } ]
code_add-to-cart-button_11cc13b5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/fr-FR.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Article ajouté à votre panier\",\n \"store/add-to-cart.failure\": \"Un problème est survenu et l’article n’a pas été ajouté à votre panier !\",\n \"store/add-to-cart.see-cart\": \"Voir le panier\",\n \"store/add-to-cart.add-to-cart\": \"Ajouter au panier\",\n \"store/add-to-cart.label-unavailable\": \"Indisponible\",\n \"store/add-to-cart.select-sku-variations\": \"Veuillez sélectionner une option de chaque variante\",\n \"admin/editor.add-to-cart.title\": \"Bouton Ajouter au panier\",\n \"admin/editor.add-to-cart.text.title\": \"Texte du bouton\",\n \"admin/editor.add-to-cart.text.description\": \"Texte du bouton, ex : \\\"Ajouter au panier\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Texte du bouton non disponible\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Texte du bouton lorsque le produit n’est pas disponible.\"\n}\n\n```" } ]
code_add-to-cart-button_45bcf1bb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/nl-NL.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Item toegevoegd aan uw winkelwagen\",\n \"store/add-to-cart.failure\": \"Er is iets misgegaan en het item is niet toegevoegd aan uw winkelwagen!\",\n \"store/add-to-cart.see-cart\": \"Bekijk winkelwagen\",\n \"store/add-to-cart.add-to-cart\": \"Toevoegen aan winkelwagen\",\n \"store/add-to-cart.label-unavailable\": \"Niet beschikbaar\",\n \"store/add-to-cart.select-sku-variations\": \"Selecteer een optie van elke variatie\",\n \"admin/editor.add-to-cart.title\": \"Toevoegen aan winkelwagen knop\",\n \"admin/editor.add-to-cart.text.title\": \"Knoptekst\",\n \"admin/editor.add-to-cart.text.description\": \"Tekst van de knop, bijv. \\\"Toevoegen aan winkelwagent\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Knoptekst niet beschikbaar\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Knoptekst wanneer het product niet beschikbaar is.\"\n}\n\n```" } ]
code_add-to-cart-button_8de085be
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/messages/es.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/add-to-cart.success\": \"Ítem agregado al carrito\",\n \"store/add-to-cart.failure\": \"Se produjo un error. El ítem no se agregó al carrito.\",\n \"store/add-to-cart.see-cart\": \"Ver carrito\",\n \"store/add-to-cart.add-to-cart\": \"Agregar al carrito\",\n \"store/add-to-cart.label-unavailable\": \"No disponible\",\n \"store/add-to-cart.select-sku-variations\": \"Por favor, selecciona una opción de cada variación\",\n \"admin/editor.add-to-cart.title\": \"Botón de agregar al carrito\",\n \"admin/editor.add-to-cart.text.title\": \"Texto del botón\",\n \"admin/editor.add-to-cart.text.description\": \"Texto del botón, p. ej.: \\\"Agregar al carrito\\\"\",\n \"admin/editor.add-to-cart.text-unavailable.title\": \"Texto del botón (no disponible)\",\n \"admin/editor.add-to-cart.text-unavailable.description\": \"Texto del botón cuando el producto no está disponible.\"\n}\n```" } ]
code_add-to-cart-button_5e68bf47
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/docs/README.md from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n📢 Use this project, [contribute](https://github.com/vtex-apps/add-to-cart-button) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion). \n\n# Add To Cart Button\n\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nThe `add-to-cart-button` block is designed to add products to the [Minicart](https://developers.vtex.com/docs/apps/vtex.minicart/) (`minicart.v2`).\n\n![image](https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-add-to-cart-button-0.png)\n\n> ⚠️ The **Add to Cart** button is only compatible with stores using Minicart v2. For these stores, it will function correctly on the Shelf component and the Product Details page. If you are using [Minicart v1](https://github.com/vtex-apps/minicart/blob/383d7bbd3295f06d1b5854a0add561a872e1515c/docs/README.md), you should configure the [Buy Button block](https://developers.vtex.com/docs/apps/vtex.store-components/buybutton) on the Product Details page and the [Product Summary Buy button](https://developers.vtex.com/docs/apps/vtex.product-summary/productsummarybuybutton) on the Shelf component instead.\n\n## Configuration\n\n1. Import the `vtex.add-to-cart-button` app to your theme dependencies in the `manifest.json` file, as follows:\n\n```json\n\"dependencies\": {\n \"vtex.add-to-cart-button\": \"0.x\"\n}\n```\n\n2. Add the `add-to-cart-button` to another theme block using the product context, such as the `product-summary.shelf`. In the example below, the `add-to-cart-button` is added to the `flex-layout.row` block from the `store.product` template, which uses the product context:\n\n```json\n \"store.product\": {\n \"children\": [\n \"flex-layout.row#product\",\n ]\n },\n \"flex-layout.row#product\": {\n \"children\": [\n \"add-to-cart-button\"\n ]\n }\n```\n\n| Prop name | Type | Description | Default value |\n| - | - | - | - |\n| `onClickBehavior` | `enum` | Controls what happens when users click the button. Possible values are: `go-to-product-page`, `add-to-cart`, `ensure-sku-selection` (if multiple SKUs are available, users will be redirected to the product page to select the desired one. If the product only has 1 SKU available, it will be automatically added to the cart when the button is clicked) and `add-to-cart-and-trigger-shipping-modal` (opens a modal for ZIP code input if none is provided; otherwise, it adds the item to the cart. See more in [vtex.shipping-option-components](https://github.com/vtex-apps/shipping-option-components)). | `add-to-cart` |\n| `onClickEventPropagation` | `enum` | Controls whether the 'onClick' event, triggered upon user clicks, should propagate to the parent elements of the page. Possible values are: `disabled` and `enabled`. | `disabled` |\n| `isOneClickBuy` | `boolean` | Determines whether the user should be redirected to the checkout page (`true`) or not (`false`) when the **Add to Cart** button is clicked. | `false` |\n| `customOneClickBuyLink` | `string` | Defines the link to which users will be redirected when the **Add to Cart** button is clicked, and the `isOneClickBuy` prop is set to `true`. | `/checkout/#/cart` |\n| `customToastUrl` | `string` | Defines the link to which users will be redirected when the toast (pop-up notification displayed when adding an item to the minicart) is clicked. | `/checkout/#/cart` |\n| `text` | `string` | Defines a custom text message to be displayed on the **Add to Cart** button. | `Add to cart` _(automatic translation will be applied following your store default language)_ |\n| `unavailableText` | `string` | Defines a custom text message to be displayed on the **Add to Cart** button when a product is unavailable. | `Unavailable` _(automatic translation will be applied following your store default language)_ |\n| `customPixelEventId` | `string` | Defines the `id` for the event that the button will send upon user interaction. | `undefined` |\n\n## Customization\n\nTo apply CSS customizations to this and other blocks, follow the instructions in [Using CSS Handles for store customization](https://developers.vtex.com/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization).\n\n| CSS Handles |\n| --------------------- |\n| `buttonText` |\n| `buttonDataContainer` |\n| `tooltipLabelText` |\n\n<!-- DOCS-IGNORE:start -->\n\n## Contributors ✨\n\nThanks goes to these wonderful people:\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tr>\n <td align=\"center\"><a href=\"https://github.com/JNussens\"><img src=\"https://avatars0.githubusercontent.com/u/7662734?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Jean Nussenzveig</b></sub></a><br /><a href=\"https://github.com/vtex-apps/add-to-cart-button/commits?author=JNussens\" title=\"Code\">💻</a></td>\n <td align=\"center\"><a href=\"http://ygorneves.com\"><img src=\"https://avatars1.githubusercontent.com/u/39542011?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ygor Neves</b></sub></a><br /><a href=\"https://github.com/vtex-apps/add-to-cart-button/commits?author=ygorneves10\" title=\"Code\">💻</a></td>\n <td align=\"center\"><a href=\"https://github.com/lucaspacheco-acct\"><img src=\"https://avatars0.githubusercontent.com/u/59736416?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Lucas Pacheco</b></sub></a><br /><a href=\"https://github.com/vtex-apps/add-to-cart-button/commits?author=lucaspacheco-acct\" title=\"Code\">💻</a></td>\n </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n\n<!-- DOCS-IGNORE:end -->\n\n```" } ]
code_add-to-cart-button_1e0174df
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/mapCatalogItemToCart.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { mapCatalogItemToCart } from './modules/catalogItemToCart'\n\nexport default mapCatalogItemToCart\n\n```" } ]
code_add-to-cart-button_e5e72ad3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/AddToCartButton.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useState, useEffect, useRef } from 'react'\nimport {\n FormattedMessage,\n MessageDescriptor,\n useIntl,\n defineMessages,\n} from 'react-intl'\nimport { Button, Tooltip } from 'vtex.styleguide'\nimport { Utils } from 'vtex.checkout-resources'\nimport { useCssHandles } from 'vtex.css-handles'\nimport { useRuntime } from 'vtex.render-runtime'\nimport { usePixel } from 'vtex.pixel-manager'\nimport { useProductDispatch } from 'vtex.product-context'\nimport { usePWA } from 'vtex.store-resources/PWAContext'\nimport { useOrderItems } from 'vtex.order-items/OrderItems'\nimport { useShippingOptionState } from 'vtex.shipping-option-components/ShippingOptionContext'\n\nimport { CartItem } from './modules/catalogItemToCart'\nimport useMarketingSessionParams from './hooks/useMarketingSessionParams'\n\ninterface ProductLink {\n linkText?: string\n productId?: string\n}\n\ninterface Props {\n isOneClickBuy: boolean\n available: boolean\n disabled: boolean\n multipleAvailableSKUs: boolean\n customToastUrl?: string\n customOneClickBuyLink?: string\n skuItems: CartItem[]\n showToast: Function\n allSkuVariationsSelected: boolean\n text?: string\n unavailableText?: string\n productLink: ProductLink\n onClickBehavior:\n | 'add-to-cart'\n | 'go-to-product-page'\n | 'ensure-sku-selection'\n | 'add-to-cart-and-trigger-shipping-modal'\n customPixelEventId?: string\n addToCartFeedback?: 'customEvent' | 'toast'\n onClickEventPropagation: 'disabled' | 'enabled'\n isLoading?: boolean\n}\n\n// We apply a fake loading to accidental consecutive clicks on the button\nconst FAKE_LOADING_DURATION = 500\n\nfunction getFakeLoadingDuration(isOneClickBuy: boolean) {\n return isOneClickBuy ? FAKE_LOADING_DURATION * 10 : FAKE_LOADING_DURATION\n}\n\nconst CSS_HANDLES = [\n 'buttonText',\n 'buttonDataContainer',\n 'tooltipLabelText',\n] as const\n\nconst messages = defineMessages({\n success: { id: 'store/add-to-cart.success' },\n duplicate: { id: 'store/add-to-cart.duplicate' },\n error: { id: 'store/add-to-cart.failure' },\n seeCart: { id: 'store/add-to-cart.see-cart' },\n skuVariations: {\n id: 'store/add-to-cart.select-sku-variations',\n },\n schemaTitle: { id: 'admin/editor.add-to-cart.title' },\n schemaTextTitle: { id: 'admin/editor.add-to-cart.text.title' },\n schemaTextDescription: { id: 'admin/editor.add-to-cart.text.description' },\n schemaUnavailableTextTitle: {\n id: 'admin/editor.add-to-cart.text-unavailable.title',\n },\n schemaUnavailableTextDescription: {\n id: 'admin/editor.add-to-cart.text-unavailable.description',\n },\n})\n\nconst options = {\n allowedOutdatedData: ['paymentData'],\n}\n\nconst mapSkuItemForPixelEvent = (skuItem: CartItem) => {\n // Changes this `/Apparel & Accessories/Clothing/Tops/`\n // to this `Apparel & Accessories/Clothing/Tops`\n const category = skuItem.category ? skuItem.category.slice(1, -1) : ''\n\n return {\n skuId: skuItem.id,\n ean: skuItem.ean,\n variant: skuItem.variant,\n price: skuItem.price,\n sellingPrice: skuItem.sellingPrice,\n priceIsInt: true,\n name: skuItem.name,\n quantity: skuItem.quantity,\n productId: skuItem.productId,\n productRefId: skuItem.productRefId,\n brand: skuItem.brand,\n category,\n detailUrl: skuItem.detailUrl,\n imageUrl: skuItem.imageUrl,\n referenceId: skuItem?.referenceId?.[0]?.Value,\n seller: skuItem.seller,\n sellerName: skuItem.sellerName,\n }\n}\n\nfunction AddToCartButton(props: Props) {\n const {\n text,\n isOneClickBuy,\n available,\n disabled,\n skuItems,\n showToast,\n customToastUrl,\n unavailableText,\n customOneClickBuyLink,\n allSkuVariationsSelected = true,\n productLink,\n onClickBehavior,\n multipleAvailableSKUs,\n customPixelEventId,\n addToCartFeedback,\n onClickEventPropagation = 'disabled',\n isLoading,\n } = props\n\n const intl = useIntl()\n const handles = useCssHandles(CSS_HANDLES)\n const { addItems } = useOrderItems()\n const productContextDispatch = useProductDispatch()\n const { rootPath = '', navigate } = useRuntime()\n const { url: checkoutURL, major } = Utils.useCheckoutURL()\n const { push } = usePixel()\n const { settings = {}, showInstallPrompt = undefined } = usePWA() || {}\n const { promptOnCustomEvent } = settings\n const { utmParams, utmiParams } = useMarketingSessionParams()\n const [isFakeLoading, setFakeLoading] = useState(false)\n const translateMessage = (message: MessageDescriptor) =>\n intl.formatMessage(message)\n const { shippingOption } = useShippingOptionState()\n\n // collect toast and fake loading delay timers\n const timers = useRef<Record<string, number | undefined>>({})\n\n // prevent timers from doing something if the component was unmounted\n useEffect(function onUnmount() {\n return () => {\n // We disable the eslint rule because we just want to clear the current existing timers\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Object.values(timers.current).forEach(clearTimeout)\n }\n }, [])\n\n useEffect(() => {\n const currentTimers = timers.current\n\n if (isFakeLoading) {\n currentTimers.loading = window.setTimeout(\n () => setFakeLoading(false),\n getFakeLoadingDuration(isOneClickBuy)\n )\n }\n }, [isFakeLoading, isOneClickBuy])\n\n const resolveToastMessage = (success: boolean) => {\n if (!success) return translateMessage(messages.error)\n\n return translateMessage(messages.success)\n }\n\n const toastMessage = ({ success }: { success: boolean }) => {\n const message = resolveToastMessage(success)\n\n const action = success\n ? { label: translateMessage(messages.seeCart), href: customToastUrl }\n : undefined\n\n showToast({ message, action })\n }\n\n const handleAddToCart = async () => {\n setFakeLoading(true)\n\n const productLinkIsValid = Boolean(\n productLink.linkText && productLink.productId\n )\n const shouldNavigateToProductPage =\n onClickBehavior === 'go-to-product-page' ||\n (onClickBehavior === 'ensure-sku-selection' && multipleAvailableSKUs)\n\n if (productLinkIsValid && shouldNavigateToProductPage) {\n navigate({\n page: 'store.product',\n params: {\n slug: productLink.linkText,\n id: productLink.productId,\n },\n })\n return\n }\n\n const shouldOpenShippingModal =\n onClickBehavior === 'add-to-cart-and-trigger-shipping-modal' &&\n !shippingOption\n\n if (shouldOpenShippingModal) {\n push({\n id: 'item-added-to-cart-shipping-modal',\n addToCartInfo: {\n skuItems,\n options: {\n marketingData: { ...utmParams, ...utmiParams },\n ...options,\n },\n },\n })\n\n return\n }\n\n const addItemsPromise = addItems(skuItems, {\n marketingData: { ...utmParams, ...utmiParams },\n ...options,\n })\n\n const pixelEventItems = skuItems.map(mapSkuItemForPixelEvent)\n const pixelEvent =\n customPixelEventId && addToCartFeedback === 'customEvent'\n ? {\n id: customPixelEventId,\n event: 'addToCart',\n items: pixelEventItems,\n }\n : {\n event: 'addToCart',\n items: pixelEventItems,\n }\n\n // @ts-expect-error the event is not typed in pixel-manager\n push(pixelEvent)\n\n if (isOneClickBuy) {\n await addItemsPromise\n\n if (\n major > 0 &&\n (!customOneClickBuyLink || customOneClickBuyLink === checkoutURL)\n ) {\n navigate({ to: checkoutURL })\n } else {\n window.location.assign(\n `${rootPath}${customOneClickBuyLink ?? checkoutURL}`\n )\n }\n }\n\n addToCartFeedback === 'toast' &&\n (timers.current.toast = window.setTimeout(() => {\n toastMessage({ success: true })\n }, FAKE_LOADING_DURATION))\n\n /* PWA */\n if (promptOnCustomEvent === 'addToCart' && showInstallPrompt) {\n showInstallPrompt()\n }\n }\n\n const handleClick = (e: React.MouseEvent) => {\n if (productContextDispatch) {\n productContextDispatch({\n type: 'SET_BUY_BUTTON_CLICKED',\n args: { clicked: true },\n })\n }\n\n if (onClickEventPropagation === 'disabled') {\n e.preventDefault()\n e.stopPropagation()\n }\n\n if (allSkuVariationsSelected) {\n handleAddToCart()\n }\n }\n\n /*\n * If text is an empty string it should render the default message\n */\n const availableButtonContent = (\n <div className={`${handles.buttonDataContainer} flex justify-center`}>\n {text ? (\n <span className={handles.buttonText}>{text}</span>\n ) : (\n <FormattedMessage id=\"store/add-to-cart.add-to-cart\">\n {message => <span className={handles.buttonText}>{message}</span>}\n </FormattedMessage>\n )}\n </div>\n )\n\n const unavailableButtonContent = unavailableText ? (\n <span className={handles.buttonText}>{unavailableText}</span>\n ) : (\n <FormattedMessage id=\"store/add-to-cart.label-unavailable\">\n {message => <span className={handles.buttonText}>{message}</span>}\n </FormattedMessage>\n )\n\n const tooltipLabel = (\n <span className={handles.tooltipLabelText}>\n {intl.formatMessage(messages.skuVariations)}\n </span>\n )\n\n const ButtonWithLabel = (\n <Button\n block\n isLoading={isFakeLoading || isLoading}\n disabled={disabled || !available}\n onClick={handleClick}\n >\n {available ? availableButtonContent : unavailableButtonContent}\n </Button>\n )\n\n return allSkuVariationsSelected ? (\n ButtonWithLabel\n ) : (\n <Tooltip trigger=\"click\" label={tooltipLabel}>\n {ButtonWithLabel}\n </Tooltip>\n )\n}\n\nexport default AddToCartButton\n\n```" } ]
code_add-to-cart-button_b93571e9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/package.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"version\": \"0.31.0\",\n \"scripts\": {\n \"lint\": \"tsc --noEmit && eslint --quiet --fix --ext ts,tsx .\",\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"apollo-client\": \"^2.6.8\",\n \"react\": \"^16.13.1\",\n \"react-apollo\": \"^3.1.5\",\n \"react-dom\": \"^16.13.1\",\n \"react-intl\": \"4.5.0\",\n \"recompose\": \"^0.30.0\"\n },\n \"devDependencies\": {\n \"@apollo/react-testing\": \"^3.1.4\",\n \"@types/graphql\": \"^14.5.0\",\n \"@types/ramda\": \"^0.27.4\",\n \"@types/react\": \"^16.9.34\",\n \"@types/react-intl\": \"^3.0.0\",\n \"@types/recompose\": \"^0.30.7\",\n \"@vtex/test-tools\": \"^3.1.0\",\n \"@vtex/tsconfig\": \"^0.4.4\",\n \"typescript\": \"3.9.7\",\n \"vtex.checkout-resources\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-resources@0.46.0/public/@types/vtex.checkout-resources\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles\",\n \"vtex.native-types\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types\",\n \"vtex.order-items\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.order-items@0.13.1/public/@types/vtex.order-items\",\n \"vtex.order-manager\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.order-manager@0.11.1/public/@types/vtex.order-manager\",\n \"vtex.pixel-manager\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.pixel-manager@1.8.0/public/@types/vtex.pixel-manager\",\n \"vtex.product-context\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.10.0/public/@types/vtex.product-context\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.131.0/public/@types/vtex.render-runtime\",\n \"vtex.store-resources\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.83.0/public/@types/vtex.store-resources\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.145.0/public/@types/vtex.styleguide\",\n \"waait\": \"^1.0.5\"\n }\n}\n\n```" } ]
code_add-to-cart-button_ac52dd8e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/Wrapper.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useMemo } from 'react'\nimport { useProduct } from 'vtex.product-context'\nimport type { ProductTypes } from 'vtex.product-context'\nimport { withToast } from 'vtex.styleguide'\n\nimport AddToCartButton from './AddToCartButton'\nimport { mapCatalogItemToCart, CartItem } from './modules/catalogItemToCart'\nimport { AssemblyOptions } from './modules/assemblyOptions'\n\ninterface Props {\n isOneClickBuy: boolean\n available: boolean\n disabled: boolean\n customToastUrl?: string\n customOneClickBuyLink?: string\n showToast: Function\n selectedSeller?: ProductTypes.Seller\n text?: string\n unavailableText?: string\n onClickBehavior?:\n | 'add-to-cart'\n | 'go-to-product-page'\n | 'ensure-sku-selection'\n onClickEventPropagation?: 'disabled' | 'enabled'\n skuItems?: CartItem[]\n customPixelEventId?: string\n addToCartFeedback?: 'toast' | 'customEvent'\n}\n\nfunction checkAvailability(\n isEmptyContext: boolean,\n seller: ProductTypes.Seller | undefined,\n availableProp: Props['available']\n) {\n if (isEmptyContext) {\n return false\n }\n if (availableProp != null) {\n return availableProp\n }\n\n const availableProductQuantity = seller?.commertialOffer?.AvailableQuantity\n\n return Boolean(availableProductQuantity)\n}\n\nfunction checkDisabled(\n isEmptyContext: boolean,\n assemblyOptions: AssemblyOptions | undefined,\n disabledProp: Props['disabled']\n) {\n if (isEmptyContext) {\n return true\n }\n if (disabledProp != null) {\n return disabledProp\n }\n\n const groupsValidArray =\n (assemblyOptions?.areGroupsValid &&\n Object.values(assemblyOptions.areGroupsValid)) ||\n []\n const areAssemblyGroupsValid = groupsValidArray.every(Boolean)\n\n return !areAssemblyGroupsValid\n}\n\nfunction getDefaultSeller(sellers?: ProductTypes.Seller[]) {\n if (!sellers) {\n return undefined\n }\n\n const defaultSeller = sellers.find(seller => seller.sellerDefault)\n\n if (defaultSeller) {\n return defaultSeller\n }\n\n return sellers[0]\n}\n\nconst Wrapper = withToast(function Wrapper(props: Props) {\n const {\n isOneClickBuy,\n available,\n disabled,\n customToastUrl,\n showToast,\n customOneClickBuyLink,\n selectedSeller,\n unavailableText,\n text,\n customPixelEventId,\n addToCartFeedback = 'toast',\n onClickBehavior = 'add-to-cart',\n onClickEventPropagation = 'disabled',\n } = props\n const productContext = useProduct()\n const isEmptyContext = Object.keys(productContext ?? {}).length === 0\n\n const product = productContext?.product\n const itemsLength = product?.items?.length ?? 0\n const multipleAvailableSKUs = itemsLength > 1\n const selectedItem = productContext?.selectedItem\n const assemblyOptions = productContext?.assemblyOptions\n const seller =\n selectedSeller ?? getDefaultSeller(productContext?.selectedItem?.sellers)\n const selectedQuantity =\n productContext?.selectedQuantity != null\n ? productContext.selectedQuantity\n : 1\n\n const skuItems = useMemo(\n () =>\n props.skuItems ??\n mapCatalogItemToCart({\n product,\n selectedItem,\n selectedQuantity,\n selectedSeller: seller,\n assemblyOptions,\n }),\n [\n assemblyOptions,\n product,\n props.skuItems,\n selectedItem,\n selectedQuantity,\n seller,\n ]\n )\n\n const isAvailable = checkAvailability(isEmptyContext, seller, available)\n\n const isDisabled = checkDisabled(isEmptyContext, assemblyOptions, disabled)\n const areAllSkuVariationsSelected = Boolean(\n !isEmptyContext && productContext?.skuSelector?.areAllVariationsSelected\n )\n\n const productLink = {\n linkText: product?.linkText,\n productId: product?.productId,\n }\n\n return (\n <AddToCartButton\n text={text}\n skuItems={skuItems}\n isLoading={productContext?.loadingItem}\n disabled={isDisabled}\n showToast={showToast}\n available={isAvailable}\n isOneClickBuy={isOneClickBuy}\n customToastUrl={customToastUrl}\n unavailableText={unavailableText}\n customOneClickBuyLink={customOneClickBuyLink}\n allSkuVariationsSelected={areAllSkuVariationsSelected}\n productLink={productLink}\n onClickBehavior={onClickBehavior}\n onClickEventPropagation={onClickEventPropagation}\n multipleAvailableSKUs={multipleAvailableSKUs}\n customPixelEventId={customPixelEventId}\n addToCartFeedback={addToCartFeedback}\n />\n )\n})\n\nWrapper.schema = {\n title: 'admin/editor.add-to-cart.title',\n}\n\nexport default Wrapper\n\n```" } ]
code_add-to-cart-button_8e372dd7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/store/contentSchemas.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"definitions\": {\n \"AddToCardButton\": {\n \"title\": \"admin/editor.add-to-cart.title\",\n \"properties\": {\n \"text\": {\n \"title\": \"admin/editor.add-to-cart.text.title\",\n \"description\": \"admin/editor.add-to-cart.text.description\",\n \"$ref\": \"app:vtex.native-types#/definitions/text\"\n },\n \"unavailableText\": {\n \"title\": \"admin/editor.add-to-cart.text-unavailable.title\",\n \"description\": \"admin/editor.add-to-cart.text-unavailable.description\",\n \"$ref\": \"app:vtex.native-types#/definitions/text\"\n }\n }\n }\n }\n}\n\n```" } ]
code_add-to-cart-button_85cd90c4
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/store/interfaces.json from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"add-to-cart-button\": {\n \"component\": \"Wrapper\",\n \"content\": {\n \"$ref\": \"app:vtex.add-to-cart-button#/definitions/AddToCardButton\"\n }\n }\n}\n\n```" } ]
code_add-to-cart-button_510f4e2f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__fixtures__/productContext.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const StarColorTop = {\n product: {\n cacheId: 'star-color-top',\n productName: 'Top Star Color Shirt',\n productId: '2000024',\n description: 'Colorful star on a tank top',\n titleTag: 'Star Color Top',\n metaTagDescription: 'Colorful star on a tank top',\n linkText: 'star-color-top',\n productReference: '998765',\n categoryId: '48',\n categories: [\n '/Apparel & Accessories/Clothing/Tops/',\n '/Apparel & Accessories/Clothing/',\n '/Apparel & Accessories/',\n ],\n brand: 'Kawasaki',\n brandId: 2000001,\n properties: [\n {\n name: 'On Sale',\n values: ['True'],\n __typename: 'Property',\n },\n {\n name: 'Sleeve type',\n values: ['Sleeveless'],\n __typename: 'Property',\n },\n ],\n specificationGroups: [\n {\n name: 'Group',\n specifications: [\n {\n name: 'On Sale',\n values: ['True'],\n __typename: 'SpecificationGroupProperty',\n },\n ],\n __typename: 'SpecificationGroup',\n },\n {\n name: 'Specifications',\n specifications: [\n {\n name: 'Sleeve type',\n values: ['Sleeveless'],\n __typename: 'SpecificationGroupProperty',\n },\n ],\n __typename: 'SpecificationGroup',\n },\n {\n name: 'allSpecifications',\n specifications: [\n {\n name: 'On Sale',\n values: ['True'],\n __typename: 'SpecificationGroupProperty',\n },\n {\n name: 'Sleeve type',\n values: ['Sleeveless'],\n __typename: 'SpecificationGroupProperty',\n },\n ],\n __typename: 'SpecificationGroup',\n },\n ],\n items: [\n {\n itemId: '2000564',\n name: 'Red star',\n nameComplete: 'Top Star Color Shirt Red star',\n complementName: 'Tank top with star',\n ean: '123456',\n referenceId: [\n {\n Key: 'RefId',\n Value: '987134',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155518',\n imageLabel: 'red',\n imageTag:\n '<img src=\"~/arquivos/ids/155518-#width#-#height#/download--40-.png?v=636942495289870000\" width=\"#width#\" height=\"#height#\" alt=\"red\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n imageText: 'red',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000564&qty=1&seller=1&sc=1&price=3500&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 35,\n ListPrice: 35,\n PriceWithoutDiscount: 35,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Red'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [\n {\n id: '13',\n name: 'Customization',\n required: false,\n __typename: 'Attachment',\n },\n ],\n __typename: 'SKU',\n },\n {\n itemId: '2000565',\n name: 'Magento',\n nameComplete: 'Top Star Color Shirt Magento',\n complementName: 'Tank top with star',\n ean: '123456',\n referenceId: [\n {\n Key: 'RefId',\n Value: '66678',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155519',\n imageLabel: 'magenta',\n imageTag:\n '<img src=\"~/arquivos/ids/155519-#width#-#height#/download--51-.png?v=636942496232070000\" width=\"#width#\" height=\"#height#\" alt=\"magenta\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155519/download--51-.png?v=636942496232070000',\n imageText: 'magenta',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000565&qty=1&seller=1&sc=1&price=8740&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 87.4,\n ListPrice: 87.4,\n PriceWithoutDiscount: 87.4,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000567',\n name: 'Light blue',\n nameComplete: 'Top Star Color Shirt Light blue',\n complementName: 'Tank top with star',\n ean: '567567',\n referenceId: [\n {\n Key: 'RefId',\n Value: '9888',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155521',\n imageLabel: 'lightblue',\n imageTag:\n '<img src=\"~/arquivos/ids/155521-#width#-#height#/download--53-.png?v=636943145000300000\" width=\"#width#\" height=\"#height#\" alt=\"light-blue\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155521/download--53-.png?v=636943145000300000',\n imageText: 'light-blue',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000567&qty=1&seller=1&sc=1&price=9240&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 92.4,\n ListPrice: 92.4,\n PriceWithoutDiscount: 92.4,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 46.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 18.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 15.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 46.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 18.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 15.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 46.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 92.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 92.4,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Light blue'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000568',\n name: 'lilac',\n nameComplete: 'Top Star Color Shirt lilac',\n complementName: 'Tank top with star',\n ean: '',\n referenceId: [\n {\n Key: 'RefId',\n Value: '121299',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155522',\n imageLabel: 'lilac',\n imageTag:\n '<img src=\"~/arquivos/ids/155522-#width#-#height#/download--42-.png?v=636943145798400000\" width=\"#width#\" height=\"#height#\" alt=\"lilac\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155522/download--42-.png?v=636943145798400000',\n imageText: 'lilac',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000568&qty=1&seller=1&sc=1&price=7020&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 70.2,\n ListPrice: 70.2,\n PriceWithoutDiscount: 70.2,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 35.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 35.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 35.1,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 70.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 70.2,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000570',\n name: 'White',\n nameComplete: 'Top Star Color Shirt White',\n complementName: 'Tank top with star',\n ean: '4567878',\n referenceId: [\n {\n Key: 'RefId',\n Value: '0009',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155524',\n imageLabel: 'white',\n imageTag:\n '<img src=\"~/arquivos/ids/155524-#width#-#height#/download--43-.png?v=636943147443270000\" width=\"#width#\" height=\"#height#\" alt=\"WHITE\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155524/download--43-.png?v=636943147443270000',\n imageText: 'WHITE',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000570&qty=1&seller=1&sc=1&price=3500&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 35,\n ListPrice: 35,\n PriceWithoutDiscount: 35,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['White'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [\n {\n id: '13',\n name: 'Customization',\n required: false,\n __typename: 'Attachment',\n },\n ],\n __typename: 'SKU',\n },\n {\n itemId: '2000571',\n name: 'Brown',\n nameComplete: 'Top Star Color Shirt Brown',\n complementName: 'Tank top with star',\n ean: '0890896',\n referenceId: [\n {\n Key: 'RefId',\n Value: '2002',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155525',\n imageLabel: 'brown',\n imageTag:\n '<img src=\"~/arquivos/ids/155525-#width#-#height#/download--48-.png?v=636943148698470000\" width=\"#width#\" height=\"#height#\" alt=\"brown\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155525/download--48-.png?v=636943148698470000',\n imageText: 'brown',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000571&qty=1&seller=1&sc=1&price=5300&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 53,\n ListPrice: 53,\n PriceWithoutDiscount: 53,\n RewardValue: 1,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 26.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 13.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 10.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 26.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 13.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 10.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 26.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 53,\n InterestRate: 0,\n TotalValuePlusInterestRate: 53,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Brown'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000572',\n name: 'grey',\n nameComplete: 'Top Star Color Shirt grey',\n complementName: 'Tank top with star',\n ean: '',\n referenceId: [\n {\n Key: 'RefId',\n Value: '8888888',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155526',\n imageLabel: 'grey',\n imageTag:\n '<img src=\"~/arquivos/ids/155526-#width#-#height#/download--44-.png?v=636943150013700000\" width=\"#width#\" height=\"#height#\" alt=\"grey\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155526/download--44-.png?v=636943150013700000',\n imageText: 'grey',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000572&qty=1&seller=1&sc=1&price=8740&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 87.4,\n ListPrice: 87.4,\n PriceWithoutDiscount: 87.4,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000573',\n name: 'yellow',\n nameComplete: 'Top Star Color Shirt yellow',\n complementName: 'Tank top with star',\n ean: '',\n referenceId: [\n {\n Key: 'RefId',\n Value: '33242',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155527',\n imageLabel: 'yellow',\n imageTag:\n '<img src=\"~/arquivos/ids/155527-#width#-#height#/download--41-.png?v=636943151158800000\" width=\"#width#\" height=\"#height#\" alt=\"yellow\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155527/download--41-.png?v=636943151158800000',\n imageText: 'yellow',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000573&qty=1&seller=1&sc=1&price=8740&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 87.4,\n ListPrice: 87.4,\n PriceWithoutDiscount: 87.4,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 21.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 14.6,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 43.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 87.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 87.4,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000574',\n name: 'Green',\n nameComplete: 'Top Star Color Shirt Green',\n complementName: 'Tank top with star',\n ean: '4234234',\n referenceId: [\n {\n Key: 'RefId',\n Value: '8300134',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155528',\n imageLabel: 'green',\n imageTag:\n '<img src=\"~/arquivos/ids/155528-#width#-#height#/download--46-.png?v=636943152112800000\" width=\"#width#\" height=\"#height#\" alt=\"green\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155528/download--46-.png?v=636943152112800000',\n imageText: 'green',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000574&qty=1&seller=1&sc=1&price=4730&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 47.3,\n ListPrice: 47.3,\n PriceWithoutDiscount: 47.3,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 23.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 15.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 23.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 15.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 23.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 15.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 47.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 47.3,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Green'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '2000577',\n name: 'orange',\n nameComplete: 'Top Star Color Shirt orange',\n complementName: 'Tank top with star',\n ean: '',\n referenceId: [\n {\n Key: 'RefId',\n Value: '49444',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155531',\n imageLabel: 'orange',\n imageTag:\n '<img src=\"~/arquivos/ids/155531-#width#-#height#/download--49-.png?v=636943154698270000\" width=\"#width#\" height=\"#height#\" alt=\"orange\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155531/download--49-.png?v=636943154698270000',\n imageText: 'orange',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000577&qty=1&seller=1&sc=1&price=11930&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 119.3,\n ListPrice: 119.3,\n PriceWithoutDiscount: 119.3,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 59.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 39.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 4,\n Name: 'Visa 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 5,\n Name: 'Visa 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 19.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 6,\n Name: 'Visa 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 59.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 39.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 29.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 4,\n Name: 'Mastercard 4 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 23.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 5,\n Name: 'Mastercard 5 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 19.9,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 6,\n Name: 'Mastercard 6 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 59.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 39.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 119.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 119.3,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '310124162',\n name: 'Light Green',\n nameComplete: 'Top Star Color Shirt Light Green',\n complementName: 'Tank top with star',\n ean: '2342344',\n referenceId: [\n {\n Key: 'RefId',\n Value: '312322',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155588',\n imageLabel: 'Frente1',\n imageTag:\n '<img src=\"~/arquivos/ids/155588-#width#-#height#/Top-Star-Color-Shirt---Green.jpg?v=637088168561670000\" width=\"#width#\" height=\"#height#\" alt=\"Frente\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155588/Top-Star-Color-Shirt---Green.jpg?v=637088168561670000',\n imageText: 'Frente',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=310124162&qty=1&seller=1&sc=1&price=3340&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 33.4,\n ListPrice: 33.4,\n PriceWithoutDiscount: 33.4,\n RewardValue: 1,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 16.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 16.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 16.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.2,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 33.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 33.4,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Light green'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n {\n itemId: '310124168',\n name: 'Rose',\n nameComplete: 'Top Star Color Shirt Rose',\n complementName: 'Tank top with star',\n ean: '098776541234',\n referenceId: null,\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155606',\n imageLabel: 'Frente1',\n imageTag:\n '<img src=\"~/arquivos/ids/155606-#width#-#height#/Top-Star-Color-Shirt---pink.jpg?v=637098714058400000\" width=\"#width#\" height=\"#height#\" alt=\"Frente\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155606/Top-Star-Color-Shirt---pink.jpg?v=637098714058400000',\n imageText: 'Frente',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=310124168&qty=1&seller=1&sc=1&price=3080&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 30.8,\n ListPrice: 30.8,\n PriceWithoutDiscount: 30.8,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout:\n '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 15.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 10.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 15.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 10.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 15.4,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 10.3,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 30.8,\n InterestRate: 0,\n TotalValuePlusInterestRate: 30.8,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Rose'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [],\n __typename: 'SKU',\n },\n ],\n skuSpecifications: [\n {\n field: {\n name: 'Color',\n __typename: 'SKUSpecificationField',\n },\n values: [\n {\n name: 'White',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Green',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Light green',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Light blue',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Brown',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Red',\n __typename: 'SKUSpecificationValue',\n },\n {\n name: 'Rose',\n __typename: 'SKUSpecificationValue',\n },\n ],\n __typename: 'SkuSpecification',\n },\n ],\n itemMetadata: {\n items: [\n {\n id: '2000564',\n name: 'Top Star Color Shirt Red star',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n seller: '1',\n assemblyOptions: [\n {\n id: 'Customization',\n name: 'Customization',\n required: false,\n inputValues: [\n {\n label: 'Font',\n maxLength: null,\n type: 'OPTIONS',\n domain: ['Sans serif', 'Roman'],\n defaultValue: 'Sans serif',\n __typename: 'InputValue',\n },\n {\n label: 'Front text',\n maxLength: 200,\n type: 'TEXT',\n domain: null,\n defaultValue: '',\n __typename: 'InputValue',\n },\n {\n label: 'Back text',\n maxLength: 200,\n type: 'TEXT',\n domain: null,\n defaultValue: '',\n __typename: 'InputValue',\n },\n {\n label: 'Glossy print',\n maxLength: null,\n type: 'BOOLEAN',\n domain: null,\n defaultValue: true,\n __typename: 'InputValue',\n },\n ],\n composition: null,\n __typename: 'AssemblyOption',\n },\n ],\n __typename: 'ItemMetadataUnit',\n },\n {\n id: '2000570',\n name: 'Top Star Color Shirt White',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155524/download--43-.png?v=636943147443270000',\n seller: '1',\n assemblyOptions: [\n {\n id: 'Customization',\n name: 'Customization',\n required: false,\n inputValues: [\n {\n label: 'Font',\n maxLength: null,\n type: 'OPTIONS',\n domain: ['Sans serif', 'Roman'],\n defaultValue: 'Sans serif',\n __typename: 'InputValue',\n },\n {\n label: 'Front text',\n maxLength: 200,\n type: 'TEXT',\n domain: null,\n defaultValue: '',\n __typename: 'InputValue',\n },\n {\n label: 'Back text',\n maxLength: 200,\n type: 'TEXT',\n domain: null,\n defaultValue: '',\n __typename: 'InputValue',\n },\n {\n label: 'Glossy print',\n maxLength: null,\n type: 'BOOLEAN',\n domain: null,\n defaultValue: true,\n __typename: 'InputValue',\n },\n ],\n composition: null,\n __typename: 'AssemblyOption',\n },\n ],\n __typename: 'ItemMetadataUnit',\n },\n ],\n priceTable: [],\n __typename: 'ItemMetadata',\n },\n productClusters: [\n {\n id: '1167',\n name: 'Coleção Black Friday',\n __typename: 'ProductClusters',\n },\n {\n id: '1170',\n name: 'Collection name',\n __typename: 'ProductClusters',\n },\n {\n id: '1171',\n name: 'Coleção xpto',\n __typename: 'ProductClusters',\n },\n {\n id: '1288',\n name: 'ola',\n __typename: 'ProductClusters',\n },\n {\n id: '1599',\n name: 'kkkkkkk',\n __typename: 'ProductClusters',\n },\n ],\n clusterHighlights: [],\n __typename: 'Product',\n },\n selectedItem: {\n itemId: '2000564',\n name: 'Red star',\n nameComplete: 'Top Star Color Shirt Red star',\n complementName: 'Tank top with star',\n ean: '123456',\n referenceId: [\n {\n Key: 'RefId',\n Value: '987134',\n __typename: 'Reference',\n },\n ],\n measurementUnit: 'un',\n unitMultiplier: 1,\n images: [\n {\n imageId: '155518',\n imageLabel: 'red',\n imageTag:\n '<img src=\"~/arquivos/ids/155518-#width#-#height#/download--40-.png?v=636942495289870000\" width=\"#width#\" height=\"#height#\" alt=\"red\" id=\"\" />',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n imageText: 'red',\n __typename: 'Image',\n },\n ],\n videos: [],\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000564&qty=1&seller=1&sc=1&price=3500&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 35,\n ListPrice: 35,\n PriceWithoutDiscount: 35,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 3000000,\n Tax: 0,\n CacheVersionUsedToCallCheckout: '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n variations: [\n {\n name: 'Color',\n values: ['Red'],\n __typename: 'Property',\n },\n ],\n kitItems: [],\n attachments: [\n {\n id: '13',\n name: 'Customization',\n required: false,\n __typename: 'Attachment',\n },\n ],\n __typename: 'SKU',\n },\n selectedQuantity: 1,\n skuSelector: {\n selectedImageVariationSKU: null,\n isVisible: false,\n areAllVariationsSelected: true,\n },\n buyButton: {\n clicked: false,\n },\n assemblyOptions: {\n items: {},\n inputValues: {},\n areGroupsValid: {},\n },\n}\n\nexport const ProductOutOfStock = {\n ...StarColorTop,\n selectedItem: {\n ...StarColorTop.selectedItem,\n sellers: [\n {\n sellerId: '1',\n sellerName: 'VTEX',\n addToCartLink:\n 'https://portal.vtexcommercestable.com.br/checkout/cart/add?sku=2000564&qty=1&seller=1&sc=1&price=3500&cv=3b1ceb60967ce6e49aa5f247fcd32ea7_&sc=1',\n sellerDefault: true,\n commertialOffer: {\n discountHighlights: [],\n teasers: [],\n Price: 35,\n ListPrice: 35,\n PriceWithoutDiscount: 35,\n RewardValue: 0,\n PriceValidUntil: '2021-03-11T16:25:59Z',\n AvailableQuantity: 0,\n Tax: 0,\n CacheVersionUsedToCallCheckout: '3b1ceb60967ce6e49aa5f247fcd32ea7_',\n Installments: [\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'American Express à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Visa à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Visa 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Visa 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Mastercard à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Mastercard 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Mastercard 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Boleto Bancário à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Promissory à vista',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Customer Credit à vista',\n __typename: 'Installment',\n },\n {\n Value: 17.5,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 2,\n Name: 'Customer Credit 2 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 11.7,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 3,\n Name: 'Customer Credit 3 vezes sem juros',\n __typename: 'Installment',\n },\n {\n Value: 35,\n InterestRate: 0,\n TotalValuePlusInterestRate: 35,\n NumberOfInstallments: 1,\n Name: 'Free à vista',\n __typename: 'Installment',\n },\n ],\n __typename: 'Offer',\n },\n __typename: 'Seller',\n },\n ],\n },\n}\n\nexport const ProductWithInvalidAssemblies = {\n ...StarColorTop,\n assemblyOptions: {\n items: {},\n inputValues: {},\n areGroupsValid: {\n assemblyOne: false,\n assemblyTwo: true,\n },\n },\n}\n\n```" } ]
code_add-to-cart-button_e393f8c6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__fixtures__/runtime.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/**\n * This mock runtime does not include fields:\n * - blocks\n * - blocksTree\n * - cacheHints\n * - components\n * - contentMap\n * - emitter\n * - introspectionResult\n * - workspaceCookie\n *\n * The following fields are set to = {}\n * - extensions\n * - messages\n */\n\nexport const runtime = {\n account: 'storecomponents',\n accountId: 'eade3d41847e4226b1c4e2fa592bcfad',\n amp: false,\n appsEtag: 'remove',\n assetServerLinkedHost: 'storecomponents.myvtex.com',\n assetServerLinkedPath: '/_v/private/assets/v1/linked/',\n assetServerPublishedHost: 'storecomponents.vtexassets.com',\n assetServerPublishedPath: '/_v/public/assets/v1/published/',\n binding: {\n id: 'aacb06b3-a8fa-4bab-b5bd-2d654d20dcd8',\n canonicalBaseAddress: 'storetheme.vtex.com/',\n },\n bindingChanged: false,\n culture: {\n availableLocales: [],\n country: 'USA',\n currency: 'USD',\n language: 'en',\n locale: 'en-US',\n customCurrencyDecimalDigits: null,\n customCurrencySymbol: '$',\n },\n disableSSQ: false,\n disableSSR: false,\n exposeBindingAddress: false,\n extensions: {},\n hints: {\n desktop: true,\n mobile: false,\n phone: false,\n tablet: false,\n unknown: false,\n },\n messages: {},\n page: 'store.home',\n pages: {\n 'store.home': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/',\n routeId: 'store.home',\n blockId: 'vtex.store-theme@3.x:store.home',\n map: [],\n },\n 'store.account': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/account',\n routeId: 'store.account',\n blockId: 'vtex.store-theme@3.x:store.account',\n map: [],\n },\n 'store.login': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/login',\n routeId: 'store.login',\n blockId: 'vtex.store-theme@3.x:store.login',\n map: [],\n },\n 'store.product': {\n allowConditions: true,\n context: 'vtex.store@2.x/ProductContext',\n declarer: 'vtex.store@2.x',\n path: '/_v/segment/routing/vtex.store@2.x/product/:id/:slug/p',\n routeId: 'store.product',\n blockId: 'vtex.store-theme@3.x:store.product',\n canonical: '/:slug/p',\n map: [],\n },\n 'store.search': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path: '/:term/s',\n routeId: 'store.search',\n blockId: 'vtex.store-theme@3.x:store.search',\n canonical: '/:term',\n map: [],\n },\n 'store.search#brand': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path: '/_v/segment/routing/vtex.store@2.x/brand/:id/:brand(/*terms)',\n routeId: 'store.search#brand',\n blockId: 'vtex.store-theme@3.x:store.search#brand',\n canonical: '/:brand',\n map: ['b'],\n },\n 'store.search#department': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path:\n '/_v/segment/routing/vtex.store@2.x/department/:id/:department(/*terms)',\n routeId: 'store.search#department',\n blockId: 'vtex.store-theme@3.x:store.search#department',\n canonical: '/:department',\n map: ['c'],\n },\n 'store.search#category': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path:\n '/_v/segment/routing/vtex.store@2.x/category/:id/:department/:category(/*terms)',\n routeId: 'store.search#category',\n blockId: 'vtex.store-theme@3.x:store.search#category',\n canonical: '/:department/:category',\n map: ['c', 'c'],\n },\n 'store.search#subcategory': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path:\n '/_v/segment/routing/vtex.store@2.x/subcategory/:id/:department/:category/:subcategory(/*terms)',\n routeId: 'store.search#subcategory',\n blockId: 'vtex.store-theme@3.x:store.search#subcategory',\n canonical: '/:department/:category/:subcategory(/*terms)',\n map: ['c', 'c', 'c'],\n },\n 'store.search#configurable': {\n allowConditions: true,\n context: 'vtex.store@2.x/SearchContext',\n declarer: 'vtex.store@2.x',\n path: '/s/*terms',\n routeId: 'store.search#configurable',\n blockId: 'vtex.store-theme@3.x:store.search',\n map: [],\n },\n 'store.orderplaced': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/checkout/orderPlaced',\n routeId: 'store.orderplaced',\n blockId: 'vtex.store-theme@3.x:store.orderplaced',\n map: [],\n },\n 'store.offline': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/_v/offline',\n routeId: 'store.offline',\n blockId: 'vtex.store@2.x:store.offline',\n map: [],\n },\n 'store.not-found#product': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/_v/segment/routing/vtex.store@2.x/notFoundProduct/:id/:slug/p',\n routeId: 'store.not-found#product',\n blockId: 'vtex.store-theme@3.x:store.not-found#product',\n canonical: '/:slug/p',\n map: [],\n },\n 'store.not-found#search': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store@2.x',\n path: '/_v/segment/routing/vtex.store@2.x/notFoundSearch/:id/*terms',\n routeId: 'store.not-found#search',\n blockId: 'vtex.store-theme@3.x:store.not-found#search',\n canonical: '/*terms',\n map: [],\n },\n 'store.custom#about-us': {\n allowConditions: true,\n context: null,\n declarer: 'vtex.store-theme@3.x',\n path: '/about-us',\n routeId: 'store.custom#about-us',\n blockId: 'vtex.store-theme@3.x:store.custom#about-us',\n map: [],\n },\n 'vtex.store@2.x:store.custom#scheduled-page': {\n allowConditions: true,\n context: null,\n declarer: null,\n auth: false,\n path: '/scheduled-page',\n routeId: 'vtex.store@2.x:store.custom#scheduled-page',\n blockId: 'vtex.store@2.x:store.custom',\n map: [],\n },\n },\n platform: 'vtex',\n production: false,\n publicEndpoint: 'myvtex.com',\n query: {},\n renderMajor: 8,\n route: {\n domain: 'store',\n id: 'store.home',\n pageContext: {\n id: 'store.home',\n type: 'route',\n },\n params: {},\n path: '/',\n pathId: '/',\n queryString: {},\n fonts:\n '/_v/public/vtex.styles-graphql/v1/fonts/763084e2070c87d114459f42f07894b40143cfcc',\n overrides: [\n '/_v/public/vtex.styles-graphql/v1/overrides/vtex.product-list@0.19.0$overrides.css',\n '/_v/public/vtex.styles-graphql/v1/overrides/vtex.minicart@2.44.0$overrides.css',\n '/_v/public/vtex.styles-graphql/v1/overrides/vtex.store-theme@3.30.1$overrides.css',\n ],\n rootName: 'store.home',\n ssr: true,\n style:\n '/_v/public/vtex.styles-graphql/v1/style/vtex.store-theme@3.21.2$style.min.css',\n styleMeta: {\n fontsHash: '763084e2070c87d114459f42f07894b40143cfcc',\n overridesIds: [\n {\n id: 'vtex.product-list@0.19.0$overrides.css',\n },\n {\n id: 'vtex.minicart@2.44.0$overrides.css',\n },\n {\n id: 'vtex.store-theme@3.30.1$overrides.css',\n },\n ],\n themeId: 'vtex.store-theme@3.21.2$style.min.css',\n },\n blockId: 'vtex.store-theme@3.x:store.home',\n canonicalPath: '/',\n metaTags: null,\n routeId: 'store.home',\n title: null,\n varyContentById: false,\n },\n runtimeMeta: {\n config: null,\n version: '8.95.1',\n },\n segmentToken: '12345abcde',\n settings: {\n 'vtex.store': {\n storeName: 'Store Theme - VTEX Base Store',\n titleTag: 'Store Theme - VTEX Base Store',\n metaTagDescription: 'Store Theme - VTEX Base Store',\n metaTagKeywords: 'store theme, vtex, store, vtex io, base store, vtex',\n },\n },\n start: true,\n workspace: 'addtocartbutton',\n}\n\n```" } ]
code_add-to-cart-button_390412b6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__fixtures__/session.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const sessionWithEmptyPublicFields = {\n id: '1a2b3c4d-a12b-12a3-123a-ab123cd4efg5',\n namespaces: {\n account: {\n id: {\n value: '1a2b3c4d-a12b-12a3-123a-ab123cd4efg5',\n keepAlive: true,\n },\n accountName: {\n value: 'storecomponents',\n },\n },\n store: {\n channel: {\n value: '1',\n },\n countryCode: {\n value: 'USA',\n },\n cultureInfo: {\n value: 'en-US',\n },\n currencyCode: {\n value: 'USD',\n },\n currencySymbol: {\n value: '$',\n },\n admin_cultureInfo: {\n value: 'en-US',\n },\n },\n public: {},\n creditControl: {\n creditAccounts: {\n value: {\n accounts: [],\n },\n },\n deadlines: {\n value: {\n deadlines: [],\n },\n },\n minimumInstallmentValue: {\n value: 0,\n },\n },\n authentication: {},\n profile: {\n isAuthenticated: {\n value: 'false',\n },\n },\n },\n}\n\nexport const sessionWithOnlyUtmiFields = {\n ...sessionWithEmptyPublicFields,\n namespaces: {\n ...sessionWithEmptyPublicFields.namespaces,\n public: {\n utmi_cp: { value: 'test_utmi_field' },\n utmi_p: { value: 'test_utmi_field' },\n utmi_pc: { value: 'test_utmi_field' },\n },\n },\n}\n\nexport const sessionWithOnlyUtmFields = {\n ...sessionWithEmptyPublicFields,\n namespaces: {\n ...sessionWithEmptyPublicFields.namespaces,\n public: {\n utm_source: { value: 'test_utm_field' },\n utm_medium: { value: 'test_utm_field' },\n utm_campaign: { value: 'test_utm_field' },\n },\n },\n}\n\nexport const sessionWithAllMarketingFields = {\n ...sessionWithEmptyPublicFields,\n namespaces: {\n ...sessionWithEmptyPublicFields.namespaces,\n public: {\n utm_source: { value: 'test_utm_field' },\n utm_medium: { value: 'test_utm_field' },\n utm_campaign: { value: 'test_utm_field' },\n utmi_cp: { value: 'test_utmi_field' },\n utmi_p: { value: 'test_utmi_field' },\n utmi_pc: { value: 'test_utmi_field' },\n },\n },\n}\n\n```" } ]
code_add-to-cart-button_0d6040d7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__fixtures__/render8Session.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport function mockedRenderSession(session?: any) {\n return {\n __RENDER_8_SESSION__: {\n sessionPromise: new Promise((resolve, reject) => {\n process.nextTick(() => {\n session || session === null\n ? resolve({ response: session })\n : reject('could not find session info')\n })\n }),\n },\n }\n}\n\n```" } ]
code_add-to-cart-button_141da06e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__fixtures__/assemblyOptions.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { AssemblyOptions } from '../modules/assemblyOptions'\n\nexport const customBell: AssemblyOptions = {\n items: {\n 'add-on_Add-on': [\n {\n name: 'Bells add-ons Logo small',\n id: '2000588',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 75,\n choiceType: 'TOGGLE',\n children: null,\n },\n {\n name: 'Bells add-ons Logo big',\n id: '2000589',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 90,\n choiceType: 'TOGGLE',\n children: null,\n },\n {\n name: 'Bells add-ons Plaque',\n id: '2000590',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 60,\n choiceType: 'TOGGLE',\n children: null,\n },\n ],\n 'text_style_Text Style': [\n {\n name: 'Bells add-ons Roman',\n id: '2000591',\n initialQuantity: 1,\n quantity: 0,\n seller: '1',\n price: 0,\n choiceType: 'SINGLE',\n children: null,\n },\n {\n name: 'Bells add-ons Script',\n id: '2000592',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 15,\n choiceType: 'SINGLE',\n children: null,\n },\n ],\n engraving_Engraving: [\n {\n name: 'Bells add-ons 1-3 lines',\n id: '2000586',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 26,\n choiceType: 'SINGLE',\n children: {\n '1-3-lines': [],\n },\n },\n {\n name: 'Bells add-ons 4 lines',\n id: '2000587',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 30,\n choiceType: 'SINGLE',\n children: {\n '4-lines': [],\n },\n },\n ],\n },\n inputValues: {\n '1-3-lines': {\n 'Line 1': 'First line',\n 'Line 2': 'Second line',\n 'Line 3': 'Third line',\n },\n },\n areGroupsValid: {\n 'add-on_Add-on': true,\n 'text_style_Text Style': true,\n engraving_Engraving: true,\n },\n}\n\nexport const starColor = {\n items: {\n Customization: [],\n },\n inputValues: {\n Customization: {\n Font: 'Sans serif',\n 'Front text': 'Frente',\n 'Back text': 'Verso',\n 'Glossy print': true,\n },\n },\n areGroupsValid: {\n Customization: true,\n },\n}\n\nexport const comboPizza: AssemblyOptions = {\n items: {\n 'pizza_composition_Pizza flavor': [\n {\n name: 'Pizza Monster promo',\n id: '5101',\n initialQuantity: 1,\n quantity: 1,\n seller: '1',\n price: 0,\n choiceType: 'SINGLE',\n children: {\n pizza_extra_ingredients_Extra: [\n {\n name: 'Ingredients bacon',\n id: '602',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Ingredients herb',\n id: '603',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Ingredients mushroom',\n id: '605',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Ingredients onion',\n id: '606',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Ingredients pepper',\n id: '607',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Ingredients tomato',\n id: '609',\n initialQuantity: 0,\n quantity: 1,\n seller: '1',\n price: 1,\n choiceType: 'MULTIPLE',\n children: null,\n },\n ],\n pizza_basic_ingredients_pizza_basic_ingredients: [\n {\n name: 'Ingredients bacon',\n id: '602',\n initialQuantity: 1,\n quantity: 0,\n seller: '1',\n price: 0,\n choiceType: 'TOGGLE',\n children: null,\n },\n {\n name: 'Ingredients onion',\n id: '606',\n initialQuantity: 1,\n quantity: 1,\n seller: '1',\n price: 0,\n choiceType: 'TOGGLE',\n children: null,\n },\n {\n name: 'Ingredients tomato',\n id: '609',\n initialQuantity: 1,\n quantity: 1,\n seller: '1',\n price: 0,\n choiceType: 'TOGGLE',\n children: null,\n },\n ],\n },\n },\n ],\n 'drinks_size_double_Choose 2 drinks': [\n {\n name: 'Cola 600ml',\n id: '110',\n initialQuantity: 2,\n quantity: 1,\n seller: '1',\n price: 0,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Cola diet 600ml',\n id: '120',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 0,\n choiceType: 'MULTIPLE',\n children: null,\n },\n {\n name: 'Orange Juice 600ml',\n id: '180',\n initialQuantity: 0,\n quantity: 0,\n seller: '1',\n price: 3,\n choiceType: 'MULTIPLE',\n children: null,\n },\n ],\n },\n inputValues: {},\n areGroupsValid: {\n 'pizza_composition_Pizza flavor': true,\n 'drinks_size_double_Choose 2 drinks': false,\n },\n}\n\n```" } ]
code_add-to-cart-button_92d6f6af
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/typings/vtex.shipping-option-components.d.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.shipping-option-components'\ndeclare module 'vtex.shipping-option-components/ShippingOptionContext' {\n export type ShippingMethod = 'delivery' | 'pickup-in-point'\n\n export function useShippingOptionState(): {\n shippingOption?: ShippingMethod\n }\n}\n\n```" } ]
code_add-to-cart-button_e0062361
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/typings/vtex.order-manager.d.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.order-manager'\ndeclare module 'vtex.order-manager/*'\n\n```" } ]
code_add-to-cart-button_a8ecebd9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/typings/vtex.order-items.d.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.order-items'\ndeclare module 'vtex.order-items/*'\n\n```" } ]
code_add-to-cart-button_7698283a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__tests__/hooks.test.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { renderHook, act } from '@vtex/test-tools/react'\nimport wait from 'waait'\n\nimport useMarketingSessionParams from '../hooks/useMarketingSessionParams'\nimport { mockedRenderSession } from '../__fixtures__/render8Session'\nimport {\n sessionWithEmptyPublicFields,\n sessionWithOnlyUtmiFields,\n sessionWithOnlyUtmFields,\n sessionWithAllMarketingFields,\n} from '../__fixtures__/session'\n\ndescribe('useMarketingSessionParams', () => {\n const originalWindow = { ...window }\n let windowSpy: jest.SpyInstance\n\n beforeEach(() => {\n windowSpy = jest.spyOn(global as NodeJS.Global & Window, 'window', 'get')\n })\n afterEach(() => windowSpy.mockRestore())\n\n it('should return empty utmParams and utmiParams if no publicFields are found in sessionPromise', async () => {\n windowSpy.mockImplementation(() => ({\n ...originalWindow,\n ...mockedRenderSession(sessionWithEmptyPublicFields),\n }))\n\n const { result } = renderHook(() => useMarketingSessionParams())\n\n await act(async () => {\n await wait(1)\n })\n\n expect(result.current).toEqual({ utmParams: {}, utmiParams: {} })\n })\n\n it('should return empty objects if sessionPromise is nullish', async () => {\n windowSpy.mockImplementation(() => ({\n ...originalWindow,\n ...mockedRenderSession(null),\n }))\n\n const { result } = renderHook(() => useMarketingSessionParams())\n\n await act(async () => {\n await wait(1)\n })\n\n expect(result.current).toEqual({ utmParams: {}, utmiParams: {} })\n })\n\n it('should return empty strings for utmParams if there are no utm fields', async () => {\n windowSpy.mockImplementation(() => ({\n ...originalWindow,\n ...mockedRenderSession(sessionWithOnlyUtmiFields),\n }))\n\n const { result } = renderHook(() => useMarketingSessionParams())\n\n await act(async () => {\n await wait(1)\n })\n\n expect(result.current).toEqual({\n utmParams: {\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n },\n utmiParams: {\n utmiCampaign: 'test_utmi_field',\n utmiPage: 'test_utmi_field',\n utmiPart: 'test_utmi_field',\n },\n })\n })\n\n it('should return empty utmiParams if there are no utmi fields', async () => {\n windowSpy.mockImplementation(() => ({\n ...originalWindow,\n ...mockedRenderSession(sessionWithOnlyUtmFields),\n }))\n\n const { result } = renderHook(() => useMarketingSessionParams())\n\n await act(async () => {\n await wait(1)\n })\n\n expect(result.current).toEqual({\n utmParams: {\n utmSource: 'test_utm_field',\n utmMedium: 'test_utm_field',\n utmCampaign: 'test_utm_field',\n },\n utmiParams: {\n utmiCampaign: '',\n utmiPage: '',\n utmiPart: '',\n },\n })\n })\n\n it('should correctly return all utm and utmi parameters', async () => {\n windowSpy.mockImplementation(() => ({\n ...originalWindow,\n ...mockedRenderSession(sessionWithAllMarketingFields),\n }))\n\n const { result } = renderHook(() => useMarketingSessionParams())\n\n await act(async () => {\n await wait(1)\n })\n\n expect(result.current).toEqual({\n utmParams: {\n utmSource: 'test_utm_field',\n utmMedium: 'test_utm_field',\n utmCampaign: 'test_utm_field',\n },\n utmiParams: {\n utmiCampaign: 'test_utmi_field',\n utmiPage: 'test_utmi_field',\n utmiPart: 'test_utmi_field',\n },\n })\n })\n})\n\n```" } ]
code_add-to-cart-button_cddd3341
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__tests__/CSSHandles.test.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render } from '@vtex/test-tools/react'\n\nimport { findCSSHandles } from '../modules/testUtils'\nimport AddToCartButton from '../AddToCartButton'\n\nconst CSS_HANDLES_API = [\n 'buttonText',\n 'buttonDataContainer',\n 'tooltipLabelText',\n]\n\n/**\n * It is not good practice to test the CSS and it goes against\n * the philosophy behind react-testing-library, but it is useful in our\n * case because our CSS handles are a public API.\n */\ndescribe('CSS handles API', () => {\n it('should have all expected CSS handles', () => {\n const { container } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available\n disabled={false}\n skuItems={[]}\n customToastUrl={''}\n showToast={() => {}}\n allSkuVariationsSelected={false}\n />\n )\n\n const foundHandles = findCSSHandles(container, CSS_HANDLES_API)\n expect(foundHandles).toEqual(CSS_HANDLES_API)\n })\n})\n\n```" } ]
code_add-to-cart-button_ff932634
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__tests__/modules.test.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { compareObjects } from '../modules/compareObjects'\nimport { StarColorTop } from '../__fixtures__/productContext'\nimport {\n customBell,\n comboPizza,\n starColor,\n} from '../__fixtures__/assemblyOptions'\nimport {\n sumAssembliesPrice,\n transformAssemblyOptions,\n ItemOption,\n} from '../modules/assemblyOptions'\nimport { mapCatalogItemToCart } from '../modules/catalogItemToCart'\n\ndescribe('compareObjects module', () => {\n const obj1 = {\n key1: 'a',\n key2: {\n keyInsideKey: 'a',\n anotherKeyInsideAKey: 'b',\n },\n key3: 'c',\n key4: 'd',\n key5: 'e',\n }\n\n const obj2 = {\n key1: 'a',\n key2: {\n keyInsideKey: 'a',\n anotherKeyInsideAKey: 'b',\n },\n key3: 'c',\n key4: 'd',\n key5: 'e',\n }\n\n const obj3 = {\n key1: 'a',\n key2: {\n keyInsideKey: 'something different',\n anotherKeyInsideAKey: 'something different',\n },\n key3: 'c',\n key4: 'd',\n key5: 'e',\n }\n\n const obj4 = {\n key1: 'a',\n key2: 'a',\n }\n\n it('should return true for distinct objects with the same keys and values', () => {\n expect(compareObjects(obj1, obj2)).toBeTruthy()\n })\n it('should return true for the exact same object', () => {\n expect(compareObjects(obj1, obj1)).toBeTruthy()\n })\n it('should return false for objects with same keys but different values', () => {\n expect(compareObjects(obj1, obj3)).toBeFalsy()\n })\n it('should return false for objects with different keys', () => {\n expect(compareObjects(obj1, obj4)).toBeFalsy()\n })\n})\n\ndescribe('assemblyOptions module', () => {\n describe('sumAssembliesPrice function', () => {\n it('should return the correct total price for a set of assembly items', () => {\n const totalPriceFromCustomBellAssemblies = 75 + 90 + 15 + 26\n expect(sumAssembliesPrice(customBell.items as any)).toBe(\n totalPriceFromCustomBellAssemblies\n )\n })\n it('should return 0 if there are no assemblies for item', () => {\n expect(sumAssembliesPrice(starColor.items)).toBe(0)\n })\n })\n\n describe('transformAssemblyOptions function', () => {\n it('should transform assemblyOptions', () => {\n const parentPrice = 450\n const parentQuantity = 1\n\n const resultBell = transformAssemblyOptions({\n assemblyOptionsItems: customBell.items,\n inputValues: {},\n parentPrice,\n parentQuantity,\n })\n\n expect(resultBell.options).toHaveLength(7)\n const addonOption = resultBell.options[0] as ItemOption\n expect(addonOption.assemblyId).toBe('add-on_Add-on')\n expect(addonOption.id).toBe('2000588')\n expect(addonOption.quantity).toBe(1)\n expect(addonOption.seller).toBe('1')\n\n const resultPizza = transformAssemblyOptions({\n assemblyOptionsItems: comboPizza.items,\n inputValues: {},\n parentPrice,\n parentQuantity,\n })\n\n expect(resultPizza.options).toHaveLength(4)\n const pizzaOption = resultPizza.options[0] as ItemOption\n expect(pizzaOption.assemblyId).toBe('pizza_composition_Pizza flavor')\n expect(pizzaOption.id).toBe('5101')\n expect(pizzaOption.quantity).toBe(1)\n expect(pizzaOption.seller).toBe('1')\n expect(pizzaOption.options).toHaveLength(9)\n\n const drinksOptions = resultPizza.options[1] as ItemOption\n expect(drinksOptions.options).toBeUndefined()\n })\n\n it('input values', () => {\n const parentPrice = 450\n const parentQuantity = 1\n\n const resultStar = transformAssemblyOptions({\n assemblyOptionsItems: starColor.items,\n inputValues: starColor.inputValues,\n parentPrice,\n parentQuantity,\n })\n\n expect(resultStar.options).toHaveLength(1)\n const customization = resultStar.options[0] as ItemOption\n expect(customization.assemblyId).toBe('Customization')\n expect(customization.inputValues).toMatchObject({\n Font: 'Sans serif',\n 'Front text': 'Frente',\n 'Back text': 'Verso',\n 'Glossy print': true,\n })\n expect(resultStar).toMatchInlineSnapshot(`\n Object {\n \"assemblyOptions\": Object {\n \"added\": Array [],\n \"parentPrice\": 450,\n \"removed\": Array [],\n },\n \"options\": Array [\n Object {\n \"assemblyId\": \"Customization\",\n \"inputValues\": Object {\n \"Back text\": \"Verso\",\n \"Font\": \"Sans serif\",\n \"Front text\": \"Frente\",\n \"Glossy print\": true,\n },\n },\n ],\n }\n `)\n })\n\n it('recursive input values', () => {\n const parentPrice = 450\n const parentQuantity = 1\n\n const resultBell = transformAssemblyOptions({\n assemblyOptionsItems: customBell.items,\n inputValues: customBell.inputValues,\n parentPrice,\n parentQuantity,\n })\n\n expect(resultBell.options).toHaveLength(7)\n\n const engraving = resultBell.options[5] as ItemOption\n expect(engraving.options).toHaveLength(1)\n\n const recursiveInputValue = engraving.options![0] as ItemOption\n expect(recursiveInputValue.assemblyId).toBe('1-3-lines')\n expect(recursiveInputValue.inputValues).toBe(\n customBell.inputValues['1-3-lines']\n )\n expect(resultBell).toMatchInlineSnapshot(`\n Object {\n \"assemblyOptions\": Object {\n \"added\": Array [\n Object {\n \"choiceType\": \"TOGGLE\",\n \"extraQuantity\": 1,\n \"item\": Object {\n \"id\": \"2000588\",\n \"name\": \"Bells add-ons Logo small\",\n \"quantity\": 1,\n \"sellingPrice\": 75,\n \"sellingPriceWithAssemblies\": 75,\n },\n \"normalizedQuantity\": 1,\n },\n Object {\n \"choiceType\": \"TOGGLE\",\n \"extraQuantity\": 1,\n \"item\": Object {\n \"id\": \"2000589\",\n \"name\": \"Bells add-ons Logo big\",\n \"quantity\": 1,\n \"sellingPrice\": 90,\n \"sellingPriceWithAssemblies\": 90,\n },\n \"normalizedQuantity\": 1,\n },\n Object {\n \"choiceType\": \"SINGLE\",\n \"extraQuantity\": 1,\n \"item\": Object {\n \"id\": \"2000592\",\n \"name\": \"Bells add-ons Script\",\n \"quantity\": 1,\n \"sellingPrice\": 15,\n \"sellingPriceWithAssemblies\": 15,\n },\n \"normalizedQuantity\": 1,\n },\n Object {\n \"choiceType\": \"SINGLE\",\n \"extraQuantity\": 1,\n \"item\": Object {\n \"assemblyOptions\": Object {\n \"added\": Array [],\n \"parentPrice\": 26,\n \"removed\": Array [],\n },\n \"id\": \"2000586\",\n \"name\": \"Bells add-ons 1-3 lines\",\n \"quantity\": 1,\n \"sellingPrice\": 26,\n \"sellingPriceWithAssemblies\": 26,\n },\n \"normalizedQuantity\": 1,\n },\n ],\n \"parentPrice\": 450,\n \"removed\": Array [],\n },\n \"options\": Array [\n Object {\n \"assemblyId\": \"add-on_Add-on\",\n \"id\": \"2000588\",\n \"quantity\": 1,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"add-on_Add-on\",\n \"id\": \"2000589\",\n \"quantity\": 1,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"add-on_Add-on\",\n \"id\": \"2000590\",\n \"quantity\": 0,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"text_style_Text Style\",\n \"id\": \"2000591\",\n \"quantity\": 0,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"text_style_Text Style\",\n \"id\": \"2000592\",\n \"quantity\": 1,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"engraving_Engraving\",\n \"id\": \"2000586\",\n \"options\": Array [\n Object {\n \"assemblyId\": \"1-3-lines\",\n \"inputValues\": Object {\n \"Line 1\": \"First line\",\n \"Line 2\": \"Second line\",\n \"Line 3\": \"Third line\",\n },\n },\n ],\n \"quantity\": 1,\n \"seller\": \"1\",\n },\n Object {\n \"assemblyId\": \"engraving_Engraving\",\n \"id\": \"2000587\",\n \"quantity\": 0,\n \"seller\": \"1\",\n },\n ],\n }\n `)\n })\n\n it('empty input values should result in empty options', () => {\n const parentPrice = 450\n const parentQuantity = 1\n\n const resultStar = transformAssemblyOptions({\n assemblyOptionsItems: starColor.items,\n inputValues: {\n Customization: {},\n },\n parentPrice,\n parentQuantity,\n })\n expect(resultStar.options).toHaveLength(0)\n })\n })\n})\n\ndescribe('catalogToCart module', () => {\n it('should return [] if there are missing arguments', () => {\n expect(mapCatalogItemToCart({} as any)).toStrictEqual([])\n })\n it('should return expected skuItem for the minicart', () => {\n const { product } = StarColorTop\n const { selectedItem } = StarColorTop\n const { assemblyOptions } = StarColorTop\n const [selectedSeller] = StarColorTop.selectedItem.sellers\n const selectedQuantity =\n StarColorTop.selectedQuantity != null ? StarColorTop.selectedQuantity : 1\n\n const expectedOutput = [\n {\n index: 0,\n id: '2000564',\n ean: '123456',\n productId: '2000024',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/star-color-top/p',\n name: 'Top Star Color Shirt',\n brand: 'Kawasaki',\n category: '/Apparel & Accessories/Clothing/Tops/',\n productRefId: '998765',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Red star',\n skuName: 'Red star',\n price: 3500,\n listPrice: 3500,\n sellingPrice: 3500,\n sellingPriceWithAssemblies: 3500,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n options: [],\n assemblyOptions: {\n added: [],\n parentPrice: 35,\n removed: [],\n },\n referenceId: [\n { Key: 'RefId', Value: '987134', __typename: 'Reference' },\n ],\n },\n ]\n\n expect(\n mapCatalogItemToCart({\n product: product as any,\n selectedItem,\n selectedQuantity,\n selectedSeller,\n assemblyOptions,\n })\n ).toStrictEqual(expectedOutput)\n })\n})\n\n```" } ]
code_add-to-cart-button_1a9cca4f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__tests__/AddToCartButton.test.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render, cleanup, act, fireEvent } from '@vtex/test-tools/react'\n\nimport AddToCartButton from '../AddToCartButton'\n\nconst mockSKUItems = [\n {\n index: 0,\n id: '2000564',\n productId: '2000024',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/star-color-top/p',\n name: 'Top Star Color Shirt',\n brand: 'Kawasaki',\n category: '/Apparel & Accessories/Clothing/Tops/',\n productRefId: '998765',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Red star',\n skuName: 'Red star',\n price: 3500,\n listPrice: 3500,\n sellingPrice: 3500,\n sellingPriceWithAssemblies: 3500,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n options: [],\n assemblyOptions: {\n added: [],\n parentPrice: 35,\n removed: [],\n },\n referenceId: [{ Key: 'Reference', Value: 'red star' }],\n },\n {\n id: '2000535',\n productId: '2000004',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/st-tropez-shorts/p',\n name: 'St Tropez Top Shorts',\n brand: 'Samsung',\n category: '/Apparel & Accessories/Clothing/Bottoms/',\n productRefId: '01212',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Navy Blue',\n skuName: 'Navy Blue',\n price: 303000,\n listPrice: 303000,\n sellingPrice: 303000,\n sellingPriceWithAssemblies: 303000,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155488-500-auto?width=500&height=auto&aspect=true',\n options: [],\n assemblyOptions: { added: [], removed: [], parentPrice: 3030 },\n referenceId: null,\n },\n]\n\nconst mockMarketingData = {\n utmSource: 'testing utmSource',\n utmMedium: 'testing utmMedium',\n utmCampaign: 'testing utmCampaign',\n utmiCampaign: 'testing utmiCampaign',\n utmiPage: 'testing utmiPage',\n utmiPart: 'testing utmiPart',\n}\n\nconst mockProductLink = {\n linkText: 'mock-product',\n productId: '2000024',\n}\n\nconst mockAllowedOutdatedData = {\n allowedOutdatedData: ['paymentData'],\n}\n\nconst mockAddItem = jest.fn()\nconst mockPixelEventPush = jest.fn()\nconst mockNavigate = jest.fn()\nconst mockUseShippingOptionState = jest.fn()\n\njest.mock('../hooks/useMarketingSessionParams', () => {\n return () => ({\n utmParams: {\n utmSource: mockMarketingData.utmSource,\n utmMedium: mockMarketingData.utmMedium,\n utmCampaign: mockMarketingData.utmCampaign,\n },\n utmiParams: {\n utmiCampaign: mockMarketingData.utmiCampaign,\n utmiPage: mockMarketingData.utmiPage,\n utmiPart: mockMarketingData.utmiPart,\n },\n })\n})\n\njest.mock('vtex.order-items/OrderItems', () => ({\n useOrderItems: () => ({\n addItems: mockAddItem,\n }),\n}))\n\njest.mock('vtex.pixel-manager', () => ({\n usePixel: () => ({ push: mockPixelEventPush }),\n}))\n\njest.mock('vtex.render-runtime', () => ({\n useRuntime: () => ({\n rootPath: '',\n navigate: mockNavigate,\n }),\n}))\n\njest.mock('vtex.shipping-option-components/ShippingOptionContext', () => ({\n useShippingOptionState: () => ({\n shippingOption: undefined,\n }),\n}))\n\nafterEach(() => {\n mockAddItem.mockClear()\n mockPixelEventPush.mockClear()\n mockNavigate.mockClear()\n cleanup()\n})\n\ndescribe('AddToCartButton component', () => {\n it('should render correct message for unavailable button', () => {\n const { queryByText } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n expect(queryByText('Unavailable')).toBeTruthy()\n })\n\n it('should render correct message for available item', () => {\n const { queryByText } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n expect(queryByText('Add to Cart')).toBeTruthy()\n })\n\n it('should render tooltip with correct message when not all SKU variations are selected', () => {\n const { queryByTestId, queryByText } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected={false}\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const tooltip = queryByTestId('Tooltip')\n const label = queryByText('Please select an option for each variation')\n\n expect(tooltip).toBeTruthy()\n expect(label).toBeTruthy()\n })\n\n it('should not render with tooltip if all SKU variations are selected', () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n expect(queryByTestId('Tooltip')).toBeNull()\n })\n\n it('should pass correct skuItem object to addItem when user clicks on it', () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toBeCalledWith(mockSKUItems, {\n marketingData: mockMarketingData,\n ...mockAllowedOutdatedData,\n })\n })\n\n it('should pass correct marketing data info to addItem function', () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toBeCalledWith(mockSKUItems, {\n marketingData: mockMarketingData,\n ...mockAllowedOutdatedData,\n })\n })\n\n it('should sent correct information about SKU items to pixel event', () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n const expectedPixelEvent = {\n event: 'addToCart',\n items: [\n {\n skuId: '2000564',\n variant: 'Red star',\n price: 3500,\n sellingPrice: 3500,\n priceIsInt: true,\n ean: undefined,\n name: 'Top Star Color Shirt',\n quantity: 1,\n productId: '2000024',\n productRefId: '998765',\n brand: 'Kawasaki',\n category: 'Apparel & Accessories/Clothing/Tops',\n detailUrl: '/star-color-top/p',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n referenceId: 'red star',\n seller: '1',\n sellerName: 'VTEX',\n },\n {\n skuId: '2000535',\n variant: 'Navy Blue',\n price: 303000,\n sellingPrice: 303000,\n priceIsInt: true,\n ean: undefined,\n name: 'St Tropez Top Shorts',\n quantity: 1,\n productId: '2000004',\n productRefId: '01212',\n brand: 'Samsung',\n category: 'Apparel & Accessories/Clothing/Bottoms',\n detailUrl: '/st-tropez-shorts/p',\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155488-500-auto?width=500&height=auto&aspect=true',\n referenceId: undefined,\n seller: '1',\n sellerName: 'VTEX',\n },\n ],\n }\n\n expect(mockPixelEventPush).toBeCalledWith(expectedPixelEvent)\n })\n\n it('should not add item to the cart if not all SKU variations are selected', () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected={false}\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toHaveBeenCalledTimes(0)\n })\n\n it(\"should navigate to product page if onClickBehavior is set to 'go-to-product-page'\", () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy={false}\n available\n customOneClickBuyLink=\"\"\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"go-to-product-page\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toHaveBeenCalledTimes(0)\n expect(mockNavigate).toHaveBeenCalledWith({\n page: 'store.product',\n params: {\n slug: 'mock-product',\n id: '2000024',\n },\n })\n })\n\n it(\"should navigate to product page if onClickBehavior is set to 'ensure-sku-selection' and product has multiple SKUs\", () => {\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy={false}\n available\n customOneClickBuyLink=\"\"\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"ensure-sku-selection\"\n multipleAvailableSKUs\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toHaveBeenCalledTimes(0)\n expect(mockNavigate).toHaveBeenCalledWith({\n page: 'store.product',\n params: {\n slug: 'mock-product',\n id: '2000024',\n },\n })\n })\n\n it(\"should send an 'item-added-to-cart-shipping-modal' event if onClickBehavior is set to 'add-to-cart-and-trigger-shipping-modal' and there is no 'shippingOption' selected\", () => {\n mockUseShippingOptionState.mockImplementation(() => ({\n shippingOption: undefined,\n }))\n\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy={false}\n available\n customOneClickBuyLink=\"\"\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart-and-trigger-shipping-modal\"\n multipleAvailableSKUs\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toHaveBeenCalledTimes(0)\n expect(mockNavigate).toHaveBeenCalledTimes(0)\n\n const expectedPixelEvent = {\n id: 'item-added-to-cart-shipping-modal',\n addToCartInfo: {\n skuItems: [\n {\n index: 0,\n id: '2000564',\n productId: '2000024',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/star-color-top/p',\n name: 'Top Star Color Shirt',\n brand: 'Kawasaki',\n category: '/Apparel & Accessories/Clothing/Tops/',\n productRefId: '998765',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Red star',\n skuName: 'Red star',\n price: 3500,\n listPrice: 3500,\n sellingPrice: 3500,\n sellingPriceWithAssemblies: 3500,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n options: [],\n assemblyOptions: { added: [], parentPrice: 35, removed: [] },\n referenceId: [{ Key: 'Reference', Value: 'red star' }],\n },\n {\n id: '2000535',\n productId: '2000004',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/st-tropez-shorts/p',\n name: 'St Tropez Top Shorts',\n brand: 'Samsung',\n category: '/Apparel & Accessories/Clothing/Bottoms/',\n productRefId: '01212',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Navy Blue',\n skuName: 'Navy Blue',\n price: 303000,\n listPrice: 303000,\n sellingPrice: 303000,\n sellingPriceWithAssemblies: 303000,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155488-500-auto?width=500&height=auto&aspect=true',\n options: [],\n assemblyOptions: { added: [], removed: [], parentPrice: 3030 },\n referenceId: null,\n },\n ],\n options: {\n marketingData: {\n utmSource: 'testing utmSource',\n utmMedium: 'testing utmMedium',\n utmCampaign: 'testing utmCampaign',\n utmiCampaign: 'testing utmiCampaign',\n utmiPage: 'testing utmiPage',\n utmiPart: 'testing utmiPart',\n },\n allowedOutdatedData: ['paymentData'],\n },\n },\n }\n\n expect(mockPixelEventPush).toBeCalledWith(expectedPixelEvent)\n })\n\n it(\"should add to cart normally if onClickBehavior is set to 'add-to-cart-and-trigger-shipping-modal' and there is a 'shippingOption' selected\", () => {\n mockUseShippingOptionState.mockImplementation(() => ({\n shippingOption: 'delivery',\n }))\n\n const { queryByTestId } = render(\n <AddToCartButton\n isOneClickBuy\n customOneClickBuyLink=\"\"\n available={false}\n disabled={false}\n skuItems={mockSKUItems}\n customToastUrl=\"\"\n showToast={() => {}}\n allSkuVariationsSelected\n productLink={mockProductLink}\n onClickBehavior=\"add-to-cart\"\n multipleAvailableSKUs={false}\n />\n )\n\n const button = queryByTestId('styleguide-button')\n\n expect(button).toBeTruthy()\n\n act(() => {\n if (button) {\n fireEvent.click(button)\n }\n })\n\n expect(mockAddItem).toBeCalledWith(mockSKUItems, {\n marketingData: mockMarketingData,\n ...mockAllowedOutdatedData,\n })\n })\n})\n\n```" } ]
code_add-to-cart-button_ff9c3bc3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/__tests__/Wrapper.test.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { cleanup } from '@vtex/test-tools/react'\n\nimport Wrapper from '../Wrapper'\nimport AddToCartButton from '../AddToCartButton'\nimport { renderWithProductContext } from '../modules/testUtils'\nimport {\n StarColorTop,\n ProductOutOfStock,\n ProductWithInvalidAssemblies,\n} from '../__fixtures__/productContext'\n\njest.mock('../AddToCartButton.tsx', () => ({\n __esModule: true,\n namedExport: jest.fn(),\n default: jest.fn(),\n}))\n\nconst MockAddToCartButton = jest.fn(() => {\n return <button>Add to Cart</button>\n})\n\nbeforeAll(() => {\n ;(AddToCartButton as typeof AddToCartButton & {\n mockImplementation: Function\n }).mockImplementation(MockAddToCartButton)\n})\n\nafterEach(() => {\n cleanup()\n MockAddToCartButton.mockClear()\n})\n\ndescribe('Wrapper component', () => {\n it('should pass all props received via blocks.json to AddToCart button correctly', () => {\n renderWithProductContext(\n <Wrapper\n isOneClickBuy={false}\n customToastUrl=\"customToastUrl\"\n customOneClickBuyLink=\"customOneClickBuyLink\"\n />,\n {}\n )\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n isOneClickBuy: false,\n customToastUrl: 'customToastUrl',\n customOneClickBuyLink: 'customOneClickBuyLink',\n }),\n {}\n )\n })\n\n it('should not crash if productContext is empty', () => {\n const { container } = renderWithProductContext(\n <Wrapper\n isOneClickBuy={false}\n customToastUrl=\"customToastUrl\"\n customOneClickBuyLink=\"customOneClickBuyLink\"\n />,\n {}\n )\n\n expect(container.children).toBeDefined()\n })\n\n it('should evaluate isAvailable to false if product is out of stock', () => {\n renderWithProductContext(<Wrapper />, ProductOutOfStock)\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n available: false,\n }),\n {}\n )\n })\n\n it('should evaluate isAvailable to false when productContext is empty', () => {\n renderWithProductContext(<Wrapper />, {})\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n available: false,\n }),\n {}\n )\n })\n\n it(\"should evaluate isAvailable to true when product's available quantity is greater than 0\", () => {\n renderWithProductContext(<Wrapper />, StarColorTop)\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n available: true,\n }),\n {}\n )\n })\n\n it('should evaluate isDisabled to true when product has invalid assembly options', () => {\n renderWithProductContext(<Wrapper />, ProductWithInvalidAssemblies)\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n disabled: true,\n }),\n {}\n )\n })\n\n it('should evaluate isDisabled to false when product does not have invalid assembly options', () => {\n renderWithProductContext(<Wrapper />, StarColorTop)\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n disabled: false,\n }),\n {}\n )\n })\n\n it('should pass correct skuItems to AddToCartButton', () => {\n renderWithProductContext(<Wrapper />, StarColorTop)\n\n const expectedSkuItems = [\n {\n index: 0,\n id: '2000564',\n ean: '123456',\n productId: '2000024',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/star-color-top/p',\n name: 'Top Star Color Shirt',\n brand: 'Kawasaki',\n category: '/Apparel & Accessories/Clothing/Tops/',\n productRefId: '998765',\n seller: '1',\n sellerName: 'VTEX',\n variant: 'Red star',\n skuName: 'Red star',\n price: 3500,\n listPrice: 3500,\n sellingPrice: 3500,\n sellingPriceWithAssemblies: 3500,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n options: [],\n assemblyOptions: {\n added: [],\n parentPrice: 35,\n removed: [],\n },\n referenceId: [\n { Key: 'RefId', Value: '987134', __typename: 'Reference' },\n ],\n },\n ]\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n skuItems: expectedSkuItems,\n }),\n {}\n )\n })\n\n it('should pass correct skuItems received from props to AddToCartButton', () => {\n const mockSKUItems = [\n {\n index: 0,\n id: '2000564',\n productId: '2000024',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/star-color-top/p',\n name: 'Top Star Color Shirt',\n brand: 'Kawasaki',\n category: '/Apparel & Accessories/Clothing/Tops/',\n productRefId: '998765',\n seller: '1',\n variant: 'Red star',\n skuName: 'Red star',\n price: 3500,\n listPrice: 3500,\n sellingPrice: 3500,\n sellingPriceWithAssemblies: 3500,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155518/download--40-.png?v=636942495289870000',\n options: [],\n assemblyOptions: {\n added: [],\n parentPrice: 35,\n removed: [],\n },\n referenceId: [{ Key: 'Reference', Value: 'red star' }],\n },\n {\n id: '2000535',\n productId: '2000004',\n quantity: 1,\n uniqueId: '',\n detailUrl: '/st-tropez-shorts/p',\n name: 'St Tropez Top Shorts',\n brand: 'Samsung',\n category: '/Apparel & Accessories/Clothing/Bottoms/',\n productRefId: '01212',\n seller: '1',\n variant: 'Navy Blue',\n skuName: 'Navy Blue',\n price: 303000,\n listPrice: 303000,\n sellingPrice: 303000,\n sellingPriceWithAssemblies: 303000,\n measurementUnit: 'un',\n skuSpecifications: [],\n imageUrl:\n 'https://storecomponents.vtexassets.com/arquivos/ids/155488-500-auto?width=500&height=auto&aspect=true',\n options: [],\n assemblyOptions: { added: [], removed: [], parentPrice: 3030 },\n referenceId: { Value: '' },\n },\n ]\n\n renderWithProductContext(<Wrapper skuItems={mockSKUItems} />, {})\n\n expect(MockAddToCartButton).toBeCalledWith(\n expect.objectContaining({\n skuItems: mockSKUItems,\n }),\n {}\n )\n })\n})\n\n```" } ]
code_add-to-cart-button_ca1c22f7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/hooks/useMarketingSessionParams.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { useEffect, useState } from 'react'\n\ntype PublicSessionField =\n | 'utm_source'\n | 'utm_medium'\n | 'utm_campaign'\n | 'utmi_cp'\n | 'utmi_p'\n | 'utmi_pc'\n\ninterface SessionPromiseFieldValue {\n value: string\n}\n\ninterface UtmParams {\n utmSource?: string\n utmMedium?: string\n utmCampaign?: string\n}\n\ninterface UtmiParams {\n utmiCampaign?: string\n utmiPage?: string\n utmiPart?: string\n}\n\ninterface SessionPromiseResponse {\n response?: {\n id: string\n namespaces?: {\n account: {\n id: SessionPromiseFieldValue & { keepAlive: boolean }\n accountName: SessionPromiseFieldValue\n }\n store: {\n channel: SessionPromiseFieldValue\n countryCode: SessionPromiseFieldValue\n cultureInfo: SessionPromiseFieldValue\n currencyCode: SessionPromiseFieldValue\n currencySymbol: SessionPromiseFieldValue\n admin_cultureInfo: SessionPromiseFieldValue\n }\n public: Record<PublicSessionField, SessionPromiseFieldValue>\n creditControl: Record<string, SessionPromiseFieldValue>\n authentication: Record<string, any>\n profile: {\n isAuthenticated: SessionPromiseFieldValue\n }\n }\n }\n}\n\nconst getUtmParams = (\n publicFields: Record<PublicSessionField, SessionPromiseFieldValue>\n) => ({\n utmSource: publicFields.utm_source?.value ?? '',\n utmMedium: publicFields.utm_medium?.value ?? '',\n utmCampaign: publicFields.utm_campaign?.value ?? '',\n})\n\nconst getUtmiParams = (\n publicFields: Record<PublicSessionField, SessionPromiseFieldValue>\n) => ({\n utmiPage: publicFields.utmi_p?.value ?? '',\n utmiPart: publicFields.utmi_pc?.value ?? '',\n utmiCampaign: publicFields.utmi_cp?.value ?? '',\n})\n\nconst getSessionPromiseFromWindow = () => {\n const runtimeSessionPromise = (window as Window & {\n ['__RENDER_8_SESSION__']?: {\n sessionPromise?: Promise<SessionPromiseResponse>\n }\n }).__RENDER_8_SESSION__?.sessionPromise\n\n return runtimeSessionPromise\n}\n\nconst useMarketingSessionParams = () => {\n const [utmParams, setUtmParams] = useState<UtmParams>({})\n const [utmiParams, setUtmiParams] = useState<UtmiParams>({})\n\n useEffect(() => {\n getSessionPromiseFromWindow()\n ?.then(data => {\n const publicFields = data?.response?.namespaces?.public ?? {}\n if (Object.keys(publicFields).length === 0) {\n return\n }\n\n setUtmParams(\n getUtmParams(\n publicFields as Record<PublicSessionField, SessionPromiseFieldValue>\n )\n )\n setUtmiParams(\n getUtmiParams(\n publicFields as Record<PublicSessionField, SessionPromiseFieldValue>\n )\n )\n })\n .catch(() => {\n // Do nothing\n })\n }, [])\n\n return { utmParams, utmiParams }\n}\n\nexport default useMarketingSessionParams\n\n```" } ]
code_add-to-cart-button_66814ba0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/modules/testUtils.tsx from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { ReactElement } from 'react'\nimport { render } from '@vtex/test-tools/react'\n\nimport { ProductContextProvider } from '../__mocks__/vtex.product-context'\n\nexport function renderWithProductContext(Component: ReactElement, value: any) {\n return render(\n <ProductContextProvider value={value}>{Component}</ProductContextProvider>\n )\n}\n\nexport function findCSSHandles(container: HTMLElement, handles: string[]) {\n const foundNodes = handles\n .map(handle => {\n const foundNodesInner = container.getElementsByClassName(handle)\n return foundNodesInner.length > 0 ? handle : ''\n })\n .filter(result => result !== '')\n\n return foundNodes\n}\n\n```" } ]
code_add-to-cart-button_4a800cfc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/modules/compareObjects.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/* eslint-disable eqeqeq */\nexport function compareObjects(\n obj1: Record<string, any>,\n obj2: Record<string, any>\n) {\n // Loop through properties in object 1\n for (const p in obj1) {\n // Check property exists on both objects\n if (\n Object.prototype.hasOwnProperty.call(obj1, 'p') !==\n Object.prototype.hasOwnProperty.call(obj2, 'p')\n )\n return false\n\n switch (typeof obj1[p]) {\n // Deep compare objects\n case 'object':\n if (!compareObjects(obj1[p], obj2[p])) return false\n break\n // Compare function code\n case 'function':\n if (\n typeof obj2[p] === 'undefined' ||\n (p != 'compare' && obj1[p].toString() != obj2[p].toString())\n )\n return false\n break\n // Compare values\n default:\n if (obj1[p] != obj2[p]) return false\n }\n }\n\n // Check object 2 for any extra properties\n for (const p in obj2) {\n if (typeof obj1[p] === 'undefined') return false\n }\n return true\n}\n\n```" } ]
code_add-to-cart-button_aa03a234
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/modules/catalogItemToCart.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { ProductTypes } from 'vtex.product-context'\n\nimport {\n transformAssemblyOptions,\n sumAssembliesPrice,\n ParsedAssemblyOptionsMeta,\n Option,\n} from './assemblyOptions'\n\ninterface SKUSpecification {\n fieldName: string\n fieldValues: string[]\n}\n\nexport interface CartItem {\n detailUrl: string\n id: string\n ean: string\n imageUrl: string\n index?: number\n listPrice: number\n measurementUnit: string\n name: string\n price: number\n productId: string\n quantity: number\n seller: string\n sellerName: string\n sellingPrice: number\n productRefId: string\n brand: string\n variant: string\n category: string\n skuName: string\n skuSpecifications: SKUSpecification[]\n uniqueId: string\n sellingPriceWithAssemblies: number\n options: Option[]\n assemblyOptions: ParsedAssemblyOptionsMeta\n referenceId: Array<{\n Key: string\n Value: string\n }> | null\n}\n\ninterface MapCatalogItemToCartArgs {\n product?: ProductTypes.ProductContextState['product']\n selectedItem: ProductTypes.ProductContextState['selectedItem']\n selectedQuantity: ProductTypes.ProductContextState['selectedQuantity']\n selectedSeller?: ProductTypes.Seller\n assemblyOptions?: ProductTypes.ProductContextState['assemblyOptions']\n}\n\nexport function mapCatalogItemToCart({\n product,\n selectedItem,\n selectedQuantity,\n selectedSeller,\n assemblyOptions,\n}: MapCatalogItemToCartArgs): CartItem[] {\n if (\n !product ||\n !selectedItem ||\n !selectedSeller ||\n !selectedSeller.commertialOffer\n ) {\n return []\n }\n\n return [\n {\n index: 0,\n id: selectedItem.itemId,\n ean: selectedItem.ean,\n productId: product.productId ?? '',\n quantity: selectedQuantity,\n uniqueId: '',\n detailUrl: `/${product.linkText}/p`,\n name: product.productName ?? '',\n brand: product.brand ?? '',\n category:\n product.categories && product.categories.length > 0\n ? product.categories[0]\n : '',\n productRefId: product.productReference ?? '',\n seller: selectedSeller.sellerId,\n sellerName: selectedSeller.sellerName,\n variant: selectedItem.name,\n skuName: selectedItem.name,\n price: selectedSeller.commertialOffer.PriceWithoutDiscount * 100,\n listPrice: selectedSeller.commertialOffer.ListPrice * 100,\n sellingPrice: selectedSeller.commertialOffer.Price * 100,\n sellingPriceWithAssemblies:\n ((selectedSeller.commertialOffer.Price as number) +\n sumAssembliesPrice(assemblyOptions?.items ?? {})) *\n 100,\n measurementUnit: selectedItem.measurementUnit,\n skuSpecifications: [],\n imageUrl: selectedItem.images[0]?.imageUrl,\n ...transformAssemblyOptions({\n assemblyOptionsItems: assemblyOptions?.items,\n inputValues: assemblyOptions?.inputValues,\n parentPrice: selectedSeller.commertialOffer.Price,\n parentQuantity: selectedQuantity,\n }),\n referenceId: selectedItem.referenceId,\n },\n ]\n}\n\n```" } ]
code_add-to-cart-button_220e8963
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of add-to-cart-button/react/modules/assemblyOptions.ts from the add-to-cart-button VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { ProductTypes } from 'vtex.product-context'\n\ntype GroupId = string\ntype GroupTypes = 'SINGLE' | 'TOGGLE' | 'MULTIPLE'\n\ntype InputValue = Record<string, string | boolean>\n\nexport interface AssemblyOptions {\n items: Record<GroupId, ProductTypes.AssemblyOptionItem[]>\n inputValues: Record<GroupId, InputValue>\n areGroupsValid: Record<string, boolean>\n}\n\nexport type Option = ItemOption\n\nexport interface ItemOption {\n assemblyId: string\n id?: string\n quantity?: number\n seller?: string\n options?: Option[]\n inputValues?: InputValue\n}\n\ninterface AddedItem {\n id: string\n name: string\n quantity: number\n sellingPrice: number\n sellingPriceWithAssemblies: number\n assemblyOptions?: ParsedAssemblyOptionsMeta\n}\n\ninterface CartAddedOption {\n normalizedQuantity: number\n extraQuantity: number\n choiceType: GroupTypes\n item: AddedItem\n}\n\ninterface CartRemovedOption {\n name: string\n initialQuantity: number\n removedQuantity: number\n}\n\nexport interface ParsedAssemblyOptionsMeta {\n added: CartAddedOption[]\n removed: CartRemovedOption[]\n parentPrice: number\n}\n\ninterface ParsedAssemblyOptions {\n options: Option[]\n assemblyOptions: ParsedAssemblyOptionsMeta\n}\n\ninterface TransformAssemblyOptionsArgs {\n assemblyOptionsItems?: Record<GroupId, ProductTypes.AssemblyOptionItem[]>\n inputValues?: Record<GroupId, InputValue>\n parentPrice: number\n parentQuantity: number\n}\n\nexport function sumAssembliesPrice(\n assemblyOptions: Record<GroupId, ProductTypes.AssemblyOptionItem[]>\n): number {\n const cleanAssemblies = assemblyOptions || {}\n const assembliesGroupItems = Object.values(cleanAssemblies)\n return assembliesGroupItems.reduce((sum, groupItems) => {\n const groupPrice = groupItems.reduce<number>((groupSum, item) => {\n const childrenPrice: number = item.children\n ? sumAssembliesPrice(item.children)\n : 0\n const itemCost = item.price * item.quantity\n return groupSum + itemCost + childrenPrice * item.quantity\n }, 0)\n return groupPrice + sum\n }, 0)\n}\n\nexport function transformAssemblyOptions({\n assemblyOptionsItems = {},\n inputValues = {},\n parentPrice,\n parentQuantity,\n}: TransformAssemblyOptionsArgs): ParsedAssemblyOptions {\n // contains options sent as arguments to graphql mutation\n const options: Option[] = []\n\n // array with added assemblies data to show in minicart optimistic preview\n const added: CartAddedOption[] = []\n\n // array with removed assemblies data to show in minicart optimistic preview\n const removed: CartRemovedOption[] = []\n\n let assemblyInputValuesKeys: GroupId[] = Object.keys(inputValues)\n\n const assemblyItemsKeys: GroupId[] = Object.keys(assemblyOptionsItems)\n\n for (const groupId of assemblyItemsKeys) {\n const items = assemblyOptionsItems[groupId]\n for (const item of items) {\n let childrenAddedData = null\n\n if (item.children) {\n const childInputValues: Record<GroupId, InputValue> = {}\n for (const key in item.children) {\n childInputValues[key] = inputValues[key]\n }\n const handledInputValues = Object.keys(childInputValues)\n assemblyInputValuesKeys = assemblyInputValuesKeys.filter(\n inputValueKey => handledInputValues.includes(inputValueKey)\n )\n\n childrenAddedData = transformAssemblyOptions({\n assemblyOptionsItems: item.children,\n inputValues: childInputValues,\n parentPrice: item.price,\n parentQuantity: item.quantity * parentQuantity,\n })\n }\n\n const {\n options: childrenOptions,\n assemblyOptions: childrenAssemblyOptions,\n } = childrenAddedData ?? {\n options: undefined,\n assemblyOptions: undefined,\n }\n\n const { quantity, initialQuantity } = item\n\n if (quantity >= initialQuantity && quantity > 0) {\n added.push({\n normalizedQuantity: quantity,\n extraQuantity: quantity - initialQuantity,\n choiceType: item.choiceType as GroupTypes,\n item: {\n name: item.name,\n sellingPrice: item.price,\n quantity,\n sellingPriceWithAssemblies:\n (item.price as number) + sumAssembliesPrice(item.children ?? {}),\n id: item.id,\n ...(childrenAssemblyOptions\n ? { assemblyOptions: childrenAssemblyOptions }\n : {}),\n },\n })\n }\n\n if (quantity < initialQuantity && item.choiceType === 'TOGGLE') {\n removed.push({\n name: item.name,\n initialQuantity,\n removedQuantity: initialQuantity - quantity,\n })\n }\n\n // push all items to options array regardless of quantity\n // this solves KI 743529\n options.push({\n assemblyId: groupId,\n id: item.id,\n quantity: quantity * parentQuantity,\n seller: item.seller,\n ...(childrenOptions && childrenOptions.length > 0\n ? { options: childrenOptions }\n : {}),\n })\n }\n }\n\n for (const groupId of assemblyInputValuesKeys) {\n const inputValuesObject = inputValues[groupId] || {}\n if (Object.keys(inputValuesObject).length > 0) {\n options.push({\n assemblyId: groupId,\n inputValues: inputValues[groupId],\n })\n }\n }\n\n return {\n options,\n assemblyOptions: {\n added,\n removed,\n parentPrice,\n },\n }\n}\n\n```" } ]
code_smarthint_88f15ca1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of smarthint/docs/README.md from the smarthint VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# smarthint\n\nVTEX SmartHint first-party app\n\n## How to install\n\nOpen the VTEX App Store and install this app on your store.\n\nNow, open the app settings on your admin and fill in the your SmartHint key.\n```" } ]
code_voxus_f2f5fe2b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/docs/README.md from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Voxus\n\nThrough data processing and segmentation algorithms, Voxus displays banners for people who are likely to convert to portals and applications.\nFor more information please visit, [voxus](https://www.voxus.com.br/) website.\n\n## App Installation\nOpen the VTEX APP Store and install the voxus app on your store.\n\nor\n\nRun the following command:\n\n```sh\nvtex install vtex.voxus@0.x\n```\n\nNow, open the app settings on your admin and fill in the Voxus options.\n```" } ]
code_voxus_74165073
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/react/index.tsx from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { canUseDOM } from 'vtex.render-runtime'\nimport { PixelMessage } from './typings/events'\n\nexport function handleEvents(e: PixelMessage) {\n switch (e.data.eventName) {\n case 'vtex:pageView': {\n\n }\n default: {\n return\n }\n }\n}\n\nif (canUseDOM) {\n window.addEventListener('message', handleEvents)\n}\n\n```" } ]
code_voxus_8853929f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/react/package.json from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"ramda\": \"^0.26.1\"\n },\n \"devDependencies\": {\n \"@types/graphql\": \"^14.2.0\",\n \"@types/jest\": \"^24.0.11\",\n \"@types/node\": \"^11.13.0\",\n \"@types/ramda\": \"^0.26.5\",\n \"@vtex/test-tools\": \"^1.1.0\",\n \"eslint\": \"^5.16.0\",\n \"eslint-config-vtex-react\": \"^4.1.0\",\n \"prettier\": \"^1.18.2\",\n \"tslint-eslint-rules\": \"^5.4.0\",\n \"typescript\": \"3.5.2\"\n },\n \"version\": \"0.0.2\"\n}\n\n```" } ]
code_voxus_67b3bf63
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/store/interfaces.json from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"pixel.voxus\": {\n \"component\": \"index\"\n }\n}\n\n```" } ]
code_voxus_f17b2e3b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/react/typings/events.d.ts from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport interface PixelMessage extends MessageEvent {\n data:\n | ProductViewData\n | ProductClickData\n | OrderPlacedData\n | PageViewData\n | ProductImpressionData\n | AddToCartData\n | RemoveToCartData\n}\n\nexport interface EventData {\n event: string\n eventName: string\n currency: string\n}\n\nexport interface PageViewData extends EventData {\n event: 'pageView'\n eventName: 'vtex:pageView'\n pageTitle: string\n pageUrl: string\n referrer: string\n}\n\nexport interface AddToCartData extends EventData {\n event: 'addToCart'\n eventName: 'vtex:addToCart'\n items: CartItem[]\n}\n\nexport interface RemoveToCartData extends EventData {\n event: 'removeFromCart'\n eventName: 'vtex:removeFromCart'\n items: CartItem[]\n}\n\nexport interface OrderPlacedData extends Order, EventData {\n event: 'orderPlaced'\n eventName: 'vtex:orderPlaced'\n}\n\nexport interface ProductViewData extends EventData {\n event: 'productView'\n eventName: 'vtex:productView'\n product: Product\n}\n\nexport interface ProductClickData extends EventData {\n event: 'productClick'\n eventName: 'vtex:productClick'\n product: Product\n}\n\nexport interface ProductImpressionData extends EventData {\n event: 'productImpression'\n eventName: 'vtex:productImpression'\n impressions: Impression[]\n product?: Product // deprecated, use impressions list!\n position?: number // deprecated, use impressions list!\n list: string\n}\n\ninterface CartItem {\n skuId: string\n variant: string\n price: number\n name: string\n quantity: number\n productRefId: string\n brand: string\n category: string\n}\n\nexport interface Order {\n currency: string\n accountName: string\n orderGroup: string\n salesChannel: string\n coupon: string\n visitorType: string\n visitorContactInfo: string[]\n visitorAddressState: string\n visitorAddressCountry: string\n visitorAddressPostalCode: string\n transactionId: string\n transactionDate: string\n transactionAffiliation: string\n transactionTotal: number\n transactionShipping: number\n transactionSubtotal: number\n transactionDiscounts: number\n transactionTax: number\n transactionCurrency: string\n transactionPaymentType: PaymentType[]\n transactionShippingMethod: ShippingMethod[]\n transactionProducts: ProductOrder[]\n transactionPayment: {\n id: string\n }\n}\n\nexport interface Impression {\n product: Product\n position: number\n}\n\ninterface PaymentType {\n group: string\n paymentSystemName: string\n installments: number\n value: number\n}\n\ninterface ShippingMethod {\n itemId: string\n selectedSla: string\n}\n\ninterface ProductOrder {\n id: string\n name: string\n sku: string\n skuRefId: string\n skuName: string\n productRefId: string\n ean: string\n slug: string\n brand: string\n brandId: string\n seller: string\n sellerId: string\n category: string\n categoryId: string\n categoryTree: string[]\n categoryIdTree: string[]\n priceTags: PriceTag[]\n originalPrice: number\n price: number\n sellingPrice: number\n tax: number\n quantity: number\n components: any[]\n measurementUnit: string\n unitMultiplier: number\n}\n\ninterface PriceTag {\n identifier: string\n isPercentual: boolean\n value: number\n}\n\ninterface Product {\n brand: string\n categoryId?: string // inconsistency\n categories: string[]\n productId: string\n productName: string\n selectedSku?: string // inconsistency\n items: Item[]\n sku: Item\n [key: string]: any\n}\n\ninterface Item {\n itemId: string\n name: string\n seller?: Seller\n [key: string]: any\n}\n\ninterface Seller {\n commertialOffer: CommertialOffer\n [key: string]: any\n}\n\ninterface CommertialOffer {\n Price: number\n [key: string]: any\n}\n\n```" } ]
code_voxus_88ec06b3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/react/typings/vtex.render-runtime.d.ts from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.render-runtime' {\n export const canUseDOM: boolean\n}\n\n```" } ]
code_voxus_099713ab
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of voxus/react/typings/global.d.ts from the voxus VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ninterface Window extends Window {\n dataLayer: any[]\n}\n\n```" } ]
code_order-coupon_f5f2be8c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/docs/README.md from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Order Coupon\n\n> Centralizes all coupon related requests to the Checkout API.\n\nAny kind of coupon query or manipulation should be made through this component. This ensures that each interaction with the Checkout API happens in succession, avoiding concurrency issues.\n\n```" } ]
code_order-coupon_3117e4b2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/OrderCoupon.tsx from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { createContext, ReactNode, useContext, useCallback } from 'react'\nimport { compose, graphql } from 'react-apollo'\nimport {\n QueueStatus,\n useOrderQueue,\n useQueueStatus,\n} from 'vtex.order-manager/OrderQueue'\nimport { useOrderForm } from 'vtex.order-manager/OrderForm'\n\nimport InsertCoupon from 'vtex.checkout-resources/MutationInsertCoupon'\n\ninterface InsertCouponResult {\n success: boolean\n errorKey: string\n}\n\ninterface Context {\n insertCoupon: (coupon: string) => Promise<InsertCouponResult>\n}\n\ninterface OrderCouponProviderProps {\n children: ReactNode\n InsertCoupon: any\n}\n\nconst couponKey = 'coupon'\nconst TASK_CANCELLED = 'TASK_CANCELLED'\n\nconst OrderCouponContext = createContext<Context | undefined>(undefined)\n\nexport const OrderCouponProvider = compose(\n graphql(InsertCoupon, { name: 'InsertCoupon' })\n)(({ children, InsertCoupon }: OrderCouponProviderProps) => {\n const { enqueue, listen } = useOrderQueue()\n const { setOrderForm } = useOrderForm()\n\n const queueStatusRef = useQueueStatus(listen)\n\n const insertCoupon = useCallback(\n async (coupon: string) => {\n const task = async () => {\n const {\n data: { insertCoupon: newOrderForm },\n } = await InsertCoupon({\n variables: {\n text: coupon,\n },\n })\n\n return newOrderForm\n }\n\n try {\n const newOrderForm = await enqueue(task, couponKey)\n let errorKey = ''\n if (queueStatusRef.current === QueueStatus.FULFILLED) {\n setOrderForm(newOrderForm)\n }\n\n if (newOrderForm.messages.couponMessages.length) {\n const [couponMessage] = newOrderForm.messages.couponMessages\n errorKey = couponMessage.code\n }\n\n return {\n success: !!(\n newOrderForm.marketingData && newOrderForm.marketingData.coupon\n ),\n errorKey,\n }\n } catch (error) {\n if (!error || error.code !== TASK_CANCELLED) {\n throw error\n }\n return { success: false, errorKey: '' }\n }\n },\n [InsertCoupon, enqueue, queueStatusRef, setOrderForm]\n )\n\n return (\n <OrderCouponContext.Provider\n value={{\n insertCoupon,\n }}\n >\n {children}\n </OrderCouponContext.Provider>\n )\n})\n\nexport const useOrderCoupon = () => {\n const context = useContext(OrderCouponContext)\n if (context === undefined) {\n throw new Error('useOrderCoupon must be used within a OrderCouponProvider')\n }\n\n return context\n}\n\nexport default { OrderCouponProvider, useOrderCoupon }\n\n```" } ]
code_order-coupon_21a3bee0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/package.json from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"test\": \"vtex-test-tools test\",\n \"lint\": \"tsc --noEmit && eslint --ext ts,tsx .\"\n },\n \"dependencies\": {\n \"@vtex/css-handles\": \"^1.0.0\",\n \"classnames\": \"^2.2.6\",\n \"ramda\": \"^0.26.1\",\n \"react\": \"^16.8.3\",\n \"react-dom\": \"^16.8.3\",\n \"react-intl\": \"^2.7.2\"\n },\n \"devDependencies\": {\n \"@apollo/react-testing\": \"^3.1.3\",\n \"@types/classnames\": \"^2.2.7\",\n \"@types/graphql\": \"^14.2.0\",\n \"@types/jest\": \"^24.0.11\",\n \"@types/node\": \"^11.13.0\",\n \"@types/prop-types\": \"^15.7.0\",\n \"@types/ramda\": \"^0.26.5\",\n \"@types/react\": \"^16.8.10\",\n \"@types/react-intl\": \"^2.3.17\",\n \"@vtex/test-tools\": \"^1.1.0\",\n \"apollo-client\": \"^2.5.1\",\n \"eslint\": \"^5.16.0\",\n \"eslint-config-vtex-react\": \"^4.1.0\",\n \"prettier\": \"^1.18.2\",\n \"tslint-eslint-rules\": \"^5.4.0\",\n \"typescript\": \"3.7.3\",\n \"vtex.render-runtime\": \"http://vtex.vteximg.com.br/_v/public/typings/v1/vtex.render-runtime@8.91.2/public/@types/vtex.render-runtime\",\n \"vtex.checkout-resources\": \"http://vtex.vteximg.com.br/_v/public/typings/v1/vtex.checkout-resources@0.18.0/public/@types/vtex.checkout-resources\",\n \"vtex.order-manager\": \"http://vtex.vteximg.com.br/_v/public/typings/v1/vtex.order-manager@0.7.1/public/@types/vtex.order-manager\"\n },\n \"version\": \"0.7.2\"\n}\n\n```" } ]
code_order-coupon_b75e28f0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/storefront.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { FunctionComponent } from 'react'\n\ndeclare global {\n interface StorefrontFunctionComponent<P = {}> extends FunctionComponent<P> {\n getSchema?(props: P): object\n schema?: object\n }\n\n interface StorefrontComponent<P = {}, S = {}> extends Component<P, S> {\n getSchema?(props: P): object\n schema: object\n }\n}\n\n```" } ]
code_order-coupon_9e5e2dec
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/globals.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ninterface OrderForm {\n items: Item[]\n marketingData: MarketingData | null\n totalizers: Totalizer[]\n value: number\n messages: OrderFormMessages\n}\n\ninterface Item {\n additionalInfo: ItemAdditionalInfo\n detailUrl: string\n id: string\n imageUrl: string\n listPrice: number\n measurementUnit: string\n name: string\n price: number\n productId: string\n quantity: number\n sellingPrice: number\n skuName: string\n skuSpecifications: SKUSpecification[]\n}\n\ninterface ItemAdditionalInfo {\n brandName: string\n}\n\ninterface MarketingData {\n coupon: string\n}\n\ninterface SKUSpecification {\n fieldName: string\n fieldValues: string[]\n}\n\ninterface Totalizer {\n id: string\n name: string\n value: number\n}\n\ninterface OrderFormMessages {\n couponMessages: Message[]\n}\n\ninterface Message {\n code: string\n status: string\n text: string\n}\n\n```" } ]
code_order-coupon_8fa139e0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/vtex.render-runtime.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/* Typings for `render-runtime` */\ndeclare module 'vtex.render-runtime' {\n import { Component, ComponentType, ReactElement, ReactType } from 'react'\n\n export interface NavigationOptions {\n page: string\n params?: any\n }\n\n export interface RenderContextProps {\n runtime: {\n navigate: (options: NavigationOptions) => void\n }\n }\n\n interface ExtensionPointProps {\n id: string\n [key: string]: any\n }\n\n export const ExtensionPoint: ComponentType<ExtensionPointProps>\n\n interface ChildBlockProps {\n id: string\n }\n\n export const ChildBlock: ComponentType<ChildBlockProps>\n export const useChildBlock = function({ id: string }): object {}\n\n export const Helmet: ReactElement\n export const Link: ReactType\n export const NoSSR: ReactElement\n export const RenderContextConsumer: ReactElement\n export const canUseDOM: boolean\n export const withRuntimeContext: <TOriginalProps extends {}>(\n Component: ComponentType<TOriginalProps & RenderContextProps>\n ) => ComponentType<TOriginalProps>\n}\n\n```" } ]
code_order-coupon_c0abf571
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/vtex.checkout-resources.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.checkout-resources/*' {\n import { DocumentNode } from 'graphql'\n\n const value: DocumentNode\n export default value\n}\n\n```" } ]
code_order-coupon_c179b484
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/css.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.css' {\n const css: any\n export default css\n}\n\n```" } ]
code_order-coupon_141b8670
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/vtex.order-manager.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.order-manager/OrderForm'\ndeclare module 'vtex.order-manager/OrderQueue'\n\n```" } ]
code_order-coupon_48acd268
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/graphql.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.graphql' {\n import { DocumentNode } from 'graphql'\n\n const value: DocumentNode\n export default value\n}\n\n```" } ]
code_order-coupon_baa6265d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/typings/vtex.styleguide.d.ts from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.styleguide' {\n import { ComponentType } from 'react'\n\n export const Input: ComponentType<InputProps>\n\n interface InputProps {\n [key: string]: any\n }\n}\n\n```" } ]
code_order-coupon_6846a397
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-coupon/react/__tests__/OrderCoupon.test.tsx from the order-coupon VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FunctionComponent } from 'react'\nimport { act, fireEvent, render } from '@vtex/test-tools/react'\n\nimport InsertCoupon from 'vtex.checkout-resources/MutationInsertCoupon'\nimport { OrderFormProvider, useOrderForm } from 'vtex.order-manager/OrderForm'\nimport { OrderQueueProvider } from 'vtex.order-manager/OrderQueue'\nimport { OrderCouponProvider, useOrderCoupon } from '../OrderCoupon'\nimport { mockOrderForm } from '../__mocks__/mockOrderForm'\n\nconst mockedMarketingData = {\n coupon: 'newCoupon',\n}\n\nconst mockInsertCouponMutation = (args: string, result: MarketingData) => ({\n request: {\n query: InsertCoupon,\n variables: {\n text: args,\n },\n },\n result: {\n data: {\n insertCoupon: {\n ...mockOrderForm,\n marketingData: result,\n },\n },\n },\n})\n\ndescribe('OrderCoupon', () => {\n it('should throw when useOrderCoupon is used outside a OrderCouponProvider', () => {\n const oldConsoleError = console.error\n console.error = () => {}\n const Component: FunctionComponent = () => {\n useOrderCoupon()\n return <div>foo</div>\n }\n\n expect(() => render(<Component />)).toThrow(\n 'useOrderCoupon must be used within a OrderCouponProvider'\n )\n\n console.error = oldConsoleError\n })\n\n it('should insert a coupon', async () => {\n const Component: FunctionComponent = () => {\n const {\n orderForm: {\n marketingData: { coupon },\n },\n } = useOrderForm()\n const { insertCoupon } = useOrderCoupon()\n\n return (\n <div>\n {coupon}\n <button onClick={() => insertCoupon('newCoupon')}>mutate</button>\n </div>\n )\n }\n\n const mockInsertCoupon = mockInsertCouponMutation(\n 'newCoupon',\n mockedMarketingData\n )\n\n const { getByText } = render(\n <OrderQueueProvider>\n <OrderFormProvider>\n <OrderCouponProvider>\n <Component />\n </OrderCouponProvider>\n </OrderFormProvider>\n </OrderQueueProvider>,\n { graphql: { mocks: [mockInsertCoupon] } }\n )\n\n const button = getByText('mutate')\n act(() => {\n fireEvent.click(button)\n })\n\n await act(() => new Promise(resolve => setTimeout(() => resolve())))\n expect(getByText('newCoupon')).toBeTruthy()\n })\n})\n\n```" } ]
code_doc-prop_04cbdba9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/messages/pt.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docProp.table.title\": \"Name\",\n \"docProp.table.type\": \"Type\",\n \"docProp.table.description\": \"Description\",\n \"docProp.table.defaultValue\": \"Default Value\",\n \"docProp.arrayTable.title\": \"These are the list items \",\n \"docProp.objectTable.title\": \"These are the object properties \",\n \"docProp.enumTable.title\": \"These are the enum values \"\n}\n\n```" } ]
code_doc-prop_68fe15c0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/messages/en.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docProp.table.title\": \"Name\",\n \"docProp.table.type\": \"Type\",\n \"docProp.table.description\": \"Description\",\n \"docProp.table.defaultValue\": \"Default Value\",\n \"docProp.arrayTable.title\": \"Here are the items/properties of the array \",\n \"docProp.objectTable.title\": \"Here are the properties of the object \",\n \"docProp.enumTable.title\": \"Here are the values of the enum \"\n}\n\n```" } ]
code_doc-prop_db4903ab
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/messages/context.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docProp.table.title\": \"Name\",\n \"docProp.table.type\": \"Type\",\n \"docProp.table.description\": \"Description\",\n \"docProp.table.defaultValue\": \"Default Value\",\n \"docProp.arrayTable.title\": \"Here are the items/properties of the array \",\n \"docProp.objectTable.title\": \"Here are the properties of the object \",\n \"docProp.enumTable.title\": \"Here are the values of the enum \"\n}\n\n```" } ]
code_doc-prop_d3764660
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/docs/README.md from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Doc Prop\n\nThis is the autodocumentator for VTEX IO Store Framework components\n\n```" } ]
code_doc-prop_b495a665
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/pages/interfaces.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"doc-prop\": {\n \"around\": []\n },\n \"doc-prop.table\": {\n \"component\": \"DocProp\"\n }\n}\n\n```" } ]
code_doc-prop_d9fddb66
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/pages/routes.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"doc-prop.table\": {\n \"path\": \"/docs/props/app/:appId/:interfaceId\"\n }\n}\n\n```" } ]
code_doc-prop_8644cbc8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/DocProp.tsx from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Spinner, Alert } from 'vtex.styleguide'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport PropsTable from './components/PropsTable'\nimport useComponentSchema from './hooks/useComponentSchema'\n\nconst DocProp: FC<DocPropProps> = ({ blockInterface }) => {\n const {\n route: {\n params: { appId, app, interfaceId },\n },\n } = useRuntime()\n console.log(appId, interfaceId)\n\n const { loading, error, data } = useComponentSchema(\n appId ?? app,\n interfaceId ?? blockInterface\n )\n\n if (loading) {\n return (\n <span className=\"dib c-muted-1\">\n <Spinner color=\"currentColor\" size={20} />\n </span>\n )\n }\n if (error) {\n return (\n <div className=\"mb5\">\n <Alert type=\"error\">\n <FormattedMessage id=\"docs-ui/empty-docs\" />\n </Alert>\n </div>\n )\n }\n return (\n data && (\n <PropsTable fetchedProps={data.schema} fetchedMessages={data.messages} />\n )\n )\n}\n\ninterface DocPropProps {\n blockInterface: string\n}\n\nexport default DocProp\n\n```" } ]
code_doc-prop_d2d5e956
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/package.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.docs-ui\",\n \"version\": \"1.0.1\",\n \"scripts\": {\n \"lint\": \"tsc --noEmit && eslint --ext ts,tsx .\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"@types/ramda\": \"^0.26.38\",\n \"highlight.js\": \"^9.16.2\",\n \"ramda\": \"^0.26.1\",\n \"react-anchor-link-smooth-scroll\": \"^1.0.12\",\n \"react-ga\": \"^2.5.7\",\n \"react-markdown\": \"^4.1.0\",\n \"recompose\": \"^0.30.0\",\n \"remark-emoji\": \"^2.0.2\",\n \"slugify\": \"^1.3.4\"\n },\n \"devDependencies\": {\n \"@types/graphql\": \"^0.13.3\",\n \"@types/highlight.js\": \"^9.12.3\",\n \"@types/jest\": \"^24.0.15\",\n \"@types/node\": \"^9.4.7\",\n \"@types/react\": \"^16.3.16\",\n \"@types/react-dom\": \"^16.0.5\",\n \"@types/react-helmet\": \"^5.0.5\",\n \"@types/react-intl\": \"^2.3.5\",\n \"@types/recompose\": \"^0.30.6\",\n \"@vtex/intl-equalizer\": \"^2.3.0\",\n \"@vtex/test-tools\": \"^0.3.2\",\n \"graphql\": \"^0.13.0\",\n \"react\": \"^16.8.6\",\n \"react-apollo\": \"^3.1.3\",\n \"react-dom\": \"^16.8.6\",\n \"react-intl\": \"3.9.1\",\n \"typescript\": \"3.8.3\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.108.1/public/@types/vtex.styleguide\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.90.2/public/@types/vtex.render-runtime\",\n \"vtex.device-detector\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.device-detector@0.2.4/public/@types/vtex.device-detector\",\n \"vtex.store-drawer\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-drawer@0.6.1/public/@types/vtex.store-drawer\",\n \"vtex.docs-graphql\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.docs-graphql@1.9.0/public/@types/vtex.docs-graphql\"\n }\n}\n\n```" } ]
code_doc-prop_4fa349de
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/styles/configs/style.json from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [3, 2.25, 1.5, 1.25, 1, 0.875, 0.75],\n \"spacing\": [0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 8, 16],\n \"customMedia\": [\n {\n \"s\": 20\n },\n {\n \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n {\n \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#142032\",\n \"action-primary\": \"#f71963\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#f2f4f5\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-background\": {\n \"action-primary\": \"#dd1659\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#134cd8\",\n \"action-secondary\": \"#eef3f7\",\n \"link\": \"#f71963\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#979899\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#142032\",\n \"muted-2\": \"#727273\",\n \"muted-3\": \"#979899\",\n \"muted-4\": \"#cacbcc\",\n \"muted-5\": \"#e3e4e6\"\n },\n \"visited-text\": {\n \"link\": \"#0c389f\"\n },\n \"hover-text\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"active-text\": {\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"border\": {\n \"action-primary\": \"#f71963\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#e3e4e6\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-border\": {\n \"action-primary\": \"#dd1659\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-border\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"disabled\": \"#979899\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\",\n \"muted-1\": \"#ffffff\",\n \"muted-2\": \"#ffffff\",\n \"muted-3\": \"#3f3f40\",\n \"muted-4\": \"#3f3f40\",\n \"muted-5\": \"#3f3f40\"\n },\n \"hover-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n },\n \"active-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n }\n },\n \"borderWidths\": [0, 0.125, 0.25, 0.5, 1, 2],\n \"borderRadius\": [0, 0.125, 0.25, 0.5, 1],\n \"widths\": [1, 2, 4, 8, 16],\n \"maxWidths\": [1, 2, 4, 8, 16, 32, 48, 64, 96],\n \"heights\": [1, 2, 4, 8, 16],\n \"sizes\": [\n {\n \"name\": \"small\",\n \"value\": 2\n },\n {\n \"name\": \"regular\",\n \"value\": 2.5\n },\n {\n \"name\": \"large\",\n \"value\": 3\n }\n ],\n \"typography\": {\n \"measure\": [30, 34, 20],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"2rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-2\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-3\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.5rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-4\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-5\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-6\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"body\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"400\",\n \"fontSize\": \"16px\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"normal\"\n },\n \"small\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"400\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"code\": {\n \"fontFamily\": \"Consolas, monaco, monospace\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.9rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n }\n }\n },\n \"opacity\": [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.025, 0]\n}\n\n```" } ]
code_doc-prop_3fdc9c70
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/typings/jpg.d.ts from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.jpg' {\n const path: string\n export default path\n}\n\n```" } ]
code_doc-prop_f3841acf
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/typings/react-syntax-highlighter-prism.d.ts from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'react-syntax-highlighter/dist/styles/prism'\n\n```" } ]
code_doc-prop_e6b04195
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/typings/png.d.ts from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.png' {\n const path: string\n export default path\n}\n\n```" } ]
code_doc-prop_3ff25971
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of doc-prop/react/typings/vtex.render-runtime.d.ts from the doc-prop VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/* eslint @typescript-eslint/no-explicit-any: 0 */\n/* Typings for `render-runtime` */\ndeclare module 'vtex.render-runtime' {\n import { Component, ReactElement } from 'react'\n\n export interface RenderContextProps {\n runtime: {\n account: string\n }\n }\n\n export interface InjectedRuntime {\n runtime: RenderRuntime\n }\n\n interface Pages {\n [name: string]: Page\n }\n\n interface Route {\n domain: string\n blockId: string\n canonicalPath?: string\n id: string\n params: Record<string, string>\n path: string\n title?: string\n }\n\n interface Culture {\n availableLocales: string[]\n locale: string\n language: string\n country: string\n currency: string\n }\n\n export interface RenderRuntime {\n account: string\n accountId: string\n appsEtag: string\n fetchComponents: (any) => any\n workspace: string\n disableSSR: boolean\n hints: {\n desktop: boolean\n mobile: boolean\n phone: boolean\n tablet: boolean\n }\n page: string\n route: Route\n version: string\n culture: Culture\n pages: Pages\n preview: boolean\n production: boolean\n publicEndpoint: string\n renderMajor: number\n query: {\n q?: string\n }\n start: boolean\n runtimeMeta: {\n version: string\n config?: any\n }\n settings: {\n [app: string]: any\n }\n segmentToken: string\n rootPath?: string\n workspaceCookie: string\n hasNewExtensions: boolean\n navigate: any\n }\n\n export const Link: any\n export const NoSSR: any\n export const RenderContextConsumer: ReactElement\n export const canUseDOM: boolean\n export const withRuntimeContext: any\n export const Helmet: any\n export const useRuntime: () => RenderRuntime\n}\n\n```" } ]