id
stringlengths
12
53
messages
listlengths
3
3
code_totalizer-translator_868d314c
[ { "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 totalizer-translator/test-utils/index.js from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React from 'react'\nimport { IntlProvider } from 'react-intl'\nimport { render } from 'react-testing-library'\nimport messages from '../messages/en.json'\n\nconst renderWithIntl = node => {\n return render(\n <IntlProvider locale=\"en\" messages={messages}>\n {node}\n </IntlProvider>\n )\n}\n\nexport * from 'react-testing-library'\n\nexport { renderWithIntl }\n\n```" } ]
code_totalizer-translator_3f45c889
[ { "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 totalizer-translator/messages/hu.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Kedvezmény\",\n \"store/totalizers.Items\": \"Részösszeg\",\n \"store/totalizers.Shipping\": \"Szállítás\",\n \"store/totalizers.Tax\": \"ÁFA\",\n \"store/totalizers.Interest\": \"Kamat\",\n \"store/totalizers.Change\": \"Összes módosítás\",\n \"totalizers.Discounts\": \"Kedvezmény\",\n \"totalizers.Items\": \"Részösszeg\",\n \"totalizers.Shipping\": \"Szállítás\",\n \"totalizers.Tax\": \"ÁFA\",\n \"totalizers.Interest\": \"Kamat\",\n \"totalizers.Change\": \"Összes módosítás\"\n}\n\n```" } ]
code_totalizer-translator_b6e4db7c
[ { "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 totalizer-translator/messages/sk.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Zľava\",\n \"store/totalizers.Items\": \"Medzisúčet\",\n \"store/totalizers.Shipping\": \"Dodanie\",\n \"store/totalizers.Tax\": \"Daň\",\n \"store/totalizers.Interest\": \"Úrok\",\n \"store/totalizers.Change\": \"Celkový počet zmien\",\n \"totalizers.Discounts\": \"Zľava\",\n \"totalizers.Items\": \"Medzisúčet\",\n \"totalizers.Shipping\": \"Dodanie\",\n \"totalizers.Tax\": \"Daň\",\n \"totalizers.Interest\": \"Úrok\",\n \"totalizers.Change\": \"Celkový počet zmien\"\n}\n\n```" } ]
code_totalizer-translator_be303b07
[ { "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 totalizer-translator/messages/pt.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Descontos\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Entrega\",\n \"store/totalizers.Tax\": \"Impostos\",\n \"store/totalizers.Interest\": \"Juros\",\n \"store/totalizers.Change\": \"Total das alterações\",\n \"totalizers.Discounts\": \"Descontos\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Entrega\",\n \"totalizers.Tax\": \"Impostos\",\n \"totalizers.Interest\": \"Juros\",\n \"totalizers.Change\": \"Total das alterações\"\n}\n\n```" } ]
code_totalizer-translator_7e322b02
[ { "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 totalizer-translator/messages/en.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Discount\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Shipping\",\n \"store/totalizers.Tax\": \"Taxes\",\n \"store/totalizers.Interest\": \"Interest\",\n \"store/totalizers.Change\": \"Total of changes\",\n \"totalizers.Discounts\": \"Discount\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Shipping\",\n \"totalizers.Tax\": \"Taxes\",\n \"totalizers.Interest\": \"Interest\",\n \"totalizers.Change\": \"Total of changes\"\n}\n\n```" } ]
code_totalizer-translator_0b2d79bb
[ { "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 totalizer-translator/messages/it.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Sconto\",\n \"store/totalizers.Items\": \"Subtotale\",\n \"store/totalizers.Shipping\": \"Spedizione\",\n \"store/totalizers.Tax\": \"Tasse\",\n \"store/totalizers.Interest\": \"Tasso d'interesse\",\n \"store/totalizers.Change\": \"Totale delle modifiche\",\n \"totalizers.Discounts\": \"Descuentos\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Costo del envío\",\n \"totalizers.Tax\": \"Impuestos\",\n \"totalizers.Interest\": \"Interés\",\n \"totalizers.Change\": \"Totale delle modifiche\"\n}\n\n```" } ]
code_totalizer-translator_d682b4aa
[ { "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 totalizer-translator/messages/fr.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Rabais\",\n \"store/totalizers.Items\": \"Sous-total\",\n \"store/totalizers.Shipping\": \"Expédition\",\n \"store/totalizers.Tax\": \"Taxes\",\n \"store/totalizers.Interest\": \"Intérêt\",\n \"store/totalizers.Change\": \"Total des modifications\",\n \"totalizers.Discounts\": \"Descuentos\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Costo del envío\",\n \"totalizers.Tax\": \"Impuestos\",\n \"totalizers.Interest\": \"Interés\",\n \"totalizers.Change\": \"Total des modifications\"\n}\n\n```" } ]
code_totalizer-translator_31e65850
[ { "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 totalizer-translator/messages/ro.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Discount\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Transport\",\n \"store/totalizers.Tax\": \"TVA\",\n \"store/totalizers.Interest\": \"Dobândă\",\n \"store/totalizers.Change\": \"Total modificări\",\n \"totalizers.Discounts\": \"Discount\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Transport\",\n \"totalizers.Tax\": \"TVA\",\n \"totalizers.Interest\": \"Dobândă\",\n \"totalizers.Change\": \"Total modificări\"\n}\n\n```" } ]
code_totalizer-translator_94f1dd4e
[ { "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 totalizer-translator/messages/ca.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Descomptes\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Cost de l'enviament\",\n \"store/totalizers.Tax\": \"Impostos\",\n \"store/totalizers.Interest\": \"Interès\",\n \"store/totalizers.Change\": \"Total de canvis\",\n \"totalizers.Discounts\": \"Descomptes\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Cost de l'enviament\",\n \"totalizers.Tax\": \"Impostos\",\n \"totalizers.Interest\": \"Interès\",\n \"totalizers.Change\": \"Total de canvis\"\n}\n\n```" } ]
code_totalizer-translator_18ef4986
[ { "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 totalizer-translator/messages/ko.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"할인\",\n \"store/totalizers.Items\": \"소계\",\n \"store/totalizers.Shipping\": \"배송\",\n \"store/totalizers.Tax\": \"세금\",\n \"store/totalizers.Interest\": \"이자\",\n \"store/totalizers.Change\": \"총 변경 사항\",\n \"totalizers.Discounts\": \"할인\",\n \"totalizers.Items\": \"소계\",\n \"totalizers.Shipping\": \"배송\",\n \"totalizers.Tax\": \"세금\",\n \"totalizers.Interest\": \"이자\",\n \"totalizers.Change\": \"총 변경 사항\"\n}\n\n```" } ]
code_totalizer-translator_85aaa18f
[ { "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 totalizer-translator/messages/cs.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Sleva\",\n \"store/totalizers.Items\": \"Mezisoučet\",\n \"store/totalizers.Shipping\": \"Odesílání\",\n \"store/totalizers.Tax\": \"Daně\",\n \"store/totalizers.Interest\": \"Úrok\",\n \"store/totalizers.Change\": \"Úprav​y, celkem\",\n \"totalizers.Discounts\": \"Sleva\",\n \"totalizers.Items\": \"Mezisoučet\",\n \"totalizers.Shipping\": \"Odesílání\",\n \"totalizers.Tax\": \"Daně\",\n \"totalizers.Interest\": \"Úrok\",\n \"totalizers.Change\": \"Úprav​y, celkem\"\n}\n\n```" } ]
code_totalizer-translator_1eecf60a
[ { "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 totalizer-translator/messages/id.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Diskon\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Pengiriman\",\n \"store/totalizers.Tax\": \"Pajak\",\n \"store/totalizers.Interest\": \"Bunga\",\n \"store/totalizers.Change\": \"Total kembali\",\n \"totalizers.Discounts\": \"Diskon\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Pengiriman\",\n \"totalizers.Tax\": \"Pajak\",\n \"totalizers.Interest\": \"Bunga\",\n \"totalizers.Change\": \"Total kembali\"\n}\n\n```" } ]
code_totalizer-translator_915c79a9
[ { "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 totalizer-translator/messages/es.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"Descuentos\",\n \"store/totalizers.Items\": \"Subtotal\",\n \"store/totalizers.Shipping\": \"Costo del envío\",\n \"store/totalizers.Tax\": \"Impuestos\",\n \"store/totalizers.Interest\": \"Interés\",\n \"store/totalizers.Change\": \"Total de cambios\",\n \"totalizers.Discounts\": \"Descuentos\",\n \"totalizers.Items\": \"Subtotal\",\n \"totalizers.Shipping\": \"Costo del envío\",\n \"totalizers.Tax\": \"Impuestos\",\n \"totalizers.Interest\": \"Interés\",\n \"totalizers.Change\": \"Total de cambios\"\n}\n\n```" } ]
code_totalizer-translator_1384eb78
[ { "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 totalizer-translator/messages/ar.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store/totalizers.Discounts\": \"الخصم\",\n \"store/totalizers.Items\": \"تكلفة الطلب\",\n \"store/totalizers.Shipping\": \"الشحن\",\n \"store/totalizers.Tax\": \"الضرائب\",\n \"store/totalizers.Interest\": \"الفائدة\",\n \"store/totalizers.Change\": \"إجمالي التغييرات\",\n \"totalizers.Discounts\": \"الخصم\",\n \"totalizers.Items\": \"تكلفة الطلب\",\n \"totalizers.Shipping\": \"الشحن\",\n \"totalizers.Tax\": \"الضرائب\",\n \"totalizers.Interest\": \"الفائدة\",\n \"totalizers.Change\": \"إجمالي التغييرات\"\n}\n\n```" } ]
code_totalizer-translator_04728ae5
[ { "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 totalizer-translator/docs/README.md from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Totalizer Translator\n\n> A React component that renders translated totalizer property from Checkout's OrderForm\n\n## Setup\n\nThrough **vtex.io**:\n\nAdd the following dependency to your `manifest.json` dependencies:\n\n```\n\"vtex.totalizer-translator\": \"1.x\"\n```\n\n## Usage\n\n```js\nimport TranslateTotalizer from 'vtex.totalizer-translator/TranslateTotalizer'\n\n<TranslateTotalizer id=\"Discounts\" />\n// Discount\n\n<TranslateTotalizer id=\"Items\" />\n// Subtotal\n\n<TranslateTotalizer id=\"Foo Custom\" />\n// Foo Custom\n```\n\n### Params\n\n- **id** | Type `string` | Id of the totalizer to be translated\n\n### Returns\n\n- **Translated value** | Type `string`\n\n## Testing\n\n```sh\nyarn test\n```\n\n```" } ]
code_totalizer-translator_3469c493
[ { "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 totalizer-translator/react/TranslateTotalizer.test.js from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React from 'react'\nimport TranslateTotalizer from './TranslateTotalizer'\nimport { renderWithIntl, cleanup } from '../test-utils' // eslint-disable-line import/named\n\nconst TotalizersMock = {\n NoID: {\n name: 'Mock Tax',\n value: 10,\n },\n NoName: {\n id: 'CustomTax',\n name: '',\n value: 10.24,\n },\n Interest: {\n id: 'Interest',\n name: 'Total de juros',\n value: 0,\n },\n CustomTax: {\n id: 'CustomTax',\n name: 'COFINS-RETIDO',\n value: 29.97,\n },\n}\n\ndescribe('TranslateTotalizer', () => {\n afterEach(cleanup)\n\n it('should translate when a valid id is provided', () => {\n const { getByText } = renderWithIntl(<TranslateTotalizer id=\"Discounts\" />)\n\n const text = getByText('Discount')\n expect(text).toBeDefined()\n })\n\n it(\"should return the id when it's not translated\", () => {\n const { getByText } = renderWithIntl(<TranslateTotalizer id=\"Foo\" />)\n\n const text = getByText('Foo')\n expect(text).toBeDefined()\n })\n\n it('should allow to pass a totalizer object and translate by its id', () => {\n const { getByText } = renderWithIntl(\n <TranslateTotalizer totalizer={TotalizersMock.Interest} />\n )\n\n const text = getByText('Interest')\n expect(text).toBeDefined()\n })\n\n it('should render name if id unknown', () => {\n const { getByText } = renderWithIntl(\n <TranslateTotalizer totalizer={TotalizersMock.CustomTax} />\n )\n\n const text = getByText('COFINS-RETIDO')\n expect(text).toBeDefined()\n })\n\n it('should render id as a fallback if no name is present', () => {\n const { getByText } = renderWithIntl(\n <TranslateTotalizer totalizer={TotalizersMock.NoName} />\n )\n\n const text = getByText('CustomTax')\n expect(text).toBeDefined()\n })\n\n it('should render name as fallback if no id is present', () => {\n const { getByText } = renderWithIntl(\n <TranslateTotalizer totalizer={TotalizersMock.NoID} />\n )\n\n const text = getByText('Mock Tax')\n expect(text).toBeDefined()\n })\n})\n\n```" } ]
code_totalizer-translator_56c53dc0
[ { "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 totalizer-translator/react/TranslateTotalizer.js from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport PropTypes from 'prop-types'\nimport { injectIntl, intlShape, defineMessages } from 'react-intl'\n\nexport const knownTotalizers = defineMessages({\n Discounts: {\n id: 'store/totalizers.Discounts',\n defaultMessage: 'Discounts',\n },\n Items: {\n id: 'store/totalizers.Items',\n defaultMessage: 'Items',\n },\n Shipping: {\n id: 'store/totalizers.Shipping',\n defaultMessage: 'Shipping',\n },\n Tax: {\n id: 'store/totalizers.Tax',\n defaultMessage: 'Tax',\n },\n Interest: {\n id: 'store/totalizers.Interest',\n defaultMessage: 'Interest',\n },\n Change: {\n id: 'store/totalizers.Change',\n defaultMessage: 'Total of changes',\n },\n})\n\nexport const nonStoreKnownTotalizers = defineMessages({\n Discounts: {\n id: 'totalizers.Discounts',\n defaultMessage: 'Discounts',\n },\n Items: {\n id: 'totalizers.Items',\n defaultMessage: 'Items',\n },\n Shipping: {\n id: 'totalizers.Shipping',\n defaultMessage: 'Shipping',\n },\n Tax: {\n id: 'totalizers.Tax',\n defaultMessage: 'Tax',\n },\n Interest: {\n id: 'totalizers.Interest',\n defaultMessage: 'Interest',\n },\n Change: {\n id: 'totalizers.Change',\n defaultMessage: 'Total of changes',\n },\n})\n\nconst TranslateTotal = ({ intl, id, totalizer, nonStorePage }) => {\n if (totalizer && totalizer.id) id = totalizer.id\n\n if (nonStorePage && id in nonStoreKnownTotalizers) return intl.formatMessage(nonStoreKnownTotalizers[id])\n\n // if the totalizer is known, translate it\n if (id in knownTotalizers) return intl.formatMessage(knownTotalizers[id])\n\n // id is unknown and there's no totalizer object, render the id or an empty string\n if (!totalizer) return id || ''\n\n // totalizer exists, render its name or its id\n return totalizer.name || id\n}\n\nTranslateTotal.propTypes = {\n intl: intlShape,\n id: PropTypes.string,\n totalizer: PropTypes.shape({\n id: PropTypes.string,\n name: PropTypes.string,\n value: PropTypes.number,\n }),\n nonStorePage: PropTypes.bool // This is used in case that the comoponent is used outsite the store context.\n}\n\nexport default injectIntl(TranslateTotal)\n\n```" } ]
code_totalizer-translator_475821ae
[ { "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 totalizer-translator/react/package.json from the totalizer-translator VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"totalizer-translator\",\n \"dependencies\": {\n \"react-intl\": \"^2.7.2\"\n },\n \"version\": \"2.6.1\"\n}\n\n```" } ]
code_service-example_e1884dd5
[ { "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 service-example/docs/README.md from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Service Example\n\nA reference app implementing a VTEX IO service with HTTP route handlers.\n\n![Service Example Architecture](https://user-images.githubusercontent.com/18706156/77381360-72489680-6d5c-11ea-9da8-f4f03b6c5f4c.jpg)\n\nWe use [**KoaJS**](https://koajs.com/) as the web framework, so you might want to get into that\n\nWe also use the [**node-vtex-api**](https://github.com/vtex/node-vtex-api), a VTEX set of utilities for Node services. You can import this package using NPM from `@vtex/api` (already imported on this project)\n\n- Start from `node/index.ts` and follow the comments and imports :)\n\n## Defining routes on _service.json_ \n```json\n{\n \"memory\": 256,\n \"ttl\": 10,\n \"timeout\": 2,\n \"minReplicas\": 2,\n \"maxReplicas\": 4,\n \"routes\": {\n \"status\": {\n \"path\": \"/_v/status/:code\",\n \"public\": true\n }\n }\n}\n```\n\nThe `service.json` file that sits on the root of the `node` folder holds information about this service, like the maximum timeout and number of replicas, but also sets its routes. \n\nKoa uses the [path-to-regexp](https://github.com/pillarjs/path-to-regexp) format for defining routes and, as seen in the example, we use the `:code` notation for declaring a route param named `code`. An HTTP request for `https://{{workspace}}--{{account}}.myvtex.com/_v/status/500` will match the route we've defined. \n\nFor each _key_ on the `routes` object, there should be a corresponding entry on the exported Service object on `node/index.ts`. This will hook your code to a specific route.\n\n## Access Control\nYou can also provide a `public` option for each route. If `true`, that resource will be reachable to everyone on the internet. If `false`, VTEX credentials will be requested as well.\n\nAnother way of controlling access to specific routes is using **ReBACs (Resource-based access)**, which supports a more robust configuration. You can read more [on this document](https://docs.google.com/document/d/1ZxNHMFIXfXz3BgTN9xyrHL3V5dYz14wivYgQjRBZ6J8/edit#heading=h.z7pad3qd2qw7) (VTEX only).\n\n### Query String\nFor `?accepting=query-string`, you **don't need to declare anything**, as any query provided to the URL will already be available for you to use on the code as `ctx.query`, already parsed as an object, or `ctx.queryString`, taken directly from the URL as a string.\n\n### Route Params\nRoute Params will be available for you to use on the code as `ctx.vtex.params`, already parsed as an object.\nFor a path like `/_v/status/:code`, if you receive the request `/_v/status/200`, `ctx.vtex.params` will return `{ code: '200' }`\n\n### HTTP methods\n\nWhen you define a route on the `service.json`, your NodeJS handlers for that route will be triggered on every HTTP method (GET, POST, PUT...), so if you need to handle them separately, you need to implement a \"sub-router\". Fortunately, the _node-vtex-api_ provides a helper function `method`, exported from `@vtex/api`, to accomplish that behavior. Instead of passing your handlers directly to the corresponding route on `index.ts`, you pass a `method` call passing an object with the desired method as key and one handler as its corresponding value. \n\nCheck this example:\n```typescript\nimport { method } from '@vtex/api'\n...\n\nexport default new Service<Clients, State>({\n clients,\n routes: {\n status: method({\n GET: statusGetHandler,\n POST: statusPostHandler,\n }),\n },\n})\n```\n\n## Throwing errors\n\nWhen building an HTTP service, we should follow HTTP rules regarding data types, cache, authorization, and status codes. Our example app sets a `ctx.status` value that will be used as an HTTP status code return value, but often, we also want to give proper information about errors.\n\nThe **node-vtex-api** already exports a handful of **custom error classes** that can be used for that purpose, like the `NotFoundError`. You just need to throw them inside one of the route handlers that the appropriate response will be sent to the server.\n\n```typescript\nimport { UserInputError } from '@vtex/api'\n\nexport async function validate(ctx: Context, next: () => Promise<any>) {\n const { code } = ctx.vtex.route.params\n if (isNaN(code) || code < 100 || code > 600) {\n throw new UserInputError('Code must be a number between 100 and 600')\n }\n...\n```\n\nYou can check all the available errors [here](https://github.com/vtex/node-vtex-api/tree/fd6139349de4e68825b1074f1959dd8d0c8f4d5b/src/errors), but some are not useful for just-HTTP services. Check the most useful ones:\n\n|Error Class | HTTP Code |\n|--|:--:|\n| `UserInputError` | 400 |\n| `AuthenticationError` | 401 |\n| `ForbiddenError` | 403 |\n| `NotFoundError` | 404 |\n\nYou can also **create your custom error**, just see how it's done above ;)\n\n## Reading a JSON body\n\nWhen writing POST or PUT handlers, for example, you often need to have access to the **request body** that comes in a JSON format, which is not provided directly by the handler function.\n\nFor this, you have to use the [co-body](https://www.npmjs.com/package/co-body) package that will parse the request into a readable JSON object, used as below: \n```typescript\nimport { json } from 'co-body'\nexport async function method(ctx: Context, next: () => Promise<any>) {\n const body = await json(ctx.req)\n```\n\n## Testing\n\n`@vtex/test-tools` and `@types/jest` should be installed on `./node` package as `devDependencies`.\n\nRun `vtex test` and [Jest](https://jestjs.io/) will do its thing.\n\nCheck the `node/__tests__/simple.test.ts` test case and also [Jest's Documentation](https://jestjs.io/docs/en/getting-started).\n\n```" } ]
code_service-example_3ab5cbdc
[ { "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 service-example/node/service.json from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"memory\": 256,\n \"ttl\": 10,\n \"timeout\": 2,\n \"minReplicas\": 2,\n \"maxReplicas\": 4,\n \"workers\": 1,\n \"routes\": {\n \"status\": {\n \"path\": \"/_v/status/:code\",\n \"public\": true\n }\n }\n}\n\n```" } ]
code_service-example_899e525f
[ { "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 service-example/node/package.json from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"dependencies\": {\n \"co-body\": \"^6.0.0\",\n \"ramda\": \"^0.25.0\"\n },\n \"devDependencies\": {\n \"@types/co-body\": \"^0.0.3\",\n \"@types/jest\": \"^24.0.18\",\n \"@types/node\": \"^20.0.0\",\n \"@types/ramda\": \"types/npm-ramda#dist\",\n \"@vtex/api\": \"6.47.0\",\n \"@vtex/test-tools\": \"^1.0.0\",\n \"@vtex/tsconfig\": \"^0.5.6\",\n \"typescript\": \"5.5.3\"\n },\n \"resolutions\": {\n \"@types/testing-library__dom\": \"6.12.1\",\n \"@types/express\": \"4.16.0\",\n \"@types/express-serve-static-core\": \"4.16.0\"\n },\n \"scripts\": {\n \"lint\": \"tsc --noEmit --pretty\"\n },\n \"version\": \"0.3.0\"\n}\n\n```" } ]
code_service-example_a0abc907
[ { "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 service-example/node/index.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { ClientsConfig, ServiceContext, RecorderState } from '@vtex/api'\nimport { LRUCache, method, Service } from '@vtex/api'\n\nimport { Clients } from './clients'\nimport { status } from './middlewares/status'\nimport { validate } from './middlewares/validate'\n\nconst TIMEOUT_MS = 800\n\n// Create a LRU memory cache for the Status client.\n// The 'max' parameter sets the size of the cache.\n// The @vtex/api HttpClient respects Cache-Control headers and uses the provided cache.\n// Note that the response from the API being called must include an 'etag' header\n// or a 'cache-control' header with a 'max-age' value. If neither exist, the response will not be cached.\n// To force responses to be cached, consider adding the `forceMaxAge` option to your client methods.\nconst memoryCache = new LRUCache<string, any>({ max: 5000 })\n\nmetrics.trackCache('status', memoryCache)\n\n// This is the configuration for clients available in `ctx.clients`.\nconst clients: ClientsConfig<Clients> = {\n // We pass our custom implementation of the clients bag, containing the Status client.\n implementation: Clients,\n options: {\n // All IO Clients will be initialized with these options, unless otherwise specified.\n default: {\n retries: 2,\n timeout: TIMEOUT_MS,\n },\n // This key will be merged with the default options and add this cache to our Status client.\n status: {\n memoryCache,\n },\n },\n}\n\ndeclare global {\n // We declare a global Context type just to avoid re-writing ServiceContext<Clients, State> in every handler and resolver\n type Context = ServiceContext<Clients, State>\n\n // The shape of our State object found in `ctx.state`. This is used as state bag to communicate between middlewares.\n interface State extends RecorderState {\n code: number\n }\n}\n\n// Export a service that defines route handlers and client options.\nexport default new Service({\n clients,\n routes: {\n // `status` is the route ID from service.json. It maps to an array of middlewares (or a single handler).\n status: method({\n GET: [validate, status],\n }),\n },\n})\n\n```" } ]
code_service-example_66668691
[ { "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 service-example/node/clients/status.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { InstanceOptions, IOContext, IOResponse } from '@vtex/api'\nimport { ExternalClient } from '@vtex/api'\n\nexport default class Status extends ExternalClient {\n constructor(context: IOContext, options?: InstanceOptions) {\n super('http://httpstat.us', context, options)\n }\n\n public async getStatus(status: number): Promise<string> {\n return this.http.get(status.toString(), {\n metric: 'status-get',\n })\n }\n\n public async getStatusWithHeaders(\n status: number\n ): Promise<IOResponse<string>> {\n return this.http.getRaw(status.toString(), {\n metric: 'status-get-raw',\n })\n }\n\n public async getStatusAndForceMaxAge(\n status: number\n ): Promise<IOResponse<string>> {\n return this.http.get(status.toString(), {\n // when using an LRUCache, this will force the response to be cached\n forceMaxAge: 5000,\n metric: 'status-get-forceMaxAge',\n })\n }\n}\n\n```" } ]
code_service-example_0e5dfb3f
[ { "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 service-example/node/clients/index.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { IOClients } from '@vtex/api'\n\nimport Status from './status'\n\n// Extend the default IOClients implementation with our own custom clients.\nexport class Clients extends IOClients {\n public get status() {\n return this.getOrSet('status', Status)\n }\n}\n\n```" } ]
code_service-example_bd430460
[ { "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 service-example/node/middlewares/status.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport async function status(ctx: Context, next: () => Promise<any>) {\n const {\n state: { code },\n clients: { status: statusClient },\n } = ctx\n\n console.info('Received code:', code)\n\n const statusResponse = await statusClient.getStatus(code)\n\n console.info('Status response:', statusResponse)\n\n const {\n headers,\n data,\n status: responseStatus,\n } = await statusClient.getStatusWithHeaders(code)\n\n console.info('Status headers', headers)\n console.info('Status data:', data)\n\n ctx.status = responseStatus\n ctx.body = data\n ctx.set('Cache-Control', headers['cache-control'])\n\n await next()\n}\n\n```" } ]
code_service-example_eb13b8e6
[ { "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 service-example/node/middlewares/validate.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { UserInputError } from '@vtex/api'\n\nexport async function validate(ctx: Context, next: () => Promise<any>) {\n const {\n vtex: {\n route: { params },\n },\n } = ctx\n\n console.info('Received params:', params)\n\n const { code } = params\n\n if (!code) {\n throw new UserInputError('Code is required') // Wrapper for a Bad Request (400) HTTP Error. Check others in https://github.com/vtex/node-vtex-api/blob/fd6139349de4e68825b1074f1959dd8d0c8f4d5b/src/errors/index.ts\n }\n\n const codeNumber = parseInt(code as string, 10)\n\n ctx.state.code = codeNumber\n\n await next()\n}\n\n```" } ]
code_service-example_31549942
[ { "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 service-example/node/__tests__/simple.test.ts from the service-example VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n// You can import your files here for testing them\n//\n// More info: https://github.com/sapegin/jest-cheat-sheet\n\ndescribe('simpleTest', () => {\n it('one test case', async () => {\n expect(0.2 + 0.1).not.toBe(0.3)\n })\n})\n\n```" } ]
code_checkout-ui-custom_f006f898
[ { "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 checkout-ui-custom/messages/th-TH.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"กำหนด UI ใน Checkout\",\n \"admin/checkout-ui.update-warning\": \"แอปนี้มีการอัปเดต โปรดคลิก เผยแพร่ เพื่อให้การแก้ไขล่าสุดมีผลใน Checkout ของคุณ\",\n \"admin/checkout-ui.permission-warning\":\"คุณไม่ได้รับอนุญาตให้เผยแพร่\", \n \"admin/checkout-ui.permission-tooltip\":\"บทบาทที่ต้องมี: 'บันทึกค่ากำหนดแบบฟอร์มคำขอ'\", \n \"admin/checkout-ui.navigation.title\": \"กำหนด UI ใน Checkout\",\n \"admin/checkout-ui.tab.layout\": \"เลย์เอาต์\",\n \"admin/checkout-ui.tab.colors\": \"สี\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"JavaScript กำหนดเอง\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// การเปลี่ยนแปลงตรงนี้อาจกระทบการขายของคุณ\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"CSS กำหนดเอง\",\n \"admin/checkout-ui.tab.css.helper\": \"/* การเปลี่ยนแปลงที่นี่อาจกระทบการขายของคุณ */\",\n \"admin/checkout-ui.tab.history\": \"ประวัติ\",\n \"admin/checkout-ui.button.publish\": \"เผยแพร่\",\n \"admin/checkout-ui.message.publishing\": \"เผยแพร่ไปยัง\",\n \"admin/checkout-ui.message.published\": \"ได้เผยแพร่ไปยัง\",\n \"admin/checkout-ui.publish.warning\": \"คุณกำลังเผยแพร่ไปยัง Production ที่ใช้งานจริง อย่าลืมว่าการเปลี่ยนแปลงที่นี่อาจกระทบการขายของคุณ\",\n \"admin/checkout-ui.publish.confirm\": \"ดำเนินการต่อ\",\n \"admin/checkout-ui.publish.cancel\": \"ยกเลิก\",\n \"admin/checkout-ui.toggle.active\": \"ใช้งานอยู่\",\n \"admin/checkout-ui.history.label.email\": \"อีเมล\",\n \"admin/checkout-ui.history.label.workspace\": \"พื้นที่ทำงาน\",\n \"admin/checkout-ui.history.label.version\": \"เวอร์ชันของแอป\",\n \"admin/checkout-ui.history.label.date\": \"วันที่สร้าง\",\n \"admin/checkout-ui.history.button.load\": \"โหลด\",\n \"admin/checkout-ui.history.help.appversion\": \"เวอร์ชันปัจจุบันของแอป:\",\n \"admin/checkout-ui.color.base\": \"base\",\n \"admin/checkout-ui.color.baseInverted\": \"base ที่สับเปลี่ยน\",\n \"admin/checkout-ui.color.actionPrimary\": \"แอคชันหลัก\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"แอคชันหลักสีเข้มกว่า\",\n \"admin/checkout-ui.color.actionSecondary\": \"แอคชันรอง\",\n \"admin/checkout-ui.color.emphasis\": \"การเน้น\",\n \"admin/checkout-ui.color.disabled\": \"ปิดการใช้งานแล้ว\",\n \"admin/checkout-ui.color.success\": \"สำเร็จ\",\n \"admin/checkout-ui.color.successDarken\": \"สำเร็จสีเข้มกว่า\",\n \"admin/checkout-ui.color.successFaded\": \"สำเร็จสีจางลง\",\n \"admin/checkout-ui.color.danger\": \"อันตราย\",\n \"admin/checkout-ui.color.dangerFaded\": \"อันตรายสีจางลง\",\n \"admin/checkout-ui.color.warning\": \"คำเตือน\",\n \"admin/checkout-ui.color.warningFaded\": \"คำเตือนสีจางลง\",\n \"admin/checkout-ui.color.muted1\": \"ปิดเสียง 1\",\n \"admin/checkout-ui.color.muted2\": \"ปิดเสียง 2\",\n \"admin/checkout-ui.color.muted3\": \"ปิดเสียง 3\",\n \"admin/checkout-ui.color.muted4\": \"ปิดเสียง 4\",\n \"admin/checkout-ui.color.muted5\": \"ปิดเสียง 5\",\n \"admin/checkout-ui.color.muted6\": \"ปิดเสียง 6\",\n \"admin/checkout-ui.layout.preview.title\": \"แสดงตัวอย่าง\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"ปุ่ม\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"แสดงวิธีการชำระเงินแบบ Accordion - คลิกลูกศรเพื่อขยายดูรายละเอียดเพิ่มเติมได้\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"แสดงวิธีการชำระเงินเป็นหมวดแบบย่อขยายได้ ถ้าปิดการใช้งานจะแสดงเป็นแท็บ\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"แสดงวันที่ขนส่งแบบคร่าว ๆ\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"แสดงวันและวันที่จัดส่งโดยประมาณ หากปิดใช้งานกรอบเวลาที่จัดส่งโดยประมาณจะแสดงเป็น \\\"ไม่เกิน X วันทำการ\\\"\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"แสดงยอดรวมในบรรทัดรายการ\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"แสดงยอดรวมในบรรทัดรายการ (ราคาหน่วย x จำนวน) ถัดจากตัวเลือกจำนวน หากปิดการใช้งานจะแสดงเฉพาะราคาหน่วย\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"แสดงฟิลด์ข้อมูลหมายเหตุ\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"ซ่อนขั้นตอนอีเมล\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"แบบฟอร์มที่อยู่จาก Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"ขนาดตัวอักษร: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"ฺิิิิborder radius: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"รัศมีความโค้งขอบปุ่ม: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"ความสูงฟิลด์ตัวอักษร:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"ความกว้างสูงสุดของ wrapper\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"border ของ container\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"ตระกูลแบบอักษร\"\n}\n\n```" } ]
code_checkout-ui-custom_08e4dddf
[ { "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 checkout-ui-custom/messages/de.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Checkout UI Benutzerdefiniert\",\n \"admin/checkout-ui.update-warning\": \"Diese App wurde aktualisiert. Bitte klicken Sie auf VERÖFFENTLICHEN, um die neuesten Korrekturen auf Ihren Checkout anzuwenden.\",\n \"admin/checkout-ui.permission-warning\":\"Sie haben keine Berechtigung zum Veröffentlichen\", \n \"admin/checkout-ui.permission-tooltip\":\"Erforderliche Rolle: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"Checkout UI Benutzerdefiniert\",\n \"admin/checkout-ui.tab.layout\": \"Layout\",\n \"admin/checkout-ui.tab.colors\": \"Farben\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"Benutzerdefiniertes JavaScript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Änderungen hier können sich auf Ihre Verkäufe auswirken\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"Benutzerdefiniertes CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Änderungen hier können sich auf Ihre Verkäufe auswirken */\",\n \"admin/checkout-ui.tab.history\": \"Verlauf\",\n \"admin/checkout-ui.button.publish\": \"Veröffentlichen\",\n \"admin/checkout-ui.message.publishing\": \"Veröffentlichung an\",\n \"admin/checkout-ui.message.published\": \"Veröffentlicht bis\",\n \"admin/checkout-ui.publish.warning\": \"Sie veröffentlichen in einem PRODUKTIONS-Arbeitsbereich. Beachten Sie, dass sich Änderungen hier auf Ihre Verkäufe auswirken können.\",\n \"admin/checkout-ui.publish.confirm\": \"Weiter\",\n \"admin/checkout-ui.publish.cancel\": \"Abbrechen\",\n \"admin/checkout-ui.toggle.active\": \"Aktiv\",\n \"admin/checkout-ui.history.label.email\": \"E-Mail\",\n \"admin/checkout-ui.history.label.workspace\": \"Arbeitsplatz\",\n \"admin/checkout-ui.history.label.version\": \"App-Version\",\n \"admin/checkout-ui.history.label.date\": \"Erstellungsdatum\",\n \"admin/checkout-ui.history.button.load\": \"Laden\",\n \"admin/checkout-ui.history.help.appversion\": \"Aktuelle App-Version:\",\n \"admin/checkout-ui.color.base\": \"Basis\",\n \"admin/checkout-ui.color.baseInverted\": \"Umgekehrte Basis\",\n \"admin/checkout-ui.color.actionPrimary\": \"Aktion primär\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Aktion primär dunkler\",\n \"admin/checkout-ui.color.actionSecondary\": \"Aktion sekundär\",\n \"admin/checkout-ui.color.emphasis\": \"Schwerpunkt\",\n \"admin/checkout-ui.color.disabled\": \"Deaktiviert\",\n \"admin/checkout-ui.color.success\": \"Erfolg\",\n \"admin/checkout-ui.color.successDarken\": \"Erfolg dunkler\",\n \"admin/checkout-ui.color.successFaded\": \"Erfolg verblasst\",\n \"admin/checkout-ui.color.danger\": \"Gefahr\",\n \"admin/checkout-ui.color.dangerFaded\": \"Gefahr verblasst\",\n \"admin/checkout-ui.color.warning\": \"Warnung\",\n \"admin/checkout-ui.color.warningFaded\": \"Warnung verblasst\",\n \"admin/checkout-ui.color.muted1\": \"Gedämpft 1\",\n \"admin/checkout-ui.color.muted2\": \"Gedämpft 2\",\n \"admin/checkout-ui.color.muted3\": \"Gedämpft 3\",\n \"admin/checkout-ui.color.muted4\": \"Gedämpft 4\",\n \"admin/checkout-ui.color.muted5\": \"Gedämpft 5\",\n \"admin/checkout-ui.color.muted6\": \"Gedämpft 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Vorschau\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Taste\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Zahlungsmethoden als Akkordeon anzeigen\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Zahlungsmethoden als ausklappbare Bereiche anzeigen. Wenn deaktiviert, werden die Zahlungsmethoden als Registerkarten angezeigt.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Vereinfachtes Versanddatum anzeigen\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Zeigt den geschätzten Liefertag und das Lieferdatum an. Bei Deaktivierung wird der geschätzte Lieferzeitrahmen als \\\"Bis zu X Werktagen\\\" angezeigt.\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Gesamte Artikelzeile anzeigen\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Zeigt die Zeilensumme (Stückpreis x Menge) neben der Mengenauswahl an. Ist diese Option deaktiviert, wird nur der Stückpreis angezeigt.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Notizfeld anzeigen\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"E-Mail-Schritt ausblenden\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Google Adressformular\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Textgröße: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Radius der Umrandung: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Randradius der Schaltfläche: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Höhe der Textfelder:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Maximale Wrapperbreite\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Rand des Containers\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Schriftfamilie\"\n}\n\n```" } ]
code_checkout-ui-custom_d3e00e35
[ { "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 checkout-ui-custom/messages/pl.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Niestandardowe UI kasy\",\n \"admin/checkout-ui.update-warning\": \"Aplikacja została zaktualizowana. Kliknij OPUBLIKUJ, aby zastosować najnowsze poprawki do kasy.\",\n \"admin/checkout-ui.navigation.title\": \"Niestandardowe UI kasy\",\n \"admin/checkout-ui.tab.layout\": \"Układ\",\n \"admin/checkout-ui.tab.colors\": \"Kolory\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"Niestandardowy JavaScript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Zmiany w tym miejscu mogą wpłynąć na sprzedaż\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"Niestandardowy CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Zmiany w tym miejscu mogą wpłynąć na sprzedaż */\",\n \"admin/checkout-ui.tab.history\": \"Historia\",\n \"admin/checkout-ui.button.publish\": \"Opublikuj\",\n \"admin/checkout-ui.message.publishing\": \"Publikowanie w\",\n \"admin/checkout-ui.message.published\": \"Opublikowano w\",\n \"admin/checkout-ui.publish.warning\": \"Publikujesz w przestrzeni roboczej PRODUKCJI. Pamiętaj, że te zmiany mogą wpłynąć na sprzedaż.\",\n \"admin/checkout-ui.publish.confirm\": \"Przejdź dalej\",\n \"admin/checkout-ui.publish.cancel\": \"Anuluj\",\n \"admin/checkout-ui.toggle.active\": \"Aktywna\",\n \"admin/checkout-ui.history.label.email\": \"E-mail\",\n \"admin/checkout-ui.history.label.workspace\": \"Przestrzeń robocza\",\n \"admin/checkout-ui.history.label.version\": \"Wersja aplikacji\",\n \"admin/checkout-ui.history.label.date\": \"Data utworzenia\",\n \"admin/checkout-ui.history.button.load\": \"Załaduj\",\n \"admin/checkout-ui.history.help.appversion\": \"Bieżąca wersja aplikacji:\",\n \"admin/checkout-ui.color.base\": \"Podstawowy\",\n \"admin/checkout-ui.color.baseInverted\": \"Podstawowy odwrócony\",\n \"admin/checkout-ui.color.actionPrimary\": \"Działanie główny\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Działanie główny ciemniejszy\",\n \"admin/checkout-ui.color.actionSecondary\": \"Działanie drugorzędny\",\n \"admin/checkout-ui.color.emphasis\": \"Wyróżnienie\",\n \"admin/checkout-ui.color.disabled\": \"Wyłączone\",\n \"admin/checkout-ui.color.success\": \"Udało się\",\n \"admin/checkout-ui.color.successDarken\": \"Udało się ciemniejszy\",\n \"admin/checkout-ui.color.successFaded\": \"Udało się wyblakły\",\n \"admin/checkout-ui.color.danger\": \"Niebezpieczeństwo\",\n \"admin/checkout-ui.color.dangerFaded\": \"Niebezpieczeństwo wyblakły\",\n \"admin/checkout-ui.color.warning\": \"Ostrzeżenie\",\n \"admin/checkout-ui.color.warningFaded\": \"Ostrzeżenie wyblakły\",\n \"admin/checkout-ui.color.muted1\": \"Przygaszony 1\",\n \"admin/checkout-ui.color.muted2\": \"Przygaszony 2\",\n \"admin/checkout-ui.color.muted3\": \"Przygaszony 3\",\n \"admin/checkout-ui.color.muted4\": \"Przygaszony 4\",\n \"admin/checkout-ui.color.muted5\": \"Przygaszony 5\",\n \"admin/checkout-ui.color.muted6\": \"Przygaszony 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Podgląd\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Przycisk\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Pokaż metody płatności jako harmonijkę\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Wyświetl metody płatności jako rozwijane sekcje. Po wyłączeniu metody płatności są wyświetlane jako karty.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Pokaż uproszczoną datę wysyłki\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Wyświetlaj szacunkowy dzień oraz datę. Po wyłączeniu szacunkowy czas dostawy to „Do X dni roboczych”.\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Pokaż ogółem\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Wyświetl ogółem (cena jednostkowa × ilość) obok selektora ilości. Po wyłączeniu widoczna jest tylko cena jednostkowa.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Pokaż pole uwag\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Ukryj krok e-mail\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Formularz adresu Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Rozmiar tekstu: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Promień obramowania: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Promień obramowania przycisku: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Wysokość pola tekstowego:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Maks. szerokość wrappera\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Ramka kontenera\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Rodzina czcionek\"\n}\n```" } ]
code_checkout-ui-custom_87d71478
[ { "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 checkout-ui-custom/messages/ko-KR.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"체크아웃 UI 사용자 정의\",\n \"admin/checkout-ui.update-warning\": \"이 앱이 업데이트되었습니다. 체크아웃에 최신 수정사항을 적용하려면 [게시;]를 클릭하세요.\",\n \"admin/checkout-ui.permission-warning\":\"게시할 수 있는 권한이 없습니다\", \n \"admin/checkout-ui.permission-tooltip\":\"필수 역할: '저장 주문 양식 구성'\", \n \"admin/checkout-ui.navigation.title\": \"체크아웃 UI 사용자 정의\",\n \"admin/checkout-ui.tab.layout\": \"레이아웃\",\n \"admin/checkout-ui.tab.colors\": \"색\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"사용자 정의 Javascript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// 여기서 변경한 내용은 판매에 영향을 미칠 수 있습니다.\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"사용자 정의 CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* 여기서 변경한 내용은 판매에 영향을 미칠 수 있습니다. */\",\n \"admin/checkout-ui.tab.history\": \"내역\",\n \"admin/checkout-ui.button.publish\": \"게시\",\n \"admin/checkout-ui.message.publishing\": \"게시\",\n \"admin/checkout-ui.message.published\": \"게시됨\",\n \"admin/checkout-ui.publish.warning\": \"프로덕션 작업 공간에 게시 중입니다. 여기서 변경하면 판매에 영향을 미칠 수 있습니다.\",\n \"admin/checkout-ui.publish.confirm\": \"진행\",\n \"admin/checkout-ui.publish.cancel\": \"취소\",\n \"admin/checkout-ui.toggle.active\": \"활성\",\n \"admin/checkout-ui.history.label.email\": \"이메일\",\n \"admin/checkout-ui.history.label.workspace\": \"작업 공간\",\n \"admin/checkout-ui.history.label.version\": \"앱 버전\",\n \"admin/checkout-ui.history.label.date\": \"생성 날짜\",\n \"admin/checkout-ui.history.button.load\": \"로드\",\n \"admin/checkout-ui.history.help.appversion\": \"현재 앱 버전:\",\n \"admin/checkout-ui.color.base\": \"기본\",\n \"admin/checkout-ui.color.baseInverted\": \"Inverted base\",\n \"admin/checkout-ui.color.actionPrimary\": \"Action primary\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Action primary darker\",\n \"admin/checkout-ui.color.actionSecondary\": \"Action secondary\",\n \"admin/checkout-ui.color.emphasis\": \"강조\",\n \"admin/checkout-ui.color.disabled\": \"비활성화됨\",\n \"admin/checkout-ui.color.success\": \"성공\",\n \"admin/checkout-ui.color.successDarken\": \"Success darker\",\n \"admin/checkout-ui.color.successFaded\": \"Success faded\",\n \"admin/checkout-ui.color.danger\": \"Danger\",\n \"admin/checkout-ui.color.dangerFaded\": \"Danger faded\",\n \"admin/checkout-ui.color.warning\": \"경고\",\n \"admin/checkout-ui.color.warningFaded\": \"Warning faded\",\n \"admin/checkout-ui.color.muted1\": \"Muted 1\",\n \"admin/checkout-ui.color.muted2\": \"Muted 2\",\n \"admin/checkout-ui.color.muted3\": \"Muted 3\",\n \"admin/checkout-ui.color.muted4\": \"Muted 4\",\n \"admin/checkout-ui.color.muted5\": \"Muted 5\",\n \"admin/checkout-ui.color.muted6\": \"Muted 6\",\n \"admin/checkout-ui.layout.preview.title\": \"미리보기\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"버튼\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"결제 방법을 아코디언으로 표시\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"결제 방법을 확장 가능한 섹션으로 표시합니다. 비활성화하면 결제 방법이 탭으로 표시됩니다.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"단순화된 배송 날짜 표시\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"예상 배송일과 날짜를 표시합니다. 비활성화된 경우, 예상 배송 시간은 '영업일 기준 최대 X일'로 표시됩니다.\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"항목 라인 합계 표시\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"수량 선택기 옆에 라인 합계(단가 x 수량)를 표시합니다. 비활성화하면 단가만 표시됩니다.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"notes 필드 표시\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"이메일 단계 숨기기\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Google 주소 양식 형식\",\n \"admin/checkout-ui.layout.fontSize.label\": \"텍스트 크기: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"테두리 반경: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"버튼 테두리 반경: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"텍스트 필드 높이:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"최대 포장지 너비\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"컨테이너의 테두리\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"폰트 집합\"\n}\n\n```" } ]
code_checkout-ui-custom_4885899e
[ { "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 checkout-ui-custom/messages/fi.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Räätälöity kassakäyttöliittymä\",\n \"admin/checkout-ui.update-warning\": \"Tämä sovellus on päivitetty. Napsauta JULKAISE lisätäksesi viimeisimmät korjaukset kassalle.\",\n \"admin/checkout-ui.permission-warning\":\"Sinulla ei ole oikeutta julkaista\", \n \"admin/checkout-ui.permission-tooltip\":\"Vaadittu rooli: ”SaveOrderFormConfiguration”\", \n \"admin/checkout-ui.navigation.title\": \"Räätälöity kassakäyttöliittymä\",\n \"admin/checkout-ui.tab.layout\": \"Asettelu\",\n \"admin/checkout-ui.tab.colors\": \"Värit\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"Mukautettu JavaScript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Täällä tehdyt muutokset voivat vaikuttaa myyntiisi\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"Räätälöity CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Täällä tehdyt muutokset voivat vaikuttaa myyntiisi */\",\n \"admin/checkout-ui.tab.history\": \"Historia\",\n \"admin/checkout-ui.button.publish\": \"Julkaise\",\n \"admin/checkout-ui.message.publishing\": \"Julkaistaan kohteeseen\",\n \"admin/checkout-ui.message.published\": \"Julkaistu kohteeseen\",\n \"admin/checkout-ui.publish.warning\": \"Olet julkaisemassa TUOTANTO-työtilaan. Huomioi, että täällä tehdyt muutokset voivat vaikuttaa myyntiisi.\",\n \"admin/checkout-ui.publish.confirm\": \"Jatka\",\n \"admin/checkout-ui.publish.cancel\": \"Peruuta\",\n \"admin/checkout-ui.toggle.active\": \"Aktiivinen\",\n \"admin/checkout-ui.history.label.email\": \"Sähköpostiosoite\",\n \"admin/checkout-ui.history.label.workspace\": \"Työtila\",\n \"admin/checkout-ui.history.label.version\": \"Sovellusversio\",\n \"admin/checkout-ui.history.label.date\": \"Luontipäivämäärä\",\n \"admin/checkout-ui.history.button.load\": \"Lataa\",\n \"admin/checkout-ui.history.help.appversion\": \"Nykyinen sovellusversio:\",\n \"admin/checkout-ui.color.base\": \"Pohja\",\n \"admin/checkout-ui.color.baseInverted\": \"Käänteinen pohja\",\n \"admin/checkout-ui.color.actionPrimary\": \"Päätoiminto\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Päätoiminto tummempi\",\n \"admin/checkout-ui.color.actionSecondary\": \"Toissijainen toiminto\",\n \"admin/checkout-ui.color.emphasis\": \"Korostus\",\n \"admin/checkout-ui.color.disabled\": \"Poissa käytöstä\",\n \"admin/checkout-ui.color.success\": \"Onnistui\",\n \"admin/checkout-ui.color.successDarken\": \"Onnistui, tummempi\",\n \"admin/checkout-ui.color.successFaded\": \"Onnistui, himmennetty\",\n \"admin/checkout-ui.color.danger\": \"Vaara\",\n \"admin/checkout-ui.color.dangerFaded\": \"Vaara, himmennetty\",\n \"admin/checkout-ui.color.warning\": \"Varoitus\",\n \"admin/checkout-ui.color.warningFaded\": \"Varoitus, himmennetty\",\n \"admin/checkout-ui.color.muted1\": \"Mykistetty 1\",\n \"admin/checkout-ui.color.muted2\": \"Mykistetty 2\",\n \"admin/checkout-ui.color.muted3\": \"Mykistetty 3\",\n \"admin/checkout-ui.color.muted4\": \"Mykistetty 4\",\n \"admin/checkout-ui.color.muted5\": \"Mykistetty 5\",\n \"admin/checkout-ui.color.muted6\": \"Mykistetty 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Esikatselu\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Painike\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Näytä maksutavat haitarina\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Näytä maksutavat laajennettavina osioina. Jos tämä on pois käytöstä, maksutavat näytetään välilehtinä.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Näytä yksinkertaistettu lähetyspäivä\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Näyttää arvioidun toimituspäivän ja päivämäärän. Jos tämä on pois käytöstä, arvioitu toimitusaikaikkuna näytetään muodossa \\\"Enintään X arkipäivää\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Näytä tuoterivin loppusumma\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Näytä rivin loppusumma (yksikköhinta x määrä) määrävalitsijan vieressä. Jos tämä on pois käytöstä, vain yksikköhinta näytetään.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Näytä muistiinpanokenttä\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Piilota sähköpostivaihe\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Google-osoitelomakkeen muoto\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Tekstin koko: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Reunan toimintasäde: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Painikkeen reunan toimintasäde: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Tekstikenttien korkeus:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Wrapperin maksimileveys\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Säilön reuna\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Fonttiperhe\"\n}\n\n```" } ]
code_checkout-ui-custom_d4ce53a3
[ { "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 checkout-ui-custom/messages/ja-JP.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"UI カスタムをチェックアウト\",\n \"admin/checkout-ui.update-warning\": \"このアプリはアップデートされています。公開をクリックし、チェックアウトに最新の修正を適用してください。\",\n \"admin/checkout-ui.permission-warning\":\"公開する権限がありません\", \n \"admin/checkout-ui.permission-tooltip\":\"必要な役割:「SaveOrderFormConfiguration」\", \n \"admin/checkout-ui.navigation.title\": \"UI カスタムをチェックアウト\",\n \"admin/checkout-ui.tab.layout\": \"レイアウト\",\n \"admin/checkout-ui.tab.colors\": \"色\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"カスタム Javascript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// こちらで加えた変更は売上に影響を与えることがあります\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"カスタム CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* こちらで加えた変更は売上に影響を与えることがあります */\",\n \"admin/checkout-ui.tab.history\": \"履歴\",\n \"admin/checkout-ui.button.publish\": \"公開する\",\n \"admin/checkout-ui.message.publishing\": \"公開先\",\n \"admin/checkout-ui.message.published\": \"公開先\",\n \"admin/checkout-ui.publish.warning\": \"本番ワークスペースを公開しています。こちらで加えた変更は売上に影響を与えることがあることにご注意ください\",\n \"admin/checkout-ui.publish.confirm\": \"進む\",\n \"admin/checkout-ui.publish.cancel\": \"キャンセル\",\n \"admin/checkout-ui.toggle.active\": \"アクティブ\",\n \"admin/checkout-ui.history.label.email\": \"Eメール\",\n \"admin/checkout-ui.history.label.workspace\": \"ワークスペース\",\n \"admin/checkout-ui.history.label.version\": \"アプリバージョン\",\n \"admin/checkout-ui.history.label.date\": \"作成日\",\n \"admin/checkout-ui.history.button.load\": \"読み込む\",\n \"admin/checkout-ui.history.help.appversion\": \"現在のアプリのバージョン:\",\n \"admin/checkout-ui.color.base\": \"ベース\",\n \"admin/checkout-ui.color.baseInverted\": \"反転ベース\",\n \"admin/checkout-ui.color.actionPrimary\": \"アクションプライマリ\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"強いアクションプライマリ\",\n \"admin/checkout-ui.color.actionSecondary\": \"アクションセカンダリ\",\n \"admin/checkout-ui.color.emphasis\": \"強調\",\n \"admin/checkout-ui.color.disabled\": \"無効になっている\",\n \"admin/checkout-ui.color.success\": \"成功\",\n \"admin/checkout-ui.color.successDarken\": \"強い成功\",\n \"admin/checkout-ui.color.successFaded\": \"弱い成功\",\n \"admin/checkout-ui.color.danger\": \"危険\",\n \"admin/checkout-ui.color.dangerFaded\": \"弱い危険\",\n \"admin/checkout-ui.color.warning\": \"警告\",\n \"admin/checkout-ui.color.warningFaded\": \"弱い警告\",\n \"admin/checkout-ui.color.muted1\": \"ミュート1\",\n \"admin/checkout-ui.color.muted2\": \"ミュート2\",\n \"admin/checkout-ui.color.muted3\": \"ミュート3\",\n \"admin/checkout-ui.color.muted4\": \"ミュート4\",\n \"admin/checkout-ui.color.muted5\": \"ミュート5\",\n \"admin/checkout-ui.color.muted6\": \"ミュート6\",\n \"admin/checkout-ui.layout.preview.title\": \"プレビュー\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"ボタン\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"支払い方法をアコーディオンとして表示\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"支払い方法を拡張可能なセクションで表示します。無効の場合、支払い方法はタブで表示されます。\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"発送日のシンプル表示\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"配送予定日と曜日を表示します。無効の場合、お届け予定日までの時間は「最大 X 営業日」と表示されます。\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"アイテムの行合計額を表示\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"数量セレクタの隣に、行の合計額 (単価 x 数量) を表示します。無効の場合、単価が表示されます。\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"「備考」欄を表示\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Eメールステップを非表示\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Google アドレスフォームフォーマット\",\n \"admin/checkout-ui.layout.fontSize.label\": \"テキストサイズ: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"ボーダーレイジアス: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"ボタンボーダーレイジアス: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"テキストフィールド高:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"最大ラッパー幅\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"コンテナのボーダー\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"フォントファミリー\"\n}\n\n```" } ]
code_checkout-ui-custom_d6b817c4
[ { "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 checkout-ui-custom/messages/pt.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Interface personalizada do checkout\",\n \"admin/checkout-ui.update-warning\": \"Este app foi atualizado. Clique em PUBLICAR para aplicar as últimas correções ao seu checkout.\",\n \"admin/checkout-ui.permission-warning\":\"Você não tem permissão para publicar\", \n \"admin/checkout-ui.permission-tooltip\":\"Permissão necessária: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"Interface personalizada do checkout\",\n \"admin/checkout-ui.tab.layout\": \"Interface\",\n \"admin/checkout-ui.tab.colors\": \"Cores\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"JavaScript personalizado\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// As alterações feitas aqui podem impactar suas vendas\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"CSS avançado\",\n \"admin/checkout-ui.tab.css.helper\": \"/* As alterações feitas aqui podem impactar suas vendas */\",\n \"admin/checkout-ui.tab.history\": \"Histórico\",\n \"admin/checkout-ui.button.publish\": \"Publicar\",\n \"admin/checkout-ui.message.publishing\": \"Publicando em\",\n \"admin/checkout-ui.message.published\": \"Publicado em\",\n \"admin/checkout-ui.publish.warning\": \"Você está publicando em um workspace de PRODUÇÃO. As alterações realizadas aqui podem impactar suas vendas.\",\n \"admin/checkout-ui.publish.confirm\": \"Continuar\",\n \"admin/checkout-ui.publish.cancel\": \"Cancelar\",\n \"admin/checkout-ui.toggle.active\": \"Ativo\",\n \"admin/checkout-ui.history.label.email\": \"Email\",\n \"admin/checkout-ui.history.label.workspace\": \"Workspace\",\n \"admin/checkout-ui.history.label.version\": \"Versão\",\n \"admin/checkout-ui.history.label.date\": \"Data de criação\",\n \"admin/checkout-ui.history.button.load\": \"Carregar\",\n \"admin/checkout-ui.history.help.appversion\": \"Versão atual do app:\",\n \"admin/checkout-ui.color.base\": \"Base\",\n \"admin/checkout-ui.color.baseInverted\": \"Base invertida\",\n \"admin/checkout-ui.color.actionPrimary\": \"Ação primária\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Ação primária escura\",\n \"admin/checkout-ui.color.actionSecondary\": \"Ação secundária\",\n \"admin/checkout-ui.color.emphasis\": \"Ênfase\",\n \"admin/checkout-ui.color.disabled\": \"Desabilitado\",\n \"admin/checkout-ui.color.success\": \"Sucesso\",\n \"admin/checkout-ui.color.successDarken\": \"Sucesso escuro\",\n \"admin/checkout-ui.color.successFaded\": \"Sucesso apagado\",\n \"admin/checkout-ui.color.danger\": \"Perigo\",\n \"admin/checkout-ui.color.dangerFaded\": \"Perigo apagado\",\n \"admin/checkout-ui.color.warning\": \"Atenção\",\n \"admin/checkout-ui.color.warningFaded\": \"Atenção apagado\",\n \"admin/checkout-ui.color.muted1\": \"Apagado 1\",\n \"admin/checkout-ui.color.muted2\": \"Apagado 2\",\n \"admin/checkout-ui.color.muted3\": \"Apagado 3\",\n \"admin/checkout-ui.color.muted4\": \"Apagado 4\",\n \"admin/checkout-ui.color.muted5\": \"Apagado 5\",\n \"admin/checkout-ui.color.muted6\": \"Apagado 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Pré-visualização\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Botão\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Mostrar meios de pagamento no estilo accordion (sanfona)\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Exibe meios de pagamento como seções expansíveis. Se desativado, os meios de pagamento serão exibidos em formato de guias.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Mostrar data de entrega simplificada\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Exibe o dia e a data de entrega estimados. Se desativado, o tempo estimado de entrega será exibido no formato \\\"Em até X dias úteis\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Mostrar linha com valor total\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Exibe o valor total do produto (preço unitário x quantidade) ao lado do seletor de quantidade. Se desativado, somente o preço unitário será exibido.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Mostrar campo de comentários\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Ocultar a etapa de email\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Formulário de endereço do Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Tamanho do texto: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Arredondamento da borda: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Arredondamento da borda do botão: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Altura do campo de texto:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Largura máxima do conteúdo\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Borda do conteúdo\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Família de fontes\"\n}\n\n```" } ]
code_checkout-ui-custom_3248ac5a
[ { "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 checkout-ui-custom/messages/en.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Checkout UI Custom\",\n \"admin/checkout-ui.update-warning\": \"This app has been updated. Please click PUBLISH to apply the latest fixes to your checkout.\",\n \"admin/checkout-ui.permission-warning\":\"You don't have permission to publish\", \n \"admin/checkout-ui.permission-tooltip\":\"Required permission: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"Checkout UI Custom\",\n \"admin/checkout-ui.tab.layout\": \"Layout\",\n \"admin/checkout-ui.tab.colors\": \"Colors\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"Custom JavaScript\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Changes here may impact your sales\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"Custom CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Changes here may impact your sales */\",\n \"admin/checkout-ui.tab.history\": \"History\",\n \"admin/checkout-ui.button.publish\": \"Publish\",\n \"admin/checkout-ui.message.publishing\": \"Publishing to\",\n \"admin/checkout-ui.message.published\": \"Published to\",\n \"admin/checkout-ui.publish.warning\": \"You're publishing to a PRODUCTION workspace. Note that changes here may impact your sales.\",\n \"admin/checkout-ui.publish.confirm\": \"Proceed\",\n \"admin/checkout-ui.publish.cancel\": \"Cancel\",\n \"admin/checkout-ui.toggle.active\": \"Active\",\n \"admin/checkout-ui.history.label.email\": \"Email\",\n \"admin/checkout-ui.history.label.workspace\": \"Workspace\",\n \"admin/checkout-ui.history.label.version\": \"App Version\",\n \"admin/checkout-ui.history.label.date\": \"Created Date\",\n \"admin/checkout-ui.history.button.load\": \"Load\",\n \"admin/checkout-ui.history.help.appversion\": \"Current app version:\",\n \"admin/checkout-ui.color.base\": \"Base\",\n \"admin/checkout-ui.color.baseInverted\": \"Inverted base\",\n \"admin/checkout-ui.color.actionPrimary\": \"Action primary\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Action primary darker\",\n \"admin/checkout-ui.color.actionSecondary\": \"Action secondary\",\n \"admin/checkout-ui.color.emphasis\": \"Emphasis\",\n \"admin/checkout-ui.color.disabled\": \"Disabled\",\n \"admin/checkout-ui.color.success\": \"Success\",\n \"admin/checkout-ui.color.successDarken\": \"Success darker\",\n \"admin/checkout-ui.color.successFaded\": \"Success faded\",\n \"admin/checkout-ui.color.danger\": \"Danger\",\n \"admin/checkout-ui.color.dangerFaded\": \"Danger faded\",\n \"admin/checkout-ui.color.warning\": \"Warning\",\n \"admin/checkout-ui.color.warningFaded\": \"Warning faded\",\n \"admin/checkout-ui.color.muted1\": \"Muted 1\",\n \"admin/checkout-ui.color.muted2\": \"Muted 2\",\n \"admin/checkout-ui.color.muted3\": \"Muted 3\",\n \"admin/checkout-ui.color.muted4\": \"Muted 4\",\n \"admin/checkout-ui.color.muted5\": \"Muted 5\",\n \"admin/checkout-ui.color.muted6\": \"Muted 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Preview\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Button\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Show payment methods as accordion\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Display payment methods as expandable sections. If disabled, payment methods are displayed as tabs.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Show simplified shipping date\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Display the estimated delivery day and date. If disabled, the estimated delivery time is shown as \\\"Up to X business days\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Show item line total\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Display the line total (unit price x quantity) next to the quantity selector. If disabled, only the unit price is shown.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Show notes field\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Hide email step\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Google address form\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Text size: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Border radius: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Button border radius: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Text field height:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Max wrapper width\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Container border\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Font family\"\n}\n\n```" } ]
code_checkout-ui-custom_06445085
[ { "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 checkout-ui-custom/messages/it.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Interfaccia personalizzata del checkout\",\n \"admin/checkout-ui.update-warning\": \"Questa app è stata aggiornata. Clicca su \\\"PUBBLICA\\\" per applicare le ultime correzioni al tuo checkout.\",\n \"admin/checkout-ui.permission-warning\":\"Non hai l'autorizzazione per pubblicare\", \n \"admin/checkout-ui.permission-tooltip\":\"Ruolo richiesto: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"Interfaccia personalizzata del checkout\",\n \"admin/checkout-ui.tab.layout\": \"Layout\",\n \"admin/checkout-ui.tab.colors\": \"Colori\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"JavaScript personalizzato\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Le modifiche apportate qui possono avere un impatto sulle tue vendite\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"CSS personalizzato\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Le modifiche apportate qui possono avere un impatto sulle tue vendite */\",\n \"admin/checkout-ui.tab.history\": \"Cronologia\",\n \"admin/checkout-ui.button.publish\": \"Pubblica\",\n \"admin/checkout-ui.message.publishing\": \"In pubblicazione su\",\n \"admin/checkout-ui.message.published\": \"Pubblicato su\",\n \"admin/checkout-ui.publish.warning\": \"Stai pubblicando su un'area di lavoro in PRODUZIONE. Tieni presente che le modifiche apportate qui potrebbero avere un impatto sulle tue vendite.\",\n \"admin/checkout-ui.publish.confirm\": \"Prosegui\",\n \"admin/checkout-ui.publish.cancel\": \"Annulla\",\n \"admin/checkout-ui.toggle.active\": \"Attivo\",\n \"admin/checkout-ui.history.label.email\": \"Email\",\n \"admin/checkout-ui.history.label.workspace\": \"Area di lavoro\",\n \"admin/checkout-ui.history.label.version\": \"Versione\",\n \"admin/checkout-ui.history.label.date\": \"Data di creazione\",\n \"admin/checkout-ui.history.button.load\": \"Carica\",\n \"admin/checkout-ui.history.help.appversion\": \"Versione attuale dell'app:\",\n \"admin/checkout-ui.color.base\": \"Base\",\n \"admin/checkout-ui.color.baseInverted\": \"Base invertita\",\n \"admin/checkout-ui.color.actionPrimary\": \"Azione primaria\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Azione primaria più scura\",\n \"admin/checkout-ui.color.actionSecondary\": \"Azione secondaria\",\n \"admin/checkout-ui.color.emphasis\": \"Enfasi\",\n \"admin/checkout-ui.color.disabled\": \"Disabilitato\",\n \"admin/checkout-ui.color.success\": \"Operazione riuscita\",\n \"admin/checkout-ui.color.successDarken\": \"Operazione riuscita più scuro\",\n \"admin/checkout-ui.color.successFaded\": \"Operazione riuscita più chiaro\",\n \"admin/checkout-ui.color.danger\": \"Errore\",\n \"admin/checkout-ui.color.dangerFaded\": \"Errore più chiaro\",\n \"admin/checkout-ui.color.warning\": \"Avviso\",\n \"admin/checkout-ui.color.warningFaded\": \"Avviso più chiaro\",\n \"admin/checkout-ui.color.muted1\": \"Tenue 1\",\n \"admin/checkout-ui.color.muted2\": \"Tenue 2\",\n \"admin/checkout-ui.color.muted3\": \"Tenue 3\",\n \"admin/checkout-ui.color.muted4\": \"Tenue 4\",\n \"admin/checkout-ui.color.muted5\": \"Muto 5\",\n \"admin/checkout-ui.color.muted6\": \"Tenue 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Anteprima\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Tasto\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Mostra i metodi di pagamento in modalità accordion\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Visualizza i metodi di pagamento come sezioni espandibili. Se questa funzionalità viene disabilitata, i metodi di pagamento verranno visualizzati come schede.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Mostra la data di consegna semplificata\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Mostra il giorno e la data di consegna stimati. Se questa funzionalità viene disabilitata, il periodo di consegna stimato è mostrato come \\\"entro X giorni lavorativi\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Mostra il valore totale dell'articolo\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Mostra il valore totale dell'articolo (prezzo unitario x quantità) accanto al selettore di quantità. Se questa funzionalità viene disabilitata, verrà visualizzato solo il prezzo unitario.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Mostra il campo 'Note'\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Nascondi step dell'email\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Modulo dell'indirizzo di Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Dimensione del testo: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Raggio del bordo: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Raggio del bordo del tasto: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Altezza del campo di testo:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Larghezza massima del contenuto\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Bordo del contenuto\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Famiglia del tipo di carattere\"\n}\n\n```" } ]
code_checkout-ui-custom_8e5561cc
[ { "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 checkout-ui-custom/messages/ro-RO.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Personalizare Checkout UI\",\n \"admin/checkout-ui.update-warning\": \"Această aplicație a fost actualizată. Te rugăm să apeși pe PUBLICĂ pentru a aplica cele mai recente remedieri la finalizarea comenzii tale.\",\n \"admin/checkout-ui.permission-warning\":\"Nu ai permisiunea să publici\", \n \"admin/checkout-ui.permission-tooltip\":\"Rol necesar: „SaveOrderFormConfiguration”\", \n \"admin/checkout-ui.navigation.title\": \"Personalizare Checkout UI\",\n \"admin/checkout-ui.tab.layout\": \"Mod de afișare\",\n \"admin/checkout-ui.tab.colors\": \"Culori\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"JavaScript Personalizat\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Modificările aici pot avea impact asupra vânzărilor tale\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"Personalizează CSS\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Modificările aici pot avea impact asupra vânzărilor tale */\",\n \"admin/checkout-ui.tab.history\": \"Istoric\",\n \"admin/checkout-ui.button.publish\": \"Publică\",\n \"admin/checkout-ui.message.publishing\": \"Se publică în\",\n \"admin/checkout-ui.message.published\": \"Publicat în\",\n \"admin/checkout-ui.publish.warning\": \"Urmează să publici într-un spațiu de lucru de PRODUCȚIE, te rugăm să reții că modificările de aici pot avea impact asupra vânzărilor tale.\",\n \"admin/checkout-ui.publish.confirm\": \"Continuă\",\n \"admin/checkout-ui.publish.cancel\": \"Anulează\",\n \"admin/checkout-ui.toggle.active\": \"Activ\",\n \"admin/checkout-ui.history.label.email\": \"E-mail\",\n \"admin/checkout-ui.history.label.workspace\": \"Spațiu de lucru\",\n \"admin/checkout-ui.history.label.version\": \"Versiune aplicaţie\",\n \"admin/checkout-ui.history.label.date\": \"Data creării\",\n \"admin/checkout-ui.history.button.load\": \"Încărcătură\",\n \"admin/checkout-ui.history.help.appversion\": \"Versiune aplicație actuală:\",\n \"admin/checkout-ui.color.base\": \"Bază\",\n \"admin/checkout-ui.color.baseInverted\": \"Bază inversată\",\n \"admin/checkout-ui.color.actionPrimary\": \"Acțiune primară\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Acțiune primară mai întunecată\",\n \"admin/checkout-ui.color.actionSecondary\": \"Acțiune secundară\",\n \"admin/checkout-ui.color.emphasis\": \"Accent\",\n \"admin/checkout-ui.color.disabled\": \"Dezactivat\",\n \"admin/checkout-ui.color.success\": \"Succes\",\n \"admin/checkout-ui.color.successDarken\": \"Succes mai întunecat\",\n \"admin/checkout-ui.color.successFaded\": \"Succes estompat\",\n \"admin/checkout-ui.color.danger\": \"Pericol\",\n \"admin/checkout-ui.color.dangerFaded\": \"Pericol dispărut\",\n \"admin/checkout-ui.color.warning\": \"Atenție\",\n \"admin/checkout-ui.color.warningFaded\": \"Atenționare dispărută\",\n \"admin/checkout-ui.color.muted1\": \"Fără sonor 1\",\n \"admin/checkout-ui.color.muted2\": \"Fără sonor 2\",\n \"admin/checkout-ui.color.muted3\": \"Fără sonor 3\",\n \"admin/checkout-ui.color.muted4\": \"Fără sonor 4\",\n \"admin/checkout-ui.color.muted5\": \"Fără sonor 5\",\n \"admin/checkout-ui.color.muted6\": \"Fără sonor 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Previzualizare\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Buton\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Arată metodele de plată sub formă de acordeon\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Afișează metodele de plată ca secțiuni extensibile. Dacă este dezactivat, metodele de plată sunt afișate ca tab-uri.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Arată dată de expediere simplificată\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Afișează data și ziua estimată a livrării. Dacă este dezactivat, se afișează intervalul de timp estimat al livrării ca „Până la X zile lucrătoare”.\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Arată valoarea totală a produsului\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Afișează totalul liniei (preț unitar x cantitate) lângă selectorul de cantitate. Dacă este dezactivat, se afișează doar prețul unitar.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Arată câmpul de observați\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Ascunde pasul cu e-mail\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Formular Adrese Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Dimensiune text: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Rază margine: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Rază margine buton: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Înălțime câmpuri de text:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Lățime maximă wrapper\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Marginea containerului\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Familie de fonturi\"\n}\n\n```" } ]
code_checkout-ui-custom_5a7435b2
[ { "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 checkout-ui-custom/messages/context.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.navigation.title\": \"admin/checkout-ui.navigation.title\",\n \"admin/checkout-ui.title\": \"admin/checkout-ui.title\",\n \"admin/checkout-ui.update-warning\": \"admin/checkout-ui.update-warning\",\n \"admin/checkout-ui.permission-warning\": \"admin/checkout-ui.permission-warning\",\n \"admin/checkout-ui.permission-tooltip\": \"admin/checkout-ui.permission-tooltip\",\n \"admin/checkout-ui.tab.layout\": \"admin/checkout-ui.tab.layout\",\n \"admin/checkout-ui.tab.colors\": \"admin/checkout-ui.tab.colors\",\n \"admin/checkout-ui.tab.javascript\": \"admin/checkout-ui.tab.javascript\",\n \"admin/checkout-ui.tab.javascript.label\": \"admin/checkout-ui.tab.javascript.label\",\n \"admin/checkout-ui.tab.javascript.helper\": \"//admin/checkout-ui.tab.javascript.helper\",\n \"admin/checkout-ui.tab.css\": \"admin/checkout-ui.tab.css\",\n \"admin/checkout-ui.tab.css.label\": \"admin/checkout-ui.tab.css.label\",\n \"admin/checkout-ui.tab.css.helper\": \"/*admin/checkout-ui.tab.css.helper */\",\n \"admin/checkout-ui.tab.history\": \"admin/checkout-ui.tab.history\",\n \"admin/checkout-ui.button.publish\": \"admin/checkout-ui.button.publish\",\n \"admin/checkout-ui.message.publishing\": \"admin/checkout-ui.message.publishing\",\n \"admin/checkout-ui.message.published\": \"admin/checkout-ui.message.published\",\n \"admin/checkout-ui.publish.warning\": \"admin/checkout-ui.publish.warning\",\n \"admin/checkout-ui.publish.confirm\": \"admin/checkout-ui.publish.confirm\",\n \"admin/checkout-ui.publish.cancel\": \"admin/checkout-ui.publish.cancel\",\n \"admin/checkout-ui.toggle.active\": \"admin/checkout-ui.toggle.active\",\n \"admin/checkout-ui.history.label.email\": \"admin/checkout-ui.history.label.email\",\n \"admin/checkout-ui.history.label.workspace\": \"admin/checkout-ui.history.label.workspace\",\n \"admin/checkout-ui.history.label.version\": \"admin/checkout-ui.history.label.version\",\n \"admin/checkout-ui.history.label.date\": \"admin/checkout-ui.history.label.date\",\n \"admin/checkout-ui.history.button.load\": \"admin/checkout-ui.history.button.load\",\n \"admin/checkout-ui.history.help.appversion\": \"admin/checkout-ui.history.help.appversion\",\n \"admin/checkout-ui.color.base\": \"admin/checkout-ui.color.base\",\n \"admin/checkout-ui.color.baseInverted\": \"admin/checkout-ui.color.baseInverted\",\n \"admin/checkout-ui.color.actionPrimary\": \"admin/checkout-ui.color.actionPrimary\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"admin/checkout-ui.color.actionPrimaryDarken\",\n \"admin/checkout-ui.color.actionSecondary\": \"admin/checkout-ui.color.actionSecondary\",\n \"admin/checkout-ui.color.emphasis\": \"admin/checkout-ui.color.emphasis\",\n \"admin/checkout-ui.color.disabled\": \"admin/checkout-ui.color.disabled\",\n \"admin/checkout-ui.color.success\": \"admin/checkout-ui.color.success\",\n \"admin/checkout-ui.color.successDarken\": \"admin/checkout-ui.color.successDarken\",\n \"admin/checkout-ui.color.successFaded\": \"admin/checkout-ui.color.successFaded\",\n \"admin/checkout-ui.color.danger\": \"admin/checkout-ui.color.danger\",\n \"admin/checkout-ui.color.dangerFaded\": \"admin/checkout-ui.color.dangerFaded\",\n \"admin/checkout-ui.color.warning\": \"admin/checkout-ui.color.warning\",\n \"admin/checkout-ui.color.warningFaded\": \"admin/checkout-ui.color.warningFaded\",\n \"admin/checkout-ui.color.muted1\": \"admin/checkout-ui.color.muted1\",\n \"admin/checkout-ui.color.muted2\": \"admin/checkout-ui.color.muted2\",\n \"admin/checkout-ui.color.muted3\": \"admin/checkout-ui.color.muted3\",\n \"admin/checkout-ui.color.muted4\": \"admin/checkout-ui.color.muted4\",\n \"admin/checkout-ui.color.muted5\": \"admin/checkout-ui.color.muted5\",\n \"admin/checkout-ui.color.muted6\": \"admin/checkout-ui.color.muted6\",\n \"admin/checkout-ui.layout.preview.title\": \"admin/checkout-ui.layout.preview.title\",\n \"admin/checkout-ui.layout.preview.sample\": \"admin/checkout-ui.layout.preview.sample\",\n \"admin/checkout-ui.layout.preview.button\": \"admin/checkout-ui.layout.preview.button\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"admin/checkout-ui.layout.accordionPayments.label\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"admin/checkout-ui.layout.accordionPayments.help\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"admin/checkout-ui.layout.deliveryDateFormat.label\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"admin/checkout-ui.layout.showCartQuantityPrice.label\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"admin/checkout-ui.layout.showNoteField.label\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"admin/checkout-ui.layout.hideEmailStep.label\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"admin/checkout-ui.layout.customAddressForm.label\",\n \"admin/checkout-ui.layout.fontSize.label\": \"admin/checkout-ui.layout.fontSize.label\",\n \"admin/checkout-ui.layout.borderRadius.label\": \"admin/checkout-ui.layout.borderRadius.label\",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"admin/checkout-ui.layout.btnBorderRadius.label\",\n \"admin/checkout-ui.layout.inputHeight.label\": \"admin/checkout-ui.layout.inputHeight.label\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"admin/checkout-ui.layout.maxWrapper.label\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"admin/checkout-ui.layout.bordersContainers.label\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"admin/checkout-ui.layout.fontFamily.label\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"admin/checkout-ui.layout.deliveryDateFormat.help\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"admin/checkout-ui.layout.showCartQuantityPrice.help\"\n}\n\n```" } ]
code_checkout-ui-custom_71829e5b
[ { "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 checkout-ui-custom/messages/es.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"Interfaz personalizada del checkout\",\n \"admin/checkout-ui.update-warning\": \"Esta aplicación ha sido actualizada. Por favor, haz clic en PUBLICAR para aplicar las últimas correcciones a tu checkout.\",\n \"admin/checkout-ui.permission-warning\":\"No tienes permiso para publicar\", \n \"admin/checkout-ui.permission-tooltip\":\"Permiso necesario: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"Interfaz personalizada del checkout\",\n \"admin/checkout-ui.tab.layout\": \"Layout\",\n \"admin/checkout-ui.tab.colors\": \"Colores\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"JavaScript personalizado\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// Las modificaciones que realices aquí pueden impactar tus ventas\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"CSS personalizado\",\n \"admin/checkout-ui.tab.css.helper\": \"/* Las modificaciones que realices aquí pueden impactar tus ventas */\",\n \"admin/checkout-ui.tab.history\": \"Historial\",\n \"admin/checkout-ui.button.publish\": \"Publicar\",\n \"admin/checkout-ui.message.publishing\": \"Publicando en\",\n \"admin/checkout-ui.message.published\": \"Publicado en\",\n \"admin/checkout-ui.publish.warning\": \"Estás publicando en un workspace de PRODUCCIÓN. Ten en cuenta que las modificaciones aquí realizadas pueden impactar tus ventas.\",\n \"admin/checkout-ui.publish.confirm\": \"Continuar\",\n \"admin/checkout-ui.publish.cancel\": \"Cancelar\",\n \"admin/checkout-ui.toggle.active\": \"Activo\",\n \"admin/checkout-ui.history.label.email\": \"Email\",\n \"admin/checkout-ui.history.label.workspace\": \"Workspace\",\n \"admin/checkout-ui.history.label.version\": \"Versión\",\n \"admin/checkout-ui.history.label.date\": \"Fecha de creación\",\n \"admin/checkout-ui.history.button.load\": \"Cargar\",\n \"admin/checkout-ui.history.help.appversion\": \"Versión actual de la app:\",\n \"admin/checkout-ui.color.base\": \"Base\",\n \"admin/checkout-ui.color.baseInverted\": \"Base invertida\",\n \"admin/checkout-ui.color.actionPrimary\": \"Acción primaria\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"Acción primaria oscura\",\n \"admin/checkout-ui.color.actionSecondary\": \"Acción secundaria\",\n \"admin/checkout-ui.color.emphasis\": \"Énfasis\",\n \"admin/checkout-ui.color.disabled\": \"Desactivado\",\n \"admin/checkout-ui.color.success\": \"Éxito\",\n \"admin/checkout-ui.color.successDarken\": \"Éxito oscuro\",\n \"admin/checkout-ui.color.successFaded\": \"Éxito atenuado\",\n \"admin/checkout-ui.color.danger\": \"Peligro\",\n \"admin/checkout-ui.color.dangerFaded\": \"Peligro atenuado\",\n \"admin/checkout-ui.color.warning\": \"Atención\",\n \"admin/checkout-ui.color.warningFaded\": \"Atención atenuada\",\n \"admin/checkout-ui.color.muted1\": \"Apagado 1\",\n \"admin/checkout-ui.color.muted2\": \"Apagado 2\",\n \"admin/checkout-ui.color.muted3\": \"Apagado 3\",\n \"admin/checkout-ui.color.muted4\": \"Apagado 4\",\n \"admin/checkout-ui.color.muted5\": \"Apagado 5\",\n \"admin/checkout-ui.color.muted6\": \"Apagado 6\",\n \"admin/checkout-ui.layout.preview.title\": \"Vista previa\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"Botón\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"Mostrar medios de pago en formato acordeón\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"Muestra medios de pago como secciones que se pueden expandir. Si está desactivado, los medios de pago se mostrarán como pestañas.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"Mostrar fecha de envío simplificada\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"Muestra el día y la fecha de entrega estimada. Si está desactivado, se mostrará el plazo estimado de entrega como \\\"En hasta X días laborables\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"Mostrar valor total del ítem\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"Muestra el valor total del ítem resumido (precio unitario x cantidad) junto al selector de cantidad. Si está desactivado, solo se muestra el precio unitario.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"Mostrar campo de comentarios\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"Ocultar el paso de email\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"Formulario de dirección de Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"Tamaño del texto: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"Radio del borde: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"Radio del borde del botón: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"Altura del campo de texto:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"Anchura máxima del contenedor\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"Borde del contenedor\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"Familia de fuentes\"\n}\n\n```" } ]
code_checkout-ui-custom_2aebdb80
[ { "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 checkout-ui-custom/messages/ar.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/checkout-ui.title\": \"واجهة المستخدم المخصصة للدفع\",\n \"admin/checkout-ui.update-warning\": \"تم تحديث هذا التطبيق. الرجاء النقر فوق \\\"نشر\\\" لتطبيق أحدث الإصلاحات على عملية الدفع الخاصة بك.\",\n \"admin/checkout-ui.permission-warning\":\"ليس لديك إذن للنشر\", \n \"admin/checkout-ui.permission-tooltip\":\"الدور المطلوب: 'SaveOrderFormConfiguration'\", \n \"admin/checkout-ui.navigation.title\": \"واجهة المستخدم المخصصة للدفع\",\n \"admin/checkout-ui.tab.layout\": \"التصميم\",\n \"admin/checkout-ui.tab.colors\": \"الألوان\",\n \"admin/checkout-ui.tab.javascript\": \"JavaScript\",\n \"admin/checkout-ui.tab.javascript.label\": \"Javascript مخصص\",\n \"admin/checkout-ui.tab.javascript.helper\": \"// التغييرات هنا قد تؤثر على مبيعاتك\",\n \"admin/checkout-ui.tab.css\": \"CSS\",\n \"admin/checkout-ui.tab.css.label\": \"CSS مخصص\",\n \"admin/checkout-ui.tab.css.helper\": \"/* التغييرات هنا قد تؤثر على مبيعاتك */\",\n \"admin/checkout-ui.tab.history\": \"السجل\",\n \"admin/checkout-ui.button.publish\": \"نشر\",\n \"admin/checkout-ui.message.publishing\": \"النشر إلى\",\n \"admin/checkout-ui.message.published\": \"تم النشر إلى\",\n \"admin/checkout-ui.publish.warning\": \"أنت تنشر في مساحة عمل الإنتاج، كن على علمٍ بأن التغييرات هنا قد تؤثر على مبيعاتك\",\n \"admin/checkout-ui.publish.confirm\": \"أكمل\",\n \"admin/checkout-ui.publish.cancel\": \"إلغاء\",\n \"admin/checkout-ui.toggle.active\": \"نشطة\",\n \"admin/checkout-ui.history.label.email\": \"البريد الإلكتروني\",\n \"admin/checkout-ui.history.label.workspace\": \"مساحة العمل\",\n \"admin/checkout-ui.history.label.version\": \"إصدار التطبيق\",\n \"admin/checkout-ui.history.label.date\": \"تاريخ الإنشاء\",\n \"admin/checkout-ui.history.button.load\": \"تحميل\",\n \"admin/checkout-ui.history.help.appversion\": \"الإصدار الحالي للتطبيق:\",\n \"admin/checkout-ui.color.base\": \"الأساس\",\n \"admin/checkout-ui.color.baseInverted\": \"قاعدة معكوسة\",\n \"admin/checkout-ui.color.actionPrimary\": \"الإجراء الأساسي\",\n \"admin/checkout-ui.color.actionPrimaryDarken\": \"الإجراء الأساسي الأغمق\",\n \"admin/checkout-ui.color.actionSecondary\": \"الإجراء الثانوي\",\n \"admin/checkout-ui.color.emphasis\": \"التشديد\",\n \"admin/checkout-ui.color.disabled\": \"غير مفعّل\",\n \"admin/checkout-ui.color.success\": \"ناجح\",\n \"admin/checkout-ui.color.successDarken\": \"تغميق ناجح\",\n \"admin/checkout-ui.color.successFaded\": \"تخفيف ناجح\",\n \"admin/checkout-ui.color.danger\": \"خطر\",\n \"admin/checkout-ui.color.dangerFaded\": \"تخفيف الخطر\",\n \"admin/checkout-ui.color.warning\": \"تحذير\",\n \"admin/checkout-ui.color.warningFaded\": \"تخفيف التحذير\",\n \"admin/checkout-ui.color.muted1\": \"صامت 1\",\n \"admin/checkout-ui.color.muted2\": \"صامت 2\",\n \"admin/checkout-ui.color.muted3\": \"صامت 3\",\n \"admin/checkout-ui.color.muted4\": \"صامت 4\",\n \"admin/checkout-ui.color.muted5\": \"صامت 5\",\n \"admin/checkout-ui.color.muted6\": \"صامت 6\",\n \"admin/checkout-ui.layout.preview.title\": \"معاينة\",\n \"admin/checkout-ui.layout.preview.sample\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean finibus malesuada nisi, sit amet egestas magna vestibulum eget. Maecenas tempus sollicitudin enim quis semper\",\n \"admin/checkout-ui.layout.preview.button\": \"الزر\",\n \"admin/checkout-ui.layout.accordionPayments.label\": \"إظهار طرق الدفع كأكورديون\",\n \"admin/checkout-ui.layout.accordionPayments.help\": \"عرض طرق الدفع كأقسام قابلة للتوسع. إذا تم تعطيلها، يتم عرض طرق الدفع كعلامات تبويب.\",\n \"admin/checkout-ui.layout.deliveryDateFormat.label\": \"إظهار تاريخ الشحن المبسط\",\n \"admin/checkout-ui.layout.deliveryDateFormat.help\": \"عرض يوم التسليم والتاريخ المقدرين. إذا تم تعطيله، يتم عرض الإطار الزمني المقدر للتسليم كـ \\\"حتى X يوم عمل\\\".\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.label\": \"إظهار مجموع سطر العنصر\",\n \"admin/checkout-ui.layout.showCartQuantityPrice.help\": \"عرض إجمالي الخط (سعر الوحدة x الكمية) بجانب محدد الكمية. إذا تم تعطيله، يتم عرض سعر الوحدة فقط.\",\n \"admin/checkout-ui.layout.showNoteField.label\": \"إظهار حقل الملاحظات\",\n \"admin/checkout-ui.layout.hideEmailStep.label\": \"إخفاء خطوة البريد الإلكتروني\",\n \"admin/checkout-ui.layout.customAddressForm.label\": \"تنسيق نموذج عناوين Google\",\n \"admin/checkout-ui.layout.fontSize.label\": \"حجم النص: \",\n \"admin/checkout-ui.layout.borderRadius.label\": \"حد نصف القطر: \",\n \"admin/checkout-ui.layout.btnBorderRadius.label\": \"زر حد نصف القطر: \",\n \"admin/checkout-ui.layout.inputHeight.label\": \"ارتفاع حقول النص:\",\n \"admin/checkout-ui.layout.maxWrapper.label\": \"أقصى عرض للغلاف\",\n \"admin/checkout-ui.layout.bordersContainers.label\": \"حدود الحاوية\",\n \"admin/checkout-ui.layout.fontFamily.label\": \"عائلة الخط\"\n}\n\n```" } ]
code_checkout-ui-custom_20582a97
[ { "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 checkout-ui-custom/checkout-ui-custom/checkout5-custom.css from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n/* /files/checkout5-custom.css */\n\n/* Displays the option to enter a foreign document */\n.document-box { display: block; }\n\n/* Displays the option to enter an international phone */\n.phone-box { display: block; }\n\n```" } ]
code_checkout-ui-custom_d753f0ef
[ { "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 checkout-ui-custom/checkout-ui-custom/package.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"us-checkout-builder\",\n \"version\": \"1.0.4\",\n \"description\": \"Variations of Checkout Vertical or Horizontal\",\n \"main\": \"index.js\",\n \"scripts\": {\n \"build\": \"cross-env NODE_ENV=production webpack\",\n \"watch\": \"webpack --watch\",\n \"app\": \"cross-env NODE_ENV=production webpack --config webpack.prod.js\"\n },\n \"author\": \"Lucas Vyskubenko <lucas.vysk@vtex.com> (https://github.com/lucvysk)\",\n \"license\": \"VTEX\",\n \"dependencies\": {\n \"git\": \"^0.1.5\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^7.0.0\",\n \"@babel/runtime-corejs2\": \"^7.0.0\",\n \"@vtex/address-form\": \"^3.35.2\",\n \"babel-loader\": \"^8.0.0\",\n \"cross-env\": \"^5.2.0\",\n \"css-loader\": \"^1.0.0\",\n \"eslint\": \"^8.40.0\",\n \"extract-loader\": \"^2.0.1\",\n \"file-loader\": \"^2.0.0\",\n \"postcss-cli\": \"^6.0.0\",\n \"postcss-loader\": \"^3.0.0\",\n \"sass\": \"^1.69.5\",\n \"sass-loader\": \"^7.1.0\",\n \"webpack\": \"^5.97.1\",\n \"webpack-cli\": \"^3.1.0\",\n \"webpack-dev-server\": \"^5.2.0\"\n }\n}\n\n```" } ]
code_checkout-ui-custom_80a5e270
[ { "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 checkout-ui-custom/checkout-ui-custom/webpack.prod.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nconst path = require('path')\n\nconst config = {\n // TODO: Add common Configuration\n module: {},\n}\n\nconst defaultConfig = {\n ...config,\n mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',\n entry: ['./src/checkout6-custom.js', './src/checkout6-custom.scss'],\n output: {\n filename: 'checkout6-custom.js',\n path: path.resolve(__dirname, './'),\n },\n module: {\n rules: [\n {\n test: /\\.scss$/,\n use: [\n {\n loader: 'file-loader',\n options: {\n name: '[name].css',\n },\n },\n {\n loader: 'extract-loader',\n },\n {\n loader: 'css-loader?-url',\n },\n {\n loader: 'sass-loader',\n },\n ],\n },\n ],\n },\n}\n\nconst appConfig = {\n ...config,\n mode: 'production',\n entry: ['./src/app.checkout6-custom.js', './src/app.checkout6-custom.scss'],\n output: {\n filename: 'checkout6-custom.js',\n path: path.resolve(__dirname, '../node/templates'),\n },\n module: {\n rules: [\n {\n test: /\\.scss$/,\n use: [\n {\n loader: 'file-loader',\n options: {\n name: 'checkout6-custom.css',\n },\n },\n {\n loader: 'extract-loader',\n },\n {\n loader: 'css-loader?-url',\n },\n {\n loader: 'sass-loader',\n },\n ],\n },\n ],\n },\n}\n\n// Return Array of Configurations\nmodule.exports = [defaultConfig, appConfig]\n\n```" } ]
code_checkout-ui-custom_953cde1c
[ { "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 checkout-ui-custom/checkout-ui-custom/checkout5-custom.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// WARNING: THE USAGE OF CUSTOM SCRIPTS IS NOT SUPPORTED. VTEX IS NOT LIABLE FOR ANY DAMAGES THIS MAY CAUSE. THIS MAY BREAK YOUR STORE AND STOP SALES. IN CASE OF ERRORS, PLEASE DELETE THE CONTENT OF THIS SCRIPT.\n\n```" } ]
code_checkout-ui-custom_bfb035a8
[ { "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 checkout-ui-custom/checkout-ui-custom/postcss.config.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nmodule.exports = {\n plugins: {\n autoprefixer: {},\n },\n}\n\n```" } ]
code_checkout-ui-custom_0c70c47c
[ { "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 checkout-ui-custom/admin/navigation.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n[\n {\n \"section\": \"storeSetup\",\n \"titleId\": \"admin/checkout-ui.navigation.title\",\n \"path\": \"/admin/vtex-checkout-ui-custom/\",\n \"LMProductId\": \"27\"\n },\n {\n \"section\": \"storeSettings\",\n \"subSection\": \"storeFront\",\n \"adminVersion\": 4,\n \"LMProductId\": \"27\",\n \"subSectionItems\": [\n {\n \"labelId\": \"admin/checkout-ui.navigation.title\",\n \"path\": \"/admin/vtex-checkout-ui-custom/\"\n }\n ]\n }\n]\n\n```" } ]
code_checkout-ui-custom_bbcc2299
[ { "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 checkout-ui-custom/admin/routes.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin.app.checkout-ui\": {\n \"component\": \"Admin\",\n \"path\": \"/admin/app/vtex-checkout-ui-custom\"\n }\n}\n\n```" } ]
code_checkout-ui-custom_8ebdc951
[ { "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 checkout-ui-custom/docs/README.md from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Checkout UI Custom\n\n## ⚠️ Maintenance ⚠️\n*Starting June 1st 2023, this application will no longer be maintained by VTEX.*\n\n---\n\nThe Checkout UI Custom app is responsible for customizing your store's Checkout UI through the admin's interface.\n\n![checkout-ui-custom](https://user-images.githubusercontent.com/52087100/91737149-11cc4980-eb85-11ea-9b74-a54721de67bc.png)\n\n## Configuration\n\n1. Using your terminal and the [VTEX IO Toolbelt](https://vtex.io/docs/recipes/development/vtex-io-cli-installment-and-command-reference), log into the desired VTEX account.\n2. Run `vtex install vtex.checkout-ui-custom` on the account you're working on.\n3. Access your VTEX account's admin.\n4. Access **Store Setup** and then **Checkout UI Custom**.\n5. Make the desired changes using the interface and click on `Publish`.\n\nℹ️ \\_Once the app is installed in your account, the `checkout6-custom.js` and `checkout6-custom.css` files will be replaced by the ones generated by this app.*\n\n## Modus Operandi\n\nIf you access your VTEX account's admin using a [Development workspace](https://vtex.io/docs/concepts/workspace/) and publish your changes, the configurations performed using the app will only be applied into the workspace you are working in and not in your store Checkout.\n\nHowever, notice the following: **you should not perform any changes in your account's Master workspace to make your Checkout UI configurations publicly available**. Instead, you should use a Development workspace and the **History** tab displayed on the admin app.\n\nThe `History` tab enables you to load app change history and, therefore, helps your checkout UI coding by reusing configurations performed in previous workspaces.\n\nLet's assume you were working in a [Development workspace](https://vtex.io/docs/recipes/development/creating-a-development-workspace) called `testredcolor`, and now want your changes to be public. According to how workspaces work in the platform, your changes first need to be applied in a [Production workspace](https://vtex.io/docs/recipes/development/creating-a-production-workspace) that, in turn, will be [promoted to Master](https://vtex.io/docs/recipes/development/promoting-a-workspace-to-master) later.\n\nFor this purpose, you can access the `History` tab using the desired Production workspace, load your last changes from `testredcolor` and then click on `Publish`, copying your configurations to the Production workspace you are currently working in.\n\n⚠️ _The Header and Footer HTMLs are still configured using the admin's Portal (`/admin/portal/#/sites`). In order to properly use the Checkout UI Custom app, it is strongly recommended to use the HTMLs stated below:_\n\n- **Header HTML:**\n\n```html\n<header class=\"main-header\">\n <div class=\"container\">\n <div class=\"header-link\">\n <a href=\"/\" title=\"add more products\" class=\"buy-more-link link\"\n >Continue shopping</a\n >\n <a\n href=\"/checkout/#/cart\"\n title=\"back to cart\"\n class=\"back-cart-link link\"\n >Back to Cart</a\n >\n </div>\n <a href=\"/\" title=\"Go to homepage\" class=\"logo\">{logo.image}</a>\n </div>\n</header>\n```\n\nIf you want to insert other contents, make sure of include the class `.v-custom-mhide` to hide it on mobile resolutions. For example:\n\n```html\n<header class=\"main-header\"> ... </header>\n<div class=\"promobar v-custom-mhide> ... </div>\n```\n\n- **Footer HTML:**\n\n```html\n<footer class=\"main-footer\">\n <div class=\"container\">\n <a class=\"credits-vtex\" href=\"http://www.vtex.com/\" target=\"_blank\"\n ><img src=\"http://brand.vtex.com/static/media/VTEX_pink_RGB.751a9fb5.svg\"\n /></a>\n </div>\n</footer>\n```\n\n<details>\n <summary>If you are yet using the classic CMS</summary>\n You can create a workspace and install the app by there. While using the app, you will need apply your changes and copy/paste the content of the files to your portal.\n</details>\n\n## For VTEX Developers\n\nWhen developing a new version of Checkout UI Custom, take care to compile the checkout files prior to opening a PR and/or publishing a new version of the app. This can be done by running `yarn app` in your CLI, inside the app's `/checkout-ui-custom/` subfolder.\n\nDuring implementation, you will need to run `vtex link` on the root folder and also watch assets by running `yarn watch` in the `/checkout-ui-custom/` subfolder\n\n❗Note that during implementation, avoid publishing changes to the workspace. As this will permanently add the changes to the workspace and any changes to the app will not be shown. \n\n\n#\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<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n<!-- DOCS-IGNORE:end -->\n\n```" } ]
code_checkout-ui-custom_9f5a88e5
[ { "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 checkout-ui-custom/graphql/schema.graphql from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\ntype Query {\n getSetupConfig: GetSetupConfigResponse @cacheControl(scope: PRIVATE)\n getHistory: [GetHistoryResponse] @cacheControl(scope: PRIVATE)\n getLast(workspace: String): GetLastResponse @cacheControl(scope: PRIVATE)\n getById(id: String): ConfigResponse @cacheControl(scope: PRIVATE)\n getPermissions: GetPermissionsResponse @cacheControl(scope: PRIVATE)\n}\n\ntype Mutation {\n saveChanges(\n email: String\n workspace: String\n layout: CustomFields\n javascript: String\n css: String\n javascriptActive: Boolean\n cssActive: Boolean\n colors: CustomFields\n ): String @cacheControl(scope: PRIVATE)\n}\n\nscalar CustomFields\ntype ConfigResponse {\n layout: CustomFields\n colors: CustomFields\n javascript: String\n css: String\n javascriptActive: Boolean\n cssActive: Boolean\n}\ntype GetLastResponse {\n id: String\n email: String\n workspace: String\n creationDate: String\n appVersion: String\n layout: CustomFields\n colors: CustomFields\n javascript: String\n css: String\n javascriptActive: Boolean\n cssActive: Boolean\n}\n\ntype GetHistoryResponse {\n id: String\n email: String\n workspace: String\n creationDate: String\n appVersion: String\n}\n\ntype GetPermissionsResponse {\n access: Boolean\n}\ntype GetSetupConfigResponse {\n adminSetup: AdminSetupResponse\n}\ntype AdminSetupResponse {\n hasSchema: Boolean\n schemaVersion: String\n appVersion: String\n}\n\n```" } ]
code_checkout-ui-custom_bc249536
[ { "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 checkout-ui-custom/node/service.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"stack\": \"nodejs\",\n \"memory\": 1224,\n \"timeout\": 40,\n \"minReplicas\": 10,\n \"maxReplicas\": 100,\n \"routes\": {\n \"apiGetCountryRules\": {\n \"path\": \"/rules/:countryCode\",\n \"public\": true\n },\n \"getHolidays\": {\n \"path\": \"/_v/holidays\",\n \"public\": true\n }\n }\n}\n\n```" } ]
code_checkout-ui-custom_97e9bcd0
[ { "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 checkout-ui-custom/node/package.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.checkout-ui-custom\",\n \"version\": \"0.20.1\",\n \"dependencies\": {\n \"@vtex/address-form\": \"^3.35.2\",\n \"@vtex/api\": \"6.48.0\",\n \"co-body\": \"^6.0.0\",\n \"ramda\": \"^0.25.0\"\n },\n \"devDependencies\": {\n \"@types/bluebird\": \"^3.5.25\",\n \"@types/co-body\": \"0.0.3\",\n \"@types/jest\": \"^27.0.2\",\n \"@types/node\": \"^12.0.0\",\n \"@types/ramda\": \"types/npm-ramda#dist\",\n \"@vtex/api\": \"6.48.0\",\n \"@vtex/prettier-config\": \"^0.3.1\",\n \"@vtex/tsconfig\": \"^0.6.0\",\n \"tslint\": \"^5.12.0\",\n \"tslint-config-prettier\": \"^1.18.0\",\n \"tslint-config-vtex\": \"^2.1.0\",\n \"typescript\": \"3.9.7\",\n \"vtex.checkout-ui-custom\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-ui-custom@0.18.1/public/@types/vtex.checkout-ui-custom\",\n \"vtex.checkout-ui-settings-server\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-ui-settings-server@0.5.1/public/_types/react\",\n \"vtex.email-checkout-conflict\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.email-checkout-conflict@0.3.0/public/_types/react\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.134.2/public/@types/vtex.render-runtime\",\n \"vtex.store-resources\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.96.0/public/@types/vtex.store-resources\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.9/public/@types/vtex.styleguide\"\n },\n \"scripts\": {\n \"lint\": \"tsc --noEmit && tslint -c tslint.json './**/*.ts'\"\n }\n}\n\n```" } ]
code_checkout-ui-custom_1dad3af6
[ { "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 checkout-ui-custom/node/index.ts from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { Cached, ServiceContext, ClientsConfig } from '@vtex/api'\nimport { Service, LRUCache } from '@vtex/api'\n\nimport { Clients } from './clients'\nimport { resolvers } from './graphql'\n\nconst TIMEOUT_MS = 4000\nconst defaultClientOptions = {\n retries: 1,\n timeout: TIMEOUT_MS,\n}\n\nconst memoryCache = new LRUCache<string, Cached>({ max: 1000 })\n\ndeclare global {\n // We declare a global Context type just to avoid re-writing ServiceContext<Clients, State> in every handler and resolver\n type Context = ServiceContext<Clients>\n\n // The shape of our State object found in `ctx.state`. This is used as state bag to communicate between middlewares.\n interface State {\n code: number\n }\n}\n\nconst clients: ClientsConfig<Clients> = {\n implementation: Clients,\n options: {\n default: defaultClientOptions,\n settings: {\n memoryCache,\n },\n },\n}\n\n// Export a service that defines route handlers and client options.\nexport default new Service({\n clients,\n graphql: {\n resolvers: {\n Query: resolvers.Query,\n Mutation: resolvers.Mutation,\n },\n },\n routes: resolvers.Routes,\n})\n\n```" } ]
code_checkout-ui-custom_e738d963
[ { "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 checkout-ui-custom/react/package.json from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"checkout-ui-custom-app\",\n \"version\": \"0.20.1\",\n \"devDependencies\": {\n \"@types/jest\": \"^26.0.4\",\n \"@types/node\": \"^14.0.14\",\n \"@types/prop-types\": \"^15.7.0\",\n \"@types/react\": \"^16.9.41\",\n \"@vtex/test-tools\": \"^3.1.0\",\n \"vtex.checkout-ui-custom\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-ui-custom@0.18.1/public/@types/vtex.checkout-ui-custom\",\n \"vtex.checkout-ui-settings-server\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-ui-settings-server@0.5.1/public/_types/react\",\n \"vtex.email-checkout-conflict\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.email-checkout-conflict@0.3.0/public/_types/react\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.134.2/public/@types/vtex.render-runtime\",\n \"vtex.store-resources\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.96.0/public/@types/vtex.store-resources\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.9/public/@types/vtex.styleguide\"\n },\n \"dependencies\": {\n \"axios\": \"^0.19.2\",\n \"graphql\": \"^15.3.0\",\n \"prop-types\": \"^15.7.2\",\n \"react-intl\": \"^5.0.2\",\n \"@monaco-editor/react\": \"4.2.1\",\n \"react\": \"17.0.0\",\n \"react-dom\": \"17.0.0\",\n \"react-scripts\": \"3.4.3\"\n },\n \"scripts\": {\n \"start\": \"react-scripts start\",\n \"build\": \"react-scripts build\",\n \"eject\": \"react-scripts eject\",\n \"test\": \"vtex-test-tools test react-scripts test --env=jsdom\"\n },\n \"transformIgnorePatterns\": [\n \"/node_modules/(?!(monaco-editor)).+\\\\.js$\"\n ],\n \"moduleNameMapper\": {\n \"^monaco-editor$\": \"<rootDir>/node_modules/@monaco-editor/react\"\n }\n}\n\n```" } ]
code_checkout-ui-custom_2bfb3e8a
[ { "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 checkout-ui-custom/react/Admin.tsx from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { FC } from 'react'\nimport React, { useState } from 'react'\nimport type { WrappedComponentProps } from 'react-intl'\nimport { injectIntl, defineMessages, FormattedMessage } from 'react-intl'\nimport { compose, graphql, useMutation, useQuery } from 'react-apollo'\nimport {\n Alert,\n Tabs,\n Tab,\n Layout,\n PageBlock,\n PageHeader,\n Button,\n Spinner,\n Modal,\n IconCheck,\n IconDeny,\n ModalDialog,\n Progress,\n Tooltip,\n Tag,\n IconWarning\n} from 'vtex.styleguide'\nimport { useRuntime } from 'vtex.render-runtime'\nimport sessionQuery from 'vtex.store-resources/QuerySession'\n\nimport Colors from './components/Colors'\nimport LayoutSettings from './components/Layout'\nimport Javascript from './components/Javascript'\nimport Css from './components/Css'\nimport History from './components/History'\nimport saveMutation from './mutations/saveConfiguration.gql'\nimport GET_LAST from './queries/getLast.gql'\nimport GET_CONFIG from './queries/getConfig.gql'\nimport getUserPermissions from './queries/getPermissions.gql'\n\n\nconst messages = defineMessages({\n title: {\n id: 'admin/checkout-ui.title',\n defaultMessage: 'Checkout custom interface',\n },\n})\n\nconst defaultConfiguration = {\n colors: {\n base: '#f4f2f2',\n baseInverted: '#21364f',\n actionPrimary: '#1a73e8',\n actionPrimaryDarken: '#1d63be',\n actionSecondary: '#f1f7ff',\n emphasis: '#000000',\n disabled: '#999999',\n success: '#2fba2d',\n successDarken: '#269e24',\n successFaded: '#beffa5',\n danger: '#ff4c4c',\n dangerFaded: '#ffe6e6',\n warning: '#ffb100',\n warningFaded: '#fff6e0',\n muted1: '#323232',\n muted2: '#676767',\n muted3: '#999999',\n muted4: '#cbcbcb',\n muted5: '#eeeeee',\n muted6: '#f3f3f3',\n },\n layout: {\n type: 'vertical',\n accordionPayments: false,\n deliveryDateFormat: false,\n showCartQuantityPrice: false,\n showNoteField: false,\n hideEmailStep: true,\n customAddressForm: false,\n fontSize: '12px',\n borderRadius: '4px',\n btnBorderRadius: '30px',\n maxWrapper: '980px',\n inputHeight: '40px',\n bordersContainers: 'none',\n fontFamily: '\"Roboto\", sans-serif',\n },\n css: '',\n javascript: '',\n javascriptActive: false,\n cssActive: false,\n}\n\nlet email = window.localStorage.getItem('adminEmail') ?? null\nlet initialLoad = false\n\nconst Admin: FC<any & WrappedComponentProps> = ({\n intl,\n session,\n config,\n}: any) => {\n const { workspace, production } = useRuntime()\n\n\n const { data : permission } = useQuery(getUserPermissions)\n\n const [state, setState] = useState<any>({\n ...defaultConfiguration,\n currentTab: 0,\n isModalOpen: false,\n isDialogOpen: false,\n showCloseIcon: false,\n workspace,\n appVersion: null,\n publishedVersion: null,\n })\n\n const [\n saveConfig,\n { loading: loadingSave, called: calledSave, error: errorSave },\n ] = useMutation(saveMutation, {\n onCompleted: () => {\n setTimeout(() => {\n setState({\n ...state,\n isModalOpen: false,\n })\n }, 3000)\n },\n })\n\n const { loading: loadingLast } = useQuery(GET_LAST, {\n variables: {\n workspace,\n },\n skip: initialLoad,\n onCompleted: (res: any) => {\n initialLoad = true\n setState({\n ...state,\n ...res.getLast,\n publishedVersion: res.getLast.appVersion,\n appVersion: config?.getSetupConfig?.adminSetup?.appVersion || '',\n currentTab: 1,\n colors: {\n ...state.colors,\n ...res.getLast.colors,\n },\n layout: {\n ...state.layout,\n ...res.getLast.layout,\n },\n })\n },\n })\n\n if (session?.getSession?.adminUserEmail) {\n window.localStorage.setItem('adminEmail', session.getSession.adminUserEmail)\n email = session.getSession.adminUserEmail\n }\n\n if (\n config?.getSetupConfig?.adminSetup?.appVersion &&\n state.appVersion === null\n ) {\n setState({\n ...state,\n appVersion: config.getSetupConfig.adminSetup.appVersion,\n })\n }\n\n const handleLayoutChange = (layout: any) => {\n setState({\n ...state,\n layout,\n })\n }\n\n const handleColorsChange = (colors: any) => {\n setState({\n ...state,\n colors,\n })\n }\n\n const handleCssChange = ({ value: css, active: cssActive }: any) => {\n setState({\n ...state,\n css,\n cssActive,\n })\n }\n\n const handleJSChange = ({\n value: javascript,\n active: javascriptActive,\n }: any) => {\n setState({\n ...state,\n javascript,\n javascriptActive,\n })\n }\n\n const handleLoad = ({\n javascript,\n css,\n layout,\n colors,\n javascriptActive,\n cssActive,\n }: any) => {\n setState({\n ...state,\n currentTab: 1,\n layout,\n colors,\n css,\n javascript,\n javascriptActive,\n cssActive,\n })\n }\n\n const publish = () => {\n setState({\n ...state,\n isModalOpen: true,\n isDialogOpen: false,\n })\n\n if (email) {\n saveConfig({\n variables: {\n email,\n workspace: state.workspace,\n layout: state.layout,\n colors: state.colors,\n css: state.css,\n javascript: state.javascript,\n javascriptActive: state.javascriptActive || false,\n cssActive: state.cssActive || false,\n },\n })\n }\n }\n\n const handlePublish = () => {\n if (production) {\n setState({\n ...state,\n isDialogOpen: true,\n })\n } else {\n publish()\n }\n }\n\n const handleModalClose = () => {\n setState({\n ...state,\n isModalOpen: false,\n })\n }\n\n const handlePublishDialog = () => {\n publish()\n }\n\n const handleCancelDialog = () => {\n setState({\n ...state,\n isDialogOpen: false,\n })\n }\n\n const handleDialogClose = () => {\n handleCancelDialog()\n }\n\n const changeTabTo = (currentTab: number) => {\n setState({\n ...state,\n currentTab,\n })\n }\n\n return (\n <Layout\n fullWidth\n pageHeader={\n <PageHeader title={intl.formatMessage(messages.title)}>\n <span className=\"mr4\">\n <div className=\"flex items-center\">\n <div className=\"ma3\">\n <Button\n variation=\"primary\"\n disabled={\n permission?.getPermissions?.access ? loadingLast : true\n }\n onClick={() => {\n handlePublish()\n }}\n >\n <FormattedMessage id=\"admin/checkout-ui.button.publish\" />\n </Button>\n </div>\n </div>\n\n {permission && !permission?.getPermissions?.access && (\n\n <div className=\"cb ma3\">\n <Tag type=\"warning\" variation=\"low\">\n <FormattedMessage id=\"admin/checkout-ui.permission-warning\" />\n <Tooltip label={<FormattedMessage id=\"admin/checkout-ui.permission-tooltip\" />}>\n <span className=\"ml3 pointer\">\n <IconWarning />\n </span>\n </Tooltip>\n </Tag>\n </div>\n\n )}\n \n </span>\n </PageHeader>\n }\n >\n <PageBlock>\n {loadingLast && <Progress type=\"steps\" steps={['inProgress']} />}\n {!loadingLast && (\n <>\n {state.appVersion &&\n state.publishedVersion &&\n state.appVersion !== state.publishedVersion && (\n <Alert type=\"warning\">\n <FormattedMessage id=\"admin/checkout-ui.update-warning\" />\n </Alert>\n )}\n <Tabs fullWidth>\n <Tab\n label={intl.formatMessage({\n id: 'admin/checkout-ui.tab.layout',\n })}\n active={state.currentTab === 1}\n onClick={() => {\n changeTabTo(1)\n }}\n >\n <LayoutSettings\n onChange={handleLayoutChange}\n initialState={state.layout}\n />\n </Tab>\n <Tab\n label={intl.formatMessage({\n id: 'admin/checkout-ui.tab.colors',\n })}\n active={state.currentTab === 2}\n onClick={() => {\n changeTabTo(2)\n }}\n >\n <Colors\n onChange={handleColorsChange}\n initialState={state.colors}\n />\n </Tab>\n <Tab\n label={intl.formatMessage({\n id: 'admin/checkout-ui.tab.javascript',\n })}\n active={state.currentTab === 3}\n onClick={() => {\n changeTabTo(3)\n }}\n >\n <Javascript\n onChange={handleJSChange}\n initialState={{\n value: state.javascript,\n active: state.javascriptActive,\n }}\n />\n </Tab>\n <Tab\n label={intl.formatMessage({\n id: 'admin/checkout-ui.tab.css',\n })}\n active={state.currentTab === 4}\n onClick={() => {\n changeTabTo(4)\n }}\n >\n <Css\n onChange={handleCssChange}\n initialState={{\n value: state.css,\n active: state.cssActive,\n }}\n />\n </Tab>\n <Tab\n label={intl.formatMessage({\n id: 'admin/checkout-ui.tab.history',\n })}\n active={state.currentTab === 5}\n onClick={() => {\n changeTabTo(5)\n }}\n >\n <History\n onChange={handleLoad}\n initialState={state.appVersion}\n />\n </Tab>\n </Tabs>\n </>\n )}\n <Modal\n centered\n isOpen={state.isModalOpen}\n showCloseIcon={state.showCloseIcon}\n onClose={() => {\n handleModalClose()\n }}\n >\n <div className=\"dark-gray\">\n <ul className=\"list pl0\">\n <li>\n <span className=\"w-100 mw1 dib\">\n {loadingSave === true && <Spinner size={12} />}\n {loadingSave === false &&\n calledSave === true &&\n !errorSave && <IconCheck size={12} />}\n {errorSave && <IconDeny size={12} />}\n {calledSave === false && !errorSave && <span>-</span>}\n </span>{' '}\n {loadingSave === false && calledSave === true && !errorSave && (\n <FormattedMessage id=\"admin/checkout-ui.message.published\" />\n )}\n {loadingSave === true && (\n <FormattedMessage id=\"admin/checkout-ui.message.publishing\" />\n )}{' '}\n <strong>{state.workspace}</strong>\n </li>\n </ul>\n </div>\n </Modal>\n </PageBlock>\n <ModalDialog\n centered\n confirmation={{\n onClick: handlePublishDialog,\n label: intl.formatMessage({\n id: 'admin/checkout-ui.publish.confirm',\n }),\n }}\n cancelation={{\n onClick: handleCancelDialog,\n label: intl.formatMessage({\n id: 'admin/checkout-ui.publish.cancel',\n }),\n }}\n isOpen={state.isDialogOpen}\n onClose={handleDialogClose}\n >\n <p>\n <FormattedMessage id=\"admin/checkout-ui.publish.warning\" />\n </p>\n </ModalDialog>\n </Layout>\n )\n}\n\nconst optionsSession = {\n name: 'session',\n skip: email !== null,\n options: () => ({\n ssr: false,\n }),\n}\n\nconst optionsConfig = {\n name: 'config',\n options: () => ({\n ssr: false,\n }),\n}\n\nexport default injectIntl(\n compose(\n graphql(sessionQuery, optionsSession),\n graphql(GET_CONFIG, optionsConfig)\n )(Admin)\n)\n\n```" } ]
code_checkout-ui-custom_81b1aa3e
[ { "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 checkout-ui-custom/cypress/plugins/index.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// / <reference types=\"cypress\" />\n// ***********************************************************\n// This example plugins/index.js can be used to load plugins\n//\n// You can change the location of this file or turn off loading\n// the plugins file with the 'pluginsFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/plugins-guide\n// ***********************************************************\n\n// This function is called when a project is opened or re-opened (e.g. due to\n// the project's config changing)\n\n/**\n * @type {Cypress.PluginConfig}\n */\n// eslint-disable-next-line no-unused-vars\nmodule.exports = (_on, _config) => {\n // `on` is used to hook into various events Cypress emits\n // `config` is the resolved Cypress config\n}\n\n```" } ]
code_checkout-ui-custom_5556bc5f
[ { "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 checkout-ui-custom/cypress/integration/wipe.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n ENTITIES,\n FAIL_ON_STATUS_CODE,\n VTEX_AUTH_HEADER,\n} from '../support/common/constants.js'\nimport { testSetup } from '../support/common/support.js'\n\nconst config = Cypress.env()\n\n// Constants\nconst { name } = config.workspace\n\ndescribe('Wipe', () => {\n testSetup()\n\n it('Deleting checkout history', () => {\n cy.getVtexItems().then(vtex => {\n cy.request({\n url: `https://productusqa.vtexcommercestable.com.br/api/dataentities/checkoutcustom/search`,\n qs: {\n _fields: 'workspace,email,id',\n _schema: 'v0.1.3',\n workspace: name,\n },\n headers: {\n ...VTEX_AUTH_HEADER(vtex.apiKey, vtex.apiToken),\n 'REST-Range': 'resources=0-50',\n },\n ...FAIL_ON_STATUS_CODE,\n }).then(response => {\n expect(response.status).to.equal(200)\n for (const { id } of response.body) {\n cy.deleteDocumentInMasterData(ENTITIES.CHECKOUTCUSTOM, id)\n }\n })\n })\n })\n it('Getting user & then deleting addresses associated with that user', () => {\n cy.getVtexItems().then(vtex => {\n cy.searchInMasterData(ENTITIES.CLIENTS, vtex.robotMail).then(clients => {\n cy.searchInMasterData(ENTITIES.ADDRESSES, clients[0].id).then(\n addresses => {\n for (const { id } of addresses) {\n cy.deleteDocumentInMasterData(ENTITIES.ADDRESSES, id)\n }\n }\n )\n })\n })\n })\n})\n\n```" } ]
code_checkout-ui-custom_e1c519cf
[ { "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 checkout-ui-custom/cypress/integration/2.7-disable_display_settings.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport { verifySettings } from '../support/testcase.js'\nimport { loginViaCookies, preserveCookie } from '../support/common/support.js'\nimport { updateLayoutSettings } from '../support/grapqhl_testcase.js'\n\ndescribe('Testing by disabling all settings in layout', () => {\n loginViaCookies()\n\n const decision = 'Disable'\n\n updateLayoutSettings(decision)\n verifySettings(decision)\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_4450fe08
[ { "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 checkout-ui-custom/cypress/integration/2.4-lineitems_optional.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n loginViaCookies,\n updateRetry,\n preserveCookie,\n} from '../support/common/support.js'\nimport selectors from '../support/common/selectors.js'\nimport { fillLineItems } from '../support/testcase.js'\nimport { checkoutUiCustomConstants } from '../support/constants.js'\nimport lineitemProducts from '../support/lineitem-products.js'\nimport checkoutUiCustomSelectors from '../support/selectors.js'\n\nconst prefix = `Line items required scenario`\nconst product = lineitemProducts.acer.name\n\ndescribe(`Testing line items(optional) with this product - ${product}`, () => {\n loginViaCookies()\n\n it(`${prefix} - Open Product ${product}`, updateRetry(3), () => {\n // Search the product\n cy.searchProduct(lineitemProducts.acer.name)\n // Add product to cart\n cy.addProduct(lineitemProducts.acer.name, {\n proceedtoCheckout: true,\n productDetailPage: true,\n })\n })\n\n it(`${prefix} - Verify line items not displaying`, updateRetry(2), () => {\n cy.get(checkoutUiCustomSelectors.LineItemAssemble).should('not.exist')\n cy.removeProduct(lineitemProducts.acer.id)\n cy.get(checkoutUiCustomSelectors.ChooseProducts)\n .should('be.visible')\n .click()\n })\n\n it(`${prefix} - Add line items for ${product}`, updateRetry(2), () => {\n cy.openProduct(lineitemProducts.acer.name, true)\n cy.contains(checkoutUiCustomConstants.addLineItemText).click()\n fillLineItems(\n checkoutUiCustomConstants.lineItems,\n checkoutUiCustomConstants.maxCharecters.max25\n )\n cy.get(selectors.PostalCode).clear().type('33180').type('{enter}')\n cy.get(selectors.ProductsQAShipping).click()\n cy.get(selectors.AddtoCart).click()\n })\n\n it(`${prefix} - Verify line items displaying`, () => {\n cy.checkoutProduct()\n cy.get(checkoutUiCustomSelectors.LineItemAssemble).should('exist')\n })\n\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_b002650d
[ { "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 checkout-ui-custom/cypress/integration/2.6-enable_display_settings.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport { verifySettings } from '../support/testcase.js'\nimport { loginViaCookies, preserveCookie } from '../support/common/support'\nimport { updateLayoutSettings } from '../support/grapqhl_testcase.js'\n\ndescribe('Testing by enabling all settings in layout', () => {\n const decision = 'Enable'\n\n loginViaCookies()\n updateLayoutSettings(decision)\n verifySettings(decision)\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_0860f335
[ { "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 checkout-ui-custom/cypress/integration/2.2-pickup.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n loginViaCookies,\n updateRetry,\n preserveCookie,\n} from '../support/common/support.js'\nimport { pickupTestCase } from '../support/outputvalidation.js'\n\nconst { productName, postalCode, prefix } = pickupTestCase\n\ndescribe(`${prefix} Scenario`, () => {\n loginViaCookies()\n\n it(`${prefix} - Adding Product to Cart`, updateRetry(1), () => {\n // Search the product\n cy.searchProduct(productName)\n // Add product to cart\n cy.addProduct(productName, {\n proceedtoCheckout: true,\n })\n })\n\n it(`In ${prefix} Updating product quantity to 2`, updateRetry(3), () => {\n // Update Product quantity to 2\n cy.updateProductQuantity(pickupTestCase, {\n quantity: '2',\n })\n })\n\n it(\n `${prefix} - Updating Shipping Information for pick up in store`,\n updateRetry(3),\n () => {\n // Update Shipping Section\n cy.updateShippingInformation({\n postalCode,\n pickup: true,\n timeout: 15000,\n checkoutcustom: true,\n })\n }\n )\n\n it(`${prefix} - Order the product`, () => {\n cy.orderProduct()\n })\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_7546603b
[ { "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 checkout-ui-custom/cypress/integration/2.5-checkout_scenarios.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n loginViaCookies,\n preserveCookie,\n updateRetry,\n} from '../support/common/support.js'\nimport { discountProduct } from '../support/outputvalidation.js'\nimport selectors from '../support/common/selectors.js'\nimport checkoutUiCustomSelectors from '../support/selectors.js'\n\nfunction discountValidation(quantity = 1) {\n const productPrice = 10 * quantity\n\n // Discounts should be shown\n cy.get(selectors.Discounts).should('be.exist')\n cy.get(checkoutUiCustomSelectors.DiscountAmount)\n .first()\n .should('have.text', `$ -${productPrice}.00`)\n}\n\ndescribe('Testing Checkout with different scenarios', () => {\n // Load test setup\n loginViaCookies()\n\n const { prefix, productName, productPrice } = discountProduct\n\n it(`In ${prefix} - Adding product,remove product and add product again`, () => {\n // Search the product\n cy.searchProduct(productName)\n // Add product to cart\n cy.addProduct(productName)\n discountValidation()\n // Remove the product\n cy.removeProduct('880270')\n // Search the product\n cy.searchProduct(productName)\n // Add product to cart\n cy.addProduct(productName)\n })\n\n it(`In ${prefix} Updating product quantity to 2`, updateRetry(3), () => {\n // Update Product quantity to 2\n cy.updateProductQuantity(discountProduct, {\n quantity: '2',\n })\n discountValidation(2)\n })\n\n it(`In ${prefix} - Updating Shipping Information`, updateRetry(3), () => {\n // Update Shipping Section\n cy.updateShippingInformation({ ...discountProduct, checkoutcustom: true })\n })\n\n it(`In ${prefix} Updating product quantity to 1`, updateRetry(2), () => {\n // Update Product quantity to 1\n cy.updateProductQuantity(discountProduct, {\n quantity: '1',\n verifySubTotal: false,\n })\n discountValidation()\n cy.get(selectors.SubTotal, { timeout: 10000 }).contains(productPrice)\n cy.get(selectors.ProceedtoPaymentBtn).should('be.visible').click()\n })\n\n it(\n `${prefix} - vat number should be visible & test input field`,\n updateRetry(3),\n () => {\n // VAT number field should be visibel to the user\n cy.get(selectors.VatInput).should('be.visible')\n // Providing VAT number\n cy.get(selectors.VatInput).type('FR40303265045')\n cy.get(selectors.SubmitVat).click()\n // Tax should not exist\n cy.get(checkoutUiCustomSelectors.VatRemoveButton)\n .should('be.visible')\n .click()\n cy.get(selectors.VatInput).should('be.empty')\n }\n )\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_b15b3a51
[ { "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 checkout-ui-custom/cypress/integration/2.3-lineitems_required.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n loginViaCookies,\n updateRetry,\n preserveCookie,\n} from '../support/common/support.js'\nimport selectors from '../support/common/selectors.js'\nimport { fillLineItems } from '../support/testcase.js'\nimport { checkoutUiCustomConstants } from '../support/constants.js'\nimport lineitemProducts from '../support/lineitem-products.js'\nimport checkoutUiCustomSelectors from '../support/selectors.js'\n\nconst prefix = `Line items required scenario`\nconst product = lineitemProducts.jumper.name\n\ndescribe(`Testing line items(required) with this product - ${product}`, () => {\n loginViaCookies()\n\n it(`${prefix} - Open Product ${product}`, updateRetry(3), () => {\n // Search the product\n cy.searchProduct(lineitemProducts.jumper.name)\n // Add product to cart\n cy.addProduct(lineitemProducts.jumper.name, {\n proceedtoCheckout: true,\n productDetailPage: true,\n })\n })\n\n it(\n `${prefix} - Verify line items displayed in checkout ui`,\n updateRetry(3),\n () => {\n cy.get(checkoutUiCustomSelectors.LineItemAssemble).should('exist')\n cy.removeProduct(lineitemProducts.jumper.id)\n cy.get(checkoutUiCustomSelectors.ChooseProducts)\n .should('be.visible')\n .click()\n }\n )\n\n it(\n `${prefix} - Add line items for ${product} and verify in checkout`,\n updateRetry(3),\n () => {\n cy.openProduct(lineitemProducts.jumper.name, true)\n fillLineItems(\n checkoutUiCustomConstants.lineItems,\n checkoutUiCustomConstants.maxCharecters.max10\n )\n cy.get(selectors.AddtoCart).should('be.visible').click()\n cy.checkoutProduct()\n cy.get(checkoutUiCustomSelectors.LineItemAssemble).should('exist')\n }\n )\n\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_0ac9e48d
[ { "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 checkout-ui-custom/cypress/integration/2.1-graphql.spec.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport {\n loginViaCookies,\n updateRetry,\n preserveCookie,\n} from '../support/common/support.js'\nimport {\n getById,\n getHistory,\n getLast,\n getSetupConfig,\n saveChanges,\n ValidategetByIdResponse,\n validateGetHistoryResponse,\n validateGetSetUpConfigResponse,\n validateGetVersionResponse,\n version,\n} from '../support/grapqhl_testcase.js'\nimport { graphql } from '../support/common/graphql_utils'\nimport { ENVS } from '../support/constants.js'\nimport getConfiguration from '../support/common/checkout_ui_custom.js'\n\ndescribe('Testing GraphQL queries & mutation', () => {\n const workspace = Cypress.env('workspace').name\n const { CONFIG_SETTINGS } = ENVS\n const ID = 'id'\n const APP = 'vtex.checkout-ui-custom@*.x'\n\n loginViaCookies()\n it('Verifying getHistory query', updateRetry(2), () => {\n graphql(APP, getHistory(), validateGetHistoryResponse)\n })\n\n it('Verifying version query', updateRetry(2), () => {\n graphql(APP, version(), validateGetVersionResponse)\n })\n\n it('Verifying getSetupConfig query', updateRetry(2), () => {\n cy.setCheckOutItem(CONFIG_SETTINGS, getConfiguration(workspace))\n graphql(APP, getSetupConfig(), validateGetSetUpConfigResponse)\n })\n\n it('Verifying saveChanges mutation', updateRetry(5), () => {\n cy.addDelayBetweenRetries(5000)\n cy.getCheckOutItems().then(items => {\n graphql(APP, saveChanges(items[CONFIG_SETTINGS]), response => {\n expect(response.body.data.saveChanges).to.include('DocumentId')\n })\n })\n })\n\n it(\n `Verifying getLast query with workspace ${workspace}`,\n updateRetry(2),\n () => {\n graphql(APP, getLast(workspace), response => {\n expect(response.body.data.getLast.workspace).to.equal(workspace)\n expect(response.body.data.getLast.id).to.not.equal(null)\n cy.setCheckOutItem(ID, response.body.data.getLast.id)\n })\n }\n )\n\n it('Verifying getId query', updateRetry(2), () => {\n cy.getCheckOutItems().then(items => {\n graphql(APP, getById(items[ID]), ValidategetByIdResponse)\n })\n })\n preserveCookie()\n})\n\n```" } ]
code_checkout-ui-custom_a627b488
[ { "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 checkout-ui-custom/cypress/support/constants.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nexport const checkoutUiCustomConstants = {\n maxCharecters: {\n max25: '25',\n max10: '10',\n },\n lineItems: {\n lineItem1: 'Line Item 1',\n lineItem2: 'Line Item 2',\n lineItem3: 'Line Item 3',\n },\n addLineItemText: 'Add Text Engraving 3 Lines',\n vatText: 'FR40303265045',\n}\n\nexport const ENVS = {\n CONFIG_SETTINGS: 'config',\n}\n\n```" } ]
code_checkout-ui-custom_9b63c449
[ { "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 checkout-ui-custom/cypress/support/selectors.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nexport default {\n // *************Checkout UI Custome Constants start here************ //\n QuantityUnitPrice: 'div[class*=v-custom-quantity-price__list--selling]',\n HideEmailHeader: 'h3[class*=client-pre-email-h]',\n ShippingTimeInfo: 'td[class*=v-changeShippingTimeInfo-active]',\n PaymentAccordion: 'div[class*=v-custom-payment-item-wrap]',\n SummaryNote: 'div[class*=summary-note]',\n ProductLineItem: 'div[class*=textInputValue] > label > div > input',\n CartLink: 'span[class*=checkout-steps_item_cart]',\n LineItemAssemble: 'div[class*=v-custom-assemblies]',\n VatRemoveButton: 'button[class*=vat-number__button--remove]',\n ChooseProducts: '#cart-choose-products',\n DiscountAmount: 'tr.Discounts td.monetary',\n ChangeShipping: 'a[class*=link-change-shipping]',\n EditAddressButton: 'button[class*=buttonEditAddress]',\n CustomShipAddress: '#v-custom-ship-street',\n}\n\n```" } ]
code_checkout-ui-custom_4c5bbb3a
[ { "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 checkout-ui-custom/cypress/support/index.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// Import commands.js using ES2015 syntax:\nimport './common/commands'\nimport './common/api_commands'\nimport './commands'\n\n// Configure it to preserve cookies\nCypress.Cookies.defaults({\n preserve: /VtexIdclientAutCookie/,\n})\n\n```" } ]
code_checkout-ui-custom_40cefd11
[ { "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 checkout-ui-custom/cypress/support/testcase.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport selectors from './common/selectors.js'\nimport { updateRetry } from './common/support.js'\nimport checkoutUiCustomSelectors from './selectors.js'\nimport { layoutScenario } from './outputvalidation.js'\n\nfunction proceedToPayment() {\n cy.get('body').then($body => {\n const btn = selectors.ProceedtoPaymentBtn\n\n if ($body.find(btn).length) {\n cy.get(btn).then($el => {\n if (Cypress.dom.isVisible($el)) {\n cy.get(selectors.ProceedtoPaymentBtn).click()\n }\n })\n }\n })\n}\n\nexport function verifySettings(type) {\n const enable = /Enable/.test(type)\n\n const { productName } = layoutScenario\n const prefix = `${type} Layout Setting`\n\n it(`${prefix} - Adding Product to Cart`, () => {\n // Search the product\n cy.searchProduct(productName)\n // Add product to cart\n cy.addProduct(productName, {\n proceedtoCheckout: true,\n })\n })\n\n it(`${prefix} - Updating product quantity to 2`, updateRetry(3), () => {\n // Update Product quantity to 2\n cy.updateProductQuantity(layoutScenario, {\n quantity: '2',\n })\n })\n\n it(`${prefix} - Updating Shipping Information`, updateRetry(3), () => {\n // Update Shipping Section\n cy.updateShippingInformation({\n ...layoutScenario,\n checkoutcustom: true,\n timeout: 15000,\n })\n })\n\n it(`${prefix} - Display items unit price option`, updateRetry(2), () => {\n cy.get(checkoutUiCustomSelectors.CartLink).click()\n if (enable) {\n cy.get(checkoutUiCustomSelectors.QuantityUnitPrice).should('exist')\n } else {\n cy.get(checkoutUiCustomSelectors.QuantityUnitPrice).should('not.exist')\n }\n\n proceedToPayment()\n })\n\n it(\n `${prefix} - Display google address form format option`,\n updateRetry(2),\n () => {\n it(`display google address form format`, updateRetry(2), () => {\n cy.get(checkoutUiCustomSelectors.ChangeShipping).click()\n cy.get(checkoutUiCustomSelectors.EditAddressButton)\n .should('be.visible')\n .click()\n if (enable) {\n cy.get(checkoutUiCustomSelectors.CustomShipAddress).should(\n 'be.visible'\n )\n cy.get(checkoutUiCustomSelectors.CustomShipAddress)\n .clear()\n .type('19501 Biscayne Blvd {downarrow}{enter}')\n } else {\n cy.get(selectors.ShipCountry, { timeout: 5000 })\n .should('not.be.disabled')\n .select('USA')\n }\n\n cy.get(selectors.GotoPaymentBtn).click()\n proceedToPayment()\n })\n }\n )\n\n it(`${prefix} - Testing Hide email step, Simplified shipping date, payment options as accordian & notes field`, () => {\n proceedToPayment()\n if (enable) {\n cy.get(checkoutUiCustomSelectors.HideEmailHeader).should('not.be.visible')\n cy.get(checkoutUiCustomSelectors.ShippingTimeInfo).should('exist')\n cy.get(checkoutUiCustomSelectors.PaymentAccordion).should('exist')\n cy.get(checkoutUiCustomSelectors.SummaryNote).should('be.visible')\n } else {\n cy.get(checkoutUiCustomSelectors.HideEmailHeader).should('be.visible')\n cy.get(checkoutUiCustomSelectors.ShippingTimeInfo).should('not.exist')\n cy.get(checkoutUiCustomSelectors.PaymentAccordion).should('not.exist')\n cy.get(checkoutUiCustomSelectors.SummaryNote).should('not.be.visible')\n }\n })\n}\n\nexport function fillLineItems(items, maxChar) {\n cy.get(checkoutUiCustomSelectors.ProductLineItem)\n .first()\n .type(items.lineItem1)\n .should('have.attr', 'maxlength')\n .then(maxlength => {\n cy.log(maxlength)\n expect(maxlength).to.equal(maxChar)\n })\n cy.get(checkoutUiCustomSelectors.ProductLineItem).eq(1).type(items.lineItem2)\n cy.get(checkoutUiCustomSelectors.ProductLineItem).eq(2).type(items.lineItem3)\n}\n\n```" } ]
code_checkout-ui-custom_28743c90
[ { "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 checkout-ui-custom/cypress/support/grapqhl_testcase.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport { ENVS } from './constants.js'\nimport { updateRetry } from './common/support.js'\nimport { graphql } from './common/graphql_utils'\n\nconst APP = 'vtex.checkout-ui-custom@*.x'\n\nexport function getLast(workspace) {\n const query =\n 'query' +\n '($workspace: String!)' +\n '{getLast(workspace: $workspace){id email workspace layout javascript css javascriptActive cssActive colors}}'\n\n return {\n query,\n queryVariables: { workspace },\n }\n}\n\nexport function validateGetLastResponse(response) {\n expect(response.body.data).to.not.equal(null)\n}\n\nexport function saveChanges(configuration) {\n const query =\n 'mutation' +\n '($email: String, $workspace: String, $layout: CustomFields, $javascript: String, $css: String, $javascriptActive: Boolean, $cssActive: Boolean, $colors: CustomFields)' +\n '{saveChanges(email: $email, workspace: $workspace, layout: $layout, javascript: $javascript, css: $css, javascriptActive: $javascriptActive, cssActive: $cssActive, colors: $colors) @context(provider: \"vtex.checkout-ui-custom@*.x\")}'\n\n return {\n query,\n queryVariables: configuration,\n }\n}\n\nexport function validateSaveChangesResponse(response) {\n expect(response.body.data).to.not.equal(null)\n}\n\nexport function getHistory() {\n return {\n query:\n 'query' + '{getHistory {id,email,workspace,creationDate,appVersion}}',\n queryVariables: {},\n }\n}\n\nexport function validateGetHistoryResponse(response) {\n expect(response.body.data.getHistory)\n .to.be.an('array')\n .and.to.have.lengthOf.above(0)\n}\n\nexport function version() {\n return {\n query: 'query' + '{version}',\n queryVariables: {},\n }\n}\n\nexport function validateGetVersionResponse(response) {\n expect(response.body.data.version).to.not.equal(null)\n}\n\nexport function getSetupConfig() {\n return {\n query:\n 'query' +\n '{getSetupConfig{adminSetup{hasSchema,schemaVersion,appVersion}}}',\n }\n}\n\nexport function validateGetSetUpConfigResponse(response) {\n expect(response.body.data).to.not.equal(null)\n expect(response.body.data.getSetupConfig.adminSetup.appVersion).to.not.equal(\n null\n )\n expect(response.body.data.getSetupConfig.adminSetup.hasSchema).to.be.true\n expect(\n response.body.data.getSetupConfig.adminSetup.schemaVersion\n ).to.not.equal(null)\n}\n\nexport function getById(id) {\n return {\n query:\n 'query' +\n '($id:String)' +\n '{getById(id:$id){layout,colors,javascript,css,javascriptActive,cssActive}}',\n queryVariables: { id },\n }\n}\n\nexport function ValidategetByIdResponse(response) {\n expect(response.body.data.getById.javascriptActive).to.be.true\n expect(response.body.data.getById.cssActive).to.be.true\n expect(response.body.data.getById.layout).to.have.property('borderRadius')\n}\n\nexport function updateLayoutSettings(option) {\n it(`${option} Layout Settings via Graphql`, updateRetry(3), () => {\n cy.getCheckOutItems().then(items => {\n cy.log(items)\n const configurations = items[ENVS.CONFIG_SETTINGS]\n\n const bool = /Enable/.test(option)\n\n configurations.layout.accordionPayments = bool\n configurations.layout.deliveryDateFormat = bool\n configurations.layout.showCartQuantityPrice = bool\n configurations.layout.showNoteField = bool\n configurations.layout.hideEmailStep = bool\n configurations.layout.customAddressForm = bool\n\n graphql(APP, saveChanges(configurations), response => {\n expect(response.body.data.saveChanges).to.include('DocumentId')\n })\n })\n })\n}\n\n```" } ]
code_checkout-ui-custom_f7e59e2d
[ { "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 checkout-ui-custom/cypress/support/outputvalidation.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport { PRODUCTS } from './common/utils.js'\n\nfunction generatePayload(prefix) {\n return {\n prefix,\n postalCode: '33180',\n totalAmount: '$ 1,160.95',\n productPrice: '540.00',\n subTotal: '$ 1,080.00',\n productName: PRODUCTS.coconut,\n }\n}\n\nexport default {\n pickupTestCase: generatePayload('Pickup'),\n discountProduct: {\n // custom JS and CSS + Add/remove product + Update product quantity 1\n prefix: 'discountProduct',\n postalCode: '33180',\n productPrice: '100.00',\n totalAmount: '$ 101.65',\n subTotal: '$ 200.00',\n productName: PRODUCTS.cauliflower,\n },\n layoutScenario: generatePayload('layoutScenario'),\n testCustomJSAndCSS: generatePayload('Custom JS And CSS Scenario'),\n}\n\n```" } ]
code_checkout-ui-custom_41e5e434
[ { "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 checkout-ui-custom/cypress/support/commands.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport selectors from './common/selectors'\nimport { generateAddtoCartCardSelector } from './common/utils'\n\nconst checkOutJson = '.checkout.json'\n\n// Set checkout items\nCypress.Commands.add('setCheckOutItem', (checkItem, checkvalue) => {\n cy.readFile(checkOutJson).then(items => {\n items[checkItem] = checkvalue\n cy.writeFile(checkOutJson, items)\n })\n})\n\n// Get checkout items\nCypress.Commands.add('getCheckOutItems', () => {\n cy.readFile(checkOutJson).then(items => {\n return items\n })\n})\n\nCypress.Commands.add('openStoreFront', (login = false) => {\n cy.intercept('**/rc.vtex.com.br/api/events').as('events')\n cy.visit('/')\n cy.wait('@events')\n if (login === true) {\n cy.get(selectors.ProfileLabel, { timeout: 20000 })\n .should('be.visible')\n .should('have.contain', `Hello,`)\n }\n})\n\nCypress.Commands.add('gotoProductDetailPage', () => {\n cy.get(selectors.ProductAnchorElement)\n .should('have.attr', 'href')\n .then(href => {\n cy.get(generateAddtoCartCardSelector(href)).first().click()\n })\n})\n\nCypress.Commands.add('openProduct', (product, detailPage = false) => {\n // Search product in search bar\n cy.get(selectors.Search).should('be.not.disabled').should('be.visible')\n\n cy.get(selectors.Search).type(`${product}{enter}`)\n // Page should load successfully now Filter should be visible\n cy.get(selectors.searchResult).should('have.text', product.toLowerCase())\n cy.get(selectors.FilterHeading, { timeout: 30000 }).should('be.visible')\n\n if (detailPage) {\n cy.gotoProductDetailPage()\n } else {\n cy.log('Visiting detail page is disabled')\n }\n})\n\nCypress.Commands.add('removeProduct', product => {\n cy.get(selectors.CartTimeline, { timeout: 30000 }).should('be.visible')\n cy.get(`a[id=item-remove-${product}]`).should('be.visible').click()\n cy.contains('Your cart is empty')\n})\n\nCypress.Commands.add('checkoutProduct', () => {\n cy.get(selectors.TotalPrice).should('be.visible')\n cy.get('#items-price div[class*=price]').should('have.contain', '$')\n cy.get(selectors.ProceedtoCheckout).should('be.visible').click()\n cy.get(selectors.CartTimeline, { timeout: 30000 })\n .should('be.visible')\n .click({ force: true })\n})\n\n```" } ]
code_checkout-ui-custom_59e8bbe1
[ { "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 checkout-ui-custom/cypress/support/lineitem-products.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nexport default {\n acer: {\n name: 'acer aspire 5',\n id: '880190',\n },\n jumper: {\n name: 'jumper',\n id: '880200',\n },\n}\n\n```" } ]
code_checkout-ui-custom_db69f80e
[ { "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 checkout-ui-custom/checkout-ui-custom/src/checkout6-custom.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nconst Debug = require('./_js/_debug.js')\nconst CheckoutCustom = require('./_js/_v.custom.checkout.ui.js')\n\nwindow.vcustom = {\n checkout: new CheckoutCustom({\n type: 'vertical', // [\"vertical\" , \"horizontal\"]\n accordionPayments: true,\n deliveryDateFormat: false,\n quantityPriceCart: false,\n showNoteField: false,\n customAddressForm: true,\n hideEmailStep: true,\n }),\n debug: new Debug({\n dbg: false,\n logo: '',\n }),\n}\n\nwindow.vcustom.checkout.start()\n\n// vcustom.debug.start();\n\n```" } ]
code_checkout-ui-custom_b879d6fe
[ { "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 checkout-ui-custom/checkout-ui-custom/src/app.checkout6-custom.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n@import '_scss/_components/_fns.scss';\n@import '_scss/_configs/_style.app.scss';\n@import '_scss/_components/_input.scss';\n@import '_scss/_components/_buttons.scss';\n@import '_scss/_components/_titles.scss';\n\n@import '_scss/_components/_overwriting.scss';\n@import '_scss/_components/_modals.scss';\n@import '_scss/_components/_vtexId.scss';\n\n@import '_scss/_components/_global.scss';\n@import '_scss/_components/_steps.scss';\n@import '_scss/_components/_header.scss';\n@import '_scss/_components/_footer.scss';\n\n@import '_scss/_components/_cart.scss';\n@import '_scss/_components/_pre-email.scss';\n@import '_scss/_components/_payment.scss';\n\n@import '_scss/_components/_jsInteractions.scss';\n@import '_scss/_components/_customAddressForm.scss';\n@import '_scss/_components/_hide-email-step.scss';\n@import '_scss/_components/_RTL.scss';\n\n\n@import '_scss/_custom.scss';\n\n@import '_scss/_components/_debug.scss';\n\n\n```" } ]
code_checkout-ui-custom_8af9ee42
[ { "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 checkout-ui-custom/checkout-ui-custom/src/app.checkout6-custom.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nconst Debug = require('./_js/_debug.js')\nconst CheckoutCustom = require('./_js/_v.custom.checkout.ui.js')\n\nwindow.vcustom = {\n checkout: new CheckoutCustom({\n type: '\"{{type}}\"', // [\"vertical\" , \"horizontal\"]\n accordionPayments: '{{accordionPayments}}',\n deliveryDateFormat: '{{deliveryDateFormat}}',\n quantityPriceCart: '{{showCartQuantityPrice}}',\n showNoteField: '{{showNoteField}}',\n customAddressForm: '{{customAddressForm}}',\n hideEmailStep: '{{hideEmailStep}}',\n }),\n debug: new Debug({\n dbg: false,\n logo: '',\n }),\n}\n\nwindow.vcustom.checkout.start()\n\n```" } ]
code_checkout-ui-custom_40fdb2d3
[ { "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 checkout-ui-custom/checkout-ui-custom/src/checkout6-custom.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n@import '_scss/_components/_fns.scss';\n@import '_scss/_configs/_style.scss';\n@import '_scss/_components/_input.scss';\n@import '_scss/_components/_buttons.scss';\n@import '_scss/_components/_titles.scss';\n\n@import '_scss/_components/_overwriting.scss';\n@import '_scss/_components/_modals.scss';\n@import '_scss/_components/_vtexId.scss';\n\n@import '_scss/_components/_global.scss';\n@import '_scss/_components/_steps.scss';\n@import '_scss/_components/_header.scss';\n@import '_scss/_components/_footer.scss';\n\n@import '_scss/_components/_cart.scss';\n@import '_scss/_components/_pre-email.scss';\n@import '_scss/_components/_payment.scss';\n\n@import '_scss/_components/_jsInteractions.scss';\n@import '_scss/_components/_customAddressForm.scss';\n@import '_scss/_components/_hide-email-step.scss';\n@import '_scss/_components/_RTL.scss';\n\n@import '_scss/_custom.scss';\n\n@import '_scss/_components/_debug.scss';\n\n```" } ]
code_checkout-ui-custom_92cf958d
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_js/_customAddressForm.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n/* eslint-disable prettier/prettier */\n/* eslint-disable vtex/prefer-early-return */\n/* eslint-disable no-console */\n/* eslint-disable func-names */\n/* eslint-disable max-params */\nconst { _locale } = require('./_locale-infos.js')\nconst {\n _countries,\n _countriesrules,\n _cities,\n _addressPlaceholder,\n} = require('./_countries.js')\nconst { getShipStateValue } = require('./_utils')\n\n// temporaly workaorund\nwindow.callbackMap = () => {\n window.vtexjs.checkout.getOrderForm(orderForm => {\n if (\n window.vcustom &&\n window.vcustom.checkout &&\n window.vcustom.customAddressFormInit\n )\n window.vcustom.checkout.customAddressFormInit(orderForm)\n })\n}\n\n// end temporaly workaorund\n\nclass fnsCustomAddressForm {\n constructor({ active = false } = {}) {\n this.BodyFormClasses = ['v-custom-addressForm-on', 'v-custom-googleForm-on']\n this.active = active\n this.googleMapsApiKey = window.vtex.googleMapsApiKey\n this.orderForm = ''\n this.classOn = 'v-custom-fnsCustomAddressForm'\n this.deliveryCountries = ''\n this.mainCountry = ''\n this.lang = ''\n this.isPickupPoint = false\n this.locale = ''\n\n this.address = {\n country: '',\n postalCode: '',\n city: '',\n state: '',\n street: '',\n complement: '',\n addressQuery: '',\n addressId: '',\n geoCoordinates: [],\n }\n\n this.validate = true\n\n this.gPlacesAutocomplete = ''\n\n this.firstAttempt = false\n }\n\n loadScript() {\n $('body').append(\n `<script src=\"https://maps.googleapis.com/maps/api/js?key=${this.googleMapsApiKey}&language=${window.vtex.i18n.locale}&libraries=places&callback=callbackMap\"></script>`\n )\n }\n\n messageTrigger(_message) {\n const message = {\n content: {\n title: '',\n detail: _message,\n },\n type: 'warning',\n }\n\n $(window).trigger('addMessage', message)\n }\n\n updateAddress(\n country = '',\n postalCode = '',\n city = '',\n state = '',\n street = '',\n number = null,\n complement = '',\n addressQuery = '',\n addressId = '',\n geoCoordinates = ''\n ) {\n this.address = {\n country,\n postalCode,\n addressId,\n city,\n state,\n geoCoordinates,\n street,\n number,\n complement,\n addressQuery,\n }\n\n if (country === '') {\n this.setForm('')\n }\n }\n\n setForm(\n country = '',\n street = '',\n formattedStreet = '',\n number = '',\n postalCode = '',\n city = '',\n state = '',\n complement = '',\n neighborhood = '',\n geoCoordinates = ''\n ) {\n const _this = this\n\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street').val(\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? street\n : formattedStreet || street\n )\n\n $('.vcustom--vtex-omnishipping-1-x-address #ship-complement').val(\n complement\n )\n $('.vcustom--vtex-omnishipping-1-x-address #ship-number').val(number)\n $('.vcustom--vtex-omnishipping-1-x-address #ship-city').val(city)\n $('.vcustom--vtex-omnishipping-1-x-address #ship-postalCode').val(\n postalCode\n )\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street').attr(\n 'data-street',\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? street\n : formattedStreet || street\n )\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street').attr(\n 'data-number',\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? number\n : null\n )\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street').attr(\n 'data-neighborhood',\n neighborhood\n )\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street').attr(\n 'data-geocoordinates',\n geoCoordinates\n )\n\n $('.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-country').attr(\n 'data-country',\n country\n )\n\n $('.vcustom--vtex-omnishipping-1-x-address #ship-state').val(\n getShipStateValue(state) || ''\n )\n }\n\n updateGoogleForm(countryCode = 'usa') {\n const _this = this\n const labels = [\n {\n default: 'Street address',\n prop: 'address1Placeholder',\n element: $('label#address1-label'),\n },\n { default: 'Number', prop: 'number', element: $('label#number-label') },\n {\n default: 'Complements',\n prop: 'address2Placeholder',\n element: $('label#address2-label'),\n },\n { default: 'City', prop: 'city', element: $('label#city-label') },\n { default: 'State', prop: 'state', element: $('label#state-label') },\n {\n default: 'Country',\n prop: 'country',\n element: $('label#country-label'),\n },\n {\n default: 'Postal Code',\n prop: 'postalCode',\n element: $('label#postalCode-label'),\n },\n ]\n\n _this._locale = _locale[countryCode.toUpperCase()] || _locale.USA\n\n for (let i = 0; i < labels.length; i++) {\n const label = labels[i]\n\n label.element.text(_this._locale[label.prop] || label.default)\n }\n\n $('input#v-custom-ship-street').attr(\n 'placeholder',\n _addressPlaceholder[countryCode.toUpperCase()]\n ? _addressPlaceholder[countryCode.toUpperCase()]\n : ''\n )\n this.gPlacesAutocomplete.setComponentRestrictions({\n country: [countryCode],\n })\n }\n\n returnAddressFRules(components, attrs) {\n if (!attrs) return ''\n const { valueIn = 'short_name', types } = attrs\n\n for (let i = 0; i < types.length; i++) {\n const ruleComponent = types[i]\n\n if (\n components.find(component =>\n component.types.some(v => v === ruleComponent)\n )\n ) {\n return components.find(component =>\n component.types.some(v => v === ruleComponent)\n )[valueIn]\n }\n }\n\n return ''\n }\n\n googleForm() {\n const _this = this\n const input = document.getElementById('v-custom-ship-street')\n const geocodeClient = new window.google.maps.Geocoder()\n\n _this.gPlacesAutocomplete = new window.google.maps.places.Autocomplete(\n input\n )\n\n _this.gPlacesAutocomplete.addListener('place_changed', function () {\n const place = _this.gPlacesAutocomplete.getPlace()\n\n geocodeClient.geocode({ address: place.formatted_address })\n\n if (~window.location.host.indexOf('myvtex')) {\n console.log(place)\n }\n\n const [, country] = _countries.find(\n c =>\n c[0] ===\n place.address_components.filter(\n item => item.types[0] === 'country'\n )[0].short_name\n )\n\n const street = place.address_components.find(\n item => item.types[0] === 'route'\n )\n ? place.address_components.find(item => item.types[0] === 'route')\n .long_name\n : place.vicinity\n\n let state = _this.returnAddressFRules(\n place.address_components,\n _this.addressrules.state\n )\n\n const neighborhood = _this.addressrules.neighborhood\n ? _this.returnAddressFRules(\n place.address_components,\n _this.addressrules.neighborhood\n )\n : ''\n\n if (\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ) {\n $('.vcustom--vtex-omnishipping-1-x-address #ship-number').val(\n _this.returnAddressFRules(place.address_components, {\n types: ['street_number'],\n })\n )\n }\n\n const number =\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? $('.vcustom--vtex-omnishipping-1-x-address #ship-number').val()\n : _this.returnAddressFRules(place.address_components, {\n types: ['street_number'],\n })\n\n const complement = _this.addressrules.complement\n ? _this.returnAddressFRules(place.address_components, {\n types: ['subpremise'],\n })\n : $('.vcustom--vtex-omnishipping-1-x-address #ship-complement').val()\n\n const geoCoordinates = [\n place.geometry.location.lng(),\n place.geometry.location.lat(),\n ]\n\n const formattedAddress = $('<div></div>')\n\n formattedAddress.html(place.adr_address)\n let formattedStreet = $('.street-address', formattedAddress).text()\n\n let city =\n _this.returnAddressFRules(\n place.address_components,\n _this.addressrules.city\n ) || $('.locality', formattedAddress).text()\n\n let postalCode = _this.addressrules.postalCode\n ? _this.returnAddressFRules(place.address_components, {\n types: ['postal_code'],\n })\n : '00000'\n\n // temporaly workaround for ARG\n\n if (country === 'ARG') {\n formattedStreet = street\n postalCode = postalCode.replace(/\\D/gi, '')\n if (state === 'Provincia de Buenos Aires') state = 'Buenos Aires'\n if (state.toUpperCase() === 'CABA') {\n state = 'Ciudad Autónoma de Buenos Aires'\n city = 'Ciudad Autónoma de Buenos Aires'\n }\n }\n\n _this.setForm(\n country,\n street,\n formattedStreet,\n number,\n postalCode,\n city,\n state,\n complement,\n neighborhood,\n geoCoordinates\n )\n _this.validateAllFields()\n _this.updateAddress(\n country,\n postalCode,\n city,\n state,\n street,\n number,\n complement,\n place.formatted_address,\n _this.address.addressId,\n geoCoordinates\n )\n })\n\n $('body').on('keyup', '#v-custom-ship-street', function () {\n $(this).attr('autocomplete', 'none')\n $(this).attr('data-number', '')\n $(this).attr('data-street', $(this).context.value)\n })\n\n $('body').on('focus', '#v-custom-ship-street', function () {\n $(this).attr('autocomplete', 'none')\n })\n }\n\n triggerAddressValidation() {\n window.store.dispatch({\n type: 'DISABLE_CALCULATE_BUTTON',\n isCalculateBttnEnabled: false,\n })\n }\n\n receiverNameF() {\n const _this = this\n\n if (\n _this.orderForm.clientProfileData &&\n _this.orderForm.clientProfileData.firstName &&\n _this.orderForm.clientProfileData.lastName &&\n !~window.vtexjs.checkout.orderForm.clientProfileData.firstName.indexOf(\n '*'\n )\n ) {\n return `${_this.orderForm.clientProfileData.firstName} ${\n _this.orderForm.clientProfileData.lastName\n ? _this.orderForm.clientProfileData.lastName\n : ''\n }`\n }\n\n return ''\n }\n\n geti18n() {\n const _this = this\n\n const { locale } = _this.orderForm.clientPreferencesData\n const _lang = window.vtex.i18n[locale]\n\n const lang = _lang || window.vtex.i18n[locale.split(`-`)[0]]\n\n if (!lang) window.vtex.i18n.en\n\n return lang\n }\n\n sendAddress(\n _country,\n _street,\n _number,\n _state,\n _postalCode,\n _city,\n _complement,\n _addressQuery,\n _addressId,\n _neighborhood,\n geoCoordinates\n ) {\n const _this = this\n\n if (~geoCoordinates.indexOf(',')) {\n const [lat, lng] = geoCoordinates.split(',')\n\n geoCoordinates = [parseFloat(lat), parseFloat(lng)]\n\n // temporaly workaround for ARG_country === 'MLT'\n if (_country === 'ARG' && _city.toUpperCase() === 'CABA') {\n _city = 'Ciudad Autónoma de Buenos Aires'\n }\n // end temporaly workaround for ARG\n\n // temporaly workaround for MLT\n if (_country === 'MLT') {\n _state = null\n }\n // end temporaly workaround for MLT\n\n // temporaly workaround for USA and CAN\n if (\n _country === 'USA' ||\n _country === 'MLT' ||\n _country === 'CAN'\n ) {\n _number = null\n }\n // end temporaly workaround for USA\n\n // if (!_this.addressrules.state) {\n // _state = ''\n // }\n } else {\n geoCoordinates = []\n }\n\n $('body').addClass('js-v-custom-is-loading')\n\n const shippingInfo = {\n selectedAddresses: [\n {\n addressType: 'residential',\n receiverName: _this.receiverNameF(),\n isDisposable: false,\n postalCode: _postalCode,\n city: _city,\n state: _state,\n country: _country,\n street: _street,\n number: _number || '',\n neighborhood: _neighborhood,\n complement: _complement,\n reference: null,\n geoCoordinates: geoCoordinates || [],\n addressQuery: _addressQuery,\n },\n ],\n clearAddressIfPostalCodeNotFound: false,\n }\n\n window.vtexjs.checkout\n .sendAttachment('shippingData', {})\n .done(function () {\n $(window).trigger('VCUSTOM__ADDRESSFORM__CLEARED')\n\n $('button.vtex-front-messages-close-all.close').trigger('click')\n $('.vtex-omnishipping-1-x-warning').hide()\n $('.alert-noStreet').hide()\n $(\n '.shp-alert.vtex-omnishipping-1-x-alert.shp-alert-shipping-unavailable.vtex-omnishipping-1-x-alertPickup, .button-unavailable-delivery-pickup-wrapper'\n ).hide()\n _this.firstAttempt = true\n\n window.vtexjs.checkout\n .sendAttachment('shippingData', shippingInfo)\n .done(function (orderForm) {\n if (\n orderForm.error ||\n !orderForm.shippingData.address ||\n orderForm.items.filter(\n item => item.availability == 'cannotBeDelivered'\n ).length == orderForm.items.length\n ) {\n // eslint-disable-next-line no-alert\n $(\n '.vtex-omnishipping-1-x-warning, .step.shipping-data .box-step'\n ).show()\n $('body')\n .addClass(_this.BodyFormClasses.join(' '))\n .removeClass(\n 'js-v-custom-is-loading js-v-custom-is-loadAddress'\n )\n if (orderForm.error && orderForm.error.message)\n // eslint-disable-next-line no-alert\n alert(\n `Something went wrong: ${\n orderForm.error ? orderForm.error.message : 'null address'\n }`\n )\n\n if (\n orderForm.items.filter(\n item => item.availability == 'cannotBeDelivered'\n ).length == orderForm.items.length\n ) {\n _this.messageTrigger(\n _this.geti18n().cart.unavailableForDelivery\n )\n }\n } else {\n _this.updateAddress(\n _country,\n _postalCode,\n _city,\n _state,\n _street,\n _number,\n _complement,\n '',\n _addressQuery || '',\n _addressId || '',\n geoCoordinates || []\n )\n $('body')\n .removeClass(_this.BodyFormClasses.join(' '))\n .removeClass('js-v-custom-is-loading')\n _this.orderForm = orderForm\n _this.triggerAddressValidation()\n $(window).trigger('VCUSTOM__ADDRESSFORM__UPDATED')\n }\n })\n .fail(function (error) {\n _this.orderForm = window.vtexjs.checkout.orderForm\n $('body').removeClass(\n 'js-v-custom-is-loading js-v-custom-is-loadAddress'\n )\n console.error(\n `Something went wrong: Custom Address Form (sendAddress) --> ${error}`\n )\n })\n })\n .fail(function (error) {\n _this.orderForm = window.vtexjs.checkout.orderForm\n $('body').removeClass(\n 'js-v-custom-is-loading js-v-custom-is-loadAddress'\n )\n console.error(\n `Something went wrong: Custom Address Form (sendAddress) --> ${error}`\n )\n })\n }\n\n getRegions(country) {\n const countryRegions = _cities.find(\n city => city.countryShortCode === country\n )\n\n return countryRegions.regions.map(i => {\n return `<option value=\"${i.shortCode},${i.name}\">${i.name}</option>`\n })\n }\n\n getCountries() {\n const _this = this\n\n /* eslint eqeqeq: 0 */\n if (\n _this.deliveryCountries == ['BRA'] ||\n _this.deliveryCountries == 'BRA'\n ) {\n _this.deliveryCountries =\n window.vtexjs.checkout.orderForm.shippingData.logisticsInfo[0].shipsTo\n }\n\n return _this.deliveryCountries.map(countryCode => {\n const _i18n = window.vtex.i18n[_this.lang]\n ? window.vtex.i18n[_this.lang]\n : window.vtex.i18n[window.vtex.i18n.locale]\n\n let ret = ''\n\n if (_i18n.countries[countryCode]) {\n ret = `<option value=\"${countryCode}\" ${\n countryCode === _this.mainCountry ? 'selected' : ''\n }>${_i18n.countries[countryCode]}</option>`\n }\n\n return ret\n })\n }\n\n updateFormFieldByCountry(addressrules) {\n const number = $('.vcustom--vtex-omnishipping-1-x-address p.ship-number')\n const state = $('.vcustom--vtex-omnishipping-1-x-address p.ship-state')\n\n if (\n 'number' in addressrules &&\n addressrules.number &&\n addressrules.number.required\n ) {\n number.show()\n number.find('input').attr('required', 'required')\n } else {\n number.hide()\n number.find('input').removeAttr('required')\n }\n\n if (addressrules.state) {\n state.show()\n state.find('select').attr('required', 'required')\n } else {\n state.hide()\n state.find('select').removeAttr('required')\n }\n }\n\n form(orderForm) {\n const _this = this\n\n const { shippingData } = orderForm\n\n const country = _countries.find(c => c[1] === _this.mainCountry)\n\n const { isPickupPoint } = this\n\n const form = `\n <div class=\"vcustom--vtex-omnishipping-1-x-address step\">\n <div>\n <form>\n <p class=\"input v-custom-ship-street required text\"><label id=\"address1-label\" for=\"v-custom-ship-street\">${\n _this.locale\n ? _this.locale.address1Placeholder ||\n 'Street address or P.O. Box'\n : 'Street address or P.O. Box'\n }</label><input required autocomplete=\"none\" id=\"v-custom-ship-street\" type=\"text\" name=\"v-custom-street\" class=\"input-xlarge\" data-hj-whitelist=\"true\" value=\"${\n shippingData.address &&\n null !== shippingData.address.street &&\n !isPickupPoint\n ? shippingData.address.street\n : ''\n }\" placeholder=\"Eg: 225 East 41st Street, New York\"><span class=\"help error\" style=\"\">${\n _this.locale.requiredField\n ? _this.locale.requiredField\n : 'This field is required.'\n }</span></p>\n <div class=\"v-custom-ship-info\">\n <p class=\"input ship-number text ${\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? 'required'\n : 'hide'\n }\"><label id=\"number-label\" for=\"ship-complement\">${\n _this.locale.number ? _this.locale.number || 'Number' : 'Number'\n }</label><input ${\n 'number' in _this.addressrules &&\n _this.addressrules.number &&\n _this.addressrules.number.required\n ? 'required'\n : ''\n } autocomplete=\"on\" id=\"ship-number\" type=\"text\" name=\"v-custom-number\" maxlength=\"20\" placeholder=\"${\n _this.locale.number ? _this.locale.number : ''\n }\" class=\"input-xlarge\" data-hj-whitelist=\"true\" value=\"${\n shippingData.address &&\n shippingData.address.number !== null &&\n !isPickupPoint\n ? shippingData.address.number\n : ''\n }\"><span class=\"help error\" style=\"\">${\n _this.locale ? _this.locale.requiredField : 'This field is required.'\n }</span></p>\n <p class=\"input ship-complement text\"><label id=\"address2-label\" for=\"ship-complement\">${\n _this.locale\n ? _this.locale.address2Placeholder ||\n 'Apartment number, unit, floor, etc.'\n : 'Apartment number, unit, floor, etc.'\n }</label><input autocomplete=\"on\" id=\"ship-complement\" type=\"text\" name=\"v-custom-complement\" maxlength=\"750\" placeholder=\"${\n _this.locale.address2Placeholder ? _this.locale.address2Placeholder : ''\n }\" class=\"input-xlarge\" data-hj-whitelist=\"true\" value=\"${\n shippingData.address &&\n shippingData.address.complement !== null &&\n !isPickupPoint\n ? shippingData.address.complement\n : ''\n }\"></p>\n </div>\n <div class=\"vcustom--vtex-omnishipping-1-x-address__state\">\n <p class=\"input ship-country text ${\n _this.deliveryCountries.length <= 1 ? 'hide' : ''\n } \"><label id=\"country-label\" for=\"ship-country\">Country</label><select name=\"v-custom-country\" id=\"ship-country\" class=\"input-large\">${_this\n .getCountries()\n .join('')}</select></p>\n <p class=\"input ship-city required text\"><label id=\"city-label\" for=\"ship-city\">${\n _this.locale ? _this.locale.city || 'City' : 'City'\n }</label><input required autocomplete=\"on\" id=\"ship-city\" type=\"text\" name=\"v-custom-city\" maxlength=\"100\" class=\"input-large\" data-hj-whitelist=\"true\" value=\"${\n shippingData.address &&\n shippingData.address.city !== null &&\n !isPickupPoint\n ? shippingData.address.city\n : ''\n }\"><span class=\"help error\" style=\"\">${\n _this.locale.requiredField\n ? _this.locale.requiredField\n : 'This field is required.'\n }</span></p>\n <p class=\"input ship-state required text\"><label id=\"state-label\" for=\"ship-state\">${\n _this.locale ? _this.locale.state || 'State' : 'State'\n }</label>\n <select name=\"v-custom-state\" id=\"ship-state\" class=\"input-large\" ${\n _this.addressrules.state ? 'required' : ''\n }>\n <option value=\"\" disabled selected>${\n _this.locale ? _this.locale.state : 'State'\n }</option>\n ${_this.getRegions(country[0]).join('')}\n </select>\n <span class=\"help error\" style=\"\">${\n _this.locale.requiredField\n ? _this.locale.requiredField\n : 'This field is required.'\n }</span>\n </p>\n <p class=\"input ship-postalCode required text\"><label id=\"postalCode-label\" for=\"ship-postalCode\">${\n window.vtex.i18n[_this.lang]\n ? window.vtex.i18n[_this.lang].cart.postalCode\n : 'Zip Code'\n }</label><input required autocomplete=\"on\" id=\"ship-postalCode\" type=\"text\" name=\"receiver\" maxlength=\"${\n _this.addressrules.postalCodeLength\n ? _this.addressrules.postalCodeLength\n : '20'\n }\" class=\"input-xlarge\" data-hj-whitelist=\"true\" value=\"${\n shippingData.address && !isPickupPoint\n ? shippingData.address.postalCode\n : ''\n }\"><span class=\"help error\" style=\"\">${\n _this.locale.requiredField\n ? _this.locale.requiredField\n : 'This field is required.'\n }</span></p>\n </div>\n <p class=\"vtex-omnishipping-1-x-submitShippingStepButton btn-submit-wrapper btn-go-to-shipping-wrapper\"><button class=\"submit btn-go-to-shippping-method btn btn-large btn-success\" id=\"btn-go-to-shippping-method\" type=\"button\">${\n _this.locale.goToShipping\n ? _this.locale.goToShipping\n : 'Continue to shipping'\n }</button></p>\n </form>\n </div>\n </div>\n `\n\n if (shippingData.address && !isPickupPoint) {\n $('.vcustom--vtex-omnishipping-1-x-address #ship-state').val(\n getShipStateValue(shippingData.address.state)\n )\n }\n\n if (\n $('.vcustom--vtex-omnishipping-1-x-address.step').length == 0 &&\n shippingData.logisticsInfo[0].selectedDeliveryChannel !==\n 'pickup-in-point' &&\n window.location.href.indexOf('shipping') !== -1\n ) {\n $('.orderform-template-holder #shipping-data').append(form)\n }\n\n if (\n $('#shipping-option-pickup-in-point').hasClass(\n 'vtex-omnishipping-1-x-deliveryOptionActive'\n )\n ) {\n $('body').removeClass('v-custom-addressForm-on')\n }\n\n this.googleForm()\n this.updateGoogleForm(country[1].toLowerCase())\n\n // sort countries\n const sel = $('.vcustom--vtex-omnishipping-1-x-address #ship-country')\n const selected = sel.val() // cache selected value, before reordering\n const optsList = sel.find('option')\n\n optsList.sort(function (a, b) {\n return $(a).text() > $(b).text() ? 1 : -1\n })\n sel.html('').append(optsList)\n sel.val(selected) // set cached selected value\n\n shippingData.address && shippingData.address.addressType === 'search'\n ? (this.isPickupPoint = true)\n : (this.isPickupPoint = false)\n }\n\n validateAllFields() {\n const _this = this\n\n _this.validate = true\n $(\n '.vcustom--vtex-omnishipping-1-x-address input:required, .vcustom--vtex-omnishipping-1-x-address select:required'\n ).each(function () {\n if (this.value === '') {\n $(this).addClass('error')\n _this.validate = false\n } else {\n $(this).removeClass('error')\n }\n })\n }\n\n scrollToAddress() {\n const doc = document.documentElement\n const scrollTop =\n (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)\n\n const posSPtop = $('#shipping-data').offset().top\n\n if (scrollTop > posSPtop) window.scrollTo(0, posSPtop)\n }\n\n submitAddressForm() {\n const _this = this\n\n _this.validateAllFields()\n\n if (!_this.validate) return\n\n const _st = $(\n '.vcustom--vtex-omnishipping-1-x-address #v-custom-ship-street'\n )\n\n const country = $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-country'\n ).val()\n\n const street = _st.attr('data-street') || ''\n const number = $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-number'\n ).val()\n ? $('.vcustom--vtex-omnishipping-1-x-address #ship-number').val()\n : _st.attr('data-number') || ''\n\n const geoCoordinates = _st.attr('data-geocoordinates') || []\n const neighborhood = _st.attr('data-neighborhood') || null\n const complement = $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-complement'\n ).val()\n\n const city = $('.vcustom--vtex-omnishipping-1-x-address #ship-city').val()\n const [stateShortCode, stateName] = $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-state'\n )\n .val()\n .split(',')\n\n const state = stateShortCode || stateName\n\n const postalCode = $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-postalCode'\n ).val()\n\n _this.sendAddress(\n country,\n street,\n number,\n state,\n postalCode,\n city,\n complement,\n _this.address.addressQuery,\n _this.address.addressId,\n neighborhood,\n geoCoordinates\n )\n }\n\n updateFormByCountry(countryCode) {\n if (~window.location.host.indexOf('myvtex')) {\n console.log('countryCode:', countryCode)\n }\n\n const _this = this\n const country = _countries.find(c => c[1] === countryCode)\n const state = _this.address.state || null\n\n _this.getCountryRule(country[1]).then(rules => {\n _this.addressrules = rules\n _this.updateFormFieldByCountry(_this.addressrules)\n $(\"select[name='v-custom-state']\").html(\n `${_this.getRegions(country[0]).join('')}`\n )\n if (state && getShipStateValue(state)) {\n $('.vcustom--vtex-omnishipping-1-x-address #ship-state').val(\n getShipStateValue(state)\n )\n }\n\n _this.updateGoogleForm(countryCode.toLowerCase())\n })\n }\n\n bind() {\n const _this = this\n\n $('body').on(\n 'click',\n '.step.shipping-data .vtex-omnishipping-1-x-buttonEditAddress, .step.shipping-data .vtex-omnishipping-1-x-linkEdit',\n function () {\n if (\n !$('#shipping-option-pickup-in-point').hasClass(\n 'vtex-omnishipping-1-x-deliveryOptionActive'\n )\n ) {\n const indexAddress = $(\n '.vtex-omnishipping-1-x-addressItemOption.vtex-omnishipping-1-x-active'\n ).index()\n\n let addressClicked = _this.orderForm.shippingData.availableAddresses.find(\n address => {\n return (\n address.addressId ==\n _this.orderForm.shippingData.address.addressId\n )\n }\n )\n\n if (!addressClicked) {\n if (indexAddress < 0) {\n addressClicked = addressClicked.selectedAddresses[0]\n } else {\n addressClicked = addressClicked.availableAddresses[indexAddress]\n }\n }\n\n if (\n addressClicked &&\n addressClicked.city &&\n addressClicked.city.indexOf('*') < 0\n ) {\n try {\n $('body').addClass(_this.BodyFormClasses.join(' '))\n if (\n addressClicked.isDisposable ||\n ~window.location.origin.indexOf('myvtex')\n ) {\n setTimeout(() => {\n let countryClicked = _this.deliveryCountries.filter(\n country => country == addressClicked.country\n )\n\n countryClicked = countryClicked.length\n ? countryClicked[0]\n : _this.deliveryCountries[0]\n\n addressClicked.street = addressClicked.street || ''\n _this.updateAddress(\n countryClicked,\n addressClicked.postalCode,\n addressClicked.city,\n addressClicked.state,\n addressClicked.number,\n addressClicked.street,\n addressClicked.complement,\n '',\n addressClicked.addressId,\n addressClicked.geoCoordinates\n )\n\n $(\n '.vcustom--vtex-omnishipping-1-x-address #ship-country'\n ).val(countryClicked)\n _this.updateFormByCountry(countryClicked)\n _this.setForm(\n countryClicked,\n addressClicked.street,\n addressClicked.addressQuery,\n addressClicked.number,\n addressClicked.postalCode,\n addressClicked.city,\n addressClicked.state,\n addressClicked.complement,\n addressClicked.neighborhood,\n addressClicked.geoCoordinates\n )\n\n _this.triggerAddressValidation()\n }, 100)\n }\n } catch (e) {\n $('body').removeClass(_this.BodyFormClasses.join(' '))\n }\n } else {\n $('body').removeClass(_this.BodyFormClasses.join(' '))\n }\n }\n }\n )\n\n $('body').on(\n 'click',\n '.vtex-omnishipping-1-x-buttonCreateAddress, .vtex-omnishipping-1-x-disclaimer a#remove-unavailable-items',\n function () {\n if (\n !$('#shipping-option-pickup-in-point').hasClass(\n 'vtex-omnishipping-1-x-deliveryOptionActive'\n )\n ) {\n $('body').addClass(_this.BodyFormClasses.join(' '))\n _this.address.addressId = ''\n _this.updateAddress('')\n }\n }\n )\n\n $('body').on('click', '#shipping-option-pickup-in-point', function () {\n $('body').removeClass(_this.BodyFormClasses.join(' '))\n })\n\n $('body').on(\n 'click',\n '.vtex-omnishipping-1-x-backToAddressList',\n function () {\n $('body').removeClass(_this.BodyFormClasses.join(' '))\n _this.address.addressId = ''\n }\n )\n\n $('body').on(\n 'click',\n '.vtex-omnishipping-1-x-addressItemOption',\n function () {\n _this.address.addressId = _this.orderForm.shippingData\n .availableAddresses[$(this).index()]\n ? _this.orderForm.shippingData.availableAddresses[$(this).index()]\n .addressId\n : ''\n }\n )\n\n $('body').on('change', \"select[name='v-custom-country']\", function (e) {\n e.stopImmediatePropagation()\n try {\n _this.updateFormByCountry(this.value)\n _this.updateAddress('')\n } catch (err) {\n console.error(`updateFormByCountry ${this.value} error:`, err)\n }\n })\n\n $('body').on('click', '#btn-go-to-shippping-method', function (e) {\n e.preventDefault()\n e.stopImmediatePropagation()\n _this.submitAddressForm()\n _this.scrollToAddress()\n })\n\n $('body').on(\n 'keyup',\n '.vcustom--vtex-omnishipping-1-x-address input',\n function () {\n if (this.value !== '') {\n $(this).removeClass('error')\n }\n }\n )\n }\n\n checkFirstLogin(orderForm) {\n const _this = this\n\n if (orderForm && orderForm.shippingData) {\n if (\n (orderForm.shippingData.address === null ||\n orderForm.shippingData.address.addressType === 'search') &&\n !_this.firstAttempt &&\n $('.vtex-omnishipping-1-x-deliveryOptionActive').attr('id') ===\n 'shipping-option-delivery'\n ) {\n $('body').addClass(_this.BodyFormClasses[0])\n }\n }\n }\n\n getCountryRule(country) {\n const _this = this\n\n return fetch(`/rules/${country}`)\n .then(res => res.json())\n .then(jsonRes => {\n const { data: rules, success } = jsonRes\n\n if (country == 'MLT') {\n return _countriesrules.MLT\n }\n if (country == 'ITA') {\n return _countriesrules.ITA\n }\n\n return success ? rules.geolocation : _this.getCountryRule('default')\n })\n .catch(error => {\n throw new Error(error)\n })\n }\n\n loadingAddress() {\n $(window).on('VCUSTOM__ADDRESSFORM__CLEARED', function () {\n console.log('VCUSTOM__ADDRESSFORM__CLEARED')\n $('body').addClass('js-v-custom-is-loadAddress')\n })\n\n $(window).on('VCUSTOM__ADDRESSFORM__UPDATED', function () {\n console.log('VCUSTOM__ADDRESSFORM__UPDATED')\n $('body').removeClass('js-v-custom-is-loadAddress')\n })\n }\n\n events() {\n const _this = this\n\n _this.loadingAddress()\n $(window).on('orderFormUpdated.vtex', function (evt, orderForm) {\n _this.orderForm = orderForm\n _this.checkFirstLogin(orderForm)\n })\n }\n\n init(orderForm) {\n const _this = this\n\n try {\n if (!window.google) _this.loadScript()\n } catch (e) {\n console.warn(\n `Error in customFormInit while loading \"loadScript\" function`\n )\n }\n\n if (\n orderForm &&\n window.google &&\n $('.vcustom--vtex-omnishipping-1-x-address').length < 1 &&\n orderForm.items.length\n ) {\n const lastCountry =\n (_this.orderForm.shippingData &&\n _this.orderForm.shippingData.address &&\n _this.orderForm.shippingData.address.country) ||\n _this.orderForm.storePreferencesData.countryCode\n\n $('body').addClass(`${this.classOn}`)\n _this.orderForm = orderForm\n _this.getCountryRule(lastCountry).then(rules => {\n _this.addressrules = rules\n _this.bind()\n _this.deliveryCountries = window.checkout.deliveryCountries()\n _this.mainCountry = window.checkout.countryCode()\n _this.lang = _this.orderForm.clientPreferencesData.locale\n\n _this.locale =\n _locale[_this.orderForm.storePreferencesData.countryCode] ||\n _locale.GBR\n\n if (_this.lang === 'es-AR') _this.lang = 'es'\n\n if (_this.orderForm && _this.orderForm.shippingData) {\n const shippingData = _this.orderForm.shippingData.address\n\n if (shippingData) {\n _this.updateAddress(\n shippingData.country,\n shippingData.postalCode,\n shippingData.city,\n shippingData.state,\n shippingData.street,\n shippingData.number,\n shippingData.complement,\n '',\n shippingData.addressId,\n shippingData.geoCoordinates\n )\n } else {\n _this.updateAddress('')\n }\n }\n\n _this.form(orderForm)\n })\n }\n }\n}\n\nmodule.exports = fnsCustomAddressForm\n\n```" } ]
code_checkout-ui-custom_dd6f2f57
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_js/_v.custom.checkout.ui.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n/* eslint-disable no-prototype-builtins */\n/* eslint-disable vtex/prefer-early-return */\n/* eslint-disable func-names */\nconst { _locale } = require('./_locale-infos.js')\nconst {\n debounce,\n formatCurrency,\n findClosestLang,\n parseDateBd,\n} = require('./_utils.js')\nconst {\n _countriesrules,\n _countries,\n _cities,\n _addressPlaceholder,\n} = require('./_countries.js')\nconst FnsCustomAddressForm = require('./_customAddressForm.js')\n\nclass checkoutCustom {\n constructor({\n type = 'vertical',\n accordionPayments = true,\n deliveryDateFormat = false,\n quantityPriceCart = false,\n showNoteField = false,\n customAddressForm = false,\n hideEmailStep = true,\n } = {}) {\n this.type = type // [\"vertical\"]\n this.orderForm = ''\n this.orderId = this.orderForm ? this.orderForm.orderFormId : ''\n this.lang = ''\n this.checkoutButton = null\n\n this.accordionPayments = accordionPayments\n this.deliveryDateFormat = deliveryDateFormat\n this.quantityPriceCart = quantityPriceCart\n this.showNoteField = showNoteField\n this.customAddressForm = customAddressForm\n this.hideEmailStep = hideEmailStep\n\n this._holidays = null\n this.countriesRules = _countriesrules\n this.countries = _countries\n this.cities = _cities\n this.addressPlaceholder = _addressPlaceholder\n }\n\n general() {\n if (!$('.custom-cart-template-wrap').length) {\n $('.cart-template.mini-cart .cart-fixed > *').wrapAll(\n '<div class=\"custom-cart-template-wrap\">'\n )\n }\n\n $('.table.cart-items tbody tr.product-item').each(function () {\n if (!$(this).find('.v-custom-product-item-wrap').length) {\n $(this).find('> *').wrapAll(`<div class=\"v-custom-product-item-wrap\">`)\n }\n })\n\n $('body').addClass('v-custom-loaded')\n }\n\n onDomMutation({ targetNode, callback, disconnectCondition = true }) {\n const observeDOM = (function () {\n const MutationObserver =\n window.MutationObserver || window.WebKitMutationObserver\n\n return function (obj, callback1) {\n if (!obj || obj.nodeType !== 1) return\n\n if (MutationObserver) {\n // define a new observer\n const mutationObserver = new MutationObserver(callback1)\n\n // have the observer observe foo for changes in children\n mutationObserver.observe(obj, {\n childList: true,\n subtree: true,\n })\n\n return mutationObserver\n }\n\n // browser support fallback\n if (window.addEventListener) {\n obj.addEventListener('DOMNodeInserted', callback1, false)\n obj.addEventListener('DOMNodeRemoved', callback1, false)\n }\n }\n })()\n\n const observer = new MutationObserver(function () {\n if (targetNode && disconnectCondition) {\n observer.disconnect()\n\n observeDOM(targetNode, () => callback())\n }\n })\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n })\n }\n\n buildVertical() {\n $('body').addClass('body-cart-vertical')\n if ($('.cart-template .cart-links-bottom:eq(0)').length) {\n this.checkoutButton = $('.cart-template .cart-links-bottom:eq(0)')\n }\n\n if (this.checkoutButton) {\n this.checkoutButton.appendTo('.cart-template > .summary-template-holder')\n }\n }\n\n buildHorizontal() {}\n\n showDeliveryOptions() {\n $(\n '.cart-template .cart-more-options:eq(0), .cart-template .extensions-checkout-buttons-container'\n ).appendTo('.cart-template-holder')\n }\n\n builder() {\n const _this = this\n\n if (_this.type === 'vertical') {\n _this.buildVertical()\n } else if (_this.type === 'horizontal') {\n _this.buildHorizontal()\n } else {\n console.error('No `type` identified, check your code')\n }\n\n if (_this.showNoteField) {\n $('body').addClass('js-vcustom-showNoteField')\n }\n\n if (_this.hideEmailStep) {\n $('body').addClass('js-vcustom-hideEmailStep')\n }\n\n _this.showDeliveryOptions()\n }\n\n checkEmpty(items) {\n if (items.length === 0) {\n $('body').addClass('v-custom-cart-empty')\n } else {\n $('body').removeClass('v-custom-cart-empty')\n }\n }\n\n addEditButtoninLogin() {\n $('#v-custom-edit-login-data').remove()\n $('.client-pre-email h3.client-pre-email-h span').append(`\n <a id=\"v-custom-edit-login-data\" class=\"link-box-edit btn btn-small\" style=\"\" title=\"${\n this.lang ? this.lang.editLabel : true\n }\">\n <i class=\"icon-edit\"></i>\n <i class=\"icon-spinner icon-spin icon-3x\"></i>\n </a>\n `)\n }\n\n addStepsHeader() {\n if ($('.checkout-steps').length > 0 || !this.lang) return false\n\n const addStepsHeaderHtml = `\n <div class=\"checkout-steps\">\n <div class=\"checkout-steps-wrap\">\n <span class=\"checkout-steps_bar\">\n <span class=\"checkout-steps_bar_inner\"></span>\n <span class=\"checkout-steps_bar_inner-active\"></span>\n </span>\n <div class=\"checkout-steps_items\">\n <span class=\"checkout-steps_item checkout-steps_item_cart js-checkout-steps-item\" data-url=\"/checkout/#/cart\">\n <span class=\"text\">${\n this.lang.checkoutStepsLabelCart || 'Cart'\n }</span>\n </span>\n <span class=\"checkout-steps_item checkout-steps_item_identification js-checkout-steps-item\" data-url=\"/checkout/#/profile\">\n <span class=\"text\">${\n this.lang.checkoutStepsLabelIdentification || 'Identification'\n }</span>\n </span>\n <span class=\"checkout-steps_item checkout-steps_item_shipping js-checkout-steps-item\" data-url=\"/checkout/#/shipping\">\n <span class=\"text\">${\n this.lang.checkoutStepsLabelShipping || 'Shipping'\n }</span>\n </span>\n <span class=\"checkout-steps_item checkout-steps_item_payment js-checkout-steps-item\" data-url=\"/checkout/#/payment\">\n <span class=\"text\">${\n this.lang.checkoutStepsLabelPayment || 'Payment'\n }</span>\n </span>\n <span class=\"checkout-steps_item checkout-steps_item_confirmation js-checkout-steps-item\">\n <span class=\"text\">${\n this.lang.checkoutStepsLabelConfirmation || 'Confirmation'\n }</span>\n </span>\n </div>\n </div>\n </div>\n `\n\n if ($('header.main-header').length) {\n $('header.main-header .container').append(addStepsHeaderHtml)\n }\n }\n\n addAssemblies(orderForm) {\n try {\n $.each(orderForm.items, function (i) {\n const _item = this\n\n if (_item.assemblies.length > 0) {\n let _assembliesHtml = `<div class=\"v-custom-assemblies\">`\n\n $.each(_item.assemblies, function () {\n const _assemblies = this\n\n const inptValues = _assemblies.inputValues\n\n _assembliesHtml += `<p>${_assemblies.id}</p>`\n _assembliesHtml += `<ul class=\"v-custom-assemblies__values\">`\n Object.entries(inptValues).forEach(([key, val]) => {\n _assembliesHtml += `<li class=\"v-custom-assemblies__values__item assembly-${key\n .toLowerCase()\n .replace(/ /g, '-')}\">\n <strong>${key}</strong>\n <span>${val.trim()}</span>\n </li>`\n })\n _assembliesHtml += `</ul>`\n })\n _assembliesHtml += `</div>`\n if (\n !$(`.table.cart-items tbody > tr.product-item:eq(${i})`).hasClass(\n 'v-custom-assemblies-in'\n )\n ) {\n $(`.table.cart-items tbody > tr.product-item:eq(${i})`)\n .addClass('v-custom-assemblies-in')\n .find('td.product-name')\n .append(_assembliesHtml)\n }\n }\n })\n } catch (e) {\n console.error('addAssemblies error:', e)\n }\n }\n\n bundleItems(orderForm) {\n try {\n $.each(orderForm.items, function (i) {\n if (this.bundleItems.length > 0) {\n $(`.table.cart-items tbody > tr.product-item:eq(${i})`)\n .addClass('v-custom-bundles-in')\n .find('td.product-name')\n } else {\n $(`.table.cart-items tbody > tr.product-item:eq(${i})`).removeClass(\n 'v-custom-bundles-in'\n )\n }\n })\n $('.table.cart-items tbody tr.item-service').each(function () {\n if ($(this).find('.v-custom-trservice-wrap').length > 0) return false\n $(this).find('> *').wrapAll(`<div class=\"v-custom-trservice-wrap\">`)\n })\n } catch (e) {\n console.error('bundleItems error:', e)\n }\n }\n\n showCustomMsgCoupon(orderForm) {\n const _this = this\n const _coupon = orderForm.marketingData.coupon\n\n const couponItemsCount = orderForm.items.reduce(function (\n accumulator,\n item\n ) {\n return (\n accumulator +\n (item.priceTags.length\n ? item.priceTags.filter(_pricetag => {\n return _pricetag.ratesAndBenefitsIdentifier\n ? _pricetag.ratesAndBenefitsIdentifier.matchedParameters[\n 'couponCode@Marketing'\n ] === _coupon\n : 0\n }).length\n : 0)\n )\n },\n 0)\n\n // Match coupon with rateAndBenefitsIdentifiers\n let couponMatch = null\n\n if (\n orderForm.ratesAndBenefitsData &&\n orderForm.ratesAndBenefitsData.rateAndBenefitsIdentifiers.length\n ) {\n couponMatch = orderForm.ratesAndBenefitsData.rateAndBenefitsIdentifiers.find(\n item => item.name === _coupon\n )\n }\n\n if (!_coupon || couponItemsCount > 0 || couponMatch) {\n $('fieldset.coupon-fieldset').removeClass(\n 'js-vcustom-showCustomMsgCoupon'\n )\n $('.vcustom-showCustomMsgCoupon').remove()\n\n return false\n }\n\n if ($('.vcustom-showCustomMsgCoupon').length === 0) {\n $('fieldset.coupon-fieldset')\n .addClass('js-vcustom-showCustomMsgCoupon')\n .append(\n `<p class=\"vcustom-showCustomMsgCoupon\">${_this.lang.couponInactive}</div>`\n )\n }\n }\n\n addLabels(orderForm) {\n const _coupon = orderForm.marketingData.coupon\n const _couponItems = []\n\n if (!_coupon) return false\n\n try {\n $(\n `.table.cart-items tbody tr.product-item, .mini-cart .cart-items li`\n ).removeClass('v-custom-addLabels-active js-vcustom-addLabels')\n $(`.v-custom-addLabels-active-flag`).remove()\n $.each(orderForm.items, function (i) {\n if (this.priceTags.length > 0) {\n if (\n this.priceTags.filter(_pricetag => {\n return _pricetag.ratesAndBenefitsIdentifier\n ? _pricetag.ratesAndBenefitsIdentifier.matchedParameters[\n 'couponCode@Marketing'\n ] === _coupon\n : false\n }).length > 0\n ) {\n _couponItems.push(this)\n $(`.table.cart-items tbody tr.product-item:eq(${i})`)\n .addClass('v-custom-addLabels-active js-vcustom-addLabels')\n .find('.product-name')\n .append(\n `<span class=\"v-custom-addLabels-active-flag\">${_coupon}</span>`\n )\n }\n }\n })\n } catch (e) {\n console.error(e)\n }\n }\n\n buildMiniCart(orderForm) {\n /* overide refresh from vtex */\n if (\n orderForm.items.filter(item => {\n return item.parentItemIndex !== null\n }).length === 0\n ) {\n return false\n }\n\n const _items = orderForm.items\n\n if ($('.mini-cart .cart-items > li').length === _items.length) {\n $(`.mini-cart .cart-items`).html(`${$(`.mini-cart .cart-items`).html()}`)\n $.each(orderForm.items, function (i) {\n if (this.availability === 'available') {\n $(`.mini-cart .cart-items > li:eq(${i})`)\n .find('.item-unavailable')\n .remove()\n }\n })\n }\n }\n\n setParentIndex(orderForm) {\n const _orderForm = orderForm.items.filter(item => !item.isGift) // remove gift\n\n $.each(_orderForm, function (i) {\n if (this.parentItemIndex !== null) {\n $(`.table.cart-items tbody > tr.product-item:eq(${i})`).attr(\n 'data-parentItemIndex',\n this.parentItemIndex\n )\n }\n })\n }\n\n handleBreakpointChange() {\n if (window.innerWidth <= 767) {\n $('body').on('click', '#edit-address-button', () => {\n setTimeout(() => {\n const shippingDataElement = document.getElementById('shipping-data')\n const offset = shippingDataElement.offsetTop - 200\n\n window.scrollTo({\n top: offset,\n behavior: 'smooth',\n })\n }, 500)\n })\n }\n }\n\n removeMCLoader() {\n $(`.mini-cart .cart-items`).addClass('v-loaded')\n }\n\n removeCILoader() {\n $(`.cart-items`).addClass('v-loaded')\n }\n\n enchanceSummary(key, obj) {\n const _this = this\n\n if (\n _this.orderForm &&\n $('.mini-cart .cart-items > li').length === _this.orderForm.items.length\n ) {\n $(`.mini-cart .cart-items > li:eq(${key})`)\n .find(`.v-custom-bundles`)\n .remove()\n $(`.mini-cart .cart-items > li:eq(${key})`)\n .append(`<div class=\"v-custom-bundles\"></div>`)\n .addClass('v-custom-indexedItems-in')\n if (\n $(`.mini-cart .cart-items > li:eq(${key})`)\n .find(' > .v-custom-bundles')\n .html() === ''\n ) {\n for (const prop in obj) {\n if (!obj.hasOwnProperty(prop)) continue\n const iiItem = obj[prop]\n\n $(`.mini-cart .cart-items > li:eq(${key}) > .v-custom-bundles`)\n .append(`\n <div class=\"hproduct item v-custom-indexed-item ${\n iiItem.sellingPrice ? '' : 'free-item'\n }\" data-sku=\"${iiItem.id}\">\n <a href=\"${iiItem.detailUrl}\" class=\"url\">\n <img height=\"45\" width=\"45\" class=\"photo\" src=\"${\n iiItem.imageUrl\n }\" alt=\"${iiItem.name}\">\n </a>\n <span class=\"fn product-name\" title=\"${iiItem.name}\" href=\"${\n iiItem.detailUrl\n }\">${iiItem.name}</span>\n <span class=\"quantity badge\">${iiItem.quantity}</span>\n <div class=\"description\">\n <strong class=\"price pull-right\" data-bind=\"text: sellingPriceLabel\">\n ${\n iiItem.sellingPrice\n ? `${\n _this.orderForm.storePreferencesData.currencySymbol\n } ${formatCurrency(\n _this.orderForm.clientPreferencesData.locale,\n _this.orderForm.storePreferencesData.currencyCode,\n iiItem.sellingPrice\n ).toFixed(2)}`\n : `Free`\n } </strong>\n </div>\n </div>\n `)\n $(`.mini-cart .cart-items > li[data-sku='${iiItem.id}']`).addClass(\n 'v-custom-indexed-item'\n )\n }\n }\n }\n }\n\n indexedInItems(orderForm) {\n const _this = this\n\n try {\n if (\n orderForm.items.filter(item => {\n return item.parentItemIndex !== null\n }).length === 0\n ) {\n _this.removeMCLoader()\n\n return false\n }\n\n const _orderForm = orderForm.items.filter(item => !item.isGift) // remove gift\n\n if (_orderForm.length) {\n const indexedInItems = _orderForm.reduce((c, v) => {\n if (v.parentItemIndex !== null) {\n const index = v.parentItemIndex\n\n c[index] = c[index] || []\n c[index].push(v)\n }\n\n return c\n }, {})\n\n for (const key in indexedInItems) {\n const obj = indexedInItems[key]\n\n if (\n !$(`.table.cart-items tbody > tr.product-item:eq(${key})`).find(\n '.v-custom-bundles'\n ).length\n ) {\n $(`.table.cart-items tbody > tr.product-item:eq(${key})`)\n .append(`<div class=\"v-custom-bundles\"></div>`)\n .addClass('v-custom-indexedItems-in')\n if (\n $(`.table.cart-items tbody > tr.product-item:eq(${key})`)\n .find('.v-custom-bundles')\n .html() === ''\n ) {\n for (const prop in obj) {\n if (!obj.hasOwnProperty(prop)) continue\n const iiItem = obj[prop]\n\n $(\n `.table.cart-items tbody > tr.product-item[data-sku='${iiItem.id}'][data-parentitemindex='${iiItem.parentItemIndex}'], .table.cart-items tbody > tr.product-item[data-sku='${iiItem.id}'][data-parentitemindex='${iiItem.parentItemIndex}'] + .item-unavailable`\n )\n .addClass('v-custom-indexed-item')\n .clone()\n .appendTo(\n `.table.cart-items tbody > tr.product-item:eq(${key}) > .v-custom-bundles`\n )\n }\n }\n }\n\n _this.enchanceSummary(key, obj)\n setTimeout(function () {\n _this.enchanceSummary(key, obj)\n }, 150)\n }\n\n _this.removeMCLoader()\n }\n } catch (e) {\n _this.removeMCLoader()\n }\n }\n\n holidaysBetweenDates(d0, d1, _holidays) {\n /* Two working days and an sunday (not working day) */\n const holidays = _holidays\n\n let holidaysCount = 0\n\n holidays.forEach(day => {\n if (new Date(day) >= d0 && new Date(day) <= d1) {\n /* If it is not saturday (6) or sunday (0), substract it */\n if (parseDateBd(day).getDay() % 6 !== 0) {\n holidaysCount++\n }\n }\n })\n\n return holidaysCount\n }\n\n addBusinessDays(n, days, lang = window.i18n.options.lng) {\n const _this = this\n\n const typeDays = days.replace(/[0-9]/g, '')\n\n try {\n let d = new Date()\n\n d = new Date(d.getTime())\n const day = d.getDay()\n\n if (typeDays === 'd') {\n d.setDate(d.getDate() + n)\n } else {\n d.setDate(\n d.getDate() +\n n +\n (day === 6 ? 2 : +!day) +\n Math.floor((n - 1 + (day % 6 || 1)) / 5) * 2\n )\n }\n\n let bdHolidays = 0\n\n if (\n !(\n _this._holidays &&\n _this._holidays.name &&\n _this._holidays.name === 'Error'\n ) &&\n _this._holidays\n ) {\n bdHolidays = _this.holidaysBetweenDates(\n new Date(),\n d,\n _this._holidays.map(hd => hd.startDate.split('T')[0])\n )\n }\n\n if (\n _this._holidays &&\n _this._holidays.name &&\n _this._holidays.name === 'Error'\n )\n bdHolidays = 0\n\n let dhd = new Date()\n\n if (bdHolidays) {\n dhd = new Date(dhd.getTime())\n const dhdDay = dhd.getDay()\n\n dhd.setDate(\n dhd.getDate() +\n (n + bdHolidays) +\n (dhdDay === 6 ? 2 : +!dhdDay) +\n Math.floor((n + bdHolidays - 1 + (dhdDay % 6 || 1)) / 5) * 2\n )\n }\n\n let newDate = bdHolidays ? dhd : d\n\n let doptions = { weekday: 'long', month: 'short', day: 'numeric' }\n\n if (lang === 'pt') {\n doptions = { weekday: 'short', month: 'short', day: 'numeric' }\n }\n\n if (d.getDate() - new Date().getDate() === 1) {\n return _this.lang.tomorrowLabel || 'Tomorrow'\n }\n\n newDate = newDate.toLocaleDateString(lang, doptions)\n\n return newDate\n } catch (e) {\n console.error(`Error at \"addBusinessDays\":`, e)\n }\n }\n\n changeShippingTimeInfo() {\n const _this = this\n\n $('body').addClass('v-custom-changeShippingTimeInfo')\n const mainSTIelems = [\n '.shp-summary-package-time > span',\n 'p.vtex-omnishipping-1-x-sla.sla',\n '.vtex-omnishipping-1-x-leanShippingTextLabelSingle > span',\n 'span.shipping-date',\n '.shp-option-text-time',\n '.pkpmodal-pickup-point-sla',\n '.shp-option-text-package',\n '.srp-delivery-current-many__sla',\n '.shipping-estimate-date:eq(0)',\n '.srp-shipping-current-single__sla',\n ]\n\n const [\n logisticsInfo,\n ] = window.vtexjs.checkout.orderForm.shippingData.logisticsInfo\n\n const availableSlas = logisticsInfo.slas\n\n const { selectedSla } = logisticsInfo\n\n const selectedSlaDays = availableSlas.find(e => e.name === selectedSla)\n ? availableSlas.find(e => e.name === selectedSla).shippingEstimate\n : false\n\n try {\n $(`\n .vtex-omnishipping-1-x-summaryPackage.shp-summary-package:not(.v-changeShippingTimeInfo-active),\n .vtex-omnishipping-1-x-leanShippingOption,\n .vtex-omnishipping-1-x-packageItem:not(.v-changeShippingTimeInfo-active),\n .orderform-template .cart-template.mini-cart .item,\n .vtex-pickup-points-modal-3-x-pickupPointSlaAvailability,\n .srp-delivery-current-many,\n td.shipping-date,\n .srp-shipping-current-single\n `).each(function () {\n const txtselectin = $(this)\n .find(\n mainSTIelems\n .map(elem => `${elem}:not(.v-changeShippingTimeInfo-elem-active)`)\n .join(', ')\n )\n .text()\n\n let days\n\n if (!$(this).hasClass('srp-delivery-current-many')) {\n if (\n txtselectin !== '' &&\n txtselectin.match(/(day)|(dia)|(día)|(tag)/gm)\n ) {\n days = parseInt(txtselectin.match(/\\d+/), 10)\n }\n } else if (selectedSlaDays) {\n days = parseInt(selectedSlaDays.match(/\\d+/), 10)\n }\n\n if (days) {\n let _delivtext = _this.lang.deliveryDateText\n\n if (\n $(this)\n .find(mainSTIelems.join(', '))\n .text()\n .toLowerCase()\n .match(\n /(ready in up)|(pronto)|(a partir de)|(hasta)|(fertig in)/gm\n )\n ) {\n _delivtext = _this.lang.PickupDateText\n } // check if is pickup. OBS: none of others solutions worked, needs constantly update\n\n $(this)\n .find(mainSTIelems.join(', '))\n .html(\n `${_delivtext} <strong>${_this.addBusinessDays(\n days,\n selectedSlaDays\n )}</strong>`\n )\n .addClass('v-changeShippingTimeInfo-elem-active')\n }\n\n $(this).addClass('v-changeShippingTimeInfo-active')\n })\n\n // temporaly\n const shippingPreviewPackges = $(\n '.srp-delivery-info .srp-packages:not(.v-changeShippingTimeInfo-elem-active)'\n )\n\n $('.js-shippingPreviewPackges').remove()\n if (shippingPreviewPackges.length) {\n const a = shippingPreviewPackges\n .text()\n .split(':')[1]\n .split(/,| and | e | y /)\n\n const deliveryDates = []\n\n $.each(a, function (i) {\n const txtselectin = a[i]\n\n if (\n txtselectin !== '' &&\n txtselectin.match(/(day)|(dia)|(día)|(tag)/gm)\n ) {\n const days = parseInt(txtselectin.match(/\\d+/), 10)\n\n if (days) {\n let _delivtext = _this.lang.deliveryDateText\n\n if (\n txtselectin\n .toLowerCase()\n .match(\n /(ready in up)|(pronto)|(a partir de)|(hasta)|(fertig in)/gm\n )\n ) {\n _delivtext = _this.lang.PickupDateText\n } // check if is pickup. OBS: none of others solutions worked, needs constantly update\n\n deliveryDates.push(\n `${_delivtext} <strong>${_this.addBusinessDays(\n days,\n selectedSlaDays\n )}</strong>`\n )\n }\n }\n })\n shippingPreviewPackges\n .hide()\n .after(\n `<p class=\"black-50 mt3 mb0 js-shippingPreviewPackges\">${\n shippingPreviewPackges.text().split(':')[0]\n }: ${deliveryDates.join('; ')}</p>`\n )\n .addClass('v-changeShippingTimeInfo-active')\n }\n } catch (e) {\n console.error('changeShippingTimeInfo Error:', e)\n }\n }\n\n fetchHolidays() {\n const _this = this\n const roothPath =\n window.__RUNTIME__.rootPath ||\n window.location.pathname.split(`/checkout`)[0]\n\n if (_this._holidays) return\n\n fetch(`${roothPath}/_v/holidays`, {\n method: 'GET',\n })\n .then(response => response.json())\n .then(function (data) {\n _this._holidays = data\n })\n .catch(function (err) {\n // eslint-disable-next-line no-console\n console.log(`holidays error`, err)\n })\n }\n\n changeShippingTimeInfoInit() {\n const _this = this\n\n if (_this.lang && _this.deliveryDateFormat) {\n _this.fetchHolidays()\n _this.changeShippingTimeInfo()\n }\n }\n\n enchancementTotalPrice(orderForm) {\n const _this = this\n\n if (!_this.quantityPriceCart) return\n try {\n $.each(orderForm.items, function (i) {\n const _item = this\n const _trElem = $(`.table.cart-items tbody tr.product-item:eq(${i})`)\n\n if (\n _item.quantity === 1 ||\n _trElem.find('td.product-price').find('.best-price').length === 0\n ) {\n return\n }\n\n const totalValue = _trElem.find('.total-selling-price:eq(0)').text()\n const _eachprice = `\n <div class=\"v-custom-quantity-price vqc-ldelem\">\n <span class=\"v-custom-quantity-price__list\">\n ${\n _item.listPrice > _item.sellingPrice\n ? `<span class=\"v-custom-quantity-price__list--list\">${\n orderForm.storePreferencesData.currencySymbol\n } ${(_item.listPrice / 100).toFixed(2)}</span>`\n : ''\n }\n </span>\n </div>\n `\n\n _trElem.find('td.product-price').find('.vqc-ldelem').remove()\n // _trElem.find(\"td.quantity-price\").prepend(_eachprice);\n _trElem\n .find('td.product-price')\n .addClass('v-custom-quantity-price-active')\n .prepend(_eachprice)\n .append(\n `<div class=\"v-custom-quantity-price vqc-ldelem\"><span class=\"v-custom-quantity-price__best\">${totalValue}</span></div>`\n )\n _trElem\n .find('td.product-price')\n .find('> .best-price')\n .wrap(`<div class=\"v-custom-quantity-price__list--selling\"></div>`)\n _trElem\n .find('td.product-price')\n .find('.v-custom-quantity-price__list--selling')\n .append(\n `<span class=\"vqc-ldelem\"> ${\n _this.lang ? _this.lang.eachLabel : 'each'\n }</span>`\n )\n })\n } catch (e) {\n console.error('enchancementTotalPrice error:', e)\n }\n }\n\n condensedTaxes(orderForm) {\n const customtax = orderForm.totalizers.filter(val => val.id === 'CustomTax')\n\n if (customtax && customtax.length < 2) return false\n\n const tooltip = `\n <div class=\"vcustom-customTax-resume\">\n ${customtax\n .map(\n i =>\n `<p class=\"vcustom-customTax-resume__i\"><span class=\"n\">${\n i.name\n }</span><span class=\"v\">${\n orderForm.storePreferencesData.currencySymbol\n } ${(i.value / 100).toFixed(2)}</span></p>`\n )\n .join('')}\n </div>\n `\n\n const customTaxElem = $('tr.CustomTax.CustomTax--total')\n\n if (customTaxElem.length) {\n customTaxElem.find('.vcustom-customTax-tot').remove()\n customTaxElem\n .find('.info')\n .append(\n `<div class=\"vcustom-customTax-tot\"><span>?</span> ${tooltip}</div>`\n )\n }\n }\n\n update(orderForm) {\n const _this = this\n\n this.checkEmpty(orderForm.items)\n this.addAssemblies(orderForm)\n this.enchancementTotalPrice(orderForm)\n this.bundleItems(orderForm)\n this.buildMiniCart(orderForm)\n this.condensedTaxes(orderForm)\n this.setParentIndex(orderForm)\n this.indexedInItems(orderForm)\n\n // debounce to prevent append from default script\n const updateDebounce = debounce(function () {\n if (orderForm.marketingData) {\n _this.addLabels(orderForm)\n _this.showCustomMsgCoupon(orderForm)\n }\n }, 250)\n\n updateDebounce()\n }\n\n updateStep() {\n const prefixClass = 'v-custom-step-'\n const bClassStep = ['cart', 'email', 'profile', 'shipping', 'payment']\n\n $('body').removeClass(\n bClassStep\n .map(step => {\n return prefixClass + step\n })\n .join(' ')\n )\n if (window.location.hash) {\n const [, hashstep] = window.location.hash.split('/')\n\n const classStep = bClassStep.filter(st => {\n return ~hashstep.indexOf(st)\n })\n\n if (classStep.length) {\n $('body').addClass(prefixClass + classStep[0])\n }\n }\n }\n\n updateLang(orderForm) {\n const clientLocale = orderForm.clientPreferencesData.locale\n\n this.lang =\n Object.values(_locale).find(country => country.locale === clientLocale) ||\n _locale[orderForm.storePreferencesData.countryCode] ||\n findClosestLang(clientLocale, _locale) ||\n _locale.USA\n\n if (!this.lang) return false\n const _lang = this.lang\n\n if (_lang.editLabel) $('.link-box-edit').attr('title', _lang.editLabel)\n if (_lang.cartSubmitButton) {\n $('#cart-to-orderform').text(_lang.cartSubmitButton)\n }\n\n if (_lang.cartNoteLabel) $('p.note-label label').text(_lang.cartNoteLabel)\n\n if (_lang.identifiedUserMessage) {\n $('.identified-user-modal-body p.identified-user-message').html(\n _lang.identifiedUserMessage\n )\n }\n\n // paypal\n if (_lang.paypalPhone) {\n $('.payment-paypal-help-number').text(_lang.paypalPhone)\n }\n\n if (_lang.paypalImg) {\n $('.payment-paypal-title-short-logo').css(\n 'background-image',\n `url(${_lang.paypalImg})`\n )\n } else if (_lang.paypalImg === '') {\n $('.payment-paypal-title-short-logo').hide()\n }\n\n // shipping\n\n if (_lang.googleAddressLabel) {\n const geoElem = $('.vtex-omnishipping-1-x-geolocation')\n\n if (geoElem.length) {\n geoElem\n .find('.ship-addressQuery > label')\n .text(_lang.googleAddressLabel)\n }\n }\n\n // placeholders\n\n if (_lang.address1Placeholder) {\n $('.vtex-omnishipping-1-x-address input#ship-street').attr(\n 'placeholder',\n _lang.address1Placeholder\n )\n }\n\n if (_lang.address2Placeholder) {\n $('.vtex-omnishipping-1-x-address input#ship-complement').attr(\n 'placeholder',\n _lang.address2Placeholder\n )\n }\n\n if (_lang.numberPlaceholder) {\n $('.vtex-omnishipping-1-x-address input#ship-number').attr(\n 'placeholder',\n _lang.numberPlaceholder\n )\n }\n }\n\n paymentBuilder(orderForm) {\n const _this = this\n\n if (orderForm && $('.payment-group-item-cards').length === 0) {\n if (orderForm.paymentData) {\n const paymentGroups = [\n 'debitCardPaymentGroup',\n 'creditCardPaymentGroup',\n ]\n\n let paymentGroupCardsHtml = ``\n\n $.each(paymentGroups, function (p) {\n paymentGroupCardsHtml = `<span class=\"payment-group-item-cards\">`\n $.each(\n orderForm.paymentData.paymentSystems.filter(\n item => item.groupName === paymentGroups[p]\n ),\n function () {\n paymentGroupCardsHtml += `<span class=\"card-flag ${this.name}\">${this.name}</span>`\n }\n )\n paymentGroupCardsHtml += `</span>`\n if (_this.accordionPayments) {\n $(`#payment-group-${paymentGroups[p]}`).append(\n paymentGroupCardsHtml\n )\n }\n })\n\n if (!_this.accordionPayments) {\n $('#iframe-placeholder-creditCardPaymentGroup').prepend(\n paymentGroupCardsHtml\n )\n }\n }\n }\n\n if (\n !this.accordionPayments ||\n $('.payment-group-list-btn').find('.v-custom-payment-item-wrap').length >\n 0\n ) {\n return false\n }\n\n $('body').addClass('v-custom-paymentBuilder-accordion')\n\n $('.payment-group-item').each(function () {\n $(this).wrap(\n `<div class='v-custom-payment-item-wrap ${\n $(this).hasClass('active') ? 'active' : ''\n }'></div>`\n )\n })\n\n $('.payment-group-item').each(function () {\n $(`#payment-data .steps-view > div:eq(${0})`).appendTo(\n $(this).closest('.v-custom-payment-item-wrap')\n )\n })\n }\n\n customAddressFormLoader() {\n const _this = this\n\n if (!window.vtex.googleMapsApiKey) {\n console.warn(\n 'You might need to add your Google Maps API Key in your admin'\n )\n _this.customAddressForm = false\n\n return false\n }\n\n if (_this.customAddressForm) {\n _this.customAddressForm = new FnsCustomAddressForm({})\n _this.customAddressForm.events()\n }\n }\n\n goToShippingStep() {\n window.location.hash = '#/shipping'\n }\n\n appendMessageEmptyStreet(orderForm) {\n const _this = this\n\n if (\n !(\n (orderForm &&\n orderForm.shippingData &&\n orderForm.shippingData.address &&\n orderForm.shippingData.address.street != null) ||\n (undefined && orderForm.shippingData.address.street.trim())\n )\n ) {\n if (\n !$('.alert-noStreet').length &&\n $('.accordion-inner.shipping-container').length\n )\n $('.orderform-template-holder #shipping-data .accordion-inner').append(\n `<div class=\"alert-noStreet\"><span class=\"alert\">${\n _this.locale\n ? _this.locale.noStreetAddress ||\n 'Your shipping information is missing a required field, please include a street'\n : 'Your shipping information is missing a required field, please include a street'\n }</span></div>`\n )\n } else {\n $('.alert-noStreet').remove()\n }\n }\n\n URLHasIncludePayment(orderForm) {\n const _this = this\n\n let street = ''\n\n try {\n if (\n orderForm &&\n orderForm.shippingData &&\n orderForm.shippingData.address &&\n orderForm.shippingData.address.street\n ) {\n street = orderForm.shippingData.address.street\n }\n\n if (\n window.location.hash === '#/payment' &&\n orderForm &&\n orderForm.shippingData &&\n orderForm.shippingData.address &&\n orderForm.shippingData.address.addressType !== 'search' &&\n !street.trim() &&\n _this.customAddressForm\n ) {\n _this.goToShippingStep()\n _this.appendMessageEmptyStreet(orderForm)\n }\n } catch (error) {\n console.error('URLHasIncludePayment error:', error)\n }\n }\n\n customAddressFormInit(orderForm) {\n const _this = this\n const _orderForm = orderForm || window.vtexjs.checkout.orderForm\n\n if (_this.customAddressForm) {\n if (_orderForm.canEditData) {\n $('body').removeClass('returningUser')\n } else {\n $('body').addClass('returningUser')\n }\n\n try {\n _this.customAddressForm.init(_orderForm)\n } catch (e) {\n console.warn(`Error in \"customAddressFormInit\"`)\n }\n }\n }\n\n checkProfileFocus() {\n const _this = this\n\n if (_this.hideEmailStep) {\n if (\n ~window.location.hash.indexOf('#/email') &&\n $('#client-email').val() === ''\n ) {\n $('#client-email').focus()\n }\n }\n }\n\n rtlUI() {\n if (\n window.vtex.i18n.getLocale() === 'ar' ||\n window.vtex.i18n.getLocale() === 'ar-SA' ||\n window.vtex.i18n.getLocale() === 'ar-IQ'\n ) {\n $('body').addClass('RTL-checkout')\n }\n }\n\n bind() {\n const _this = this\n\n $('body').on('click', '#v-custom-edit-login-data', function (e) {\n e.preventDefault()\n\n $(this).addClass('active')\n\n const data = null\n const xhr = new XMLHttpRequest()\n\n xhr.addEventListener('readystatechange', function () {\n if (this.readyState === this.DONE) {\n window.location.reload()\n setTimeout(function () {\n $('#v-custom-edit-login-data').removeClass('active')\n }, 1000)\n }\n })\n\n xhr.open(\n 'GET',\n `/checkout/changeToAnonymousUser/${_this.orderForm.orderFormId}`\n )\n xhr.setRequestHeader('content-type', 'application/json')\n xhr.setRequestHeader('accept', 'application/json')\n\n xhr.send(data)\n })\n\n $('body').on('click', '.v-custom-payment-item-wrap', function () {\n $('.v-custom-payment-item-wrap').removeClass('active')\n $(this).addClass('active')\n })\n\n $('body').on(\n 'click',\n '.vtex-pickup-points-modal-3-x-pickupDetailsHeaderButton, #map-canvas img, .vtex-omnishipping-1-x-pickupPointChange, .pkpmodal-pickup-point, .vtex-pickup-points-modal-3-x-modalDetailsBackLnk',\n function () {\n setTimeout(() => {\n _this.changeShippingTimeInfoInit()\n }, 100)\n }\n )\n\n $('body').on('click', '.js-checkout-steps-item .text', function () {\n window.location = $(this).closest('.checkout-steps_item').attr('data-url')\n })\n\n window.addEventListener('resize', _this.handleBreakpointChange)\n\n _this.handleBreakpointChange()\n\n $('body').on(\n 'click',\n '.vtex-omnishipping-1-x-linkEdit.link-edit',\n function () {\n setTimeout(() => {\n _this.updateLang(_this.orderForm)\n }, 50)\n }\n )\n\n $('body').on('click', '#btn-client-pre-email', function () {\n setTimeout(function () {\n if (!$('input#client-pre-email').hasClass('error')) {\n $('input#client-email').focus()\n }\n }, 1000)\n })\n\n $('body').on('click', '#shipping-option-delivery', function () {\n _this.customAddressFormInit(_this.orderForm)\n })\n\n $('body').on('click', '.show-more-items-button', function () {\n _this.general()\n _this.setParentIndex(window.vtexjs.checkout.orderForm)\n window.vtexjs.checkout.getOrderForm()\n })\n }\n\n init() {\n const _this = this\n\n _this.orderForm =\n window?.vtexjs?.checkout?.orderForm\n ? window.vtexjs.checkout.orderForm\n : false\n _this.general()\n _this.updateStep()\n _this.builder()\n\n _this.changeShippingTimeInfoInit()\n if (_this.orderForm) {\n _this.updateLang(_this.orderForm)\n _this.update(_this.orderForm)\n _this.addStepsHeader()\n _this.paymentBuilder(_this.orderForm)\n }\n\n _this.addEditButtoninLogin()\n }\n\n start() {\n const _this = this\n\n try {\n $(function () {\n _this.bind()\n _this.customAddressFormLoader()\n _this.rtlUI()\n })\n\n $(document).ajaxComplete(function () {\n _this.init()\n })\n\n $(window).on('hashchange', function () {\n const cartItems = document.querySelector('.cart-items')\n\n _this.updateStep()\n _this.changeShippingTimeInfoInit()\n _this.checkProfileFocus()\n\n if (_this.orderForm) {\n _this.buildMiniCart(_this.orderForm)\n _this.indexedInItems(_this.orderForm)\n _this.updateLang(_this.orderForm)\n _this.paymentBuilder(_this.orderForm)\n _this.customAddressFormInit(_this.orderForm)\n _this.removeCILoader()\n _this.URLHasIncludePayment(_this.orderForm)\n\n _this.onDomMutation({\n targetNode: cartItems,\n callback: () => _this.removeCILoader(),\n })\n }\n })\n\n $(window).on('orderFormUpdated.vtex', function (evt, orderForm) {\n _this.update(orderForm)\n _this.customAddressFormInit(orderForm)\n })\n\n $(window).load(function () {\n $(window).one('componentValidated.vtex', () => _this.builder())\n _this.checkProfileFocus()\n _this.changeShippingTimeInfoInit()\n _this.indexedInItems(window.vtexjs.checkout.orderForm)\n _this.showDeliveryOptions()\n\n if (_this.customAddressForm && typeof store !== 'undefined') {\n window.store.dispatch({\n type: 'DISABLE_CALCULATE_BUTTON',\n isCalculateBttnEnabled: false,\n })\n }\n })\n\n // eslint-disable-next-line no-console\n console.log(`🎉 Yay! You are using the vtex.checkout.ui customization !!`)\n } catch (e) {\n _this.general()\n }\n }\n}\n\nmodule.exports = checkoutCustom\n\n```" } ]
code_checkout-ui-custom_465d814d
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_js/_locale-infos.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nmodule.exports._locale = {\n BRA: {\n couponInactive: 'Nenhum desconto aplicado. Confira as regras.',\n editLabel: 'Editar',\n deliveryDateText: 'Entrega até',\n PickupDateText: 'Pronto até',\n eachLabel: 'cada',\n tomorrowLabel: 'Amanhã',\n cartSubmitButton: 'Continuar pagamento',\n checkoutStepsLabelCart: 'Carrinho',\n checkoutStepsLabelIdentification: 'Identificação',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pagamento',\n checkoutStepsLabelConfirmation: 'Confirmação',\n city: 'Cidade',\n state: 'Estado',\n number: 'Número',\n postalCode: 'Código postal',\n address1Placeholder: 'Endereço',\n address2Placeholder: 'Complemento',\n requiredField: 'Este campo é obrigatório.',\n locale: 'pt-BR',\n },\n CAN: {\n couponInactive: 'No discounts available. Check the conditions.',\n editLabel: 'Edit',\n paypalImg: '',\n paypalPhone: '1 (888) 221-1161',\n cartSubmitButton: 'Proceed to Payment',\n deliveryDateText: 'Arrives by',\n PickupDateText: 'Ready by',\n eachLabel: 'each',\n tomorrowLabel: 'Tomorrow',\n cartNoteLabel: 'Gift Message or Comments',\n identifiedUserMessage: `Thanks for coming back!\\nTo expedite your transaction, we have securely populated your information for you.`,\n address1Placeholder: 'Street address',\n address2Placeholder: 'Apartment, suite, building, floor, etc (optional)',\n checkoutStepsLabelCart: 'Cart',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Shipping',\n checkoutStepsLabelPayment: 'Payment',\n checkoutStepsLabelConfirmation: 'Confirmation',\n googleAddressLabel: 'Street Address',\n requiredField: 'This field is required.',\n city: 'City',\n state: 'State',\n locale: 'en-CA',\n },\n USA: {\n country: 'Country',\n postalCode: 'Postal Code',\n couponInactive: 'No discounts available. Check the conditions.',\n editLabel: 'Edit',\n paypalImg: '',\n paypalPhone: '1 (888) 221-1161',\n cartSubmitButton: 'Proceed to Payment',\n deliveryDateText: 'Arrives by',\n PickupDateText: 'Ready by',\n eachLabel: 'each',\n tomorrowLabel: 'Tomorrow',\n cartNoteLabel: 'Gift Message or Comments',\n identifiedUserMessage: `Thanks for coming back!\\nTo expedite your transaction, we have securely populated your information for you.`,\n address1Placeholder: 'Street address or P.O. Box',\n address2Placeholder: 'Apartment, suite, building, floor, etc (optional)',\n checkoutStepsLabelCart: 'Cart',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Shipping',\n checkoutStepsLabelPayment: 'Payment',\n checkoutStepsLabelConfirmation: 'Confirmation',\n googleAddressLabel: 'Street Address',\n requiredField: 'This field is required.',\n city: 'City',\n state: 'State',\n locale: 'en-US',\n noStreetAddress:\n 'Your shipping information is missing a required field, please include a street or P.O. Box',\n },\n GBR: {\n couponInactive: 'No discounts available. Check the conditions.',\n editLabel: 'Edit',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceed to Payment',\n deliveryDateText: 'Arrives by',\n PickupDateText: 'Ready by',\n eachLabel: 'each',\n tomorrowLabel: 'Tomorrow',\n cartNoteLabel: 'Gift Message or Comments',\n identifiedUserMessage: `Thanks for coming back!\\nTo expedite your transaction, we have securely populated your information for you.`,\n address1Placeholder: 'Street address',\n address2Placeholder: 'Apartment, suite, building, floor, etc (optional)',\n checkoutStepsLabelCart: 'Cart',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Shipping',\n checkoutStepsLabelPayment: 'Payment',\n checkoutStepsLabelConfirmation: 'Confirmation',\n requiredField: 'This field is required.',\n city: 'Town',\n state: 'County',\n number: 'Number',\n postalCode: 'Postal Code',\n locale: 'en-GB',\n },\n IRL: {\n couponInactive: 'No discounts available. Check the conditions.',\n editLabel: 'Edit',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceed to Payment',\n deliveryDateText: 'Arrives by',\n PickupDateText: 'Ready by',\n eachLabel: 'each',\n tomorrowLabel: 'Tomorrow',\n cartNoteLabel: 'Gift Message or Comments',\n identifiedUserMessage: `Thanks for coming back!\\nTo expedite your transaction, we have securely populated your information for you.`,\n address1Placeholder: 'Street address',\n address2Placeholder: 'Apartment, suite, building, floor, etc (optional)',\n checkoutStepsLabelCart: 'Cart',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Shipping',\n checkoutStepsLabelPayment: 'Payment',\n checkoutStepsLabelConfirmation: 'Confirmation',\n requiredField: 'This field is required.',\n city: 'Town',\n state: 'County',\n number: 'Number',\n postalCode: 'Postal Code',\n locale: 'en-IE',\n },\n POR: {\n couponInactive: 'Nenhum desconto aplicado. Confira as regras.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n deliveryDateText: 'Entrega até',\n PickupDateText: 'Pronto até',\n eachLabel: 'cada',\n tomorrowLabel: 'Amanhã',\n checkoutStepsLabelCart: 'Carrinho',\n checkoutStepsLabelIdentification: 'Identificação',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pagamento',\n checkoutStepsLabelConfirmation: 'Confirmação',\n requiredField: 'Este campo é obrigatório',\n locale: 'pt-BR',\n },\n ESP: {\n couponInactive: 'No hay descuentos disponibles. Consulta las condiciones.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceder al pago',\n deliveryDateText: 'Llega por',\n PickupDateText: 'Disponible',\n eachLabel: 'cada',\n tomorrowLabel: 'Mañana',\n cartNoteLabel: 'Mensaje de regalo o comentarios',\n address1Placeholder: 'Dirección',\n address2Placeholder: 'Dirección Complementaria',\n checkoutStepsLabelCart: 'Carrito',\n checkoutStepsLabelIdentification: 'Identificación',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pago',\n checkoutStepsLabelConfirmation: 'Confirmación',\n city: 'Ciudad',\n postalCode: 'Código Postal',\n goToShipping: 'Ir para la Entrega',\n state: 'Provincia',\n requiredField: 'Este campo es obligatorio.',\n number: 'Número',\n locale: 'es',\n },\n ARG: {\n couponInactive: 'No hay descuentos disponibles. Consulta las condiciones.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceder al pago',\n deliveryDateText: 'Llega por',\n PickupDateText: 'Disponible',\n eachLabel: 'cada',\n tomorrowLabel: 'Mañana',\n cartNoteLabel: 'Mensaje de regalo o comentarios',\n address1Placeholder: 'Dirección',\n address2Placeholder: 'Dirección Complementaria',\n checkoutStepsLabelCart: 'Carrito',\n checkoutStepsLabelIdentification: 'Identificación',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pago',\n checkoutStepsLabelConfirmation: 'Confirmación',\n requiredField: 'Este campo es obligatorio.',\n city: 'Ciudad',\n state: 'Província',\n locale: 'ar',\n },\n COL: {\n couponInactive: 'No hay descuentos disponibles. Consulta las condiciones.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceder al pago',\n deliveryDateText: 'Llega por',\n PickupDateText: 'Disponible',\n eachLabel: 'cada',\n tomorrowLabel: 'Mañana',\n cartNoteLabel: 'Mensaje de regalo o comentarios',\n address1Placeholder: 'Dirección',\n address2Placeholder: 'Dirección Complementaria',\n checkoutStepsLabelCart: 'Carrito',\n checkoutStepsLabelIdentification: 'Identificación',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pago',\n checkoutStepsLabelConfirmation: 'Confirmación',\n requiredField: 'Este campo es obligatorio.',\n locale: 'es-CO',\n },\n PAN: {\n couponInactive: 'No hay descuentos disponibles. Consulta las condiciones.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceder al pago',\n deliveryDateText: 'Llega por',\n PickupDateText: 'Disponible',\n eachLabel: 'cada',\n tomorrowLabel: 'Mañana',\n cartNoteLabel: 'Mensaje de regalo o comentarios',\n address1Placeholder: 'Dirección',\n address2Placeholder: 'Dirección Complementaria',\n checkoutStepsLabelCart: 'Carrito',\n checkoutStepsLabelIdentification: 'Identificación',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pago',\n checkoutStepsLabelConfirmation: 'Confirmación',\n requiredField: 'Este campo es obligatorio.',\n city: 'Ciudad',\n state: 'Estado',\n locale: 'es-PA',\n },\n MEX: {\n couponInactive: 'No hay descuentos disponibles. Consulta las condiciones.',\n editLabel: 'Editar',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceder al pago',\n deliveryDateText: 'Llega por',\n PickupDateText: 'Disponible',\n eachLabel: 'cada',\n tomorrowLabel: 'Mañana',\n cartNoteLabel: 'Mensaje de regalo o comentarios',\n address1Placeholder: 'Dirección',\n address2Placeholder: 'Dirección Complementaria',\n checkoutStepsLabelCart: 'Carrito',\n checkoutStepsLabelIdentification: 'Identificación',\n checkoutStepsLabelShipping: 'Entrega',\n checkoutStepsLabelPayment: 'Pago',\n checkoutStepsLabelConfirmation: 'Confirmación',\n requiredField: 'Este campo es obligatorio.',\n locale: 'es-MX',\n },\n ITA: {\n couponInactive: 'Nessuno sconto disponibile. Controlla le condizioni.',\n editLabel: 'Modifica',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Procedi al pagamento',\n deliveryDateText: 'In consegna entro',\n PickupDateText: 'Pronto entro',\n eachLabel: 'ciascuno',\n tomorrowLabel: 'Domani',\n country: 'Paese',\n cartNoteLabel: \"Messaggio d'auguri o note\",\n address1Placeholder: 'Indirizzo',\n address2Placeholder: 'Complementi',\n checkoutStepsLabelCart: 'Carrello',\n checkoutStepsLabelIdentification: 'Identificazione',\n checkoutStepsLabelShipping: 'Spedizione',\n checkoutStepsLabelPayment: 'Pagamento',\n checkoutStepsLabelConfirmation: 'Conferma',\n city: 'Città',\n state: 'Provincia',\n number: 'Numero',\n postalCode: 'Codice Postale',\n requiredField: 'Questo campo è obbligatorio.',\n numberPlaceholder: ' ',\n locale: 'it',\n goToShipping: 'Vai alla spedizione',\n },\n FRA: {\n couponInactive: 'Aucune réduction disponible. Vérifiez les conditions.',\n editLabel: 'Modifier',\n paypalImg: '',\n paypalPhone: '+33 0186995653',\n cartSubmitButton: 'Procéder au paiement',\n deliveryDateText: 'Arrive le',\n PickupDateText: 'Prêt le',\n eachLabel: 'chaque',\n tomorrowLabel: 'Demain',\n address1Placeholder: 'Adresse ou Boîte postale',\n address2Placeholder:\n 'Appartement, suite, bâtiment, étage, etc (facultatif)',\n checkoutStepsLabelCart: 'Panier',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Expédition',\n checkoutStepsLabelPayment: 'Paiement',\n checkoutStepsLabelConfirmation: 'Confirmation',\n requiredField: 'Ce champ est obligatoire.',\n city: 'Ville',\n state: 'État',\n number: 'Numéro',\n postalCode: 'Code Postal',\n locale: 'fr',\n },\n FIN: {\n couponInactive: 'Alennuksia ei saatavilla. Tarkasta ehdot.',\n editLabel: 'Muokkaa',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Jatka maksuun',\n deliveryDateText: 'Saapumisarvio',\n PickupDateText: 'Valmiusarvio',\n eachLabel: 'kappale',\n tomorrowLabel: 'Huomenna',\n checkoutStepsLabelCart: 'Ostoskori',\n checkoutStepsLabelIdentification: 'Tunniste',\n checkoutStepsLabelShipping: 'Toimitus',\n checkoutStepsLabelPayment: 'Maksu',\n checkoutStepsLabelConfirmation: 'Vahvistus',\n locale: 'fi',\n },\n SWE: {\n couponInactive: 'Inga rabatter tillgängliga, kontrollera villkoren.',\n editLabel: 'Redigera',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Fortsätt till betalning',\n deliveryDateText: 'Ankommer den',\n PickupDateText: 'Redo den',\n eachLabel: 'var',\n tomorrowLabel: 'Imorgon',\n checkoutStepsLabelCart: 'Kundvagn',\n checkoutStepsLabelIdentification: 'Identifikation',\n checkoutStepsLabelShipping: 'Leverans',\n checkoutStepsLabelPayment: 'Betalning',\n checkoutStepsLabelConfirmation: 'Bekräftelse',\n locale: 'sv',\n },\n AUT: {\n couponInactive: 'Kein Rabatt verfügbar. Überprüfen Sie die Bedingungen.',\n editLabel: 'Anpassen',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Weiter zur Zahlung',\n deliveryDateText: 'Lieferung bis',\n PickupDateText: 'Abholbereit bis',\n eachLabel: 'jedes/jeder',\n tomorrowLabel: 'Morgen',\n address1Placeholder: 'Straße',\n address2Placeholder: 'Straße (weiter)',\n postalCode: 'Postleitzahl',\n country: 'Land',\n city: 'Stadt',\n state: 'Bundesland',\n number: 'Hausnummer',\n checkoutStepsLabelCart: 'Warenkorb',\n checkoutStepsLabelIdentification: 'Anmeldung',\n checkoutStepsLabelShipping: 'Versand',\n checkoutStepsLabelPayment: 'Zahlung',\n checkoutStepsLabelConfirmation: 'Bestätigung',\n googleAddressLabel: 'Adresse',\n locale: 'de-DE',\n cartNoteLabel: 'Bestellhinweis',\n identifiedUserMessage:\n 'Willkommen zurück!\\nUm Ihren Einkauf zu vereinfachen haben wir Ihre sicher gespeicherten Informationen eingetragen.',\n requiredField: 'Pflichftfeld.',\n },\n DEU: {\n couponInactive: 'Kein Rabatt verfügbar. Überprüfen Sie die Bedingungen.',\n editLabel: 'Anpassen',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Weiter zur Zahlung',\n deliveryDateText: 'Lieferung bis',\n PickupDateText: 'Abholbereit bis',\n eachLabel: 'jedes/jeder',\n tomorrowLabel: 'Morgen',\n address1Placeholder: 'Straße',\n address2Placeholder: 'Straße (weiter)',\n postalCode: 'Postleitzahl',\n country: 'Land',\n city: 'Stadt',\n state: 'Bundesland',\n number: 'Hausnummer',\n checkoutStepsLabelCart: 'Warenkorb',\n checkoutStepsLabelIdentification: 'Anmeldung',\n checkoutStepsLabelShipping: 'Versand',\n checkoutStepsLabelPayment: 'Zahlung',\n checkoutStepsLabelConfirmation: 'Bestätigung',\n googleAddressLabel: 'Adresse',\n locale: 'de-DE',\n cartNoteLabel: 'Bestellhinweis',\n identifiedUserMessage:\n 'Willkommen zurück!\\nUm Ihren Einkauf zu vereinfachen haben wir Ihre sicher gespeicherten Informationen eingetragen.',\n },\n ARA: {\n couponInactive: 'لا توجد خصومات متاحة. تحقق من الشروط.',\n editLabel: 'تعديل',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'انتقل إلى الدفع',\n deliveryDateText: 'تصل قبل',\n PickupDateText: 'جاهزة قبل',\n eachLabel: 'كل',\n tomorrowLabel: 'غدًا',\n cartNoteLabel: 'رسالة هدية أو تعليقات',\n identifiedUserMessage: `شكرًا على عودتك!\\nTلتسريع معاملتك، قمنا بتعبئة معلوماتك بشكل آمن.`,\n address1Placeholder: 'عنوان الشارع',\n address2Placeholder: 'شقة، جناح، مبنى، طابق، إلخ (اختياري)',\n checkoutStepsLabelCart: 'عربة التسوق',\n checkoutStepsLabelIdentification: 'الهوية',\n checkoutStepsLabelShipping: 'التسوق',\n checkoutStepsLabelPayment: 'الدفع',\n checkoutStepsLabelConfirmation: 'تأكيد',\n requiredField: 'هذا الحقل مطلوب.',\n locale: 'ar-TN',\n },\n RUS: {\n couponInactive: 'Скидки недоступны. Проверьте условия.',\n editLabel: 'Редактировать',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Перейте к оплате',\n deliveryDateText: 'Дата прибытия',\n PickupDateText: 'Дата готовности',\n eachLabel: 'каждый',\n tomorrowLabel: 'Завтра',\n cartNoteLabel: 'Сообщение о подарке или комментарии',\n identifiedUserMessage: `Спасибо, что вернулись!\\nДля ускорения вашей транзакции мы заполнили вашу информацию. Не волнуйтесь, ваши данные надёжно защищены.`,\n address1Placeholder: 'Адрес проживания/улица или адрес почтового ящика',\n address2Placeholder: 'Квартира, номер дома, этаж (дополнительно)',\n checkoutStepsLabelCart: 'Корзина',\n checkoutStepsLabelIdentification: 'Идентификация',\n checkoutStepsLabelShipping: 'Доставка',\n checkoutStepsLabelPayment: 'Оплата',\n checkoutStepsLabelConfirmation: 'Подтверждение',\n googleAddressLabel: 'Улица и номер дома',\n requiredField: 'Это обязательное поле.',\n city: 'Город',\n state: 'Область',\n locale: 'ru',\n },\n POL: {\n couponInactive: 'Brak dostępnych upustów. Sprawdź warunki.',\n editLabel: 'Edytuj',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Przejdź do płatności',\n deliveryDateText: 'Dotrze do',\n PickupDateText: 'Gotowe do',\n eachLabel: 'sztuka',\n tomorrowLabel: 'Jutro',\n cartNoteLabel: 'Wiadomość o podarunku lub komentarze',\n identifiedUserMessage:\n 'Dziękujemy, że do nas wróciłeś!\\nAby usprawnić Twoją transakcję, w bezpieczny sposób wypełniliśmy za Ciebie Twoje dane.',\n address1Placeholder: 'Adres domowy lub skrzynka pocztowa',\n address2Placeholder:\n 'Mieszkanie, apartament, budynek, piętro itd. (opcjonalnie)',\n checkoutStepsLabelCart: 'Koszyk',\n checkoutStepsLabelIdentification: 'Identyfikacja',\n checkoutStepsLabelShipping: 'Wysyłka',\n checkoutStepsLabelPayment: 'Płatność',\n checkoutStepsLabelConfirmation: 'Potwierdzenie',\n googleAddressLabel: 'Adres domowy',\n requiredField: 'To pole jest wymagane.',\n city: 'Miejscowość',\n state: 'Stan (województwo)',\n locale: 'pl',\n },\n ZAF: {\n couponInactive: 'No discounts available. Check the conditions.',\n editLabel: 'Edit',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Proceed to Payment',\n deliveryDateText: 'Arrives by',\n PickupDateText: 'Ready by',\n eachLabel: 'each',\n tomorrowLabel: 'Tomorrow',\n cartNoteLabel: 'Gift Message or Comments',\n identifiedUserMessage: `Thanks for coming back!\\nTo expedite your transaction, we have securely populated your information for you.`,\n address1Placeholder: 'Street address or P.O. Box',\n address2Placeholder: 'Apartment number, unit, floor, etc.',\n checkoutStepsLabelCart: 'Cart',\n checkoutStepsLabelIdentification: 'Identification',\n checkoutStepsLabelShipping: 'Shipping',\n checkoutStepsLabelPayment: 'Payment',\n checkoutStepsLabelConfirmation: 'Confirmation',\n googleAddressLabel: 'Street Address',\n requiredField: 'This field is required.',\n city: 'City',\n state: 'State',\n locale: 'en-ZA',\n },\n GRC: {\n couponInactive: 'Δεν υπάρχουν διαθέσιμες εκπτώσεις. Ελέγξτε τους όρους.',\n editLabel: 'Επεξεργασία',\n paypallmg: '',\n paypalPhone: '',\n cartSubmitButton: 'Μετάβαση στην Πληρωμή',\n deliveryDateText: 'Άφιξη έως',\n PickupDateText: 'Έτοιμο έως',\n eachLabel: 'καθεμία',\n tomorrowLabel: 'Αύριο',\n cartNoteLabel: 'Μήνυμα δώρου ή Σχόλια',\n identifiedUserMessage:\n 'Ευχαριστούμε που επανήλθατε!\\n Για να επισπεύσουμε τη συναλλαγή σας, έχουμε συμπληρώσει με ασφάλεια τις πληροφορίες για εσάς.',\n address1Placeholder: 'Διεύθυνση οδού ή Ταχυδρομική Θυρίδα',\n address2Placeholder: 'Διαμέρισμα, σουίτα, κτήριο, όροφος κλπ (προαιρετικό)',\n checkoutStepsLabelCart: 'Καρότσι',\n checkoutStepsLabelIdentification: 'Αναγνώριση',\n checkoutStepsLabelShipping: 'Αποστολή',\n checkoutStepsLabelPayment: 'Πληρωμή',\n checkoutStepsLabelConfirmation: 'Επιβεβαίωση',\n googleAddressLabel: 'Διεύθυνση οδού',\n requiredField: 'Αυτό το πεδίο είναι υποχρεωτικό.',\n city: 'Πόλη',\n state: 'Χώρα',\n locale: 'gr',\n },\n CHE: {\n couponInactive: 'Keine Rabatte verfügbar. Prüfen Sie die Bedingungen.',\n editLabel: 'Bearbeiten',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Zur Zahlung übergehen',\n deliveryDateText: 'Kommt an bis',\n PickupDateText: 'Bereit bis',\n eachLabel: 'jeder',\n tomorrowLabel: 'Morgen',\n cartNoteLabel: 'Geschenknachricht oder Kommentare',\n identifiedUserMessage:\n 'Danke, dass Sie zurückgekommen sind!\\nUm Ihre Transaktion zu beschleunigen, haben wir Ihre Daten für Sie sicher ausgefüllt.',\n address1Placeholder: 'Straße oder Anschrift Box',\n address2Placeholder:\n 'Wohnung, Appartement, Gebäude, Stockwerk, usw. (optional)',\n checkoutStepsLabelCart: 'Warenkorb',\n checkoutStepsLabelIdentification: 'Kennzeichnung',\n checkoutStepsLabelShipping: 'Versand',\n checkoutStepsLabelPayment: 'Zahlung',\n checkoutStepsLabelConfirmation: 'Bestätigung',\n googleAddressLabel: 'Straße und Hausnummer',\n requiredField: 'Dieses Feld ist erforderlich.',\n city: 'Stadt',\n state: 'Staat',\n locale: 'fr-CH',\n },\n HRV: {\n couponInactive: 'Popusti niso na voljo. Preverite pogoje.',\n editLabel: 'Uredi',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Nadaljujte na plačilom',\n deliveryDateText: 'Prispe do',\n PickupDateText: 'Pripravljeno do',\n eachLabel: 'posamezen',\n tomorrowLabel: 'Jutri',\n cartNoteLabel: 'Darilno sporočilo ali komentarji',\n identifiedUserMessage:\n 'Hvala, ker ste se vrnili! Da bi pospešili vašo transakcijo, smo za vas varno izpolnili vaše podatke.',\n address1Placeholder: 'Ulični naslov ali poštna št',\n address2Placeholder:\n 'Apartma, apartma, stavba, nadstropje itd. (neobvezno)',\n checkoutStepsLabelCart: 'Košarica',\n checkoutStepsLabelIdentification: 'Identifikacija',\n checkoutStepsLabelShipping: 'Odpošiljanje',\n checkoutStepsLabelPayment: 'Plačilo',\n checkoutStepsLabelConfirmation: 'Potrditev',\n googleAddressLabel: 'Naslov ulice',\n requiredField: 'To polje je obvezno.',\n city: 'Mesto',\n state: 'Država',\n locale: 'hr',\n },\n ROU: {\n couponInactive:\n 'Nu sunt disponibile reduceri. Este necesară verificarea condițiilor.',\n editLabel: 'Editează',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Mergi la plată',\n deliveryDateText: 'Sosește până la',\n PickupDateText: 'Este pregătit până la',\n eachLabel: 'fiecare',\n tomorrowLabel: 'Mâine',\n cartNoteLabel: 'Mesaj cadou sau observații',\n identifiedUserMessage:\n 'Îți mulțumim că ai revenit!\\nPentru a-ți accelera tranzacția, am populat în condiții de siguranță informațiile tale',\n address1Placeholder: 'Strada sau cutia poștală',\n address2Placeholder: 'Apartament, clădire, etaj etc. (opțional)',\n checkoutStepsLabelCart: 'Coș de cumpărături',\n checkoutStepsLabelIdentification: 'Identificare',\n checkoutStepsLabelShipping: 'Expediere',\n checkoutStepsLabelPayment: 'Plată',\n checkoutStepsLabelConfirmation: 'Confirmare',\n googleAddressLabel: 'Adresa',\n requiredField: 'Acest câmp este obligatoriu.',\n city: 'Oraș',\n state: 'Stat',\n locale: 'ro-MD',\n },\n NLD: {\n couponInactive: 'Geen kortingen beschikbaar. Controleer de voorwaarden.',\n editLabel: 'Bewerken',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Ga naar betaling',\n deliveryDateText: 'Word geleverd op',\n PickupDateText: 'Klaar op',\n eachLabel: 'elk',\n tomorrowLabel: 'Morgen',\n cartNoteLabel: 'Geschenkboodschap of commentaar',\n identifiedUserMessage:\n 'Bedankt dat u terugkwam!\\nOm uw transactie te bespoedigen, hebben wij uw gegevens veilig voor u ingevuld.',\n address1Placeholder: 'Adres of postbus ',\n address2Placeholder:\n 'Appartement, suite, gebouw, verdieping, enz (facultatief)',\n checkoutStepsLabelCart: 'Winkelwagen',\n checkoutStepsLabelIdentification: 'Identificatie',\n checkoutStepsLabelShipping: 'Verzending',\n checkoutStepsLabelPayment: 'Betaling',\n checkoutStepsLabelConfirmation: 'Bevestiging',\n googleAddressLabel: 'Adres',\n requiredField: 'Dit veld is verplicht.',\n city: 'Stad',\n state: 'Staat',\n locale: 'nl',\n },\n BEL: {\n couponInactive: 'Geen kortingen beschikbaar. Controleer de voorwaarden.',\n editLabel: 'Bewerken',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Ga naar betaling',\n deliveryDateText: 'Word geleverd op',\n PickupDateText: 'Klaar op',\n eachLabel: 'elk',\n tomorrowLabel: 'Morgen',\n cartNoteLabel: 'Geschenkboodschap of commentaar',\n identifiedUserMessage:\n 'Bedankt dat u terugkwam!\\nOm uw transactie te bespoedigen, hebben wij uw gegevens veilig voor u ingevuld.',\n address1Placeholder: 'Adres of postbus ',\n address2Placeholder:\n 'Appartement, suite, gebouw, verdieping, enz (facultatief)',\n checkoutStepsLabelCart: 'Winkelwagen',\n checkoutStepsLabelIdentification: 'Identificatie',\n checkoutStepsLabelShipping: 'Verzending',\n checkoutStepsLabelPayment: 'Betaling',\n checkoutStepsLabelConfirmation: 'Bevestiging',\n googleAddressLabel: 'Adres',\n requiredField: 'Dit veld is verplicht.',\n city: 'Stad',\n state: 'Staat',\n locale: 'nl-BE',\n },\n CZE: {\n couponInactive: 'Nie sú dostupné žiadne zľavy. Pozrite si podmienky.',\n editLabel: 'Upraviť',\n paypalImg: '',\n paypalPhone: '',\n cartSubmitButton: 'Pokračovať k platbe',\n deliveryDateText: 'Bude doručené do',\n PickupDateText: 'Pripravené na vyzdvihnutie',\n eachLabel: 'každé',\n tomorrowLabel: 'zajtra',\n cartNoteLabel: 'Odkaz k darčeku alebo komentáre',\n identifiedUserMessage:\n 'Ďakujeme, že ste tu znova!\\nNa urýchlenie vašej transakcie sme za vás bezpečne vyplnili vaše informácie.',\n address1Placeholder: 'Ulica alebo P.O. box',\n address2Placeholder: 'Byt, apartmán, budova, poschodie atď. (voliteľné)',\n checkoutStepsLabelCart: 'Košík',\n checkoutStepsLabelIdentification: 'Identifikácia',\n checkoutStepsLabelShipping: 'Dodanie',\n checkoutStepsLabelPayment: 'Platba',\n checkoutStepsLabelConfirmation: 'Potvrdenie',\n googleAddressLabel: 'Ulica',\n requiredField: 'Toto pole je povinné.',\n city: 'Mesto',\n state: 'Štát',\n locale: 'cs',\n },\n}\n\n```" } ]
code_checkout-ui-custom_01dfb4a3
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_js/_debug.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n/* eslint-disable no-console */\nclass debug {\n constructor({\n logo = '<img src=\"https://via.placeholder.com/160x60\">',\n } = {}) {\n this.classOn = 'debug-on'\n\n this.logo = logo\n this.headerHTML = `<header class=\"main-header debug-elem\"> <div class=\"container\"> <div class=\"header-link\"> <a href=\"/\" title=\"add more products\" class=\"buy-more-link link\">Continue shopping</a> <a href=\"/checkout/#/cart\" title=\"back to cart\" class=\"back-cart-link link\">Back to Cart</a> </div><a href=\"/\" title=\"Go to homepage\" class=\"logo\">${this.logo}</a> </div></header>`\n this.footerHTML = `<footer class=\"main-footer debug-elem\"> <div class=\"container\"> <svg class=\"vtex-logo\" height=\"40\" viewBox=\"0 0 115 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\" fill=\"#F71963\" style=\" /* fill: #000; */\"></path><path d=\"M77.5031 25.3597H74.4988V35.5249C74.4986 35.6176 74.4613 35.7063 74.3949 35.7718C74.3286 35.8373 74.2387 35.8742 74.1448 35.8744H71.8279C71.7341 35.8742 71.6442 35.8373 71.5779 35.7718C71.5115 35.7063 71.4742 35.6176 71.474 35.5249V25.3597H68.4521C68.4066 25.3616 68.3612 25.3544 68.3186 25.3385C68.2759 25.3227 68.2369 25.2986 68.2039 25.2677C68.1709 25.2367 68.1445 25.1995 68.1264 25.1583C68.1082 25.117 68.0986 25.0726 68.0981 25.0277V23.2297C68.0986 23.1847 68.1082 23.1403 68.1264 23.0991C68.1445 23.0578 68.1709 23.0206 68.2039 22.9897C68.2369 22.9587 68.2759 22.9346 68.3186 22.9188C68.3612 22.903 68.4066 22.8958 68.4521 22.8976H77.5023C77.5961 22.8933 77.6879 22.9257 77.7575 22.988C77.8271 23.0502 77.869 23.1371 77.8739 23.2297V25.0284C77.8688 25.1207 77.827 25.2073 77.7575 25.2693C77.6881 25.3314 77.5966 25.3639 77.5031 25.3597Z\" fill=\"#F71963\"></path><path d=\"M87.1474 35.8013C86.5284 35.8883 85.487 36.0283 83.577 36.0283C81.2953 36.0283 79.2795 35.4519 79.2795 32.2742V26.4742C79.2795 23.2965 81.3137 22.7375 83.5946 22.7375C85.5039 22.7375 86.5284 22.8775 87.1474 22.9645C87.3949 22.9993 87.5014 23.087 87.5014 23.3139V24.9401C87.5012 25.0327 87.4638 25.1215 87.3975 25.187C87.3312 25.2525 87.2412 25.2894 87.1474 25.2896H83.4184C82.5871 25.2896 82.2867 25.5687 82.2867 26.4771V28.0663H87.0064C87.1002 28.0665 87.1902 28.1034 87.2565 28.1689C87.3228 28.2344 87.3602 28.3231 87.3604 28.4158V30.0746C87.3602 30.1672 87.3228 30.2559 87.2565 30.3214C87.1902 30.3869 87.1002 30.4238 87.0064 30.424H82.2867V32.2749C82.2867 33.1826 82.5871 33.4625 83.4184 33.4625H87.1474C87.2412 33.4627 87.3312 33.4995 87.3975 33.565C87.4638 33.6305 87.5012 33.7193 87.5014 33.8119V35.4359C87.5014 35.6614 87.3949 35.7665 87.1474 35.8013Z\" fill=\"#F71963\"></path><path d=\"M100.491 35.8709H97.6795C97.4497 35.8709 97.3432 35.7984 97.2198 35.6091L94.7818 31.7877L92.5728 35.525C92.4487 35.7346 92.3253 35.8745 92.1322 35.8745H89.515C89.338 35.8745 89.2499 35.7694 89.2499 35.6476C89.2533 35.6048 89.2653 35.5632 89.2851 35.525L93.1162 29.2175L89.2455 23.2283C89.2258 23.1963 89.2138 23.1604 89.2102 23.1232C89.2165 23.059 89.2476 22.9997 89.2969 22.9575C89.3462 22.9153 89.4101 22.8933 89.4753 22.8963H92.3224C92.517 22.8963 92.6587 23.071 92.763 23.2283L95.0256 26.7554L97.2154 23.2283C97.3035 23.071 97.4629 22.8963 97.656 22.8963H100.273C100.338 22.8933 100.402 22.9153 100.452 22.9575C100.501 22.9997 100.532 23.059 100.538 23.1232C100.535 23.1604 100.523 23.1963 100.503 23.2283L96.6514 29.2545L100.668 35.525C100.7 35.5783 100.718 35.6382 100.721 35.6998C100.722 35.8013 100.633 35.8709 100.491 35.8709Z\" fill=\"#F71963\"></path><path d=\"M63.8595 22.9324C63.7964 22.9325 63.7352 22.9543 63.6865 22.9939C63.6377 23.0336 63.6044 23.0887 63.5922 23.1499L61.0249 32.5306C60.9896 32.7228 60.9368 32.7924 60.7774 32.7924C60.6181 32.7924 60.5652 32.7199 60.5299 32.5306L57.9597 23.1477C57.9475 23.0865 57.9142 23.0314 57.8654 22.9918C57.8167 22.9521 57.7555 22.9303 57.6924 22.9302H55.1655C55.1244 22.9302 55.0838 22.9394 55.0468 22.9571C55.0098 22.9747 54.9773 23.0004 54.9518 23.0322C54.9262 23.064 54.9083 23.101 54.8993 23.1406C54.8902 23.1802 54.8904 23.2213 54.8996 23.2608C54.8996 23.2608 58.0353 34.0191 58.0698 34.1249C58.4884 35.4067 59.504 36.0193 60.7965 36.0193C62.0273 36.0193 63.1017 35.3777 63.5217 34.1285C63.5716 33.9835 66.6376 23.2601 66.6376 23.2601C66.6467 23.2206 66.6468 23.1796 66.6377 23.1401C66.6286 23.1006 66.6106 23.0636 66.5851 23.032C66.5595 23.0003 66.5271 22.9747 66.4902 22.957C66.4532 22.9394 66.4128 22.9302 66.3717 22.9302L63.8595 22.9324Z\" fill=\"#F71963\"></path><path d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\" fill=\"#F71963\"></path></svg> </div></footer>`\n }\n\n headernFooter() {\n $('body').prepend(this.headerHTML)\n $('body').append(this.footerHTML)\n }\n\n start() {\n $('body').addClass(this.classOn)\n this.headernFooter()\n console.log(\n \"%c >>>>> YOU ARE CURRENTLY DEBUGING THE HEADER, IT'S A BETA! ISSUES CAN HAPPEN... Use `vcustom.debug.stop()` to stop! \",\n 'background: #111; color: #bada55'\n )\n }\n\n stop() {\n $('body').removeClass(this.classOn)\n $('.debug-elem').remove()\n }\n}\n\nmodule.exports = debug\n\n```" } ]
code_checkout-ui-custom_cb7c5e30
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_js/_utils.js from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nmodule.exports.debounce = (func, wait) => {\n let timeout\n\n return function executedFunction(...args) {\n const later = () => {\n clearTimeout(timeout)\n func(...args)\n }\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n }\n}\n\nmodule.exports.formatCurrency = (_locale, _currency, _value) => {\n const price = _value / 100\n\n new Intl.NumberFormat(_locale, {\n style: 'currency',\n currency: _currency,\n }).format(price)\n\n return price\n}\n\nmodule.exports.findClosestLang = (clientLocale, locales) => {\n const [clientLang] = clientLocale.split('-')\n\n return Object.values(locales).find(country => {\n const [countryLang] = country.locale.split('-')\n\n return clientLang === countryLang\n })\n}\n\nmodule.exports.getShipStateValue = state => {\n const stateValue =\n $(\n `.vcustom--vtex-omnishipping-1-x-address #ship-state option[value^='${state}']`\n ).val() ||\n $(\n `.vcustom--vtex-omnishipping-1-x-address #ship-state option[value$='${state}']`\n ).val()\n\n return stateValue\n}\n\nmodule.exports.parseDateBd = input => {\n const parts = input.match(/(\\d+)/g)\n\n return new Date(parts[0], parts[1] - 1, parts[2]) // months are 0-based\n}\n\n```" } ]
code_checkout-ui-custom_267e33c4
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_configs/_style.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n// IMPORTED FROM STORE THEME\n\n$base: #f4f2f2; // body bg...\n$baseInverted: #21364f; // general\n\n$actionPrimary: #1a73e8; //links, buttons borders, backgrounds\n$actionPrimaryDarken: #1d63be; // usually 15% more\n\n$actionSecondary: #f1f7ff;\n\n\n$emphasis: #000000;\n$disabled: #999999;\n\n$success: #2fba2d; // success button, cta, usually the \"checkout\", \"login\", \"pay\"\n$successDarken: #269e24; // usually 15% more\n$successFaded: #beffa5;\n\n$danger: #ff4c4c;\n$dangerFaded: #ffe6e6; \n\n$warning: #ffb100;\n$warningFaded: #fff6e0;\n\n$muted1: #323232; //titles & borders\n$muted2: #676767; //borders\n$muted3: #999999; //borders\n$muted4: #cbcbcb; //borders\n$muted5: #eee; //borders\n$muted6: #f3f3f3; //borders & bg\n\n// CHECKOUT VARS\n\n$fontSize: 12px;\n$borderRadius:4px;\n$btnBorderRadius:30px;\n\n$maxWrapper: 980px;\n$inputHeight:40px;\n\n$bordersContainers:none; // 2px solid $muted5\n\n//font\n\n$fontFamily: 'Roboto', sans-serif;\n\n\n// NOT included on admin -- kept for future (no change!)\n\n$showCouponField:true;\n$countingSteps:true;\n$showCheckoutSteps:true;\n$buttonShadow:false;\n$mobileWidth:690px;\n\n```" } ]
code_checkout-ui-custom_17e108d2
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_configs/_style.app.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n// IMPORTED FROM STORE THEME\n\n$base: \"{{base}}\"; // body bg...\n$baseInverted: \"{{$baseInverted}}\"; // general\n\n$actionPrimary: \"{{actionPrimary}}\"; //links, buttons borders, backgrounds\n$actionPrimaryDarken: \"{{actionPrimaryDarken}}\"; // usually 15% more\n\n$actionSecondary: \"{{actionSecondary}}\";\n\n\n$emphasis: \"{{emphasis}}\";\n$disabled: \"{{disabled}}\";\n\n$success: \"{{success}}\"; // success button, cta, usually the \"checkout\", \"login\", \"pay\"\n$successDarken: \"{{successDarken}}\"; // usually 15% more\n$successFaded: \"{{successFaded}}\";\n\n$danger: \"{{danger}}\";\n$dangerFaded: \"{{dangerFaded}}\"; \n\n$warning: \"{{warning}}\";\n$warningFaded: \"{{warningFaded}}\";\n\n$muted1: \"{{muted1}}\"; //titles & borders\n$muted2: \"{{muted2}}\"; //borders\n$muted3: \"{{muted3}}\"; //borders\n$muted4: \"{{muted4}}\"; //borders\n$muted5: \"{{muted5}}\"; //borders\n$muted6: \"{{muted6}}\"; //borders & bg\n\n// CHECKOUT VARS\n\n$fontSize: \"{{fontSize}}\";\n$borderRadius:\"{{borderRadius}}\";\n$btnBorderRadius:\"{{btnBorderRadius}}\";\n\n$maxWrapper: \"{{maxWrapper}}\";\n$inputHeight:\"{{inputHeight}}\";\n\n$bordersContainers:\"{{bordersContainers}}\"; // 2px solid $muted5\n\n//font\n\n$fontFamily: \"{{fontFamily}}\";\n\n\n// NOT included on admin -- kept for future (no change!)\n\n$showCouponField:true;\n$countingSteps:true;\n$showCheckoutSteps:true;\n$buttonShadow:false;\n$mobileWidth:690px;\n\n```" } ]
code_checkout-ui-custom_0acccdf4
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_cart.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n.cart {\n border:none;\n padding:0;\n}\n\nbody.v-custom-step-cart {\n.main-header {\n .header-link {\n display: block;\n }\n}\n}\n// empty cart\n\nbody.v-custom-cart-empty {\n\n#cart-title,\n#shipping-preview-container,\n.summary-template-holder,\n.checkout-steps,\n.cart-more-options {display:none !important;}\n.cart-template-holder {\n margin:0 auto;\n}\n}\n.empty-cart-content {padding:50px 0;}\n\n\n// end empty cart\n\nh1#cart-title {display:none !important;}\n\n.cart-more-options,\n.cart-template-holder .cart {\n\tpadding: 20px 30px;\n\tbackground: #fff;\n\tmargin: 0;\n\tborder-radius: $borderRadius;\n\t@media (max-width: $mobileWidth) {\n\t\tpadding: 12px;\n\t}\n}\n\n\n.cart-template-holder .cart {\n border:$bordersContainers;\n margin-bottom:20px;\n}\n\n.table.cart-items {\n\n display: block;\n\n thead {\n width: 100%;\n display: block;\n tr {\n display:flex;\n align-items: center;\n th {\n &.product {\n width: calc(100% - 235px) !important;\n }\n\n &.product-price,\n &.quantity-price {\n width:90px !important;\n }\n\n &.item-remove,\n &.quantity-price,\n &.shipping-date {\n display: none;\n }\n\n &.quantity { min-width: 62px; }\n\n &.product-image {order:1;}\n &.product-name {order:2;}\n &.shipping-date {order:3;}\n &.quantity {order:4;}\n &.product-price,\n &.quantity-price {order:5;}\n\n\n }\n }\n }\n\n tr {\n &.item-attachments-head {\n border:none !important;\n justify-content: center;\n .help-arrow {display: none;}\n }\n &.item-attachments-content {\n input,\n select {\n @extend %input-style;\n }\n }\n\n\n }\n\n td.shipping-date {\n display:none;\n }\n\n tbody {\n display:flex;\n flex-wrap:wrap;\n width: 100%;\n tr {\n width:100%;\n display: flex;\n flex-wrap:wrap;\n border-top:1px solid $muted5;\n\n &.hide {\n display:none;\n }\n\n > .v-custom-bundles {\n width: 100%;\n }\n\n @media(max-width: $mobileWidth) {\n margin-top:0 !important;\n &:first-child {\n border:none;\n }\n }\n\n &.item-attachments-head,\n &.item-attachments-content {display: none;}\n\n\n\n .v-custom-product-item-wrap {\n width:100%;\n display: flex;\n align-items: center;\n position:relative;\n padding:20px 0;\n @media(max-width: $mobileWidth) {\n display: block;\n padding:10px 0;\n &:after {\n content:\"\";\n clear:both;\n display:block;\n }\n }\n }\n\n td {\n width: auto;\n border:none;\n\n &.product-name {\n .add-service-container,\n .clone-item.btn,\n .add-item-attachment-container {\n margin:10px 0;\n + p {display: none;}\n }\n\n .add-service.btn,\n .clone-item.btn,\n .add-item-attachment-container a{\n @extend .btn-secondary;\n }\n\n @media(min-width: 769px) {\n width: calc(100% - 355px) !important;\n }\n\n .seller {\n display:block;\n }\n }\n\n &.product-price,\n &.quantity-price {\n width: 90px !important;\n white-space: nowrap;\n margin: 0 10px;\n line-height: 16px;\n\n br {display:none;}\n\n @media (max-width: $mobileWidth) {\n width: initial !important;\n text-align: right;\n float: right;\n margin: 0;\n padding: 0;\n }\n\n .new-product-price-label,\n .old-product-price-label {\n display: none;\n }\n\n .list-price {\n font-size: 10px;\n }\n\n .total-selling-price,\n .best-price {\n font-weight: bold;\n position: relative;\n @media (max-width: $mobileWidth) {\n display: flex;\n justify-content: flex-end;\n margin-top: 7px;\n .discount {margin-left: 5px;display: block;}\n }\n }\n\n\n .new-product-real-price-per-unit {display: inline-block;}\n\n .v-custom-quantity-price {\n &__best {\n font-weight:bold;\n font-size:$fontSize;\n }\n &__list {\n display: block;\n font-size: 10px;\n\n\n &--list,\n &--selling {\n display:block;\n }\n &--list {\n text-decoration: line-through;\n color: $muted3;\n }\n\n &,\n &--selling {\n color: $muted2;\n font-size: 10px;\n line-height: 11px;\n }\n\n &--selling {\n margin-bottom: 3px;\n .discount {display:none;}\n\n &:after {content:\")\";}\n &:before {content:\"(\";}\n\n .best-price {\n font-weight:normal;\n display: inline-block;\n }\n }\n\n > *:last-child {\n @media (max-width: $mobileWidth) {\n margin-bottom:-7px;\n }\n }\n }\n\n }\n\n &.v-custom-quantity-price-active {\n > .list-price {display:none !important;}\n }\n\n > span.list-price,\n > span.best-price {\n display: block;\n }\n\n //manual pricing\n span.product-manualprice,\n a.manualprice-link-remove {\n z-index: 2;\n }\n\n\n a.manualprice-link-remove {\n position: absolute;\n top: -2px;\n left: -4px;\n background: #FFF;\n }\n\n a.manualprice-link-remove i.icon-remove:before {\n width: 10px !important;\n height: 10px !important;\n }\n\n span.product-manualprice {\n padding: 5px 5px 5px 31px;\n border: 1px solid #ccc;\n display: inline-block;\n background: #FFF;\n border-radius:5px;\n box-shadow: 0 0 19px #777;\n position: absolute;\n top: 0;\n left: 0;\n transform:translate(-15%, -34%);\n }\n\n\n }\n\n &.product-price {\n @media (max-width: $mobileWidth) {\n span.list-price:not(.hide) + br + span.best-price {margin-top:0;}\n }\n }\n\n\n &.item-remove {\n margin-left: auto;\n width: 20px !important;\n @media (max-width: $mobileWidth) {\n top:0 !important;\n }\n }\n\n\n\n &.product-image {order:1;}\n &.product-name {order:2;width: 60%;}\n &.shipping-date {order:3;}\n\n &.quantity {order:4;}\n &.product-price,\n &.quantity-price {order:5;}\n &.item-remove {order:10;}\n\n\n &.quantity-price {display: none !important;}\n &.product-price {display: block !important;}\n\n\n .field-help {\n background:$actionPrimary;\n border-color:$actionPrimary;\n }\n\n i.icon-question-sign {\n color:$actionPrimary;\n }\n\n .add-item-attachment-container,\n .clone-item,\n p.clone-item-container {\n display: none !important;\n }\n\n hr.clone-item-sep {\n margin:0;\n clear: both;\n border:none;\n }\n\n .product-service {\n height:calc( #{$inputHeight} + 10px);\n margin-top: 10px;\n position: relative;\n\n @media (min-width:$mobileWidth) {\n fieldset {\n width: 100%;\n position: absolute;\n min-width: 250px;\n }\n }\n\n p {display: flex;}\n select {\n @extend %input-style;\n background:#FFF;\n width: 100%;\n margin-right: 10px;\n }\n input[type=submit] {\n @extend .btn-secondary;\n }\n }\n\n &.quantity input {\n line-height: inherit;\n }\n\n }\n\n .v-custom-assemblies {\n clear: both;\n }\n\n &.v-custom-bundles-in {\n .product-service {display: none;}\n }\n\n &.item-unavailable {\n margin: 10px 0;\n border-radius: 10px;\n border: none !important;\n\n @media (max-width:$mobileWidth) {\n padding: 0;\n text-align: center;\n }\n }\n\n &.v-custom-indexedItems-in {\n & + tr.item-unavailable { display:none }\n }\n\n &.v-custom-indexed-item {\n border:none;\n }\n\n\n &.v-custom-indexed-item,\n &.item-service {\n margin:0 0 10px 0;\n padding:0;\n border-top:none;\n\n .v-custom-product-item-wrap,\n .v-custom-trservice-wrap {\n background:$actionSecondary;\n border:1px dashed $muted4;\n border-radius:$borderRadius;\n\n width: 100%;\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n padding: 5px 10px;\n }\n\n .v-custom-trservice-wrap {\n margin-bottom: 10px;\n margin-top: 10px;\n }\n\n td.quantity {\n background: #FFF;\n width:25px;\n height:20px;\n text-align:center;\n justify-content: center;\n p {\n width:100%;\n }\n }\n\n\n td.product-price {display: none !important;}\n td.quantity-price {display: block !important;}\n\n .item-remove {\n margin-left: auto;\n position: initial;\n width: auto;\n i.icon.icon-remove.item-remove-ico:before {\n content: \"-\";\n background: $danger;\n color: #FFF;\n line-height: 9px;\n border-radius: 100%;\n width: 16px;\n height: 16px;\n font-size: 27px;\n }\n }\n\n @media(max-width: $mobileWidth) {\n border-top:none !important;\n .product-price,\n .quantity {\n margin:auto !important;\n width:auto !important;\n min-width:initial !important;\n }\n }\n }\n\n &.v-custom-indexed-item {\n &:last-child {\n margin-bottom: 20px;\n }\n td.product-image {display:none;}\n td.quantity {\n @media (max-width:$mobileWidth) {\n display:none;\n }\n }\n td.product-name {\n margin-left:0 !important;\n padding: 0 !important;\n width: 100% !important;\n margin-right:15px;\n }\n p {margin:0;padding:0;}\n }\n\n &:last-child {\n border-bottom:none;\n }\n\n &.v-custom-assemblies-in .v-custom-product-item-wrap {\n\n }\n &.v-custom-assemblies-in.v-custom-indexed-item .v-custom-product-item-wrap {\n .v-custom-assemblies {\n\n }\n }\n }\n\n > tr.v-custom-indexed-item,\n > tr[data-parentitemindex] {\n display:none;\n\n & + .item-unavailable {\n display:none;\n }\n }\n }\n\n td.product-image {\n\n a {\n overflow: hidden;\n border-radius: $borderRadius;\n }\n a {margin-right:20px;}\n a,\n img {\n width:100px;\n display:block;\n max-width: initial;\n height: auto;\n\n @media(max-width: $mobileWidth) {\n width: 70px;\n }\n }\n }\n\n td.product-name {\n a,\n a:hover {\n color:#333;\n font-weight:bold;\n text-decoration:none;\n }\n\n\n }\n\n td.quantity {\n margin: 0 0 0 10px;\n display:flex;\n align-items: center;\n padding: 0;\n border-radius: $borderRadius;\n border:1px solid $muted4;\n float:left;\n min-width: 30px;\n text-align: center;\n justify-content: center;\n\n input {\n margin:0;\n @extend %input-style;\n width: 30px !important;\n height:30px !important;\n padding:0;\n border:none;\n box-shadow:none;\n }\n .item-quantity-change {\n position:initial;\n left:initial;\n top:initial;\n bottom:initial;\n height: initial;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n\n i {\n background:none;\n line-height:30px;\n display: inline-block;\n &:before {\n font-weight:bold;\n font-size:22px;\n width:25px;\n height:25px;\n line-height:25px;\n color:#000;\n border-radius:100%;\n }\n }\n\n > p {\n margin: 0;\n }\n\n &.item-quantity-change-decrement i:before {\n content:\"-\";\n line-height:21px;\n }\n &.item-quantity-change-increment i:before {\n content:\"+\"\n }\n }\n }\n\n @media(max-width: $mobileWidth) {\n\n\n td.quantity {width: 97px;}\n td.product-name,\n td.quantity {\n margin-left: 90px !important;\n }\n }\n\n i.icon.icon-remove.item-remove-ico:before {\n content:url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyLjAwMSA1MTIuMDAxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIuMDAxIDUxMi4wMDE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxnPg0KCQk8cGF0aCBkPSJNMjg0LjI4NiwyNTYuMDAyTDUwNi4xNDMsMzQuMTQ0YzcuODExLTcuODExLDcuODExLTIwLjQ3NSwwLTI4LjI4NWMtNy44MTEtNy44MS0yMC40NzUtNy44MTEtMjguMjg1LDBMMjU2LDIyNy43MTcNCgkJCUwzNC4xNDMsNS44NTljLTcuODExLTcuODExLTIwLjQ3NS03LjgxMS0yOC4yODUsMGMtNy44MSw3LjgxMS03LjgxMSwyMC40NzUsMCwyOC4yODVsMjIxLjg1NywyMjEuODU3TDUuODU4LDQ3Ny44NTkNCgkJCWMtNy44MTEsNy44MTEtNy44MTEsMjAuNDc1LDAsMjguMjg1YzMuOTA1LDMuOTA1LDkuMDI0LDUuODU3LDE0LjE0Myw1Ljg1N2M1LjExOSwwLDEwLjIzNy0xLjk1MiwxNC4xNDMtNS44NTdMMjU2LDI4NC4yODcNCgkJCWwyMjEuODU3LDIyMS44NTdjMy45MDUsMy45MDUsOS4wMjQsNS44NTcsMTQuMTQzLDUuODU3czEwLjIzNy0xLjk1MiwxNC4xNDMtNS44NTdjNy44MTEtNy44MTEsNy44MTEtMjAuNDc1LDAtMjguMjg1DQoJCQlMMjg0LjI4NiwyNTYuMDAyeiIvPg0KCTwvZz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjwvc3ZnPg0K\");\n width:15px;\n height:15px;\n }\n\n}\n\n.summary-template-holder {\n\tbackground: #fff;\n\tpadding: 20px;\n\ttext-align: left;\n\n\tbox-sizing: border-box;\n\tborder-radius: $borderRadius;\n\n\tposition: sticky;\n\ttop: 20px;\n\n\tborder: $bordersContainers;\n\n\t.summary-totalizers,\n\t.summary-coupon-wrap {\n\t\twidth: 100% !important;\n\t}\n\n\t.cart-more-options {\n\t\tdisplay: none !important;\n\t}\n\n\t.summary-coupon {\n\t\ttext-align: center;\n\t\tmargin: 0 auto !important;\n\t\tmin-width: initial;\n\n\t\tfieldset.coupon-fieldset {\n\t\t\t@if $showCouponField {\n\t\t\t\t.coupon-data {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp {\n\t\t\t\tmargin: 0;\n\t\t\t\tcolor: $muted2;\n\t\t\t\tlabel {\n\t\t\t\t\tcursor: initial;\n\t\t\t\t\tfont-size: 13px;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinput[type=\"text\"],\n\t\t\tbutton[type=\"submit\"] {\n\t\t\t\t@extend %input-style;\n\t\t\t}\n\t\t\tbutton[type=\"submit\"] {\n\t\t\t\t@extend .btn-secondary;\n\t\t\t}\n\n\t\t\t.coupon-data {\n\t\t\t\tmargin: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\ta {\n\t\t\t\t\t@extend .btn, .btn-link;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t> div {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: space-between;\n\t\t\t\talign-items: center;\n\n\t\t\t\t@if $showCouponField {\n\t\t\t\t\t&[style*=\"none\"] {\n\t\t\t\t\t\tp.coupon-label {\n\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t&[style*=\"flex\"] {\n\t\t\t\t\tp.coupon-label {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t\tp.coupon-fields {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tp.coupon-fields {\n\t\t\tspan {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tposition: relative;\n\t\t\t\t&.info {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tcolor: $muted1;\n\t\t\t\t\t> span {\n\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t\t\tcolor: $actionPrimary;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinput {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.delete {\n\t\t\t\twidth: auto;\n\t\t\t\t#cart-coupon-remove {\n\t\t\t\t\tcolor: $danger;\n\t\t\t\t\tfont-size: 0;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\n\t\t\t\t\t&:before {\n\t\t\t\t\t\tcontent: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyLjAwMSA1MTIuMDAxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIuMDAxIDUxMi4wMDE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxnPg0KCQk8cGF0aCBkPSJNMjg0LjI4NiwyNTYuMDAyTDUwNi4xNDMsMzQuMTQ0YzcuODExLTcuODExLDcuODExLTIwLjQ3NSwwLTI4LjI4NWMtNy44MTEtNy44MS0yMC40NzUtNy44MTEtMjguMjg1LDBMMjU2LDIyNy43MTcNCgkJCUwzNC4xNDMsNS44NTljLTcuODExLTcuODExLTIwLjQ3NS03LjgxMS0yOC4yODUsMGMtNy44MSw3LjgxMS03LjgxMSwyMC40NzUsMCwyOC4yODVsMjIxLjg1NywyMjEuODU3TDUuODU4LDQ3Ny44NTkNCgkJCWMtNy44MTEsNy44MTEtNy44MTEsMjAuNDc1LDAsMjguMjg1YzMuOTA1LDMuOTA1LDkuMDI0LDUuODU3LDE0LjE0Myw1Ljg1N2M1LjExOSwwLDEwLjIzNy0xLjk1MiwxNC4xNDMtNS44NTdMMjU2LDI4NC4yODcNCgkJCWwyMjEuODU3LDIyMS44NTdjMy45MDUsMy45MDUsOS4wMjQsNS44NTcsMTQuMTQzLDUuODU3czEwLjIzNy0xLjk1MiwxNC4xNDMtNS44NTdjNy44MTEtNy44MTEsNy44MTEtMjAuNDc1LDAtMjguMjg1DQoJCQlMMjg0LjI4NiwyNTYuMDAyeiIvPg0KCTwvZz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjwvc3ZnPg0K\");\n\t\t\t\t\t\twidth: 11px;\n\t\t\t\t\t\theight: 12px;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tline-height: 10px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ti.icon-spin.loading-coupon {\n\t\t\tborder: 1px solid #666;\n\t\t\tborder-top: none;\n\t\t\tborder-radius: 100%;\n\t\t\tfont-size: 0;\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tpadding: 0;\n\t\t\tline-height: 0;\n\t\t\tdisplay: none;\n\t\t\tmargin: 0;\n\t\t\tposition: absolute;\n\t\t\ttop: 25%;\n\t\t\tright: 10px;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t// .summary-coupon\n\n\tspan.link-choose-more-products-wrapper {\n\t\tdisplay: none;\n\t}\n\n\t.cart-links-bottom {\n\t\tfloat: none;\n\t\tmargin: 10px 0 0 0;\n\n\t\t.btn {\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\t&-success {\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\t\t}\n\n\t\t@media (max-width: $mobileWidth) {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tleft: 0;\n\t\t\tz-index: 10000;\n\t\t\ta {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t.summary-totalizers {\n\t\t.table td.space,\n\t\t.table td.empty,\n\t\ttbody.shipping-calculate {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t.shipping-reset {\n\t\tdisplay:none;\n\t}\n\n\t.accordion-inner {\n\t\tmargin-top: 10px;\n\t}\n\n\ttr:not(.Shipping) {\n\t\tdisplay: flex !important;\n\t\tjustify-content: space-between;\n\t\tborder: none !important;\n\n\t\t&.CustomTax:not(.CustomTax--total) {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\ttbody {\n\t\tborder-top: 1px solid $muted4;\n\t\tborder-bottom: 1px solid $muted4;\n\t\tpadding: 15px 0;\n\t\tdisplay: block;\n\n\t\ttd {\n\t\t\tdisplay: inline-block;\n\t\t\ttext-align: left !important;\n\t\t\twidth: auto;\n\t\t\tcolor: $muted2;\n\t\t\tfont-size: 13px;\n\t\t\tpadding: 0 0 3px 0 !important;\n\t\t\t&.monetary {\n\t\t\t\ttext-align: right !important;\n\t\t\t\tmargin-left: auto;\n\t\t\t\tfloat: right;\n\t\t\t}\n\t\t}\n\t}\n\ttfoot {\n\t\ttr td {\n\t\t\tpadding: 14px 0 !important;\n\t\t\tcolor: $muted1;\n\t\t\tfont-size: 14px;\n\t\t\tfont-weight: bold;\n\t\t\t&.monetary {\n\t\t\t\ttext-align: right !important;\n\t\t\t\tmargin-left: auto;\n\t\t\t\tfloat: right;\n\t\t\t\tcolor: $actionPrimary;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n.summary-coupon {width: 100% !important;}\n\n.cart-select-gift-placeholder {\n width: auto !important;\n display: none !important;\n}\n\n.cart-more-options {\n width:100% !important;\n margin:0 !important;\n border:$bordersContainers;\n padding:0;\n min-height:0 !important;\n display: flex !important;\n flex-wrap: wrap;\n\n .cart-select-gift-placeholder {\n display: block !important;\n }\n\n .vtex-shipping-preview-0-x-alert {\n .shp-alert-content.vtex-shipping-preview-0-x-content {\n display: flex;\n align-items:center;\n }\n }\n\n .srp-container {\n\n max-width:100% !important;\n\n .srp-main-title {\n @extend %steps-title;\n }\n\n span.error {display:none;}\n .srp-toggle__wrapper {\n label {\n background:#FFF;\n padding:10px 0;\n border-radius:$borderRadius;\n }\n }\n\n .srp-delivery-info {\n .b--light-gray {\n background:#FFF;\n border-radius:$borderRadius;\n }\n }\n select,\n input[type=text]:not(.pac-target-input) {\n @extend %input-style;\n outline: initial;\n }\n\n form.srp-postal-code__form.dib.relative {\n width: 100%;\n }\n button.shp-open-options {border-color:$actionPrimaryDarken;}\n .onda-v1 .blue {\n color:$actionPrimary;\n outline: none;\n }\n .onda-v1 .b--blue {\n border-color:$actionPrimary;\n outline: none;\n\n }\n\n .onda-v1 .bg-blue {\n background:$actionPrimary;\n outline: initial;\n\n }\n .vtex-shipping-preview-0-x-addressFormPart1.vtex-shipping-preview-0-x-geolocation input {\n @extend %input-style;\n }\n .vtex-shipping-preview-0-x-pc .ship-country {width:98%;}\n .vtex-shipping-preview-0-x-pc .btn {\n @extend .btn-secondary;\n height: $inputHeight;\n outline: initial;\n border-radius:$borderRadius;\n }\n\n .ship-postalCode {\n width: auto !important;\n max-width: 190px;\n input#ship-postalCode {width:100%;}\n }\n }\n\n .cart-select-gift-placeholder,\n #shipping-preview-container {\n margin:20px;\n width:100%;\n }\n\n .cart-select-gift-placeholder {\n @media(min-width: $mobileWidth) {margin-bottom: 0;}\n &:empty {display: none;}\n }\n\n #shipping-preview-container {\n width: 100% !important;\n }\n\n @media(max-width: $mobileWidth) {\n #shipping-preview-container {display: none !important;}\n }\n\n .vtex-pickup-points-modal-3-x-pickupViewMode {\n .btn {\n padding:13px 0;\n }\n }\n\n}\n\n\n.cart-select-gift-placeholder {\n .available-gift-item.active {\n background:$actionSecondary;\n }\n\n .label-vertical-group:hover,\n .icon-check-empty,\n .icon-check-sign {\n color: $muted2;\n }\n\n .label-vertical-group:hover .icon-check-empty,\n .icon-check-sign {\n color: $actionPrimary;\n }\n}\n\n\n// !IMPORTANT split cart in 2 columns\n\n.body-cart-vertical {\n\n .cart-template-holder {\n width:calc(70% - 20px);\n @media(max-width:998px) {\n width:100%;\n }\n }\n\n .summary-template-holder {\n width: 30%;\n @media(max-width:998px) {\n width:100%;\n margin-top: 20px;\n }\n }\n\n .cart-template.full-cart.active {\n display: flex;\n flex-flow: wrap;\n justify-content: space-between;\n align-items: flex-start;\n\n .extensions-checkout-buttons-container {\n width: auto !important;\n margin:0;\n }\n\n .totalizers.summary-totalizers.cart-totalizers {\n width: 100%;\n padding:0;\n margin:0;\n }\n }\n}\n\n\n// end split cart in 2 columns\n\n```" } ]
code_checkout-ui-custom_21082804
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_overwriting.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n.payment-data .gift-card-section, .payment-data .payment-discounts-alert {\n margin: 0;\n width: 100% !important;\n box-sizing: border-box;\n}\n\n.input-append, .input-prepend {\n display: flex !important;\n align-items: stretch;\n\n .btn, \n .add-on {\n height: $inputHeight;\n line-height:$inputHeight;\n box-sizing: border-box;\n padding: 0;\n width:20px;\n }\n .add-on {\n height: initial !important;\n }\n input {\n border-radius: 0 $borderRadius $borderRadius 0 !important;\n width:100% !important;\n max-width: 100px !important;\n }\n}\n \n.payment-discoints-table .number, .gift-card-provider-group .number, .payment-discoints-table .action, .gift-card-provider-group .action {\n text-align:right;\n}\n\n\n@media (max-width: $mobileWidth) {\n .orderform-template-holder .client-profile-data input[type=\"text\"] {\n width:100% !important;\n }\n\n}\n\n//imported from io.vtex (just changing the @media width)\n@media (max-width: $mobileWidth) {\n .item-quantity-change {\n display: inline-block;\n }\n .item-quantity-change {\n float: left;\n padding: 3px 5px 3px 0px;\n }\n .item-quantity-change-increment {\n padding-left: 5px;\n padding-right: 0;\n }\n .full-cart .cart-links-bottom .btn-success {\n width: 83%;\n display: block;\n margin-top: 10px;\n }\n .full-cart .cart table {\n display: block;\n margin-top: 0 !important;\n }\n .full-cart .cart table thead {\n display: none;\n }\n .full-cart .cart table tbody {\n display: block;\n }\n .full-cart .cart table tbody tr + tr {\n border-top: 1px dashed #ddd;\n }\n .full-cart .cart table tbody tr {\n display: block;\n margin-top: 10px;\n padding: 10px 0;\n position: relative;\n }\n .full-cart .cart table tbody tr .product-name a,\n .full-cart .cart table tbody tr .product-name .seller {\n overflow: hidden;\n }\n .full-cart .cart table tbody tr td {\n display: inline-block;\n padding: 4px 0;\n }\n .full-cart .cart table tbody tr td.product-name .seller {\n display: block;\n line-height: 120%;\n font-size: 80%;\n margin: 4px 0;\n }\n .full-cart .cart table tbody tr td.product-image,\n .full-cart .cart table tbody tr td.bundle-item-image {\n left: 0;\n position: absolute;\n }\n .full-cart .cart table tbody tr td.product-name {\n display: block;\n margin-left: 60px;\n text-align: left;\n line-height: 140%;\n width: auto;\n }\n .full-cart .cart table tbody tr td.product-name {\n padding: 0 0 10px !important;\n }\n .full-cart .cart table tbody tr td.empty,\n .full-cart .cart table tbody tr td.shipping-date,\n .full-cart .cart table tbody tr td .brand {\n display: none;\n }\n .full-cart .cart table tbody tr td.product-name a,\n .full-cart .cart table tbody tr td.bundle-item-name span {\n display: block;\n padding-right: 20px;\n }\n .full-cart .cart table tbody tr td.quantity {\n width: 81px;\n padding: 0px;\n margin-left: 60px;\n }\n .full-cart .cart table tbody tr td.quantity input {\n float: left;\n margin: 0;\n width: 25px;\n }\n .full-cart .cart table tbody tr td.product-price {\n text-align: right;\n float: right;\n margin-right: 5px;\n padding: 0;\n }\n .full-cart .cart table tbody tr td.quantity-price {\n display: none;\n }\n .full-cart .cart table tbody tr td.item-remove {\n position: absolute;\n top: 2px;\n right: 0;\n width: 24px;\n }\n .cart-links-bottom {\n float: none;\n margin-top: 5px;\n margin-bottom: 40px;\n text-align: right;\n }\n .more {\n margin-right: 0;\n }\n .full-cart .cart-links-bottom .btn-success {\n width: auto;\n }\n .full-cart .cart table tbody tr.item-attachments-head {\n border: 0;\n margin: 0;\n padding: 0;\n }\n .full-cart .cart table tbody tr.item-attachments-head .item-attachments-header {\n top: auto;\n }\n .full-cart .cart table tbody tr.item-attachments-head .item-attachments-header:after {\n content: none;\n }\n .full-cart .cart table tbody tr.item-attachments-head .item-attachments-header strong {\n box-shadow: none;\n }\n .full-cart .cart table tbody tr.item-attachments-content {\n margin: 0;\n border: 0;\n padding: 0;\n }\n .full-cart .cart table tbody tr.item-attachments-content .item-attachments-item-fields {\n margin-left: 5px;\n width: 95%;\n }\n}\n```" } ]
code_checkout-ui-custom_92671760
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_payment.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n@import '_card-flags.scss';\n\n%label {\n\tmargin:10px 0 5px 0;display:block;color:$muted3;\n}\n// loadin shhimer\n\n\n@keyframes placeHolderShimmer{\n\t0%{\n\t\tbackground-position: -468px 0\n\t}\n\t100%{\n\t\tbackground-position: 468px 0\n\t}\n}\n\n%loading-shimmer {\n\tanimation-duration: 1.25s;\n\tanimation-fill-mode: forwards;\n\tanimation-iteration-count: infinite;\n\tanimation-name: placeHolderShimmer;\n\tanimation-timing-function: linear;\n\tbackground: darkgray;\n\tbackground: linear-gradient(to right, #eeeeee 10%, #dddddd 18%, #eeeeee 33%);\n\tbackground-size: 800px 104px;\n\n}\n// set svgs\n\n\tsvg.pickup-marker-blue,\n\tsvg.pickup-marker-blue path,\n\tsvg.pkpmodal-pickup-point-marker-image,\n\tsvg.pkpmodal-pickup-point-marker-image path,\n\tsvg.vtex-omnishipping-1-x-svg,\n\tsvg.vtex-omnishipping-1-x-svg path,\n\tsvg.pkpmodal-pickup-point-best-marker-image path:not([fill=\"white\"]) {\n\t fill: $actionPrimary;\n\t}\n\n// -- vertical checkout\n\n\n.container.container-main.container-order-form {\n @media(max-width: 768px) {\n \twidth: calc(100% - 20px);\n }\n}\n\n.orderform-template-holder{\n\n\n\n\t#client-profile-data {width: 100%;}\n\t#client-profile-data form.client-pre-email,\n\t#client-profile-data .step.client-profile-data,\n\t#shipping-data,\n\t#payment-data {\n \twidth:100% !important;\n \tpadding:0;\n \tmargin:0;\n \tbox-sizing: border-box;\n\n \tbackground:#FFF;\n\t\tborder-radius:$borderRadius;\n\n\t\tmargin-bottom:20px !important;\n\t\tz-index: initial;\n\n\t\tborder:$bordersContainers;\n\n\n \t@if $countingSteps {\n\t\t\tpadding:30px;\n\t\t\t@media(max-width: 768px) {\n\t\t\t\tpadding:20px;\n\t\t\t}\n\t\t} @else {\n\t\t\tpadding:4px 15px 15px 10px;\n\t\t}\n\n\t\t&.client-pre-email {display:block !important;padding-bottom: calc( #{$inputHeight} + 14px + 30px);}\n\n\t\t.link-box-edit {\n\t background: none;\n\t box-shadow: none;\n\t border: none;\n\t color: $actionPrimary;\n\t outline: none;\n\n\t position: absolute;\n\t right: 0;\n\t top: 50%;\n\t padding: 1px;\n\t font-size: 14px;\n\t transform: translateY(-50%);\n\t opacity: 0.7;\n\n\t transition: all ease 0.2s;\n\n\n\t &:hover {\n\t \topacity: 1;\n\t }\n\n\t i.icon-spinner {\n\t\t font-size: 17px;\n\t\t position: absolute;\n\t\t right: 0;\n\t\t display: none;\n\t\t top: -7px;\n\t\t\t}\n\n\t\t\t&.active {\n\t\t\t\ti.icon-edit {display: none;}\n\t\t\t\ti.icon-spinner { display: block; }\n\t\t\t}\n\t\t}\n\n\t\t.accordion-toggle {\n\t\t\tpadding:0;\n \t@extend %steps-title;\n \t> i {display: none;}\n \t> span {\n \t\tline-height: 20px;\n \t\tdisplay: block;\n \t\tvertical-align: middle;\n \t\t@if $countingSteps {\n \t\t\tline-height: initial;\n \t\t}\n \t}\n }\n\n\n .accordion-toggle,\n .accordion-inner {\n \tpadding: 0;\n }\n\n\n input[type=text],\n input[type=tel],\n input[type=email],\n select {\n \t&:not(.pac-target-input) {\n\t \t@extend %input-style;\n\t \twidth: 100%;\n\t \tmax-width: 100%;\n\t \toutline: initial;\n \t}\n }\n\n &.active {\n\n\t @if $countingSteps {\n\n\t }\n }\n\n }\n\n\t#payment-data {\n\n\n\t\tp.link.link-gift-card,\n\t\t.payment-group-item {\n\t\t box-sizing: border-box;\n\t\t margin: 0 6px 10px 0;\n\t\t border-radius: $borderRadius;\n\t\t border:1px solid $muted4;\n\t\t opacity: 1;\n\t\t text-decoration: none;\n\t\t\tcolor: $muted1;\n\t\t\ttransition: all ease 0.3s;\n\n\t\t\tpadding: 11px;\n\t\t\ttext-align: center;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: $muted6;\n\t\t\tfloat: left;\n\t\t\twidth:100%;\n\n\t\t\t&.active {\n\t\t\t\tbackground:#FFF;\n\t\t\t\tspan {\n\t\t\t\t\tcolor:$emphasis;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.active,\n\t\t\t&:hover {\n\t\t\t\tbox-shadow:0 0 6px $muted4;\n\t\t\t\tborder:1px solid $actionPrimary;\n\t\t\t}\n\t\t}\n\n\n\n\t\tp.link.link-gift-card,\n\t\tfieldset.payment-group {\n\t\t width: 100%;\n\t\t left: 0;\n\t\t display:block;\n\t\t background: none;\n\t\t position: relative;\n\t\t margin:0;\n\t\t}\n\n\t\t#iframe-placeholder-creditCardPaymentGroup {\n\t\t\tpadding-top: 32px;\n\t\t\t> .payment-group-item-cards {\n\t\t\t\tdisplay: block;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\ttop:0;\n\t\t\t\t.card-flag {\n\t\t\t\t\topacity:1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tp.link.link-gift-card {\n\t\t\tmargin-bottom: 10px;\n\t\t\tpadding:0;\n\t\t a{\n\t\t \tpadding: 10px 10px;\n\t\t\t\tdisplay: block;\n\t\t\t\ttext-align: left;\n\t\t }\n\t\t}\n\n\t\t.payment-group-list-btn {\n\t\t width: 100%;\n\t\t}\n\n\t\tp.link.link-gift-card *,\n\t\t.payment-group-item * {\n\t\t\tfont-size:12px !important;\n\t\t\tfont-weight:bold;\n\t\t}\n\n\t\t.payment-group-item {\n\t\t\tposition: relative;\n\t\t\theight: 40px;\n\t\t\tspan.payment-group-item-text {\n\t\t\t\tpadding: 0;\n\t\t\t\tline-height: 17px;\n\t\t\t\tbackground: none !important;\n\t\t\t}\n\n\t\t\t&:first-child:nth-last-child(n + 2),\n\t\t\t&:first-child:nth-last-child(n + 2) ~ .payment-group-item {\n\t\t\t\twidth: calc(50% - 3px);\n\t\t\t}\n\t\t\t&:first-child:nth-last-child(n + 3),\n\t\t\t&:first-child:nth-last-child(n + 3) ~ .payment-group-item {\n\t\t\t\twidth: calc(33.3% - 4px);\n\t\t\t}\n\t\t\t&:first-child:nth-last-child(n + 4),\n\t\t\t&:first-child:nth-last-child(n + 4) ~ .payment-group-item {\n\t\t\t\twidth: calc(25% - 4.8px);\n\t\t\t}\n\t\t\t&:first-child:nth-last-child(n + 5),\n\t\t\t&:first-child:nth-last-child(n + 5) ~ .payment-group-item {\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin-right: 0;\n\t\t\t\theight: auto;\n\t\t\t\t&:after,\n\t\t\t\t&:before {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t\t&:hover {\n\t\t\t\t\ttop:0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t&:last-child {\n\t\t\t\tmargin-right:0;\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\tposition: relative;\n\t\t\t\tbackground: #FFF;\n\t\t\t\ttop: -2px;\n\t\t\t}\n\n\t\t\t&.active {\n\n\t\t\t\t&:after,\n\t\t\t\t&:before {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\ttransform:translateX(-50%);\n\t\t\t\t\ttop:100%;\n\t\t\t\t\twidth: 0;\n\t\t\t\t\theight: 0;\n\t\t\t\t\tborder-style: solid;\n\t\t\t\t}\n\n\t\t\t\t&:after {\n\t\t\t\t\tborder-color: #FFF transparent transparent transparent;\n\t\t\t\t\tborder-width: 6px;\n\t\t\t\t}\n\n\t\t\t\t&:before {\n\t\t\t\t\tborder-color: $actionPrimary transparent transparent transparent;\n\t\t\t\t\tborder-width: 7px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.gift-card-section.form-step.box-default {\n\t\t\tpadding: 0;\n\t\t\tmargin: 0;\n\t\t\twidth: 100%;\n\t\t\tlabel {\n\t\t\t font-weight:bold;\n\t\t\t color:#000;\n\t\t\t font-size:12px;\n\t\t\t}\n\t\t}\n\n\t\tp.payment-discounts-options,\n\t\tp.gift-card-provider-options {\n\t\t display:flex;\n\t\t\talign-items: center;\n\t\t\tpadding-bottom: 10px;\n\t\t\tinput, select {margin:0 10px;}\n\n\t\t\tlabel {\n\t\t\t\tline-height: 12px;\n \t\tmargin: 0;\n\t\t\t}\n\t\t}\n\n\t\t.payment-discounts-list {\n\t\t\tmargin-bottom: 10px;\n\t\t\t.gift-card-provider-group-loyalty-program {\n\t\t\t\tborder-bottom: 1px solid $muted5;\n\t\t\t}\n\t\t\ttable {\n\t\t\t\twidth: 100%;\n\n\t\t\t\ttd {padding:0;}\n\t\t\t\ttbody,\n\t\t\t\ttr {\n\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t}\n\t\t\t\ttd.code,\n\t\t\t\ttd.number {\n\t\t\t\t\t\tmargin-right:20px;\n\t\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t\tpadding:0;\n\t\t\t\t}\n\t\t\t\t#remove-gift-card {\n\t\t\t\t\ttext-decoration:underline;\n\t\t\t\t\tcolor:$danger;\n\t\t\t\t}\n\n\t\t\t\ttd.action {\n\t\t\t\t\ta {\n\t\t\t\t\t\t@extend .btn, .btn-secondary;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tinput#payment-discounts-code {\n\t\t width:100% !important;\n\t\t}\n\n\t\t.gift-card-multiple-providers {\n\n\t\t}\n\n\t\t#btn-add-gift-card {\n\t\t\t@extend .btn-secondary;\n\t\t\theight: $inputHeight;\n\t\t\tborder-radius: $borderRadius;\n\t\t}\n\n\t\t.steps-view {\n\t\t width: 100% !important;\n\t\t padding: 0;\n\t\t\tmin-height: initial;\n\n\t\t\tiframe {\n\t\t\t\tmargin:0;\n\t\t\t}\n\t\t}\n\n\t\tp.notification {\n\t font-weight: bold;\n\t font-weight: 400;\n\t color:$muted1;\n\t &:not([style=\"display: none;\"]) + .box-step {\n\t\t padding:0;\n\t\t border:none;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child {\n\t\t\t@media (min-width: 769px) {\n\t\t\t\tmargin-bottom:0px !important;\n\t\t\t}\n\t\t}\n\n\t\t//custom (from js)\n\n\t\t.v-custom-payment-item-wrap {\n\t\t\tbox-sizing: border-box;\n\t\t border-radius: $borderRadius;\n\t\t background:#FFF;\n\t\t border:1px solid $muted4;\n\t\t\tcolor: $muted1;\n\t\t\ttransition: all ease 0.3s;\n\t\t\toverflow: hidden;\n\t\t\tmargin-bottom: 10px;\n\n\t\t\t&.active,\n\t\t\t&:hover {\n\t\t\t\tborder-color:$actionPrimary;\n\t\t\t\tbox-shadow:0 0 6px #ddd;\n\t\t\t}\n\n\t\t\t#iframe-placeholder-creditCardPaymentGroup {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\n\t\t\t.payment-group-item {\n\t\t\t\tborder:none;\n\t\t\t\tborder-bottom: 1px solid transparent;\n\t\t\t\tbox-shadow:none;\n\t\t\t\tmargin:0;\n\t\t\t\twidth: 100% !important;\n\t\t\t\theight:auto;\n\t\t\t\ttop:0;\n\n\t\t\t\t&-text {\n\t\t\t\t\tmargin-right: auto;\n\t\t\t\t\ttext-align: left;\n\t\t\t\t\tline-height: 27px !important;\n\t\t\t\t\twhite-space: nowrap;\n\t\t\t\t\t&:before {\n\t\t\t\t\t\tcontent:\"\";\n\t\t\t\t\t\twidth:20px;\n\t\t\t\t\t\theight:20px;\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tborder:1px solid $muted3;\n\t\t\t\t\t\tborder-radius:100%;\n\t\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\t\tmargin: -3px 10px 0 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t&-cards {\n\t\t\t\t\tdisplay:flex;\n\t\t\t\t\tjustify-content: flex-end;\n \t\t\tflex-wrap: wrap;\n\t\t\t\t\t.card-flag {\n\n\t\t\t\t\t\t&:last-child {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t@media(max-width:360px) {\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t&.active {\n\t\t\t\t\tbackground: $actionSecondary;\n\t\t\t\t\tborder-bottom:1px solid $actionPrimary;\n\t\t\t\t\t.payment-group-item-text {\n\n\t\t\t\t\t\t&:before {\n\t\t\t\t\t\t\tbackground: $actionPrimary;\n\t\t\t\t\t\t\tborder-color:$actionPrimary;\n\t\t\t\t\t\t\tbox-shadow:inset 0 0 0 3px #FFF;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.payment-group-item-cards {\n\t\t\t\t\t\tspan {opacity:1;}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t&:hover {\n\t\t\t\t\t.payment-group-item-text {\n\t\t\t\t\t\t&:before {\n\t\t\t\t\t\t\tborder-color:$actionPrimary;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t&:before,\n\t\t\t\t&:after {display: none;}\n\n\t\t\t\t&#payment-group-payPalPaymentGroup {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\t&:after {\n\t\t\t\t\t\tcontent:\"\";\n\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\theight:20px;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t\t\tbackground: url('https://io.vtex.com.br/checkout-ui/v6.18.19/img/payment-paypal-landscape.png') center no-repeat;\n\t\t\t\t\t\tbackground-size: contain;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 50%;\n\t\t\t\t\t\ttransform: translateY(-50%);\n\t\t\t\t\t\tright: 12px;\n\t\t\t\t\t\tleft: initial;\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&#payment-group-AffirmPaymentGroup:after {\n\t\t\t\t\tcontent: \"\";\n\t\t\t\t\twidth: 65px;\n\t\t\t\t\theight: 25px;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tbackground: url(https://cdn-assets.affirm.com/images/black_logo-transparent_bg.png) center no-repeat;\n\t\t\t\t\tbackground-size: contain;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: 49%;\n\t\t\t\t\ttransform: translateY(-50%);\n\t\t\t\t\tright: 3px;\n\t\t\t\t\tleft: initial;\n\t\t\t\t\tborder: none;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.payment-group-item.active + div,\n\t\t\t&.active > div {\n\t\t\t\tpadding:20px;\n\t\t\t\toverflow: hidden;\n box-sizing: border-box;\n\t\t\t}\n\n\t\t\t.SecurityEnvironmentIcon {display: none;}\n\n\t\t}\n\t}\n\n\t.step {\n\n\t\tborder:none;\n\t\tpadding:0;\n\t\tbackground: none;\n\t\tmargin-bottom: 0;\n\n\t\t@media(max-width:868px) {\n width:100%;\n }\n\n\t .box-info {\n\t\t\tcolor:$muted1;\n\t\t\t&[style*=\"display: block\"] {\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t}\n\n .form-step {\n \tfieldset {\n \t\twidth: 100%;\n\t\t\t\tfloat:none;\n\n \t\tp {\n\t \t\tposition:relative;\n\t \t\t@media(max-width: $mobileWidth) {\n\t \t\t\tfloat:none !important;\n\t \t\t}\n\n\t \t\t&.client-last-name,\n\t\t\t\t\t&.client-first-name {\n\t\t\t\t\t width: calc(50% - 5px);\n\t\t\t\t\t position: relative;\n\t\t\t\t\t @media(max-width: $mobileWidth) {\n\t\t\t\t\t \twidth: 100%;\n\t\t\t\t\t \tinput[type=\"text\"] {width: 100% !important;}\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t \t\tspan.help.error {\n\t\t\t\t position:absolute;\n\t\t\t\t font-size:11px;\n\t\t\t\t margin-top: 0;\n\t\t\t\t\t}\n\n\t \t}\n\n\t\t\t\t&.box-client-info-pj {padding-top:15px;}\n\n\t\t\t\t&.box-payment-option {\n\t\t\t\t\th3 {display:none;}\n\t\t\t\t}\n \t}\n\n\n\t\t\t#is-corporate-client {color:$actionPrimary;}\n\n\t }\n\n .input.text {\n \tlabel {@extend %label;}\n }\n\n &.client-profile-data {\n \t.client-notice.notice {margin: 0 0 10px 0;}\n \t.box-client-info {\n \t\tmargin-bottom: 20px;\n\t\t\t}\n\t\t\t.client-document, .client-phone {\n\t\t\t\twidth:calc(50% - 5px);\n\t\t\t\t@media(max-width:$mobileWidth) {\n\t\t\t\t\twidth:100%;\n\t\t\t\t}\n\t\t\t}\n\n\n }\n\n &.shipping-data {\n\t\t\t.box-step {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\t> * {\n\t\t\t\t\twidth:100%;\n\t\t\t\t\torder: 1;\n\n\t\t\t\t\t//&:not(#postalCode-finished-loading),\n\t\t\t\t\t//&:not(.vtex-omnishipping-1-x-geolocation) {margin:0 0 20px 0;}\n\n\t\t\t\t\t&.vtex-omnishipping-1-x-addressFormPart1 {order: 1;}\n\t\t\t\t\t&.vtex-omnishipping-1-x-addressForm { order: 2; }\n\t\t\t\t\t&.vtex-omnishipping-1-x-addressInfo { order: 3; }\n\t\t\t\t\t&.vtex-omnishipping-1-x-deliveryGroup { order: 4; }\n\t\t\t\t\t&.vtex-omnishipping-1-x-submitPaymentButton { order: 100; }\n\t\t\t\t\t&.btn-link.vtex-omnishipping-1-x-btnDelivery {\n\t\t\t\t\t\torder: 5;\n\t\t\t\t\t\tmargin-top: 20px;\n\t\t\t\t\t\tbackground: $actionPrimary;\n\t\t\t\t\t}\n\n\t\t\t\t\t&#postalCode-finished-loading,\n\t\t\t\t\t&:last-child {\n\t\t\t\t\t\tmargin:0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-address {\n\t\t\t\tmargin:0;\n\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-addressSummaryActive .address-summary {\n\t\t\t\tbackground: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='24' height='24'><path fill='%23999999' d='M15.998,5.951L4,16.237V30c0,0.552,0.448,1,1,1h8v-8h6v8h8c0.552,0,1-0.448,1-1V16.238L15.998,5.951z M19,19 h-6v-5h6V19z'></path> <polygon fill='%23999999' points='15.998,0.683 9,6.682 9,3 5,3 5,10.111 0.59,13.892 1.892,15.41 15.998,3.317 30.108,15.41 31.41,13.892 '></polygon></svg>\") no-repeat;\n\t\t\t\tbackground-position: 12px 9px;\n\t\t\t\tborder:1px solid $muted4;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-SummaryItemGroup {}\n\n \t.vtex-omnishipping-1-x-content {align-items: center;}\n \t.vtex-omnishipping-1-x-deliveryChannelsOption {\n\t\t background:#FFF;\n\t\t\t}\n\t\t\t.vtex-omnishipping-1-x-addressFormPart1.vtex-omnishipping-1-x-geolocation input {\n\t\t\t\t@extend %input-style;\n\t\t\t}\n\t\t\t.vtex-omnishipping-1-x-pickupButton,\n\t\t\t.vtex-pickup-points-modal-3-x-pickupViewOptionActive,\n\t\t\t.vtex-pickup-points-modal-3-x-pickupViewOptionActive:hover,\n\t\t\t.vtex-pickup-points-modal-3-x-pickupViewOptionActive:active,\n\t\t\t.vtex-pickup-points-modal-3-x-pickupViewOptionActive:focus,\n\t\t\t.vtex-omnishipping-1-x-deliveryChannelsTogglePickup,\n\t\t\t.vtex-omnishipping-1-x-deliveryChannelsOption.vtex-omnishipping-1-x-deliveryOptionActive {\n\t\t background:$actionPrimary;\n\t\t\t\tborder-color:$actionPrimary;\n\t\t\t\tborder-radius: $borderRadius;\n\t\t\t}\n\n\t\t\t.vtex-pickup-points-modal-3-x-pickupViewOptionInctive {\n\t\t\t\tcolor:$actionPrimary;\n\t\t\t\tborder-color:$actionPrimary;\n\t\t\t\tborder-radius: $borderRadius;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-addressItemOption:hover,\n\t\t\t.vtex-omnishipping-1-x-active {\n\t\t\t\tbackground-color: $actionSecondary;\n\t\t\t}\n\n\t\t\t.shipping-method-toggle {\n\t\t border-color:$actionPrimary;\n\t\t\t}\n\n\n \t.vtex-omnishipping-1-x-alert {\n \t\tborder-color:$warning;\n \t\tdisplay: flex;\n \t\t\talign-items:center;\n \t}\n\n\t\t\t.vtex-omnishipping-1-x-linkEdit { text-decoration: underline; }\n \t.vtex-omnishipping-1-x-deliveryChannelsWrapper,\n \t.vtex-omnishipping-1-x-deliveryChannelsToggle {border-radius: $borderRadius;}\n \t.vtex-omnishipping-1-x-deliveryChannelsWrapper {\n\t\t\t\tborder:1px solid $muted4;\n\t\t\t\twidth:100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\tmargin:0 0 20px 0;\n\t\t\t}\n \t.vtex-omnishipping-1-x-summaryChange {\n\t\t background:$actionSecondary;\n\t\t border-color:$muted4;\n\t\t color:$actionPrimary;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-leanShippingGroupList {\n\t\t\t\tborder-color:$muted5;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-option:hover,\n\t\t\t.vtex-omnishipping-1-x-leanShippingOptionActive,\n\t\t\t.vtex-omnishipping-1-x-leanShippingOption {\n\t\t\t\tbackground:#FFF !important;\n\t\t\t}\n\n\t\t\t.vtex-pickup-points-modal-3-x-modalDetailsBackLnk svg path,\n\t\t\t.vtex-pickup-points-modal-3-x-modalDetailsBackLnk {\n\t\t\t color: $muted2;\n\t\t\t fill:$muted2;\n\t\t\t}\n\n\t\t\t.vtex-pickup-points-modal-3-x-primary {\n\t\t\t outline:none;\n\t\t\t background:$actionPrimary;\n\t\t\t border-color:$actionPrimary;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-pickupPointChange {\n\t\t\t\tborder-color:$actionPrimary;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-address {\n\t\t\t\tp {\n\t\t\t\t\tclear:both;\n\t\t\t\t\tfloat: none;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\t&.input.ship-checkboxNumberLabel.text {\n\t\t\t\t\t\twidth: auto;\n\t\t\t\t\t\talign-self: flex-end;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\tmargin-left: 10px !important;\n\t\t\t\t\t\theight: $inputHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinput#ship-addressQuery {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t.vtex-omnishipping-1-x-container.shp-pickup-receiver {\n\t\t\t\tdisplay: block;\n\t\t\t\tsvg.person-blue path {fill: $actionPrimary;}\n\t\t\t\t.vtex-omnishipping-1-x-btn {color: $actionPrimary;}\n\t\t\t}\n\n @media (max-width: 490px) {\n .vtex-omnishipping-1-x-dateLink {\n width: 100%;\n }\n }\n }\n\n .submit.btn.btn-success {\n\t display:block;\n\t\t\tmargin:20px auto 0 auto;\n\t\t\tmin-width:55%;\n\t\t}\n\n }\n\n}\n\n.orderform-template {\n\tdisplay: flex !important;\n\n\tpadding-top: 0px;\n\tmin-height: 400px !important;\n\talign-items:flex-start;\n\n\t@media(max-width: 768px) {\n\t\tflex-wrap:wrap;\n\t}\n\n\t.orderform-template-holder{\n\t\twidth: 100%;\n\n\t\t@media(min-width: 769px) {\n\n\n\t\t\twidth: 61% !important;\n\t\t\tpadding-right:20px;\n\t\t\tmax-width: calc(100% - 271px);\n\t\t\tfloat:left;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t}\n\n\t@media(max-width: $mobileWidth) {\n \twidth:100%;\n \tpadding-top:0px;\n }\n\n\t.cart-template.mini-cart {\n\t\twidth: 39%;\n \tmin-width: 255px;\n\n\t\tposition: -webkit-sticky;\n\t\tposition: -moz-sticky;\n\t\tposition: -o-sticky;\n\t\tposition: -ms-sticky;\n \tposition: sticky;\n bottom: 0px;\n\t\ttop: 20px;\n\t\tright:0;\n\t\tfloat: right;\n\t\tmargin:0;\n\n \t@media(max-width: 768px) {\n \t\twidth:100%;\n \t\tposition: relative;\n \t\ttop:0;\n\t\t}\n\n\t\t.cart-items {\n\t\t\t> .v-custom-indexed-item {display:none !important;}\n\t\t}\n\n \t.cart-fixed {\n \t\theight: auto !important;\n \t\tposition: relative !important;\n\t max-width: 100%;\n\t width: 100% !important;\n\t\t\ttop:0;\n\t\t\tmin-height: initial;\n\n \t\t@media(min-width: 769px) {\n \t\t\t&.affix {\n \t\t\t}\n \t\t\t&.affix-top {position: relative !important;}\n \t\t}\n \t}\n\n\t\th2 {\n\t\t\t@extend %steps-title;\n\t\t\ttext-align: left;\n\t\t\tborder-top:none;\n\t\t\tbackground:none !important;\n\t\t\tmargin-bottom: 15px;\n\t\t}\n\n\n\t\t.quantity {\n\t\t\tmin-width: 10px;\n\t\t\twidth: auto;\n\t height: 10px;\n\t display: inline-block;\n\t background:$actionSecondary;\n\t color:$actionPrimary;\n\t\t}\n\n\t\t.summary-template-holder {\n\t\t\twidth:100%;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tpadding: 0;\n\n\t\t\t.accordion-inner {margin-top: 0px;}\n\n\t\t\t.summary > .summary-coupon-wrap,\n\t\t\t.summary-coupon-wrap > .summary-coupon {\n\t\t\t\tdisplay: block !important;\n\t\t\t}\n\n\t\t\t.summary-coupon p {\n\t\t\t\tmargin:0;\n\t\t\t}\n\n\t\t\t.summary > .summary-coupon-wrap {\n\t\t\t\tborder-top:1px solid $muted4;\n\t\t\t\tpadding:8px 0;\n\t\t\t}\n\n\t\t\tinput[type=text],\n\t\t\tbutton[type=submit],\n\t\t\tp.coupon-fields span.info > span {\n\t\t\t\tline-height: 30px !important;\n\t\t\t\theight:30px !important;\n\t\t\t}\n\t\t}\n\n\t\t.item {\n\t padding: 10px 0;\n\t margin: 0;\n\t border: none;\n\t border-bottom: 1px solid $muted5;\n\t\t\t&:last-child {border:none;}\n\n\t\t\tul.service-list.unstyled {\n\t\t\t\tmargin: 0;\n\t\t\t\tfloat: none;\n\t\t\t\twidth: 100%;\n\t\t\t\tbackground: none;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tclear: both;\n\t\t\t}\n\t\t\t.service-item,\n\t\t\t&.v-custom-indexed-item {\n\t\t\t\tbackground:$actionSecondary;\n\t\t\t\tborder:1px dashed $muted4;\n\t\t\t\tborder-radius:$borderRadius;\n\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: space-between;\n\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 5px 10px;\n\t\t\t\tmargin:10px 0 0 0;\n\n\t\t\t\t.description {margin-top:0;}\n\t\t\t\t> a,\n\t\t\t\t.quantity,\n\t\t\t\t.shipping-date,\n\t\t\t\t.item-subscription {display:none;}\n\n\t\t\t\t.price {margin:0;}\n\n\t\t\t\t&:last-child {margin-bottom:0;}\n\t\t\t}\n\n\t\t\t&.v-custom-indexed-item {\n\t\t\t\t.item-unavailable {display:none;}\n\t\t\t}\n\n\t .fn { width: calc(82% - 20px); }\n\n\t .description {\n\t\t\t display: flex;\n\t\t\t justify-content: space-between;\n\t\t\t}\n\n\t\t\t.price,\n\t\t\tspan.shipping-date {\n\t\t\t white-space: nowrap;\n\t\t\t}\n\n\t\t\t.url {\n\t\t\t\tborder-radius: $borderRadius;\n \t\toverflow: hidden;\n\t\t\t}\n\n\t\t}\n\n\t\t.summary-totalizers {\n\t margin-bottom: 0;\n\t\t}\n\n\t\t#go-to-cart-button {\n\t position: absolute;\n\t top:0px;\n\t right: 7px;\n\t color:$actionPrimary;\n\t text-decoration: underline;\n\t @media (max-width: $mobileWidth) {\n\t \tdisplay: none;\n\t }\n\t\t}\n\n\n\n\t\t.summary-totalizers {\n\t\t\t tbody {\n\t\t border-top:1px solid $muted4;\n\t\t border-bottom:1px solid $muted4;\n\t\t padding: 14px 0;\n \t\t\tdisplay: block;\n\n \t\t\ttr {\n\t\t\t &.CustomTax:not(.CustomTax--total) {\n\t\t\t display:none !important;\n\t\t\t }\n\t\t\t }\n\n\t\t td {\n\t\t display: inline-block;\n\t\t text-align: left !important;\n\t\t width: auto;\n\t\t color:#666;\n\t\t font-size:13px;\n\t\t padding: 0 0 3px 0 !important;\n\t\t &.monetary {\n\t\t text-align: right !important;\n\t\t margin-left: auto;\n\t\t float: right;\n\t\t }\n\t\t }\n\n\t\t & + tbody {\n\t\t\t border-top: none;\n\t\t\t\t}\n\t\t\t\t&.shipping-reset,\n\t\t\t\t&.shipping-calculate {display: none !important;}\n\t\t }\n\t\t tfoot {\n\t\t tr td {\n\t\t padding:14px 0 !important;\n\t\t color:#000;\n\t\t font-size:14px;\n\t\t font-weight:bold;\n\t\t text-align: left;\n\t\t &.monetary {\n\t\t text-align: right !important;\n\t\t margin-left: auto;\n\t\t float: right;\n\t\t color:$actionPrimary;\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\n\t\t.cart {\n\t\t\tmargin-bottom: 0;\n\t\t\tmax-height: calc(100vh - 355px);\n\t\t\toverflow:auto;\n\n\t\t\t&::-webkit-scrollbar {\n\t\t\t\twidth: 6px\n\t\t\t}\n\n\t\t\t&::-webkit-scrollbar-track {\n\t\t\t\tbackground: transparent;\n\t\t\t\tborder-radius: $borderRadius\n\t\t\t}\n\n\t\t\t&::-webkit-scrollbar-thumb {\n\t\t\t\tbackground: $muted4;\n\t\t\t\tborder-radius: 30px\n\t\t\t}\n\n\t\t\t&:hover::-webkit-scrollbar-thumb {\n\t\t\t\tbackground: $muted5;\n\t\t\t}\n\n\t\t\t.cart-items:not(.v-loaded) {\n\t\t\t\tmax-height: 100px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tli.item {\n\t\t\t\t\toverflow:hidden;\n\t\t\t\t\tposition:relative;\n\t\t\t\t\tborder: none !important;\n\t\t\t\t\t> * {opacity:0;}\n\n\t\t\t\t\t&:after {\n\t\t\t\t\t\tcontent:\"\";\n\t\t\t\t\t\twidth:100%;\n\t\t\t\t\t\theight:100%;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t\t\ttop:0px;\n\t\t\t\t\t\tleft:0;\n\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\t@extend %loading-shimmer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\t.payment-confirmation-wrap {\n\t\tborder:none;\n\t\tpadding:0;\n\n\t\t.payment-submit-wrap {\n\t\t\tmargin:10px 0 0 0;\n\n\t\t\t@media(max-width: 768px) {\n\t\t\t\tz-index: 9999;\n\t\t\t\tposition: fixed;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n \t\tleft: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground:#FFF;\n\t\t\t\tmargin: 0 !important;\n\t\t\t\tbutton {\n\t\t\t\t\tborder-radius:0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@media(max-width: 768px) {\n\t\t\tborder:none !important;\n\t\t\t.payment-submit-wrap,\n\t\t\tbutton { margin:0 !important; }\n\t\t}\n\n\t\t#payment-data-submit {\n\t\t\t&:disabled span {\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.summary-note {\n\t\tdisplay:none !important;\n\t\tp.note-data {display: none !important;}\n\t\t> div {\n\t\t\tdisplay: block !important;\n\t\t}\n\t\t.note-textarea {\n\t\t\t@extend %input-style;\n\t\t\theight:50px;\n\t\t\tline-height: 20px;\n\t\t\tmax-width: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-family:$fontFamily;\n\t\t\tmax-height: 100px;\n\t\t}\n\t}\n\n\t.custom-cart-template-wrap {\n\t\tposition: relative;\n\t\tbackground: #FFF;\n\t padding: 17px 20px;\n\t text-align: left;\n\t box-sizing: border-box;\n\t border-radius:$borderRadius;\n\n\t border: $bordersContainers;\n\n\n\t .summary-cart-template-holder {\n\t height: auto !important;\n\t\t}\n\t .summary-template-holder {margin-top: 0;}\n\t}\n\n}\n\n// counting steps\n\n\t@if $countingSteps {\n\n\t\t.step.client-profile-data.active .box-step .form-step[style*=\"display: block\"],\n\t\t.step.shipping-data.active .accordion-inner.shipping-container,\n\t\t#payment-data .box-step form.form-step {\n\t padding-top: 20px !important;\n\t\t}\n\n\n\t\t.orderform-template-holder #shipping-data .shipping-summary-info,\n\t\t.orderform-template-holder .step .accordion-body p.notification,\n\t\t.client-pre-email + .client-profile-data .accordion-body:before {\n\t\t\tdisplay: none;\n\t\t}\n\t\tbody.v-custom-step-shipping #shipping-data .shipping-summary-info,\n\t\tbody.v-custom-step-payment #shipping-data .shipping-summary-info {\n\t\t\t\tdisplay:block\n\t\t}\n\t}\n\n// end counting steps\n\n//iframe\n\n.steps-view, .gift-card-section,\n.App.iframe-credit-card-payment-group {\n background:#FFF;\n}\n\n#app-container {\n\tmin-height: 100vh;\n\tbackground: #FFF;\n\n\n\tinput[type=text],\n\tinput[type=tel],\n\tinput[type=email],\n\tselect {\n\t\t@extend %input-style;\n\t\twidth: 100%;\n\t}\n\n\tspan.help.error {\n\t\tmargin:0 !important;\n\t\tdisplay:none;\n\t}\n\n\t.SecurityEnvironmentIcon {\n\t\tmargin-bottom:20px;\n\t\tdisplay: none;\n\t}\n\n\t.CardForm {\n\t\t> div {position: relative;clear: both;}\n\t\t.PaymentValue {display:none;}\n\n\t\tinput#creditCardpayment-card-0Number[value=\"\"] {\n\t\t\tbackground:#FFF;\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\n\t\t.SavedCardsList {\n\t\t\twidth: calc(100% - 1px);\n\t\t}\n\t\t.SavedCard .link-delete {\n\t\t\tright: 8px;\n\t\t\ttop: 50%;\n\t\t\tmargin-top: -10px;\n\t\t\tborder: 1px solid #ccc;\n\t\t\tbackground: #FFF;\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tline-height: 17px;\n\t\t}\n\t}\n\t.FormFieldLabel {\n\t\tline-height: 30px;\n\t}\n\n\t.PaymentCardFlags {\n\t\tposition: absolute;\n top: calc(30px + ( #{$inputHeight} - 25px )/2);\n right: 16px;\n padding: 0;\n\t .card-flag-label input {\n\t display:none;\n\t\t}\n\t\t.card-flag-label {width:auto;}\n\t\t.card-flag {opacity: 0.7;display: none;}\n\t\t.card-flag.card-selected {opacity: 1;display:block;}\n\t}\n\n\tinput#creditCardpayment-card-0Code,\n\tinput#creditCardpayment-card-1Code{\n\t width: 100px !important;\n\t}\n\n\t.label-vertical-group {\n\t\tpadding: 9px;\n\t\t&:hover {\n\t\t\tcolor:$actionPrimary;\n\t\t}\n\t\t&.active {\n\t\t\tcolor:$actionPrimary;\n\t\t\tbackground:$actionSecondary;\n\t\t}\n\n\n\t\t&:not(.SavedCard) {\n\t\t\t.card-flag {\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 5px;\n\t\t\t\ttop: 8px;\n\t\t\t}\n\t\t}\n\n\n\t\t.icon-ok-circle, .icon-circle-blank {\n\t\t\ttop: 9px;\n\t\t}\n\t\t&.UseAnotherCard {\n\t\t\tbackground-color: $muted5;\n\t\t\tpadding:4px;\n\t\t\tfont-size: 11px;\n \ttext-decoration: underline;\n\n\t\t\t#use-another-card {\n\t\t\t\tcolor:$muted2;\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\t#use-another-card {\n\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t\tcolor:$muted3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\n\tlabel.FormFieldLabel {\n\t display: block;\n\t clear: both;\n\t width: auto;\n \tmargin-right: 10px;\n\t}\n\n\t.AddressForm {\n display:flex;\n\t\tflex-wrap:wrap;\n\t\t> * {width:100%;order:10;}\n\t\tinput {\n\t\t\t\tmax-width:100%;\n\t\t}\n\n\t\t.payment-billing-address-street {order:1;}\n\t\t.payment-billing-address-complement {order:2;}\n\t\t.payment-billing-address-city {order:3;}\n\t\t.payment-billing-address-state {order:4;}\n\t\t.PostalCode {order:5;}\n\t}\n\n\n\n}\n\n```" } ]
code_checkout-ui-custom_0f05c235
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_global.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n// _global.scss\n\nbody {\n font-family:$fontFamily;\n min-width: initial !important;\n padding: 0;\n background: $base;\n padding-bottom:40px !important;\n \n min-height: 93vh;\n position: relative;\n font-size: $fontSize;\n\n overflow-x:hidden;\n\n a {\n color:$actionPrimary;\n &:hover {\n color:$actionPrimaryDarken;\n }\n }\n\n @media(max-width: 768px) { \n padding-bottom:0px !important;\n }\n\n //short preloader to don't show a empty cart\n .cart-template.full-cart {\n > * {\n opacity: 0;\n transition-delay:1.2s;\n transition-property: opacity;\n -webkit-transition-duration:0.5s;\n }\n }\n &.v-custom-loaded {\n .cart-template.full-cart {\n > * {opacity: initial;}\n }\n }\n //end short preloader to don't show a empty cart\n\n &.returningUser.v-custom-addressForm-on.v-custom-step-shipping \n .accordion-inner.shipping-container {\n\n .vtex-omnishipping-1-x-addressFormPart1.vtex-omnishipping-1-x-geolocation {\n display: block;\n }\n\n .vtex-omnishipping-1-x-deliveryGroup {\n display: block;\n }\n\n .vtex-omnishipping-1-x-submitPaymentButton {\n display: block;\n }\n }\n}\n\n.onda-v1 .br-pill,\n.step, .cart, .totalizers {\n\tborder-radius:$borderRadius;\n}\n\n.container-main {\n}\n \n.loading.loading-bg {\n background:$base; \n}\n\n// containers\n\n.container {\n max-width:$maxWrapper;\n width:calc(100% - 40px);\n @media(max-width: $mobileWidth) {\n width:calc(100% - 20px);\n }\n}\n\n\n\n.checkout-container {\n overflow: initial !important;\n z-index: 2;\n\n @media(max-width: 768px) {\n margin-bottom: 30px;\n }\n\n .orderform-template,\n .cart-template {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n transition:position ease 0.8s, opacity ease 0.8s, margin ease 0.8s;\n &.inactive {\n max-height: 50vh;\n overflow:hidden;\n top:0;\n position: absolute;\n }\n }\n .full-cart {\n &.inactive {\n margin-left: -140%;;\n }\n }\n .orderform-template {\n &.inactive {\n left: 140%;\n margin: 0;\n display:none !important;\n }\n }\n}\n\n\n//titles\n\n .container-cart h1,\n h1#orderform-title {\n \tfont-size: 22px !important;\n font-weight: 400 !important;\n color: $muted1 !important;\n }\n\n h1#orderform-title {display:none !important;}\n\n\n// assemblies custom vtex\n\n .v-custom-assemblies {\n margin: 10px 0 3px 0;\n overflow: hidden;\n border-top: 1px solid $muted4;\n padding-top: 7px;\n @media(max-width: $mobileWidth) {\n width: 100%;\n left:0;\n margin-bottom: 2px;\n }\n\n p {display: none;}\n &__values {\n list-style: none;\n padding: 0;\n margin: 0;\n \n &__item {\n strong {\n &:after {content:\":\";}\n }\n span, strong {line-height: 14px;}\n }\n } \n \n }\n```" } ]
code_checkout-ui-custom_f1d28f01
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_jsInteractions.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n//note field\n\n.orderform-template .summary-note {\n &.js-active {\n display:block !important;\n }\n}\n\n// coupon field\n\nbody.js-vcustom-showNoteField {\n .orderform-template {\n .payment-confirmation-wrap {\n display:block !important;\t\t\n .payment-submit-wrap {display:none;}\n }\n .summary-note {display: block !important;}\n }\n &.v-custom-step-payment {\n .orderform-template {\n .payment-confirmation-wrap {\n .payment-submit-wrap {display:block !important;}\n }\n }\n }\n}\n\n.summary-coupon fieldset.coupon-fieldset {\n .vcustom-showCustomMsgCoupon {\n border: 1px dashed $warning;\n padding: 1px;\n font-size: 11px;\n background: $warningFaded;\n border-radius: $borderRadius;\n margin-top:4px !important;\n clear: both;\n }\n}\n\n\n// custom tax\n\n.vcustom-customTax-tot {\n display: inline-block;\n position: relative;\n margin-left:5px;\n > span {\n background:$muted5;\n width:15px;\n height:15px;\n line-height:15px;\n display:inline-block;\n border-radius:100%;\n text-align:center;\n cursor: pointer;\n }\n\n &:hover {\n .vcustom-customTax-resume {\n display: block;\n }\n }\n}\n\n.vcustom-customTax-resume {\n position: absolute;\n left: calc(100% + 10px);\n width: 128px;\n background: $muted5;\n top: 50%;\n font-size: 11px;\n padding: 10px;\n transform: translateY(-50%);\n display: none;\n &__i {\n display: flex;\n justify-content: space-between;\n margin: 0;\n }\n &:before {\n content:\"\";\n display:block;\n position:absolute;\n left:-4px;\n top:calc(50% - 4px);\n width: 0;\n height: 0;\n border: 0 solid transparent;\n border-top-width: 4px;\n border-bottom-width: 4px;\n border-right: 4px solid $muted5;\n }\n}\n\n// custom coupon flag\n\n.v-custom-addLabels-active-flag {\n background:#FFF;\n color: $muted1;\n padding: 1px 4px;\n border-radius: $borderRadius;\n display: inline-block;\n align-items: center;\n font-size: 11px;\n border:1px solid $muted4;\n\n &:before {\n content:\"\";\n display:inline-block;\n width: 14px;\n height: 14px;\n background:url(\"//io.vtex.com.br/front-libs/bootstrap/2.3.2/img/glyphicons-halflings.png\");\n background-repeat: no-repeat;\n background-position: 0 -48px;\n margin-right: 4px;\n opacity: 0.9;\n vertical-align: middle;\n }\n}\n\n.table.cart-items tbody tr.product-item, .mini-cart .cart-items li {\n .v-custom-addLabels-active-flag {\n }\n}\n\n// assemblies custom vtex\n\n .v-custom-assemblies {\n margin: 10px 0 3px 0;\n overflow: hidden;\n border-top: 1px solid $muted4;\n padding-top: 7px;\n @media(max-width: $mobileWidth) {\n width: 100%;\n left:0;\n margin-bottom: 2px;\n }\n\n p {display: none;}\n &__values {\n list-style: none;\n padding: 0;\n margin: 0;\n \n &__item {\n strong {\n &:after {content:\":\";}\n }\n span, strong {line-height: 14px;}\n }\n } \n \n\t}\n\t\n//js \n\n\nbody.v-custom-paymentBuilder-accordion .steps-view {display: none;}\nbody.v-custom-changeShippingTimeInfo .orderform-template .cart-template.mini-cart .item span.shipping-date {\n\tdisplay: none;\n}\n```" } ]
code_checkout-ui-custom_ec20bac2
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_customAddressForm.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n\n\n#shipping-data .accordion-group.shipping-data:after {\n opacity: 0;\n transition: all ease 0.3s;\n}\n.js-v-custom-is-loadAddress {\n .vtex-omnishipping-1-x-warning {\n display: none !important;\n }\n\n #shipping-data .accordion-group.shipping-data:after {\n content: \"\";\n display: block;\n opacity: 1;\n left: 0;\n top: 0;\n width: 100%;\n height: 20px;\n z-index: 2;\n margin:0 0 20px 0;\n border-radius: 3px;\n @extend %loading-shimmer;\n }\n\n #postalCode-finished-loading + .mb5 {\n display: none !important;\n }\n\n}\n\n\n.vcustom--vtex-omnishipping-1-x-address {\n display: none;\n}\nbody.v-custom-addressForm-on {\n\n\n &.v-custom-step-shipping {\n .vcustom--vtex-omnishipping-1-x-address {\n display: block;\n }\n .v-custom-ship-info {\n display:flex;\n .ship-number {\n margin-right: 10px;\n }\n }\n .vtex-omnishipping-1-x-addressForm, .vtex-omnishipping-1-x-deliveryGroup, .vtex-omnishipping-1-x-submitPaymentButton {\n display: none;\n }\n }\n\n}\n\n.vtex-omnishipping-1-x-submitShippingStepButton {\n margin: 20px 0 0 0;\n}\n\n\nbody.v-custom-googleForm-on {\n .pac-container.pac-logo {\n //display: block !important;\n }\n\n .vtex-omnishipping-1-x-deliveryGroup,\n .vtex-omnishipping-1-x-addressForm,\n .vtex-omnishipping-1-x-submitPaymentButton,\n .vtex-omnishipping-1-x-btnDelivery {\n display:none\n }\n\n .alert-noStreet {\n display: none;\n }\n\n}\n\n.v-custom-googleFormScript-added.v-custom-googleForm-on .accordion-inner.shipping-container > * {\n display: none;\n}\n\n\n\nbody.v-custom-fnsCustomAddressForm {\n\n .accordion-inner.shipping-container {\n padding-top:0 !important;\n }\n\n\n .accordion-inner.shipping-container {\n transition:all ease 0.3s;\n }\n\n .vtex-omnishipping-1-x-selectDeliveryText + div {margin:0 !important;}\n\n .orderform-template-holder p.vtex-omnishipping-1-x-submitPaymentButton.btn-submit-wrapper.btn-go-to-payment-wrapper {\n margin-bottom:0 !important;\n }\n\n .vtex-omnishipping-1-x-addressFormPart1 {\n .input.ship-country,\n .input.ship-addressQuery,\n .input.ship-postalCode {display: none;}\n }\n\n &.returningUser {\n .vtex-omnishipping-1-x-addressFormPart1 {\n .input.ship-postalCode {display: block;}\n }\n }\n\n .vtex-omnishipping-1-x-container.shp-pickup-receiver +\n .vtex-omnishipping-1-x-shippingSectionTitle +\n #back-to-address-list +\n .vtex-omnishipping-1-x-addressFormPart1 p.input.ship-postalCode,\n .vtex-omnishipping-1-x-container.shp-pickup-receiver +\n .vtex-omnishipping-1-x-shippingSectionTitle +\n .vtex-omnishipping-1-x-addressFormPart1 p.input.ship-postalCode {\n display:block;\n }\n\n .orderform-template-holder {\n .step.shipping-data .box-step {\n .vtex-omnishipping-1-x-addressFormPart1 {order: 1;}\n }\n }\n\n .pac-logo[style*=\"none\"] {\n border:0;\n }\n .pac-logo[style*=\"none\"]:after {\n display: none;\n }\n\n #shipping-data .accordion-inner + .vcustom--vtex-omnishipping-1-x-address {\n display: none;\n }\n\n div#shipping-data {\n display: flex;\n flex-wrap: wrap;\n > * {\n width:100%;\n }\n\n .step.accordion-group.shipping-data {order: 1;}\n .vcustom--vtex-omnishipping-1-x-address {order: 3;}\n }\n\n\n\n}\n\n.js-v-custom-is-loading {\n\n .accordion-inner.shipping-container,\n .vcustom--vtex-omnishipping-1-x-address {\n overflow: hidden;\n }\n\n .vcustom--vtex-omnishipping-1-x-address {\n height: 120px;\n position:relative;\n\n &:before {\n content:\"\";\n display:block;\n position:absolute;\n left:0;\n top:0;\n width:100%;\n height:100%;\n z-index:2;\n @extend %loading-shimmer;\n }\n }\n\n .accordion-inner.shipping-container > *,\n .vcustom--vtex-omnishipping-1-x-address > * {\n opacity:0.5\n }\n\n}\n\n.vcustom--vtex-omnishipping-1-x-address {\n transition:all ease 0.3s;\n\n p.input {\n float: none;\n width: 100%;\n margin: 0;\n }\n\n label {\n @extend %label;\n }\n\n span.help.error {display: none;}\n\n input {\n @extend %input-style;\n max-width: initial;\n width: 100%;\n\n\n }\n\n input.error + span.help.error,\n select.error + span.help.error {display: block;}\n\n &__state {\n display: flex;\n margin: 0 -5px;\n p.input {\n margin:0 5px;\n }\n @media (max-width:768px) {\n flex-wrap:wrap;\n margin: 0;\n p.input.ship-state {margin:0;}\n }\n }\n\n}\n\n//google address form\n\n.pac-container.pac-logo {border: 1px solid $muted4; border-radius: $borderRadius;}\n\n.pac-logo:after {\n background: #fbfbfb url(https://developers.google.com/maps/documentation/images/powered_by_google_on_white.png) no-repeat 10px center;\n padding: 14px;\n background-size: 110px;\n}\n\n\n.address-list.vtex-omnishipping-1-x-addressList + p.input.ship-addressQuery.text {display:none;}\n\n.alert-noStreet {\n margin: 30px auto 0 auto;\n text-align: center;\n}\n\n.vtex-omnishipping-1-x-addressSummaryActive .address-summary.address-summary-MLT .postalCode:before {\n content:\" - \";\n}\n```" } ]
code_checkout-ui-custom_b9f92456
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_steps.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n//steps\n \n $numberStepSize:26px;\n\n\n %countingStepsNormal {\n background: #FFF;\n border:1px solid $muted1;\n color:$muted1;\n\n width:$numberStepSize;\n height: $numberStepSize;\n line-height: $numberStepSize;\n font-size: 15px;\n\n }\n\n %countingStepsActive {\n background:$actionPrimary;\n border-color:$actionPrimary;\n color:#FFF\n }\n\n %countingStepsFilled {\n @extend %countingStepsActive;\n }\n\n\n\n //keep attention changing anything below\n \n @if $countingSteps {\n .client-pre-email h3.client-pre-email-h span:before,\n .client-profile-data .accordion-toggle > span:before,\n .shipping-data .accordion-toggle:before,\n .payment-data .accordion-toggle > span:not(.payment-edit-link):before {\n \n @extend %countingStepsNormal;\n \n text-align: center;\n margin-right:10px;\n border-radius: 100%;\n \n display: inline-block;\n \n font-weight:bold;\n vertical-align: middle;\n margin-top: -2px;\n }\n\n .client-pre-email h3.client-pre-email-h span:before { content: \"1\" }\n .client-profile-data .accordion-toggle > span:before { content: \"2\" }\n .shipping-data .accordion-toggle:before { content: \"3\" }\n .payment-data .accordion-toggle > span:not(.payment-edit-link):before { content: \"4\" }\n }\n\n\n //mobile\n @media(max-width: $mobileWidth) {\n body {\n &:before {\n width: 0;\n height: 4px; \n background:$actionPrimary; \n display: block;\n content:\"\";\n position: fixed;\n top: 0;\n transition: all ease 0.3s;\n z-index: 999;\n } \n &.v-custom-step-email:before {width: 23%;}\n &.v-custom-step-profile:before {width: 46%;}\n &.v-custom-step-shipping:before {width: 69%;}\n &.v-custom-step-payment:before {width: 92%;}\n }\n\n }\n\n\n %checkout-steps-active {\n color:$muted1;\n font-weight: bold;\n pointer-events: initial;\n }\n\n body {\n &.v-custom-step-cart .checkout-steps_item_cart {\n opacity: 1;\n .text {@extend %checkout-steps-active;pointer-events: none;}\n &:before {background: $actionPrimary;border-color: $actionPrimary;}\n }\n &.v-custom-step-email,\n &.v-custom-step-profile{\n\n .checkout-steps_bar_inner-active {width: 20%;}\n .checkout-steps_item_cart,\n .checkout-steps_item_identification {\n opacity: 1;\n .text {@extend %checkout-steps-active;}\n &:before {background: $actionPrimary;border-color: $actionPrimary;}\n }\n .checkout-steps_item_identification .text {pointer-events: none;}\n\n .client-pre-email h3.client-pre-email-h span:before {\n @extend %countingStepsActive;\n }\n } \n\n &.v-custom-step-shipping {\n .checkout-steps_bar_inner-active {width: 40%;}\n .checkout-steps_item_cart,\n .checkout-steps_item_identification,\n .checkout-steps_item_shipping {\n opacity: 1;\n .text {@extend %checkout-steps-active;}\n &:before {background: $actionPrimary;border-color: $actionPrimary;}\n }\n .checkout-steps_item_shipping .text {pointer-events: none;}\n } \n\n &.v-custom-step-payment {\n .checkout-steps_bar_inner-active {width: 60%;}\n .checkout-steps_item_cart,\n .checkout-steps_item_identification,\n .checkout-steps_item_shipping,\n .checkout-steps_item_payment {\n opacity: 1;\n .text {@extend %checkout-steps-active;}\n &:before {background: $actionPrimary;border-color: $actionPrimary;}\n }\n .checkout-steps_item_payment .text {pointer-events: none;}\n } \n\n &.v-custom-step-profile {\n .client-pre-email h3.client-pre-email-h span:before {\n @extend %countingStepsFilled;\n }\n\n .client-profile-data .accordion-toggle > span:before {@extend %countingStepsActive;}\n }\n &.v-custom-step-shipping {\n\n .client-pre-email h3.client-pre-email-h span:before,\n .client-profile-data .accordion-toggle > span:before {\n @extend %countingStepsFilled;\n }\n\n .shipping-data .accordion-toggle:before {@extend %countingStepsActive;}\n }\n &.v-custom-step-payment {\n\n .client-pre-email h3.client-pre-email-h span:before,\n .client-profile-data .accordion-toggle > span:before,\n .shipping-data .accordion-toggle:before {\n @extend %countingStepsFilled;\n }\n\n .payment-data .accordion-toggle > span:not(.payment-edit-link):before {@extend %countingStepsActive;}\n }\n }\n .checkout-steps {\n display: none;\n position: relative;\n min-width: 470px;\n width:100%;\n @if $showCheckoutSteps {\n display: block;\n }\n @media(max-width: $mobileWidth) {\n display: none !important;\n }\n\n &-wrap {\n\n }\n\n /*\n &_bar_inner,\n &_bar_inner-active {\n width: calc(100% - 20%);\n height: 3px;\n background: $actionSecondary;\n display: block;\n margin: 0 auto;\n position: absolute;\n left: 10%;\n top: 7px;\n transition: all ease 0.3s;\n }\n */\n\n &_bar_inner-active {width:0;background: $actionPrimary;}\n\n &_items {\n display:flex;\n justify-content: space-between; \n }\n\n &_item {\n position:relative;\n text-align: center;\n flex-grow: 1;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n opacity:0.6;\n \n &:after {\n content:\"\";\n height:2px;\n background: $actionPrimary;\n margin: 0px 5px;\n min-width: 10px;\n \n }\n \n .text {\n clear: both;\n display: flex;\n align-items: center;\n color:$muted3;\n font-weight: 500;\n cursor:pointer;\n pointer-events: none;\n\n &:before {\n content: \"\";\n width: 7px;\n height: 7px;\n background: $actionPrimary;\n border: 2px solid $actionPrimary;\n display: inline-block;\n border-radius:100%;\n margin-right: 7px;\n transition: all ease 0.3s;\n } \n }\n\n &_cart:after {width: calc(100% - 50px);}\n &_identification:after {width: calc(100% - 103px);}\n &_shipping:after {width: calc(100% - 77px);}\n &_payment:after {width: calc(100% - 77px);}\n &_confirmation:after {display:none;}\n } \n }\n\n\n\n\n//end steps\n```" } ]
code_checkout-ui-custom_1bd7ea87
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_titles.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n//titles in third step checkout\n\n%steps-title {\n\tfont-size: calc( #{$fontSize} + 2px);\n text-transform: uppercase;\n border-bottom: 1px solid $muted5;\n font-weight: bold;\n margin-bottom: 15px;\n padding:7px 0 !important;\n color:$muted3;\n\n @if $countingSteps {\n \tcolor: $muted1;\n\t border: none;\n\t font-size: 20px;\n\t text-transform: initial;\n\t margin-bottom: 0px;\n }\n \n}\n\n```" } ]
code_checkout-ui-custom_c17a906d
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_buttons.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n// _buttons.scss\n\n\n.btn {\n\tfont-family:$fontFamily;\n\ttext-shadow: none;\n\tborder-radius:$btnBorderRadius;\n\toutline: none !important;\n\ttext-align: center;\n\tfont-size: $fontSize;\n\tpadding: 5px 12px;\n\tbox-sizing: border-box;\n\tdisplay: inline-block;\n\n\t&,\n\t&:hover,\n\t&:focus {\n\t\ttransition: all ease 0.3s;\n\t}\n\n\t@if $buttonShadow {\n\n\t} @else {\n\t\tbackground: none;\n\t\tbox-shadow: none;\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground:none;\n\t\t}\n\t}\n\n\t&-large {\n\t\tpadding:17px 19px;\n\t}\n\n\t&-link {\n\t\tcolor:$actionPrimary;\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tcolor:$actionPrimaryDarken;\n\t\t}\n\t}\n\n\t&-success {\n\t\tbackground: $success;\n\t\tborder:1px solid $success;\n\t\tfont-size:13px;\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground:$successDarken; \n\t\t\tborder:1px solid $successDarken; \n\t\t}\n\n\t\t&[disabled] {\n\t\t\tbackground: $success;\n\t\t}\n\t}\n\n\t&-primary {\n\t\tbackground: $actionPrimary;\n\t\tborder:1px solid $actionPrimary;\n\t\tcolor:$actionSecondary;\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground:$actionPrimaryDarken;\n\t\t\tborder:1px solid $actionPrimaryDarken; \n\t\t}\n\t} \n\n\t&-secondary {\n\t\tbackground: transparent;\n\t\tborder:1px solid $actionPrimary;\n\t\tcolor:$actionPrimary;\n\t\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground:$actionSecondary;\n\t\t\tborder:1px solid $actionPrimaryDarken;\n\t\t\tcolor:$actionPrimaryDarken;\n\t\t}\n\t}\n\n\t&-outlined {\n\t\tbackground: transparent;\n\t\tborder:1px solid $success;\n\t\tcolor:$success;\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground:transparent; \n\t\t\tborder:1px solid $successDarken; \n\t\t}\n\t}\n\n\t&#payment-data-submit {\n\t\tspan {\n\t\t\tfont-size: 14px;\n\t\t\tmargin-left: 5px;\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n}\n```" } ]
code_checkout-ui-custom_2a2b590b
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_vtexId.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n#vtexIdContainer {\n position: fixed !important;\n}\n\n.vtexIdUI {\n position: absolute;\n top: 50% !important;\n transform: translateY(-50%) !important;\n\n}\n\n\n#vtexIdContainer {\n position: fixed;\n a {color:$actionPrimary;}\n\n input {@extend %input-style;}\n\n .vtexIdUI {\n .modal-footer {\n background: none;\n }\n .btn {\n border-radius:$btnBorderRadius;\n height: $inputHeight;\n line-height: $inputHeight;\n box-shadow: none !important;\n font-size: $fontSize;\n padding:0 30px;\n &.btn-success {\n background: $success;\n border:1px solid $success;\n\n &:hover,\n &:focus,\n &:active {\n background:$successDarken; \n border:1px solid $successDarken; \n }\n }\n\n &#vtexIdUI-facebook {\n background: #4568ad !important;\n }\n }\n\n \n }\n @media (max-width:768px) {\n position: fixed !important;\n .vtexIdUI {\n overflow: auto;\n border-radius: 0;\n width: 100%;\n left: 0;\n margin: 0;\n top: 0;\n height: 100% !important;\n border: none;\n .modal-header .close {\n top: 0;\n right: 0;\n margin: 0;\n padding: 4px 8px;\n }\n }\n }\n}\n\n```" } ]
code_checkout-ui-custom_85e602df
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_debug.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\nbody.debug-on > *:not(.container-main, .main-header, .main-footer, #vtexIdContainer,.vtex-front-messages-placeholder, .pac-container) {\n display:none;\n}\n```" } ]
code_checkout-ui-custom_0b3791c0
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_input.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\ninput, select, button {\n\toutline: none !important;\n}\n//input\n\n%input-style {\n\theight: $inputHeight;\n\tline-height:$inputHeight;\n\tmax-height:initial;\n\tdisplay:inline-block;\n\tpadding:0px 10px ;\n\tborder-radius:$borderRadius;\n border:1px solid $muted4;\n\toutline: initial;\n\tfont-family:$fontFamily;\n\t\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n\t\n\t&.error {\n\t\tborder-color:$danger;\n\t}\n\n\t&:focus {\n\t\tbox-shadow:inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(0,0,0,0.4);\n\t}\n}\n\n\ninput#creditCardpayment-card-0Number,\ninput#creditCardpayment-card-0Code,\ninput#creditCardpayment-card-1Number,\ninput#creditCardpayment-card-1Code{\n\tfont-size:18px;\n}\n\n//remove autofill from chrome\n\ninput:-webkit-autofill,\ninput:-webkit-autofill:hover,\ninput:-webkit-autofill:focus,\ninput:-webkit-autofill:active {\n animation: input_background_autofill 0s forwards;\n}\n@keyframes input_background_autofill {\n 100% { background-color: transparent }\n}\n```" } ]
code_checkout-ui-custom_f6d1567d
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_hide-email-step.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n\n\nbody.js-vcustom-hideEmailStep {\n .orderform-template-holder #client-profile-data form.client-pre-email.client-pre-email {\n display:none !important;\n }\n\n .client-profile-data .accordion-toggle>span:before {\n content:\"1\"; \n }\n\n .shipping-data .accordion-toggle:before {\n content:\"2\"; \n }\n\n .payment-data .accordion-toggle>span:not(.payment-edit-link):before {\n content:\"3\";\n }\n\n .client-profile-data .accordion-toggle > span:before {@extend %countingStepsActive;}\n\n .client-pre-email+.client-profile-data .accordion-body .accordion-inner {\n display: block;\n }\n}\n\n\n```" } ]
code_checkout-ui-custom_cbf34e5d
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_modals.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n.default-modal {\n border-radius:$borderRadius;\n height:auto;\n}\n\n.modal {\n .btn {\n background: #FFF;\n }\n}\n\n.modal.guest-login-modal {}\n .modal.guest-login-modal button.btn {width:auto;}\n\n.modal.guest-login-modal,\n.modal.modal-email-template ,\n.modal.modal-payment-template,\n.modal.modal-masked-info-template {\n background:$success;\n}\n\n.payment-confirmation-message {\n width:100%;\n}\n```" } ]
code_checkout-ui-custom_98f52cf2
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_footer.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n.main-footer {\n\tclear: both;\n\ttext-align: center;\n\tpadding: 2px 0;\n\tborder-top:1px solid $muted4;\n\n\tposition: absolute;\n\tbottom: 0;\n\twidth: 100%;\n\tz-index:-1;\n\n\t.container {position: initial;}\n\n\t@media(max-width: 768px) {\n\t\tposition:relative;\n\t}\n\n\ta.credits-vtex {\n width: 100px;\n display: block;\n margin: 0 auto;\n\t}\t\n\t.vtex-logo {\n\t\tdisplay: block;\n margin: 0 auto;\n\t}\n\n\tsvg, svg path {\n\t\tfill:$muted3;\n\t}\n}\n```" } ]
code_checkout-ui-custom_b11db3ba
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_fns.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n@function str-replace($string, $search, $replace: '') {\n $index: str-index($string, $search);\n \n @if $index {\n @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);\n }\n \n @return $string;\n}\n```" } ]
code_checkout-ui-custom_c7c9f293
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_pre-email.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n// pre email step\n\n\n.client-pre-email {\n background: none;\n width: 100%;\n border-top:none;\n position:relative;\n text-align: left;\n\n fieldset.pre-email {\n box-sizing: border-box;\n\n }\n\n label {\n margin: 0;\n line-height: 20px;\n\n small {\n font-size: $fontSize;\n padding: 0;\n margin: 0;\n color: $muted1;\n font-weight: 400;\n margin: 0;\n vertical-align: top;\n display: block;\n margin-bottom: 13px;\n\n margin-top: 20px;\n \n }\n }\n \n .link-cart {display: none;} \n\n h3.client-pre-email-h {\n margin: 0;\n span {\n \n display: block;\n position:relative;\n\n font-size: 0;\n\n &:after {\n content: \"Email\";\n @extend %steps-title;\n vertical-align: middle;\n display: inline-block;\n margin: 0; \n }\n\n @if $countingSteps {\n padding:7px 0 !important;\n &:after{padding: 0 !important;}\n } @else {\n &:after{width: 100%;}\n }\n }\n\n .link-box-edit {display: none;}\n }\n\n\n\n a#orderform-to-cart {\n color:$actionPrimary;\n }\n\n .client-email.input.text {\n margin: 0;\n width: 100%;\n position:initial;\n\n input[type=\"email\"] {\n width: 100%;\n box-sizing: border-box;\n }\n .btn-success {\n width: 20%;\n margin: 0;\n height: initial;\n position: absolute;\n top: initial;\n bottom:15px;\n right: initial;\n left: 50%;\n transform: translateX(-50%);\n min-width: 55%;\n\n @extend .btn-large;\n\n @media(max-width: 768px) {\n width: calc(100% - 60px);\n }\n }\n\n .loading-inline {\n position: absolute;\n color: #FFF;\n font-size: 16px;\n bottom: 35px;\n top: initial;\n right: 50% !important;\n margin-right: -10px;\n }\n\n .loading-inline[style=\"\"] + #btn-client-pre-email {\n font-size:0;\n }\n }\n\n span.help.error {\n }\n\n\n \n .emailInfo {\n margin-top:20px;\n width: 80%;\n box-sizing:border-box;\n .icon-ok, \n h3 {\n color:$actionPrimary;\n }\n\n @media(max-width: $mobileWidth) {\n width: 100%;\n }\n\n .icon-lock {\n color: $muted5;\n }\n }\n\n\n @media(max-width: $mobileWidth) {\n .link-cart { display: none !important;}\n }\n\n & + .client-profile-data { \n .accordion-body:before {\n content:\"Waiting for more information\";\n display:block;\n }\n .accordion-body .accordion-inner {display:none;}\n\n &.filled {\n .accordion-body:before {\n display: none;\n }\n }\n }\n\n &[style*=\"display: none\"] {\n padding-bottom:20px !important;\n\n .link-box-edit {display: block !important;}\n label {\n small {display: none !important;}\n }\n\n input#client-pre-email {\n padding: 0 !important;\n border: none !important;\n box-shadow: none !important;\n font-size: 12px;\n font-weight: 400;\n pointer-events: none;\n cursor: text;\n background: none !important;\n color:$muted2;\n }\n\n .emailInfo,\n #btn-client-pre-email {\n display:none;\n }\n\n & + .client-profile-data {\n .accordion-body:before {\n display: none;\n }\n .accordion-inner {display:block;}\n }\n }\n}\n\n\n\nbody:not(.v-custom-step-email) .client-pre-email span.help.error {\n display: none !important;\n}\n```" } ]
code_checkout-ui-custom_cde8a34c
[ { "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 checkout-ui-custom/checkout-ui-custom/src/_scss/_components/_RTL.scss from the checkout-ui-custom VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```scss\n.RTL-checkout {\n\n select {\n direction: rtl;\n }\n\n\t.cart-template-holder {\n\t\t\torder: 2;\n\t}\n\n\tbody .main-header .header-link {\n\t\t\tleft: initial;\n\t\t\tright: 0;\n\t}\n\n\tbody .main-header .checkout-steps {\n\t\t\tmargin-left: initial;\n\t\t\tmargin-right: auto;\n\t}\n\n\t.main-header .logo {\n\t\t\torder: 2;\n\t}\n\n\t.summary-template-holder tr {\n\t\t.info {\n\t\t\torder:2;\n\t\t\ttext-align: right !important;\n\t\t}\n\t}\n\n\t.orderform-template-holder #client-profile-data form.client-pre-email .link-box-edit, \n\t.orderform-template-holder #client-profile-data .step.client-profile-data .link-box-edit, \n\t.orderform-template-holder #shipping-data .link-box-edit, \n\t.orderform-template-holder #payment-data .link-box-edit {\n right: initial;\n left: 0;\n\t}\n\n\t.summary-template-holder tbody td.monetary,\n\t.summary-template-holder tfoot tr td.monetary {\n\t\t\tmargin-right: auto;\n\t\t\tmargin-left: initial !important;\n\t\t\ttext-align: left !important;\n\t}\n\n\n\t.summary-template-holder {\n\t\t.summary-coupon p.coupon-fields span {\n\t\t\tflex-direction: row-reverse;\n\t\t\tinput {\n\t\t\t\tmargin: 0 0 0 10px;\n\t\t\t}\n\t\t}\t\n\t}\n\n\n\t.table.cart-items tbody tr .v-custom-product-item-wrap,\n\t.table.cart-items tbody tr,\n\t.table.cart-items thead tr,\n\t.table.cart-items thead tr th.product{\n\t\t\tflex-direction: row-reverse;\n\t\t\ttext-align:right;\n\t}\n\n\t.table.cart-items tbody tr td.product-name {\n\t\t\ttext-align: right;\n\t}\n\n\t.orderform-template .orderform-template-holder {\n\t\t\torder: 2;\n\t\t\tpadding: 0 0 0 20px;\n\t}\n\n\t.orderform-template .cart-template.mini-cart .summary-totalizers tfoot tr td.monetary {\n\t\t\ttext-align: left !important;\n\t}\n\n\tbr {\n\t\twidth: 100%;\n\t\theight: 1px;\n\t\tcontent: \" \" !important;\n\t\tdisplay: block !important;\n\t\tclear:both;\n\t}\n\n .table.cart-items td.quantity {\n direction: rtl;\n }\n\n .checkout-steps_items {\n direction: rtl;\n .text:before {\n margin: 0 0 0 7px;\n }\n }\n\n .srp-toggle__wrapper {\n direction: rtl;\n .vtex-shipping-preview-0-x-framePickup {\n left: 0;\n }\n .vtex-shipping-preview-0-x-frameDelivery {\n left: 50%;\n }\n }\n\n .srp-delivery-header.mb3 {\n direction: rtl;\n display: flex;\n }\n\n .srp-delivery-current-many .flex {direction: rtl;text-align: right;}\n\n\n\t//profile \n\n\t.step {\n\t\tdirection: rtl;\n\t}\n\n\t.step .accordion-toggle > span:before,\n\t.step .accordion-toggle:before {\n\t\tmargin-right: 0 !important; \n\t\tmargin-left: 10px !important;\n\t}\n\n\tfieldset.box-client-info-pf {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.orderform-template-holder .step .form-step fieldset p, .orderform-template-holder .step .form-step fieldset div {\n\t\twidth: 100%;\n\t}\n\n\tp.client-first-name, p.client-different-document, p.client-document, p.client-company-ie, p.client-company-postal-code, p.client-document-type, p.payment-card-due-date {\n\t\tmargin-left: 10px;\n\t\tmargin-right: 0;\n\t}\n\n\tp.client-document, p.client-phone, p.client-company-document, p.client-company-ie, p.client-company-postal-code, p.client-company-phone, p.payment-card-due-month, p.payment-card-lash, p.payment-card-due-year {\n\t\tfloat: right;\n\t}\n\n\tinput.success:not([invalid=\"true\"]) {\n\t\tbackground-position: left top;\n\t}\n\n\t.vtexIdUI .vtexIdUI-page {\n direction: rtl;\n\t}\n\n\t.vtexIdUI .modal-header .close {\n\t\t\tleft: -1px;\n\t\t\tright: initial;\n\t}\n\n\n\t.vtexIdUI .pull-left {\n\t\t\tfloat: right;\n\t}\n\n\t.orderform-template-holder .step .box-info p {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\twidth: 100%;\n\t}\n\n\t\n\n\t//shipping\n\n\t.vtex-omnishipping-1-x-leanShippingIcon.shp-option-icon,\n\t.vtex-omnishipping-1-x-addressItemIcon {\n\t\t\tmargin: 0 0 0 10px;\n\t}\n\n\t.vtex-omnishipping-1-x-leanShippingText {\n\t\t\tpadding-right: 10px;\n\t}\n\n\t.address-summary {\n\t\t/* direction: unset; */\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t}\n\n\tbr.line1-delimiter {\n\t\t\twidth: 100%;\n\t\t\theight: 1px;\n\t\t\tcontent: \" \" !important;\n\t\t\tdisplay: block !important;\n\t\t\tclear:both;\n\t}\n\n\t//payment\n\n\t.orderform-template-holder #payment-data .v-custom-payment-item-wrap .payment-group-item#payment-group-AffirmPaymentGroup:after,\n\t.orderform-template-holder #payment-data .v-custom-payment-item-wrap .payment-group-item#payment-group-payPalPaymentGroup:after {\n\t\t\tright: initial;\n\t\t\tleft: 10px;\n\t}\n\n\n\t.orderform-template-holder #payment-data .v-custom-payment-item-wrap .payment-group-item-text {margin-left: auto;margin-right: inherit;}\n\n\t.orderform-template-holder #payment-data .v-custom-payment-item-wrap .payment-group-item-text:before {\n\t\t\tmargin-right: initial;\n\t\t\tmargin-left: 10px;\n\t}\n\n\t.orderform-template-holder #payment-data p.link.link-gift-card a {\n text-align: right;\n\t}\n\n\t//summary\n\n\n\t.orderform-template .custom-cart-template-wrap .summary-cart-template-holder {\n direction: rtl;\n\t}\n\n\t.pull-right {\n\t\t\tfloat: left !important;\n\t}\n\n\t.orderform-template .cart-template.mini-cart .item .price {\n\t\t\tmargin-right:auto;\n\t\t\tdirection: initial;\n\t}\n\n\t.orderform-template .cart-template.mini-cart .item .url {\n\t\t\tfloat: right;\n\t\t\tmargin: 0 0 0 6px;\n\t}\n\n\t.orderform-template .cart-template.mini-cart .item .fn {\n\t\t\ttext-align: right;\n\t\t\tfloat: right;\n\t}\n\n\t.orderform-template .cart-template.mini-cart h2 {\n\t\t\ttext-align: right;\n\t}\n\n\t.orderform-template .cart-template.mini-cart #go-to-cart-button {\n\t\t\tleft: 7px;\n\t\t\tright: initial;\n\t}\n\n\t.vtex-omnishipping-1-x-SummaryItemInfo {\n\t\t\tborder: none;\n\t\t\tborder-left: 1px solid #eee;\n\t\t\tpadding: 0 0 0 6px;\n\t}\n\n\t// login modal\n\n\t.vtexIdUI {\n\t\t.vtexIdUI-page {\n\t\t\tdirection: rtl;\n\t\t}\n\t\n\t\t.modal-header .close {\n\t\t\t\tleft: -1px;\n\t\t\t\tright: initial;\n\t\t}\n\t\t.pull-left {\n\t\t\t\tfloat: right;\n\t\t}\n\t}\n\n\t//payment\n\n\t#app-container {\n direction: rtl;\n\n\n\t\t.PaymentCardDueDate.clearfix {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\tlabel.FormFieldLabel {\n\t\t\t\tmargin: 0 0 0 10px;\n\t\t}\n\n\t\t.PaymentCardCVV {\n\t\t\t\tdisplay: flex;\n\t\t}\n\n\t\tp.AddressToggle {\n\t\t\t\tdisplay: flex;\n\t\t}\n\n\t\t.AddressToggle input {\n\t\t\t\tmargin: 3px 0 0 5px;\n\t\t}\n\t}\n\n \n\n\t@media (max-width: 998px) {\n &.body-cart-vertical {\n .summary-template-holder {\n order: 2;\n }\n } \n\t}\n\n @media (max-width: 768px) {\n .orderform-template .cart-template.mini-cart {\n order: 2;\n }\n }\n\n @media (max-width: 690px) {\n\n .table.cart-items td.product-image a {\n margin-right: 0;\n margin-left: 20px;\n }\n .full-cart .cart table tbody tr td.product-image, \n .full-cart .cart table tbody tr td.bundle-item-image {\n left:initial;\n right:0;\n }\n\n .table.cart-items td.product-name, \n .table.cart-items td.quantity {\n margin-left:0 !important;\n margin-right:90px !important;\n }\n\n .table.cart-items td.quantity {\n float: right;\n }\n\n .full-cart .cart table tbody tr td.product-name a, \n .full-cart .cart table tbody tr td.bundle-item-name span {\n padding: 0 0 0 20px;\n }\n\n .full-cart .cart table tbody tr td.product-price {\n float: left;\n }\n\n .full-cart .cart table tbody tr td.item-remove {\n left: 0;\n right: initial;\n }\n }\n}\n```" } ]