id
stringlengths
12
53
messages
listlengths
3
3
code_instore-profile_8730d8f0
[ { "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 instore-profile/react/modules/genders.js from the instore-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nexport default [\n 'agender',\n 'androgyne',\n 'bigender',\n 'genderfluid',\n 'nonconforming',\n 'questioning',\n 'variant',\n 'genderqueer',\n 'neutrois',\n 'pangender',\n 'transgender',\n 'transsexual',\n 'other',\n]\n\n```" } ]
code_instore-profile_57ddfce6
[ { "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 instore-profile/react/inputs/StyleguideInput/index.js from the instore-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { intlShape, injectIntl } from 'react-intl'\nimport Input from '@vtex/styleguide/lib/Input'\nimport RuleFieldShape from '../../RuleFieldShape'\nimport ProfileFieldShape from '../../ProfileFieldShape'\nimport GenderInput from './GenderInput'\n\nconst StyleguideInput = props => {\n const {\n field,\n data,\n options,\n inputRef,\n onChange,\n onBlur,\n intl,\n } = props\n\n if (field.name === 'gender') {\n return (\n <GenderInput\n {...props}\n shouldShowExtendedGenders={options.shouldShowExtendedGenders}\n />\n )\n }\n\n return (\n <div\n className={`vtex-profile-form__field-wrapper vtex-profile-form__${field.name} ${\n field.hidden ? 'dn' : ''\n } pb7`}\n >\n <Input\n name={field.name}\n label={intl.formatMessage({\n id: `profile-form.field.${field.label}`,\n })}\n value={data.value || ''}\n errorMessage={\n data.error &&\n intl.formatMessage({\n id: `profile-form.error.${data.error}`,\n })\n }\n placeholder={\n !field.required\n ? intl.formatMessage({ id: 'profile-form.optional' })\n : null\n }\n onChange={onChange}\n onBlur={onBlur}\n ref={inputRef}\n maxLength={field.maxLength}\n disabled={field.disabled}\n />\n </div>\n )\n}\n\nStyleguideInput.propTypes = {\n /** Rules for the field this input represents */\n field: RuleFieldShape.isRequired,\n /** Data this input will display */\n data: ProfileFieldShape.isRequired,\n /** Additional options to modify this input */\n options: PropTypes.object,\n /** Ref function to control this input from outside */\n inputRef: PropTypes.func,\n /** Function to be called when input changes */\n onChange: PropTypes.func.isRequired,\n /** Function to be called when input blurs */\n onBlur: PropTypes.func.isRequired,\n /** React-intl utility */\n intl: intlShape.isRequired,\n}\n\nexport default injectIntl(StyleguideInput)\n\n```" } ]
code_instore-profile_d47a62ba
[ { "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 instore-profile/react/inputs/StyleguideInput/AutocompleteMenu.js from the instore-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nclass AutocompleteMenu extends Component {\n render() {\n const { items, highlightedIndex, getMenuProps, getItemProps } = this.props\n\n if (!items.length) return null\n\n const listHeight = items.length > 4 ? 'h5' : ''\n\n return (\n <div\n {...getMenuProps({\n className: `br2 br--bottom bb br bl b--gray bw1 outline-0 overflow-y-scroll ${\n listHeight\n } absolute w-100 z-1 bg-white vtex-profile-form__autocomplete-menu`,\n })}\n >\n {items.map((item, index) => (\n <div\n {...getItemProps({\n key: item.value,\n index,\n item,\n className: `vtex-profile-form__autocomplete-menu__content f6 ph5 pv5 dark-gray ${\n highlightedIndex === index ? 'bg-light-silver' : 'bg-white'\n }`,\n })}\n >\n {item.label}\n </div>\n ))}\n </div>\n )\n }\n}\n\nAutocompleteMenu.propTypes = {\n /** The items this menu contains */\n items: PropTypes.array,\n /** The index of the item currently highlighted */\n highlightedIndex: PropTypes.number,\n /** Function that returns some acessibility props for the menu */\n getMenuProps: PropTypes.func,\n /** Function that returns some acessibility props for the items */\n getItemProps: PropTypes.func,\n}\n\nexport default AutocompleteMenu\n\n```" } ]
code_instore-profile_22fa3e5c
[ { "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 instore-profile/react/inputs/StyleguideInput/GenderInput.js from the instore-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport { intlShape, injectIntl } from 'react-intl'\nimport Dropdown from '@vtex/styleguide/lib/Dropdown'\nimport AutocompleteInput from './AutocompleteInput'\nimport RuleFieldShape from '../../RuleFieldShape'\nimport ProfileFieldShape from '../../ProfileFieldShape'\nimport genders from '../../modules/genders'\n\nclass GenderInput extends Component {\n constructor(props) {\n super(props)\n this.state = {\n showExtendedGenders: false,\n }\n }\n\n componentDidMount() {\n const { data } = this.props\n\n if (!data.value) return\n\n this.setState({\n showExtendedGenders: data.value !== 'male' && data.value !== 'female',\n })\n }\n\n handleChange = e => {\n const { value } = e.target\n\n this.setState({\n showExtendedGenders: value !== 'male' && value !== 'female',\n })\n\n this.props.onChange(e)\n }\n\n getDropdownValue = () => {\n const { data } = this.props\n if (!data.value) return ''\n\n return data.value === 'male' || data.value === 'female'\n ? data.value\n : 'custom'\n }\n\n getAutocompleteValue = () => {\n const { data } = this.props\n return data.value === 'custom' ? '' : data.value\n }\n\n render() {\n const {\n field,\n inputRef,\n onBlur,\n intl,\n shouldShowExtendedGenders,\n } = this.props\n const { showExtendedGenders } = this.state\n\n const baseGenders = ['male', 'female', 'custom']\n .map(gender => ({\n value: gender,\n label: intl.formatMessage({ id: 'profile-form.gender.' + gender }),\n }))\n .slice(0, shouldShowExtendedGenders ? 3 : 2)\n\n const extendedGenders = genders.map(gender => ({\n value: gender,\n label: intl.formatMessage({ id: 'profile-form.gender.' + gender }),\n }))\n\n return (\n <div\n className={`vtex-profile-form__field-wrapper vtex-profile-form__gender ${field.hidden ? 'dn' : ''} pb7`}\n >\n <Dropdown\n name=\"gender\"\n label={intl.formatMessage({\n id: `profile-form.field.gender`,\n })}\n value={this.getDropdownValue()}\n placeholder={\n !field.required\n ? intl.formatMessage({ id: 'profile-form.optional' })\n : null\n }\n onChange={this.handleChange}\n onBlur={onBlur}\n options={baseGenders}\n disabled={field.disabled}\n />\n {showExtendedGenders && (\n <div className=\"vtex-profile-form__custom-gender bg-light-silver pa5 mt4 br2\">\n <AutocompleteInput\n name=\"custom-gender\"\n label={intl.formatMessage({\n id: `profile-form.field.custom-gender`,\n })}\n value={this.getAutocompleteValue()}\n ref={inputRef}\n items={extendedGenders}\n onChange={this.handleChange}\n />\n </div>\n )}\n </div>\n )\n }\n}\n\nGenderInput.propTypes = {\n /** Rules for the field this input represents */\n field: RuleFieldShape.isRequired,\n /** Data this input will display */\n data: ProfileFieldShape.isRequired,\n /** Ref function to control this input from outside */\n inputRef: PropTypes.func,\n /** Function to be called when input changes */\n onChange: PropTypes.func.isRequired,\n /** Function to be called when input blurs */\n onBlur: PropTypes.func.isRequired,\n /** Whether to show the full list of genders or just M/F */\n shouldShowExtendedGenders: PropTypes.bool.isRequired,\n /** React-intl utility */\n intl: intlShape.isRequired,\n}\n\nexport default injectIntl(GenderInput)\n\n```" } ]
code_instore-profile_6ff5936f
[ { "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 instore-profile/react/inputs/StyleguideInput/AutocompleteInput.js from the instore-profile VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport Downshift from 'downshift'\nimport matchSorter from 'match-sorter'\nimport Input from '@vtex/styleguide/lib/Input'\nimport CaretDown from '@vtex/styleguide/lib/icon/CaretDown'\nimport AutocompleteMenu from './AutocompleteMenu'\n\nclass AutocompleteInput extends Component {\n handleChange = ({ value }) => {\n this.props.onChange({ target: { value } })\n }\n\n render() {\n const { name, label, items, value, placeholder, forwardedRef } = this.props\n\n return (\n <Downshift\n onChange={this.handleChange}\n itemToString={item => (item ? item.label : '')}\n defaultInputValue={value}\n >\n {({\n getInputProps,\n getItemProps,\n getMenuProps,\n getToggleButtonProps,\n isOpen,\n inputValue,\n highlightedIndex,\n }) => (\n <div className=\"vtex-profile-form__autocomplete-input-wrapper relative\">\n <Input\n {...getInputProps({\n name,\n label,\n placeholder,\n ref: forwardedRef,\n suffixIcon: (\n <button\n {...getToggleButtonProps({\n className: 'blue b--none bg-transparent pointer',\n })}\n >\n <CaretDown color=\"currentColor\" size={10} />\n </button>\n ),\n })}\n />\n {isOpen && (\n <AutocompleteMenu\n items={matchSorter(items, inputValue, {\n keys: ['label'],\n })}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n highlightedIndex={highlightedIndex}\n />\n )}\n </div>\n )}\n </Downshift>\n )\n }\n}\n\nAutocompleteInput.propTypes = {\n /** Name for this input */\n name: PropTypes.string.isRequired,\n /** List of items to feed the autocompletion */\n items: PropTypes.array.isRequired,\n /** The default selected value */\n value: PropTypes.string.isRequired,\n /** Label for this input */\n label: PropTypes.string,\n /** Placeholder text for the input box */\n placeholder: PropTypes.string,\n /** An icon that can be added to the right corner of the input */\n suffixIcon: PropTypes.any,\n /** Function to be called on data change */\n onChange: PropTypes.func,\n /** A ref function to control this input from outside */\n forwardedRef: PropTypes.func,\n}\n\nexport default React.forwardRef((props, ref) => (\n <AutocompleteInput {...props} forwardedRef={ref} />\n))\n\n```" } ]
code_drawer_2e3f828a
[ { "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 drawer/docs/README.md from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n📢 Use this project, [contribute](https://github.com/vtex-apps/drawer) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Drawer\n\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nThe **Drawer** component is a sliding panel that displays additional options and menus when expanded. It is typically used in mobile layouts and responsive web designs where screen space is limited.\n\n![drawer](https://github.com/vtex-apps/reviews-and-ratings/assets/60782333/46358b77-e41a-4014-8443-c65cbe947fc2)\n\nWhen closed, the **Drawer** component is represented by an icon button positioned at the edge of the screen. Upon interaction, the drawer slides into view, revealing its content. Users can interact with the exposed content, perform actions, and navigate menus. To dismiss the drawer, users can either tap outside the drawer or use the close button.\n\n## Configuration\n\n1. Open your store theme in the code editor of your preference.\n2. Open the `manifest.json` file and add the `vtex.store-drawer` app to your store theme dependencies as in the following:\n\n```json\n\"dependencies\": {\n \"vtex.store-drawer\": \"0.x\"\n}\n```\n\n2. Add the `drawer` block to your app. The following example is from the [Store Theme](https://github.com/vtex-apps/store-theme).\n\n```json\n\"drawer\": {\n \"children\": [\n \"menu#drawer\"\n ]\n},\n\n\"menu#drawer\": {\n \"children\": [\n \"menu-item#category-clothing\",\n \"menu-item#category-decoration\",\n \"menu-item#custom-sale\"\n ],\n \"props\": {\n \"orientation\": \"vertical\"\n }\n},\n```\n\n3. Use the `drawer-trigger` block to customize the icon that triggers the opening of the drawer as follows:\n\n```json\n\"drawer\": {\n \"children\": [\n \"menu#drawer\"\n ],\n \"blocks\": [\"drawer-trigger\"]\n},\n\n\"drawer-trigger\": {\n \"children\": [\"rich-text#open-drawer\"]\n},\n\n\"rich-text#open-drawer\": {\n \"props\": {\n \"text\": \"Open drawer\"\n }\n}\n\n\"menu#drawer\": {\n \"children\": [\n \"menu-item#category-clothing\",\n \"menu-item#category-decoration\",\n \"menu-item#custom-sale\"\n ],\n \"props\": {\n \"orientation\": \"vertical\"\n }\n},\n```\n\n4. Use the `drawer-header` block to customize the header containing the button that closes the drawer. For example:\n\n```json\n// blocks.json\n{\n \"drawer\": {\n \"blocks\": [\"drawer-header#my-drawer\"]\n },\n \"drawer-header#my-drawer\": {\n \"children\": [\n // you need to include the block `drawer-close-button` somewhere inside here\n \"flex-layout.row#something\",\n // ...\n \"drawer-close-button\"\n ]\n }\n}\n```\n\n### Using the Drawer as a standalone component\n\nIf you are using this component as a standalone module, you will need to import it into the specific component where you want to use it. For example:\n\n```tsx\nimport { Drawer, DrawerHeader, DrawerCloseButton } from \"vtex.store-drawer\";\n\nconst Menu = () => (\n <Drawer\n header={\n <DrawerHeader>\n <DrawerCloseButton />\n </DrawerHeader>\n }\n >\n <ul>\n <li>Link 1</li>\n <li>Link 2</li>\n <li>Link 3</li>\n <li>Link 4</li>\n <li>Link 5</li>\n <li>Link 6</li>\n </ul>\n </Drawer>\n);\n```\n\n### Props\n\n#### `drawer`\n\n| Prop name | Type | Description | Default value |\n| ---------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |\n| `maxWidth` | `number` or `string` | Defines the maximum width of the open drawer. | `450` |\n| `isFullWidth` | `boolean` | Controls whether the open drawer should occupy the full available width. | `false` |\n| `slideDirection` | `'horizontal'`&#124;`'vertical'`&#124;`'rightToLeft'`&#124;`'leftToRight'` | Controls the direction of the opening animation for the drawer. | `'horizontal'` |\n| `backdropMode` | `'default'`&#124;`'none'` | Controls whether the backdrop should be displayed when the drawer is open. | |\n| `renderingStrategy` | `'lazy'`&#124;`'eager'` | Controls the rendering strategy for the children of the drawer component. It determines whether the children should be rendered only when the drawer is clicked (`lazy`) or immediately when the page loads (`eager`). Enabling the `eager` strategy may improve SEO performance. However, it may also result in slower page rendering. | `'lazy'` |\n| `customPixelEventId` | `string` | Defines the store event ID responsible for triggering the `drawer` to automatically open on the interface. | `undefined` |\n| `customPixelEventName` | `string` | Defines the store event name responsible for triggering the `drawer` to automatically open on the interface. Some examples are: `'addToCart'` and `'removeFromCart'` events. Note that if no `customPixelEventId` is set, using this prop will cause the drawer to open in every event with the specified name. | `undefined` |\n\n#### `drawer-close-button`\n\n| Prop name | Type | Description | Default value |\n| --------- | ------------------------ | -------------------------------------------------------------------------------------- | ------------- |\n| `size` | `number` | Defines the size of the icon inside the button. | `30` |\n| `type` | `'filled'`&#124;`'line'` | Defines the type of the icon. | `'line'` |\n| `text` | `string` | Defines the text inside the button. The icon will not be rendered if `text` is defined. | `undefined` |\n\n#### `drawer-trigger`\n\n| Prop name | Type | Description | Default value |\n| -------------------- | -------- | ---------------------------------------------------------------------------------- | ------------- |\n| `customPixelEventId` | `string` | Defines the event ID to be sent whenever users interact with the Drawer component. | `undefined` |\n\n## Customization\n\nIn order to apply CSS customizations to this and other blocks, follow the instructions in [Using CSS handles for store customizations](https://developers.vtex.com/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization).\n\n| CSS handles |\n| ------------------------ |\n| `drawer` |\n| `opened` |\n| `overlay` |\n| `overlay--visible` |\n| `closed` |\n| `moving` |\n| `drawerContent` |\n| `drawerHeader` |\n| `drawerTriggerContainer` |\n| `openIconContainer` |\n| `closeIconContainer` |\n| `closeIconButton` |\n| `childrenContainer` |\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tr>\n <td align=\"center\"><a href=\"https://github.com/Radu1749\"><img src=\"https://avatars2.githubusercontent.com/u/51535501?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Radu1749</b></sub></a><br /><a href=\"https://github.com/vtex-apps/drawer/commits?author=Radu1749\" title=\"Code\">💻</a></td>\n <td align=\"center\"><a href=\"https://github.com/rayra-alencar\"><img src=\"https://avatars0.githubusercontent.com/u/28907161?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>rayra-alencar</b></sub></a><br /><a href=\"https://github.com/vtex-apps/drawer/commits?author=rayra-alencar\" title=\"Code\">💻</a></td>\n <td align=\"center\"><a href=\"https://github.com/renanguerraa1\"><img src=\"https://avatars2.githubusercontent.com/u/69531548?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Renan Guerra</b></sub></a><br /><a href=\"https://github.com/vtex-apps/drawer/commits?author=renanguerraa1\" title=\"Code\">💻</a></td>\n </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n\n```" } ]
code_drawer_0a040dd9
[ { "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 drawer/react/DrawerCloseButton.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useCssHandles } from 'vtex.css-handles'\nimport { IconClose } from 'vtex.store-icons'\n\nimport { useDrawer } from './DrawerContext'\n\nconst CSS_HANDLES = ['closeIconButton'] as const\n\ninterface Props {\n size?: number\n type?: 'filled' | 'line'\n text?: string\n}\n\nconst DrawerCloseButton: React.FC<Props> = ({\n size = 30,\n type = 'line',\n text,\n}) => {\n const { close } = useDrawer()\n\n const handles = useCssHandles(CSS_HANDLES)\n\n return (\n <button\n className={`${handles.closeIconButton} pa4 pointer bg-transparent transparent bn pointer`}\n onClick={close}\n >\n {text ?? <IconClose size={size} type={type} />}\n </button>\n )\n}\n\nexport default DrawerCloseButton\n\n```" } ]
code_drawer_7f23a16d
[ { "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 drawer/react/DrawerContext.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { createContext, useContext } from 'react'\n\ninterface DrawerContext {\n isOpen: boolean\n open: () => void\n close: () => void\n}\n\nconst ctx = createContext<DrawerContext | undefined>(undefined)\n\nexport const useDrawer = () => {\n const contextValue = useContext(ctx)\n\n if (contextValue === undefined) {\n throw new Error('useDrawer must be used inside <Drawer />')\n }\n\n return contextValue\n}\n\nexport const DrawerContextProvider: React.FC<{ value: DrawerContext }> = ({\n value,\n children,\n}) => {\n return <ctx.Provider value={value}>{children}</ctx.Provider>\n}\n\nexport default { DrawerContextProvider, useDrawer }\n\n```" } ]
code_drawer_2f10d0a6
[ { "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 drawer/react/Drawer.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, {\n Suspense,\n useReducer,\n MouseEventHandler,\n useMemo,\n useState,\n useEffect,\n} from 'react'\nimport { defineMessages } from 'react-intl'\nimport { IconMenu } from 'vtex.store-icons'\nimport { useCssHandles } from 'vtex.css-handles'\nimport { useChildBlock, ExtensionPoint } from 'vtex.render-runtime'\nimport { usePixelEventCallback, PixelEventTypes } from 'vtex.pixel-manager'\nimport {\n MaybeResponsiveValue,\n useResponsiveValue,\n} from 'vtex.responsive-values'\n\nimport Portal from './Portal'\nimport Overlay from './Overlay'\nimport useLockScroll from './modules/useLockScroll'\nimport DrawerCloseButton from './DrawerCloseButton'\nimport { DrawerContextProvider } from './DrawerContext'\nimport { isElementInsideLink } from './modules/isElementInsideLink'\n\nconst Swipable = React.lazy(() => import('./Swipable'))\n\ninterface MenuState {\n isOpen: boolean\n hasBeenOpened: boolean\n}\n\ninterface MenuAction {\n type: 'open' | 'close'\n}\n\nconst initialMenuState: MenuState = {\n isOpen: false,\n hasBeenOpened: false,\n}\n\ntype Position = 'left' | 'right' | 'up' | 'down'\ntype SlideDirection = 'vertical' | 'horizontal' | 'rightToLeft' | 'leftToRight'\ntype Height = '100%' | 'auto' | 'fullscreen'\ntype Width = '100%' | 'auto'\ntype BackdropMode = 'visible' | 'none'\ntype RenderingStrategy = 'lazy' | 'eager'\n\ninterface Props {\n actionIconId?: string\n dismissIconId?: string\n position: Position\n width?: Width\n height?: Height\n slideDirection?: SlideDirection\n isFullWidth?: boolean\n maxWidth?: number | string\n children: React.ReactNode\n customIcon?: React.ReactElement\n header?: React.ReactElement\n backdropMode?: MaybeResponsiveValue<BackdropMode>\n renderingStrategy?: RenderingStrategy\n customPixelEventId?: PixelEventTypes.PixelData['id']\n customPixelEventName?: PixelEventTypes.PixelData['event']\n onVisibilityChanged?: (visible: boolean) => void\n zIndex?: number\n}\n\nfunction menuReducer(state: MenuState, action: MenuAction) {\n switch (action.type) {\n case 'open':\n return {\n ...state,\n isOpen: true,\n hasBeenOpened: true,\n }\n\n case 'close':\n return {\n ...state,\n isOpen: false,\n }\n\n default:\n return state\n }\n}\n\nconst useMenuState = () => {\n const [state, dispatch] = useReducer(menuReducer, initialMenuState)\n const setLockScroll = useLockScroll()\n\n const setMenuOpen = (value: boolean) => {\n dispatch({ type: value ? 'open' : 'close' })\n setLockScroll(value)\n }\n\n const openMenu = () => setMenuOpen(true)\n const closeMenu = () => setMenuOpen(false)\n\n return {\n state,\n openMenu,\n closeMenu,\n }\n}\n\nconst CSS_HANDLES = [\n 'openIconContainer',\n 'drawer',\n 'opened',\n 'closed',\n 'moving',\n 'drawerContent',\n 'childrenContainer',\n 'closeIconContainer',\n] as const\n\nfunction Drawer(props: Props) {\n const {\n width,\n header,\n children,\n customIcon,\n isFullWidth,\n maxWidth = 450,\n slideDirection = 'horizontal',\n backdropMode: backdropModeProp = 'visible',\n renderingStrategy = 'lazy',\n customPixelEventId,\n customPixelEventName,\n onVisibilityChanged,\n zIndex = 999,\n } = props\n\n const handles = useCssHandles(CSS_HANDLES)\n const backdropMode = useResponsiveValue(backdropModeProp)\n const hasTriggerBlock = Boolean(useChildBlock({ id: 'drawer-trigger' }))\n const hasHeaderBlock = Boolean(useChildBlock({ id: 'drawer-header' }))\n const { state: menuState, openMenu, closeMenu } = useMenuState()\n const { isOpen: isMenuOpen, hasBeenOpened: hasMenuBeenOpened } = menuState\n const [shouldRenderChildren, setShouldRenderChildren] = useState(\n renderingStrategy === 'eager'\n )\n\n const [isMoving, setIsMoving] = useState(false)\n\n // Always add the listener for 'openDrawer' events, since they're sent by\n // the drawer-trigger block.\n usePixelEventCallback({\n eventId: customPixelEventId,\n handler: openMenu,\n eventName: 'openDrawer',\n })\n\n usePixelEventCallback({\n eventId: customPixelEventId,\n handler: openMenu,\n eventName: customPixelEventName,\n })\n\n useEffect(() => {\n if (onVisibilityChanged !== undefined) {\n onVisibilityChanged(isMenuOpen)\n }\n }, [onVisibilityChanged, isMenuOpen])\n\n const handleContainerClick: MouseEventHandler<HTMLElement> = event => {\n // target is the clicked element\n // currentTarget is the element which was attached the event (e.g. the container)\n const { target, currentTarget } = event\n\n if (isElementInsideLink(target as HTMLElement, currentTarget)) {\n closeMenu()\n }\n }\n\n const direction =\n slideDirection === 'horizontal' || slideDirection === 'leftToRight'\n ? 'left'\n : 'right'\n\n const swipeHandler = direction === 'left' ? 'onSwipeLeft' : 'onSwipeRight'\n\n const contextValue = useMemo(\n () => ({\n isOpen: isMenuOpen,\n open: openMenu,\n close: closeMenu,\n }),\n [isMenuOpen, openMenu, closeMenu]\n )\n\n const overlayVisible = backdropMode === 'visible' && isMenuOpen\n\n useEffect(() => {\n if (isMenuOpen || hasMenuBeenOpened || renderingStrategy === 'eager') {\n setShouldRenderChildren(true)\n }\n }, [\n hasMenuBeenOpened,\n renderingStrategy,\n setShouldRenderChildren,\n isMenuOpen,\n ])\n\n return (\n <DrawerContextProvider value={contextValue}>\n <div\n role=\"button\"\n aria-hidden={isMenuOpen ? 'false' : 'true'}\n aria-expanded={isMenuOpen}\n aria-label={isMenuOpen ? 'close drawer' : 'open drawer'}\n tabIndex={isMenuOpen ? 0 : -1}\n onClick={openMenu}\n onKeyDown={e => {\n if (\n isMenuOpen &&\n (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape')\n ) {\n e.preventDefault()\n openMenu()\n }\n }}\n >\n {hasTriggerBlock ? (\n <ExtensionPoint id=\"drawer-trigger\" />\n ) : (\n customIcon ?? <IconMenu size={20} />\n )}\n </div>\n <Portal>\n <Overlay visible={overlayVisible} onClick={closeMenu} zIndex={zIndex} />\n <Suspense fallback={<React.Fragment />}>\n <Swipable\n {...{\n [swipeHandler]: closeMenu,\n }}\n enabled={isMenuOpen}\n position={isMenuOpen ? 'center' : direction}\n allowOutsideDrag\n onUpdateOffset={value => {\n setIsMoving(!(value === '0%' || value === '-100%'))\n }}\n className={`${handles.drawer} ${\n isMenuOpen ? handles.opened : handles.closed\n } ${isMoving ? handles.moving : ''} ${\n direction === 'right' ? 'right-0' : 'left-0'\n } fixed top-0 bottom-0 bg-base z-999 flex flex-column`}\n style={{\n width: width ?? (isFullWidth ? '100%' : '85%'),\n maxWidth,\n minWidth: 280,\n pointerEvents: isMenuOpen ? 'auto' : 'none',\n zIndex,\n }}\n >\n <div\n className={`${handles.drawerContent} overflow-y-auto`}\n style={{\n WebkitOverflowScrolling: 'touch',\n }}\n >\n {hasHeaderBlock ? (\n <ExtensionPoint id=\"drawer-header\" />\n ) : (\n header ?? (\n <div className={`flex ${handles.closeIconContainer}`}>\n <DrawerCloseButton />\n </div>\n )\n )}\n {/* The onClick handler below is done to fix a bug regarding drawers that wouldn't close when\n * navigating to the same page (e.g. from a search result page to another). It is not an element\n * intended to be clicked directly, so there's probably no need for it to have a role and to\n * handle keyboard events specifically */}\n {/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n <div\n className={`${handles.childrenContainer} flex flex-grow-1`}\n onClick={handleContainerClick}\n >\n {shouldRenderChildren ? children : <></>}\n </div>\n {/* eslint-enable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n </div>\n </Swipable>\n </Suspense>\n </Portal>\n </DrawerContextProvider>\n )\n}\n\nconst messages = defineMessages({\n title: {\n defaultMessage: '',\n id: 'admin/editor.drawer.title',\n },\n})\n\nDrawer.schema = {\n title: messages.title.id,\n}\n\nexport default Drawer\n\n```" } ]
code_drawer_b3069181
[ { "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 drawer/react/DrawerHeader.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useCssHandles } from 'vtex.css-handles'\n\nconst CSS_HANDLES = ['drawerHeader'] as const\n\nconst DrawerHeader: React.FC = ({ children }) => {\n const handles = useCssHandles(CSS_HANDLES)\n\n return <div className={`flex ${handles.drawerHeader}`}>{children}</div>\n}\n\nexport default DrawerHeader\n\n```" } ]
code_drawer_5f6c0bc8
[ { "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 drawer/react/package.json from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"dependencies\": {\n \"@vtex/css-handles\": \"^1.1.3\",\n \"apollo-client\": \"^2.4.7\",\n \"classnames\": \"^2.2.6\",\n \"graphql\": \"^14.0.2\",\n \"react\": \"^16.8.6\",\n \"react-dom\": \"^16.8.6\",\n \"react-intl\": \"^4.5.1\"\n },\n \"devDependencies\": {\n \"@types/classnames\": \"^2.2.7\",\n \"@types/jest\": \"^25.1.3\",\n \"@types/react\": \"^16.8.14\",\n \"@types/react-dom\": \"^16.8.4\",\n \"@vtex/test-tools\": \"^3.0.0\",\n \"typescript\": \"3.9.7\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles\",\n \"vtex.pixel-manager\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.pixel-manager@1.9.0/public/@types/vtex.pixel-manager\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.135.1/public/@types/vtex.render-runtime\",\n \"vtex.responsive-values\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.responsive-values@0.4.2/public/@types/vtex.responsive-values\",\n \"vtex.store-icons\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons\"\n },\n \"version\": \"0.18.3\"\n}\n\n```" } ]
code_drawer_0f6809e3
[ { "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 drawer/react/DrawerTrigger.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { usePixel, PixelEventTypes } from 'vtex.pixel-manager'\nimport { useCssHandles } from 'vtex.css-handles'\n\ninterface Props {\n customPixelEventId?: string\n}\n\nconst CSS_HANDLES = ['drawerTriggerContainer'] as const\n\nconst DrawerTrigger: React.FC<Props> = ({ children, customPixelEventId }) => {\n const { push } = usePixel()\n const handles = useCssHandles(CSS_HANDLES)\n\n const handleInteraction = () => {\n if (!customPixelEventId) {\n return\n }\n\n const pixelEvent: PixelEventTypes.PixelData = {\n id: customPixelEventId,\n event: 'openDrawer',\n }\n\n push(pixelEvent)\n }\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n className={handles.drawerTriggerContainer}\n onClick={handleInteraction}\n onKeyDown={handleInteraction}\n >\n {children}\n </div>\n )\n}\n\nexport default DrawerTrigger\n\n```" } ]
code_drawer_78a157b4
[ { "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 drawer/react/Portal.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport ReactDOM from 'react-dom'\nimport { useSSR } from 'vtex.render-runtime/react/components/NoSSR'\n\nconst Portal: React.FunctionComponent = ({ children }) => {\n const body = window?.document?.body\n const isSSR = useSSR()\n\n if (!body || isSSR) {\n return null\n }\n\n return ReactDOM.createPortal(children, body)\n}\n\nexport default Portal\n\n```" } ]
code_drawer_433d226a
[ { "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 drawer/react/Swipable.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { animate } from './modules/animation'\nimport parseMeasure from './modules/parseMeasure'\nimport getPointerPosition from './modules/getPointerPosition'\n\nconst CENTER = 'center'\nconst LEFT = 'left'\nconst RIGHT = 'right'\n\ntype Position = 'center' | 'left' | 'right'\n\ninterface Props {\n children: React.ReactElement\n onSwipeLeft: () => void\n onSwipeRight: () => void\n onTriggerChange: (\n args: {\n type: string\n speed: number\n } | null\n ) => void\n onLockScroll: () => void\n onUnlockScroll: () => void\n onDragStart: () => void\n onDragEnd: () => void\n onSetPosition: (args: {\n element: React.ReactElement | HTMLDivElement\n offset: number | string\n }) => void\n onUpdateOffset: (offset: number | string) => void\n threshold: number\n enabled: boolean\n rubberBanding: boolean\n element: React.ReactElement\n position: Position\n className: string\n style: Record<string, unknown>\n positionRight: number | string\n positionLeft: number | string\n preserveMomentum: boolean\n allowOutsideDrag: boolean\n}\n\nexport default class Swipable extends React.Component<Props> {\n private dragContainer: React.RefObject<HTMLDivElement>\n private dragStartPos: { x: number; y: number }\n private isDragging: boolean\n private isPointerDown: boolean\n private isScrolling: boolean\n private momentum: number | null\n private momentumTimeout: NodeJS.Timeout | number | null\n private offset: string | number\n private offsetAnimation: { value: number | string }\n private stopAnimation: () => void\n private wasDragging: boolean\n private willTrigger: {\n type: string\n speed: number\n } | null\n\n private previousDragPositions: Array<{\n x: number\n y: number\n source: string\n timeStamp: number\n }>\n\n public static defaultProps = {\n onSwipeLeft: null,\n leftTargetPosition: null,\n onSwipeRight: null,\n rightTargetPosition: null,\n onTriggerChange: null,\n position: CENTER,\n onLockScroll: () => {},\n onUnlockScroll: () => {},\n onDragStart: () => {},\n onDragEnd: () => {},\n onSetPosition: ({\n element,\n offset,\n }: {\n element: HTMLDivElement\n offset: number\n }) => {\n const unit = typeof offset === 'number' ? 'px' : ''\n\n element.style.transform = `translate3d(${offset}${unit},0,0)`\n },\n onUpdateOffset: () => {},\n element: null,\n threshold: 0,\n enabled: true,\n rubberBanding: false,\n style: {},\n positionRight: '100%',\n positionLeft: '-100%',\n preserveMomentum: true,\n allowOutsideDrag: false,\n }\n\n constructor(props: Props) {\n super(props)\n\n this.dragContainer = React.createRef()\n\n this.stopAnimation = () => {}\n this.isPointerDown = false\n this.isDragging = false\n this.isScrolling = false\n\n /* Used for the click event handler, which is\n * fired after mouseup is fired.\n * See comment on handleClick function */\n this.wasDragging = false\n\n this.offset = this.getOffsetFromPosition()\n this.offsetAnimation = { value: this.offset }\n this.momentum = null\n this.momentumTimeout = null\n this.dragStartPos = {\n x: 0,\n y: 0,\n }\n this.previousDragPositions = []\n this.willTrigger = null\n }\n\n public componentDidMount() {\n if (!window || !window.document) {\n return\n }\n\n window.document.addEventListener('mousedown', this.handleDragStart)\n window.document.addEventListener('touchstart', this.handleDragStart)\n window.document.addEventListener('mousemove', this.handleDragMove)\n window.document.addEventListener('touchmove', this.handleDragMove)\n window.document.addEventListener('mouseup', this.handleDragEnd)\n window.document.addEventListener('touchend', this.handleDragEnd)\n window.document.addEventListener('click', this.handleClick, {\n capture: true,\n })\n }\n\n public componentWillUnmount() {\n if (!window || !window.document) {\n return\n }\n\n window.document.removeEventListener('mousedown', this.handleDragStart)\n window.document.removeEventListener('touchstart', this.handleDragStart)\n window.document.removeEventListener('mousemove', this.handleDragMove)\n window.document.removeEventListener('touchmove', this.handleDragMove)\n window.document.removeEventListener('mouseup', this.handleDragEnd)\n window.document.removeEventListener('touchend', this.handleDragEnd)\n window.document.removeEventListener('click', this.handleClick, {\n capture: true,\n })\n }\n\n /* Prevents click events from firing in the event of\n * firing swipe events. */\n private handleClick = (event: Event) => {\n if (this.wasDragging || this.isPointerDown) {\n event.preventDefault()\n event.stopPropagation()\n }\n\n this.wasDragging = false\n }\n\n public componentDidUpdate(prevProps: Props) {\n if (prevProps.enabled && !this.props.enabled && this.isPointerDown) {\n this.isPointerDown = false\n }\n\n if (prevProps.position !== this.props.position) {\n this.updatePosition()\n }\n }\n\n private updatePosition = () => {\n if (this.momentumTimeout) {\n clearTimeout(this.momentumTimeout as number)\n this.momentumTimeout = null\n }\n\n this.offsetAnimation.value = this.offset\n animate({\n object: this.offsetAnimation,\n prop: 'value',\n target: this.getOffsetFromPosition(),\n ...(this.momentum\n ? { speed: this.momentum, acceleration: 1.25 }\n : { duration: 0.25 }),\n onUpdate: (value: string) => {\n this.setOffset(value)\n },\n })\n\n this.momentum = null\n }\n\n private getOffsetFromPosition = () => {\n switch (this.props.position) {\n case 'center':\n return 0\n\n case 'right':\n return this.props.positionRight\n\n case 'left':\n return this.props.positionLeft\n\n default:\n return 0\n }\n }\n\n private handleDragStart = (event: MouseEvent | TouchEvent) => {\n if (this.isPointerDown || !this.props.enabled) {\n return\n }\n\n if (\n !this.props.allowOutsideDrag &&\n !this.dragContainer.current?.contains(event.target as Node)\n ) {\n return\n }\n\n const pos = getPointerPosition(event)\n\n if (pos === null) return\n\n this.isPointerDown = true\n this.isScrolling = false\n this.isDragging = false\n this.stopAnimation()\n this.dragStartPos = {\n ...pos,\n }\n this.previousDragPositions = [pos]\n this.willTrigger = null\n this.dispatchTriggerChange(this.willTrigger)\n }\n\n /** Lets the parent know that a swipe event will be triggered if the cursor\n * is released. Useful for displaying UI feedback */\n private dispatchTriggerChange = (\n willTrigger: {\n type: string\n speed: number\n } | null\n ) => {\n const { onTriggerChange } = this.props\n\n if (onTriggerChange) {\n onTriggerChange(willTrigger)\n }\n }\n\n private handleDragMove = (event: TouchEvent | MouseEvent) => {\n const {\n onDragStart,\n onLockScroll,\n onSwipeLeft,\n onSwipeRight,\n enabled,\n rubberBanding,\n } = this.props\n\n if (!this.isPointerDown || this.isScrolling) {\n return\n }\n\n const pos = getPointerPosition(event)\n\n if (pos === null) return\n\n const lastPos =\n this.previousDragPositions[this.previousDragPositions.length - 1]\n\n if (lastPos && pos.source !== lastPos.source) {\n return\n }\n\n /* Values to determine if the dragging means either a swipe or a scroll */\n const threshold = {\n x: 15,\n y: 10,\n }\n\n const distance = {\n x: pos.x - this.dragStartPos.x,\n y: pos.y - this.dragStartPos.y,\n }\n\n if (!this.isDragging) {\n if (Math.abs(distance.x) >= threshold.x) {\n this.isDragging = true\n onDragStart()\n onLockScroll()\n } else if (Math.abs(distance.y) >= threshold.y) {\n this.isScrolling = true\n }\n } else {\n this.offset = distance.x\n\n /** Either applies rubberbanding or stops dragging at the limits */\n const limitDragging = (offset: number) => {\n const RUBBER_BANDING_MULTIPLIER = 0.3\n\n return rubberBanding ? offset * RUBBER_BANDING_MULTIPLIER : 0\n }\n\n if (!enabled || (!onSwipeLeft && this.offset < 0)) {\n this.offset = limitDragging(this.offset)\n } else if (!enabled || (!onSwipeRight && this.offset > 0)) {\n this.offset = limitDragging(this.offset)\n }\n\n this.setOffset(this.offset)\n this.previousDragPositions.push(pos)\n\n const willTrigger = this.checkTrigger()\n\n // eslint-disable-next-line eqeqeq\n if (this.willTrigger != willTrigger) {\n this.dispatchTriggerChange(willTrigger)\n }\n\n this.willTrigger = willTrigger\n }\n }\n\n private setOffset = (offset: number | string) => {\n if (this.dragContainer?.current) {\n this.props.onSetPosition({\n element: this.props.element || this.dragContainer.current,\n offset,\n })\n this.props.onUpdateOffset(offset)\n }\n\n this.offset = offset\n }\n\n private setMomentum = (momentum: number, target: number | string) => {\n const [, targetUnit] = parseMeasure(target) ?? []\n\n if (this.dragContainer.current == null) return\n\n if (targetUnit === '%') {\n const bounds = this.dragContainer.current.getBoundingClientRect()\n const { width } = bounds\n\n this.offset = `${(Number(this.offset) / width) * 100}%`\n momentum = (momentum / width) * 100\n }\n\n this.momentum = momentum\n\n /* Lets momentum live only for a brief time. If position changes in this meantime,\n * then momentum is applied. Otherwise it's ignored and a regular transition is done */\n if (this.momentumTimeout) {\n clearTimeout(this.momentumTimeout as number)\n }\n\n this.momentumTimeout = setTimeout(() => {\n this.momentum = null\n this.momentumTimeout = null\n }, 100)\n }\n\n /** Checks if the mouse/touch movement at the time of release triggers a\n * swipe, and if so, to which direction */\n private checkTrigger = () => {\n if (!this.props.enabled) {\n return null\n }\n\n /* Checks the last $samples cursor positions to determine the\n * average speed and direction of movement */\n const samples = 6\n const fps = 60\n const releaseSpeed =\n this.previousDragPositions\n .slice(-samples)\n .map((cur, i, arr) => {\n const last = arr[i - 1]\n\n if (last == null) {\n return null\n }\n\n return cur.x - last.x\n })\n .filter(cur => cur != null)\n .reduce((sum: number, cur) => sum + (cur ?? 0) / samples, 0) * fps\n\n const { onSwipeLeft, onSwipeRight } = this.props\n\n const triggers = {\n left:\n onSwipeLeft != null &&\n releaseSpeed < 0 &&\n typeof this.offset === 'number' &&\n this.offset < -this.props.threshold,\n right:\n onSwipeRight != null &&\n releaseSpeed > 0 &&\n typeof this.offset === 'number' &&\n this.offset > this.props.threshold,\n }\n\n if (triggers.left) {\n return {\n type: LEFT,\n speed: releaseSpeed,\n }\n }\n\n if (triggers.right) {\n return {\n type: RIGHT,\n speed: releaseSpeed,\n }\n }\n\n return null\n }\n\n private handleDragEnd = (event: Event) => {\n if (this.isPointerDown && this.isDragging) {\n event.preventDefault()\n event.stopPropagation()\n const trigger = this.checkTrigger()\n\n if (trigger) {\n switch (trigger.type) {\n case LEFT:\n if (this.props.preserveMomentum) {\n this.setMomentum(trigger.speed, this.props.positionLeft)\n }\n\n this.props.onSwipeLeft()\n break\n\n case RIGHT:\n if (this.props.preserveMomentum) {\n this.setMomentum(trigger.speed, this.props.positionRight)\n }\n\n this.props.onSwipeRight()\n break\n\n default:\n break\n }\n } else {\n this.offsetAnimation.value = this.offset\n animate({\n object: this.offsetAnimation,\n prop: 'value',\n target: 0,\n duration: 0.2,\n onUpdate: (value: string) => {\n this.setOffset(value)\n },\n })\n }\n\n this.props.onDragEnd()\n this.props.onUnlockScroll()\n }\n\n this.isScrolling = false\n this.wasDragging = this.isPointerDown && this.isDragging\n this.isPointerDown = false\n }\n\n public render() {\n return (\n <div\n aria-hidden={this.props.enabled ? 'false' : 'true'}\n ref={this.dragContainer}\n style={{\n ...this.props.style,\n transform: `translate3d(${this.getOffsetFromPosition()}, 0, 0)`,\n }}\n className={this.props.className}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\n```" } ]
code_drawer_6f89bd72
[ { "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 drawer/react/Overlay.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useCssHandles, applyModifiers } from 'vtex.css-handles'\n\ninterface Props {\n visible: boolean\n onClick(event: React.MouseEvent | React.TouchEvent): void\n zIndex?: number\n}\n\nconst CSS_HANDLES = ['overlay'] as const\n\nconst Overlay: React.ForwardRefRenderFunction<HTMLDivElement, Props> = (\n { visible, onClick, zIndex = 999 }: Props,\n ref\n) => {\n const handles = useCssHandles(CSS_HANDLES)\n const ariaHidden = visible ? 'false' : 'true'\n\n return (\n <div\n ref={ref}\n aria-hidden={ariaHidden}\n role=\"presentation\"\n onClick={onClick}\n style={{\n opacity: visible ? 0.5 : 0,\n pointerEvents: visible ? 'auto' : 'none',\n zIndex,\n }}\n className={`${applyModifiers(\n handles.overlay,\n visible ? 'visible' : ''\n )} bg-base--inverted z-999 fixed top-0 bottom-0 left-0 right-0`}\n />\n )\n}\n\nexport default React.forwardRef(Overlay)\n\n```" } ]
code_drawer_180563f7
[ { "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 drawer/store/blocks.json from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"drawer\": {\n \"blocks\": [\"drawer-header\"]\n },\n \"drawer-header\": {\n \"children\": [\"drawer-close-button\"]\n }\n}\n\n```" } ]
code_drawer_8118b9a6
[ { "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 drawer/store/interfaces.json from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"drawer\": {\n \"component\": \"Drawer\",\n \"composition\": \"children\",\n \"allowed\": [\"drawer-trigger\", \"drawer-header\"]\n },\n \"drawer-trigger\": {\n \"component\": \"DrawerTrigger\",\n \"composition\": \"children\"\n },\n \"drawer-header\": {\n \"component\": \"DrawerHeader\",\n \"composition\": \"children\"\n },\n \"drawer-close-button\": {\n \"component\": \"DrawerCloseButton\"\n }\n}\n\n```" } ]
code_drawer_10cf46c4
[ { "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 drawer/react/typings/vtex.responsive-values.d.ts from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.responsive-values' {\n interface ResponsiveValue<T> {\n tablet?: T\n phone?: T\n desktop?: T\n mobile?: T\n }\n\n type MaybeResponsiveValue<T> = ResponsiveValue<T> | T\n const useResponsiveValue: <T>(value: MaybeResponsiveValue<T>) => T\n}\n\n```" } ]
code_drawer_cfe0bdb4
[ { "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 drawer/react/modules/getPointerPosition.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nfunction isMouseEvent(event: TouchEvent | MouseEvent): event is MouseEvent {\n return !!(event as MouseEvent).clientX\n}\n\nfunction isTouchEvent(event: TouchEvent | MouseEvent): event is TouchEvent {\n return 'touches' in event\n}\n\nexport default function getPointerPosition(event: TouchEvent | MouseEvent) {\n if (isMouseEvent(event)) {\n return {\n x: event.clientX,\n y: event.clientY,\n source: 'mouse',\n timeStamp: event.timeStamp,\n }\n }\n\n if (!isTouchEvent(event)) {\n return null\n }\n\n // eslint-disable-next-line prefer-destructuring\n const touch = event.touches[0]\n\n return {\n x: touch.clientX,\n y: touch.clientY,\n source: 'touch',\n timeStamp: event.timeStamp,\n }\n}\n\n```" } ]
code_drawer_10ea4388
[ { "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 drawer/react/modules/animation.ts from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport parseMeasure, { Measure } from './parseMeasure'\n\ninterface Animation {\n prop: string\n object: { [prop: string]: Measure }\n isStopped: () => boolean\n stop: () => void\n}\n\nconst animations: Animation[] = []\n\nconst createAnimation = ({\n object,\n prop,\n stop,\n isStopped,\n}: Animation): Animation => ({\n object,\n prop,\n stop,\n isStopped,\n})\n\nconst stopConflictingAnimations = (animation: Animation) =>\n animations.filter(cur => {\n const isConflicting =\n cur.object === animation.object && cur.prop === animation.prop\n\n if (isConflicting) {\n cur.stop()\n }\n\n return !cur.isStopped()\n })\n\ninterface AnimationOptions {\n object: { [prop: string]: Measure }\n prop: string\n target: Measure\n duration?: number\n speed?: number\n acceleration?: number\n maxSpeed?: number\n onUpdate?: (value: string) => void\n onComplete?: () => void\n}\n\nexport function animate({\n object,\n prop,\n target,\n duration,\n speed,\n acceleration,\n maxSpeed,\n onUpdate = undefined,\n onComplete = undefined,\n}: AnimationOptions) {\n const targetFps = 60\n const frameDuration = 1000 / targetFps\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [targetValue, targetUnit, isTargetUnitless] = parseMeasure(target)!\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [originValue, originUnit] = parseMeasure(object[prop])!\n const unit = isTargetUnitless ? originUnit : targetUnit\n const delta = targetValue - originValue\n\n const ease = (v: number) => v * (2 - v)\n const maxTimeMultiplier = 2\n\n let stopped = false\n\n const stop = () => {\n stopped = true\n }\n\n const isStopped = () => {\n return stopped\n }\n\n let current = duration ? 0 : originValue\n let last: number | null | undefined = null\n\n const update = (now?: number) => {\n if (stopped) return\n let timeMultiplier = 1\n\n if (last != null) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const deltaTime = now! - last\n\n timeMultiplier = deltaTime / frameDuration\n if (timeMultiplier > maxTimeMultiplier) timeMultiplier = maxTimeMultiplier\n }\n\n last = now\n\n if (duration) {\n const step = frameDuration / (duration * 1000)\n\n current += step * timeMultiplier\n if (current >= 1) {\n current = 1\n if (onComplete != null) {\n onComplete()\n }\n\n stop()\n }\n\n const value = `${originValue + ease(current) * delta}${unit}`\n\n object[prop] = value\n\n if (onUpdate != null) {\n onUpdate(value)\n }\n } else if (speed) {\n current += speed / (targetFps * timeMultiplier)\n\n if (acceleration) {\n speed *= acceleration\n }\n\n if (maxSpeed && speed > maxSpeed) {\n speed = maxSpeed\n }\n\n if (\n (speed > 0 && current >= targetValue) ||\n (speed < 0 && current <= targetValue)\n ) {\n current = targetValue\n if (onComplete != null) {\n onComplete()\n }\n\n stop()\n }\n\n const formattedValue = `${current}${unit}`\n\n object[prop] = formattedValue\n\n if (onUpdate != null) {\n onUpdate(formattedValue)\n }\n }\n\n requestAnimationFrame(update)\n }\n\n update()\n\n const animation = createAnimation({ object, prop, stop, isStopped })\n\n stopConflictingAnimations(animation)\n\n animations.push(animation)\n\n return stop\n}\n\n```" } ]
code_drawer_83b06c7f
[ { "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 drawer/react/modules/isElementInsideLink.ts from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n// This is a totally valid use case for any, eslint.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isHTMLElement(x: any): x is HTMLElement {\n return 'tagName' in x\n}\n\nfunction isLink(element: HTMLElement): element is HTMLAnchorElement {\n return String(element.tagName).toUpperCase() === 'A'\n}\n\nexport function isElementInsideLink(\n node: HTMLElement | null,\n limit?: HTMLElement\n): boolean {\n if (!node || !isHTMLElement(node)) {\n return false\n }\n\n if (isLink(node)) {\n return true\n }\n\n const { parentNode } = node\n\n if (\n !parentNode ||\n !isHTMLElement(parentNode) ||\n parentNode.tagName.toUpperCase() === 'BODY' ||\n (limit && parentNode === limit)\n ) {\n return false\n }\n\n return isElementInsideLink(parentNode, limit)\n}\n\n```" } ]
code_drawer_1ee2b69f
[ { "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 drawer/react/modules/parseMeasure.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nexport type Measure = number | string\n\ntype Value = number\ntype Unit = string\ntype IsUnitless = boolean\n\ntype ParsedMeasure = [Value, Unit, IsUnitless]\n\nfunction parseMeasure(value: Measure): ParsedMeasure | null {\n if (typeof value === 'number') {\n return [value, 'px', true]\n }\n\n const matchResult = value.match(/([-\\d]*)([^0-9\\n]+)/)\n\n if (!matchResult) {\n return null\n }\n\n const [, parsedValue, parsedUnit] = matchResult\n\n return [parseInt(parsedValue, 10), parsedUnit, false]\n}\n\nexport default parseMeasure\n\n```" } ]
code_drawer_8f4106fd
[ { "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 drawer/react/modules/useLockScroll.tsx from the drawer VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useRef, useState, useEffect } from 'react'\n\nconst useLockScroll = () => {\n const [locked, setLocked] = useState(false)\n const prevScroll = useRef('')\n\n useEffect(() => {\n if (locked) {\n prevScroll.current = document.body.style.overflow\n }\n\n document.body.style.overflow = locked ? 'hidden' : prevScroll.current\n\n return () => {\n if (locked) {\n document.body.style.overflow = prevScroll.current\n }\n }\n }, [locked])\n\n return setLocked\n}\n\nexport default useLockScroll\n\n```" } ]
code_shopper-location-availability-theme_6fe88ec7
[ { "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 shopper-location-availability-theme/sitemap/sitemap.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"urlset\": {\n \"url\": [\n {\n \"loc\": \"https://storetheme.vtex.com/about-us\"\n }\n ]\n }\n}\n```" } ]
code_shopper-location-availability-theme_3517aa3c
[ { "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 shopper-location-availability-theme/docs/README.md from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Store theme\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\nOur boilerplate theme to create stores in the VTEX IO platform.\n\n## Preview\n![store-theme-default](https://user-images.githubusercontent.com/1354492/63937047-e8d81c80-ca37-11e9-86fc-61e88847bbfb.png)\n\n## Tutorial\nTo understand how things work check our tutorial [Build a store using VTEX IO](https://vtex.io/docs/getting-started/build-stores-with-store-framework/1/)\n\n## Dependencies\nAll store components that you see on this document are open source too. Production ready, you can found those apps in this GitHub organization.\n\nStore framework is the baseline to create any store using _VTEX IO Web Framework_.\n- [Store](https://github.com/vtex-apps/store/blob/master/README.md)\n\nStore GraphQL is a middleware to access all VTEX APIs.\n- [Store GraphQL](https://github.com/vtex-apps/store-graphql/blob/master/docs/README.md)\n\n### Store Component Apps\n- [Header](https://github.com/vtex-apps/store-header/blob/master/docs/README.md)\n- [Footer](https://github.com/vtex-apps/store-footer/blob/master/docs/README.md)\n- [Slider Layout](https://github.com/vtex-apps/slider-layout/blob/master/docs/README.md)\n- [Shelf](https://github.com/vtex-apps/shelf/blob/master/docs/README.md)\n- [Telemarketing](https://github.com/vtex-apps/telemarketing/blob/master/docs/README.md)\n- [Menu](https://github.com/vtex-apps/menu/blob/master/docs/README.md)\n- [Login](https://github.com/vtex-apps/login/blob/master/docs/README.md)\n- [Minicart](https://github.com/vtex-apps/minicart/blob/master/docs/README.md)\n- [Category Menu](https://github.com/vtex-apps/category-menu/blob/master/docs/README.md)\n- [Product Summary](https://github.com/vtex-apps/product-summary/blob/master/docs/README.md)\n- [Breadcrumb](https://github.com/vtex-apps/breadcrumb/blob/master/docs/README.md)\n- [Search Result](https://github.com/vtex-apps/search-result/blob/master/docs/README.md)\n- [Product Details](https://github.com/vtex-apps/product-details/blob/master/docs/README.md)\n- [Store Components](https://github.com/vtex-apps/store-components/blob/master/docs/README.md)\n- [Order Placed](https://github.com/vtex-apps/order-placed/blob/master/docs/README.md) \n\n### Store Pixel Apps\n\n - [Facebook Pixel](https://github.com/vtex-apps/facebook-pixel/blob/master/docs/README.md)\n - [Google Tag Manager](https://github.com/vtex-apps/google-tag-manager/blob/master/docs/README.md)\n\n## Contributing\n\nCheck it out [how to contribute](https://github.com/vtex-apps/awesome-io#contributing) with this project.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tr>\n <td align=\"center\"><a href=\"http://www.hugoccosta.com\"><img src=\"https://avatars2.githubusercontent.com/u/20212776?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Hugo Costa</b></sub></a><br /><a href=\"https://github.com/vtex-apps/store-theme/commits?author=hugocostadev\" title=\"Documentation\">📖</a></td>\n </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n```" } ]
code_shopper-location-availability-theme_9ba0ca56
[ { "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 shopper-location-availability-theme/docs/contact-schema.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"title\": \"Contact\",\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"title\": \"Title\"\n },\n \"name\": {\n \"type\": \"string\",\n \"title\": \"Name\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"title\": \"Email address\"\n },\n \"message\": {\n \"type\": \"string\",\n \"title\": \"Message\"\n }\n },\n \"required\": [\"email\", \"message\"],\n \"v-security\": {\n \"publicJsonSchema\": true\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_a478ff20
[ { "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 shopper-location-availability-theme/store/blocks.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n/* Blocks can be defined both on the store/blocks.json file, and in any number of json\n * files inside the store/blocks directory, with any arbitrary directory structure.\n *\n * Additionally, all blocks files can support comments, such as this one, if given the\n * .jsonc file extension.\n *\n * The store/blocks.json file is intended for backwards compatibility, for miscellaneous\n * blocks, or if the app is simple enough that it doesn't warrant splitting the file.\n */\n{\n \"store.orderplaced\": {\n \"blocks\": [\"order-placed\"]\n },\n\n \"store.account\": {\n \"blocks\": [\"my-account\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n },\n\n \"store.login\": {\n \"blocks\": [\"login-content#default\"]\n },\n\n \"login-content#default\": {\n \"props\": {\n \"isInitialScreenOptionOnly\": false,\n \"defaultOption\": 1,\n \"showPasswordVerificationIntoTooltip\": true\n }\n },\n\n \"store.product-review-form\": {\n \"blocks\": [\"product-review-form\"]\n },\n\n \"store.not-found#product\": {\n \"blocks\": [\"rich-text#not-found\"]\n },\n\n \"store.not-found#search\": {\n \"blocks\": [\"rich-text#not-found\"]\n },\n\n \"rich-text#not-found\": {\n \"props\": {\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\",\n \"text\": \"**PAGE NOT FOUND**\",\n \"font\": \"t-heading-1\"\n }\n },\n \"shopper-location\": {\n \"children\": [\n \"modal-trigger#address\"\n ],\n \"props\": {\n \"autofill\": [\n \"city\",\n \"country\",\n \"neighborhood\",\n \"number\",\n \"postalCode\",\n \"state\",\n \"street\"\n ]\n }\n },\n \"modal-trigger#address\": {\n \"children\": [\n \"user-address\",\n \"modal-layout#address\"\n ]\n },\n \"user-address\": {\n \"props\": {\n \"variation\": \"bar\",\n \"showStreet\": false,\n \"showCityAndState\": true,\n \"showPostalCode\": true,\n \"showPrefix\": false,\n \"showIfEmpty\": true\n }\n },\n \"modal-layout#address\": {\n \"children\": [\n \"modal-header#address\",\n \"modal-content#address\"\n ]\n },\n \"modal-header#address\": {\n \"children\": [\n \"flex-layout.col#address-header\"\n ]\n },\n \"flex-layout.col#address-header\": {\n \"children\": [\n \"rich-text#address-header\"\n ],\n \"props\": {\n \"paddingLeft\": 5\n }\n },\n \"rich-text#address-header\": {\n \"props\": {\n \"text\": \"### Change Location\"\n }\n },\n \"modal-content#address\": {\n \"children\": [\n \"change-location\"\n ]\n },\n \"change-location\": {\n \"props\": {\n \"postalCode\": \"first\",\n \"autocomplete\": true,\n \"notRequired\": [\n \"street\",\n \"number\",\n \"city\",\n \"state\"\n ],\n \"hideFields\": [\n \"complement\",\n \"neighborhood\",\n \"receiverName\",\n \"reference\"\n ]\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_9d17148b
[ { "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 shopper-location-availability-theme/store/routes.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#about-us\": {\n \"path\": \"/about-us\"\n },\n \"store.custom#faq\": {\n \"path\": \"/faq\"\n },\n \"store.custom#contact-us\": {\n \"path\": \"/contact-us\"\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_84832297
[ { "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 shopper-location-availability-theme/styles/css/vtex.store-video.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.videoContainer {\n width: 100%;\n height: 300px;\n margin-top: 2%;\n}\n\n@media only screen and (min-width: 640px) {\n .videoContainer {\n height: 700px;\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_b75f4167
[ { "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 shopper-location-availability-theme/styles/css/vtex.product-price.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.listPrice {\n color: #727273;\n margin-bottom: .25rem;\n font-size: 1rem;\n}\n\n.sellingPrice {\n color: #3f3f40;\n font-size: 1.25rem;\n}\n\n.sellingPriceValue {\n font-size: 2.25rem;\n font-weight: 700;\n}\n\n.installments {\n color: #727273;\n margin-bottom: 1rem;\n}\n\n.savings {\n font-weight: 500;\n color: #79B03A;\n}\n\n.sellingPriceValue--summary {\n font-size: 1.25rem;\n font-weight: 600;\n color: #2E2E2E;\n}\n\n.savings--summary {\n background: #8BC34A;\n border-radius: 1000px;\n align-items: center;\n display: flex;\n\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n font-size: 0.875rem;\n font-weight: 600;\n vertical-align: baseline;\n color: #FFFFFF;\n}\n\n.savings-discount--summary {\n font-size: 0.875rem;\n font-weight: 600;\n vertical-align: baseline;\n color: #FFFFFF;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.listPrice--summary {\n margin-bottom: 0.25rem;\n font-size: .875rem;\n}\n\n.installments--summary {\n margin-bottom: 2rem;\n font-size: 0.875rem;\n}\n\n.savings--summaryPercentage {\n background: #0f3e99;\n border-radius: 1000px;\n align-items: center;\n display: flex;\n}\n\n.savingsPercentage--summaryPercentage {\n font-size: 0.875rem;\n font-weight: 600;\n vertical-align: baseline;\n color: #FFFFFF;\n padding: 0.25rem 0.5rem 0.25rem 0.5rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_35e223bd
[ { "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 shopper-location-availability-theme/styles/css/vtex.rich-text.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--deals {\n color: #ffffff;\n text-align: center;\n justify-content: center;\n}\n\n.container--shelfTitle {\n color: #727273;\n justify-content: center;\n text-align: center;\n}\n\n.headingLevel2--shelfTitle {\n font-weight: 200;\n}\n\n.container--deals .paragraph {\n margin: 0;\n}\n\n.container--link {\n justify-content: center;\n}\n\n.container--question {\n justify-content: center;\n}\n\n.container--question .paragraph {\n text-align: center;\n max-width: 540px;\n margin: 0 16px;\n padding-top: 120px;\n color: #03034E;\n}\n\n.container--question .strong {\n font-size: 32px;\n line-height: 2rem;\n font-weight: 700;\n}\n\n.container--link .paragraph {\n text-align: center;\n max-width: 540px;\n padding-top: 36px;\n padding-bottom: 84px;\n color: #03034E;\n}\n\n.container--link .strong {\n font-size: 16px;\n font-weight: 700;\n text-transform: uppercase;\n}\n\n.container--link .link {\n text-decoration: none;\n font-size: 36px;\n font-weight: 300;\n color: #03034E;\n}\n\n.container--title {\n color: #03034E;\n font-size: 28px;\n font-weight: 700;\n}\n\n@media only screen and (min-width: 640px) {\n .container--question .strong {\n font-size: 40px;\n line-height: 3rem;\n }\n\n .container--about {\n max-width: 85%;\n }\n\n .container--title {\n color: #03034E;\n font-size: 40px;\n font-weight: 700;\n max-width: 60%;\n }\n\n .container--title .paragraph {\n line-height: 1.3em;\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_cbaa58c9
[ { "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 shopper-location-availability-theme/styles/css/vtex.product-summary.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.skuSelectorContainer--quickview .skuSelectorItemImage .frameAround, .skuSelectorContainer--quickview .skuSelectorItemImage .skuSelectorInternalBox {\n border-radius: 50%;\n}\n\n.container :global(.vtex-modal-layout-0-x-triggerContainer) {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n}\n\n.container:hover :global(.vtex-modal-layout-0-x-triggerContainer) {\n opacity: 1;\n}\n\n@media screen and (max-width: 40em) {\n .container :global(.vtex-modal-layout-0-x-triggerContainer) {\n display: none;\n }\n}\n\n.nameContainer {\n justify-content: start;\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.brandName {\n font-weight: 600;\n font-size: 18px;\n color: #2E2E2E;\n}\n\n.container {\n text-align: start;\n}\n\n.imageContainer {\n text-align: center;\n}\n\n.image {\n border-radius: 0.25rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_f5119efa
[ { "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 shopper-location-availability-theme/styles/css/vtex.modal-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n@media screen and (min-width: 40em) {\n .paper--quickview {\n height: 260px;\n width: 580px;\n }\n\n .actionsContainer--quickview {\n padding: 0 2rem 2rem 2rem;\n }\n}\n\n@media screen and (min-width: 50em) {\n .paper--quickview {\n height: 450px;\n width: 900px;\n }\n}\n\n\n@media screen and (min-width: 75em) {\n .paper--quickview {\n width: calc(100% - 4rem);\n height: auto;\n }\n}\n\n@media screen and (min-width: 82em) {\n .actionsContainer--quickview {\n padding: 0 2.5rem 2.5rem 2.5rem;\n }\n}\n\n.paper--quickview {\n min-width: 320px;\n max-width: 96rem;\n}\n\n.headerContainer--quickview {\n border: none;\n position: absolute;\n right: 0;\n}\n\n.actionsContainer--quickview {\n height: 100%;\n width: 100%;\n transition: box-shadow 150ms ease-in-out, border-top 150ms ease-in-out;\n border-top-style: solid;\n border-top-width: 1px;\n border-top-color: transparent;\n box-shadow: -4px 0px 27px -12px transparent;\n}\n\n.actionsContentWrapper {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: #aaa;\n padding-top: 1.5rem;\n}\n\n.contentContainer--quickviewContent {\n padding: 2.5rem 0 2.5rem 2rem;\n overflow-x: hidden;\n}\n\n.triggerContainer--quickview {\n padding: .75rem;\n}\n\n.triggerContainer {\n outline: none;\n}\n\n.actionsContainer--quickview:not(.actionsContainerEndOfContent--quickview) {\n border-top-color: rgb(238, 238, 238);\n box-shadow: -4px 0px 27px -12px rgba(0,0,0,0.64);\n}\n\n.actionsContainer--quickview:not(.actionsContainerEndOfContent--quickview) .actionsContentWrapper {\n border-top-color: transparent;\n}\n\n.closeButton {\n padding-right: 1rem;\n}\n\n.paper--product-gifts {\n padding: 1.5rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_5ae1bb5c
[ { "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 shopper-location-availability-theme/styles/css/vtex.store-header.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n/* add transitions */\n:global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-store-components-3-x-logoLink),\n:global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-minicart-2-x-openIconContainer),\n:global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-store-components-3-x-searchBarContainer) {\n transition: all 0.3s ease;\n display: block;\n}\n\n/* desktop/mobile main header padding and background transitions */\n:global(.vtex-flex-layout-0-x-flexRowContent--main-header),\n:global(.vtex-flex-layout-0-x-flexRowContent--main-header-mobile) {\n transition: background 0.3s ease;\n will-change: padding, background;\n}\n\n/* main header desktop has a bigger padding when not stuck */\n:global(.vtex-flex-layout-0-x-flexRowContent--main-header) {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n/* add a box-shadow to desktop/mobile header when stuck */\n:global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header),\n:global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header-mobile) {\n box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);\n}\n\n/*\n * remove the extra padding when stuck from the desktop header\n * we add a transition only when \"stuck\" for the \"unstick\" step seem faster\n */\n:global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header) {\n transition: padding 0.3s ease, background 0.3s ease;\n padding-top: 0;\n padding-bottom: 0;\n}\n\n/* if supported add some translucency to the desktop/mobile header background */\n@supports (backdrop-filter: blur(5px)) {\n :global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header),\n :global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header-mobile) {\n backdrop-filter: blur(8px);\n }\n\n /* header background when stuck and not hovered */\n :global(.vtex-sticky-layout-0-x-wrapper--stuck):not(:hover)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header),\n :global(.vtex-sticky-layout-0-x-wrapper--stuck):not(:hover)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header-mobile) {\n background: rgba(240, 240, 240, 0.8);\n }\n}\n\n/* stick wrapper with the same color as the desktop/mobile header */\n:global(.vtex-sticky-layout-0-x-wrapper--sticky-header) {\n background-color: #f0f0f0;\n}\n\n/* resize the logo for neat effect */\n:global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-store-components-3-x-logoLink) {\n transform: scale(0.85);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-store-components-3-x-logoLink),\n :global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-minicart-2-x-openIconContainer),\n :global(.vtex-sticky-layout-0-x-container)\n :global(.vtex-store-components-3-x-searchBarContainer),\n :global(.vtex-sticky-layout-0-x-wrapper--stuck)\n :global(.vtex-flex-layout-0-x-flexRowContent--main-header) {\n transition: none;\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_e4b75ab0
[ { "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 shopper-location-availability-theme/styles/css/vtex.store-components.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.notificationBarContainer {\n background-color: #e6f1e6;\n color: #03034e;\n font-weight: 700;\n font-size: 12px;\n text-decoration: underline;\n}\n\n.infoCardContainer--info-card-home {\n max-width: 1520px;\n margin: 0 auto;\n background-color: #e6f1e6;\n padding: 0px;\n}\n\n.newsletter {\n background-color: #03054e;\n max-width: 1528px;\n margin: 0 auto;\n}\n\n.newsletter .container {\n padding: 60px 10px;\n}\n\n.label {\n color: #fff;\n font-size: 26px;\n}\n\n.inputGroup {\n padding-bottom: 4px;\n display: flex;\n color: #fff;\n}\n\n.inputGroup :global(.vtex-styleguide-9-x-hideDecorators) {\n background-color: transparent;\n color: #fff;\n border: none;\n}\n\n.inputGroup :global(.vtex-styleguide-9-x-hideDecorators)::placeholder {\n color: #fff;\n font-size: 16px;\n}\n\n.inputGroup :global(.vtex-button) {\n background-color: transparent;\n color: #fff;\n border: none;\n margin-right: -24px;\n}\n\n.buttonContainer {\n padding-top: 0px;\n}\n\n.imageElement--storePrint {\n max-height: 300px;\n margin-bottom: 20px;\n}\n\n.skuSelectorContainer {\n margin: 1rem 0;\n}\n\n@media only screen and (min-width: 640px) {\n .newsletter .container {\n padding: 140px;\n }\n .label {\n font-size: 40px;\n }\n .infoCardContainer--info-card-home .infoCardTextContainer {\n width: 30%;\n }\n .infoCardContainer--info-card-home .infoCardImageContainer {\n width: 70%;\n }\n .imageElement--storePrint {\n margin-bottom: 0px;\n max-height: 600px;\n }\n}\n\n.productImagesContainer--quickview .carouselContainer {\n justify-content: flex-start;\n}\n\n.productImagesContainer--quickview .productImageTag {\n object-fit: cover !important;\n}\n\n.productImagesContainer--quickview .carouselGaleryThumbs {\n display: none;\n}\n\n.productImagesContainer--quickview .carouselGaleryCursor {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.productNameContainer {\n color: #3f3f40;\n font-weight: bold;\n font-size: 30px;\n}\n\n.image {\n image-rendering: -webkit-optimize-contrast;\n}\n\n```" } ]
code_shopper-location-availability-theme_c1d4523b
[ { "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 shopper-location-availability-theme/styles/css/vtex.store-footer.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.row--menu-row {\n padding-right: 24px;\n}\n\n.row--menu-row .rowContainer {\n align-items: flex-start;\n}\n\n.row--payment-methods {\n padding-top: 16px;\n}\n\n```" } ]
code_shopper-location-availability-theme_e329553b
[ { "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 shopper-location-availability-theme/styles/css/vtex.product-identifier.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.product-identifier--productReference {\n margin-bottom: 1rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_a6fd2611
[ { "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 shopper-location-availability-theme/styles/css/vtex.reviews-and-ratings.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n max-width: 96rem;\n padding-left: .5rem;\n padding-right: .5rem;\n}\n\n.inlineContainer {\n margin-left: 0rem;\n}\n\n.star--filled {\n color: #FFB100;\n}\n\n.star--empty {\n color: #FFB100;\n}\n\n```" } ]
code_shopper-location-availability-theme_e1c44228
[ { "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 shopper-location-availability-theme/styles/css/vtex.product-highlights.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.productHighlightWrapper--collection {\n position: absolute;\n top: 10px;\n left: 5px;\n width: 200px;\n}\n\n.productHighlightText {\n background: antiquewhite;\n border-radius: 20px;\n padding: 5px 10px;\n}\n\n```" } ]
code_shopper-location-availability-theme_f89868f8
[ { "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 shopper-location-availability-theme/styles/css/vtex.flex-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRowContent--menu-link,\n.flexRowContent--main-header {\n padding: 0 0.5rem;\n}\n\n@media screen and (min-width: 40em) {\n .flexRowContent--menu-link,\n .flexRowContent--main-header {\n padding: 0 1rem;\n }\n}\n\n@media screen and (min-width: 80rem) {\n .flexRowContent--menu-link,\n .flexRowContent--main-header {\n padding: 0 0.25rem;\n }\n}\n\n.flexRowContent--menu-link {\n background-color: #03044e;\n color: #fff;\n}\n\n.flexRowContent--main-header {\n background-color: #f0f0f0;\n}\n\n.flexRowContent--main-header-mobile {\n align-items: center;\n padding: 0.625rem 0.5rem;\n background-color: #f0f0f0;\n}\n\n.flexRowContent--menu-link :global(.vtex-menu-2-x-styledLink) {\n color: #ffffff;\n font-size: 14px;\n}\n\n.flexRowContent--main-header :global(.vtex-menu-2-x-styledLink) {\n color: #727273;\n font-size: 14px;\n}\n\n.flexRow--deals {\n background-color: #0F3E99;\n padding: 14px 0px;\n}\n\n.flexRow--deals .stretchChildrenWidth {\n align-items: center;\n}\n\n.flexRow--deals .flexCol {\n align-items: center;\n margin-bottom: 5px;\n padding-top: 5px;\n}\n\n.flexCol--filterCol {\n max-width: 500px;\n min-width: 230px;\n}\n\n.flexCol--productCountCol {\n align-items: flex-start;\n}\n\n.flexCol--orderByCol {\n align-items: flex-end;\n}\n\n.flexCol--orderByMobileCol {\n width: 42%;\n}\n\n.flexCol--filterMobileCol {\n width: 38%;\n}\n\n.flexRow--quickviewMainRow {\n display: flex;\n max-height: 100%;\n}\n\n.flexColChild--quickviewDetails:first-child {\n overflow-y: auto;\n height: 66% !important;\n overflow-x: hidden;\n}\n\n.flexColChild--quickviewDetails:last-child {\n height: 34% !important;\n}\n\n.flexRow--addToCartRow {\n padding-bottom: 1rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_069f2693
[ { "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 shopper-location-availability-theme/styles/css/vtex.carousel.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.containerImg {\n background-color: #f0f0f0;\n}\n\n.containerImg .img {\n max-width: 100%;\n}\n\n```" } ]
code_shopper-location-availability-theme_dcbabd1f
[ { "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 shopper-location-availability-theme/styles/css/vtex.search-result.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.galleryLayoutOptionButton {\n background-color: #F0F0F0;\n color: #3F3F40;\n padding: 0.375rem 0.75rem 0.375rem 0.75rem;\n}\n\n.galleryLayoutOptionButton--selected {\n background-color: #3F3F40;\n color: #FFFFFF;\n}\n\n.galleryLayoutSwitcher {\n border-radius: 4px 4px 4px 4px;\n justify-content: center;\n overflow: hidden;\n width: auto !important;\n align-self: center\n}\n\n.galleryItem--list {\n border-bottom: 1px #E7E9EE solid;\n}\n\n```" } ]
code_shopper-location-availability-theme_2e5c8a14
[ { "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 shopper-location-availability-theme/styles/css/vtex.slider-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.sliderLayoutContainer {\n justify-content: center;\n}\n\n.sliderLayoutContainer--carousel {\n background-color: #F0F0F0;\n min-height: 450px;\n}\n\n.sliderTrackContainer {\n max-width: 100%;\n}\n\n.paginationDotsContainer {\n margin-top: .5rem;\n margin-bottom: .5rem;\n}\n\n.layoutContainer--shelf {\n margin-top: 20px;\n margin-bottom: 20px;\n max-width: 96rem;\n min-height: 550px;\n}\n\n.slide--shelf {\n margin-bottom: 25px;\n padding-left: .5rem;\n padding-right: .5rem;\n min-height: 550px;\n}\n\n```" } ]
code_shopper-location-availability-theme_16adfd8a
[ { "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 shopper-location-availability-theme/styles/css/vtex.stack-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.stackItem--product {\n width: 100%;\n min-height: 257px\n}\n\n.stackItem--quickview {\n right: 0;\n top: 0;\n left: auto;\n}\n\n```" } ]
code_shopper-location-availability-theme_da0c9746
[ { "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 shopper-location-availability-theme/styles/configs/style.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [\n 3, 2.25, 1.5, 1.25, 1, 0.875, 0.75\n ],\n \"spacing\": [0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 8, 16],\n \"customMedia\": [\n { \"s\": 20 },\n { \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n { \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n { \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n { \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#03044e\",\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#f2f4f5\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-background\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#d2defc\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"link\": \"#0F3E99\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#979899\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"visited-text\": {\n \"link\": \"#0c389f\"\n },\n \"hover-text\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"active-text\": {\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"border\": {\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#e3e4e6\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-border\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-border\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#d2defc\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"disabled\": \"#979899\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\",\n \"muted-1\": \"#ffffff\",\n \"muted-2\": \"#ffffff\",\n \"muted-3\": \"#3f3f40\",\n \"muted-4\": \"#3f3f40\",\n \"muted-5\": \"#3f3f40\"\n },\n \"hover-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n },\n \"active-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n }\n },\n \"borderWidths\": [0, 0.125, 0.25, 0.5, 1, 2],\n \"borderRadius\": [0, 0.125, 0.25, 0.5, 1],\n \"widths\": [1, 2, 4, 8, 16],\n \"maxWidths\": [1, 2, 4, 8, 16, 32, 48, 64, 96],\n \"heights\": [1, 2, 4, 8, 16],\n \"sizes\": [\n {\"name\": \"small\", \"value\": 2},\n {\"name\": \"regular\", \"value\": 2.5},\n {\"name\": \"large\", \"value\": 3}\n ],\n \"typography\":{\n \"measure\": [30, 34, 20],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"3rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-2\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"2.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-3\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"1.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-4\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.5rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-5\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-6\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"body\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"small\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"San Francisco, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"code\": {\n \"fontFamily\": \"Consolas, monaco, monospace\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n }\n }\n },\n \"opacity\": [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.025, 0]\n}\n\n```" } ]
code_shopper-location-availability-theme_6868828a
[ { "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 shopper-location-availability-theme/styles/css/contact/vtex.flex-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRowContent--contact {\n max-width: 700px;\n margin: auto;\n}\n\n.flexRowContent--contact :global(.vtex-input__label),\n.flexRowContent--contact :global(.vtex-textarea__label) {\n font-size: 1rem;\n color: #3f3f40;\n}\n\n.flexRowContent--contact :global(.vtex-input),\n.flexRowContent--contact :global(.vtex-textarea) {\n display: block;\n margin-bottom: 1rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_3d8b45c3
[ { "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 shopper-location-availability-theme/styles/css/faq/vtex.flex-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRowContent--faq {\n max-width: 700px;\n margin: auto;\n}\n\n```" } ]
code_shopper-location-availability-theme_eb2d9113
[ { "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 shopper-location-availability-theme/styles/css/faq/vtex.disclosure-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.trigger--question {\n display: flex;\n align-items: center;\n cursor: pointer;\n outline: none;\n}\n\n.trigger--question :global(.vtex-rich-text-0-x-paragraph) {\n font-weight: bold;\n}\n\n.trigger--question:focus,\n.trigger--question:focus :global(.vtex-rich-text-0-x-paragraph) {\n color: #0F3E99;\n}\n\n.trigger :global(.vtex-store-icons-0-x-caretIcon) {\n margin-right: 1rem;\n}\n\n.content--answer {\n transition: opacity 250ms ease-in-out, height 250ms ease-in-out, transform 250ms ease-in-out;\n opacity: 0;\n height: 0;\n transform: translate3d(0, -10%, 0);\n}\n\n.content--answer[data-enter] {\n opacity: 1;\n height: fit-content;\n transform: translate3d(0, 0, 0);\n}\n\n.content--answer[data-leave] {\n height: 0;\n overflow: hidden;\n}\n\n```" } ]
code_shopper-location-availability-theme_a440be15
[ { "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 shopper-location-availability-theme/styles/css/search/vtex.rich-text.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--layout-option {\n margin-left: 0.3em;\n}\n\n.paragraph--layout-option {\n margin: 0;\n}\n\n.paragraph--summarySpecificationBullet {\n margin: 0;\n line-height: initial;\n font-size: 1.25rem;\n line-height: 1.15rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_3ba83eac
[ { "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 shopper-location-availability-theme/styles/css/search/vtex.product-summary.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.nameContainer--summaryListDesktop {\n padding-top: 0.25rem;\n padding-bottom: 0.75rem;\n justify-content: start;\n}\n\n.nameContainer--summaryListMobile {\n padding-top: 0.25rem;\n padding-bottom: 0.5rem;\n justify-content: start;\n}\n\n.brandName--summaryListMobile {\n font-weight: 400;\n font-size: 0.875rem;\n color: black;\n}\n\n.container--listLayout {\n max-width: none !important;\n}\n\n.image--summaryListDesktop {\n width: 180px !important;\n}\n\n.image--summaryListMobile {\n width: 140px !important;\n min-width: 140px;\n height: inherit !important;\n}\n\n```" } ]
code_shopper-location-availability-theme_ca7dac8d
[ { "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 shopper-location-availability-theme/styles/css/search/vtex.store-components.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.productBrandName--summaryListDesktop {\n text-decoration: none;\n font-weight: 500;\n color: #0067C7;\n font-size: .875rem;\n}\n\n.productBrandName--summaryListMobile {\n text-decoration: none;\n color: #0067C7;\n font-size: .875rem;\n}\n\n```" } ]
code_shopper-location-availability-theme_b58f2edf
[ { "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 shopper-location-availability-theme/styles/css/search/vtex.flex-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRow--orderByAndSwitcher {\n padding-right: 1.5em;\n}\n\n.flexRowContent--savingsSummaryListDesktop {\n justify-content: flex-start;\n}\n\n.flexCol--summaryRightListDesktop {\n justify-content: space-around;\n}\n\n.flexRow--buyNowButton :global(.vtex-button) {\n background: #eef3f7;\n border-color:#eef3f7;\n color: #0f3e99;\n}\n\n.flexRow--buyNowButton:hover :global(.vtex-button) {\n background: #dbe9fd;\n border-color:#dbe9fd;\n}\n\n.flexCol--productRating {\n margin-bottom: 3rem;\n}\n\n.flexCol--summaryDetailsListMobile {\n justify-content: space-between;\n}\n\n.flexCol--summaryUpDetailsListMobile {\n margin-bottom: 0.25rem\n}\n\n```" } ]
code_shopper-location-availability-theme_4957285a
[ { "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 shopper-location-availability-theme/styles/css/product-specification-table/vtex.flex-layout.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.flexRow--productSpecificationGroup:not(:first-child) {\n margin-top: 1.5rem;\n}\n\n.flexRow--productSpecificationGroupName {\n background-color: #eaeaea;\n padding: 0.5rem 1rem;\n}\n\n.flexCol--productSpecificationName {\n padding: 1rem;\n}\n\n.flexCol--productSpecificationValue {\n padding: 1rem 1rem 1rem 0;\n}\n\n.flexRow--productSpecification:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n```" } ]
code_shopper-location-availability-theme_a3be4dd6
[ { "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 shopper-location-availability-theme/styles/css/product-specification-table/vtex.product-specifications.css from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.groupName {\n font-size: 1.25rem;\n}\n\n.specificationName {\n font-weight: bold;\n}\n\n```" } ]
code_shopper-location-availability-theme_c7405529
[ { "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 shopper-location-availability-theme/store/blocks/about-us.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#about-us\": {\n \"blocks\": [\n \"flex-layout.row#about-us\",\n \"video#about-us\"\n ]\n },\n\n \"flex-layout.row#about-us\": {\n \"children\": [\n \"image#mobile-phone\",\n \"flex-layout.col#text-about-us\"\n ]\n },\n\n \"flex-layout.col#text-about-us\": {\n \"children\": [\n \"rich-text#title-about-us\",\n \"rich-text#about-us\"\n ],\n \"props\": {\n \"blockclass\": \"textColumn\",\n \"preventVerticalStretch\": true\n }\n },\n\n \"rich-text#title-about-us\": {\n \"props\": {\n \"text\":\n \"# Create meaningful and relevant experiences.\",\n \"blockClass\": \"title\"\n }\n },\n\n \"image#mobile-phone\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/mobile-phone.png\",\n \"maxHeight\": \"\",\n \"maxWidth\": \"\",\n \"blockClass\": \"storePrint\"\n }\n },\n \"video#about-us\": {\n \"props\": {\n \"src\": \"https://www.youtube.com/embed/JgkrlaF52WQ\",\n \"width\": \"100%\",\n \"height\": \"100%\"\n }\n },\n \"rich-text#about-us\": {\n \"props\": {\n \"text\": \"**Optimized store framework** \\n Free your front-end with our React + Node store framework. Improve usability and SEO, while driving more conversion with modular components, single page applications, and a ready-for-PWA structure. \\n **Multi-currency and language** \\n Go international with multiple storefronts to support different languages and easily manage local currencies and payment conditions. \\n **Serverless development platform** \\n Reduce loading time, improve usability, and make the best out of SEO. Developing scalable components with a comprehensive, easy-to-use toolset, you can build stores faster than ever.\",\n \"blockClass\": \"about\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_e983eb0d
[ { "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 shopper-location-availability-theme/store/blocks/product-price.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"flex-layout.row#selling-price\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 4\n },\n \"children\": [\n \"product-selling-price\"\n ]\n },\n\n \"flex-layout.row#list-price-savings\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 2,\n \"marginTop\": 5\n },\n \"children\": [\n \"product-list-price\",\n \"product-price-savings\"\n ]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_5d43c936
[ { "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 shopper-location-availability-theme/store/blocks/minicart.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"add-to-cart-button\": {\n \"props\": {\n \"addToCartFeedback\": \"customEvent\",\n \"customPixelEventId\": \"add-to-cart-button\"\n }\n },\n\n \"minicart.v2\": {\n \"props\": {\n \"customPixelEventId\": \"add-to-cart-button\"\n },\n \"children\": [\"minicart-base-content\"]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_8bb9b9b0
[ { "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 shopper-location-availability-theme/store/blocks/search.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.search\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"skusFilter\": \"ALL\",\n \"simulationBehavior\": \"skip\"\n }\n }\n },\n\n \"store.search#brand\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"orderByField\": \"OrderByReleaseDateDESC\",\n \"hideUnavailableItems\": true,\n \"maxItemsPerPage\": 10,\n \"skusFilter\": \"ALL\",\n \"simulationBehavior\": \"skip\"\n }\n }\n },\n\n \"store.search#department\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"skusFilter\": \"ALL\",\n \"simulationBehavior\": \"skip\"\n }\n }\n },\n\n \"store.search#category\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"skusFilter\": \"ALL\",\n \"simulationBehavior\": \"skip\"\n }\n }\n },\n\n \"store.search#subcategory\": {\n \"blocks\": [\"search-result-layout\"],\n \"props\": {\n \"context\": {\n \"skusFilter\": \"ALL\",\n \"simulationBehavior\": \"skip\"\n }\n }\n },\n\n \"search-result-layout\": {\n \"blocks\": [\n \"search-result-layout.desktop\",\n \"search-result-layout.mobile\",\n \"search-not-found-layout\"\n ]\n },\n\n \"search-result-layout.desktop\": {\n \"children\": [\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#searchtitle\",\n \"flex-layout.row#result\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"preventRouteChange\": false,\n \"defaultGalleryLayout\": \"grid\"\n }\n },\n \"flex-layout.row#searchbread\": {\n \"children\": [\"breadcrumb.search\"],\n \"props\": {\n \"preserveLayoutOnMobile\": true,\n \"fullWidth\": true\n }\n },\n \"flex-layout.row#searchtitle\": {\n \"children\": [\"search-title.v2\"]\n },\n \"flex-layout.row#result\": {\n \"children\": [\"flex-layout.col#filter\", \"flex-layout.col#content\"],\n \"props\": {\n \"preventHorizontalStretch\": true,\n \"fullWidth\": true\n }\n },\n \"flex-layout.col#filter\": {\n \"children\": [\"filter-navigator.v3\"],\n \"props\": {\n \"blockClass\": \"filterCol\"\n }\n },\n \"flex-layout.col#content\": {\n \"children\": [\n \"flex-layout.row#searchinfo\",\n \"flex-layout.row#fetchprevious\",\n \"flex-layout.row#products\",\n \"flex-layout.row#fetchmore\"\n ],\n \"props\": {\n \"width\": \"grow\",\n \"preventVerticalStretch\": true\n }\n },\n \"flex-layout.row#searchinfo\": {\n \"children\": [\"flex-layout.col#productCount\", \"flex-layout.row#orderByAndSwitcher\"]\n },\n \"flex-layout.row#orderByAndSwitcher\": {\n \"children\": [\"order-by.v2\", \"gallery-layout-switcher\"],\n \"props\": {\n \"horizontalAlign\": \"right\",\n \"preventHorizontalStretch\": true,\n \"blockClass\": \"orderByAndSwitcher\",\n \"colGap\": 3\n }\n },\n \"flex-layout.col#productCount\": {\n \"children\": [\"total-products.v2\"],\n \"props\": {\n \"blockClass\": \"productCountCol\"\n }\n },\n \"flex-layout.row#fetchprevious\": {\n \"props\": {\n \"marginBottom\": 3\n },\n \"children\": [\"search-fetch-previous\"]\n },\n \"flex-layout.row#fetchmore\": {\n \"props\": {\n \"marginTop\": 3\n },\n \"children\": [\"search-fetch-more\"]\n },\n \"search-fetch-previous\": {\n \"props\": {\n \"htmlElementForButton\": \"a\"\n }\n },\n \"search-fetch-more\": {\n \"props\": {\n \"htmlElementForButton\": \"a\"\n }\n },\n \"flex-layout.row#products\": {\n \"children\": [\"search-content\"]\n },\n \"search-content\": {\n \"blocks\": [\"gallery\", \"not-found\"]\n },\n\n \"search-result-layout.mobile\": {\n \"children\": [\n \"flex-layout.row#searchinfomobile\",\n \"flex-layout.row#searchbread\",\n \"flex-layout.row#productCountMobile\",\n \"flex-layout.row#fetchprevious\",\n \"flex-layout.row#contentmobile\",\n \"flex-layout.row#fetchmore\"\n ],\n \"props\": {\n \"pagination\": \"show-more\",\n \"mobileLayout\": {\n \"mode1\": \"small\",\n \"mode2\": \"normal\"\n },\n \"defaultGalleryLayout\": \"grid\"\n }\n },\n \"flex-layout.row#contentmobile\": {\n \"children\": [\"search-content\"],\n \"props\": {\n \"preserveLayoutOnMobile\": true\n }\n },\n\n \"flex-layout.row#searchinfomobile\": {\n \"children\": [\n \"flex-layout.col#orderByMobile\",\n \"flex-layout.col#filterMobile\",\n \"flex-layout.col#switcherMobile\"\n ],\n \"props\": {\n \"preserveLayoutOnMobile\": true,\n \"colSizing\": \"auto\",\n \"colJustify\": \"around\"\n }\n },\n\n \"flex-layout.col#orderByMobile\": {\n \"children\": [\"order-by.v2\"],\n \"props\": {\n \"blockClass\": \"orderByMobileCol\"\n }\n },\n\n \"flex-layout.row#productCountMobile\": {\n \"children\": [\"total-products.v2\"],\n \"props\": {\n \"blockClass\": \"productCountMobileRow\"\n }\n },\n\n \"flex-layout.col#filterMobile\": {\n \"children\": [\"filter-navigator.v3\"],\n \"props\": {\n \"blockClass\": \"filterMobileCol\"\n }\n },\n \"flex-layout.col#switcherMobile\": {\n \"children\": [\"gallery-layout-switcher\"],\n \"props\": {\n \"verticalAlign\": \"middle\"\n }\n },\n \"search-not-found-layout\": {\n \"children\": [\"flex-layout.row#searchbread\", \"flex-layout.row#notfound\"]\n },\n\n \"flex-layout.row#notfound\": {\n \"children\": [\"not-found\"],\n \"props\": {\n \"fullWidth\": true\n }\n },\n\n \"breadcrumb\": {\n \"props\": {\n \"showOnMobile\": true\n }\n },\n\n \"gallery\": {\n \"props\": {\n \"layouts\": [\n {\n \"name\": \"grid\",\n \"component\": \"GridSummary\",\n \"itemsPerRow\": {\n \"(min-width:1300px)\": 4,\n \"desktop\": 3,\n \"tablet\": 3,\n \"phone\": 2\n }\n },\n {\n \"name\": \"list\",\n \"component\": \"ListSummary\",\n \"itemsPerRow\": 1\n }\n ],\n \"ListSummary\": \"product-summary.shelf#listLayout\",\n \"GridSummary\": \"product-summary.shelf\"\n }\n },\n \"gallery-layout-switcher\": {\n \"children\": [\n /*\n * For accessbility to work properly,\n * It's important to define the options in the same order as the layouts\n */\n \"gallery-layout-option#grid\",\n \"gallery-layout-option#list\"\n ]\n },\n \"gallery-layout-option#grid\": {\n \"props\": {\n \"name\": \"grid\"\n },\n \"children\": [\n \"icon-grid\",\n \"responsive-layout.desktop#textOptionGrid\"\n ]\n },\n \"gallery-layout-option#list\": {\n \"props\": {\n \"name\": \"list\"\n },\n \"children\": [\n \"icon-inline-grid\",\n \"responsive-layout.desktop#textOptionList\"\n ]\n },\n \"responsive-layout.desktop#textOptionGrid\": {\n \"children\": [\n \"rich-text#option-grid\"\n ]\n },\n \"responsive-layout.desktop#textOptionList\": {\n \"children\": [\n \"rich-text#option-list\"\n ]\n },\n \"rich-text#option-grid\": {\n \"props\": {\n \"text\": \"Grid\",\n \"textColor\": \"c-auto\",\n \"blockClass\": \"layout-option\"\n }\n },\n \"rich-text#option-list\": {\n \"props\": {\n \"text\": \"List\",\n \"textColor\": \"c-auto\",\n \"blockClass\": \"layout-option\"\n }\n },\n \"flex-layout.row#header-desktop\": {\n \"props\": {\n \"blockClass\": \"main-header\",\n \"horizontalAlign\": \"center\",\n \"verticalAlign\": \"center\",\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true,\n \"fullWidth\": true\n },\n \"children\": [\n \"flex-layout.col#logo-desktop\",\n \"flex-layout.col#category-menu\",\n \"flex-layout.col#spacer\",\n \"shopper-location\",\n \"search-bar\",\n \"locale-switcher\",\n \"login\",\n \"minicart.v2\"\n ]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_d5bcda98
[ { "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 shopper-location-availability-theme/store/blocks/contact.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#contact-us\": {\n \"children\": [\n \"flex-layout.row#contact-us\"\n ]\n },\n\n \"flex-layout.row#contact-us\": {\n \"props\": {\n \"blockClass\": \"contact\"\n },\n \"children\": [\n \"flex-layout.col#contact-us\"\n ]\n },\n\n \"flex-layout.col#contact-us\": {\n \"children\": [\n \"rich-text#contact-us\",\n \"form#contact-us\"\n ]\n },\n \"rich-text#contact-us\": {\n \"props\": {\n \"text\": \"## Contact Us\"\n }\n },\n\n \"form#contact-us\": {\n \"props\": {\n \"entity\": \"contact\",\n \"schema\": \"site-contact\"\n },\n \"blocks\": [\n \"form-success#contact-us\"\n ],\n \"children\": [\n \"form-input.text#title\",\n \"form-input.text#name\",\n \"form-input.text#email\",\n \"form-input.textarea#message\",\n \"form-submit#contact\"\n ]\n },\n\n \"form-success#contact-us\": {\n \"children\": [\n \"rich-text#success-submit\"\n ]\n },\n \"rich-text#success-submit\": {\n \"props\": {\n \"text\": \"Thanks for reaching out! We will come back shortly.\",\n \"textAlignment\": \"CENTER\",\n \"textPosition\": \"CENTER\"\n }\n },\n\n \"form-input.text#title\": {\n \"props\": {\n \"pointer\": \"#/properties/title\"\n }\n },\n \"form-input.text#name\": {\n \"props\": {\n \"pointer\": \"#/properties/name\"\n }\n },\n \"form-input.text#email\": {\n \"props\": {\n \"pointer\": \"#/properties/email\"\n }\n },\n \"form-input.textarea#message\": {\n \"props\": {\n \"pointer\": \"#/properties/message\"\n }\n },\n\n \"form-submit#contact\": {\n \"props\": {\n \"label\": \"Submit\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_fa790673
[ { "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 shopper-location-availability-theme/store/blocks/orderplaced.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"order-placed\": {\n \"blocks\": [\"op-header\", \"op-order\"]\n },\n \"op-header\": {\n \"children\": [\n \"op-section#confirmation\",\n \"op-section#notices\",\n \"op-summary-section\",\n \"op-bank-invoice-section\"\n ]\n },\n \"op-section#confirmation\": {\n \"props\": {\n \"name\": \"confirmation\",\n \"marginBottom\": 9,\n \"borderless\": true\n },\n \"children\": [\n \"op-confirmation-icon\",\n \"op-confirmation-title\",\n \"op-confirmation-message\",\n \"flex-layout.row#confirmation-buttons\"\n ]\n },\n \"flex-layout.row#confirmation-buttons\": {\n \"props\": {\n \"blockClass\": \"confirmationButtons\",\n \"marginTop\": 8,\n \"marginBottom\": 8,\n \"horizontalAlign\": \"center\",\n \"preventHorizontalStretch\": true,\n \"preserveLayoutOnMobile\": true\n },\n \"children\": [\"flex-layout.col#confirmation-buttons\"]\n },\n \"flex-layout.col#confirmation-buttons\": {\n \"children\": [\"op-print-button\"]\n },\n \"op-section#notices\": {\n \"props\": {\n \"name\": \"notices\",\n \"marginBottom\": 9,\n \"borderless\": true\n },\n \"children\": [\"op-notices\"]\n },\n // each order section\n \"op-order\": {\n \"children\": [\n \"flex-layout.row#order-header\",\n \"op-order-split-notice\",\n \"op-order-customer\",\n \"op-section#payments\",\n \"op-section#pickup-packages\",\n \"op-section#delivery-packages\",\n \"op-order-takeaway-packages\",\n \"op-order-total\"\n ]\n },\n // each order header\n \"flex-layout.row#order-header\": {\n \"props\": {\n \"fullWidth\": true,\n \"colSizing\": \"auto\",\n \"colGap\": 5,\n \"marginBottom\": 5\n },\n \"children\": [\n \"flex-layout.col#order-header-info\",\n \"flex-layout.col#order-header-options\"\n ]\n },\n \"flex-layout.col#order-header-info\": {\n \"children\": [\"op-order-number\", \"op-order-datetime\", \"op-order-seller\"]\n },\n \"flex-layout.col#order-header-options\": {\n \"children\": [\"responsive-layout.desktop#order-options-desktop\"]\n },\n \"responsive-layout.desktop#order-options-desktop\": {\n \"children\": [\"op-order-options\"]\n },\n // payment section\n \"op-section#payments\": {\n \"props\": {\n \"name\": \"paymentMethods\"\n },\n \"children\": [\n \"op-order-payment\",\n \"responsive-layout.mobile#order-options-mobile\"\n ]\n },\n // bottom of top section of order header\n \"responsive-layout.mobile#order-options-mobile\": {\n \"children\": [\"op-order-options#mobile\"]\n },\n \"op-order-options#mobile\": {\n \"props\": {\n \"blockClass\": \"mobile\",\n \"fullWidth\": true\n }\n },\n \"op-section#pickup-packages\": {\n \"props\": {\n \"name\": \"pickupPackages\"\n },\n \"children\": [\"op-order-pickup-packages\"]\n },\n \"op-section#delivery-packages\": {\n \"props\": {\n \"name\": \"deliveryPackages\"\n },\n \"children\": [\"op-order-delivery-packages\"]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_b9222444
[ { "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 shopper-location-availability-theme/store/blocks/faq.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#faq\": {\n \"children\": [\n \"flex-layout.row#faq\"\n ]\n },\n\n \"flex-layout.row#faq\": {\n \"props\": {\n \"blockClass\": \"faq\"\n },\n \"children\": [\n \"flex-layout.col#faq\"\n ]\n },\n\n \"flex-layout.col#faq\": {\n \"children\": [\n \"rich-text#faq\",\n \"disclosure-layout-group#group\"\n ]\n },\n \"rich-text#faq\": {\n \"props\": {\n \"text\": \"## FAQ\"\n }\n },\n\n \"disclosure-layout-group#group\": {\n \"children\": [\n \"disclosure-layout#first\",\n \"disclosure-layout#second\",\n \"disclosure-layout#third\",\n \"disclosure-layout#fourth\"\n ]\n },\n\n \"disclosure-layout#first\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#first\", \"disclosure-content#first\"]\n },\n \"disclosure-trigger#first\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question1\"]\n },\n \"disclosure-content#first\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer1\"]\n },\n \"rich-text#question1\": {\n \"props\": {\n \"text\": \"How can I change my shipping address?\"\n }\n },\n \"rich-text#answer1\": {\n \"props\": {\n \"text\": \"Call us at the number (212) 1234-1234.\"\n }\n },\n\n \"disclosure-layout#second\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#second\", \"disclosure-content#second\"]\n },\n \"disclosure-trigger#second\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question2\"]\n },\n \"disclosure-content#second\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer2\"]\n },\n \"rich-text#question2\": {\n \"props\": {\n \"text\": \"How can I track my order?\"\n }\n },\n \"rich-text#answer2\": {\n \"props\": {\n \"text\": \"After logging into your account, you can find this info at the link Orders.\"\n }\n },\n\n\n \"disclosure-layout#third\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#third\", \"disclosure-content#third\"]\n },\n \"disclosure-trigger#third\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question3\"]\n },\n \"disclosure-content#third\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer3\"]\n },\n \"rich-text#question3\": {\n \"props\": {\n \"text\": \"How can I change my shipping address?\"\n }\n },\n \"rich-text#answer3\": {\n \"props\": {\n \"text\": \"Call us at the number (212) 1234-1234.\"\n }\n },\n\n\n \"disclosure-layout#fourth\": {\n \"props\": {\n \"animated\": true\n },\n \"children\": [\"disclosure-trigger#fourth\", \"disclosure-content#fourth\"]\n },\n \"disclosure-trigger#fourth\": {\n \"props\": {\n \"blockClass\": \"question\",\n \"as\": \"div\"\n },\n \"children\": [\"disclosure-state-indicator\", \"rich-text#question4\"]\n },\n \"disclosure-content#fourth\": {\n \"props\": {\n \"blockClass\": \"answer\"\n },\n \"children\": [\"rich-text#answer2\"]\n },\n \"rich-text#question4\": {\n \"props\": {\n \"text\": \"How can I track my order?\"\n }\n },\n \"rich-text#answer4\": {\n \"props\": {\n \"text\": \"After logging into your account, you can find this info at the link Orders.\"\n }\n },\n\n\n \"disclosure-state-indicator\": {\n \"props\": {\n \"Show\": \"icon-caret#down\",\n \"Hide\": \"icon-caret#up\"\n }\n },\n \"icon-caret#down\": {\n \"props\": {\n \"orientation\": \"down\"\n }\n },\n \"icon-caret#up\": {\n \"props\": {\n \"orientation\": \"up\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_a2a888e2
[ { "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 shopper-location-availability-theme/store/blocks/home/home.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.home\": {\n \"blocks\": [\n \"list-context.image-list#demo\",\n /* You can make references to blocks defined in other files.\n * For example, `flex-layout.row#deals` is defined in the `deals.json` file. */\n \"flex-layout.row#deals\",\n \"__fold__\",\n \"rich-text#shelf-title\",\n \"flex-layout.row#shelf\",\n \"info-card#home\",\n \"rich-text#question\",\n \"rich-text#link\",\n \"newsletter\"\n ]\n },\n\n \"list-context.image-list#demo\": {\n \"children\": [\"slider-layout#demo-images\"],\n \"props\": {\n \"height\": 570,\n \"preload\": true,\n \"images\": [\n {\n \"image\": \"https://storecomponents.vteximg.com.br/arquivos/Class&Style-desktop.png\",\n \"mobileImage\": \"https://storecomponents.vteximg.com.br/arquivos/Class&Style-mobile.png\"\n },\n {\n \"image\": \"https://storecomponents.vteximg.com.br/arquivos/banner-decoration.png\",\n \"mobileImage\": \"https://storecomponents.vteximg.com.br/arquivos/banner-decoration-mobile.png\"\n }\n ]\n }\n },\n \"slider-layout#demo-images\": {\n \"props\": {\n \"itemsPerPage\": {\n \"desktop\": 1,\n \"tablet\": 1,\n \"phone\": 1\n },\n \"infinite\": true,\n \"showNavigationArrows\": \"desktopOnly\",\n \"blockClass\": \"carousel\"\n }\n },\n\n \"rich-text#shelf-title\": {\n \"props\": {\n \"text\": \"## Summer\",\n \"blockClass\": \"shelfTitle\"\n }\n },\n \"flex-layout.row#shelf\": {\n \"children\": [\"list-context.product-list#demo1\"]\n },\n \"list-context.product-list#demo1\": {\n \"blocks\": [\"product-summary.shelf\"],\n \"children\": [\"slider-layout#demo-products\"],\n \"props\": {\n \"orderBy\": \"OrderByTopSaleDESC\"\n }\n },\n \"slider-layout#demo-products\": {\n \"props\": {\n \"itemsPerPage\": {\n \"desktop\": 4,\n \"tablet\": 3,\n \"phone\": 1\n },\n \"infinite\": true,\n \"fullWidth\": false,\n \"blockClass\": \"shelf\"\n }\n },\n\n \"info-card#home\": {\n \"props\": {\n \"id\": \"info-card-home\",\n \"isFullModeStyle\": false,\n \"textPosition\": \"left\",\n \"imageUrl\": \"https://storecomponents.vteximg.com.br/arquivos/banner-infocard2.png\",\n \"headline\": \"Clearance Sale\",\n \"callToActionText\": \"DISCOVER\",\n \"callToActionUrl\": \"/sale/d\",\n \"blockClass\": \"info-card-home\",\n \"textAlignment\": \"center\"\n }\n },\n\n \"rich-text#question\": {\n \"props\": {\n \"text\": \"**This is an example store built using the VTEX platform.\\nWant to know more?**\",\n \"blockClass\": \"question\"\n }\n },\n\n \"rich-text#link\": {\n \"props\": {\n \"text\": \"\\n**Reach us at**\\nwww.vtex.com.br\",\n \"blockClass\": \"link\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_02b01307
[ { "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 shopper-location-availability-theme/store/blocks/home/deals.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"flex-layout.row#deals\": {\n \"children\": [\n \"flex-layout.col#deals1\",\n \"flex-layout.col#deals2\",\n \"flex-layout.col#deals3\",\n \"flex-layout.col#deals4\"\n ],\n \"props\": {\n \"blockClass\": \"deals\"\n }\n },\n\n \"flex-layout.col#deals1\": {\n \"children\": [\n \"image#deal1\",\n \"rich-text#deal1\"\n ]\n },\n \"image#deal1\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/box.png\",\n \"maxHeight\": \"24px\"\n }\n },\n \"rich-text#deal1\": {\n \"props\": {\n \"text\": \"Free shipping\",\n \"blockClass\": \"deals\"\n }\n },\n \"flex-layout.col#deals2\": {\n \"children\": [\n \"image#deal2\",\n \"rich-text#deal2\"\n ]\n },\n \"image#deal2\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/delivery-fast.png\",\n \"maxHeight\": \"24px\"\n }\n },\n \"rich-text#deal2\": {\n \"props\": {\n \"text\": \"One day delivery\",\n \"blockClass\": \"deals\"\n }\n },\n \"flex-layout.col#deals3\": {\n \"children\": [\n \"image#deal3\",\n \"rich-text#deal3\"\n ]\n },\n \"image#deal3\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/store.png\",\n \"maxHeight\": \"24px\"\n }\n },\n \"rich-text#deal3\": {\n \"props\": {\n \"text\": \"Pick up in store\",\n \"blockClass\": \"deals\"\n }\n },\n \"flex-layout.col#deals4\": {\n \"children\": [\n \"image#deal4\",\n \"rich-text#deal4\"\n ]\n },\n \"image#deal4\": {\n \"props\": {\n \"src\": \"https://storecomponents.vteximg.com.br/arquivos/coupon.png\",\n \"maxHeight\": \"24px\"\n }\n },\n \"rich-text#deal4\": {\n \"props\": {\n \"text\": \"Exclusive deals\",\n \"blockClass\": \"deals\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_708f5026
[ { "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 shopper-location-availability-theme/store/blocks/footer/footer.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"footer\": {\n \"blocks\": [\"footer-layout.desktop\", \"footer-layout.mobile\"]\n },\n \"footer-layout.desktop\": {\n \"children\": [\n \"flex-layout.row#footer-1-desktop\",\n \"flex-layout.row#footer-2-desktop\",\n \"flex-layout.row#footer-3-desktop\"\n ]\n },\n \"flex-layout.row#footer-1-desktop\": {\n \"children\": [\n \"vtex.menu@2.x:menu#Products\",\n \"vtex.menu@2.x:menu#footer-clothing\",\n \"vtex.menu@2.x:menu#footer-decoration\",\n \"vtex.menu@2.x:menu#footer-bags\",\n \"footer-spacer\",\n \"social-networks\"\n ],\n \"props\": {\n \"blockClass\": \"menu-row\",\n \"paddingTop\": 6,\n \"paddingBottom\": 3\n }\n },\n\n \"social-networks\": {\n \"props\": {\n \"socialNetworks\": [\n {\n \"name\": \"Facebook\",\n \"url\": \"https://www.facebook.com/vtexonline/\"\n },\n {\n \"name\": \"Instagram\",\n \"url\": \"https://www.instagram.com/vtextruecloud/\"\n },\n {\n \"name\": \"Twitter\",\n \"url\": \"https://twitter.com/vtexonline\"\n },\n {\n \"name\": \"Youtube\",\n \"url\": \"https://www.youtube.com/user/VTEXTV\"\n }\n ]\n }\n },\n\n \"flex-layout.row#footer-2-desktop\": {\n \"children\": [\"accepted-payment-methods\"],\n \"props\": {\n \"blockClass\": \"payment-methods\"\n }\n },\n \"accepted-payment-methods\": {\n \"props\": {\n \"paymentMethods\": [\"MasterCard\", \"Visa\", \"Diners Club\"]\n }\n },\n\n \"flex-layout.row#footer-3-desktop\": {\n \"children\": [\"rich-text#footer\"],\n \"props\": {\n \"blockClass\": \"credits\"\n }\n },\n \"rich-text#footer\": {\n \"props\": {\n \"text\": \"All stock and product photos are from photos.icons8.com\",\n \"blockClass\": \"footer\"\n }\n },\n\n \"footer-layout.mobile\": {\n \"children\": [\n \"flex-layout.row#1-footer-mobile\",\n \"flex-layout.row#2-footer-mobile\"\n ]\n },\n \"flex-layout.row#2-footer-mobile\": {\n \"children\": [\"flex-layout.col#footer-1-mobile\"],\n \"props\": {\n \"blockClass\": \"payment-methods\",\n \"paddingTop\": 4,\n \"paddingBottom\": 4\n }\n },\n \"flex-layout.col#footer-1-mobile\": {\n \"children\": [\n \"accepted-payment-methods\",\n \"social-networks\",\n \"rich-text#footer-mobile\"\n ],\n \"props\": {\n \"blockClass\": \"payment-methods\",\n \"paddingTop\": 4,\n \"paddingBottom\": 4,\n \"rowGap\": 4\n }\n },\n \"flex-layout.row#1-footer-mobile\": {\n \"props\": {\n \"paddingTop\": 4,\n \"paddingBottom\": 4\n },\n \"children\": [\"vtex.menu@2.x:menu#footer-mobile\"]\n },\n \"rich-text#footer-mobile\": {\n \"props\": {\n \"text\": \"All stock and product photos are from photos.icons8.com\",\n \"blockClass\": \"footer\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_65b56f97
[ { "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 shopper-location-availability-theme/store/blocks/footer/menu.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vtex.menu@2.x:menu#Products\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#news\",\n \"menu-item#blackfriday\",\n \"menu-item#sale\",\n \"menu-item#personalization\"\n ]\n },\n \"menu-item#news\": {\n \"props\": {\n \"id\": \"menu-item-news\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": false,\n \"tagTitle\": \"News\",\n \"text\": \"News\"\n }\n }\n },\n \"menu-item#blackfriday\": {\n \"props\": {\n \"id\": \"menu-item-black-friday\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": false,\n \"tagTitle\": \"BlackFriday\",\n \"text\": \"Black Friday\"\n }\n }\n },\n \"menu-item#sale\": {\n \"props\": {\n \"id\": \"menu-item-sale\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": false,\n \"tagTitle\": \"Sale\",\n \"text\": \"Sale\"\n }\n }\n },\n \"menu-item#personalization\": {\n \"props\": {\n \"id\": \"menu-item-personalization\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": false,\n \"tagTitle\": \"Personalization\",\n \"text\": \"Personalization\"\n }\n }\n },\n\n \"vtex.menu@2.x:menu#footer-decoration\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#smartphones\",\n \"menu-item#videogames\",\n \"menu-item#tvs\"\n ]\n },\n\n \"menu-item#smartphones\": {\n \"props\": {\n \"id\": \"menu-item-smartphones\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/decoration/smartphones\",\n \"noFollow\": true,\n \"tagTitle\": \"Smartphones\",\n \"text\": \"Smartphones\"\n }\n }\n },\n\n \"menu-item#videogames\": {\n \"props\": {\n \"id\": \"menu-item-videogames\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/decoration/videogames\",\n \"noFollow\": true,\n \"tagTitle\": \"Videogames\",\n \"text\": \"Videogames\"\n }\n }\n },\n\n \"menu-item#tvs\": {\n \"props\": {\n \"id\": \"menu-item-tvs\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/decoration/tvs\",\n \"noFollow\": true,\n \"tagTitle\": \"TVs\",\n \"text\": \"TVs\"\n }\n }\n },\n\n \"vtex.menu@2.x:menu#footer-bags\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#bags\",\n \"menu-item#backpacks\",\n \"menu-item#necessaire\"\n ]\n },\n\n \"menu-item#bags\": {\n \"props\": {\n \"id\": \"menu-item-bags\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/bags/d\",\n \"noFollow\": true,\n \"tagTitle\": \"Bags\",\n \"text\": \"Bags\"\n }\n }\n },\n\n \"menu-item#backpacks\": {\n \"props\": {\n \"id\": \"menu-item-backpacks\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/bags/backpacks\",\n \"noFollow\": true,\n \"tagTitle\": \"Backpacks\",\n \"text\": \"Backpacks\"\n }\n }\n },\n\n \"menu-item#necessaire\": {\n \"props\": {\n \"id\": \"menu-item-necessaire\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/bags/necessaire\",\n \"noFollow\": true,\n \"tagTitle\": \"Necessaire\",\n \"text\": \"Necessaire\"\n }\n }\n },\n\n \"vtex.menu@2.x:menu#footer-clothing\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#clothing\",\n \"menu-item#shorts\",\n \"menu-item#tank-tops\",\n \"menu-item#shirts\",\n \"menu-item#sweatshirt\",\n \"menu-item#cropped\"\n ]\n },\n\n \"vtex.menu@2.x:menu#footer-mobile\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#clothing-mobile\",\n \"menu-item#decoration-mobile\",\n \"menu-item#sale-mobile\"\n ]\n },\n\n \"menu-item#clothing-mobile\": {\n \"props\": {\n \"id\": \"menu-item-category-clothing\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/d\",\n \"noFollow\": true,\n \"tagTitle\": \"Clothing\",\n \"text\": \"Clothing\"\n }\n },\n \"blocks\": [\"vtex.menu@2.x:submenu.accordion#clothing\"]\n },\n \"vtex.menu@2.x:submenu.accordion#clothing\": {\n \"children\": [\"vtex.menu@2.x:menu#clothing-accordion\"]\n },\n\n \"vtex.menu@2.x:menu#clothing-accordion\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#shorts\",\n \"menu-item#tank-tops\",\n \"menu-item#shirts\",\n \"menu-item#sweatshirt\",\n \"menu-item#cropped\"\n ]\n },\n\n \"menu-item#decoration-mobile\": {\n \"props\": {\n \"itemProps\": {\n \"tagTitle\": \"Decoration\",\n \"text\": \"Decoration\"\n }\n },\n \"blocks\": [\"vtex.menu@2.x:submenu.accordion#decoration\"]\n },\n \"vtex.menu@2.x:submenu.accordion#decoration\": {\n \"children\": [\"vtex.menu@2.x:menu#footer-decoration-mobile\"]\n },\n\n \"vtex.menu@2.x:menu#footer-decoration-mobile\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#smartphones\",\n \"menu-item#videogames\",\n \"menu-item#tvs\"\n ]\n },\n\n \"menu-item#sale-mobile\": {\n \"props\": {\n \"itemProps\": {\n \"tagTitle\": \"Sale\",\n \"text\": \"Sale\"\n }\n },\n \"blocks\": [\"vtex.menu@2.x:submenu.accordion#sale\"]\n },\n \"vtex.menu@2.x:submenu.accordion#sale\": {\n \"children\": [\"vtex.menu@2.x:menu#footer-sale-mobile\"]\n },\n\n \"vtex.menu@2.x:menu#footer-sale-mobile\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#smartphones\",\n \"menu-item#videogames\",\n \"menu-item#tvs\"\n ]\n },\n\n \"menu-item#clothing\": {\n \"props\": {\n \"id\": \"menu-item-category-clothing\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/d\",\n \"noFollow\": true,\n \"tagTitle\": \"Clothing\",\n \"text\": \"Clothing\"\n }\n }\n },\n\n \"menu-item#shorts\": {\n \"props\": {\n \"id\": \"menu-item-shorts\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/shorts\",\n \"noFollow\": false,\n \"tagTitle\": \"Shorts\",\n \"text\": \"Shorts\"\n }\n }\n },\n\n \"menu-item#tank-tops\": {\n \"props\": {\n \"id\": \"menu-item-tank-tops\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/tank-tops\",\n \"noFollow\": false,\n \"tagTitle\": \"Tank tops\",\n \"text\": \"Tank tops\"\n }\n }\n },\n\n \"menu-item#shirts\": {\n \"props\": {\n \"id\": \"menu-item-shirts\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/shirts\",\n \"noFollow\": false,\n \"tagTitle\": \"Shirts\",\n \"text\": \"Shirts\"\n }\n }\n },\n\n \"menu-item#sweatshirt\": {\n \"props\": {\n \"id\": \"menu-item-sweat-shirts\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/sweatshirt\",\n \"noFollow\": false,\n \"tagTitle\": \"Sweatshirt\",\n \"text\": \"Sweatshirt\"\n }\n }\n },\n\n \"menu-item#cropped\": {\n \"props\": {\n \"id\": \"menu-item-cropped\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/clothing/cropped\",\n \"noFollow\": false,\n \"tagTitle\": \"Cropped\",\n \"text\": \"Cropped\"\n }\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_70cd41b6
[ { "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 shopper-location-availability-theme/store/blocks/product-summary/product-summary.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-summary.shelf\": {\n \"children\": [\n \"stack-layout#prodsum\",\n \"product-summary-name\",\n // \"product-summary-image#home\",\n \"flex-layout.col#productRating\",\n \"product-summary-space\",\n \"product-list-price#summary\",\n \"flex-layout.row#selling-price-savings\",\n \"product-installments#summary\",\n \"add-to-cart-button\",\n \"product-location-availability\",\n \"product-summary-sku-selector\"\n // \"flex-layout.row#product-price\"\n ]\n },\n \"product-location-availability\": {\n \"props\": {\n \"maxItems\": 3,\n \"orderBy\": \"faster\",\n \"pickupFirst\": true,\n \"showDistance\": \"miles\",\n \"showAddressInfo\": true\n }\n },\n \"flex-layout.col#productRating\": {\n \"props\": {\n \"blockClass\": \"productRating\"\n },\n \"children\": [\"product-rating-inline\"]\n },\n\n \"stack-layout#prodsum\": {\n \"children\": [\n \"product-summary-image#shelf\",\n \"vtex.product-highlights@2.x:product-highlights#collection\",\n \"modal-trigger#quickview\" // Check quickview.jsonc\n ]\n },\n\n \"product-summary-image#shelf\": {\n \"props\": {\n \"showBadge\": false,\n \"aspectRatio\": \"1:1\",\n \"maxHeight\": 300\n }\n },\n\n \"vtex.product-highlights@2.x:product-highlights#collection\": {\n \"props\": {\n \"type\": \"collection\"\n },\n \"children\": [\"product-highlight-wrapper\"]\n },\n \"product-highlight-wrapper\": {\n \"props\": {\n \"blockClass\": \"collection\"\n },\n \"children\": [\"product-highlight-text\"]\n },\n \"product-highlight-text\": {\n \"props\": {\n \"message\": \"{highlightName}\"\n }\n },\n\n \"product-list-price#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"flex-layout.row#selling-price-savings\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"marginBottom\": 4\n },\n \"children\": [\n \"product-selling-price#summary\",\n \"product-price-savings#summary\"\n ]\n },\n \"product-installments#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"product-selling-price#summary\": {\n \"props\": {\n \"blockClass\": \"summary\"\n }\n },\n \"product-price-savings#summary\": {\n \"props\": {\n \"markers\": [\n \"discount\"\n ],\n \"blockClass\": \"summary\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_5808529a
[ { "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 shopper-location-availability-theme/store/blocks/product-summary/quickview.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"modal-trigger#quickview\": {\n \"children\": [\n \"icon-expand\",\n \"modal-layout#quickview\"\n ],\n \"props\": {\n \"blockClass\": \"quickview\"\n }\n },\n\n \"modal-layout#quickview\": {\n \"children\": [\n \"modal-header#quickview\",\n \"flex-layout.row#quickview-main-row\"\n ],\n \"props\": {\n \"blockClass\": \"quickview\"\n }\n },\n \"modal-header#quickview\": {\n \"props\": {\n \"blockClass\": \"quickview\"\n }\n },\n\n \"modal-content#quickview\": {\n \"children\": [\n \"vtex.store-components:product-name\",\n \"flex-layout.col#quickviewPrice\",\n \"product-summary-sku-selector#quickview\"\n ],\n \"props\": {\n \"blockClass\": \"quickviewContent\"\n }\n },\n \"flex-layout.col#quickviewPrice\": {\n \"children\": [\n \"flex-layout.row#list-price-savings\",\n \"flex-layout.row#selling-price\",\n \"product-installments\"\n ]\n },\n \"modal-actions#quickview\": {\n \"props\": {\n \"blockClass\": \"quickview\"\n },\n \"children\": [\n \"flex-layout.row#quickview-actions-1\",\n \"flex-layout.row#quickview-actions-2\"\n ]\n },\n \"flex-layout.row#quickview-actions-1\": {\n \"children\": [\n \"flex-layout.col#quickview-product-quantity\",\n \"flex-layout.col#quickview-add-to-card-button\"\n ],\n \"props\": {\n \"colSizing\": \"auto\",\n \"colGap\": 6,\n \"blockClass\": \"addToCartRow\"\n }\n },\n\n \"flex-layout.col#quickview-product-quantity\": {\n \"children\": [\n \"product-summary-quantity#quickview\"\n ]\n },\n \"product-summary-quantity#quickview\": {\n \"props\": {\n \"showLabel\": false,\n \"size\": \"regular\"\n }\n },\n \"flex-layout.col#quickview-add-to-card-button\": {\n \"children\": [\n \"add-to-cart-button\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n\n \"flex-layout.row#quickview-actions-2\": {\n \"children\": [\n \"link.product#button-pdp\"\n ]\n },\n \"link.product#button-pdp\": {\n \"props\": {\n \"buttonProps\": {\n \"variant\": \"secondary\"\n },\n \"displayMode\": \"button\",\n \"label\": \"View details\",\n \"href\": \"/{slug}/p\"\n }\n },\n \"flex-layout.row#quickview-main-row\": {\n \"children\": [\n \"flex-layout.col#quickview-images\",\n \"flex-layout.col#quickview-product-details\"\n ],\n \"props\": {\n \"blockClass\": \"quickviewMainRow\"\n }\n },\n \"flex-layout.col#quickview-images\": {\n \"children\": [\n \"product-images#quickview\"\n ]\n },\n \"flex-layout.col#quickview-product-details\": {\n \"children\": [\n \"modal-content#quickview\",\n \"modal-actions#quickview\"\n ],\n \"props\": {\n \"preventVerticalStretch\": true,\n \"blockClass\": \"quickviewDetails\"\n }\n },\n \"product-summary-sku-selector#quickview\": {\n \"props\": {\n \"thumbnailImage\": \"skuvariation\",\n \"imageHeight\": 28,\n \"blockClass\": \"quickview\",\n \"visibility\": \"more-than-one\"\n }\n },\n \"vtex.store-components:product-name\": {\n \"props\": {\n \"blockClass\": \"quickview\"\n }\n },\n \"product-images#quickview\" : {\n \"props\": {\n \"blockClass\": \"quickview\",\n \"showNavigationArrows\": true\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_c443f8d3
[ { "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 shopper-location-availability-theme/store/blocks/product-summary/product-summary-list.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-summary.shelf#listLayout\": {\n \"props\": {\n \"blockClass\": \"listLayout\"\n },\n \"children\": [\n \"responsive-layout.desktop#productSummaryList\",\n \"responsive-layout.mobile#productSummaryList\"\n ]\n },\n \"responsive-layout.desktop#productSummaryList\": {\n \"children\": [\n \"flex-layout.row#summaryListDesktop\"\n ]\n },\n \"responsive-layout.mobile#productSummaryList\": {\n \"children\": [\n \"flex-layout.row#summaryListMobile\"\n ]\n },\n \"product-price-savings#summaryPercentage\": {\n \"props\": {\n \"message\": \"{savingsPercentage}\",\n \"blockClass\": \"summaryPercentage\"\n }\n },\n \"flex-layout.row#savingsSummaryListDesktop\": {\n \"props\": {\n \"colSizing\": \"auto\",\n \"colGap\": 3,\n \"blockClass\": \"savingsSummaryListDesktop\"\n },\n \"children\": [\n \"product-price-savings#summaryPercentage\",\n \"product-price-savings#summary\"\n ]\n },\n \"flex-layout.row#summaryListDesktop\": {\n \"props\":{\n \"fullWidth\": true,\n \"colSizing\": \"auto\",\n \"blockClass\": \"summaryListDesktop\"\n },\n \"children\": [\n \"flex-layout.row#summaryLeftListDesktop\",\n \"flex-layout.col#summaryRightListDesktop\"\n ]\n },\n \"flex-layout.row#summaryLeftListDesktop\": {\n \"props\": {\n \"blockClass\": \"summaryLeftListDesktop\",\n \"colSizing\": \"auto\",\n \"colGap\": 7\n },\n \"children\": [\n \"stack-layout#summaryListDesktop\",\n \"flex-layout.col#summaryDetailsListDesktop\"\n ]\n },\n \"flex-layout.col#summaryDetailsListDesktop\": {\n \"props\": {\n \"preventVerticalStretch\": true\n },\n \"children\": [\n \"vtex.store-components:product-brand#summaryListDesktop\",\n \"product-summary-name#summaryListDesktop\",\n \"flex-layout.col#productRating\",\n \"flex-layout.row#productSpecifications\"\n ]\n },\n \"flex-layout.row#productSpecifications\": {\n \"children\": [\n \"product-specification-group#summary\"\n ]\n },\n \"product-summary-name#summaryListDesktop\": {\n \"props\": {\n \"blockClass\": \"summaryListDesktop\"\n }\n },\n \"vtex.store-components:product-brand#summaryListDesktop\": {\n \"props\": {\n \"displayMode\": \"text\",\n \"blockClass\": \"summaryListDesktop\"\n }\n },\n \"flex-layout.col#summaryRightListDesktop\": {\n \"props\": {\n \"blockClass\": \"summaryRightListDesktop\",\n \"preventVerticalStretch\": true\n },\n \"children\": [\n \"flex-layout.row#savingsSummaryListDesktop\",\n \"flex-layout.col#priceSummaryListDesktop\",\n \"flex-layout.row#buyButtonsSummaryListDesktop\"\n ]\n },\n \"flex-layout.row#buyButtonsSummaryListDesktop\": {\n \"props\": {\n \"colSizing\": \"auto\",\n \"colGap\": 5\n },\n \"children\": [\n \"add-to-cart-button\",\n \"flex-layout.row#buyNowButton\"\n ]\n },\n \"flex-layout.row#buyNowButton\": {\n \"props\": {\n \"blockClass\": \"buyNowButton\"\n },\n \"children\": [\n \"add-to-cart-button#buyNow\"\n ]\n },\n\n \"add-to-cart-button#buyNow\": {\n \"props\": {\n \"text\": \"BUY NOW\",\n \"isOneClickBuy\": true,\n \"onClickEventPropagation\": \"enabled\",\n \"blockClass\": \"buyNow\"\n }\n },\n \"flex-layout.col#priceSummaryListDesktop\": {\n \"children\": [\n \"product-selling-price#summary\",\n \"product-list-price#summary\"\n ]\n },\n \"stack-layout#summaryListDesktop\": {\n \"children\": [\n \"product-summary-image#summaryListDesktop\",\n \"vtex.product-highlights@2.x:product-highlights#collection\",\n \"modal-trigger#quickview\" // Check quickview.jsonc\n ]\n },\n \"product-summary-image#summaryListDesktop\": {\n \"props\": {\n \"showBadge\": false,\n \"aspectRatio\": \"1:1\",\n \"maxHeight\": 180,\n \"blockClass\": \"summaryListDesktop\"\n }\n },\n \"flex-layout.row#summaryListMobile\": {\n \"props\":{\n \"preserveLayoutOnMobile\": true,\n \"colSizing\": \"auto\",\n \"blockClass\": \"summaryListMobile\",\n \"colGap\": 5\n },\n \"children\": [\n \"stack-layout#summaryListMobile\",\n \"flex-layout.col#summaryDetailsListMobile\"\n ]\n },\n \"stack-layout#summaryListMobile\": {\n \"children\": [\n \"product-summary-image#summaryListMobile\",\n \"vtex.product-highlights@2.x:product-highlights#collection\",\n \"modal-trigger#quickview\" // Check quickview.jsonc\n ]\n },\n \"product-summary-image#summaryListMobile\": {\n \"props\": {\n \"showBadge\": false,\n \"aspectRatio\": \"1:1\",\n \"maxHeight\": 220,\n \"blockClass\": \"summaryListMobile\"\n }\n },\n \"flex-layout.col#summaryDetailsListMobile\": {\n \"props\": {\n \"preventVerticalStretch\": true,\n \"width\": \"grow\",\n \"blockClass\": \"summaryDetailsListMobile\"\n },\n \"children\": [\n \"flex-layout.col#summaryUpDetailsListMobile\",\n \"flex-layout.col#summaryDownDetailsListMobile\"\n ]\n },\n \"flex-layout.col#summaryUpDetailsListMobile\": {\n \"props\": {\n \"preventVerticalStretch\": true,\n \"blockClass\": \"summaryUpDetailsListMobile\"\n },\n \"children\": [\n \"vtex.store-components:product-brand#summaryListMobile\",\n \"product-summary-name#summaryListMobile\",\n \"product-rating-inline\"\n ]\n },\n \"flex-layout.col#summaryDownDetailsListMobile\": {\n \"props\": {\n \"preventVerticalStretch\": true\n },\n \"children\": [\n \"product-selling-price#summary\",\n \"product-installments#summary\"\n ]\n },\n \"vtex.store-components:product-brand#summaryListMobile\": {\n \"props\": {\n \"displayMode\": \"text\",\n \"blockClass\": \"summaryListMobile\"\n }\n },\n \"product-summary-name#summaryListMobile\": {\n \"props\": {\n \"tag\": \"div\",\n \"blockClass\": \"summaryListMobile\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_2df74b2b
[ { "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 shopper-location-availability-theme/store/blocks/product-summary/product-specification-list.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-specification-group#summary\": {\n \"children\": [\n \"product-specification#summary\"\n ]\n },\n \"product-specification#summary\": {\n \"children\": [\n \"flex-layout.row#summarySpecificationValues\"\n ]\n },\n \"flex-layout.row#summarySpecificationValues\": {\n \"props\": {\n \"preventHorizontalStretch\": true,\n \"colGap\": 3\n },\n \"children\": [\n \"rich-text#summarySpecificationBullet\",\n \"product-specification-values\"\n ]\n },\n \"rich-text#summarySpecificationBullet\": {\n \"props\": {\n \"text\": \"•\",\n \"textColor\": \"c-action-primary\",\n \"blockClass\": \"summarySpecificationBullet\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_814315e7
[ { "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 shopper-location-availability-theme/store/blocks/pdp/product-assembly.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"sticky-layout#buy-button\": {\n \"props\": {\n \"position\": \"bottom\"\n },\n \"children\": [\"flex-layout.row#buy-button\"]\n },\n \"product-assembly-options\": {\n \"children\": [\n \"flex-layout.row#product-assembly-options\",\n \"assembly-option-input-values\"\n ]\n },\n \"assembly-option-input-values\": {\n \"props\": {\n \"optionsDisplay\": \"box\"\n }\n },\n \"flex-layout.row#product-assembly-options\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"colSizing\": \"auto\"\n },\n \"children\": [\n \"flex-layout.col#product-assembly-image\",\n \"flex-layout.col#product-assembly-middle\",\n \"flex-layout.col#product-assembly-quantity\"\n ]\n },\n \"flex-layout.col#product-assembly-quantity\": {\n \"props\": {\n \"verticalAlign\": \"middle\"\n },\n \"children\": [\n \"assembly-option-item-quantity-selector\"\n ]\n },\n \"flex-layout.col#product-assembly-image\": {\n \"props\": {\n \"marginRight\": 4\n },\n \"children\": [\n \"assembly-option-item-image\"\n ]\n },\n \"flex-layout.col#product-assembly-middle\": {\n \"props\": {\n \"width\": \"grow\",\n \"verticalAlignment\": \"middle\"\n },\n \"children\": [\n \"assembly-option-item-name\",\n \"assembly-option-item-price\",\n \"assembly-option-item-children-description\",\n \"assembly-option-item-customize#first-level\"\n ]\n },\n \"assembly-option-item-customize#first-level\": {\n \"props\": {\n \"buttonProps\": {\n \"collapse\": \"left\"\n }\n },\n \"children\": [\n \"flex-layout.row#item-customize\",\n \"assembly-option-input-values\"\n ]\n },\n \"flex-layout.row#item-customize\": {\n \"props\": {\n \"colGap\": 2,\n \"preserveLayoutOnMobile\": true,\n \"colSizing\": \"auto\"\n },\n \"children\": [\n \"flex-layout.col#product-assembly-image\",\n \"flex-layout.col#item-customize-middle\",\n \"flex-layout.col#item-customize-quantity\"\n ]\n },\n \"flex-layout.col#item-customize-middle\": {\n \"props\": {\n \"width\": \"grow\",\n \"verticalAlignment\": \"middle\"\n },\n \"children\": [\n \"assembly-option-item-name\",\n \"assembly-option-item-price\",\n \"assembly-option-item-children-description\",\n \"assembly-option-item-customize#sec-level\"\n ]\n },\n \"flex-layout.col#item-customize-quantity\": {\n \"props\": {\n \"horizontalAlign\": \"right\",\n \"verticalAlign\": \"middle\"\n },\n \"children\": [\n \"assembly-option-item-quantity-selector\"\n ]\n },\n \"assembly-option-item-customize#sec-level\": {\n \"props\": {\n \"buttonProps\": {\n \"collapse\": \"left\"\n }\n },\n \"children\": [\n \"assembly-option-item-image\",\n \"assembly-option-item-name\",\n \"assembly-option-item-price\",\n \"assembly-option-item-quantity-selector\"\n ]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_e1b59e5f
[ { "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 shopper-location-availability-theme/store/blocks/pdp/product-gifts.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-gifts\": {\n \"props\": {\n \"maxVisibleItems\": {\n \"desktop\": 1,\n \"mobile\": 1\n }\n },\n \"children\": [\"flex-layout.row#product-gifts-text\", \"product-gift-list\"]\n },\n\n \"flex-layout.row#product-gifts-text\": {\n \"props\": {\n \"verticalAlign\": \"middle\",\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": true\n },\n \"children\": [\n \"rich-text#product-gifts\",\n \"flex-layout.col#product-gifts-text\"\n ]\n },\n \"flex-layout.col#product-gifts-text\": {\n \"children\": [\"modal-trigger#product-gifts\"],\n \"props\": {\n \"verticalAlign\": \"middle\"\n }\n },\n \"rich-text#product-gifts\": {\n \"props\": {\n \"text\": \"**+ GIFT**\"\n }\n },\n \"gift-text\": {\n \"props\": {\n \"blockClass\": \"default\",\n \"text\": \"{exceedingItems, plural, =0{} one {+ # gift} other {+ # gifts}}\"\n }\n },\n \"product-gift-list\": {\n \"children\": [\"flex-layout.row#gift\"]\n },\n \"flex-layout.row#gift\": {\n \"props\": {\n \"fullWidth\": true\n },\n \"children\": [\"flex-layout.col#gift-name-description\", \"gift-image\"]\n },\n \"flex-layout.col#gift-name-description\": {\n \"props\": {\n \"verticalAlign\": \"middle\",\n \"rowGap\": 3\n },\n \"children\": [\"gift-name\", \"gift-description\"]\n },\n\n \"modal-trigger#product-gifts\": {\n \"children\": [\"modal-layout#product-gifts\", \"gift-text\"],\n \"props\": {\n \"blockClass\": \"product-gifts\"\n }\n },\n \"modal-layout#product-gifts\": {\n \"props\": {\n \"blockClass\": \"product-gifts\",\n \"fullScreen\": {\n \"phone\": true,\n \"desktop\": false,\n \"tablet\": false\n }\n },\n \"children\": [\"product-gifts#modal\"]\n },\n\n \"product-gifts#modal\": {\n \"children\": [\"product-gift-list\"]\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_8941842a
[ { "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 shopper-location-availability-theme/store/blocks/pdp/product.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.product\": {\n \"children\": [\n \"flex-layout.row#product-breadcrumb\",\n \"condition-layout.product#availability\",\n \"flex-layout.row#description\",\n \"flex-layout.row#specifications-title\",\n \"product-specification-group#table\",\n \"shelf.relatedProducts\",\n \"product-reviews\",\n \"product-questions-and-answers\"\n ]\n },\n \"flex-layout.row#specifications-title\": {\n \"children\": [\"rich-text#specifications\"]\n },\n \"rich-text#specifications\": {\n \"props\": {\n \"text\": \"##### Product Specifications\"\n }\n },\n \"flex-layout.row#product-breadcrumb\": {\n \"props\": {\n \"marginTop\": 4\n },\n \"children\": [\"breadcrumb\"]\n },\n \"flex-layout.row#description\": {\n \"props\": {\n \"marginBottom\": 7\n },\n \"children\": [\"product-description\"]\n },\n \"condition-layout.product#availability\": {\n \"props\": {\n \"conditions\": [\n {\n \"subject\": \"isProductAvailable\"\n }\n ],\n \"Then\": \"flex-layout.row#product-main\",\n \"Else\": \"flex-layout.row#product-availability\"\n }\n },\n \"flex-layout.row#product-main\": {\n \"props\": {\n \"colGap\": 7,\n \"rowGap\": 7,\n \"marginTop\": 4,\n \"marginBottom\": 7,\n \"paddingTop\": 7,\n \"paddingBottom\": 7\n },\n \"children\": [\"flex-layout.col#stack\", \"flex-layout.col#right-col\"]\n },\n\n \"stack-layout\": {\n \"props\": {\n \"blockClass\": \"product\"\n },\n \"children\": [\n \"flex-layout.row#product-image\",\n \"product-bookmark\",\n \"product-specification-badges\"\n ]\n },\n\n \"product-specification-badges\": {\n \"props\": {\n \"specificationGroupName\": \"Group\",\n \"specificationName\": \"On Sale\",\n \"visibleWhen\": \"True\",\n \"displayValue\": \"SPECIFICATION_NAME\"\n }\n },\n\n \"flex-layout.col#stack\": {\n \"children\": [\"stack-layout\"],\n \"props\": {\n \"width\": \"60%\",\n \"rowGap\": 0\n }\n },\n \"flex-layout.row#product-image\": {\n \"children\": [\"product-images\"]\n },\n \"product-images\": {\n \"props\": {\n \"aspectRatio\": {\n \"desktop\": \"auto\",\n \"phone\": \"16:9\"\n },\n \"displayThumbnailsArrows\": true\n }\n },\n \"flex-layout.col#right-col\": {\n \"props\": {\n \"preventVerticalStretch\": true,\n \"rowGap\": 0\n },\n \"children\": [\n \"flex-layout.row#product-name\",\n \"product-rating-summary\",\n \"flex-layout.row#list-price-savings\",\n \"flex-layout.row#selling-price\",\n \"product-installments\",\n \"product-separator\",\n \"product-identifier.product\",\n \"sku-selector\",\n \"product-quantity\",\n \"product-assembly-options\",\n \"product-gifts\",\n \"flex-layout.row#buy-button\",\n \"location-context\",\n \"share#default\"\n ]\n },\n\n \"location-context\": {\n \"children\": [\n \"modal-trigger#location-availability\",\n \"flex-layout.row#location-availability\"\n\n ]\n\n },\n \"flex-layout.row#location-availability\": {\n \"children\": [\n \"product-location-pickup-options\",\n \"product-location-shipping-options\"\n\n ]\n\n },\n \"modal-trigger#location-availability\": {\n \"children\": [\n \"product-location-availability-header\",\n \"modal-layout#address\"\n ]\n\n },\n \"product-location-availability-header\": {\n \"props\": {\n \"styleAsLink\": true\n\n }\n\n },\n\n \"flex-layout.row#product-name\": {\n \"props\": {\n \"marginBottom\": 3\n },\n \"children\": [\"vtex.store-components:product-name\"]\n },\n\n \"sku-selector\": {\n \"props\": {\n \"variationsSpacing\": 3,\n \"showValueNameForImageVariation\": true\n }\n },\n\n \"flex-layout.row#buy-button\": {\n \"props\": {\n \"marginTop\": 4,\n \"marginBottom\": 7\n },\n \"children\": [\"add-to-cart-button\"]\n },\n\n \"flex-layout.row#product-availability\": {\n \"props\": {\n \"colGap\": 7,\n \"marginTop\": 4,\n \"marginBottom\": 7,\n \"paddingTop\": 7\n },\n \"children\": [\n \"flex-layout.col#stack\",\n \"flex-layout.col#right-col-availability\"\n ]\n },\n \"flex-layout.col#right-col-availability\": {\n \"props\": {\n \"preventVerticalStretch\": true,\n \"rowGap\": 0,\n \"blockClass\": \"info-availability\"\n },\n \"children\": [\n \"flex-layout.row#product-name\",\n \"product-identifier.product\",\n \"sku-selector\",\n \"flex-layout.row#availability\"\n ]\n },\n \"flex-layout.row#availability\": {\n \"props\": {\n \"blockClass\": \"message-availability\"\n },\n \"children\": [\"availability-subscriber\"]\n },\n\n \"share#default\": {\n \"props\": {\n \"social\": {\n \"Facebook\": true,\n \"WhatsApp\": true,\n \"Twitter\": false,\n \"Pinterest\": true\n }\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_f87980df
[ { "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 shopper-location-availability-theme/store/blocks/pdp/product-specifications-table.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-specification-group#table\": {\n \"children\": [\n \"flex-layout.row#spec-group\"\n ]\n },\n \"flex-layout.row#spec-group\": {\n \"props\": {\n \"blockClass\": \"productSpecificationGroup\"\n },\n \"children\": [\n \"flex-layout.col#spec-group\"\n ]\n },\n \"flex-layout.col#spec-group\": {\n \"children\": [\n \"flex-layout.row#spec-group-name\",\n \"product-specification\"\n ]\n },\n \"flex-layout.row#spec-group-name\": {\n \"props\": {\n \"blockClass\": \"productSpecificationGroupName\"\n },\n \"children\": [\n \"product-specification-text#group\"\n ]\n },\n \"product-specification\": {\n \"children\": [\n \"flex-layout.row#spec-item\"\n ]\n },\n \"flex-layout.row#spec-item\": {\n \"props\": {\n \"blockClass\": \"productSpecification\"\n },\n \"children\": [\n \"flex-layout.col#spec-name\",\n \"flex-layout.col#spec-value\"\n ]\n },\n \"flex-layout.col#spec-name\": {\n \"props\": {\n \"blockClass\": \"productSpecificationName\",\n \"width\": {\n \"mobile\": \"50%\",\n \"desktop\": \"25%\"\n }\n },\n \"children\": [\n \"product-specification-text#specification\"\n ]\n },\n \"flex-layout.col#spec-value\": {\n \"props\": {\n \"blockClass\": \"productSpecificationValue\"\n },\n \"children\": [\n \"product-specification-values\"\n ]\n },\n \"product-specification-values\": {\n \"children\": [\n \"product-specification-text#value\"\n ]\n },\n \"product-specification-text#group\": {\n \"props\": {\n \"message\": \"{groupName}\"\n }\n },\n \"product-specification-text#specification\": {\n \"props\": {\n \"message\": \"{specificationName}\"\n }\n },\n \"product-specification-text#value\": {\n \"props\": {\n \"message\": \"{specificationValue}\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_0c485f78
[ { "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 shopper-location-availability-theme/store/blocks/header/category-menu.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vtex.menu@2.x:menu#category-menu\": {\n \"props\": {\n \"experimentalOptimizeRendering\": true\n },\n \"children\": [\n \"menu-item#category-apparel\",\n \"menu-item#category-home\",\n \"menu-item#more\"\n ]\n },\n \"menu-item#category-apparel\": {\n \"props\": {\n \"id\": \"menu-item-category-apparel\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/apparel---accessories/\",\n \"noFollow\": false,\n \"tagTitle\": \"Apparel & Accessories\",\n \"text\": \"Apparel & Accessories\"\n }\n },\n \"blocks\": [\n \"vtex.menu@2.x:submenu#category-apparel\"\n ]\n },\n \"vtex.menu@2.x:submenu#category-apparel\": {\n \"props\": {\n \"width\": \"auto\"\n },\n \"children\": [\n \"vtex.menu@2.x:menu#category-apparel\"\n ]\n },\n \"vtex.menu@2.x:menu#category-apparel\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#category-apparel-clothing\",\n \"menu-item#category-apparel-accessories\",\n \"menu-item#category-apparel-eyeglasses\"\n ]\n },\n \"menu-item#category-apparel-clothing\": {\n \"props\": {\n \"id\": \"menu-item-category-apparel-clothing\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/apparel---accessories/clothing/\",\n \"noFollow\": false,\n \"tagTitle\": \"Clothing\",\n \"text\": \"Clothing\"\n }\n }\n },\n \"menu-item#category-apparel-accessories\": {\n \"props\": {\n \"id\": \"menu-item-category-apparel-accessories\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/apparel---accessories/accessories/\",\n \"noFollow\": false,\n \"tagTitle\": \"Accessories\",\n \"text\": \"Accessories\"\n }\n }\n },\n \"menu-item#category-apparel-eyeglasses\": {\n \"props\": {\n \"id\": \"menu-item-category-apparel-eyeglasses\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/apparel---accessories/eyeglasses/\",\n \"noFollow\": false,\n \"tagTitle\": \"Eyeglasses\",\n \"text\": \"Eyeglasses\"\n }\n }\n },\n \"menu-item#category-home\": {\n \"props\": {\n \"id\": \"menu-item-category-home\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/home---decor/\",\n \"noFollow\": false,\n \"tagTitle\": \"Home & Decor\",\n \"text\": \"Home & Decor\"\n }\n }\n },\n \"menu-item#more\": {\n \"props\": {\n \"id\": \"menu-item-custom-sale\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": true,\n \"tagTitle\": \"More\",\n \"text\": \"More\"\n }\n },\n \"blocks\": [\n \"vtex.menu@2.x:submenu#more\"\n ]\n },\n \"vtex.menu@2.x:submenu#more\": {\n \"props\": {\n \"width\": \"100%\"\n },\n \"children\": [\n \"flex-layout.row#menu-more\"\n ]\n },\n \"flex-layout.row#menu-more\": {\n \"children\": [\n \"flex-layout.col#menu-more-1\",\n \"flex-layout.col#menu-more-2\"\n ]\n },\n \"flex-layout.col#menu-more-1\": {\n \"children\": [\n \"vtex.menu@2.x:menu#more\"\n ]\n },\n \"flex-layout.col#menu-more-2\": {\n \"children\": [\n \"info-card#home\"\n ]\n },\n \"vtex.menu@2.x:menu#more\": {\n \"props\": {\n \"orientation\": \"vertical\"\n },\n \"children\": [\n \"menu-item#about-us\",\n \"menu-item#faq\"\n ]\n },\n \"menu-item#about-us\": {\n \"props\": {\n \"id\": \"menu-item-about-us\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/about-us\",\n \"noFollow\": true,\n \"tagTitle\": \"About us\",\n \"text\": \"About us\"\n }\n }\n },\n \"menu-item#faq\": {\n \"props\": {\n \"id\": \"menu-item-faq\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/faq\",\n \"noFollow\": true,\n \"tagTitle\": \"FAQ\",\n \"text\": \"FAQ\"\n }\n }\n },\n \"menu-item#contact-us\": {\n \"props\": {\n \"id\": \"menu-item-contact-us\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"/contact-us\",\n \"noFollow\": true,\n \"tagTitle\": \"Contact Us\",\n \"text\": \"Contact Us\"\n }\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_48d9685d
[ { "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 shopper-location-availability-theme/store/blocks/header/header.jsonc from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"header\": {\n \"blocks\": [\"header-layout.desktop\", \"header-layout.mobile\"]\n },\n \"header.full\": {\n \"blocks\": [\"header-layout.desktop\", \"header-layout.mobile\"]\n },\n \"header-layout.desktop\": {\n \"children\": [\n \"flex-layout.row#1-desktop\",\n \"flex-layout.row#3-desktop\",\n \"sticky-layout#4-desktop\"\n ]\n },\n\n \"flex-layout.row#1-desktop\": {\n \"children\": [\"telemarketing\"],\n \"props\": {\n \"fullWidth\": true\n }\n },\n \n \"flex-layout.row#3-desktop\": {\n \"props\": {\n \"blockClass\": \"menu-link\",\n \"horizontalAlign\": \"center\",\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true,\n \"fullWidth\": true\n },\n \"children\": [\n \"vtex.menu@2.x:menu#websites\",\n \"flex-layout.col#spacer\",\n \"vtex.menu@2.x:menu#institutional\"\n ]\n },\n \"flex-layout.col#spacer\": {\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"sticky-layout#4-desktop\": {\n \"props\": {\n \"blockClass\": \"sticky-header\"\n },\n \"children\": [\"flex-layout.row#4-desktop\"]\n },\n \"flex-layout.row#4-desktop\": {\n \"props\": {\n \"blockClass\": \"main-header\",\n \"horizontalAlign\": \"center\",\n \"verticalAlign\": \"center\",\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true,\n \"fullWidth\": true\n },\n \"children\": [\n \"flex-layout.col#logo-desktop\",\n \"flex-layout.col#category-menu\",\n \"flex-layout.col#spacer\",\n \"search-bar\",\n \"locale-switcher\",\n \"login\",\n \"minicart.v2\"\n ]\n },\n \"flex-layout.col#logo-desktop\": {\n \"props\": {\n \"verticalAlign\": \"middle\"\n },\n \"children\": [\"logo#desktop\"]\n },\n \"flex-layout.col#category-menu\": {\n \"props\": {\n \"verticalAlign\": \"middle\"\n },\n \"children\": [\"vtex.menu@2.x:menu#category-menu\"]\n },\n \"logo#desktop\": {\n \"props\": {\n \"title\": \"Logo\",\n \"href\": \"/\",\n \"url\": \"https://storecomponents.vteximg.com.br/arquivos/store-theme-logo.png\",\n \"width\": \"180\",\n \"height\": \"12\"\n }\n },\n \"header-layout.mobile\": {\n \"children\": [\"sticky-layout#1-mobile\"]\n },\n \"sticky-layout#1-mobile\": {\n \"children\": [\"flex-layout.row#1-mobile\"]\n },\n \"flex-layout.row#1-mobile\": {\n \"children\": [\n \"drawer\",\n \"logo#mobile\",\n \"flex-layout.col#spacer\",\n \"login\",\n \"minicart.v2\"\n ],\n \"props\": {\n \"blockClass\": \"main-header-mobile\",\n \"preventHorizontalStretch\": true,\n \"preserveLayoutOnMobile\": true,\n \"fullWidth\": true\n }\n },\n \"drawer\": {\n \"children\": [\"menu#drawer\"]\n },\n\n \"menu#drawer\": {\n \"children\": [\n \"menu-item#category-apparel\",\n \"menu-item#category-home\",\n \"menu-item#more\"\n ],\n \"props\": {\n \"orientation\": \"vertical\"\n }\n },\n\n \"logo#mobile\": {\n \"props\": {\n \"title\": \"Logo\",\n \"href\": \"/\",\n \"url\": \"https://storecomponents.vteximg.com.br/arquivos/store-theme-logo-mobile.png\",\n \"width\": \"77.5\",\n \"height\": \"27.5\"\n }\n }\n}\n\n```" } ]
code_shopper-location-availability-theme_d8503182
[ { "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 shopper-location-availability-theme/store/blocks/header/top-menu.json from the shopper-location-availability-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"vtex.menu@2.x:menu#websites\": {\n \"children\": [\n \"menu-item#shop\",\n \"menu-item#about-us\",\n \"flex-layout.row#header-desktop\"\n ]\n },\n \"flex-layout.row#header-desktop\": {\n \"props\": {\n \"blockClass\": \"main-header\",\n \"horizontalAlign\": \"center\",\n \"verticalAlign\": \"center\",\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true,\n \"fullWidth\": true\n },\n \"children\": [\"shopper-location\"]\n },\n \"menu-item#shop\": {\n \"props\": {\n \"id\": \"menu-item-shop\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"internal\",\n \"href\": \"#\",\n \"noFollow\": false,\n \"tagTitle\": \"Shop\",\n \"text\": \"Shop\"\n }\n }\n },\n \"vtex.menu@2.x:menu#institutional\": {\n \"children\": [\"menu-item#vtex-website\"]\n },\n \"menu-item#vtex-website\": {\n \"props\": {\n \"id\": \"menu-item-vtex-website\",\n \"type\": \"custom\",\n \"iconId\": null,\n \"highlight\": false,\n \"itemProps\": {\n \"type\": \"external\",\n \"href\": \"http://vtex.com\",\n \"noFollow\": false,\n \"tagTitle\": \"visit vtex.com\",\n \"text\": \"visit vtex.com\"\n }\n }\n }\n}\n\n```" } ]
code_mega-menu_d0524b2c
[ { "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 mega-menu/messages/de.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Mega-Menü\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"Alle anzeigen\",\n \"store/mega-menu.goBackButton.title\": \"Zurückgehen\",\n \"admin/mega-menu.tabs.first\": \"Erste Ebene\",\n \"admin/mega-menu.tabs.second\": \"Zweite Ebene\",\n \"admin/mega-menu.tabs.third\": \"Dritte Ebene\",\n \"admin/mega-menu.items.newButton\": \"NEU HINZUFÜGEN\",\n \"admin/mega-menu.items.firstSearch\": \"Menü suchen\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Wählen Sie ein Menü der ersten Ebene\",\n \"admin/mega-menu.items.secondSearch\": \"Untermenü zweite Ebene suchen\",\n \"admin/mega-menu.items.firstColumn\": \"Name\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Symbol\",\n \"admin/mega-menu.items.fourColumn\": \"Aktionen\",\n \"admin/mega-menu.items.fiveColumn\": \"Sichtbarkeit\",\n \"admin/mega-menu.items.thirdSearch\": \"Untermenü dritte Ebene suchen\",\n \"admin/mega-menu.items.dropDownThird\": \"Wählen Sie ein Menü der zweiten Ebene\",\n \"admin/mega-menu.items.titleApp\": \"Menü Konfiguration\",\n \"admin/mega-menu.items.loading\": \"Laden...\",\n \"admin/mega-menu.items.titleModal\": \"Sind Sie sicher, dass Sie dieses Element löschen möchten?\",\n \"admin/mega-menu.items.bodyModal\": \"Diese Aktion ist unwiderruflich. Sie werden den Eintrag aus dem Admin-Menü entfernen.\",\n \"admin/mega-menu.items.btnCancelModal\": \"Abbrechen\",\n \"admin/mega-menu.items.btnRemoveModal\": \"JA, AUS DEM MENÜ ENTFERNEN\",\n \"admin/mega-menu.items.titleForm\": \"Füllen Sie das Formular aus: Element bearbeiten\",\n \"admin/mega-menu.items.backBtnForm\": \"ZURÜCK ZUR VORHERIGEN SEITE\",\n \"admin/mega-menu.items.subTitleForm\": \"Alle Felder ausfüllen\",\n \"admin/mega-menu.items.infoForm\": \"Pflichtfeld*\",\n \"admin/mega-menu.items.input1Form\": \"Name *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Symbole\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Auswählen...\",\n \"admin/mega-menu.items.input4Form\": \"Formatvorlagen\",\n \"admin/mega-menu.items.titleSubBlock\": \"Erscheinungsbild\",\n \"admin/mega-menu.items.check1Block\": \"Anzeigen\",\n \"admin/mega-menu.items.subCheck1Block\": \"Elemente im Menü anzeigen\",\n \"admin/mega-menu.items.subCheck2Block\": \"Aktivierte Formatvorlagen\",\n \"admin/mega-menu.items.btnSaveForm\": \"ÄNDERUNGEN SPEICHERN\",\n \"admin/mega-menu.items.infoFormTitle\": \"Informationen zum Menü der ersten Ebene\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Hauptmenü:\",\n \"admin/mega-menu.items.infoForm2Title\": \"Informationen zum Menü der zweiten Ebene\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Hauptuntermenü\",\n \"admin/mega-menu.items.tooltip\": \"Wählen Sie ein verfügbares Symbol. Wenn Sie ein benutzerdefiniertes Symbol hinzufügen möchten, geben Sie in das Feld die ID Ihres Symbols ein\",\n \"admin/mega-menu.items.tooltip2\": \"Fügen Sie dem Menüpunkt Formatvorlagen als Fettschrift, Größe und Hintergrund hinzu, getrennt durch Kommas. z.B.: font-size:10px,color:red\",\n \"admin/mega-menu.items.tooltip3\": \"Eine Änderung dieses Slugs kann zu Schwierigkeiten führen, bitte nehmen Sie die Änderung nur vor, wenn sie notwendig ist\",\n \"admin/mega-menu.items.nameRequired\": \"Name des Feldes ist erforderlich\",\n \"admin/mega-menu.items.slugRequired\": \"Das Feld Slug ist erforderlich\",\n \"admin/mega-menu.items.newItemFirst\": \"Füllen Sie das Formular aus: Neuen Artikel der ersten Ebene hinzufügen\",\n \"admin/mega-menu.items.newItemSecond\": \"Füllen Sie das Formular aus: Neuen Artikel der zweiten Ebene hinzufügen\",\n \"admin/mega-menu.items.newItemThird\": \"Füllen Sie das Formular aus: Neuen Artikel der dritten Ebene hinzufügen\",\n \"admin/mega-menu.items.validateName\": \"Name des Feldes ist erforderlich\",\n \"admin/mega-menu.items.validateSlug\": \"Das Feld Slug ist erforderlich\",\n \"admin/mega-menu.items.createItem\": \"Artikel erfolgreich erstellt\",\n \"admin/mega-menu.items.editItem\": \"Datenbearbeitung erfolgreich\",\n \"admin/mega-menu.items.deleteItem\": \"Daten erfolgreich gelöscht\",\n \"admin/mega-menu.backup.download\": \"CSV herunterladen\",\n \"admin/mega-menu.backup.upload\": \"Daten hochladen\",\n \"admin/mega-menu.backup.uploadAlert\": \"Daten erfolgreich hochgeladen\",\n \"admin/mega-menu.backup.duplicateData\": \"Es gibt doppelte Daten in der Datei, bitte validieren Sie die Datei\",\n \"admin/mega-menu.settings.caution\": \"Ändern Sie diese Option mit Umsicht, da Sie das Erscheinungsbild des Menüs im Shop beeinflussen könnten.\",\n \"admin/mega-menu.settings.orientationHV\": \"Ausrichtung (Horizontal / Vertikal)\",\n \"admin/mega-menu.settings.horizontal\": \"Horizontal\",\n \"admin/mega-menu.settings.vertical\": \"Vertikal\",\n \"admin/mega-menu.settings.close\": \"Schließen\",\n \"admin/mega-menu.settings.confirm\": \"Bestätigen\",\n \"admin/mega-menu.items.emptyTitle\": \"Keine Artikel zum Anzeigen.\",\n \"admin/mega-menu.items.empty\": \"Fügen Sie einen neuen Artikel hinzu, um Ihr Mega-Menü zu erstellen und für die Anzeige im Shop.\"\n}\n\n```" } ]
code_mega-menu_9ba6a5b2
[ { "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 mega-menu/messages/pl.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Mega menu\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"Zobacz wszystkie\",\n \"store/mega-menu.goBackButton.title\": \"Wróć\",\n \"admin/mega-menu.tabs.first\": \"Pierwszy poziom\",\n \"admin/mega-menu.tabs.second\": \"Drugi poziom\",\n \"admin/mega-menu.tabs.third\": \"Trzeci poziom\",\n \"admin/mega-menu.items.newButton\": \"DODAJ NOWY\",\n \"admin/mega-menu.items.firstSearch\": \"Przeszukaj menu\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Wybierz menu pierwszego poziomu\",\n \"admin/mega-menu.items.secondSearch\": \"Wyszukaj podmenu drugiego poziomu\",\n \"admin/mega-menu.items.firstColumn\": \"Nazwa\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Ikona\",\n \"admin/mega-menu.items.fourColumn\": \"Działania\",\n \"admin/mega-menu.items.fiveColumn\": \"Widoczność\",\n \"admin/mega-menu.items.thirdSearch\": \"Wyszukaj podmenu trzeciego poziomu\",\n \"admin/mega-menu.items.dropDownThird\": \"Wybierz menu drugiego poziomu\",\n \"admin/mega-menu.items.titleApp\": \"Konfiguracja menu\",\n \"admin/mega-menu.items.loading\": \"Ładuję…\",\n \"admin/mega-menu.items.titleModal\": \"Na pewno chcesz usunąć ten element?\",\n \"admin/mega-menu.items.bodyModal\": \"Tego działania nie można cofnąć. Usuniesz pozycję z menu administratora.\",\n \"admin/mega-menu.items.btnCancelModal\": \"Anuluj\",\n \"admin/mega-menu.items.btnRemoveModal\": \"TAK, USUŃ Z MENU\",\n \"admin/mega-menu.items.titleForm\": \"Wypełnij formularz: Edytuj element\",\n \"admin/mega-menu.items.backBtnForm\": \"WRÓĆ DO POPRZEDNIEJ STRONY\",\n \"admin/mega-menu.items.subTitleForm\": \"Wypełnij wszystkie pola formularza\",\n \"admin/mega-menu.items.infoForm\": \"Wymagane*\",\n \"admin/mega-menu.items.input1Form\": \"Nazwa *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Ikony\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Wybierz…\",\n \"admin/mega-menu.items.input4Form\": \"Style\",\n \"admin/mega-menu.items.titleSubBlock\": \"Wygląd\",\n \"admin/mega-menu.items.check1Block\": \"Wyświetl\",\n \"admin/mega-menu.items.subCheck1Block\": \"Pokaż pozycje w menu\",\n \"admin/mega-menu.items.subCheck2Block\": \"Włączone style\",\n \"admin/mega-menu.items.btnSaveForm\": \"ZAPISZ ZMIANY\",\n \"admin/mega-menu.items.infoFormTitle\": \"Informacje menu pierwszego poziomu\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Główne menu:\",\n \"admin/mega-menu.items.infoForm2Title\": \"Informacje menu drugiego poziomu\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Główne podmenu\",\n \"admin/mega-menu.items.tooltip\": \"Wybierz dostępną ikonę. Jeśli chcesz dodać niestandardową ikonę, wpisz w polu identyfikator ikony\",\n \"admin/mega-menu.items.tooltip2\": \"Dodaj style do elementu menu, np. pogrubiona czcionka, rozmiar czy tło, oddzielone przecinkami, tj. font-size:10px,color:red\",\n \"admin/mega-menu.items.tooltip3\": \"Zmiana tego sluga może spowodować trudności, nie dokonuj jej, jeśli nie jest to konieczne\",\n \"admin/mega-menu.items.nameRequired\": \"Nazwa pola jest wymagana\",\n \"admin/mega-menu.items.slugRequired\": \"Slug pola jest wymagany\",\n \"admin/mega-menu.items.newItemFirst\": \"Wypełnij formularz: Dodaj nowy element pierwszego poziomu\",\n \"admin/mega-menu.items.newItemSecond\": \"Wypełnij formularz: Dodaj nowy element drugiego poziomu\",\n \"admin/mega-menu.items.newItemThird\": \"Wypełnij formularz: Dodaj nowy element trzeciego poziomu\",\n \"admin/mega-menu.items.validateName\": \"Nazwa pola jest wymagana\",\n \"admin/mega-menu.items.validateSlug\": \"Slug pola jest wymagany\",\n \"admin/mega-menu.items.createItem\": \"Pomyślnie utworzono element\",\n \"admin/mega-menu.items.editItem\": \"Pomyślnie edytowano dane\",\n \"admin/mega-menu.items.deleteItem\": \"Pomyślnie usunięto dane\",\n \"admin/mega-menu.backup.download\": \"Pobierz CSV\",\n \"admin/mega-menu.backup.upload\": \"Prześlij dane\",\n \"admin/mega-menu.backup.uploadAlert\": \"Pomyślnie przesłano dane\",\n \"admin/mega-menu.backup.duplicateData\": \"Istnieją zduplikowane dane w pliku, sprawdź plik\",\n \"admin/mega-menu.settings.caution\": \"Uwaga! Zmiana tych opcji wpłynie na wygląd menu sklepu\",\n \"admin/mega-menu.settings.orientationHV\": \"Orientacja (pozioma/pionowa)\",\n \"admin/mega-menu.settings.horizontal\": \"Pozioma\",\n \"admin/mega-menu.settings.vertical\": \"Pionowa\",\n \"admin/mega-menu.settings.close\": \"Zamknij\",\n \"admin/mega-menu.settings.confirm\": \"Potwierdź\",\n \"admin/mega-menu.items.emptyTitle\": \"Brak elementów do wyświetlenia\",\n \"admin/mega-menu.items.empty\": \"Dodaj element, aby utworzyć mega menu i zobaczyć je w sklepie\"\n}\n```" } ]
code_mega-menu_e94e7a4e
[ { "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 mega-menu/messages/pt.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Mega Menu\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"Ver tudo\",\n \"store/mega-menu.goBackButton.title\": \"volte\",\n \"admin/mega-menu.tabs.first\": \"Primeiro nível\",\n \"admin/mega-menu.tabs.second\": \"Segundo nível\",\n \"admin/mega-menu.tabs.third\": \"Terceiro nivel\",\n \"admin/mega-menu.items.newButton\": \"ADICIONAR NOVO\",\n \"admin/mega-menu.items.firstSearch\": \"Menu de pesquisa\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Escolha um menu de primeiro nível\",\n \"admin/mega-menu.items.secondSearch\": \"Submenu de pesquisa de segundo nível\",\n \"admin/mega-menu.items.firstColumn\": \"Nome\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Ícone\",\n \"admin/mega-menu.items.fourColumn\": \"Ações\",\n \"admin/mega-menu.items.fiveColumn\": \"Visibilidade\",\n \"admin/mega-menu.items.thirdSearch\": \"Terceiro nível do submenu de pesquisa\",\n \"admin/mega-menu.items.dropDownThird\": \"Escolha um menu de segundo nível\",\n \"admin/mega-menu.items.titleApp\": \"Configuração de menus\",\n \"admin/mega-menu.items.loading\": \"Carregando...\",\n \"admin/mega-menu.items.titleModal\": \"Tem certeza de que deseja excluir este item?\",\n \"admin/mega-menu.items.bodyModal\": \"Esta ação é irreversível. Você removerá o item do menu do admin\",\n \"admin/mega-menu.items.btnCancelModal\": \"Cancelar\",\n \"admin/mega-menu.items.btnRemoveModal\": \"SIM, REMOVER DO MENU\",\n \"admin/mega-menu.items.titleForm\": \"Preencha o formulário: Editar item\",\n \"admin/mega-menu.items.backBtnForm\": \"VOLTAR PARA A PAGINA ANTERIOR\",\n \"admin/mega-menu.items.subTitleForm\": \"Preencha todos os campos do formulário\",\n \"admin/mega-menu.items.infoForm\": \"Requeridos*\",\n \"admin/mega-menu.items.input1Form\": \"Nome *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Ícones\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Selecione...\",\n \"admin/mega-menu.items.input4Form\": \"Estilos\",\n \"admin/mega-menu.items.titleSubBlock\": \"Aparência\",\n \"admin/mega-menu.items.check1Block\": \"Mostrar\",\n \"admin/mega-menu.items.subCheck1Block\": \"Mostrar itens no menu\",\n \"admin/mega-menu.items.subCheck2Block\": \"Estilos habilitados\",\n \"admin/mega-menu.items.btnSaveForm\": \"SALVAR ALTERAÇÕES\",\n \"admin/mega-menu.items.infoFormTitle\": \"Informações do menu de primeiro nível\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Menu principal:\",\n \"admin/mega-menu.items.infoForm2Title\": \"Informações do menu de segundo nível\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Submenu principal\",\n \"admin/mega-menu.items.tooltip\": \"Selecione um ícone disponível. Se você quiser adicionar um ícone personalizado, escreva no campo o id do seu ícone\",\n \"admin/mega-menu.items.tooltip2\": \"Adicione estilos ao item de menu como fonte em negrito, tamanho e plano de fundo, separados por vírgulas. Exemplo: font-size:10px,color:red\",\n \"admin/mega-menu.items.tooltip3\": \"Alterar este slug pode causar dificuldades, por favor, faça a alteração apenas se for necessário\",\n \"admin/mega-menu.items.nameRequired\": \"O nome do campo é obrigatório\",\n \"admin/mega-menu.items.slugRequired\": \"O slug do campo é obrigatório\",\n \"admin/mega-menu.items.newItemFirst\": \"Preencha o formulário: Adicionar novo item de primeiro nível\",\n \"admin/mega-menu.items.newItemSecond\": \"Preencha o formulário: Adicionar novo item de segundo nível\",\n \"admin/mega-menu.items.newItemThird\": \"Preencha o formulário: Adicionar novo item de terceiro nível\",\n \"admin/mega-menu.items.validateName\": \"O nome do campo é obrigatório\",\n \"admin/mega-menu.items.validateSlug\": \"O slug do campo é obrigatório\",\n \"admin/mega-menu.items.createItem\": \"Item criado com sucesso\",\n \"admin/mega-menu.items.editItem\": \"Edição de dados bem-sucedida\",\n \"admin/mega-menu.items.deleteItem\": \"Dados excluídos com sucesso\",\n \"admin/mega-menu.backup.download\": \"Baixar CSV\",\n \"admin/mega-menu.backup.upload\": \"Carregar dados\",\n \"admin/mega-menu.backup.uploadAlert\": \"Carregamento de dados com sucesso\",\n \"admin/mega-menu.backup.duplicateData\": \"Existem dados duplicados no arquivo, por favor, valide o arquivo\",\n \"admin/mega-menu.settings.caution\": \"Cuidado! Mudar estas opções pode afetar a aparência do menu na loja.\",\n \"admin/mega-menu.settings.orientationHV\": \"Orientação (Horizontal / Vertical)\",\n \"admin/mega-menu.settings.horizontal\": \"Horizontal\",\n \"admin/mega-menu.settings.vertical\": \"Vertical\",\n \"admin/mega-menu.settings.close\": \"Fechar\",\n \"admin/mega-menu.settings.confirm\": \"Confirmar\",\n \"admin/mega-menu.items.emptyTitle\": \"Nenhum item para exibir\",\n \"admin/mega-menu.items.empty\": \"Adicione um novo item para criar e ver seu mega menu na loja.\"\n}\n\n```" } ]
code_mega-menu_61fd06b6
[ { "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 mega-menu/messages/en.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Mega Menu\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"See all\",\n \"store/mega-menu.goBackButton.title\": \"Go back\",\n \"admin/mega-menu.tabs.first\": \"First Level\",\n \"admin/mega-menu.tabs.second\": \"Second Level\",\n \"admin/mega-menu.tabs.third\": \"Third Level\",\n \"admin/mega-menu.items.newButton\": \"ADD NEW\",\n \"admin/mega-menu.items.firstSearch\": \"Search menu\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Choose a menu of first level\",\n \"admin/mega-menu.items.secondSearch\": \"Search submenu second level\",\n \"admin/mega-menu.items.firstColumn\": \"Name\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Icon\",\n \"admin/mega-menu.items.fourColumn\": \"Actions\",\n \"admin/mega-menu.items.fiveColumn\": \"Visibility\",\n \"admin/mega-menu.items.thirdSearch\": \"Search submenu third level\",\n \"admin/mega-menu.items.dropDownThird\": \"Choose a menu of second level\",\n \"admin/mega-menu.items.titleApp\": \"Menus Configuration\",\n \"admin/mega-menu.items.loading\": \"Loading...\",\n \"admin/mega-menu.items.titleModal\": \"Are you sure you want to delete this item?\",\n \"admin/mega-menu.items.bodyModal\": \"This action is irreversible. You will remove the item from the menu of the admin.\",\n \"admin/mega-menu.items.btnCancelModal\": \"Cancel\",\n \"admin/mega-menu.items.btnRemoveModal\": \"YES, REMOVE FROM MENU\",\n \"admin/mega-menu.items.titleForm\": \"Complete the form: Edit item\",\n \"admin/mega-menu.items.backBtnForm\": \"BACK TO PREVIOUS PAGE\",\n \"admin/mega-menu.items.subTitleForm\": \"Fill out all form fields\",\n \"admin/mega-menu.items.infoForm\": \"Required*\",\n \"admin/mega-menu.items.input1Form\": \"Name *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Icons\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Select...\",\n \"admin/mega-menu.items.input4Form\": \"Styles\",\n \"admin/mega-menu.items.titleSubBlock\": \"Appearance\",\n \"admin/mega-menu.items.check1Block\": \"Display\",\n \"admin/mega-menu.items.subCheck1Block\": \"Show items on the menu\",\n \"admin/mega-menu.items.subCheck2Block\": \"Enabled styles\",\n \"admin/mega-menu.items.btnSaveForm\": \"SAVE CHANGES\",\n \"admin/mega-menu.items.infoFormTitle\": \"First level menu information\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Main menu:\",\n \"admin/mega-menu.items.infoForm2Title\": \"Second level menu information\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Main submenu\",\n \"admin/mega-menu.items.tooltip\": \"Select an available icon. If you want to add a custom icon, write in the field the id of your icon\",\n \"admin/mega-menu.items.tooltip2\": \"Add styles to menu item as bold font, size, and background, separated by commas. i.e: font-size:10px,color:red\",\n \"admin/mega-menu.items.tooltip3\": \"Change this slug may cause difficulties, please be make the change only is be necessary\",\n \"admin/mega-menu.items.nameRequired\": \"The field name is requiered\",\n \"admin/mega-menu.items.slugRequired\": \"The field slug is requiered\",\n \"admin/mega-menu.items.newItemFirst\": \"Complete the form: Add new first-level item\",\n \"admin/mega-menu.items.newItemSecond\": \"Complete the form: Add new second-level item\",\n \"admin/mega-menu.items.newItemThird\": \"Complete the form: Add new third-level item\",\n \"admin/mega-menu.items.validateName\": \"The field name is requiered\",\n \"admin/mega-menu.items.validateSlug\": \"The field slug is requiered\",\n \"admin/mega-menu.items.createItem\": \"Item created successful\",\n \"admin/mega-menu.items.editItem\": \"Data editing successful\",\n \"admin/mega-menu.items.deleteItem\": \"Data deleted successfull\",\n \"admin/mega-menu.backup.download\": \"Download CSV\",\n \"admin/mega-menu.backup.upload\": \"Upload data\",\n \"admin/mega-menu.backup.uploadAlert\": \"Data upload successfully\",\n \"admin/mega-menu.backup.duplicateData\": \"There are duplicate data in the file, please validate the file\",\n \"admin/mega-menu.settings.caution\": \"Caution! Changing these options may affect the appearance of the menu in the store\",\n \"admin/mega-menu.settings.orientationHV\": \"Orientation (Horizontal / Vertical)\",\n \"admin/mega-menu.settings.horizontal\": \"Horizontal\",\n \"admin/mega-menu.settings.vertical\": \"Vertical\",\n \"admin/mega-menu.settings.close\": \"Close\",\n \"admin/mega-menu.settings.confirm\": \"Confirm\",\n \"admin/mega-menu.items.emptyTitle\": \"No items to show\",\n \"admin/mega-menu.items.empty\": \"Add a new item to create your mega menu and view it on the store\"\n}\n\n```" } ]
code_mega-menu_9037ca53
[ { "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 mega-menu/messages/fr.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Menu Mega\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"Tout afficher\",\n \"store/mega-menu.goBackButton.title\": \"Retour\",\n \"admin/mega-menu.tabs.first\": \"Premier niveau\",\n \"admin/mega-menu.tabs.second\": \"Second niveau\",\n \"admin/mega-menu.tabs.third\": \"Troisième niveau\",\n \"admin/mega-menu.items.newButton\": \"AJOUTER UN NOUVEAU\",\n \"admin/mega-menu.items.firstSearch\": \"Menu de recherche\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Choisir un menu de premier niveau\",\n \"admin/mega-menu.items.secondSearch\": \"Rechercher dans le sous-menu second niveau\",\n \"admin/mega-menu.items.firstColumn\": \"Nom\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Symbole\",\n \"admin/mega-menu.items.fourColumn\": \"Actions\",\n \"admin/mega-menu.items.fiveColumn\": \"Visibilité\",\n \"admin/mega-menu.items.thirdSearch\": \"Rechercher dans le sous-menu de troisième niveau\",\n \"admin/mega-menu.items.dropDownThird\": \"Choisir un menu de deuxième niveau\",\n \"admin/mega-menu.items.titleApp\": \"Configuration des menus\",\n \"admin/mega-menu.items.loading\": \"Chargement ...\",\n \"admin/mega-menu.items.titleModal\": \"Êtes-vous sûr de vouloir supprimer cet article ?\",\n \"admin/mega-menu.items.bodyModal\": \"Cette action est irréversible. Vous allez supprimer l’article du menu de l’administrateur.\",\n \"admin/mega-menu.items.btnCancelModal\": \"Annuler\",\n \"admin/mega-menu.items.btnRemoveModal\": \"OUI, SUPPRIMER DU MENU\",\n \"admin/mega-menu.items.titleForm\": \"Remplir le formulaire : Modifier l’article\",\n \"admin/mega-menu.items.backBtnForm\": \"RETOUR À LA PAGE PRÉCÉDENTE\",\n \"admin/mega-menu.items.subTitleForm\": \"Remplir tous les champs du formulaire\",\n \"admin/mega-menu.items.infoForm\": \"Obligatoire*\",\n \"admin/mega-menu.items.input1Form\": \"Nom *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Symboles\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Choisir...\",\n \"admin/mega-menu.items.input4Form\": \"Styles\",\n \"admin/mega-menu.items.titleSubBlock\": \"Apparence\",\n \"admin/mega-menu.items.check1Block\": \"Afficher\",\n \"admin/mega-menu.items.subCheck1Block\": \"Afficher les éléments dans le menu\",\n \"admin/mega-menu.items.subCheck2Block\": \"Styles activés\",\n \"admin/mega-menu.items.btnSaveForm\": \"ENREGISTRER LES MODIFICATIONS\",\n \"admin/mega-menu.items.infoFormTitle\": \"Informations sur le menu de premier niveau\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Menu principal :\",\n \"admin/mega-menu.items.infoForm2Title\": \"Informations sur le menu de deuxième niveau\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Sous-menu principal\",\n \"admin/mega-menu.items.tooltip\": \"Sélectionnez un symbole disponible. Si vous souhaitez ajouter un symbole personnalisé, écrivez dans le champ l’Id de votre symbole\",\n \"admin/mega-menu.items.tooltip2\": \"Ajouter des styles à l’article de menu en gras en tant que police, taille et arrière-plan, séparés par des virgules : taille de police :10 px, couleur : rouge\",\n \"admin/mega-menu.items.tooltip3\": \"La modification de ce slug peut causer des complications, veuillez n’effectuer la modification que si nécessaire\",\n \"admin/mega-menu.items.nameRequired\": \"Le nom du champ est obligatoire\",\n \"admin/mega-menu.items.slugRequired\": \"Le slug de champ est obligatoire\",\n \"admin/mega-menu.items.newItemFirst\": \"Compléter le formulaire : Ajouter un nouvel élément de premier niveau\",\n \"admin/mega-menu.items.newItemSecond\": \"Compléter le formulaire : Ajouter un nouvel élément de deuxième niveau\",\n \"admin/mega-menu.items.newItemThird\": \"Compléter le formulaire : Ajouter un nouvel élément de troisième niveau\",\n \"admin/mega-menu.items.validateName\": \"Le nom du champ est obligatoire\",\n \"admin/mega-menu.items.validateSlug\": \"Le slug de champ est obligatoire\",\n \"admin/mega-menu.items.createItem\": \"Création de l’article réussie\",\n \"admin/mega-menu.items.editItem\": \"Modification des données réussie\",\n \"admin/mega-menu.items.deleteItem\": \"Données supprimées avec succès\",\n \"admin/mega-menu.backup.download\": \"Télécharger au format CSV\",\n \"admin/mega-menu.backup.upload\": \"Charger des données\",\n \"admin/mega-menu.backup.uploadAlert\": \"Le chargement des données a réussi\",\n \"admin/mega-menu.backup.duplicateData\": \"Il y a des données en double dans le fichier, veuillez valider le fichier\",\n \"admin/mega-menu.settings.caution\": \"Caution! Changing these options may affect the appearance of the menu in the store\",\n \"admin/mega-menu.settings.orientationHV\": \"Orientation (Horizontale / Verticale)\",\n \"admin/mega-menu.settings.horizontal\": \"Horizontale\",\n \"admin/mega-menu.settings.vertical\": \"Verticale\",\n \"admin/mega-menu.settings.close\": \"Fermer\",\n \"admin/mega-menu.settings.confirm\": \"Confirmer\"\n}\n\n```" } ]
code_mega-menu_26f4e12a
[ { "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 mega-menu/messages/es.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin/mega-menu.navigation.label-group\": \"Mega Menú\",\n \"store/mega-menu.submenu.seeAllButton.title\": \"Ver todo\",\n \"store/mega-menu.goBackButton.title\": \"Volver\",\n \"admin/mega-menu.tabs.first\": \"Primer nivel\",\n \"admin/mega-menu.tabs.second\": \"Segundo nivel\",\n \"admin/mega-menu.tabs.third\": \"Tercer nivel\",\n \"admin/mega-menu.items.newButton\": \"AÑADIR NUEVO\",\n \"admin/mega-menu.items.firstSearch\": \"Buscar menu\",\n \"admin/mega-menu.items.dropdownSecondLevel\": \"Seleccione un menu del primer nivel\",\n \"admin/mega-menu.items.secondSearch\": \"Buscar un submenu del segundo nivel\",\n \"admin/mega-menu.items.firstColumn\": \"Nombre\",\n \"admin/mega-menu.items.secondColumn\": \"Slug\",\n \"admin/mega-menu.items.thirdColumn\": \"Icono\",\n \"admin/mega-menu.items.fourColumn\": \"Acciones\",\n \"admin/mega-menu.items.fiveColumn\": \"Visibilidad\",\n \"admin/mega-menu.items.thirdSearch\": \"Buscar submenú del tercer nivel\",\n \"admin/mega-menu.items.dropDownThird\": \"Seleccione un menú del segundo nivel\",\n \"admin/mega-menu.items.titleApp\": \"Configurar Menú\",\n \"admin/mega-menu.items.loading\": \"Cargando...\",\n \"admin/mega-menu.items.titleModal\": \"¿Estás seguro que deseas eliminar este ítem?\",\n \"admin/mega-menu.items.bodyModal\": \"Esta acción es irreversible. Se removerá el ítem del menú de la tienda.\",\n \"admin/mega-menu.items.btnCancelModal\": \"Cancelar\",\n \"admin/mega-menu.items.btnRemoveModal\": \"Sí, remover del menú\",\n \"admin/mega-menu.items.titleForm\": \"Complete el formulario: Editar menú\",\n \"admin/mega-menu.items.backBtnForm\": \"Volver a la página anterior\",\n \"admin/mega-menu.items.subTitleForm\": \"Se deben llenar todos los campos del formulario\",\n \"admin/mega-menu.items.infoForm\": \"Obligatorio*\",\n \"admin/mega-menu.items.input1Form\": \"Nombre *\",\n \"admin/mega-menu.items.input2Form\": \"Slug *\",\n \"admin/mega-menu.items.input3Form\": \"Icono\",\n \"admin/mega-menu.items.input3Form.placeholder\": \"Selecciona...\",\n \"admin/mega-menu.items.input4Form\": \"Estilos\",\n \"admin/mega-menu.items.titleSubBlock\": \"Apariencia\",\n \"admin/mega-menu.items.check1Block\": \"Mostrar\",\n \"admin/mega-menu.items.subCheck1Block\": \"Mostrar item en el menú\",\n \"admin/mega-menu.items.subCheck2Block\": \"Activar estilos\",\n \"admin/mega-menu.items.btnSaveForm\": \"GUARDAR CAMBIOS\",\n \"admin/mega-menu.items.infoFormTitle\": \"Primer nivel del menú\",\n \"admin/mega-menu.items.infoFormSubtitle\": \"Menú principal\",\n \"admin/mega-menu.items.infoForm2Title\": \"Segundo nivel del menú\",\n \"admin/mega-menu.items.infoForm2Subtitle\": \"Submenú principal\",\n \"admin/mega-menu.items.tooltip\": \"Seleccione un icono de los disponibles. Si deseas agregar un icono personalizado, escribe en el campo el id de tu icono\",\n \"admin/mega-menu.items.tooltip2\": \"Añade estilos a los ítems del menú como letra en negrita, color de fondo, todo separado por comas. Ejemplo: font-size:10px,color:red\",\n \"admin/mega-menu.items.tooltip3\": \"Cambiar este slug puede causar problemas, asegurese de que todo esté en orden cuando realice el cambio\",\n \"admin/mega-menu.items.nameRequired\": \"The field name is requiered\",\n \"admin/mega-menu.items.slugRequired\": \"The field slug is requiered\",\n \"admin/mega-menu.items.newItemFirst\": \"Completa el formulario: Añade un nuevo ítem en el primer nivel\",\n \"admin/mega-menu.items.newItemSecond\": \"Completa el formulario: Añade un nuevo ítem en el segundo nivel\",\n \"admin/mega-menu.items.newItemThird\": \"Completa el formulario: Añade un nuevo ítem en el tercer nivel\",\n \"admin/mega-menu.items.validateName\": \"El campo nombre es obligatorio\",\n \"admin/mega-menu.items.validateSlug\": \"el campo slug es obligatorio\",\n \"admin/mega-menu.items.createItem\": \"Item creado exitosamente\",\n \"admin/mega-menu.items.editItem\": \"Datos editados exitosamente\",\n \"admin/mega-menu.items.deleteItem\": \"Datos eliminados exitosamente\",\n \"admin/mega-menu.backup.download\": \"Descargar CSV\",\n \"admin/mega-menu.backup.upload\": \"Cargar menu\",\n \"admin/mega-menu.backup.uploadAlert\": \"La carga del menú se realizó con éxito\",\n \"admin/mega-menu.backup.duplicateData\": \"Existen datos duplicados en el archivo, por favor validar e intentar de nuevo\",\n \"admin/mega-menu.settings.caution\": \"Caution! Changing these options may affect the appearance of the menu in the store\",\n \"admin/mega-menu.settings.orientationHV\": \"Orientación (Horizontal / Vertical)\",\n \"admin/mega-menu.settings.horizontal\": \"Horizontal\",\n \"admin/mega-menu.settings.vertical\": \"Vertical\",\n \"admin/mega-menu.settings.close\": \"Cerrar\",\n \"admin/mega-menu.settings.confirm\": \"Confirmar\"\n}\n\n```" } ]
code_mega-menu_b55272c3
[ { "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 mega-menu/admin/navigation.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"section\": \"storeSetup\",\n \"titleId\": \"admin/mega-menu.navigation.label-group\",\n \"path\": \"/admin/mega-menu/1\"\n}\n\n```" } ]
code_mega-menu_1d844503
[ { "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 mega-menu/admin/routes.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"admin.app.menu\": {\n \"component\": \"ConfigMenuContainer\",\n \"path\": \"/admin/app/mega-menu/:tab\"\n },\n \"admin.app.configMenu\": {\n \"component\": \"FormComponent\",\n \"path\": \"/admin/app/mega-menu/form-menu/:menu\"\n }\n}\n\n```" } ]
code_mega-menu_92ff5572
[ { "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 mega-menu/docs/README.md from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n📢 Don't fork this project. Use, contribute, or open issues through [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Mega menu\n\n> ⚠️ This app is no longer maintained by VTEX.\n\n<!-- DOCS-IGNORE:start -->\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n<!-- DOCS-IGNORE:end -->\n\nVTEX Mega Menu provides a form to create and manage the custom menu until three levels in the category tree. The stores can use this app as the main navigation menu.\n\n![mega-menu-app](https://user-images.githubusercontent.com/12108601/121273428-e140db00-c88d-11eb-850c-02399b803d18.png)\n\n## Configuration\n\n### Step 1 - Installing the Mega Menu app\n\nUsing your terminal, log in to the desired VTEX account and run the following command:\n\n`vtex install vtex.mega-menu@2.x`\n\n### Step 2 - Define the category tree to be used as a menu in the admin\n\nIn the account's admin dashboard, access `STORE SETUP > Mega Menu` and using the available options configure the category tree according to your needs:\n\n![mega-menu-admin-app](https://user-images.githubusercontent.com/8409481/185652487-8ca70f56-59f8-440c-b173-ad65a1763686.png)\n\n### Step 3 - Implementing the app's blocks in your store theme\n\n**IMPORTANT: If you have installed this app previously, please validate with your block settings and add the new components to modify the orientation Menu.\nNo change the option to vertical Menu if you haven't yet this configuration in your store.**\n\n---\n\nOnce the app is configured, it is time to place the following blocks in your Store Theme app.\n\nImport the mega menu app to your dependencies as `manifest.json`, for example:\n\n```json\n\"dependencies\": {\n\t\"vtex.mega-menu\": \"2.x\"\n}\n```\n\n### `mega-menu`\n\nThis block is responsible for querying the previously built category tree and displaying it in the store.\n\n| Prop name | Type | Description | Default value |\n| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| title | `String` | Title for the first level elements (departments) used in the mobile version or when the `orientation` is `vertical`. | Departments |\n| `orientation` | `String` | Type of menu to be built. Possible values are horizontal and `vertical` | A value is determined depending on the resolution of the device, if it is a mobile (phone and tablet) it is used `vertical` and for the rest `horizontal`. |\n| defaultDepartmentActive | `String` | You can use this property to determine a department that will be shown when first displaying the menu, this is useful if you want to highlight a specific department. | 🚫 |\n| openOnly | `String` | Define the orientation of the menu. You can choose between vertical or horizontal. | `vertical`or `horizontal` |\n\n### `mega-menu-trigger-btn`\n\nThis block renders an icon that will be used as a trigger to open the **desktop** menu or when the `orientation` is `horizontal` or `vertical`.\n\n_Note: Currently, this block receives the same props as an VTEX Store [Icon](https://github.com/vtex-apps/store-icons#props)._\n\n### `mega-menu-go-back-btn`\n\nThis block can go back to the list of items in the first level of the menu (departments) only works when it is a **mobile device** or the `orientation` is `vertical`.\n\n_To configure the desktop version:_\n\n```json\n{\n // ...\n\n \"sticky-layout#4-desktop\": {\n \"children\": [\"flex-layout.row#4-desktop\", \"flex-layout.row#mega-menu\"]\n },\n \"flex-layout.row#4-desktop\": {\n \"children\": [\n \"flex-layout.col#trigger-mega-menu\"\n // ...\n ]\n },\n\n \"flex-layout.row#mega-menu\": {\n \"children\": [\"mega-menu#desktop\"]\n },\n \"mega-menu#desktop\": {\n \"props\": {\n \"openOnly\": \"horizontal\"\n }\n },\n \"flex-layout.col#trigger-mega-menu\": {\n \"props\": {\n \"verticalAlign\": \"middle\"\n },\n \"children\": [\"mega-menu-trigger-btn\"]\n },\n \"mega-menu-trigger-btn\": {\n \"props\": {\n \"Drawer\": \"drawer\"\n }\n }\n}\n```\n\n_To configure the mobile version:_\n\n```json\n{\n // ...\n \"flex-layout.row#1-mobile\": {\n \"children\": [\n \"flex-layout.col#trigger-mega-menu\"\n // ...\n ],\n \"props\": {\n // ...\n }\n },\n\n \"drawer\": {\n \"children\": [\"mega-menu#mobile\"],\n \"blocks\": [\"drawer-header#my-drawer\"]\n },\n \"mega-menu#mobile\": {\n \"props\": {\n \"defaultDepartmentActive\": \"...\",\n \"orientation\": \"vertical\",\n \"openOnly\": \"vertical\"\n }\n },\n \"drawer-header#my-drawer\": {\n \"children\": [\"flex-layout.row#drawer-header\"]\n },\n \"flex-layout.row#drawer-header\": {\n \"children\": [\n \"flex-layout.col#mega-menu-go-back-btn\",\n \"flex-layout.col#spacer\",\n \"flex-layout.col#drawer-close-button\"\n ],\n \"props\": {\n \"blockClass\": \"drawer-header\",\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true,\n \"preserveLayoutOnMobile\": true,\n \"fullWidth\": true\n }\n },\n \"flex-layout.col#drawer-close-button\": {\n \"children\": [\"drawer-close-button\"],\n \"props\": {\n \"verticalAlign\": \"middle\",\n \"horizontalAlign\": \"right\"\n }\n },\n \"flex-layout.col#mega-menu-go-back-btn\": {\n \"children\": [\"mega-menu-go-back-btn\"],\n \"props\": {\n \"verticalAlign\": \"middle\",\n \"horizontalAlign\": \"left\",\n \"paddingLeft\": 4\n }\n }\n}\n```\n\n## Notes\n\n### Icons for menu items\n\nIn the form of creation and edition of a menu item it is possible to add an icon, currently you can select any of the [ICONPACK](https://github.com/vtex-apps/store-icons/blob/master/styles/iconpacks/iconpack.svg) that comes default with your store, but if you have customized (for more information read the following [guide](https://github.com/vtex-apps/store-icons/blob/master/docs/ICONPACK.md)) that file the modifications will not be visible in the select, therefore you must write the id of the icon manually.\n\n![icon-selector](https://user-images.githubusercontent.com/12108601/122150424-5595f400-ce23-11eb-9f1e-c52c668c35f4.png)\n\n### Styles for menu items\n\nYou can customize an element in a basic way using **comma (,)** separated CSS properties, for example:\n\n⚠️ _It is important not to abuse this functionality, for complex persoanlizations use [CSS Handle](#customization)._\n\n```\npadding-top:5px,\npadding-left:20px,\npadding-right:20px,\npadding-bottom:5px,\nfont-size:20px,\nfont-weight:bold,\nbackground-color:yellow,\ncolor:red\n```\n\n![custom-item-using-css](https://user-images.githubusercontent.com/12108601/122150523-8118de80-ce23-11eb-80af-182be8348db5.png)\n\n## Customization\n\nIn order to apply CSS customizations on this and other blocks, follow the instructions given in the recipe on [Using CSS Handles for store customization](https://vtex.io/docs/recipes/style/using-css-handles-for-store-customization).\n\n| CSS Handle |\n| --------------------------------- |\n| `goBackContainer` |\n| `goBackButton` |\n| `goBackButtonIcon` |\n| `goBackButtonText` |\n| `menuContainer` |\n| `menuContainerNav` |\n| `menuItem` |\n| `submenuContainer` |\n| `styledLink` |\n| `styledLinkIcon` |\n| `styledLinkContainer` |\n| `styledLinkContent` |\n| `accordionIconContainer` |\n| `accordionIconContainer—isOpen` |\n| `accordionIconContainer—isClosed` |\n| `accordionIcon` |\n| `submenuContainer` |\n| `submenuList` |\n| `submenuListVertical` |\n| `submenuItem` |\n| `submenuItem—isOpen` |\n| `submenuItem—isClosed` |\n| `submenuItemVertical` |\n| `collapsibleContent` |\n| `collapsibleHeaderText` |\n| `seeAllLinkContainer` |\n| `seeAllLink` |\n| `triggerContainer` |\n| `triggerButtonIcon` |\n| `triggerButtonIcon—active` |\n| `triggerButtonIcon—muted` |\n| `menuContainerVertical` |\n| `departmentsContainer` |\n| `menuContainerNavVertical` |\n| `menuItemVertical` |\n| `submenuContainerVertical` |\n\n### Upload mega menu data from CSV file\n\nTo upload data from a CSV file, You should create an import file with the following structure. The data will then be stored in the VBASE successfully.\n\n![11](https://user-images.githubusercontent.com/8409481/152260407-8f5220d3-9522-41a9-b974-08915240985e.png)\n\nThe field `subMenus` is a String with the following structure:\n\n`[{ \"id\":\"submenu1383316\", \"name\":\"submenu1\", \"icon\":\"\",\"slug\":\"Menu1/submenu1\", \"styles\":\"\",\"display\":true, \"enableSty\":true,\"order\":1, \"slugRoot\":\"submenu1\", \"slugRelative\":\"Menu1\", \"menu\":[{ \"id\":\"sub-tercernivel-menu12121\", \"name\":\"sub-tercernivel-menu1-3\", \"icon\":\"\", \"slug\":\"Menu1/submenu1/menu1-3\", \"styles\":\"\", \"display\":true, \"enableSty\":true, \"order\":1, \"slugRoot\":\"menu1-3\", \"slugRelative\":\"Menu1/submenu1\"}] }]`\n\nThe file should have the field like to show below:\n\n![12](https://user-images.githubusercontent.com/8409481/152260595-0ba50600-52f3-42db-b754-85b794c4e567.png)\n\nYou can add the rows quantity that you want. Remember to keep the structure defined previously in all data.\n\n![13](https://user-images.githubusercontent.com/8409481/152260652-732fbeda-1d61-49ce-afa1-6a19b8d9b05c.png)\n\nSave the file. You can choose any name for the file. Then go to the admin and select the option “upload data”\n\n![14](https://user-images.githubusercontent.com/8409481/152260742-6ee24d1f-48ae-4383-ab02-b3d921a283e4.png)\n\nTo generate backup data, download the information from the button “Download CSV”\n\n![15](https://user-images.githubusercontent.com/8409481/152260800-7ecc499a-ba39-4168-8dcd-c0b225f610db.png)\n\n![16](https://user-images.githubusercontent.com/8409481/152260876-07321655-a4ca-43eb-9c92-974ff8f9b12b.png)\n\nThis button only is available if the mega menu has data to save. The download file has the same structure defined at the begging of this step.\n\n## NEW FUNCTIONALITY: Choose the orientation of the Mega Menu on the Desktop\n\nIn this release, Mega Menu App has new functionality that allows you to choose the orientation. You can choose between Horizontal o Vertical.\n\n**IMPORTANT: before choosing the vertical option to desktop, configure the blocks in your store. Go to step 3 of this guide to configure the blocks**\n\nWhen you guarantee the configuration of blocks in the store, go to the new button to settings of Mega Menu and change the orientation.\n\n![image](https://user-images.githubusercontent.com/8409481/185653890-f6c423bd-8d32-404e-a416-141820f73112.png)\n\n![image](https://user-images.githubusercontent.com/8409481/185654543-a245860e-d661-4011-a89a-7b3db33b3cd3.png)\n\nPress the `Confirm`button to save the configuration of orientation menu.\n\n```" } ]
code_mega-menu_8d599a78
[ { "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 mega-menu/graphql/schema.graphql from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\ntype Query {\n menus(isMobile: Boolean): [Menu]\n menu(id: ID!): Menu\n settings: [Settings]\n setting(id: ID!): Settings\n}\n\ntype Mutation {\n editMenu(menuInput: MenuInput!): [Menu]\n deleteMenu(id: String, idSecond: String, idThird: String): [Menu]\n createMenu(menuInput: MenuInput!): Menu\n uploadMenu(menuData: [MenuInput]): [Menu]\n createEditSettings(settingsInput: SettingsInput!): Settings\n}\n\n```" } ]
code_mega-menu_ebae566f
[ { "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 mega-menu/node/service.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"memory\": 256,\n \"ttl\": 10,\n \"timeout\": 1,\n \"minReplicas\": 2,\n \"maxReplicas\": 5\n}\n\n```" } ]
code_mega-menu_5e163b47
[ { "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 mega-menu/node/package.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"mega-menu\",\n \"private\": true,\n \"license\": \"MIT\",\n \"dependencies\": {},\n \"scripts\": {\n \"lint\": \"tsc --noEmit && tslint -c tslint.json './**/*.ts'\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.0.0\",\n \"@types/ramda\": \"types/npm-ramda#dist\",\n \"@vtex/api\": \"6.45.15\",\n \"tslint\": \"^5.12.0\",\n \"tslint-config-vtex\": \"^2.1.0\",\n \"typescript\": \"3.9.7\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles\",\n \"vtex.device-detector\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.device-detector@0.2.6/public/@types/vtex.device-detector\",\n \"vtex.native-types\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.8.0/public/@types/vtex.native-types\",\n \"vtex.store-drawer\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-drawer@0.16.2/public/@types/vtex.store-drawer\",\n \"vtex.store-icons\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide\"\n },\n \"version\": \"2.10.1\"\n}\n\n```" } ]
code_mega-menu_9915d211
[ { "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 mega-menu/node/index.ts from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport type { ParamsContext, RecorderState } from '@vtex/api'\nimport { Service } from '@vtex/api'\n\nimport { resolvers } from './resolvers'\nimport { Clients } from './clients'\n\nconst MEDIUM_TIMEOUT_MS = 2 * 1000\n\n// Export a service that defines resolvers and clients options\nexport default new Service<Clients, RecorderState, ParamsContext>({\n clients: {\n implementation: Clients,\n options: {\n default: {\n timeout: MEDIUM_TIMEOUT_MS,\n },\n },\n },\n graphql: {\n resolvers,\n },\n})\n\n```" } ]
code_mega-menu_0187e0b1
[ { "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 mega-menu/react/MegaMenu.tsx from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport Wrapper from './MegaMenu/wrapper'\n\nexport default Wrapper\n\n```" } ]
code_mega-menu_2ce9acda
[ { "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 mega-menu/react/ConfigMenuContainer.tsx from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable max-params */\nimport type { FC } from 'react'\nimport React, { useState, useMemo, useCallback, useEffect } from 'react'\nimport { Tabs, Tab, Layout, PageHeader, Alert } from 'vtex.styleguide'\nimport { useQuery } from 'react-apollo'\nimport type { InjectedIntlProps } from 'react-intl'\nimport { defineMessages, injectIntl } from 'react-intl'\nimport { formatIOMessage } from 'vtex.native-types'\nimport { FaCog } from 'react-icons/fa'\n\nimport FirsLevelContainer from './Category/FirstLevelContainer'\nimport SecondLevelContainer from './Category/SecondLevelContainer'\nimport ThirdLevelContainer from './Category/ThirdLevelContainer'\nimport CategoryContainer from './Category/CategoryContainer'\nimport SettingsMenu from './Category/SettingsMenu'\nimport GET_MENUS from './graphql/queries/getMenus.graphql'\nimport { DataMenuProvider } from './shared'\nimport type { DataMenu, DeleteArrayType } from './shared'\nimport styles from './ConfigMenu.css'\n\ninterface TypeDataItems {\n menus: DataMenu[]\n}\n\nconst messages = defineMessages({\n firstLevelTab: {\n defaultMessage: '',\n id: 'admin/mega-menu.tabs.first',\n },\n secondLevelTab: {\n defaultMessage: '',\n id: 'admin/mega-menu.tabs.second',\n },\n thirdLevelTab: {\n defaultMessage: '',\n id: 'admin/mega-menu.tabs.third',\n },\n titleApp: {\n defaultMessage: '',\n id: 'admin/mega-menu.items.titleApp',\n },\n})\n\nconst ConfigMenuContainer: FC<InjectedIntlProps> = ({ intl }) => {\n const [currentTab, setCurrentTab] = useState(1)\n const { loading, data } = useQuery(GET_MENUS, {\n fetchPolicy: 'no-cache',\n })\n\n const typeArraData: DataMenu[] = []\n const typeDataItems: TypeDataItems = { menus: [] }\n const [alert, setAlert] = useState(false)\n const [message, setMessage] = useState('')\n const [typeModal, setTypeModal] = useState('success')\n const [dataMenuArray, setDataMenuArr] = useState(typeArraData)\n const [dataItems, setDataItems] = useState(typeDataItems)\n const [loadingData, setLoadingData] = useState(true)\n const [showSettings, setShowSettings] = useState(false)\n\n const url = window.location.href.slice(-1)\n\n useEffect(() => {\n if (!loading) {\n setCurrentTab(parseInt(url, 10))\n setLoadingData(false)\n }\n\n if (data) {\n setDataItems(data)\n }\n }, [data]) // eslint-disable-line react-hooks/exhaustive-deps\n\n const showAlert = useCallback(\n (\n show: boolean,\n messageAlert: string,\n newData: DeleteArrayType,\n type?: string\n ) => {\n if (type) if (type === 'warning') setTypeModal('warning')\n if (newData) newData.deleteMenu\n setAlert(show)\n setMessage(messageAlert)\n },\n []\n )\n\n const clearLocalStorage = () => {\n localStorage.removeItem('idFirstlvl')\n localStorage.removeItem('idSecondlvl')\n localStorage.removeItem('idFirstLevel')\n }\n\n const updateData = useCallback((dataMenuArr: DataMenu[], type: string) => {\n if (type === 'search') setDataMenuArr(dataMenuArr)\n else setDataItems({ menus: dataMenuArr })\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n const dataMenuCtx = useMemo(\n () => ({\n dataMenu:\n dataMenuArray.length > 0 ? dataMenuArray : dataItems?.menus || [],\n showAlert,\n updateData,\n loading: loadingData,\n }),\n [dataItems, dataMenuArray, showAlert, updateData, loadingData]\n )\n\n return (\n <div>\n {!!alert && (\n <Alert type={typeModal} onClose={() => setAlert(false)}>\n {message}\n </Alert>\n )}\n <DataMenuProvider value={dataMenuCtx}>\n <Layout\n pageHeader={\n <PageHeader\n title={formatIOMessage({\n id: messages.titleApp.id,\n intl,\n }).toString()}\n />\n }\n fullWidth\n >\n {showSettings && (\n <SettingsMenu\n showSettings={showSettings}\n setShowSettings={setShowSettings}\n />\n )}\n <div className={styles.btnSettings}>\n <CategoryContainer\n setDataItems={setDataItems}\n showAlert={showAlert}\n dataMenu={dataItems}\n />\n </div>\n <div className=\"flex justify-end mt5\">\n <FaCog\n size={25}\n color=\"0C389F\"\n cursor=\"pointer\"\n onClick={() => setShowSettings(!showSettings)}\n />\n </div>\n <Tabs>\n <Tab\n label={formatIOMessage({ id: messages.firstLevelTab.id, intl })}\n active={currentTab === 1}\n onClick={() => {\n setCurrentTab(1)\n clearLocalStorage()\n }}\n >\n <FirsLevelContainer />\n </Tab>\n <Tab\n label={formatIOMessage({ id: messages.secondLevelTab.id, intl })}\n active={currentTab === 2}\n onClick={() => {\n setCurrentTab(2)\n clearLocalStorage()\n }}\n >\n <SecondLevelContainer />\n </Tab>\n <Tab\n label={formatIOMessage({ id: messages.thirdLevelTab.id, intl })}\n active={currentTab === 3}\n onClick={() => {\n setCurrentTab(3)\n clearLocalStorage()\n }}\n >\n <ThirdLevelContainer />\n </Tab>\n </Tabs>\n </Layout>\n </DataMenuProvider>\n </div>\n )\n}\n\nexport default injectIntl(ConfigMenuContainer)\n\n```" } ]
code_mega-menu_98ee0473
[ { "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 mega-menu/react/GoBackButton.tsx from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport GoBackButton from './MegaMenu/components/GoBackButton'\n\nexport default GoBackButton\n\n```" } ]
code_mega-menu_52d87cba
[ { "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 mega-menu/react/TriggerButton.tsx from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport TriggerButton from './MegaMenu/components/TriggerButton'\n\nexport default TriggerButton\n\n```" } ]
code_mega-menu_90c6131b
[ { "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 mega-menu/react/package.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"mega-menu\",\n \"private\": true,\n \"license\": \"MIT\",\n \"scripts\": {\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"classnames\": \"^2.3.1\",\n \"export-to-csv\": \"^0.2.1\",\n \"mobx\": \"^6.3.2\",\n \"mobx-react-lite\": \"^3.2.0\",\n \"react-apollo\": \"^3.1.5\",\n \"react-csv-reader\": \"^3.4.0\",\n \"react-icons\": \"^4.4.0\",\n \"react-intl\": \"^5.20.6\",\n \"react-loading-skeleton\": \"^2.2.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^11.12.1\",\n \"@types/react\": \"^16.8.10\",\n \"@types/react-intl\": \"^2.3.17\",\n \"@vtex/test-tools\": \"^3.3.2\",\n \"@vtex/tsconfig\": \"^0.5.6\",\n \"apollo-client\": \"^2.4.7\",\n \"graphql\": \"^15.5.0\",\n \"react\": \"^16.8.6\",\n \"react-dom\": \"^16.8.6\",\n \"typescript\": \"3.9.7\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles\",\n \"vtex.device-detector\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.device-detector@0.2.6/public/@types/vtex.device-detector\",\n \"vtex.native-types\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.8.0/public/@types/vtex.native-types\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.132.4/public/@types/vtex.render-runtime\",\n \"vtex.store-drawer\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-drawer@0.16.2/public/@types/vtex.store-drawer\",\n \"vtex.store-icons\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.1/public/@types/vtex.styleguide\"\n },\n \"version\": \"2.10.1\"\n}\n\n```" } ]
code_mega-menu_3d8fa399
[ { "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 mega-menu/react/ConfigMenu.css from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.btnSettings {\n position: fixed;\n bottom: 20px;\n right: 40px;\n z-index: 1;\n}\n\n```" } ]
code_mega-menu_a4e39ca6
[ { "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 mega-menu/react/FormComponent.tsx from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable prettier/prettier */\nimport type { FC } from 'react'\nimport React, { useState, useEffect } from 'react'\nimport {\n Toggle,\n Input,\n PageBlock,\n Layout,\n PageHeader,\n ButtonWithIcon,\n FloatingActionBar,\n Card,\n Alert,\n Tooltip,\n Textarea,\n Spinner,\n} from 'vtex.styleguide'\nimport { useRuntime } from 'vtex.render-runtime'\nimport { useQuery, useMutation } from 'react-apollo'\nimport type { InjectedIntlProps } from 'react-intl'\nimport { injectIntl } from 'react-intl'\nimport { formatIOMessage } from 'vtex.native-types'\n\nimport IconInfo from './icons/IconInfo'\nimport IconArrowLeft from './icons/IconArrowLeft'\nimport CREATE from './graphql/mutations/create.graphql'\nimport GETMENU from './graphql/queries/getMenu.graphql'\nimport EDIT from './graphql/mutations/edit.graphql'\nimport { IconSelector, messagesForm } from './shared'\nimport type { DataMenu, MenuItem } from './shared'\n\nconst arrowLeft = <IconArrowLeft />\n\ninterface FormComponentProps {\n id: string\n params: {\n menu: string\n }\n}\n\nconst messages = messagesForm\n\nconst FormComponent: FC<FormComponentProps & InjectedIntlProps> = (props) => {\n const dataMenuTypeArray: DataMenu[] = []\n const dataMenuType: DataMenu = {\n icon: '',\n id: '',\n name: '',\n slug: '',\n styles: '',\n menu: [],\n display: false,\n enableSty: false,\n }\n\n const { navigate } = useRuntime()\n\n const [name, setName] = useState('')\n const [icon, setIcon] = useState('')\n const [slug, setSlug] = useState('')\n const [slugRoot, setSlugRoot] = useState('')\n const [slugRelative, setSlugRelative] = useState('')\n const [styles, setStyles] = useState('')\n const [display, setDisplay] = useState(true)\n const [enableSty, setEnableSty] = useState(true)\n const [mobile, setMobile] = useState(true)\n const [desktop, setDesktop] = useState(true)\n const [idMenu, setIdMenu] = useState('')\n const [mainMenu, setMainMenu] = useState(dataMenuType)\n const [subMenu, setSubMenu] = useState(dataMenuTypeArray)\n const [alert, setAlert] = useState(false)\n const [order, setOrder] = useState(0)\n const [message, setMessage] = useState('')\n const [levelInfo, setLevelInfo] = useState(Object)\n const [messageName, setMessageName] = useState('')\n const [messageSlug, setMessageSlug] = useState('')\n\n const responseForm = JSON.parse(decodeURIComponent(props.params.menu))\n\n const [createNewMenu, { data: dataSave }] = useMutation(CREATE, {\n fetchPolicy: 'no-cache',\n })\n\n const [menuInput, { data: dataEdit }] = useMutation(EDIT, {\n fetchPolicy: 'no-cache',\n })\n\n const { loading, data: dataMenu } = useQuery(GETMENU, {\n variables: {\n id: responseForm.firstLevel ? responseForm.firstLevel : responseForm.id,\n },\n fetchPolicy: 'no-cache',\n })\n\n const btnSave = formatIOMessage({\n id: messages.btnSaveForm.id,\n intl: props.intl,\n }).toString()\n\n const messageTranslate = (key: string) => {\n const keyObj = `admin/mega-menu.items.${key}`\n\n return formatIOMessage({\n id: keyObj,\n intl: props.intl,\n }).toString()\n }\n\n /* eslint max-params: [\"error\", 13] */\n /* eslint-env es9 */\n const setDataForm = (\n idenMenu: string,\n nameMenu: string,\n iconMenu: string,\n slugMenu: string,\n slugRootMenu: string,\n slugRelativeMenu: string,\n stylesMenu: string,\n subMenuData: DataMenu[],\n displayMenu: boolean,\n enableStyMenu: boolean,\n orderMenu: number,\n mobileMenu: boolean,\n desktopMenu: boolean\n ) => {\n setIdMenu(idenMenu)\n setName(nameMenu)\n setIcon(iconMenu)\n setSlug(slugMenu)\n setSlugRoot(slugRootMenu)\n setSlugRelative(slugRelativeMenu)\n setStyles(stylesMenu)\n setSubMenu(subMenuData)\n setDisplay(displayMenu)\n setEnableSty(enableStyMenu)\n setOrder(orderMenu)\n setMobile(mobileMenu)\n setDesktop(desktopMenu)\n }\n\n useEffect(() => {\n if (!dataMenu) return\n\n let secondName = ''\n let secondLevelSlug = ''\n\n setMainMenu(dataMenu.menu)\n\n if (responseForm.type === 'edit') {\n if (responseForm.level === 'firstLevel') {\n document.getElementsByClassName('c-muted-2')[0].textContent =\n dataMenu.menu.icon\n setDataForm(\n dataMenu.menu.id,\n dataMenu.menu.name,\n dataMenu.menu.icon,\n dataMenu.menu.slug,\n dataMenu.menu.slugRoot,\n dataMenu.menu.slugRelative,\n dataMenu.menu.styles,\n dataMenu.menu.menu,\n dataMenu.menu.display,\n dataMenu.menu.enableSty,\n dataMenu.menu.order,\n dataMenu.menu.mobile ?? mobile,\n dataMenu.menu.desktop ?? desktop\n )\n } else if (responseForm.level === 'secondLevel') {\n setLevelInfo({ firstLevel: dataMenu.menu.name })\n const submenu = dataMenu.menu.menu.filter(\n (item: DataMenu) => item.id === responseForm.id\n )\n\n let rootRelative = ['', '']\n\n if (\n submenu[0].slug &&\n !submenu[0].slugRoot &&\n !submenu[0].slugRelative\n ) {\n rootRelative = submenu[0].slug.split('/')\n\n rootRelative.shift()\n }\n\n setDataForm(\n submenu[0].id,\n submenu[0].name,\n submenu[0].icon,\n submenu[0].slug,\n submenu[0].slugRoot ?? rootRelative[1],\n submenu[0].slugRelative ?? rootRelative[0],\n submenu[0].styles,\n [],\n submenu[0].display,\n submenu[0].enableSty,\n submenu[0].order,\n submenu[0].mobile ?? mobile,\n submenu[0].desktop ?? desktop\n )\n } else {\n const tempArrayTL: DataMenu[] = []\n\n dataMenu.menu.menu.forEach((item: DataMenu) => {\n if (item.id === responseForm.secondLevel) {\n secondName = item.name\n }\n\n if (item.menu) {\n item.menu.forEach((i: DataMenu) => {\n if (i.id === responseForm.id) {\n tempArrayTL.push(i)\n }\n })\n }\n })\n\n setSubMenu(tempArrayTL)\n let rootRelative = ['', '']\n\n if (\n tempArrayTL[0].slug &&\n !tempArrayTL[0].slugRoot &&\n !tempArrayTL[0].slugRelative\n ) {\n rootRelative = tempArrayTL[0].slug.split('/')\n\n rootRelative.shift()\n\n const rootPath = `${rootRelative[0]}/${rootRelative[1]}`\n\n rootRelative = [rootRelative[2], rootPath]\n }\n\n setDataForm(\n tempArrayTL[0].id,\n tempArrayTL[0].name,\n tempArrayTL[0].icon,\n tempArrayTL[0].slug,\n tempArrayTL[0].slugRoot ?? rootRelative[0],\n tempArrayTL[0].slugRelative ?? rootRelative[1],\n tempArrayTL[0].styles,\n [],\n tempArrayTL[0].display,\n tempArrayTL[0].enableSty,\n tempArrayTL[0].order ?? 0,\n tempArrayTL[0].mobile ?? true,\n tempArrayTL[0].desktop ?? true\n )\n\n setLevelInfo({\n firstLevel: dataMenu.menu.name,\n secondLevel: secondName,\n })\n }\n } else {\n if (responseForm.level === 'thirdLevel') {\n dataMenu.menu.menu.forEach((item: DataMenu) => {\n if (item.id === responseForm.secondLevel) {\n secondName = item.name\n secondLevelSlug = item.slug ?? ''\n }\n })\n }\n\n setLevelInfo({\n firstLevel: dataMenu.menu.name,\n secondLevel: secondName,\n firstLevelSlugRelative: dataMenu.menu.slug,\n secondLevelSlugRelative: secondLevelSlug,\n })\n }\n }, [dataMenu]) // eslint-disable-line react-hooks/exhaustive-deps\n\n const returnHome = () => {\n const tab =\n responseForm.level === 'firstLevel'\n ? '1'\n : responseForm.level === 'secondLevel'\n ? '2'\n : '3'\n\n navigate({\n to: `/admin/app/mega-menu/${tab}`,\n })\n }\n\n const activateAlert = () => {\n setAlert(true)\n window.scrollTo(0, 0)\n setTimeout(() => {\n setAlert(false)\n }, 4000)\n }\n\n useEffect(() => {\n if (dataSave) {\n activateAlert()\n }\n }, [dataSave]) // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n if (dataEdit) {\n activateAlert()\n }\n }, [dataEdit])\n\n const changeStyle = (e: { id: string; value: string }) => {\n setAlert(false)\n setMessageName('')\n setMessageSlug('')\n switch (e.id) {\n case 'name':\n setName(e.value)\n break\n\n case 'slug':\n setSlug(e.value)\n break\n\n case 'slugRoot':\n setSlugRoot(e.value)\n break\n\n case 'icon':\n setIcon(e.value)\n break\n\n case 'styles':\n setStyles(e.value)\n break\n\n case 'display':\n setDisplay(!display)\n break\n\n case 'enableSty':\n setEnableSty(!enableSty)\n break\n\n case 'slugRelative':\n setSlugRelative(e.value)\n break\n\n case 'mobile':\n setMobile(!mobile)\n break\n\n case 'desktop':\n setDesktop(!desktop)\n break\n\n default:\n break\n }\n }\n\n const randomId = () => {\n const n = 50\n const arr = new Array(n)\n\n for (let i = 0; i < n; i++) {\n arr[i] = i + 1\n }\n\n arr.sort(() => (Math.random() > 0.5 ? 1 : -1))\n const randomNumber = arr.slice(0, 3).join('')\n\n return randomNumber\n }\n\n const insertSubMenu = (mainMenuLevel: DataMenu, subMenuLevel: MenuItem[]) => {\n menuInput({\n variables: {\n editMenu: {\n id: mainMenuLevel.id,\n name: mainMenuLevel.name,\n icon: mainMenuLevel.icon,\n slug: mainMenuLevel.slug,\n styles: mainMenuLevel.styles,\n menu: subMenuLevel,\n display: mainMenuLevel.display,\n enableSty: mainMenuLevel.enableSty,\n order: mainMenuLevel.order,\n slugRoot: mainMenuLevel.slugRoot,\n slugRelative: mainMenuLevel.slugRelative,\n mobile: mainMenuLevel.mobile,\n desktop: mainMenuLevel.desktop,\n },\n },\n })\n }\n\n const saveChanges = () => {\n const menu = mainMenu\n let secondMenu = subMenu\n\n if (responseForm.level === 'firstLevel') {\n createNewMenu({\n variables: {\n menuInput: {\n id: name + randomId(),\n name,\n icon,\n slug,\n styles,\n menu: subMenu,\n display,\n enableSty,\n mobile,\n desktop,\n },\n },\n })\n setMessage(messageTranslate('createItem'))\n } else if (responseForm.level === 'secondLevel') {\n if (menu.menu) secondMenu = menu.menu\n const orderSubMenu = menu.menu ? menu.menu.length : 0\n\n secondMenu.push({\n id: name + randomId(),\n name,\n icon,\n slug: `${menu.slug}/${slug}`,\n styles,\n display,\n enableSty,\n order: orderSubMenu + 1,\n slugRoot: slug,\n slugRelative: menu.slug,\n mobile,\n desktop,\n })\n\n insertSubMenu(\n {\n id: menu.id,\n name: menu.name,\n icon: menu.icon,\n slug: menu.slug,\n styles: menu.styles,\n display: menu.display,\n enableSty: menu.enableSty,\n order: menu.order,\n mobile,\n desktop,\n },\n secondMenu\n )\n setMessage(messageTranslate('createItem'))\n } else {\n const getOrderthr = menu.menu?.filter(\n (item: MenuItem) => item.id === responseForm.secondLevel\n )\n\n const valueOrder = getOrderthr ? getOrderthr[0].menu : []\n const valueSlug = getOrderthr ? getOrderthr[0].slug : []\n\n const newSubMenu = {\n id: name + randomId(),\n name,\n icon,\n slug: `${valueSlug}/${slug}`,\n styles,\n display,\n enableSty,\n order: valueOrder ? valueOrder.length + 1 : 1,\n slugRoot: slug,\n slugRelative: `${valueSlug}`,\n mobile,\n desktop,\n }\n\n if (menu.menu) {\n menu.menu.forEach((i: DataMenu) => {\n if (i.id === responseForm.secondLevel) {\n if (i.menu) {\n i.menu.push(newSubMenu)\n } else {\n i.menu = [newSubMenu]\n }\n }\n })\n }\n\n insertSubMenu(\n {\n id: menu.id,\n name: menu.name,\n icon: menu.icon,\n slug: menu.slug,\n styles: menu.styles,\n display: menu.display,\n enableSty: menu.enableSty,\n order: menu.order,\n slugRoot: menu.slugRoot,\n slugRelative: menu.slugRelative,\n mobile: menu.mobile,\n desktop: menu.desktop,\n },\n menu.menu ? menu.menu : []\n )\n setMessage(messageTranslate('createItem'))\n }\n }\n\n const getNewPath = (\n slugPath: string,\n slugRootPath: string | undefined,\n slugRelativePath: string | undefined\n ) => {\n let rootRelative = ['']\n\n if (slugPath && !slugRootPath && !slugRelativePath) {\n rootRelative = slugPath.split('/')\n rootRelative.shift()\n }\n\n return rootRelative\n }\n\n const editItem = () => {\n const menu = { ...mainMenu }\n\n let tempSecond: DataMenu[] = []\n\n if (responseForm.level === 'firstLevel') {\n const menuLevelTwo = menu.menu ? menu.menu : []\n const menuLevelTwoUpdate: MenuItem[] = []\n\n if (menuLevelTwo?.length) {\n menuLevelTwo.forEach((item: MenuItem) => {\n if (item.slugRelative === slug) return\n const dataPath = getNewPath(\n item.slug,\n item.slugRoot,\n item.slugRelative\n )\n\n let createSlug = !item.slugRoot\n ? `${slug}/${dataPath[1]}`\n : item.slugRoot === null\n ? `${slug}/`\n : `${slug}/${item.slugRoot}`\n\n createSlug = createSlug.replace('undefined', '')\n\n const updateLevel: MenuItem = {\n ...item,\n slug: createSlug,\n slugRelative: slug,\n slugRoot: !item.slugRoot ? dataPath[1] : item.slugRoot,\n }\n\n menuLevelTwoUpdate.push(updateLevel)\n })\n }\n\n let menuLevelThirdUpdate: MenuItem[] = []\n\n if (menuLevelTwoUpdate?.length) {\n menuLevelTwoUpdate.forEach((itemSecond: MenuItem) => {\n menuLevelThirdUpdate = []\n if (itemSecond.menu?.length) {\n itemSecond.menu.forEach((itemThird: MenuItem) => {\n if (itemSecond.slugRelative === itemThird.slug) return\n\n const dataPath = getNewPath(\n itemThird.slug,\n itemThird.slugRoot,\n itemThird.slugRelative\n )\n\n const updateLevel: MenuItem = {\n ...itemThird,\n slug:\n dataPath.length >= 3\n ? `${slug}/${dataPath[1]}/${dataPath[2]}`\n : itemThird.slugRoot === null\n ? `${itemSecond.slug}/`\n : `${itemSecond.slug}/${itemThird.slugRoot}`,\n slugRelative:\n dataPath.length >= 3\n ? `${slug}/${dataPath[1]}`\n : itemSecond.slug,\n slugRoot: !itemThird.slugRoot\n ? dataPath[2]\n : itemThird.slugRoot,\n }\n\n menuLevelThirdUpdate.push(updateLevel)\n })\n\n itemSecond.menu = menuLevelThirdUpdate\n }\n })\n }\n\n const subMenuOtherLevels: MenuItem[] =\n menuLevelTwoUpdate.length > 0 ? menuLevelTwoUpdate : menuLevelTwo\n\n insertSubMenu(\n {\n id: idMenu,\n name,\n icon,\n slug,\n styles,\n display,\n enableSty,\n order,\n mobile,\n desktop,\n },\n subMenuOtherLevels\n )\n\n setMessage(messageTranslate('editItem'))\n } else if (responseForm.level === 'secondLevel') {\n const menuSecondSlug = `${slugRelative}/${slugRoot}`\n\n if (menu.menu) {\n tempSecond = menu.menu.filter((i: DataMenu) => i.id === responseForm.id)\n\n tempSecond[0].name = name\n tempSecond[0].icon = icon\n tempSecond[0].slug = menuSecondSlug\n tempSecond[0].slugRoot = slugRoot\n tempSecond[0].slugRelative = slugRelative\n tempSecond[0].styles = styles\n tempSecond[0].display = display\n tempSecond[0].enableSty = enableSty\n tempSecond[0].order = order\n tempSecond[0].mobile = mobile\n tempSecond[0].desktop = desktop\n }\n\n let menuLevelThirdUpdate: MenuItem[] = []\n\n menu.menu?.forEach((itemSecond: MenuItem) => {\n menuLevelThirdUpdate = []\n if (itemSecond.menu?.length) {\n itemSecond.menu.forEach((itemThird: MenuItem) => {\n if (itemSecond.slugRelative === itemThird.slug) return\n\n const dataPath = getNewPath(\n itemThird.slug,\n itemThird.slugRoot,\n itemThird.slugRelative\n )\n\n let createSlug =\n dataPath.length >= 3\n ? `${menuSecondSlug}/${dataPath[2]}`\n : itemThird.slugRoot === null\n ? `${itemSecond.slug}/`\n : `${itemSecond.slug}/${itemThird.slugRoot}`\n\n createSlug = createSlug.replace('undefined', '')\n\n const updateLevel: MenuItem = {\n ...itemThird,\n slug: createSlug,\n slugRelative:\n dataPath.length >= 3 ? `${menuSecondSlug}` : itemSecond.slug,\n slugRoot: !itemThird.slugRoot ? dataPath[2] : itemThird.slugRoot,\n }\n\n menuLevelThirdUpdate.push(updateLevel)\n\n itemSecond.menu = menuLevelThirdUpdate\n })\n }\n })\n\n insertSubMenu(\n {\n id: menu.id,\n name: menu.name,\n icon: menu.icon,\n slug: menu.slug,\n slugRoot: menu.slugRoot,\n slugRelative: menu.slugRelative,\n styles: menu.styles,\n display: menu.display,\n enableSty: menu.enableSty,\n order: menu.order,\n mobile: menu.mobile,\n desktop: menu.desktop,\n },\n menu.menu ? menu.menu : []\n )\n setMessage(messageTranslate('editItem'))\n } else if (responseForm.level === 'thirdLevel') {\n let tempThird: MenuItem[] = []\n let tempSecondLvl: MenuItem[] = []\n\n if (menu.menu) {\n tempSecondLvl = menu.menu.filter(\n (i: DataMenu) => i.id === responseForm.secondLevel\n )\n\n if (tempSecondLvl[0].menu) {\n tempThird = tempSecondLvl[0].menu.filter(\n (j: DataMenu) => j.id === responseForm.id\n )\n\n let menuThirdSlug = `${slugRelative}/${slugRoot}`\n\n menuThirdSlug = menuThirdSlug.replace('undefined', '')\n\n tempThird[0].name = name\n tempThird[0].icon = icon\n tempThird[0].slug = menuThirdSlug\n tempThird[0].slugRoot = slugRoot\n tempThird[0].slugRelative = slugRelative\n tempThird[0].styles = styles\n tempThird[0].display = display\n tempThird[0].enableSty = enableSty\n tempThird[0].order = order\n tempThird[0].mobile = mobile\n tempThird[0].desktop = desktop\n }\n }\n\n insertSubMenu(\n {\n id: menu.id,\n name: menu.name,\n icon: menu.icon,\n slug: menu.slug,\n slugRoot: menu.slugRoot,\n slugRelative: menu.slugRelative,\n styles: menu.styles,\n display: menu.display,\n enableSty: menu.enableSty,\n order: menu.order,\n mobile: menu.mobile,\n desktop: menu.desktop,\n },\n menu.menu ? menu.menu : []\n )\n\n setMessage(messageTranslate('editItem'))\n }\n }\n\n return (\n <div>\n {alert ? (\n <Alert\n type=\"success\"\n onClose={() => {\n setAlert(false)\n setMessage('')\n }}\n >\n {message}\n </Alert>\n ) : (\n <div />\n )}\n <Layout\n pageHeader={\n <PageHeader\n title={\n responseForm.type === 'edit'\n ? messageTranslate('titleForm')\n : responseForm.level === 'firstLevel'\n ? messageTranslate('newItemFirst')\n : responseForm.level === 'secondLevel'\n ? messageTranslate('newItemSecond')\n : messageTranslate('newItemThird')\n }\n />\n }\n fullWidth\n >\n <div className=\"mb3 flex\">\n <div className=\"w-50\">\n <ButtonWithIcon\n icon={arrowLeft}\n variation=\"tertiary\"\n onClick={returnHome}\n >\n {messageTranslate('backBtnForm')}\n </ButtonWithIcon>\n </div>\n </div>\n {(responseForm.firstLevel && !responseForm.secondLevel) ||\n (responseForm.type === 'new' &&\n responseForm.level === 'secondLevel') ? (\n <div className=\"mb5\">\n <Card>\n <div className=\" ml4\">\n <div className=\"t-heading-5 mb4\">\n {messageTranslate('infoFormTitle')}\n </div>\n <p>\n <b>{messageTranslate('infoFormSubtitle')}</b>\n </p>\n <p>{levelInfo.firstLevel}</p>\n </div>\n </Card>\n </div>\n ) : (\n <div />\n )}\n {(responseForm.firstLevel && responseForm.secondLevel) ||\n (responseForm.type === 'new' && responseForm.level === 'thirdLevel') ? (\n <div className=\"mb5\">\n <div className=\"flex\">\n <div className=\"w-50 mr4\">\n <Card>\n <div className=\" ml4\">\n <div className=\"t-heading-5 mb4\">\n {messageTranslate('infoFormTitle')}\n </div>\n <p>\n <b>{messageTranslate('infoFormSubtitle')}</b>\n </p>\n <p>{levelInfo.firstLevel}</p>\n </div>\n </Card>\n </div>\n <div className=\"w-50\">\n <Card>\n <div className=\"mr4\">\n <div className=\"t-heading-5 mb4\">\n {messageTranslate('infoForm2Title')}\n </div>\n <p>\n <b>{messageTranslate('infoForm2Subtitle')}</b>\n </p>\n <p>{levelInfo.secondLevel}</p>\n </div>\n </Card>\n </div>\n </div>\n </div>\n ) : (\n <div />\n )}\n <PageBlock variation=\"aside\">\n {loading ? (\n <div style={{ textAlign: 'center' }} className=\"mt8\">\n <Spinner />\n <p>{messageTranslate('loading')}</p>\n </div>\n ) : (\n <div>\n <div className=\"t-heading-5 mb4\">\n {messageTranslate('subTitleForm')}\n </div>\n <p>{messageTranslate('infoForm')}</p>\n <div>\n <div className=\"w-100 ml4 mr4\">\n <div className=\"mb5\">\n <Input\n placeholder=\"\"\n label={messageTranslate('input1Form')}\n value={name}\n id=\"name\"\n errorMessage={messageName}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({ id: e.target.id, value: e.target.value })\n }\n />\n </div>\n <div className=\"mb5\">\n {responseForm.firstLevel ? (\n <>\n <div className=\"flex items-center\">\n <p className=\"mb2\">\n {messageTranslate('input2Form')}\n </p>\n <Tooltip label={messageTranslate('tooltip3')}>\n <div className=\"c-on-base pointer pt6 pl2\">\n <IconInfo />\n </div>\n </Tooltip>\n </div>\n <div className=\"flex items-center\">\n <div className=\"w-50 mr3\">\n <Input\n placeholder=\"\"\n value={slugRelative}\n id=\"slugRelative\"\n errorMessage={messageSlug}\n onChange={(\n e: React.ChangeEvent<HTMLInputElement>\n ) =>\n changeStyle({\n id: e.target.id,\n value: e.target.value,\n })\n }\n />\n </div>\n <div className=\"w-50\">\n <Input\n placeholder=\"\"\n value={slugRoot}\n id=\"slugRoot\"\n errorMessage={messageSlug}\n onChange={(\n e: React.ChangeEvent<HTMLInputElement>\n ) =>\n changeStyle({\n id: e.target.id,\n value: e.target.value,\n })\n }\n />\n </div>\n </div>\n </>\n ) : (\n <>\n {(responseForm.type === 'new' &&\n responseForm.level === 'secondLevel') ||\n (responseForm.type === 'new' &&\n responseForm.level === 'thirdLevel') ? (\n <>\n <p className=\"mb2\">\n {messageTranslate('input2Form')}\n </p>\n <div className=\"flex items-center\">\n <label className=\"w-100 pa3 br2 bg-muted-3 hover-bg-muted-3 active-bg-muted-3 c-on-muted-3 hover-c-on-muted-3 active-c-on-muted-3 dib mr3\">\n {responseForm.level === 'secondLevel'\n ? levelInfo.firstLevelSlugRelative\n : levelInfo.secondLevelSlugRelative}\n </label>\n <Input\n placeholder=\"\"\n value={slug}\n id=\"slug\"\n errorMessage={messageSlug}\n onChange={(\n e: React.ChangeEvent<HTMLInputElement>\n ) =>\n changeStyle({\n id: e.target.id,\n value: e.target.value,\n })\n }\n />\n </div>\n </>\n ) : (\n <Input\n placeholder=\"\"\n value={slug}\n label={messageTranslate('input2Form')}\n id=\"slug\"\n errorMessage={messageSlug}\n onChange={(\n e: React.ChangeEvent<HTMLInputElement>\n ) =>\n changeStyle({\n id: e.target.id,\n value: e.target.value,\n })\n }\n />\n )}\n </>\n )}\n </div>\n </div>\n <div className=\"w-100 ml4 mr4\">\n <div className=\"mb5\">\n <div className=\"flex items-center\">\n <p className=\"mb2\">{messageTranslate('input3Form')}</p>\n <Tooltip label={messageTranslate('tooltip')}>\n <div className=\"c-on-base pointer pt6 pl2\">\n <IconInfo />\n </div>\n </Tooltip>\n </div>\n\n <IconSelector\n onChange={\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e: any) => {\n if (e) {\n changeStyle({ id: 'icon', value: e.value })\n } else {\n changeStyle({ id: 'icon', value: '' })\n }\n }\n }\n />\n </div>\n <div className=\"mb5\">\n <Textarea\n label={\n <div className=\"flex items-center\">\n <p>{messageTranslate('input4Form')}</p>\n <Tooltip label={messageTranslate('tooltip2')}>\n <div className=\"c-on-base pointer pt4 pl2\">\n <IconInfo />\n </div>\n </Tooltip>\n </div>\n }\n value={styles}\n id=\"styles\"\n placeholder=\"i.e. font-size:10px,color:red\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({\n id: e.target.id,\n value: e.target.value,\n })\n }\n resize=\"none\"\n />\n </div>\n </div>\n </div>\n </div>\n )}\n <div>\n <div className=\"t-heading-5 mb4\">\n {messageTranslate('titleSubBlock')}\n </div>\n <div className=\"mt4\">\n <p>{messageTranslate('check1Block')}</p>\n <Toggle\n label={messageTranslate('subCheck1Block')}\n checked={display}\n id=\"display\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({ id: e.target.id, value: e.target.value })\n }\n />\n </div>\n <div className=\"mt7 mb7\">\n <p>{messageTranslate('input4Form')}</p>\n <Toggle\n label={messageTranslate('subCheck2Block')}\n checked={enableSty}\n id=\"enableSty\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({ id: e.target.id, value: e.target.value })\n }\n />\n </div>\n <div className=\"mt7 mb7\">\n <p>Mobile</p>\n <Toggle\n label={mobile ? 'Show' : 'Hide'}\n checked={mobile}\n id=\"mobile\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({ id: e.target.id, value: e.target.value })\n }\n />\n </div>\n <div className=\"mt7 mb7\">\n <p>Desktop</p>\n <Toggle\n label={desktop ? 'Show' : 'Hide'}\n checked={desktop}\n id=\"desktop\"\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n changeStyle({ id: e.target.id, value: e.target.value })\n }\n />\n </div>\n </div>\n </PageBlock>\n </Layout>\n <FloatingActionBar\n save={{\n label: btnSave,\n onClick: () => {\n if (!name) {\n setMessageName(messageTranslate('validateName'))\n } else if (!slug) {\n setMessageSlug(messageTranslate('validateSlug'))\n } else if (responseForm.type === 'edit') {\n editItem()\n } else {\n saveChanges()\n }\n },\n }}\n />\n </div>\n )\n}\n\nexport default injectIntl(FormComponent)\n\n```" } ]
code_mega-menu_69e9427a
[ { "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 mega-menu/store/interfaces.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"mega-menu\": {\n \"component\": \"MegaMenu\",\n \"allowed\": [\"before-menu\", \"after-menu\", \"drawer\"]\n },\n \"before-menu\": {\n \"component\": \"Extension\",\n \"composition\": \"children\",\n \"allowed\": \"*\"\n },\n \"after-menu\": {\n \"component\": \"Extension\",\n \"composition\": \"children\",\n \"allowed\": \"*\"\n },\n \"mega-menu-go-back-btn\": {\n \"component\": \"GoBackButton\"\n },\n \"mega-menu-trigger-btn\": {\n \"component\": \"TriggerButton\",\n \"composition\": \"children\",\n \"render\": \"client\"\n }\n}\n\n```" } ]
code_mega-menu_bafec84f
[ { "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 mega-menu/public/metadata/messages/es-AR.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Mega Menú\",\n \"headline\": \"Cree, personalice y administre nuevos árboles de categorías y utilícelos como su menú principal.\",\n \"overview\": \"VTEX Mega Menu proporciona una aplicación que permite crear, personalizar y gestionar desde el administrador un nuevo árbol de categorías de hasta 3 niveles, el cual puede ser utilizado como menú de navegación principal en su tienda.\",\n \"features\": [\n \"Crear, editar y eliminar elementos del árbol de categorías\",\n \"Ordenar los elementos del árbol de categorías\",\n \"Aplicar estilos css a los elementos dependiendo de sus requerimientos\"\n ],\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n}\n\n```" } ]
code_mega-menu_5b30ab25
[ { "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 mega-menu/public/metadata/messages/pt-BR.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Mega Menu\",\n \"headline\": \"Crie, personalize e gerencie novas árvores de categorias e use-as como seu menu principal.\",\n \"overview\": \"VTEX Mega Menu fornece uma aplicação que lhe permite criar, personalizar e gerir desde o administrador uma nova árvore de categorias de até 3 níveis, que pode ser utilizada como o menu principal de navegação na sua loja.\",\n \"features\": [\n \"Criar, editar e eliminar itens na árvore de categorias\",\n \"Ordenar os itens na árvore de categorias\",\n \"Aplique estilos css aos elementos dependendo das suas necessidades\"\n ],\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n}\n\n```" } ]
code_mega-menu_72a1f9cb
[ { "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 mega-menu/public/metadata/messages/en-US.json from the mega-menu VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Mega Menu\",\n \"headline\": \"Create, customize and manage new category trees and use them as your main menu.\",\n \"overview\": \"Mega Menu VTEX, give you an application to create, personalize and manage from the admin panel a new category tree, it's can have up to 3 levels. The new menu can be used as a navigation main menu in your store.\",\n \"features\": [\n \"Create, edit and delete items of the category tree\",\n \"Order the item of category tree\",\n \"Add CSS styles to the items according to your requirements\"\n ],\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n}\n\n```" } ]