id
stringlengths
12
53
messages
listlengths
3
3
code_order-configuration_feb4b2b7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/typings/vtex.styleguide.d.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.styleguide' {\n import { ComponentType } from 'react'\n\n interface IconEditProps {\n solid?: boolean\n }\n\n export const Alert: ComponentType<InputProps>\n export const Input: ComponentType<InputProps>\n export const Button: ComponentType<InputProps>\n export const ButtonPlain: ComponentType<InputProps>\n export const ButtonWithIcon: ComponentType<InputProps>\n export const Checkbox: ComponentType<InputProps>\n export const Dropdown: ComponentType<InputProps>\n export const IconEdit: ComponentType<IconEditProps>\n export const Modal: ComponentType<InputProps>\n export const RadioGroup: ComponentType<InputProps>\n export const Textarea: ComponentType<InputProps>\n export const ToastConsumer\n export const ToastProvider\n export const withToast\n\n interface InputProps {\n [key: string]: any\n }\n}\n\n```" } ]
code_order-configuration_2c83cc8a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/logic/fromFieldArrayFormat.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const fromFieldArrayFormat = (\n fieldArray: { Key: string; Value: number | string }[]\n): Record<string, string | number> => {\n const recordToReturn: Record<string, string | number> = {}\n for (let item of fieldArray) {\n recordToReturn[item.Key] = item.Value\n }\n return recordToReturn\n}\n\n```" } ]
code_order-configuration_a594c45d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/logic/toFieldArrayFormat.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const toFieldArrayFormat = (\n dictionary: Record<string, string | number>\n): { Key: string; Value: number | string }[] => {\n const toReturn: { Key: string; Value: number | string }[] = []\n for (let key of Object.keys(dictionary)) {\n toReturn.push({\n Key: key,\n Value: dictionary[key],\n })\n }\n return toReturn\n}\n\n```" } ]
code_order-configuration_d0e5b0ad
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/logic/schemaError.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { ApolloError } from 'apollo-client'\nimport { GraphQLError } from 'graphql'\nimport { ErrorTypes } from 'react-hook-form-jsonschema'\n\nconst concatFormPointer = (currPath: string, next: string) => {\n return `${currPath}/${next}`\n}\n\nexport type SchemaErrorRecord = Record<string, ErrorTypes[]>\n\ninterface SchemaError {\n Message: string\n LineNumber: number\n LinePosition: number\n Path: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Value: any | string[]\n SchemaId: string\n SchemaBaseUri: string | null\n ErrorType: string\n ChildErrors: []\n}\n\nconst concatErrors = (\n errors: SchemaError[],\n error: { schema: string; errors: SchemaError }\n) => {\n if (error.errors) {\n return errors.concat(error.errors)\n }\n return errors\n}\n\nconst filterSchemaErrors = (acc: SchemaError[], message: GraphQLError) => {\n if (message?.extensions?.exception?.response?.data?.errors) {\n return acc.concat(\n message.extensions.exception.response.data.errors.reduce(concatErrors, [])\n )\n }\n return acc\n}\n\nconst createOrPushError = (\n errorRecord: SchemaErrorRecord,\n pointer: string,\n error: ErrorTypes\n) => {\n if (errorRecord[pointer]) {\n errorRecord[pointer].push(error)\n } else {\n errorRecord[pointer] = [error]\n }\n}\n\nconst evaluateSchemaRequiredErrors = (\n data: { nodes: SchemaErrorRecord; schemaId: string },\n nodeName: string\n) => {\n const pointer = concatFormPointer(\n concatFormPointer(data.schemaId, 'properties'),\n nodeName\n )\n createOrPushError(data.nodes, pointer, ErrorTypes.required)\n return { nodes: data.nodes, schemaId: data.schemaId }\n}\n\nconst evaluateSchemaErrors = (\n acc: SchemaErrorRecord,\n serverError: SchemaError\n) => {\n // eslint-disable-next-line default-case\n switch (serverError.ErrorType) {\n case 'required':\n if (Array.isArray(serverError.Value)) {\n acc = serverError.Value.reduce(evaluateSchemaRequiredErrors, {\n nodes: acc,\n schemaId: serverError.SchemaId,\n }).nodes\n }\n break\n case 'format':\n case 'type':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.pattern)\n break\n case 'maximum':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.maxValue)\n break\n case 'minimum':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.minValue)\n break\n case 'enum':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.notInEnum)\n break\n case 'minLength':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.minLength)\n break\n case 'maxLength':\n createOrPushError(acc, serverError.SchemaId, ErrorTypes.maxLength)\n break\n }\n return acc\n}\n\nexport const parseSchemaError = (\n error: ApolloError | undefined\n): SchemaErrorRecord => {\n if (!error) {\n return {}\n }\n\n return error.graphQLErrors\n .reduce(filterSchemaErrors, [])\n .reduce(evaluateSchemaErrors, {})\n}\n\n```" } ]
code_order-configuration_79390ae2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/logic/formState.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useReducer } from 'react'\n\nconst initialState: SubmittingState = {\n loading: false,\n userInputError: null,\n serverError: null,\n success: null,\n}\n\nfunction reducer(\n state: SubmittingState,\n action: SubmittingAction\n): SubmittingState {\n switch (action.type) {\n case 'SET_LOADING': {\n return {\n loading: true,\n userInputError: null,\n serverError: null,\n success: null,\n }\n }\n case 'SET_SUCCESS': {\n return {\n loading: false,\n userInputError: false,\n serverError: null,\n success: true,\n }\n }\n case 'SET_USER_INPUT_ERROR': {\n return {\n ...state,\n loading: false,\n userInputError: true,\n success: false,\n }\n }\n case 'SET_SERVER_INTERNAL_ERROR': {\n return {\n ...state,\n loading: false,\n serverError: true,\n success: false,\n }\n }\n default:\n return state\n }\n}\n\nexport interface SubmittingState {\n loading: boolean\n userInputError: boolean | null\n serverError: boolean | null\n success: boolean | null\n}\n\nexport type SubmittingAction =\n | { type: 'SET_LOADING' }\n | { type: 'SET_SUCCESS' }\n | { type: 'SET_USER_INPUT_ERROR' }\n | { type: 'SET_SERVER_INTERNAL_ERROR' }\n\nexport const useSubmitReducer = () => {\n return useReducer(reducer, initialState)\n}\n\nexport const SubmitContext = React.createContext<SubmittingState>(initialState)\n\n```" } ]
code_order-configuration_dac7a551
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/queries/customPriceSchema.graphql from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery customPriceSchemaQuery {\n customPriceSchema @context(provider: \"b2bstore.custom-price-selector\") {\n schema\n }\n}\n\n```" } ]
code_order-configuration_914c0e94
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/queries/orderConfiguration.graphql from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery orderConfiguration {\n orderConfiguration @context(provider: \"b2bstore.order-configuration\") {\n fields {\n Key\n Value\n }\n }\n}\n\n```" } ]
code_order-configuration_0c27ddda
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/utils/string.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const toSentenceCase = (value: string, delimiter: string) =>\n value\n .toLowerCase()\n .split(delimiter)\n .map(word => word.replace(word[0], word[0].toUpperCase()))\n .join(' ')\n\n```" } ]
code_order-configuration_c564d039
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/utils/time.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { TimeSplit } from \"../typings/global\"\n\nconst SECONDS_IN_MINUTE = 60\nconst SECONDS_IN_HOUR = 60 * SECONDS_IN_MINUTE\n\nexport const parseTimeRemaining = (totalSeconds: number) : TimeSplit => {\n const hours = Math.floor(totalSeconds / SECONDS_IN_HOUR)\n const minutes = Math.floor(((totalSeconds % SECONDS_IN_HOUR) / SECONDS_IN_MINUTE))\n const seconds = Math.floor(((totalSeconds % SECONDS_IN_HOUR) % SECONDS_IN_MINUTE))\n return {\n hours: fillWithZero(2, hours),\n minutes: fillWithZero(2, minutes),\n seconds: fillWithZero(2, seconds)\n } \n}\n\nconst fillWithZero = (digits: number, number: number) : string => { \n const filled = '0' + number \n return filled.slice(filled.length - digits)\n}\n```" } ]
code_order-configuration_74c3f893
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/Dropdown.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, useMemo } from 'react'\nimport { find, propEq, path, pathOr } from 'ramda'\nimport { Dropdown as StyleguideDropdown } from 'vtex.styleguide'\nimport {\n Controller,\n UseSelectReturnType,\n useSelect,\n} from 'react-hook-form-jsonschema'\n\nimport { useFormattedError } from '../hooks/useErrorMessage'\nimport { BaseInputProps } from '../typings/InputProps'\nimport { FormField } from '../typings/FormProps'\nimport { useOrderConfiguration } from '../OrderConfigurationContext'\n\nexport const DropdownInput: FC<BaseInputProps> = props => {\n const selectObject = useSelect(props.pointer)\n const { selectedValues, formFields } = useOrderConfiguration()\n return (\n <Dropdown\n selectObject={selectObject}\n label={props.label}\n formFields={formFields}\n defaultValues={selectedValues}\n />\n )\n}\n\nexport const Dropdown: FC<{\n selectObject: UseSelectReturnType\n label?: string\n formFields: FormField[]\n defaultValues: Record<string, string | number>\n}> = props => {\n const { selectObject, formFields, defaultValues } = props\n const error = selectObject.getError()\n\n const subSchema = selectObject.getObject()\n const label = props.label ?? subSchema.title ?? selectObject.name\n\n const items = selectObject.getItems()\n const keyValueOptions = pathOr(\n [],\n ['options'],\n find(propEq('name', selectObject.name), formFields)\n )\n const defaultValue = path([selectObject.name], defaultValues)\n const options = useMemo(() => {\n return items.map(value => {\n return {\n value,\n label: pathOr(\n value,\n ['label'],\n find(propEq('value', value), keyValueOptions)\n ),\n }\n })\n }, [items, keyValueOptions])\n\n return (\n <>\n <Controller\n name={selectObject.pointer}\n control={selectObject.formContext.control}\n rules={selectObject.validator}\n defaultValue={defaultValue}\n as={\n <StyleguideDropdown\n name={label}\n multi={false}\n label={label}\n options={options}\n error={!!error}\n errorMessage={useFormattedError(error)}\n />\n }\n />\n </>\n )\n}\n\n```" } ]
code_order-configuration_b02c408e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/Object.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport {\n UseRawInputReturnType,\n InputReturnTypes,\n InputTypes,\n UseRadioReturnType,\n UseSelectReturnType,\n useObject,\n UseTextAreaReturnType,\n UseCheckboxReturnType,\n} from 'react-hook-form-jsonschema'\nimport { useCssHandles } from 'vtex.css-handles'\nimport { Input } from './Input'\nimport { TextArea } from './TextArea'\nimport { RadioGroup } from './RadioGroup'\nimport { Dropdown } from './Dropdown'\nimport { Checkbox } from './Checkbox'\nimport { FormFieldGroupProps } from '../typings/InputProps'\nimport { FormField } from '../typings/FormProps'\n\nconst CSS_HANDLES = ['formObject'] as const\n\nconst SpecializedObject: FC<{\n baseObject: InputReturnTypes\n formFields: FormField[]\n defaultValues: Record<string, string | number>\n}> = props => {\n switch (props.baseObject.type) {\n case InputTypes.input: {\n const inputObject = props.baseObject as UseRawInputReturnType\n return <Input inputObject={inputObject} />\n }\n case InputTypes.radio: {\n const radioObject = props.baseObject as UseRadioReturnType\n return (\n <RadioGroup\n radioObject={radioObject}\n formFields={props.formFields}\n defaultValues={props.defaultValues}\n />\n )\n }\n case InputTypes.select: {\n const selectObject = props.baseObject as UseSelectReturnType\n return (\n <Dropdown\n selectObject={selectObject}\n formFields={props.formFields}\n defaultValues={props.defaultValues}\n />\n )\n }\n case InputTypes.textArea: {\n const textAreaObject = props.baseObject as UseTextAreaReturnType\n return <TextArea textAreaObject={textAreaObject} />\n }\n case InputTypes.checkbox: {\n const checkboxObject = props.baseObject as UseCheckboxReturnType\n return <Checkbox checkboxObject={checkboxObject} />\n }\n default:\n return <></>\n }\n}\n\nexport const ObjectMapper: FC<FormFieldGroupProps> = props => {\n const { pointer, uiSchema, formFields, defaultValues } = props\n const methods = useObject({\n pointer,\n UISchema: uiSchema,\n })\n const handles = useCssHandles(CSS_HANDLES)\n\n return (\n <>\n {methods.map(obj => (\n <div\n className={`pa5 ${handles.formObject}`}\n key={`${obj.type}${obj.pointer}`}\n >\n <SpecializedObject\n baseObject={obj}\n formFields={formFields}\n defaultValues={defaultValues}\n />\n </div>\n ))}\n </>\n )\n}\n\n```" } ]
code_order-configuration_366ef9e1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/FormHandler.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport {\n FormContext,\n JSONSchemaType,\n OnSubmitParameters,\n} from 'react-hook-form-jsonschema'\nimport { useMutation } from 'react-apollo'\nimport { GraphQLError } from 'graphql'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { FormProps } from '../typings/FormProps'\nimport { useSubmitReducer, SubmitContext } from '../logic/formState'\n\nimport SELECT_ORDER_CONFIG_MUTATION from '../mutations/saveOrderConfig.graphql'\nimport { toFieldArrayFormat } from '../logic/toFieldArrayFormat'\n\nconst CSS_HANDLES = ['orderConfigFormWrapper'] as const\n\nexport const FormHandler: FC<{\n schema: JSONSchemaType\n formProps: FormProps\n onSuccessfulSubmit: () => void\n}> = props => {\n const [saveOrderConfig] = useMutation(SELECT_ORDER_CONFIG_MUTATION)\n const [submitState, dispatchSubmitAction] = useSubmitReducer()\n\n const onSubmit = async ({ data, methods, event }: OnSubmitParameters) => {\n if (event) event.preventDefault()\n\n dispatchSubmitAction({ type: 'SET_LOADING' })\n\n try {\n await saveOrderConfig({\n variables: {\n orderConfig: {\n fields: toFieldArrayFormat(data),\n },\n },\n })\n\n dispatchSubmitAction({ type: 'SET_SUCCESS' })\n const { onSuccessfulSubmit } = props\n onSuccessfulSubmit()\n } catch (e) {\n if (!e.graphQLErrors)\n return dispatchSubmitAction({ type: 'SET_SERVER_INTERNAL_ERROR' })\n\n for (const graphqlError of e.graphQLErrors as GraphQLError[]) {\n dispatchSubmitAction({\n type:\n graphqlError.extensions?.exception?.name === 'UserInputError'\n ? 'SET_USER_INPUT_ERROR'\n : 'SET_SERVER_INTERNAL_ERROR',\n })\n }\n }\n\n await methods.triggerValidation()\n }\n\n const handles = useCssHandles(CSS_HANDLES)\n\n return (\n <FormContext schema={props.schema} onSubmit={onSubmit}>\n <SubmitContext.Provider value={submitState}>\n <div className={handles.orderConfigFormWrapper}>{props.children}</div>\n </SubmitContext.Provider>\n </FormContext>\n )\n}\n\n```" } ]
code_order-configuration_ec6a1157
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/Checkbox.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Checkbox as StyleguideCheckbox } from 'vtex.styleguide'\nimport { UseCheckboxReturnType, useCheckbox } from 'react-hook-form-jsonschema'\n\nimport { BaseInputProps } from '../typings/InputProps'\n\nexport const CheckboxInput: FC<BaseInputProps> = props => {\n const checkboxObject = useCheckbox(props.pointer)\n return <Checkbox checkboxObject={checkboxObject} label={props.label}/>\n}\n\nexport const Checkbox: FC<{\n checkboxObject: UseCheckboxReturnType\n label?: string\n}> = props => {\n const { checkboxObject } = props\n const subSchema = checkboxObject.getObject()\n const label = props.label ?? subSchema.title ?? checkboxObject.name\n\n if (checkboxObject.isSingle) {\n const checked = checkboxObject.formContext.watch(checkboxObject.pointer)\n\n return (\n <>\n <StyleguideCheckbox\n {...checkboxObject.getItemInputProps(0)}\n label={label}\n required={checkboxObject.isRequired}\n checked={Boolean(checked)}\n value=\"true\"\n onChange={() => {\n const { pointer } = checkboxObject\n checkboxObject.formContext.setValue(pointer, !checked)\n }}\n />\n </>\n )\n }\n\n return (\n <>\n {checkboxObject.getItems().map((value, index) => {\n const checked = checkboxObject.formContext.watch(\n `${checkboxObject.pointer}[${index}]`\n )\n return (\n <StyleguideCheckbox\n {...checkboxObject.getItemInputProps(index)}\n key={`${value}${index}`}\n label={label}\n required={checkboxObject.isRequired}\n value={value}\n {...(checked ? { checked: true } : { checked: false })}\n onChange={() => {\n const { pointer } = checkboxObject\n\n checkboxObject.formContext.setValue(pointer, !checked)\n }}\n checked={Boolean(checked)}\n />\n )\n })}\n </>\n )\n}\n\n```" } ]
code_order-configuration_ba61148b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/RadioGroup.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { find, propEq, path, pathOr } from 'ramda'\nimport { RadioGroup as StyleguideRadioGroup } from 'vtex.styleguide'\nimport {\n UseRadioReturnType,\n Controller,\n useRadio,\n} from 'react-hook-form-jsonschema'\n\nimport { useFormattedError } from '../hooks/useErrorMessage'\nimport { BaseInputProps } from '../typings/InputProps'\nimport { FormField } from '../typings/FormProps'\nimport { useOrderConfiguration } from '../OrderConfigurationContext'\n\nexport const RadioGroupInput: FC<BaseInputProps> = props => {\n const { pointer, label } = props\n const radioObject = useRadio(pointer)\n const { selectedValues, formFields } = useOrderConfiguration()\n return (\n <RadioGroup\n radioObject={radioObject}\n label={label}\n formFields={formFields}\n defaultValues={selectedValues}\n />\n )\n}\n\nexport const RadioGroup: FC<{\n radioObject: UseRadioReturnType\n label?: string\n formFields: FormField[]\n defaultValues: Record<string, string | number>\n}> = props => {\n const { radioObject, formFields, defaultValues } = props\n const error = radioObject.getError()\n\n const subSchema = radioObject.getObject()\n const label = props.label ?? subSchema.title ?? radioObject.name\n\n const keyValueOptions = pathOr(\n [],\n ['options'],\n find(propEq('name', radioObject.name), formFields)\n )\n const defaultValue = path([radioObject.name], defaultValues)\n\n return (\n <Controller\n name={radioObject.pointer}\n control={radioObject.formContext.control}\n rules={radioObject.validator}\n defaultValue={defaultValue}\n as={\n <StyleguideRadioGroup\n name={label}\n required={radioObject.isRequired}\n hideBorder\n label={label}\n options={radioObject.getItems().map(value => {\n return {\n value,\n label: pathOr(\n value,\n ['label'],\n find(propEq('value', value), keyValueOptions)\n ),\n }\n })}\n error={!!error}\n errorMessage={useFormattedError(error)}\n />\n }\n />\n )\n}\n\n```" } ]
code_order-configuration_34be2a38
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/TextArea.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Textarea as StyleguideTextarea } from 'vtex.styleguide'\nimport { UseTextAreaReturnType, useTextArea } from 'react-hook-form-jsonschema'\n\nimport { useFormattedError } from '../hooks/useErrorMessage'\n\nexport const TextAreaInput: FC<{ pointer: string }> = props => {\n const textAreaObject = useTextArea(props.pointer)\n return <TextArea textAreaObject={textAreaObject} />\n}\n\nexport const TextArea: FC<{\n textAreaObject: UseTextAreaReturnType\n}> = props => {\n const { textAreaObject } = props\n const error = textAreaObject.getError()\n\n return (\n <StyleguideTextarea\n {...textAreaObject.getTextAreaProps()}\n label={textAreaObject.getObject().title}\n error={!!error}\n errorMessage={useFormattedError(error)}\n />\n )\n}\n\n```" } ]
code_order-configuration_89337f0f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/components/Input.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { path } from 'ramda'\nimport { Input as StyleguideInput } from 'vtex.styleguide'\nimport {\n UseRawInputReturnType,\n useInput,\n usePassword,\n useHidden,\n} from 'react-hook-form-jsonschema'\n\nimport { useFormattedError } from '../hooks/useErrorMessage'\nimport { FormRawInputProps } from '../typings/InputProps'\nimport { useOrderConfiguration } from '../OrderConfigurationContext'\n\nexport const HiddenInput: FC<FormRawInputProps> = props => {\n const { pointer } = props\n const inputObject = useHidden(pointer)\n return <input {...inputObject.getInputProps()} />\n}\n\nexport const PasswordInput: FC<FormRawInputProps> = props => {\n const { pointer, label } = props\n const inputObject = usePassword(pointer)\n return <Input inputObject={inputObject} label={label} />\n}\n\nexport const RawInput: FC<FormRawInputProps> = props => {\n const { pointer, label } = props\n const inputObject = useInput(pointer)\n const { selectedValues } = useOrderConfiguration()\n return (\n <Input\n inputObject={inputObject}\n label={label}\n defaultValues={selectedValues}\n />\n )\n}\n\nexport const Input: FC<{\n inputObject: UseRawInputReturnType\n label?: string\n defaultValues?: Record<string, string | number>\n}> = props => {\n const { inputObject, defaultValues } = props\n const error = inputObject.getError()\n\n const subSchema = inputObject.getObject()\n const label = props.label ?? subSchema.title ?? inputObject.name\n\n const defaultValue = path([inputObject.name], defaultValues)\n\n return (\n <StyleguideInput\n {...inputObject.getInputProps()}\n label={label}\n defaultValue={defaultValue}\n error={!!error}\n errorMessage={useFormattedError(error)}\n />\n )\n}\n\n```" } ]
code_order-configuration_7f221744
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/__tests__/index.test.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render } from '@vtex/test-tools/react'\nimport OrderConfigurationSelector from '../OrderConfigurationSelector'\nimport { ApolloProvider } from '@apollo/react-common'\nimport ApolloClient from 'apollo-client'\nimport { createHttpLink } from 'apollo-link-http'\nimport { InMemoryCache } from 'apollo-cache-inmemory'\nimport fetch from 'unfetch'\n\nconst client = new ApolloClient({\n link: createHttpLink({ uri: 'http://localhost:3000', fetch }),\n cache: new InMemoryCache(),\n})\n\ndescribe('CustomPriceSelector Component', () => {\n it('should render Loading', () => {\n const { getByText } = render(\n <ApolloProvider client={client}>\n <OrderConfigurationSelector formFields={[]} />\n </ApolloProvider>\n )\n\n expect(getByText(/Loading/)).toBeDefined()\n })\n})\n\n```" } ]
code_order-configuration_c79db94f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/hooks/useErrorMessage.tsx from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useIntl, defineMessages } from 'react-intl'\nimport { ErrorMessage, ErrorTypes } from 'react-hook-form-jsonschema'\n\nconst messages = defineMessages({\n required: {\n id: 'store/form.error.required',\n defaultMessage: '',\n },\n maxLength: {\n id: 'store/form.error.maxLength',\n defaultMessage: '',\n },\n minLength: {\n id: 'store/form.error.minLength',\n defaultMessage: '',\n },\n maxValue: {\n id: 'store/form.error.maxValue',\n defaultMessage: '',\n },\n minValue: {\n id: 'store/form.error.minValue',\n defaultMessage: '',\n },\n notFloat: {\n id: 'store/form.error.notFloat',\n defaultMessage: '',\n },\n notInteger: {\n id: 'store/form.error.notInteger',\n defaultMessage: '',\n },\n pattern: {\n id: 'store/form.error.pattern',\n defaultMessage: '',\n },\n notInEnum: {\n id: 'store/form.error.notInEnum',\n defaultMessage: '',\n },\n multipleOf: {\n id: 'store/form.error.multipleOf',\n defaultMessage: '',\n },\n genericError: {\n id: 'store/form.error.undefinedError',\n defaultMessage: '',\n },\n})\n\nexport const useFormattedError = (message: ErrorMessage): string => {\n const intl = useIntl()\n if (!message) {\n return ''\n }\n\n switch (message.message) {\n case ErrorTypes.required:\n return intl.formatMessage(messages.required)\n case ErrorTypes.maxLength:\n return intl.formatMessage(messages.maxLength, {\n value: message.expected?.toString(),\n })\n case ErrorTypes.minLength:\n return intl.formatMessage(messages.minLength, {\n value: message.expected?.toString(),\n })\n case ErrorTypes.maxValue:\n return intl.formatMessage(messages.maxValue, {\n value: message.expected?.toString(),\n })\n case ErrorTypes.minValue:\n return intl.formatMessage(messages.minValue, {\n value: message.expected?.toString(),\n })\n case ErrorTypes.notFloat:\n return intl.formatMessage(messages.notFloat)\n case ErrorTypes.notInteger:\n return intl.formatMessage(messages.notInteger)\n case ErrorTypes.notInEnum:\n return intl.formatMessage(messages.notInEnum)\n case ErrorTypes.pattern:\n return intl.formatMessage(messages.pattern)\n case ErrorTypes.multipleOf:\n return intl.formatMessage(messages.multipleOf, {\n value: message.expected?.toString(),\n })\n default:\n return intl.formatMessage(messages.genericError)\n }\n}\n\n```" } ]
code_order-configuration_8efc76b6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/__tests__/logic/fromFieldArrayFormat.unit.test.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { fromFieldArrayFormat } from '../../logic/fromFieldArrayFormat'\n\ndescribe('fromFieldArrayFormat', () => {\n it('should convert from field array format correctly', () => {\n const fieldFormatArray = [\n {\n Key: 'a',\n Value: '123',\n },\n {\n Key: 'b',\n Value: 'asd',\n },\n ]\n const converted = fromFieldArrayFormat(fieldFormatArray)\n expect(converted).toEqual({\n a: '123',\n b: 'asd',\n })\n })\n})\n\n```" } ]
code_order-configuration_7c5a1f77
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of order-configuration/react/__tests__/logic/toFieldArrayFormat.unit.test.ts from the order-configuration VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { toFieldArrayFormat } from '../../logic/toFieldArrayFormat'\n\ndescribe('toFieldArrayFormat', () => {\n it('should convert to field array format correctly', () => {\n const object = {\n a: '123',\n b: 'asd',\n }\n const converted = toFieldArrayFormat(object)\n expect(converted).toEqual([\n {\n Key: 'a',\n Value: '123',\n },\n {\n Key: 'b',\n Value: 'asd',\n },\n ])\n })\n})\n\n```" } ]
code_google-tag-manager_0467a0a6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/docs/README.md from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n📢 Use this project, [contribute](https://github.com/vtex-apps/google-tag-manager) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Google Tag Manager\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n\nThe VTEX Google Tag Manager (GTM) app is a first party integration to the [Google Tag Manager solution](https://tagmanager.google.com).\n\n![google-tag-manager-app](https://user-images.githubusercontent.com/52087100/84321347-55e11c80-ab49-11ea-9445-24eec6a07785.png)\n\n## Installing the Google Tag Manager app\n\n1. Access the **Apps** section in your account's admin page and look for the Google Tag Manager box;\n2. Then, click on the **Install** button;\n3. You'll see a warning message about needing to enter the necessary configurations. Scroll down and type in your **GTM ID** in the `Google Tag Manager` field.\n4. Click on **Save**.\n\n> Access the [Google Tag Manager page](https://tagmanager.google.com/) and log in to your account in order to find out what is your account **GTM ID**. Use the number provided by the `Container ID` column.\n\n### Step 2 - Creating Google Analytics variables\nTo set up Google Tag Manager in your store, you must create and set up all necessary variables, triggers, and tags. Follow the [Setting up Google Tag Manager documentation](https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-setting-up-google-tag-manager) to create them.\n\n### Step 3 - Persisting campaign data throughout a user session\nTo prevent GTM from creating additional session identifiers every time a user navigates the website, you must add the variables `originalLocation` and `originalReferrer` to your GTM container and configure your store’s Google Analytics tags. Notice that this is important to persist campaign data throughout a user session and avoid providing inconsistent campaign data to Google Analytics (GA). \n\n>⚠️ The `originalLocation` and `originalReferrer` variables are available for VTEX IO Google Tag Manager versions `2.x` and `3.x`. \n\n#### Creating the variables Original Location and Original Referrer\n\n1. Log in to your [GTM account](https://tagmanager.google.com) and click on the GTM container you want to work with.\n\n ![gtm-container](https://user-images.githubusercontent.com/67270558/136798596-cc0add2d-e110-4176-bc8d-665ded39da29.png)\n\n2. On the container page, click on **Variables**.\n3. In the **Built-In Variables** section, check if the `Page URL` and `Page Path` variables are enabled. Otherwise, click on `Configure` and select `Page URL` and `Page Path` to enable them.\n4. Go to the **User-Defined Variables** section and click on `New`. A side popup will open.\n5. Replace the `Untitled Variable` value with `Original Location`.\n6. Click on **Variable Configuration**.\n7. On **Page Variables**, click on **Data Layer Variable**.\n8. In the `Data Layer Variable Name` field, type `originalLocation`.\n9. Enable the `Set Default Value` option and fill in the `Default Value` field with the following value:\n \n ```\n {{Page URL}}\n ```\n \n ![gtm-variable-location](https://user-images.githubusercontent.com/67270558/139482165-21f93c6a-48e5-421a-8e06-c942bda01974.gif)\n\n10. Click `Save`. Once you have saved the `originalLocation` variable, create the `originalReferrer` as described in the steps below.\n11. In the **User-Defined Variables** section, click on `New`. A side popup will open.\n12. Replace the `Untitled Variable` value with `Original Referrer`.\n13. Click on **Variable Configuration**.\n14. On **Page Variables**, click on **Data Layer Variable**.\n15. In the `Data Layer Variable Name` field, type `originalReferrer`.\n16. Enable the `Set Default Value` option and fill in the `Default Value` field with the following value:\n \n ```\n {{Referrer}}\n ```\n \n ![gtm-variable-referrer](https://user-images.githubusercontent.com/67270558/141315033-56e6e498-8c44-490d-a6dd-51f226dd6fc9.gif)\n\n17. Click `Save`.\n\n#### Updating Google Analytics Settings variables and tags\n\nNow, let's configure every Google Analytics Settings variable that fires the `originalLocation` and `originalReferrer` variables.\n\n1. Go to the **Variables** section; \n2. On **User-Defined Variables**, click on the name of one of the Google Analytics Settings variables\n\n ![ga-variables](https://user-images.githubusercontent.com/67270558/136799579-f1bb7e68-ec4c-4deb-beb2-0dfedb88de10.png)\n\n3. Click on the **Variable Configuration** box;\n4. Go to **More Settings > Fields to Set**;\n5. Click on `Add Field`;\n6. Set the `Field Name` field as `location` and `Value` as `{{Original Location}}`;\n7. Then, click on `Add Field` again;\n6. Set the `Field Name` field as `referrer` and `Value` as `{{Original Referrer}}`;\n8. Click on `Save`.\n\nIf you have any Google Analytics tags using the Google Analytics Settings variables you have changed, apply the same changes above directly on the tags that need it.\n\n#### Publishing your changes\n\nOnce you have set up the Google Analytics variables and tags, follow Google's official guide on [how to submit and publish your store’s container](https://support.google.com/tagmanager/answer/6107163).\n\n## Restrictions\n\nIn order to avoid performance problems and unforeseen behavior, our VTEX IO Google Tag Manager solution uses the native GTM **blacklist** feature. You can read more about this feature on the [Google Developer Guide](https://developers.google.com/tag-manager/web/restrict).\n\nWe, by default, blacklist the `html` ID, which automatically blocklists all the tags, variables, and triggers of the type `customScripts`. The main consequence of this blocklist is that **Custom HTML tags will not be triggered**.\n\n>⚠️ The HTML blacklist is the VTEX Google Tag Manager app's default. If you want to disable this restriction, go to `https://{accountName}.myvtex.com/admin/apps/vtex.google-tag-manager@2.x/setup` and check the toggle below.\n\n<img src=\"https://user-images.githubusercontent.com/11340665/103930428-7c762e80-50fd-11eb-9cab-bc9e542b4dbf.png\"/>\n\nMost of the widely used Custom HTML tags are integrations with third-party services, like Customer Chat, Analytics, Remarketing, and Pixel tags. If your store needs a Custom HTML for one of those cases, the integration can either be done by transforming the tags into a [VTEX IO Pixel App](https://developers.vtex.com/docs/guides/pixel-apps) or by removing this restriction.\n\nCheck below the full list of tags and variables that are blocked, by default, in the VTEX IO Google Tag Manager solution.\n\n### Blocked tags\n\n- Custom HTML Tag - `html`\n- Eulerian Analytics Tag - `ela`\n- SaleCycle JavaScript Tag - `scjs`\n- Upsellit Global Footer Tag - `uslt`\n- Upsellit Confirmation Tag - `uspt`\n\n### Blocked variables\n\n- Custom JavaScript Variable - `jsm`\n\nCheck out a list with all the GTM available tags on the [Google Developer Guide](https://developers.google.com/tag-manager/devguide).\n\n<!-- DOCS-IGNORE:start -->\n\n## Contributors ✨\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n\n<!-- DOCS-IGNORE:end -->\n\n```" } ]
code_google-tag-manager_acb519c6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/index.tsx from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { canUseDOM } from 'vtex.render-runtime'\n\nimport { sendEnhancedEcommerceEvents } from './modules/enhancedEcommerceEvents'\nimport { sendExtraEvents } from './modules/extraEvents'\nimport { sendLegacyEvents } from './modules/legacyEvents'\nimport { PixelMessage } from './typings/events'\n\n// no-op for extension point\nexport default function() {\n return null\n}\n\nexport function handleEvents(e: PixelMessage) {\n sendEnhancedEcommerceEvents(e)\n sendExtraEvents(e)\n sendLegacyEvents(e)\n}\n\nif (canUseDOM) {\n window.addEventListener('message', handleEvents)\n}\n\n```" } ]
code_google-tag-manager_966f5cb1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/package.json from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"version\": \"3.5.4\",\n \"scripts\": {\n \"test\": \"vtex-test-tools test\"\n },\n \"author\": \"VTEX\",\n \"license\": \"ISC\",\n \"devDependencies\": {\n \"@types/node\": \"^12.0.0\",\n \"@vtex/test-tools\": \"^3.3.2\"\n }\n}\n\n```" } ]
code_google-tag-manager_ae41a54c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/public/metadata/messages/es-AR.json from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Google Tag Manager\",\n \"headline\": \"Integre su tienda con la plataforma de tracking de conversiones y navegación de Google.\",\n \"overview\": \"Google Tag Manager es un servicio para rastrear las actividades de sus visitantes en ecommerce y puede ser usado para evaluar la efectividad de sus anuncios, generar audiencias de remarketing y mapear información sobre cómo su tienda está sendo utilizada. \\\\n\\\\n Esta aplicación implementa la tag de Google Tag Manager en el código de cada página de su sitio, lo que le permite realizar un tracking de los eventos de conversión y navegación dentro de las mejores prácticas de análisis de Google. Usted deberá ingresar su ID de cuenta GTM en la página de configuración de la aplicación.\",\n \"features\": [\n \"Configura Google Tag Manager con el admin de VTEX\",\n \"Envia todo los eventos de Google Enhanced Ecommerce\"\n ],\n \"additionalInformation\": \"La gestión de tags, eventos y triggers se realiza directamente utilizando la plataforma de Google Tag Manager (http://tagmanager.google.com/) después de instalar y configurar la aplicación. Los eventos disponibles por defecto con la implementación de la aplicación se pueden consultar en la documentación.\",\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n }\n\n```" } ]
code_google-tag-manager_a62d714d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/public/metadata/messages/pt-BR.json from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Google Tag Manager\",\n \"headline\": \"Integre-se à plataforma de tracking de navegação e conversão do Google.\",\n \"overview\": \"O Google Tag Manager é um serviço de rastreamento das atividades dos visitantes do seu ecommerce que pode ser utilizado para avaliar a eficiência de seus anúncios, gerar públicos de remarketing e mapear insights sobre o uso da sua loja.\\\\n\\\\n Este app implementa a tag do Google Tag Manager no código de todas as páginas do seu site, permitindo que você rastreie eventos de navegação e conversão dentro dos padrões e boas práticas de analytics do Google. Você precisará inserir o ID da sua conta do GTM na página de configuração do aplicativo.\",\n \"features\": [\n \"Configure o Google Tag Manager pelo admin da VTEX\",\n \"Envia todos os eventos do Google Enhanced Ecommerce\"\n ],\n \"additionalInformation\": \"A gestão das tags, eventos e triggers é feita diretamente pela platafoma do Google Tag Manager (http://tagmanager.google.com/) após a instalação e configuração do app. Os eventos disponíveis por padrão com a implementação do app podem ser consultados na documentação.\",\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n }\n\n```" } ]
code_google-tag-manager_573f331c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/public/metadata/messages/en-US.json from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"Google Tag Manager\",\n \"headline\": \"Integrate your store with Google's navigation and conversion tracking platform.\",\n \"overview\": \"Google Tag Manager is a service for tracking the activities of your ecommerce visitors and can be used to assess the effectiveness of your ads, generate remarketing audiences and map insights into how your store is being used.\\\\n\\\\n This app implements the Google Tag Manager tag in the code of every page on your site, allowing you to track navigation and conversion events within Google’s best practices and analytics standards. You will need to enter your GTM account ID on the application's setup page.\",\n \"features\": [\n \"Configure Google Tag Manager using the VTEX admin panel\",\n \"Send all Google Enhanced Commerce events\"\n ],\n \"additionalInformation\": \"The management of tags, events and triggers is done directly through the Google Tag Manager platform (http://tagmanager.google.com/) after installing and configuring the app. The events available by default with the app's implementation can be consulted in our documentation.\",\n \"websiteURL\": \"https://vtex.com/\",\n \"support\": {\n \"url\": \"https://support.vtex.com/hc/requests\"\n }\n }\n\n```" } ]
code_google-tag-manager_f527ea46
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/typings/events.d.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport interface PixelMessage extends MessageEvent {\n data:\n | ProductViewData\n | ProductClickData\n | OrderPlacedData\n | OrderPlacedTrackedData\n | PageViewData\n | LegacyProductViewData\n | ProductImpressionData\n | AddToCartData\n | RemoveFromCartData\n | CartChangedData\n | HomePageInfo\n | ProductPageInfoData\n | SearchPageInfoData\n | UserData\n | CartIdData\n | CartLoadedData\n | PromoViewData\n | PromotionClickData\n | AddPaymentInfoData\n | AddShippingInfoData\n | SignUpData\n | LoginData\n | ShareData\n | BeginCheckoutData\n | ViewCartData\n | RefundData\n | AddToWishlistData\n | SearchData\n}\n\nexport interface EventData {\n event: string\n eventName: string\n currency: string\n}\n\nexport interface PageInfoData extends EventData {\n event: 'pageInfo'\n eventName: 'vtex:pageInfo'\n accountName: string\n pageTitle: string\n pageUrl: string\n}\n\nexport interface LegacyProductViewData extends EventData {\n event: 'pageInfo'\n eventName: 'vtex:pageInfo'\n eventType: 'productView'\n}\n\nexport interface UserData extends PageInfoData {\n eventType: 'userData'\n eventName: 'vtex:userData'\n firstName?: string\n lastName?: string\n document?: string\n id?: string\n email?: string\n phone?: string\n isAuthenticated: boolean\n}\n\nexport interface CartIdData extends PageInfoData {\n eventType: 'cartId'\n eventName: 'vtex:cartId'\n cartId: string\n}\n\nexport interface HomePageInfo extends PageInfoData {\n eventType: 'homeView'\n}\n\nexport interface ProductPageInfoData extends PageInfoData {\n eventType: 'productPageInfo'\n}\n\nexport interface SearchPageInfoData extends PageInfoData {\n eventType:\n | 'internalSiteSearchView'\n | 'categoryView'\n | 'departmentView'\n | 'emptySearchView'\n category?: CategoryMetaData\n department?: DepartmentMetaData\n search?: SearchMetaData\n}\n\ninterface CategoryMetaData {\n id: string\n name: string\n}\n\ninterface DepartmentMetaData {\n id: string\n name: string\n}\n\ninterface SearchMetaData {\n term: string\n category: CategoryMetaData\n results: number\n}\n\nexport interface PageViewData extends EventData {\n event: 'pageView'\n eventName: 'vtex:pageView'\n pageTitle: string\n pageUrl: string\n referrer: string\n}\n\nexport interface AddToCartData extends EventData {\n event: 'addToCart'\n eventName: 'vtex:addToCart'\n items: CartItem[]\n}\n\nexport interface RemoveFromCartData extends EventData {\n event: 'removeFromCart'\n eventName: 'vtex:removeFromCart'\n items: CartItem[]\n}\n\nexport interface CartChangedData extends EventData {\n event: 'cartChanged'\n eventName: 'vtex:cartChanged'\n items: CartItem[]\n}\n\nexport interface OrderPlacedData extends Order, EventData {\n event: 'orderPlaced'\n eventName: 'vtex:orderPlaced'\n}\n\nexport interface OrderPlacedTrackedData extends Order, EventData {\n event: 'orderPlacedTracked'\n eventName: 'vtex:orderPlacedTracked'\n}\n\nexport interface ProductViewData extends EventData {\n event: 'productView'\n eventName: 'vtex:productView'\n product: Product\n list?: string\n}\n\nexport interface ProductClickData extends EventData {\n event: 'productClick'\n eventName: 'vtex:productClick'\n product: ProductSummary\n position: number\n list?: string\n}\n\nexport interface ProductImpressionData extends EventData {\n event: 'productImpression'\n eventName: 'vtex:productImpression'\n impressions: Impression[]\n product?: ProductSummary // deprecated, use impressions list!\n position?: number // deprecated, use impressions list!\n list: string\n}\n\nexport interface CartLoadedData extends EventData {\n event: 'cartLoaded'\n eventName: 'vtex:cartLoaded'\n orderForm: OrderForm\n}\n\nexport interface PromoViewData extends EventData {\n event: 'promoView'\n eventType: 'vtex:promoView'\n eventName: 'vtex:promoView'\n promotions: Promotion[]\n}\n\nexport interface PromotionClickData extends EventData {\n event: 'promotionClick'\n eventType: 'vtex:promotionClick'\n eventName: 'vtex:promotionClick'\n promotions: Promotion[]\n}\n\nexport interface AddPaymentInfoData extends EventData {\n event: 'addPaymentInfo'\n eventType: 'vtex:addPaymentInfo'\n eventName: 'vtex:addPaymentInfo'\n payment: PaymentType\n items: CartItem[]\n}\n\nexport interface BeginCheckoutData extends EventData {\n event: 'beginCheckout'\n eventType: 'vtex:beginCheckout'\n eventName: 'vtex:beginCheckout'\n items: CartItem[]\n}\n\nexport interface AddShippingInfoData extends EventData {\n event: 'addShippingInfo'\n eventType: 'vtex:addShippingInfo'\n eventName: 'vtex:addShippingInfo'\n items: CartItem[]\n shippingTier: string\n value: number\n}\n\nexport interface ViewCartData extends EventData {\n event: 'viewCart'\n eventType: 'vtex:viewCart'\n eventName: 'vtex:viewCart'\n items: CartItem[]\n}\n\nexport interface AddToWishlistData extends EventData {\n event: 'addToWishlist'\n eventType: 'vtex:addToWishlist'\n eventName: 'vtex:addToWishlist'\n items: {\n selectedItem: SelectedItem\n product: ProductSummary\n }\n list: string\n}\n\nexport interface SelectedItem {\n attachments?: any[]\n complementName?: string\n ean?: string\n estimatedDateArrival?: any\n images?: Image[]\n itemId?: string\n kitItems?: any[]\n measurementUnit?: string\n name?: string\n nameComplete?: string\n referenceId?: any\n sellers: Seller[]\n unitMultiplier?: number\n variations?: any[]\n videos?: any[]\n}\n\nexport interface Seller {\n addToCartLink: string\n commercialOffer: any\n sellerDefault: boolean\n sellerId: string\n sellerName: string\n}\n\nexport interface Image {\n cacheId: string\n imageId: string\n imageLabel: string\n imageTag: string\n imageText: string\n imageUrl: string\n}\n\nexport interface RefundData extends EventData {\n event: 'refund'\n eventType: 'vtex:refund'\n eventName: 'vtex:refund'\n order: {\n transactionId: string\n tax: number\n shipping: number\n value: number\n items: ProductOrder[]\n }\n}\n\nexport interface SearchData extends EventData {\n event: 'search'\n eventType: 'vtex:search'\n eventName: 'vtex:search'\n term: string\n}\n\nexport interface ShareData extends EventData {\n event: 'share'\n eventType: 'vtex:share'\n eventName: 'vtex:share'\n method: string\n contentType: string\n itemId: string\n}\n\nexport interface LoginData extends EventData {\n event: 'login'\n eventType: 'vtex:login'\n eventName: 'vtex:login'\n method: string\n}\n\nexport interface SignUpData extends LoginData, EventData {\n event: 'signUp'\n eventType: 'vtex:signUp'\n eventName: 'vtex:signUp'\n}\n\ntype PromotionProduct = Pick<ProductSummary, 'productId' | 'productName'>\n\ninterface Promotion {\n id?: string\n name?: string\n creative?: string\n position?: string\n products?: PromotionProduct[]\n}\n\ninterface CartItemAdditionalInfo {\n brandName: string\n brandId: string\n}\n\ninterface CartItem {\n id: string\n productCategories: Record<string, string> | null\n productCategoryIds?: string\n additionalInfo: CartItemAdditionalInfo | null\n brand: string\n ean: string\n category: string\n detailUrl: string\n imageUrl: string\n name: string\n skuName: string\n price: number\n priceIsInt?: boolean\n sellingPrice: number\n productId: string\n productRefId: string\n quantity: number\n skuId: string\n referenceId: string // SKU reference id\n variant: string\n}\n\ninterface Totalizer {\n id: string\n name: string\n value: number\n}\n\ninterface ClientProfileData {\n email: string\n firstName: string\n lastName: string\n}\n\ninterface Address {\n addressId: string\n postalCode: string\n street: string\n number: string\n neighborhood: string\n complement: string\n city: string\n state: string\n}\n\ninterface DeliveryOption {\n id: string\n price: number\n estimate: string\n isSelected: boolean\n}\n\ninterface Shipping {\n selectedAddress: Address\n deliveryOptions?: DeliveryOption[]\n}\n\ninterface MarketingData {\n coupon: string\n utmCampaign: string\n utmSource: string\n utmMedium: string\n utmiCampaign: string\n utmiPage: string\n utmiPart: string\n}\n\nexport interface OrderForm {\n id: string\n totalizers: Totalizer[]\n sellers: Seller[]\n salesChannel: string\n items: CartItem[]\n canEditData: boolean\n loggedIn: boolean\n clientProfileData?: ClientProfileData\n shipping?: Shipping\n value: number\n marketingData?: MarketingData\n}\n\nexport interface Order {\n accountName: string\n corporateName: string\n coupon: string\n currency: string\n openTextField: string\n orderGroup: string\n salesChannel: string\n visitorAddressCity: string\n visitorAddressComplement: string\n visitorAddressCountry: string\n visitorAddressNeighborhood: string\n visitorAddressNumber: string\n visitorAddressPostalCode: string\n visitorAddressState: string\n visitorAddressStreet: string\n visitorContactInfo: string[]\n visitorContactPhone: string\n visitorType: string\n transactionId: string\n transactionDate: string\n transactionAffiliation: string\n transactionTotal: number\n transactionShipping: number\n transactionSubtotal: number\n transactionDiscounts: number\n transactionTax: number\n transactionCurrency: string\n transactionPaymentType: PaymentType[]\n transactionShippingMethod: ShippingMethod[]\n transactionLatestShippingEstimate: Date\n transactionProducts: ProductOrder[]\n transactionPayment: {\n id: string\n }\n}\n\nexport interface Impression {\n product: ProductSummary\n position: number\n}\n\nexport interface PaymentType {\n group: string\n paymentSystemName: string\n installments: number\n value: number\n}\n\nexport interface ShippingMethod {\n itemId: string\n selectedSla: string\n}\n\nexport interface ProductOrder {\n id: string\n name: string\n sku: string\n skuRefId: string\n skuName: string\n productRefId: string\n ean: string\n slug: string\n brand: string\n brandId: string\n seller: string\n sellerId: string\n category: string\n categoryId: string\n categoryTree: string[]\n categoryIdTree: string[]\n priceTags: PriceTag[]\n originalPrice: number\n price: number\n sellingPrice: number\n tax: number\n quantity: number\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components: any[]\n measurementUnit: string\n unitMultiplier: number\n}\n\nexport interface PriceTag {\n identifier: string\n isPercentual: boolean\n value: number\n}\n\nexport interface Product {\n brand: string\n brandId: string\n categories: string[]\n categoryId: string\n categoryTree: Array<{ id: string; name: string }>\n detailUrl: string\n items: Item[]\n linkText: string\n productId: string\n productName: string\n productReference: string\n selectedSku: Item\n}\n\nexport interface Item {\n itemId: string\n name: string\n ean: string\n referenceId: { Key: string; Value: string }\n imageUrl: string\n sellers: Seller[]\n}\n\nexport interface ProductSummary {\n brand: string\n brandId: string\n categories: string[]\n items: ItemSummary[]\n linkText: string\n productId: string\n productName: string\n productReference: string\n selectedItem: SelectedItem\n sku: ItemSummary\n}\n\ninterface ItemSummary {\n itemId: string\n ean: string\n name: string\n referenceId: { Key: string; Value: string }\n seller: Seller\n sellers: Seller[]\n}\n\nexport interface Seller {\n commertialOffer: CommertialOffer\n sellerId: string\n sellerDefault: boolean\n}\n\nexport interface CommertialOffer {\n Price: number\n PriceWithoutDiscount: number\n ListPrice: number\n AvailableQuantity: number\n}\n\nexport type ProductViewReferenceId = Array<Item['referenceId']>\n\n```" } ]
code_google-tag-manager_6f05a538
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/typings/vtex.render-runtime.d.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/* Typings for `render-runtime` */\ndeclare module 'vtex.render-runtime' {\n import { Component, ComponentType, ReactElement, ReactType } from 'react'\n\n export interface NavigationOptions {\n page: string\n params?: any\n }\n\n export interface RenderContextProps {\n runtime: {\n navigate: (options: NavigationOptions) => void\n }\n }\n\n interface ExtensionPointProps {\n id: string\n [key: string]: any\n }\n\n export const ExtensionPoint: ComponentType<ExtensionPointProps>\n\n interface ChildBlockProps {\n id: string\n }\n\n export const ChildBlock: ComponentType<ChildBlockProps>\n export const useChildBlock = function({\n id: string,\n }): Record<string, unknown> {}\n\n export const Helmet: ReactElement\n export const Link: ReactType\n export const NoSSR: ReactElement\n export const RenderContextConsumer: ReactElement\n export const canUseDOM: boolean\n export const withRuntimeContext: <TOriginalProps extends unknown>(\n Component: ComponentType<TOriginalProps & RenderContextProps>\n ) => ComponentType<TOriginalProps>\n}\n\n```" } ]
code_google-tag-manager_1c51f61c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/typings/global.d.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ninterface Window extends Window {\n dataLayer: any[]\n\n __gtm__: {\n sendGA4Events: string\n }\n}\n\n```" } ]
code_google-tag-manager_f7810e15
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/typings/gtm.d.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport interface AnalyticsEcommerceProduct {\n id: string\n name: string\n category: string\n brand: string\n variant: string\n price: number\n quantity: number\n dimension1: string\n dimension2: string\n dimension3: string\n}\n\n```" } ]
code_google-tag-manager_9606068a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/__tests__/index.test.tsx from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport productImpressionData from '../__mocks__/productImpression'\nimport productDetails from '../__mocks__/productDetail'\nimport productClick from '../__mocks__/productClick'\nimport { buildViewPromotionData } from '../__mocks__/viewPromotion'\nimport { handleEvents } from '../index'\nimport updateEcommerce from '../modules/updateEcommerce'\nimport {\n Promotion,\n PromotionClickData,\n AddToCartData,\n RemoveFromCartData,\n CartItem,\n} from '../typings/events'\nimport { creditCardPaymentInfoMock } from '../__mocks__/addPaymentInfo'\nimport shouldSendGA4Events from '../modules/utils/shouldSendGA4Events'\nimport { beginCheckoutMock } from '../__mocks__/beginCheckout'\nimport { shippingInfoMock } from '../__mocks__/addShippingInfo'\nimport {\n viewCartWithItemsMock,\n viewCartWithNoItemsMock,\n} from '../__mocks__/viewCart'\nimport { transaction, refundTransaction } from '../__mocks__/transaction'\nimport productWishlist from '../__mocks__/addToWishlist'\n\njest.mock('../modules/utils/shouldSendGA4Events')\n\njest.mock('../modules/updateEcommerce', () => jest.fn())\n\nconst mockedUpdate = updateEcommerce as jest.Mock\n\nbeforeEach(() => {\n mockedUpdate.mockReset()\n})\n\ntest('productImpression', () => {\n const message = new MessageEvent('message', {\n data: productImpressionData,\n })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('productImpression', {\n event: 'productImpression',\n ecommerce: {\n currencyCode: 'USD',\n impressions: [\n {\n brand: 'Mizuno',\n category: 'Apparel & Accessories/Shoes',\n id: '16',\n variant: '35',\n list: 'Shelf',\n name: 'Classic Shoes Top',\n position: 1,\n price: '38.9',\n dimension1: '12531',\n dimension2: '232344',\n dimension3: 'Classic Pink',\n },\n {\n brand: 'Nintendo',\n category: 'Apparel & Accessories/Watches',\n id: '15',\n variant: '32',\n list: 'Shelf',\n name: 'Gorgeous Top Watch',\n position: 2,\n price: '2200',\n dimension1: '',\n dimension2: '',\n dimension3: 'Grey',\n },\n ],\n },\n })\n})\n\ntest('productDetail', () => {\n const message = new MessageEvent('message', {\n data: productDetails,\n })\n\n handleEvents(message)\n\n expect(updateEcommerce).toHaveBeenCalledWith('productDetail', {\n event: 'productDetail',\n ecommerce: {\n detail: {\n actionField: {\n list: 'List of products',\n },\n products: [\n {\n brand: 'Mizuno',\n category: 'Apparel & Accessories/Shoes',\n id: '16',\n variant: '35',\n name: 'Classic Shoes Top',\n price: 1540.99,\n dimension1: '123',\n dimension2: '12531',\n dimension3: 'Classic Pink',\n dimension4: 'available',\n },\n ],\n },\n },\n })\n})\n\ntest('productClick', () => {\n const message = new MessageEvent('message', {\n data: productClick,\n })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('productClick', {\n event: 'productClick',\n ecommerce: {\n click: {\n actionField: {\n list: 'List of products',\n },\n products: [\n {\n brand: 'Mizuno',\n category: 'Apparel & Accessories/Shoes',\n id: '16',\n variant: '35',\n name: 'Classic Shoes Top',\n position: 3,\n price: 38.9,\n dimension1: '12531',\n dimension2: '',\n dimension3: 'Classic Pink',\n },\n ],\n },\n },\n })\n})\n\ndescribe('GA4 events', () => {\n const sendGA4Events = true\n const mockedShouldSendGA4Events = shouldSendGA4Events as jest.Mock\n\n beforeEach(() => {\n mockedShouldSendGA4Events.mockReset()\n mockedShouldSendGA4Events.mockReturnValue(sendGA4Events)\n })\n\n describe('view_item_list', () => {\n it('sends an event that signifies that some content was shown to the user', () => {\n const message = new MessageEvent('message', {\n data: productImpressionData,\n })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('view_item_list', {\n ecommerce: {\n item_list_name: 'Shelf',\n items: [\n {\n discount: 0,\n index: 1,\n item_brand: 'Mizuno',\n item_category: 'Apparel & Accessories',\n item_category2: 'Shoes',\n item_id: '16',\n item_name: 'Classic Shoes Top',\n item_variant: '35',\n price: 38.9,\n quantity: 1,\n dimension1: '12531',\n dimension2: '232344',\n dimension3: 'Classic Pink',\n dimension4: 'available',\n },\n {\n discount: 0,\n index: 2,\n item_brand: 'Nintendo',\n item_category: 'Apparel & Accessories',\n item_category2: 'Watches',\n item_id: '15',\n item_name: 'Gorgeous Top Watch',\n item_variant: '32',\n price: 2200,\n quantity: 0,\n dimension1: '',\n dimension2: '',\n dimension3: 'Grey',\n dimension4: 'unavailable',\n },\n ],\n },\n })\n })\n })\n\n describe('view_item', () => {\n it('sends an event that signifies that some content was shown to the user', () => {\n const message = new MessageEvent('message', { data: productDetails })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('view_item', {\n ecommerce: {\n currency: 'USD',\n value: 1540.99,\n items: [\n {\n item_id: '16',\n item_name: 'Classic Shoes Top',\n item_list_name: 'List of products',\n item_brand: 'Mizuno',\n item_variant: '35',\n price: 1540.99,\n quantity: 1,\n discount: 0,\n item_category: 'Apparel & Accessories',\n item_category2: 'Shoes',\n dimension1: '123',\n dimension2: '12531',\n dimension3: 'Classic Pink',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('select_item', () => {\n it('sends an event that signifies an item was selected from a list', () => {\n const message = new MessageEvent('message', { data: productClick })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('select_item', {\n ecommerce: {\n item_list_name: 'List of products',\n items: [\n {\n item_id: '16',\n item_name: 'Classic Shoes Top',\n item_list_name: 'List of products',\n item_brand: 'Mizuno',\n item_variant: '35',\n index: 3,\n price: 38.9,\n quantity: 1,\n discount: 0,\n item_category: 'Apparel & Accessories',\n item_category2: 'Shoes',\n dimension1: '12531',\n dimension2: '',\n dimension3: 'Classic Pink',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('select_promotion', () => {\n it('sends an event that signifies a promotion was selected from a list', () => {\n const promotion: Promotion = {\n id: 'P_12345',\n name: 'Summer Sale',\n creative: 'Summer Banner',\n position: 'featured_app_1',\n }\n\n const data: PromotionClickData = {\n currency: 'USD',\n event: 'promotionClick',\n eventName: 'vtex:promotionClick',\n eventType: 'vtex:promotionClick',\n promotions: [promotion],\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('select_promotion', {\n ecommerce: {\n creative_name: 'Summer Banner',\n creative_slot: 'featured_app_1',\n promotion_id: 'P_12345',\n promotion_name: 'Summer Sale',\n },\n })\n })\n })\n\n describe('add_to_cart', () => {\n it('sends an event that signifies an item being added to the cart', () => {\n type CartItemMockType = Pick<\n CartItem,\n | 'name'\n | 'brand'\n | 'price'\n | 'skuId'\n | 'skuName'\n | 'quantity'\n | 'category'\n | 'productId'\n | 'productRefId'\n | 'referenceId'\n | 'variant'\n >\n\n const cartItem1: CartItemMockType = {\n productId: '200000202',\n skuId: '2000304',\n brand: 'Sony',\n name: 'Top Wood',\n skuName: 'top_wood_200',\n price: 197.99,\n category: 'Home & Decor',\n quantity: 1,\n productRefId: '123',\n referenceId: '456',\n variant: 'Red',\n }\n\n const cartItem2: CartItemMockType = {\n productId: '200000203',\n skuId: '2000305',\n brand: 'Sony',\n name: 'Top Wood 2',\n skuName: 'top_wood_300',\n price: 150.9,\n category: 'Home & Decor/Tables',\n quantity: 2,\n productRefId: '789',\n referenceId: '101',\n variant: 'Blue',\n }\n\n const data: AddToCartData = {\n currency: 'USD',\n event: 'addToCart',\n eventName: 'vtex:addToCart',\n items: [cartItem1 as CartItem, cartItem2 as CartItem],\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('add_to_cart', {\n ecommerce: {\n currency: 'USD',\n value: 499.79,\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 1,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n {\n item_id: '200000203',\n item_brand: 'Sony',\n item_name: 'Top Wood 2',\n item_variant: '2000305',\n item_category: 'Home & Decor',\n item_category2: 'Tables',\n quantity: 2,\n price: 150.9,\n dimension1: '789',\n dimension2: '101',\n dimension3: 'Blue',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('remove_from_cart', () => {\n it('sends an event that signifies an item being removed from cart', () => {\n type CartItemMockType = Pick<\n CartItem,\n | 'name'\n | 'brand'\n | 'price'\n | 'skuId'\n | 'skuName'\n | 'quantity'\n | 'category'\n | 'productId'\n | 'productRefId'\n | 'referenceId'\n | 'variant'\n >\n\n const cartItem: CartItemMockType = {\n productId: '200000202',\n skuId: '2000304',\n brand: 'Sony',\n name: 'Top Wood',\n skuName: 'top_wood_200',\n price: 197.99,\n category: 'Home & Decor',\n quantity: 3,\n productRefId: '123',\n referenceId: '456',\n variant: 'Red',\n }\n\n const data: RemoveFromCartData = {\n currency: 'USD',\n event: 'removeFromCart',\n eventName: 'vtex:removeFromCart',\n items: [cartItem as CartItem],\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('remove_from_cart', {\n ecommerce: {\n currency: 'USD',\n value: 593.97,\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 3,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('purchase', () => {\n it('sends an event that signifies a successful checkout on orderPlaced page', () => {\n const data = transaction\n\n data.event = 'orderPlaced'\n data.eventName = 'vtex:orderPlaced'\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('purchase', {\n ecommerce: {\n coupon: null,\n currency: 'USD',\n items: [\n {\n item_brand: 'New Offers!!',\n item_category: 'Apparel & Accessories',\n item_id: '9',\n item_name: 'Top Everyday Necessaire',\n item_variant: '20',\n price: 1600.99,\n quantity: 2,\n dimension1: '',\n dimension2: '9812983',\n dimension3: '100 RMS',\n dimension4: 'available',\n },\n ],\n shipping: 1942.61,\n tax: 0,\n transaction_id: '1310750551387',\n value: 5144.59,\n },\n })\n })\n })\n\n describe('view_promotion', () => {\n it('sends an event that signifies a promotion was viewed from a list', () => {\n const data = buildViewPromotionData({\n id: 'P_12345',\n name: 'Summer Sale',\n creative: 'Summer Banner',\n position: 'featured_app_1',\n products: [\n {\n productId: 'SKU_20',\n productName: 'Tea Leaves',\n },\n {\n productId: 'SKU_30',\n productName: 'Coffee Beans',\n },\n ],\n })\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('view_promotion', {\n ecommerce: {\n creative_name: 'Summer Banner',\n creative_slot: 'featured_app_1',\n promotion_id: 'P_12345',\n promotion_name: 'Summer Sale',\n items: [\n {\n item_id: 'SKU_20',\n item_name: 'Tea Leaves',\n },\n {\n item_id: 'SKU_30',\n item_name: 'Coffee Beans',\n },\n ],\n },\n })\n })\n })\n\n describe('add_payment_info', () => {\n it('sends an event when a user add a payment information (credit card)', () => {\n const data = creditCardPaymentInfoMock\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('add_payment_info', {\n ecommerce: {\n currency: 'USD',\n value: 211.19,\n payment_type: 'creditCard',\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 1,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('begin_checkout', () => {\n it('sends an event when a user access the checkout page', () => {\n const data = beginCheckoutMock\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('begin_checkout', {\n ecommerce: {\n currency: 'USD',\n value: 650.69,\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 1,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n {\n item_id: '200000203',\n item_brand: 'Sony',\n item_name: 'Top Wood 2',\n item_variant: '2000305',\n item_category: 'Home & Decor',\n item_category2: 'Tables',\n quantity: 3,\n price: 150.9,\n dimension1: '789',\n dimension2: '101',\n dimension3: 'Blue',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('view_cart', () => {\n it('sends an event when a user opens the cart with items', () => {\n const data = viewCartWithItemsMock\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('view_cart', {\n ecommerce: {\n currency: 'USD',\n value: 546.88,\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 2,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n {\n item_id: '200000203',\n item_brand: 'Sony',\n item_name: 'Top Wood 2',\n item_variant: '2000305',\n item_category: 'Home & Decor',\n item_category2: 'Tables',\n quantity: 1,\n price: 150.9,\n dimension1: '789',\n dimension2: '101',\n dimension3: 'Blue',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n\n it('sends an event when a user opens the cart with no items', () => {\n const data = viewCartWithNoItemsMock\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('view_cart', {\n ecommerce: {\n currency: 'USD',\n value: 0.0,\n items: [],\n },\n })\n })\n })\n\n describe('refund', () => {\n it('sends an event when the user refunds an order', () => {\n const data = refundTransaction\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('refund', {\n ecommerce: {\n currency: 'USD',\n items: [\n {\n item_brand: 'New Offers!!',\n item_category: 'Apparel & Accessories',\n item_id: '9',\n item_name: 'Top Everyday Necessaire',\n item_variant: '20',\n price: 1600.99,\n quantity: 2,\n dimension1: '',\n dimension2: '9812983',\n dimension3: '100 RMS',\n dimension4: 'available',\n },\n ],\n shipping: 1942.61,\n tax: 0,\n transaction_id: '1310750551387',\n value: 3543.6,\n },\n })\n })\n })\n\n describe('add_shipping_info', () => {\n it('sends an event when a user add a shipping info', () => {\n const data = shippingInfoMock\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('add_shipping_info', {\n ecommerce: {\n currency: 'USD',\n value: 1958.35,\n shipping_tier: 'Ground',\n items: [\n {\n item_id: '200000202',\n item_brand: 'Sony',\n item_name: 'Top Wood',\n item_variant: '2000304',\n item_category: 'Home & Decor',\n quantity: 1,\n price: 197.99,\n dimension1: '123',\n dimension2: '456',\n dimension3: 'Red',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n\n describe('add_to_wishlist', () => {\n it('sends an event when the user add a product to wishlist', () => {\n const message = new MessageEvent('message', { data: productWishlist })\n\n message.data.eventName = 'vtex:addToWishlist'\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('add_to_wishlist', {\n ecommerce: {\n currency: 'USD',\n value: 1540.99,\n items: [\n {\n item_id: '16',\n item_name: 'Classic Shoes Top',\n item_list_name: 'List of products',\n item_brand: 'Mizuno',\n item_variant: '35',\n price: 1540.99,\n quantity: 1,\n discount: 0,\n item_category: 'Apparel & Accessories',\n item_category2: 'Shoes',\n dimension1: '123',\n dimension2: '12531',\n dimension3: 'Classic Pink',\n dimension4: 'available',\n },\n ],\n },\n })\n })\n })\n describe('login', () => {\n it('sends an event when a user login on store with any method', () => {\n const data = {\n event: 'login',\n eventName: 'vtex:login',\n method: 'Google',\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('login', {\n ecommerce: {\n method: 'Google',\n },\n })\n })\n })\n describe('search', () => {\n it('sends an event when a user search for a term on store', () => {\n const data = {\n event: 'search',\n eventName: 'vtex:search',\n term: 'Top Wood',\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('search', {\n ecommerce: {\n search_term: 'Top Wood',\n },\n })\n })\n })\n\n describe('sign_up', () => {\n it('sends an event when a user signup on store with any method', () => {\n const data = {\n event: 'signUp',\n eventName: 'vtex:signUp',\n method: 'Google',\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('sign_up', {\n ecommerce: {\n method: 'Google',\n },\n })\n })\n })\n\n describe('share', () => {\n it('sends an event when a user share a product via any type', () => {\n const data = {\n event: 'share',\n eventName: 'vtex:share',\n method: 'Facebook',\n contentType: 'image',\n itemId: '10',\n }\n\n const message = new MessageEvent('message', { data })\n\n handleEvents(message)\n\n expect(mockedUpdate).toHaveBeenCalledWith('share', {\n ecommerce: {\n method: 'Facebook',\n content_type: 'image',\n item_id: '10',\n },\n })\n })\n })\n})\n\n```" } ]
code_google-tag-manager_c9a14e20
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/push.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { createOrGetAnalyticsData } from './analytics'\n\nwindow.dataLayer = window.dataLayer || []\n\nlet isFirstPush = true\n\nexport default function push(rawEvent: Record<string, unknown>) {\n const {\n location: originalLocation,\n referrer: originalReferrer,\n origin,\n } = createOrGetAnalyticsData()\n\n let event = rawEvent\n\n if (isFirstPush || origin === 'fresh') {\n isFirstPush = false\n\n event = {\n ...rawEvent,\n originalLocation,\n originalReferrer,\n }\n }\n\n window.dataLayer.push(event)\n}\n\n```" } ]
code_google-tag-manager_aaa3970e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/updateEcommerce.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport push from './push'\n\nexport default function updateEcommerce(\n eventName: string,\n data: Record<string, unknown>\n) {\n push({ ecommerce: null, ecommerceV2: null })\n\n data.event ? push(data) : push({ event: eventName, ...data })\n}\n\n```" } ]
code_google-tag-manager_f25563d0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/enhancedEcommerceEvents.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport updateEcommerce from './updateEcommerce'\nimport {\n PixelMessage,\n ProductOrder,\n Impression,\n CartItem,\n} from '../typings/events'\nimport { AnalyticsEcommerceProduct } from '../typings/gtm'\nimport {\n purchase,\n selectItem,\n selectPromotion,\n viewItem,\n viewItemList,\n viewPromotion,\n addToCart,\n removeFromCart,\n addPaymentInfo,\n beginCheckout,\n addShippingInfo,\n viewCart,\n search,\n login,\n refund,\n addToWishlist,\n signUp,\n share,\n} from './gaEvents'\nimport {\n getCategory,\n getSeller,\n getProductNameWithoutVariant,\n getPurchaseObjectData,\n} from './utils'\nimport {\n customDimensionSkuAvailability,\n productViewSkuReference,\n} from './customDimensions'\n\nexport async function sendEnhancedEcommerceEvents(e: PixelMessage) {\n switch (e.data.eventName) {\n case 'vtex:productView': {\n const {\n productId,\n productReference,\n selectedSku,\n productName,\n brand,\n categories,\n } = e.data.product\n\n const productAvailableQuantity = getSeller(selectedSku.sellers)\n .commertialOffer.AvailableQuantity\n\n const isAvailable = customDimensionSkuAvailability(\n productAvailableQuantity\n )\n\n // Product summary list title. Ex: 'List of products'\n const list = e.data.list ? { actionField: { list: e.data.list } } : {}\n\n let price\n\n try {\n price = getSeller(selectedSku.sellers).commertialOffer.Price\n } catch {\n price = undefined\n }\n\n const data = {\n ecommerce: {\n detail: {\n ...list,\n products: [\n {\n brand,\n category: getCategory(categories),\n id: productId,\n variant: selectedSku.itemId,\n name: productName,\n dimension1: productReference ?? '',\n dimension2: productViewSkuReference(e.data.product) ?? '',\n dimension3: selectedSku.name,\n dimension4: isAvailable,\n price,\n },\n ],\n },\n },\n event: 'productDetail',\n }\n\n viewItem(e.data)\n updateEcommerce('productDetail', data)\n\n return\n }\n\n case 'vtex:productClick': {\n const { product, position } = e.data\n const {\n productName,\n brand,\n categories,\n sku,\n productId,\n productReference,\n } = product\n\n // Product summary list title. Ex: 'List of products'\n const list = e.data.list ? { actionField: { list: e.data.list } } : {}\n\n let price\n\n try {\n price = getSeller(sku?.sellers ?? product.items[0].sellers)\n .commertialOffer.Price\n } catch {\n price = undefined\n }\n\n const data = {\n event: 'productClick',\n ecommerce: {\n click: {\n ...list,\n products: [\n {\n brand,\n category: getCategory(categories),\n id: productId,\n variant: sku.itemId,\n name: productName,\n dimension1: productReference ?? '',\n dimension2: sku.referenceId?.Value ?? '',\n dimension3: sku.name,\n price,\n position,\n },\n ],\n },\n },\n }\n\n selectItem(e.data)\n updateEcommerce('productClick', data)\n\n return\n }\n\n case 'vtex:addToCart': {\n const { items } = e.data\n\n const data = {\n ecommerce: {\n add: {\n products: items.map(item => ({\n brand: item.brand,\n category: item.category,\n id: item.productId,\n variant: item.skuId,\n name: item.name, // Product name\n price:\n item.priceIsInt === true\n ? `${item.price / 100}`\n : `${item.price}`,\n quantity: item.quantity,\n dimension1: item.productRefId ?? '',\n dimension2: item.referenceId ?? '', // SKU reference id\n dimension3: item.variant, // SKU name (variant)\n })),\n },\n currencyCode: e.data.currency,\n },\n event: 'addToCart',\n }\n\n addToCart(e.data)\n updateEcommerce('addToCart', data)\n\n return\n }\n\n case 'vtex:removeFromCart': {\n const { items } = e.data\n\n const data = {\n ecommerce: {\n currencyCode: e.data.currency,\n remove: {\n products: items.map(item => ({\n brand: item.brand,\n category: item.category,\n id: item.productId,\n variant: item.skuId,\n name: item.name, // Product name\n price:\n item.priceIsInt === true\n ? `${item.price / 100}`\n : `${item.price}`,\n quantity: item.quantity,\n dimension1: item.productRefId ?? '',\n dimension2: item.referenceId ?? '', // SKU reference id\n dimension3: item.variant, // SKU name (variant)\n })),\n },\n },\n event: 'removeFromCart',\n }\n\n removeFromCart(e.data)\n updateEcommerce('removeFromCart', data)\n\n return\n }\n\n case 'vtex:orderPlaced': {\n const order = e.data\n\n const ecommerce = {\n purchase: {\n actionField: getPurchaseObjectData(order),\n products: order.transactionProducts.map((product: ProductOrder) =>\n getProductObjectData(product)\n ),\n },\n }\n\n const data = {\n // @ts-ignore\n event: 'orderPlaced',\n ...order,\n // The name ecommerceV2 was introduced as a fix, so it is possible that some clients\n // were using this as it was called before (ecommerce). For that reason,\n // it will also be sent as ecommerce to the dataLayer.\n ecommerce,\n // This variable is called ecommerceV2 so it matches the variable name present on the checkout\n // This way, users can have one single tag for checkout and orderPlaced events\n ecommerceV2: {\n ecommerce,\n },\n }\n\n purchase(order)\n updateEcommerce('orderPlaced', data)\n\n return\n }\n\n case 'vtex:productImpression': {\n const { currency, list, impressions } = e.data\n\n const parsedImpressions = (impressions || []).map(\n getProductImpressionObjectData(list)\n )\n\n const data = {\n event: 'productImpression',\n ecommerce: {\n currencyCode: currency,\n impressions: parsedImpressions,\n },\n }\n\n viewItemList(e.data)\n updateEcommerce('productImpression', data)\n\n return\n }\n\n case 'vtex:cartLoaded': {\n const { orderForm } = e.data\n\n const data = {\n event: 'checkout',\n ecommerce: {\n checkout: {\n actionField: {\n step: 1,\n },\n products: orderForm.items.map(getCheckoutProductObjectData),\n },\n },\n }\n\n updateEcommerce('checkout', data)\n\n break\n }\n\n case 'vtex:promoView': {\n const { promotions } = e.data\n\n const data = {\n event: 'promoView',\n ecommerce: {\n promoView: {\n promotions,\n },\n },\n }\n\n viewPromotion(e.data)\n updateEcommerce('promoView', data)\n\n break\n }\n\n case 'vtex:promotionClick': {\n const { promotions } = e.data\n\n const data = {\n event: 'promotionClick',\n ecommerce: {\n promoClick: {\n promotions,\n },\n },\n }\n\n selectPromotion(e.data)\n updateEcommerce('promotionClick', data)\n\n break\n }\n\n case 'vtex:addPaymentInfo': {\n addPaymentInfo(e.data)\n\n break\n }\n\n case 'vtex:beginCheckout': {\n beginCheckout(e.data)\n\n break\n }\n\n case 'vtex:addShippingInfo': {\n addShippingInfo(e.data)\n\n break\n }\n\n case 'vtex:viewCart': {\n viewCart(e.data)\n\n break\n }\n\n case 'vtex:login': {\n login(e.data)\n\n break\n }\n\n case 'vtex:signUp': {\n signUp(e.data)\n\n break\n }\n\n case 'vtex:refund': {\n refund(e.data)\n\n break\n }\n\n case 'vtex:addToWishlist': {\n addToWishlist(e.data)\n\n break\n }\n\n case 'vtex:search': {\n search(e.data)\n\n break\n }\n\n case 'vtex:share': {\n share(e.data)\n\n break\n }\n\n default: {\n break\n }\n }\n}\n\nfunction getProductObjectData(product: ProductOrder) {\n const productName = getProductNameWithoutVariant(\n product.name,\n product.skuName\n )\n\n return {\n brand: product.brand,\n category: product.categoryTree?.join('/'),\n id: product.id, // Product id\n variant: product.sku, // SKU id\n name: productName, // Product name\n price: product.price,\n quantity: product.quantity,\n dimension1: product.productRefId ?? '',\n dimension2: product.skuRefId ?? '',\n dimension3: product.skuName, // SKU name (only variant)\n }\n}\n\nfunction getProductImpressionObjectData(list: string) {\n return ({ product, position }: Impression) => ({\n brand: product.brand,\n category: getCategory(product.categories),\n id: product.productId, // Product id\n variant: product.sku.itemId, // SKU id\n list,\n name: product.productName,\n position,\n price: `${product.sku.seller.commertialOffer.Price}`,\n dimension1: product.productReference ?? '',\n dimension2: product.sku.referenceId?.Value ?? '',\n dimension3: product.sku.name, // SKU name (variation only)\n })\n}\n\nfunction getCheckoutProductObjectData(\n item: CartItem\n): AnalyticsEcommerceProduct {\n const productName = getProductNameWithoutVariant(item.name, item.skuName)\n\n return {\n id: item.productId, // Product id\n variant: item.id, // SKU id\n name: productName, // Product name without variant\n category: Object.keys(item.productCategories ?? {}).reduce(\n (categories, category) =>\n categories ? `${categories}/${category}` : category,\n ''\n ),\n brand: item.additionalInfo?.brandName ?? '',\n price: item.sellingPrice / 100,\n quantity: item.quantity,\n dimension1: item.productRefId ?? '',\n dimension2: item.referenceId ?? '', // SKU reference id\n dimension3: item.skuName,\n }\n}\n\n```" } ]
code_google-tag-manager_8db73bdb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/legacyEvents.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport push from './push'\nimport { PixelMessage, SearchPageInfoData } from '../typings/events'\n\nexport async function sendLegacyEvents(e: PixelMessage) {\n switch (e.data.eventName) {\n case 'vtex:pageInfo': {\n const { eventType } = e.data\n\n switch (eventType) {\n case 'homeView': {\n push({\n event: 'homeView',\n })\n break\n }\n\n case 'categoryView': {\n const data = e.data as SearchPageInfoData\n\n push({\n event: 'categoryView',\n departmentId: data.department?.id,\n departmentName: data.department?.name,\n categoryId: data.category?.id,\n categoryName: data.category?.name,\n })\n break\n }\n\n case 'departmentView': {\n const data = e.data as SearchPageInfoData\n\n push({\n event: 'departmentView',\n departmentId: data.department?.id,\n departmentName: data.department?.name,\n })\n break\n }\n\n case 'emptySearchView':\n\n // eslint-disable-next-line no-fallthrough\n case 'internalSiteSearchView': {\n const data = e.data as SearchPageInfoData\n\n push({\n event: 'internalSiteSearchView',\n siteSearchTerm: data.search?.term,\n siteSearchForm: window.location.href,\n siteSearchCategory: data.search?.category?.id,\n siteSearchResults: data.search?.results,\n })\n\n break\n }\n\n case 'productView': {\n push({\n event: 'productView',\n })\n break\n }\n\n default: {\n push({\n event: 'otherView',\n })\n break\n }\n }\n\n break\n }\n\n default: {\n break\n }\n }\n}\n\n```" } ]
code_google-tag-manager_22ea5c6f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/utils.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n CartItem,\n Impression,\n Order,\n ProductOrder,\n Seller,\n} from '../typings/events'\nimport { customDimensions } from './customDimensions'\n\nexport function getSeller(sellers: Seller[]) {\n const defaultSeller = sellers.find(seller => seller.sellerDefault)\n\n if (!defaultSeller) {\n return sellers[0]\n }\n\n return defaultSeller\n}\n\nexport function getPrice(seller: Seller) {\n let price\n\n try {\n price = seller.commertialOffer.Price\n } catch {\n price = undefined\n }\n\n return price\n}\n\nfunction formatCategoriesHierarchy(\n categories: { [key: string]: string },\n value: string,\n index: number\n) {\n const categoryHierarchyNumber = index + 1\n const isFirstCategory = categoryHierarchyNumber === 1\n const key = `item_category${isFirstCategory ? '' : categoryHierarchyNumber}`\n\n categories[key] = value\n}\n\nexport function getCategoriesWithHierarchy(categoriesArray: string[]) {\n if (!categoriesArray || !categoriesArray.length) return\n\n const categoryString = getCategory(categoriesArray)\n const categories = splitIntoCategories(categoryString)\n\n if (!categories || !categoryString) return {}\n\n const categoriesFormatted: { [key: string]: string } = {}\n\n if (!categories || !categories.length) {\n formatCategoriesHierarchy(categoriesFormatted, categoryString, 0)\n } else {\n categories.forEach((category, index) => {\n formatCategoriesHierarchy(categoriesFormatted, category, index)\n })\n }\n\n return categoriesFormatted\n}\n\nfunction getCategoriesHierarchyByKey(\n categories: Record<string, string> | null,\n keysArray?: string[]\n) {\n if (!keysArray || !keysArray.length || !categories) return []\n const categoriesFormatted: string[] = []\n const categoriesHierarchyFormatted = {}\n\n keysArray.forEach(key => {\n if (key) categoriesFormatted.push(categories[key])\n })\n\n categoriesFormatted.forEach((category, index) => {\n formatCategoriesHierarchy(categoriesHierarchyFormatted, category, index)\n })\n\n return categoriesHierarchyFormatted\n}\n\nexport function getQuantity(seller: Seller) {\n const isAvailable = seller.commertialOffer.AvailableQuantity > 0\n\n return isAvailable ? 1 : 0\n}\n\nexport function getImpressions(impressions: Impression[]) {\n if (!impressions || !impressions.length) return []\n\n const formattedImpressions = impressions.map(impression => {\n const { product, position } = impression\n const {\n productName,\n productId,\n productReference,\n sku,\n brand,\n categories,\n } = product\n\n const { itemId, seller, referenceId, name } = sku\n\n const price = getPrice(seller)\n const discount = getDiscount(seller)\n const quantity = getQuantity(seller)\n\n const categoriesHierarchy = getCategoriesWithHierarchy(categories)\n\n return {\n item_id: productId,\n item_name: productName,\n item_variant: itemId,\n item_brand: brand,\n index: position,\n discount,\n price,\n quantity,\n ...categoriesHierarchy,\n ...customDimensions({\n productReference,\n skuReference: referenceId?.Value,\n skuName: name,\n quantity,\n }),\n }\n })\n\n return formattedImpressions\n}\n\nexport function getDiscount(seller: Seller) {\n if (!seller.commertialOffer.PriceWithoutDiscount) return 0\n\n const { commertialOffer } = seller\n const { Price, PriceWithoutDiscount } = commertialOffer\n\n if (PriceWithoutDiscount <= Price) return 0\n\n let price\n\n try {\n price = PriceWithoutDiscount - Price\n } catch {\n price = 0\n }\n\n return price\n}\n\nexport function getCategory(rawCategories: string[]) {\n if (!rawCategories || !rawCategories.length) {\n return\n }\n\n return removeStartAndEndSlash(rawCategories[0])\n}\n\n// Transform this: \"/Apparel & Accessories/Clothing/Tops/\"\n// To this: \"Apparel & Accessories/Clothing/Tops\"\nfunction removeStartAndEndSlash(category?: string) {\n return category?.replace(/^\\/|\\/$/g, '')\n}\n\nfunction splitIntoCategories(category?: string) {\n if (!category) return\n\n const splitted = category.split('/')\n\n return splitted\n}\n\nexport function getPurchaseObjectData(order: Order) {\n return {\n affiliation: order.transactionAffiliation,\n coupon: order.coupon ? order.coupon : null,\n id: order.orderGroup,\n revenue: order.transactionTotal,\n shipping: order.transactionShipping,\n tax: order.transactionTax,\n }\n}\n\nexport function getProductNameWithoutVariant(\n productNameWithVariant: string,\n variant: string\n) {\n const indexOfVariant = productNameWithVariant.lastIndexOf(variant)\n\n if (indexOfVariant === -1 || indexOfVariant === 0) {\n return productNameWithVariant\n }\n\n return productNameWithVariant.substring(0, indexOfVariant - 1) // Removes the variant and the whitespace\n}\n\nfunction formatPurchaseProduct(product: ProductOrder) {\n const {\n name,\n skuName,\n id,\n brand,\n sku,\n price,\n quantity,\n categoryTree,\n productRefId,\n skuRefId,\n } = product\n\n const productName = getProductNameWithoutVariant(name, skuName)\n\n const item = {\n item_id: id,\n item_name: productName,\n item_brand: brand,\n item_variant: sku,\n price,\n quantity,\n ...getCategoriesWithHierarchy([categoryTree.join('/')]),\n ...customDimensions({\n productReference: productRefId,\n skuReference: skuRefId,\n skuName,\n quantity,\n }),\n }\n\n return item\n}\n\nexport function formatCartItemsAndValue(\n cartItems: CartItem[],\n options?: {\n dividePrice: boolean\n }\n) {\n let totalValue = 0.0\n\n if (!cartItems.length) return { items: [], totalValue }\n\n const items = cartItems.map((item: CartItem) => {\n const productName = getProductNameWithoutVariant(item.name, item.skuName)\n\n const shouldFormatPrice = item.priceIsInt ?? options?.dividePrice\n\n const formattedPrice = shouldFormatPrice ? item.price / 100 : item.price\n\n const itemBrand = item.brand ? item.brand : item.additionalInfo?.brandName\n\n const categoryIds = splitIntoCategories(item.productCategoryIds)\n const formattedCategories = item.category\n ? getCategoriesWithHierarchy([item.category])\n : getCategoriesHierarchyByKey(item.productCategories, categoryIds)\n\n totalValue += formattedPrice * item.quantity\n\n return {\n item_id: item.productId,\n item_brand: itemBrand,\n item_name: productName,\n item_variant: item.skuId,\n quantity: item.quantity,\n price: formattedPrice,\n ...formattedCategories,\n ...customDimensions({\n productReference: item.productRefId,\n skuReference: item.referenceId,\n skuName: item.variant,\n quantity: item.quantity,\n }),\n }\n })\n\n return { items, totalValue }\n}\n\nexport function getPurchaseItems(orderProducts: ProductOrder[]) {\n return orderProducts.map(formatPurchaseProduct)\n}\n\n```" } ]
code_google-tag-manager_5da5c8c3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/extraEvents.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport push from './push'\nimport { PixelMessage } from '../typings/events'\n\n\nasync function emailToHash(email:string) {\n const msgUint8 = new TextEncoder().encode(email); \n const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n return hashHex;\n}\n\nexport async function sendExtraEvents(e: PixelMessage) {\n\n switch (e.data.eventName) {\n case 'vtex:pageView': {\n push({\n event: 'pageView',\n location: e.data.pageUrl,\n page: e.data.pageUrl.replace(e.origin, ''),\n referrer: e.data.referrer,\n ...(e.data.pageTitle && {\n title: e.data.pageTitle,\n }),\n })\n\n return\n }\n\n case 'vtex:userData': {\n const { data } = e\n\n if (!data.isAuthenticated) {\n return\n }\n\n const emailHash = data.email ? await emailToHash(data.email) : undefined\n\n push({\n event: 'userData',\n userId: data.id,\n emailHash: emailHash \n })\n\n break\n }\n\n default: {\n break\n }\n }\n}\n\n```" } ]
code_google-tag-manager_e56b4425
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/gaEvents.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n AddToCartData,\n RemoveFromCartData,\n PromoViewData,\n OrderPlacedData,\n AddPaymentInfoData,\n ProductClickData,\n ProductViewData,\n ProductImpressionData,\n BeginCheckoutData,\n AddShippingInfoData,\n ViewCartData,\n SearchData,\n LoginData,\n RefundData,\n AddToWishlistData,\n SignUpData,\n ShareData,\n PromotionClickData,\n} from '../typings/events'\nimport updateEcommerce from './updateEcommerce'\nimport {\n getPrice,\n getSeller,\n getCategoriesWithHierarchy,\n getQuantity,\n getImpressions,\n getDiscount,\n getPurchaseObjectData,\n getPurchaseItems,\n formatCartItemsAndValue,\n} from './utils'\nimport { customDimensions, productViewSkuReference } from './customDimensions'\nimport shouldSendGA4Events from './utils/shouldSendGA4Events'\n\nexport function viewItem(eventData: ProductViewData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'view_item'\n\n const { currency, product, list } = eventData\n\n const {\n selectedSku,\n productName,\n productId,\n productReference,\n categories,\n brand,\n } = product\n\n const { itemId: variant } = selectedSku\n\n const seller = getSeller(selectedSku.sellers)\n const value = getPrice(seller)\n const categoriesHierarchy = getCategoriesWithHierarchy(categories)\n const discount = getDiscount(seller)\n const quantity = getQuantity(seller)\n\n const item = {\n item_id: productId,\n item_name: productName,\n item_list_name: list,\n item_brand: brand,\n item_variant: variant,\n discount,\n quantity,\n price: value,\n ...categoriesHierarchy,\n ...customDimensions({\n productReference,\n skuReference: productViewSkuReference(product),\n skuName: selectedSku.name,\n quantity,\n }),\n }\n\n const data = {\n currency,\n value,\n items: [item],\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function viewItemList(eventData: ProductImpressionData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'view_item_list'\n\n const { list, impressions } = eventData\n\n const items = getImpressions(impressions)\n\n const data = {\n item_list_name: list,\n items,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function selectItem(eventData: ProductClickData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'select_item'\n\n const { product, list, position } = eventData\n\n const {\n sku,\n productName,\n productId,\n productReference,\n categories,\n brand,\n } = product\n\n const { itemId: variant, referenceId, name } = sku\n\n const seller = getSeller(sku.sellers)\n const price = getPrice(seller)\n const categoriesHierarchy = getCategoriesWithHierarchy(categories)\n const discount = getDiscount(seller)\n const quantity = getQuantity(seller)\n\n const item = {\n item_id: productId,\n item_name: productName,\n item_list_name: list,\n item_brand: brand,\n item_variant: variant,\n index: position,\n price,\n quantity,\n discount,\n ...categoriesHierarchy,\n ...customDimensions({\n productReference,\n skuReference: referenceId?.Value,\n skuName: name,\n quantity,\n }),\n }\n\n const data = {\n item_list_name: list,\n items: [item],\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function selectPromotion(eventData: PromotionClickData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'select_promotion'\n const [promotion] = eventData.promotions\n\n const data = {\n creative_name: promotion.creative,\n creative_slot: promotion.position,\n promotion_id: promotion.id,\n promotion_name: promotion.name,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function viewPromotion(eventData: PromoViewData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'view_promotion'\n\n const {\n promotions: [{ creative, position, id, name, products }],\n } = eventData\n\n let items: Array<{ item_id: string; item_name: string }> = []\n\n if (products?.length) {\n items = products.map(product => ({\n item_id: product.productId,\n item_name: product.productName,\n }))\n }\n\n const data = {\n creative_name: creative,\n creative_slot: position,\n promotion_id: id,\n promotion_name: name,\n items,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function addToCart(eventData: AddToCartData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'add_to_cart'\n\n const { items: eventDataItems, currency } = eventData\n\n const { items, totalValue } = formatCartItemsAndValue(eventDataItems)\n\n const data = {\n items,\n currency,\n value: totalValue,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function removeFromCart(eventData: RemoveFromCartData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'remove_from_cart'\n\n const { items: eventDataItems, currency } = eventData\n\n const { items, totalValue } = formatCartItemsAndValue(eventDataItems)\n\n const data = {\n items,\n currency,\n value: totalValue,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function purchase(eventData: OrderPlacedData) {\n if (!shouldSendGA4Events()) return\n\n const eventName = 'purchase'\n\n const { id, revenue, tax, shipping, coupon } = getPurchaseObjectData(\n eventData\n )\n\n const { transactionProducts, currency } = eventData\n\n const items = getPurchaseItems(transactionProducts)\n\n const data = {\n transaction_id: id,\n value: revenue,\n tax,\n shipping,\n coupon,\n items,\n currency,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function addPaymentInfo(eventData: AddPaymentInfoData) {\n const eventName = 'add_payment_info'\n\n const { currency, payment, items: eventDataItems } = eventData\n const { value, group } = payment\n\n const { items } = formatCartItemsAndValue(eventDataItems)\n\n const formattedValue = value / 100\n\n const data = {\n currency,\n value: formattedValue,\n payment_type: group,\n items,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function beginCheckout(eventData: BeginCheckoutData) {\n const eventName = 'begin_checkout'\n\n const { currency, items: eventDataItems } = eventData\n\n const { items, totalValue } = formatCartItemsAndValue(eventDataItems)\n\n const data = {\n currency,\n value: totalValue,\n items,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function addShippingInfo(eventData: AddShippingInfoData) {\n const eventName = 'add_shipping_info'\n\n const { currency, items: eventDataItems, shippingTier, value } = eventData\n\n const { items } = formatCartItemsAndValue(eventDataItems)\n\n const data = {\n currency,\n value,\n items,\n shipping_tier: shippingTier,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function viewCart(eventData: ViewCartData) {\n const eventName = 'view_cart'\n\n const { currency, items: eventDataItems } = eventData\n\n const { items, totalValue } = formatCartItemsAndValue(eventDataItems, {\n dividePrice: true,\n })\n\n const data = {\n currency,\n value: totalValue,\n items,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function addToWishlist(eventData: AddToWishlistData) {\n const eventName = 'add_to_wishlist'\n\n const { currency, items, list } = eventData\n\n const { product } = items\n\n const {\n sku,\n productName,\n productId,\n categories,\n brand,\n productReference,\n } = product\n\n const variant = sku ? sku.itemId : items.selectedItem.itemId\n\n const seller = getSeller(sku ? sku.sellers : items.selectedItem.sellers)\n const value = getPrice(seller)\n const categoriesHierarchy = getCategoriesWithHierarchy(categories)\n const discount = getDiscount(seller)\n const quantity = getQuantity(seller)\n\n const item = {\n item_id: productId,\n item_name: productName,\n item_list_name: list,\n item_brand: brand,\n item_variant: variant,\n discount,\n quantity,\n price: value,\n ...categoriesHierarchy,\n ...customDimensions({\n productReference,\n skuReference: sku ? sku.referenceId.Value : items.selectedItem.referenceId,\n skuName: sku ? sku.name : items.selectedItem.name,\n quantity,\n }),\n }\n\n const data = {\n currency,\n value,\n items: [item],\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function refund(eventData: RefundData) {\n const eventName = 'refund'\n\n const { currency } = eventData\n\n const {\n tax,\n shipping,\n value,\n transactionId,\n items: orderItems,\n } = eventData.order\n\n const items = getPurchaseItems(orderItems)\n\n const data = {\n transaction_id: transactionId,\n value,\n tax,\n shipping,\n items,\n currency,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function login(eventData: LoginData) {\n const eventName = 'login'\n\n const { method } = eventData\n\n const data = {\n method,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function signUp(eventData: SignUpData) {\n const eventName = 'sign_up'\n\n const { method } = eventData\n\n const data = {\n method,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function search(eventData: SearchData) {\n const eventName = 'search'\n\n const { term } = eventData\n\n const data = {\n search_term: term,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\nexport function share(eventData: ShareData) {\n const eventName = 'share'\n\n const { method, contentType, itemId } = eventData\n\n const data = {\n method,\n content_type: contentType,\n item_id: itemId,\n }\n\n updateEcommerce(eventName, { ecommerce: data })\n}\n\n```" } ]
code_google-tag-manager_7be85642
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/customDimensions.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { ProductViewData, ProductViewReferenceId } from '../typings/events'\n\ntype CustomDimensionSkuAvailability = 'available' | 'unavailable'\n\ninterface CustomDimensions {\n /** Product reference */\n dimension1: string\n /** SKU reference */\n dimension2: string\n /** SKU name */\n dimension3: string\n /** SKU availability */\n dimension4: CustomDimensionSkuAvailability\n}\n\ninterface CustomDimensionParams {\n productReference?: string\n skuReference?: string\n skuName?: string\n quantity: number\n}\n\nexport function customDimensions(\n params: CustomDimensionParams\n): CustomDimensions {\n return {\n dimension1: params.productReference ?? '',\n dimension2: params.skuReference ?? '',\n dimension3: params.skuName ?? '',\n dimension4: customDimensionSkuAvailability(params.quantity),\n }\n}\n\nexport function customDimensionSkuAvailability(\n quantity: number\n): CustomDimensionSkuAvailability {\n return quantity ? 'available' : 'unavailable'\n}\n\nexport function productViewSkuReference(\n product: ProductViewData['product']\n): string {\n const defaultReference = { Value: '' }\n\n // The `vtex:productView` is the only event where the\n // `product.selectedSku.referenceId` is different between its type and actual\n // data. Type `Item` (for `selectedSku`) specifies `referenceId` as a single\n // `{ Key: string; Value: string }` object type. However, in this event,\n // `referenceId` comes as an array of that object.\n //\n // This type conversion is needed because vtex.store does not normalize the\n // SKU Reference ID. Doing that there could possibly break some apps or\n // stores, so it's better doing it here.\n const skuReferenceId = (\n ((product.selectedSku\n .referenceId as unknown) as ProductViewReferenceId)?.[0] ??\n defaultReference\n ).Value\n\n return skuReferenceId ?? ''\n}\n\n```" } ]
code_google-tag-manager_9d9bc7e7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/utils/shouldSendGA4Events.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport default function shouldSendGA4Events() {\n return Boolean(window?.__gtm__?.sendGA4Events)\n}\n\n```" } ]
code_google-tag-manager_a55dd959
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/analytics/utils.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n// Almost all of the logic of expiration and campaign invalidation is based on this official GA article https://support.google.com/analytics/answer/2731565\n\nexport interface AnalyticsData {\n location: string\n referrer: string\n expires: number\n}\n\nexport interface AnalyticsDataWithOrigin extends AnalyticsData {\n origin: 'storage' | 'fresh'\n}\n\nexport const UTM_SOURCE_PARAM = 'utm_source'\nexport const UTM_MEDIUM_PARAM = 'utm_medium'\n\n// All of these parameters trigger a new session storage of the url\n// This list was inspired by Simo Ahava's list used on his cookie implementation of this feature\n// https://www.simoahava.com/analytics/persist-campaign-data-landing-page/#setup-the-persist-campaign-data-tag\nexport const analyticsURLParams = [\n UTM_SOURCE_PARAM,\n UTM_MEDIUM_PARAM,\n 'utm_campaign',\n 'gclid',\n 'utm_term',\n 'utm_content',\n 'utm_id',\n] as const\n\nexport function shouldInvalidateCurrentCampaign(\n location: Location,\n referrer: string,\n storageReferrer: string\n) {\n const referrerURL = referrer ? new URL(referrer) : null\n\n // if user comes from a referring website\n if (\n referrerURL &&\n referrer !== storageReferrer &&\n referrerURL.host !== location.host\n ) {\n return true\n }\n\n // the slice removes the initial \"?\" character\n const individualLocationParams = location.search.slice(1).split('&')\n\n return individualLocationParams.some(locationParam => {\n return analyticsURLParams.some(campaignParam =>\n locationParam.startsWith(`${campaignParam}=`)\n )\n })\n}\n\nconst STORAGE_KEY_ANALYTICS_DATA = 'analytics:session'\n\nexport function getAnalyticsFromStorage(): AnalyticsData | null {\n let analyticsData = null\n\n try {\n const rawAnalyticsData = window.localStorage.getItem(\n STORAGE_KEY_ANALYTICS_DATA\n )\n\n analyticsData = rawAnalyticsData ? JSON.parse(rawAnalyticsData) : null\n } catch (e) {\n console.error(\n 'Error while fetching original browser location from localStorage storage'\n )\n }\n\n return analyticsData\n}\n\nexport async function saveAnalyticsOnStorage(analyticsData: AnalyticsData) {\n try {\n window.localStorage.setItem(\n STORAGE_KEY_ANALYTICS_DATA,\n JSON.stringify(analyticsData)\n )\n } catch (e) {\n console.error(\n 'Error while saving original browser location on localStorage storage'\n )\n }\n}\n\nexport function currentDateInSeconds() {\n return Math.floor(Date.now() / 1000)\n}\n\nexport const THIRTY_MIN_IN_SECONDS = 30 * 60\n\nexport function isStorageExpired(expiresIn: number, now: number) {\n return now - expiresIn > 0\n}\n\nexport function renewExpirationDate() {\n return currentDateInSeconds() + THIRTY_MIN_IN_SECONDS\n}\n\n```" } ]
code_google-tag-manager_dee3170d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of google-tag-manager/react/modules/analytics/index.ts from the google-tag-manager VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n AnalyticsData,\n AnalyticsDataWithOrigin,\n currentDateInSeconds,\n getAnalyticsFromStorage,\n isStorageExpired,\n renewExpirationDate,\n saveAnalyticsOnStorage,\n shouldInvalidateCurrentCampaign,\n} from './utils'\n\nexport function createOrGetAnalyticsData(): AnalyticsDataWithOrigin {\n let analyticsData = getAnalyticsData()\n let origin: AnalyticsDataWithOrigin['origin'] = 'storage'\n\n if (!analyticsData) {\n analyticsData = createAnalyticsData()\n origin = 'fresh'\n }\n\n saveAnalyticsOnStorage(analyticsData)\n\n return { ...analyticsData, origin }\n}\n\nfunction getAnalyticsData(): AnalyticsData | null {\n const analyticsFromStorage = getAnalyticsFromStorage()\n\n if (\n !analyticsFromStorage ||\n isStorageExpired(analyticsFromStorage.expires, currentDateInSeconds()) ||\n shouldInvalidateCurrentCampaign(\n window.location,\n document.referrer,\n analyticsFromStorage.referrer\n )\n ) {\n return null\n }\n\n return {\n ...analyticsFromStorage,\n expires: renewExpirationDate(),\n }\n}\n\nfunction createAnalyticsData(): AnalyticsData {\n return {\n location: window.location.href,\n referrer: document.referrer,\n expires: renewExpirationDate(),\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_de46843d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/checkout-ui-custom/checkout6-custom.js from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// WARNING: THE USAGE OF CUSTOM SCRIPTS IS NOT SUPPORTED. VTEX IS NOT LIABLE FOR ANY DAMAGES THIS MAY CAUSE. THIS MAY BREAK YOUR STORE AND STOP SALES. IN CASE OF ERRORS, PLEASE DELETE THE CONTENT OF THIS SCRIPT.\n(function () {})();\n\n```" } ]
code_b2cstoreqa.theme_67bdf840
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/checkout-ui-custom/checkout-confirmation-custom.js from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// WARNING: THE USAGE OF CUSTOM SCRIPTS IS NOT SUPPORTED. VTEX IS NOT LIABLE FOR ANY DAMAGES THIS MAY CAUSE.\n// THIS MAY BREAK YOUR STORE AND STOP SALES. IN CASE OF ERRORS, PLEASE DELETE THE CONTENT OF THIS SCRIPT.\n\n```" } ]
code_b2cstoreqa.theme_4703ec4d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/checkout-ui-custom/checkout5-custom.js from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```javascript\n// WARNING: THE USAGE OF CUSTOM SCRIPTS IS NOT SUPPORTED. VTEX IS NOT LIABLE FOR ANY DAMAGES THIS MAY CAUSE. THIS MAY BREAK YOUR STORE AND STOP SALES. IN CASE OF ERRORS, PLEASE DELETE THE CONTENT OF THIS SCRIPT.\n\n```" } ]
code_b2cstoreqa.theme_d7842ec8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/docs/README.md from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# B2C Store Theme\n\n<!-- @import \"[TOC]\" {cmd=\"toc\" depthFrom=2 depthTo=6 orderedList=false} -->\n\n<!-- code_chunk_output -->\n\n- [Prerequisites](#prerequisites)\n - [Toolbelt](#toolbelt)\n - [Edition](#edition)\n- [Setup](#setup)\n - [Peer Dependencies](#peer-dependencies)\n - [Search](#search)\n - [Reviews and Ratings](#reviews-and-ratings)\n\n<!-- /code_chunk_output -->\n\n## Prerequisites\n\n### Toolbelt\n\nFollow this [Developer Docs Guide](https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-2-basicsetuptodevelopinvtexio) to setup **Toolbelt** and have access to CLI commands.\n\n### Edition\n\nFollow the steps required to setup `vtex.edition-store@3.x` detailed in this [Developer Docs Guide](https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-2-prerequesites#implementing-the-correct-edition-app)\n\n## Setup\n\n### Peer Dependencies\n\nInstall theme peer dependencies and accept all terms of use/service:\n\n```sh\nvtex install \\\n vtex.wish-list@1.x \\\n vtex.reviews-and-ratings@2.x \\\n vtex.location-availability@0.x \\\n vtex.shopper-location@0.x \\\n vtex.wordpress-integration@2.x\n```\n\n### Search\n\nFollow the steps detailed in the section [Implementing the VTEX Intelligent Search](https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-2-prerequesites#implementing-the-vtex-intelligent-search) of the Prerequisites for Store Framework development guide.\n\nGo to: **STORE SETUP** &rarr; **Search** &rarr; **Integration settings** (`https://{{account}}.myvtex.com/admin/search/integration-settings`) and click \"Start Integration\"\n\n![Screen Shot 2021-02-18 at 08.31.00](/assets/Screen%20Shot%202021-02-18%20at%2008.31.00.png)\n\nWait until all the steps are completed.\n\n![Screen Shot 2021-02-18 at 08.32.31](/assets/Screen%20Shot%202021-02-18%20at%2008.32.31.png)\n\n### Reviews and Ratings\n\nGo to **PRODUCTS** &rarr; **Catalog** &rarr; **Reviews** (`https://{{account}}.myvtex.com/admin/reviews-ratings/pending`);\n\nClick \"Reviews Settings &rarr;\" in the top right conrner.\n\n![Screen Shot 2021-02-25 at 10.12.49](/assets/Screen%20Shot%202021-02-25%20at%2010.12.49.png)\n\nCheck \"Display stars in product-rating-summary if there are no reviews\"\n\nUncheck \"Display total reviews number on product-rating-summary block\"\n\nClick \"Save\"\n\n![Screen Shot 2021-02-18 at 10.15.38](/assets/Screen%20Shot%202021-02-18%20at%2010.15.38.png)\n\nYou should see a toast message saing: \"Your data was submitted successfully.\"\n\n![Screen Shot 2021-02-18 at 10.21.00](/assets/Screen%20Shot%202021-02-18%20at%2010.21.00.png)\n\n```" } ]
code_b2cstoreqa.theme_cd56f87b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/interfaces.json from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.search.product-comparison\": {\n \"around\": [\"comparison-context-wrapper\"]\n },\n \"store.custom.product-comparison\": {\n \"around\": [\"comparison-context-wrapper\"]\n },\n \"search-result-layout.desktop.product-comparison\": {\n \"allowed\": [\"product-comparison-drawer\"]\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_76e02660
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/routes.json from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.custom#product-comparison-list\": {\n \"path\": \"/product-comparison\"\n },\n \"store.custom.product-comparison#deals\": {\n \"path\": \"/deals\"\n },\n \"store.custom.product-comparison#releases\": {\n \"path\": \"/releases\"\n },\n \"store.custom.product-comparison#top-sales\": {\n \"path\": \"/top-sales\"\n },\n \"store.custom.product-comparison#popular\": {\n \"path\": \"/popular\"\n },\n \"store.custom.product-comparison#trending\": {\n \"path\": \"/trending\"\n },\n \"store.custom#customer-services\": {\n \"path\": \"/services\"\n },\n \"store.custom#gift-cards\": {\n \"path\": \"/gift-cards\"\n },\n \"store.custom#company\": {\n \"path\": \"/company\"\n },\n \"store.custom#careers\": {\n \"path\": \"/careers\"\n },\n \"store.custom#sell\": {\n \"path\": \"/sell\"\n },\n \"store.custom#investors\": {\n \"path\": \"/investors\"\n },\n \"store.custom#advertise\": {\n \"path\": \"/advertise\"\n },\n \"store.custom#locations\": {\n \"path\": \"/locations\"\n },\n \"store.custom#accessibility\": {\n \"path\": \"/accessibility\"\n },\n \"store.custom#contact\": {\n \"path\": \"/contact\"\n },\n \"store.custom#help-center\": {\n \"path\": \"/help-center\"\n },\n \"store.custom#pickup\": {\n \"path\": \"/pickup\"\n },\n \"store.custom#recalls\": {\n \"path\": \"/recalls\"\n },\n \"store.custom#returns\": {\n \"path\": \"/returns\"\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_f07c28ba
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/plugins.json from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"my-account-pages > my-account-page\": \"my-account-page.wishlist-page\",\n \"my-account-menu > my-account-link\": \"my-account-link.wishlist-link\"\n}\n\n```" } ]
code_b2cstoreqa.theme_56c0453c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-link.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.link--popularLink,\n.link--trending-link {\n text-decoration: none;\n}\n\n.label--popularLink,\n.label--trending-link {\n color: #0067c7;\n font-size: 14px;\n line-height: 24px;\n font-weight: bold;\n}\n\n.label--popularLink::after,\n.label--trending-link::after {\n content: url(\"assets/icons/chevronBlue.svg\");\n margin-left: 8px;\n top: 1px;\n position: relative;\n}\n\n.link--networkLink {\n width: 32px;\n height: 32px;\n background: rgba(255, 255, 255, 0.16);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.link--shopByLink {\n width: 100%;\n text-decoration: none;\n}\n\n.link--shopByLink:hover :global(.vtex-rich-text-0-x-paragraph--shopByCategory) {\n color: #0067c7;\n}\n\n.link--shopByLink:hover .childrenContainer {\n border: 1px solid #0067c7;\n}\n\n.childrenContainer--shopByLink {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-flow: column nowrap;\n max-width: 216px;\n height: 196px;\n background: #f3f9ff;\n border-radius: 4px;\n transition: all 0.3s ease;\n border: 1px solid transparent;\n}\n\n.childrenContainer--linkCategorySlider {\n display: flex;\n flex-flow: column nowrap;\n align-items: center;\n}\n\n.link--linkCategorySlider {\n text-decoration: none;\n}\n\n.link--blogLink {\n display: block;\n max-width: 100px;\n width: 100%;\n height: 32px;\n font-size: 14px;\n line-height: 32px;\n text-align: center;\n color: #0067c7;\n background: #f3f9ff;\n text-decoration: none;\n}\n\n.childrenContainer--linkMail,\n.childrenContainer--linkCall {\n display: flex;\n align-items: center;\n margin: 0;\n height: 48px;\n padding: 0px 20px;\n border-radius: 4px;\n max-width: 280px;\n width: 100%;\n}\n\n.childrenContainer--linkCall {\n background-color: var(--fresh-blue-dark);\n}\n\n.childrenContainer--linkMail {\n border: 1px solid var(--bg-header);\n}\n\n.link--linkCall,\n.link--linkMail {\n text-transform: uppercase;\n color: #fff;\n font-size: 14px;\n line-height: 24px;\n font-weight: 700;\n text-decoration: none;\n}\n\n.link--linkCall :global(.vtex-store-components-3-x-imageElement),\n.link--linkMail :global(.vtex-store-components-3-x-imageElement) {\n margin-right: 12px;\n}\n\n.link--linkCall {\n display: block;\n margin-bottom: 12px;\n}\n\n.link--quickLink {\n text-decoration: none;\n position: relative;\n}\n\n.link--quickLink::after {\n content: url(\"assets/icons/nav-arrow-right.svg\");\n display: block;\n position: absolute;\n color: #717786;\n right: 0;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.link--quickOrderButton {\n text-decoration: none;\n padding: 24px;\n background: #f2f5f9;\n border: 1px solid #dee7ef;\n display: block;\n margin-bottom: 8px;\n border-radius: 4px;\n position: relative;\n}\n\n.link--quickOrderButton::after {\n content: url(\"assets/icons/nav-arrow-right-blue.svg\");\n display: block;\n position: absolute;\n color: #717786;\n right: 12px;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.link--orderQuote {\n display: flex;\n align-items: center;\n text-decoration: none;\n color: #fff;\n height: 100%;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n}\n\n@media (max-width: 64rem) {\n .childrenContainer--accountLink :global(.vtex-store-icons-0-x-profileIcon) {\n width: 20px;\n height: 20px;\n }\n\n .link--footerLink {\n color: #fff;\n font-size: 16px;\n line-height: 48px;\n font-weight: 500;\n text-decoration: none;\n }\n\n .link--networkLink {\n width: 32px;\n height: 32px;\n background: rgba(255, 255, 255, 0.16);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_8dff70dd
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-comparison.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.drawerContainer {\n z-index: 6;\n}\n\n.productSelectorContainer {\n opacity: 0;\n transition: all 0.3s ease;\n}\n\n.productSelectorContainer :global(.vtex-checkbox__line-container) {\n justify-content: center;\n}\n\n.productSelectorContainer :global(.vtex-checkbox__label) {\n width: auto;\n}\n\n.productSelectorContainer :global(.vtex-checkbox__inner-container) {\n width: 20px;\n height: 20px;\n border-width: 1px;\n}\n\n.productSelectorContainer :global(.vtex-checkbox__container),\n.productSelectorContainer :global(.vtex-checkbox__input) {\n width: 20px;\n height: 20px;\n}\n\n.imageElement--paymentImage {\n margin: 0px auto;\n}\n.showDifferencesContainer :global(.vtex-checkbox__inner-container),\n.productSelectorContainer :global(.vtex-checkbox__inner-container) {\n border-color: #a3afbc;\n}\n\n.productSelectorContainer :global(.vtex-checkbox__box-wrapper) {\n width: 20px;\n height: 20px;\n}\n\n.productSelectorContainer :global(.vtex__icon-check) {\n width: 16px;\n height: 16px;\n}\n\n```" } ]
code_b2cstoreqa.theme_2412c26d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.search.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.tileList .tileListList {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-gap: 12px;\n padding: 0px 24px;\n margin: 0;\n}\n\n.tileListTitle {\n display: none;\n opacity: 0;\n}\n\n.biggy-autocomplete {\n padding-top: 0;\n}\n\n.tileList,\n.itemList--suggestion {\n padding-top: 24px;\n}\n\n.itemListTitle {\n font-size: 20px;\n line-height: 24px;\n font-weight: 500;\n color: #000;\n text-transform: initial;\n}\n\n@media (max-width: 64rem) {\n .biggy-autocomplete {\n padding: 0;\n }\n\n .tileList .tileListList {\n grid-template-columns: 1fr;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_0f35a0ad
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-price.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.sellingPrice--desktop {\n font-size: 24px;\n font-weight: normal;\n line-height: 32px;\n color: #000000;\n}\n\n.sellingPrice .sellingPriceValue--desktop {\n display: none;\n}\n\n.sellingPriceWithTax--desktop {\n font-size: 28px;\n font-weight: bold;\n}\n\n.listPrice--desktop {\n font-size: 16px;\n line-height: 20px;\n text-decoration-line: line-through;\n color: #717786;\n}\n\n.savings--desktop {\n font-size: 14px;\n line-height: 20px;\n color: #717786;\n}\n\n.savingsValue--desktop {\n color: #468a2e;\n font-weight: 500;\n}\n\n.savings--savingSummary {\n display: block;\n background: #e5f1e1;\n color: #468a2e;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 18px;\n font-weight: 500;\n padding: 0px 8px;\n border-radius: 10px;\n}\n\n.savings--savingPercentage {\n display: block;\n background: var(--fresh-orange);\n color: #fff;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 18px;\n font-weight: 700;\n padding: 0px 8px;\n border-radius: 10px;\n}\n\n.savings--savingPercent {\n margin-left: 4px;\n color: #468a2e;\n font-weight: 500;\n}\n\n@media (max-width: 64rem) {\n .savings--savingPercent {\n color: #000;\n }\n\n .currencyContainer--sticky {\n font-size: 20px;\n line-height: 28px;\n color: #000;\n font-weight: bold;\n }\n}\n\n/* Seller Name */\n\n.sellerNameContainer--default {\n font-size: 0.875rem;\n color: var(--black-medium);\n margin-bottom: 0.5rem;\n}\n\n.sellerName--default {\n color: var(--black-dark);\n font-weight: 500;\n}\n\n```" } ]
code_b2cstoreqa.theme_c9008e5e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-customizer.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.textInputValue {\n margin-top: 8px !important;\n}\n\n.textInputValue :global(.vtex-input-prefix__group) {\n border: none;\n}\n\n.textInputValue :global(.vtex-styleguide-9-x-input) {\n background: #ffffff;\n border: 1px solid #a3afbc;\n box-sizing: border-box;\n border-radius: 4px;\n padding: 0 20px;\n}\n\n.textInputValue :global(.vtex-input__label) {\n display: none;\n}\n\n.textInputValue::after {\n display: inline-block;\n color: #717786;\n content: \"Max. of 20 characters\";\n font-size: 12px;\n margin-top: 8px;\n}\n\n```" } ]
code_b2cstoreqa.theme_45460292
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n:global(.vtex-store__template),\n:global(.vtex-modal-layout-0-x-container),\n:global(.vtex-minicart-2-x-drawer),\n:global(.vtex-telemarketing-2-x-portalContainer),\n:global(.vtex-login-2-x-portalContainer) {\n --black-dark: #000000;\n --fresh-blue: #0067c7;\n --fresh-blue-dark: #0067c7;\n --fresh-blue-lightest: #f3f9ff;\n --fresh-orange: #ff5f00;\n --fresh-darkest: #003364;\n --green-dark: #468a2e;\n --black-medium: #717786;\n --bg-header: var(--fresh-blue-lightest);\n --blue-medium: #597298;\n --b2b-blue-darkest: #1b3255;\n --lines-dark: #bdc9d6;\n --lines-darker: #a3afbc;\n --lines-light: #dee7ef;\n --serious-blue-dark: #214d8e;\n --serious-black: #142032;\n --serious-orange: #ff7d30;\n --base: #fff;\n}\n\n```" } ]
code_b2cstoreqa.theme_a9685ace
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.quickorder.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n@media (max-width: 64rem) {\n .categoryButtonAdd {\n padding: 0;\n }\n\n .categoryButtonAdd :global(.vtex-button) {\n width: 100%;\n height: 48px;\n background: var(--serious-orange);\n border-radius: 4px;\n display: block;\n line-height: 48px;\n border: none;\n margin: 16px 0px 24px;\n }\n\n .categoryContainer .textContainer :not(:global(.vtex-fake)) {\n margin: 0;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_4281d3f1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.orderquote.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.containerCreate,\n.containerList,\n.containerView {\n max-width: 1440px;\n width: 100%;\n padding: 0px;\n margin: 0px auto;\n}\n\n.buttonSave :global(.vtex-button),\n.createButton :global(.vtex-button),\n.buttonUse :global(.vtex-button) {\n background: var(--serious-blue-dark);\n}\n\n```" } ]
code_b2cstoreqa.theme_0a5e2f3a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.minicart.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.drawer {\n z-index: 999;\n}\n\n.minicartIconContainer {\n color: var(--black-dark);\n}\n\n.closeIconContainer::before {\n content: \"My cart\";\n font-size: 24px;\n line-height: 32px;\n color: var(--black-dark);\n font-weight: 500;\n}\n\n.closeIconButton {\n margin-left: auto;\n padding: 12px 0px;\n}\n\n.closeIconContainer {\n background: var(--fresh-blue-lightest);\n align-items: center;\n padding: 0px 24px;\n}\n\n.minicartTitle {\n display: none;\n opacity: 0;\n}\n\n.openIconContainer {\n padding: 0;\n}\n\n.openIconContainer :global(.vtex-button) {\n border: none;\n border-radius: 0;\n outline: none;\n}\n\n.minicartQuantityBadge {\n background-color: var(--fresh-orange);\n font-weight: 700;\n}\n\n.minicartCheckoutButton {\n padding: 12px 16px 16px;\n margin: 0;\n}\n\n.minicartCheckoutButton :global(.vtex-button) {\n height: 52px;\n background: var(--fresh-orange);\n border-radius: 4px;\n border: none;\n font-weight: 700;\n font-size: 18px;\n line-height: 28px;\n outline: none;\n}\n\n@media (max-width: 64rem) {\n .openIconContainer {\n padding: 0;\n }\n\n .drawer {\n width: 100% !important;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_c19ab029
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.sku-list.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.skuContentWrapper {\n cursor: pointer;\n border-radius: 0;\n border-width: 0.0625rem;\n margin: 0 -0.5rem -0.0625rem;\n padding: 0.5rem 1rem;\n}\n\n.skuContentWrapper:focus {\n outline: none;\n}\n\n.skuContentWrapper:first-child {\n margin-top: -0.5rem;\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n}\n\n.skuContentWrapper:last-child {\n margin-bottom: -0.5rem;\n border-bottom-left-radius: 0.25rem;\n border-bottom-right-radius: 0.25rem;\n}\n\n.itemHighlight,\n.priceContainer,\n.inventoryContainer,\n.highlightContent {\n padding: 0;\n}\n\n```" } ]
code_b2cstoreqa.theme_800ba22f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.rich-text.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n/* BEGIN - Header */\n.container--HeaderStripeText {\n margin-right: 24px;\n}\n\n.container--HeaderStripeText .link {\n color: #fff;\n font-weight: 500;\n font-size: 14px;\n line-height: 20px;\n text-decoration: none;\n}\n\n.headingLevel2--menuTitle {\n font-size: 20px;\n line-height: 24px;\n font-weight: 500;\n color: #000;\n margin: 0;\n margin-bottom: 24px;\n}\n\n.container--menuTitle {\n margin-top: 38px;\n padding-top: 38px;\n border-top: 1px solid #dee7ef;\n}\n\n.headingLevel2--quickTitle {\n font-size: 20px;\n line-height: 28px;\n color: #000;\n font-weight: 500;\n margin: 0;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n}\n\n.headingLevel2--quickTitle::before {\n content: url(\"assets/icons/quickOrderIcon.svg\");\n display: block;\n margin-right: 10px;\n width: 22px;\n height: 22px;\n}\n\n.paragraph--quickText {\n font-size: 14px;\n line-height: 20px;\n margin: 0;\n color: #717786;\n}\n\n/* END - Header */\n/* BEGIN - Generic */\n\n.headingLevel3--sectionTitle,\n.headingLevel3--shopByCategoryTitle {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n color: #000000;\n margin: 0;\n margin-bottom: 16px;\n}\n\n.wrapper--alsoView,\n.wrapper--sectionTitle {\n width: 100%;\n}\n\n.headingLevel3--alsoView,\n.headingLevel3--sectionTitle {\n padding-bottom: 16px;\n border-bottom: 1px solid #e9eff5;\n}\n\n.headingLevel3--alsoView {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n color: #000000;\n margin: 0;\n margin-bottom: 16px;\n margin-top: 32px;\n}\n\n/* END - Generic */\n/* BEGIN - ShopByCategory */\n\n.wrapper--shopByCategory {\n width: 100%;\n height: 100%;\n}\n\n.paragraph--shopByCategory {\n margin: 0;\n height: 100%;\n}\n\n.link--shopByCategory {\n display: flex;\n flex-flow: column;\n align-items: center;\n text-decoration: none;\n height: 100%;\n justify-content: center;\n}\n\n.image--shopByCategory {\n display: block;\n margin-bottom: 24px;\n}\n\n.strong--shopByCategory {\n font-size: 18px;\n line-height: 24px;\n color: #000;\n font-weight: 400;\n}\n\n/* END - ShopByCategory */\n/* BEGIN - QuickViewTrigger */\n\n.container--quickviewTrigger .image {\n display: block;\n width: 20px;\n}\n\n/* END - QuickViewTrigger */\n/* BEGIN - BannerThird */\n\n.headingLevel4--bannerTitle {\n margin: 0;\n margin-bottom: 12px;\n font-size: 20px;\n line-height: 28px;\n font-weight: 500;\n color: #000;\n}\n\n.paragraph--bannerDesc {\n max-width: 388px;\n width: 100%;\n margin: 0px auto 16px;\n color: #717786;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.container--bannerTitle,\n.container--bannerDesc,\n.container--bannerLink {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.paragraph--bannerLink {\n margin: 0;\n}\n\n.link--bannerLink {\n width: 244px;\n height: 48px;\n background-color: #0067c7;\n border-radius: 4px;\n color: #fff;\n font-size: 14px;\n line-height: 48px;\n font-weight: 700;\n display: block;\n text-decoration: none;\n}\n\n/* END - BannerThird */\n/* BEGIN - Benefits Bar */\n\n.wrapper--benefitsItem .paragraph {\n display: flex;\n flex-flow: column nowrap;\n align-items: center;\n margin: 0;\n color: #717786;\n font-size: 14px;\n line-height: 20px;\n}\n\n.wrapper--benefitsItem .image {\n object-fit: contain;\n display: block;\n margin-bottom: 24px;\n width: 34px;\n height: 26px;\n}\n\n.wrapper--benefitsItem .strong {\n font-size: 18px;\n line-height: 24px;\n color: #000;\n font-weight: 500;\n display: block;\n margin: 0;\n margin-bottom: 8px;\n}\n/* END - Benefits Bar */\n/* BEGIN - Footer */\n\n.paragraph--footerStripe {\n font-size: 12px;\n line-height: 18px;\n color: rgba(225, 239, 255, 0.5);\n margin: 0;\n padding: 32px 0px;\n}\n\n.paragraph--footerTitle {\n margin: 0;\n color: #e1efff;\n margin-bottom: 16px;\n font-size: 18px;\n line-height: 24px;\n font-weight: 500;\n}\n\n.paragraph--mailTo,\n.paragraph--callTo {\n text-transform: uppercase;\n color: #fff;\n font-size: 14px;\n line-height: 24px;\n font-weight: 700;\n text-decoration: none;\n margin: 0;\n}\n\n.paragraph--footerText {\n margin: 0;\n color: #e1efff;\n font-size: 12px;\n line-height: 16px;\n font-weight: 500;\n text-align: left;\n}\n\n.paragraph--footerRights {\n font-size: 14px;\n line-height: 24px;\n color: #fff;\n}\n\n.paragraph--followTitle {\n margin: 0;\n margin-bottom: 16px;\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.5);\n}\n\n/* END - Footer */\n/* BEGIN - Trending Shelf */\n\n.heading--trending-title {\n font-size: 24px;\n line-height: 32px;\n color: #000;\n margin: 0;\n}\n\n/* END - Trending Shelf */\n/* BEGIN - Popular Shelf */\n\n.headingLevel3--popularTitle {\n font-size: 24px;\n line-height: 32px;\n color: #000;\n font-weight: 500;\n margin: 0;\n margin-bottom: 16px;\n}\n\n/* END - Popular Shelf */\n/* BEGIN - QuickOrder */\n\n.headingLevel3--titleQuickorder {\n margin-left: 0.5rem;\n}\n\n/* END - QuickOrder */\n/* BEGIN - Search Page */\n\n.paragraph--SEOText {\n font-size: 14px;\n line-height: 18px;\n color: #717786;\n margin: 0;\n margin-bottom: 24px;\n}\n\n.paragraph--textCategorySlider {\n font-size: 14px;\n line-height: 20px;\n color: #717786;\n margin: 0;\n}\n\n.paragraph--blogSEO {\n max-height: 400px;\n overflow: auto scroll;\n padding: 0;\n margin: 0;\n font-size: 14px;\n line-height: 20px;\n color: #717786;\n}\n\n.heading--blogTitle {\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n margin: 0;\n margin-bottom: 8px;\n color: #000;\n}\n\n.paragraph--blogDescription {\n font-size: 14px;\n line-height: 18px;\n color: #717786;\n margin: 0;\n margin-bottom: 24px;\n}\n\n/* END - Search Page */\n\n@media (max-width: 64rem) {\n .paragraph--blogSEO {\n width: 100%;\n max-width: 100%;\n margin: 0;\n padding: 0;\n max-height: initial;\n margin-bottom: 40px;\n }\n\n .headingLevel3--blogSecondarySEO {\n font-size: 18px;\n line-height: 28px;\n color: #000;\n margin: 0;\n margin-bottom: 40px;\n }\n\n .wrapper--shopByCategoryTitle {\n margin: 0px auto;\n }\n\n .headingLevel3--sectionTitle {\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .link--sectionLink {\n text-decoration: none;\n font-size: 14px;\n line-height: 24px;\n color: var(--fresh-blue);\n display: flex;\n align-items: center;\n }\n\n .link--sectionLink::after {\n content: url(\"assets/icons/chevronRight.svg\");\n display: block;\n margin-left: 8px;\n height: 21px;\n }\n\n .headingLevel4--bannerTitle {\n max-width: 250px;\n width: 100%;\n margin: 0px auto 12px;\n font-size: 20px;\n line-height: 28px;\n font-weight: 500;\n }\n\n .paragraph--bannerDesc {\n font-size: 14px;\n line-height: 20px;\n }\n\n .link--bannerLink {\n height: 40px;\n line-height: 40px;\n }\n\n .headingLevel3--titleWithBorder {\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n color: #000;\n margin: 0;\n margin-bottom: 16px;\n padding-bottom: 16px;\n border-bottom: 1px solid #e9eff5;\n text-align: center;\n }\n\n .wrapper--titleWithBorder {\n width: 100%;\n }\n\n .paragraph--benefitsItem {\n text-align: center;\n font-size: 12px;\n line-height: 16px;\n }\n\n .strong--benefitsItem {\n font-size: 16px;\n line-height: 24px;\n }\n\n .container--paymentLabel {\n justify-content: center;\n }\n\n .paragraph--paymentLabel {\n margin: 0;\n font-size: 12px;\n line-height: 16px;\n margin-bottom: 12px;\n color: rgba(255, 255, 255, 0.5);\n }\n\n .paragraph--footerStripe {\n text-align: center;\n padding: 0px;\n margin-bottom: 24px;\n }\n\n .container--copyright {\n justify-content: center;\n }\n\n .paragraph--copyright {\n margin: 0;\n margin-bottom: 8px;\n font-size: 12px;\n line-height: 16px;\n font-weight: 500;\n color: #fff;\n }\n\n .link--HeaderStripeText {\n white-space: nowrap;\n }\n\n .paragraph--HeaderStripeText,\n .container--HeaderStripeText {\n margin: 0;\n }\n\n .paragraph--SEOText {\n font-size: 12px;\n line-height: 16px;\n }\n\n .headingLevel2--quickOrderButtonTitle {\n font-size: 16px;\n line-height: 24px;\n color: #000;\n margin: 0;\n margin-bottom: 4px;\n }\n\n .paragraph--quickOrderButtonText {\n font-size: 14px;\n line-height: 18px;\n color: #717786;\n margin: 0;\n max-width: 240px;\n }\n\n .wrapper--quickOrderTitlePageMobile {\n width: 100%;\n }\n\n .headingLevel1--quickOrderTitlePageMobile {\n font-size: 24px;\n line-height: 32px;\n margin: 0;\n color: #000;\n padding-bottom: 16px;\n margin-bottom: 24px;\n border-bottom: 1px solid #e9eff5;\n }\n}\n\n.paragraph--disclosure-trigger-heading {\n color: #000000;\n font-weight: 500;\n font-size: 20px;\n line-height: 24px;\n margin: 0;\n padding: 0;\n}\n\n.paragraph--skuList {\n margin: 0;\n line-height: 1.5;\n}\n\n.paragraph--modal-trigger-shipping-availability {\n cursor: pointer;\n}\n\n.paragraph--modal-trigger-shipping-availability:hover {\n text-decoration: underline;\n}\n\n/* Reset Spacing */\n\n.container--reset-spacing,\n.container--reset-spacing :not(:global(.vtex-fake)) {\n margin: 0;\n padding: 0;\n}\n\n.container--black-medium {\n color: var(--black-medium);\n}\n\n.container--fw5 {\n font-weight: 500;\n}\n\n.container--newsletter-title,\n.wrapper--newsletter-title {\n width: 100%;\n}\n\n.container--newsletter-title .heading {\n color: #fff;\n font-size: 2rem;\n font-weight: 500;\n line-height: 1.25;\n margin-right: auto;\n}\n\n@media (max-width: 64rem) {\n .container--newsletter-title .heading {\n font-size: 1.25rem;\n line-height: 1.4;\n margin-bottom: 0.75rem;\n text-align: center;\n }\n}\n\n.paragraph--form-section-title {\n margin: 0;\n margin-bottom: 0.5rem;\n}\n\n.paragraph--product-price-message,\n.paragraph--product-summary-price-message {\n text-align: center;\n color: var(--black-medium);\n font-weight: 500;\n margin: 0;\n padding: 0;\n}\n\n.paragraph--product-summary-price-message {\n font-size: 0.75rem;\n line-height: 1.5;\n}\n\n.container--product-price-message,\n.container--product-summary-price-message {\n border: 1px solid var(--lines-dark);\n border-radius: 0.25rem;\n padding: 1rem;\n}\n\n.container--product-summary-price-message {\n margin-bottom: 0.5rem;\n padding: 0.5rem;\n}\n\n.wrapper--product-price-message,\n.wrapper--product-summary-price-message {\n width: 100%;\n}\n\n```" } ]
code_b2cstoreqa.theme_d8f504d1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-icons.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.caretIcon--fresh-blue {\n color: var(--fresh-blue);\n}\n\n.caretIcon--lines-darker {\n color: var(--lines-darker);\n}\n\n```" } ]
code_b2cstoreqa.theme_4d34d940
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.login.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container :global(.vtex-button) {\n border: 1px solid var(--fresh-blue-dark);\n border-radius: 4px;\n min-height: 3rem;\n}\n\n.container :global(.vtex-button__label) {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.label {\n display: block;\n color: var(--fresh-blue);\n text-transform: initial;\n font-size: 16px;\n line-height: 24px;\n padding-left: 0;\n}\n\n.profile {\n color: inherit;\n}\n\n.sendButton :global(.vtex-button) {\n background: #214d8e;\n border: none;\n}\n\n@media (max-width: 64rem) {\n .profile {\n display: block;\n }\n\n .label {\n font-size: 14px;\n line-height: 32px;\n font-weight: 500;\n }\n}\n\n.buttonLink :global(.vtex-button) {\n border-color: var(--fresh-blue-dark);\n min-height: 2rem;\n}\n\n.buttonLink :global(.vtex-button__label) {\n padding-left: 1.25rem;\n padding-right: 1rem;\n}\n\n```" } ]
code_b2cstoreqa.theme_ba676428
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-summary.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--summaryComplete {\n position: relative;\n max-width: 240px;\n border: 1px solid transparent;\n border-radius: 8px;\n padding: 20px;\n transition: all 0.3s ease;\n}\n\n.containerNormal--minimumSummary {\n padding: 0 0.5rem;\n}\n\n.container--summaryComplete:hover {\n border-color: #dee7ef;\n}\n\n.container--summaryComplete:hover\n :global(.vtex-product-comparison-0-x-productSelectorContainer),\n.container--summaryComplete:hover .buyButtonContainer,\n.container--summaryComplete:hover\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button),\n.container--summaryComplete:hover\n :global(.vtex-wish-list-1-x-wishlistIconContainer),\n.container--summaryComplete:hover\n :global(.vtex-modal-layout-0-x-triggerContainer) {\n opacity: 1;\n}\n\n.container--summaryComplete\n :global(.vtex-store-components-3-x-installmentsPrice) {\n display: none;\n}\n\n.container--summaryComplete .buyButton :global(.vtex-button),\n.container--summaryComplete\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button)\n :global(.vtex-button) {\n border: none;\n background-color: var(--fresh-orange);\n height: 48px;\n border-radius: 4px;\n}\n\n.priceContainer {\n align-items: flex-start;\n}\n\n.nameWrapper,\n.price_sellingPriceContainer,\n.price_listPriceContainer {\n text-align: left;\n padding-bottom: 0;\n margin-bottom: 4px;\n}\n\n.price_sellingPriceLabel,\n.element--minimumSummary .price_listPriceContainer,\n.element--minimumSummary .price_installmentContainer {\n display: none;\n overflow: 0;\n visibility: hidden;\n}\n\n.container--summaryComplete .price_listPrice,\n.container--summaryComplete .price_sellingPrice {\n padding: 0;\n}\n\n.container--summaryComplete .productBrandContainer {\n font-size: 14px;\n color: #0067c7;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n}\n\n.container--summaryComplete .nameContainer {\n padding: 0;\n}\n\n.container--summaryComplete .productNameContainer {\n text-align: left;\n font-size: 16px;\n line-height: 22px;\n color: #000;\n width: 100%;\n margin-bottom: 16px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.container--summaryComplete .buyButtonContainer,\n.container--summaryComplete\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button) {\n margin-top: auto;\n margin-bottom: 16px;\n padding: 0;\n}\n\n.container--summaryComplete .image {\n margin-bottom: 16px;\n width: 196px;\n height: 196px;\n object-fit: contain;\n}\n\n.element--summaryComplete {\n padding: 0;\n}\n\n.element--summaryComplete .priceContainer {\n align-items: flex-start;\n padding: 0;\n}\n\n.element--summaryComplete .buyButtonContainer,\n.element--summaryComplete\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button) {\n opacity: 0;\n transition: all 0.3s ease;\n}\n\n.element--summaryComplete .productPriceClass {\n flex-flow: column-reverse;\n}\n\n.element--summaryComplete .listPriceLabel,\n.element--summaryComplete .sellingPriceLabel {\n display: none;\n}\n\n.element--summaryComplete .listPriceValue .currencyContainer {\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n color: #717786;\n}\n\n.currencyCode {\n margin-right: 4px;\n}\n\n/* BEGIN - Trending Shelg */\n\n.column--summaryCol {\n flex-flow: column nowrap;\n align-items: flex-start;\n}\n\n.element--trendingSummary\n :global(.vtex-reviews-and-ratings-1-x-inlineContainer) {\n margin: 0;\n}\n\n.element--trendingSummary :global(.vtex-flex-layout-0-x-flexRowContent) {\n align-items: center;\n}\n\n.element--trendingSummary .imageStackContainer {\n margin-right: 24px;\n}\n\n.container--trendingSummary {\n max-width: 100% !important;\n width: 100%;\n background: #fff;\n border-radius: 8px;\n padding: 16px 24px;\n border: 1px solid transparent;\n transition: all 0.3s ease;\n}\n\n.container--trendingSummary:hover {\n border: 1px solid var(--fresh-blue);\n box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.1);\n}\n\n.element--trendingSummary {\n justify-content: center;\n padding: 0;\n}\n\n.element--trendingSummary .price_installmentContainer,\n.element--trendingSummary .listPriceContainer {\n display: none;\n}\n\n.element--trendingSummary .image {\n width: 96px !important;\n height: 96px;\n object-fit: cover;\n}\n\n.element--trendingSummary .nameContainer {\n padding: 0;\n margin-bottom: 8px;\n}\n\n.element--trendingSummary .productBrand {\n font-weight: 700;\n text-align: left;\n color: #000;\n font-size: 16px;\n line-height: 22px;\n}\n\n.element--trendingSummary .price_sellingPrice,\n.element--trendingSummary .price_sellingPriceContainer,\n.element--trendingSummary .priceContainer {\n padding: 0;\n}\n\n/* END - Trending Shelg */\n/* BEGIN - Popular Shelf */\n\n.container--minimumSummary .image {\n width: 192px;\n height: 192px;\n object-fit: contain;\n}\n\n/* END - Popular Shelf */\n\n.column--drawer-summary-col2 {\n align-items: flex-start;\n}\n\n.element--comparison-page-summary .buyButton :global(.vtex-button),\n.element--comparison-page-summary\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button)\n :global(.vtex-button) {\n border: none;\n height: 48px;\n background: var(--fresh-orange);\n}\n\n.element--comparison-page-summary .sellingPrice,\n.element--comparison-page-summary .buyButtonContainer,\n.element--comparison-page-summary\n :global(.vtex-flex-layout-0-x-flexRow--product-summary-buy-button) {\n padding: 0;\n}\n\n/* BEGIN - Search Bar Summary */\n\n.element--summarySearch .imageContainer {\n margin-bottom: 8px;\n width: auto;\n margin-right: auto;\n margin-left: initial;\n}\n\n.element--summarySearch .productBrandContainer {\n text-align: left;\n}\n\n.element--summarySearch .productBrandContainer .productBrandName {\n font-size: 14px;\n color: #0067c7;\n font-weight: 500;\n line-height: 20px;\n margin-bottom: 4px;\n}\n\n.element--summarySearch .nameContainer {\n padding: 0;\n justify-content: flex-start;\n}\n\n.element--summarySearch .nameContainer .productBrand {\n font-size: 12px;\n line-height: 18px;\n color: #000;\n}\n\n/* END - Search Bar Summary */\n\n@media (max-width: 64rem) {\n .container--summaryComplete {\n padding: 8px;\n }\n\n .container--summaryComplete {\n min-width: 144px !important;\n max-width: 100% !important;\n }\n\n .element--minimumSummary\n :global(.vtex-reviews-and-ratings-1-x-inlineContainer) {\n margin: 0;\n }\n\n .element--minimumSummary .priceContainer {\n align-items: flex-start;\n }\n\n .element--summaryComplete .price_sellingPrice {\n font-size: 20px;\n color: #000;\n line-height: 24px;\n font-weight: 500;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_2754e702
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.location-availability.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.shippingHeader--desktop {\n display: none;\n font-size: 16px;\n font-weight: 500;\n color: black;\n}\n\n.shippingListItem--desktop {\n display: none;\n}\n\n.shippingListItem--desktop:first-child {\n display: block;\n}\n\n.shippingListEmptyMessage,\n.shippingDeliveryName--desktop,\n.shippingListItem--desktop {\n font-size: 14px;\n color: black;\n}\n\n```" } ]
code_b2cstoreqa.theme_947bd447
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.modal-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.triggerContainer--quickviewTrigger {\n background: #f3f9fe;\n position: absolute;\n width: 38px;\n height: 38px;\n border-radius: 50%;\n top: 76px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: all 0.3s ease;\n outline: none;\n}\n\n.paper--quickviewContainer {\n padding: 32px;\n overflow: visible;\n}\n\n.paper--quickviewContainer\n :global(.vtex-store-components-3-x-carouselGaleryThumbs) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n.paper--quickviewContainer\n :global(.vtex-store-components-3-x-productImagesContainer),\n.paper--quickviewContainer\n :global(.vtex-store-components-3-x-carouselContainer) {\n width: auto;\n}\n\n.paper--quickviewContainer\n :global(.vtex-store-components-3-x-carouselGaleryCursor) {\n margin-left: initial !important;\n width: initial !important;\n}\n\n.paper--quickviewContainer\n :global(.vtex-store-components-3-x-productImagesContainer--desktop)::after {\n content: none;\n}\n\n.paper--quickviewContainer :global(.vtex-flex-layout-0-x-flexCol--right-col) {\n margin-right: 24px;\n}\n\n.paper--quickviewContainer .closeButton {\n width: 32px;\n height: 32px !important;\n display: block;\n position: absolute;\n top: -12px;\n right: -12px;\n min-height: initial;\n border-radius: 50%;\n background: #dee7ef;\n border: none;\n outline: none;\n}\n\n.paper--quickviewContainer .closeButtonLabel {\n display: none;\n}\n\n.paper--quickviewContainer .closeButton::before {\n content: url(\"assets/icons/closeQuickviewIcon.svg\");\n display: block;\n}\n\n/* Shipping Availability */\n\n.headerContainer--shipping-availability {\n align-items: center;\n border-bottom: 1px solid var(--lines-light);\n position: relative;\n padding: 0.5rem 1rem;\n}\n\n.closeButtonContainer--shipping-availability {\n align-items: center;\n background-color: var(--lines-light);\n border-radius: 999px;\n display: flex;\n height: 2rem;\n justify-content: center;\n top: 1rem;\n right: 1rem;\n width: 2rem;\n}\n\n@media (min-width: 64rem) {\n .paper--shipping-availability {\n overflow: visible;\n }\n .headerContainer--shipping-availability {\n border: none;\n height: 0;\n padding: 0;\n }\n .headerContent--shipping-availability {\n display: none;\n }\n .closeButtonContainer--shipping-availability {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n }\n}\n\n.closeButton--shipping-availability {\n padding: 0;\n font-style: 0;\n line-height: 0;\n}\n\n.closeIcon--shipping-availability {\n height: 1.25rem;\n width: 1.25rem;\n}\n\n```" } ]
code_b2cstoreqa.theme_cf88924d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.sticky-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--headerMobile {\n background: var(--bg-header);\n z-index: 999;\n}\n\n.wrapper--box--stuck .container--box {\n left: 50%;\n transform: translateX(-50%);\n width: 0;\n margin-left: 354px;\n z-index: 997;\n}\n\n.container--sticky-buy {\n background: #fff;\n padding: 8px 0px;\n}\n\n.wrapper--sticky-buy {\n height: 0 !important;\n z-index: 999;\n}\n\n.container--sticky-buy :global(.vtex-button) {\n height: 48px;\n background: var(--serious-orange);\n border: none;\n}\n\n```" } ]
code_b2cstoreqa.theme_8c7cc968
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-components.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n max-width: 1440px;\n width: 100%;\n padding: 0px 32px;\n margin: 0px auto;\n}\n\n.logoLink {\n display: block;\n transform: none !important;\n}\n\n.logoImage {\n display: block;\n height: 28px;\n width: auto;\n}\n\n.searchBarContainer :global(.vtex-input-prefix__group) {\n height: 48px;\n}\n\n.imageElement--vtexLogo {\n max-width: 67px;\n object-fit: contain;\n margin-right: 16px;\n}\n\n.newsletter {\n max-width: 100%;\n margin: 0;\n height: 104px;\n display: flex;\n align-items: center;\n background: var(--bg-header);\n}\n\n.newsletter .container {\n padding: 0px 32px;\n}\n\n.productImageTag--sellersPage--main {\n max-width: 168px;\n}\n\n.newsletter .form {\n display: flex;\n align-items: center;\n max-width: 100%;\n}\n\n.newsletter .form .label {\n font-size: 32px;\n line-height: 40px;\n font-weight: 500;\n margin-right: auto;\n color: #fff;\n}\n\n.newsletter .inputGroup {\n max-width: 680px;\n width: 100%;\n padding: 0;\n position: relative;\n}\n\n.newsletter :global(.vtex-input-prefix__group) {\n height: initial;\n border: none;\n}\n\n.newsletter :global(.vtex-styleguide-9-x-input) {\n height: 56px;\n background: #fff;\n font-size: 20px;\n line-height: 24px;\n color: var(--black-medium);\n}\n\n.newsletter :global(.vtex-styleguide-9-x-input)::placeholder {\n color: var(--black-medium);\n font-size: 20px;\n line-height: 24px;\n}\n\n.newsletter .buttonContainer {\n position: absolute;\n right: 24px;\n top: 8px;\n}\n\n.newsletter .buttonContainer :global(.vtex-button) {\n color: var(--fresh-blue);\n font-size: 16px;\n line-height: 24px;\n font-weight: bold;\n outline: none;\n border: none;\n background: none;\n}\n\n.newsletter .buttonContainer :global(.vtex-button__label) {\n padding: 0;\n}\n\n.imageElement--bannerThird {\n margin-bottom: 24px;\n}\n\n.logoContainer {\n display: block;\n padding: 0;\n}\n\n.imageElement--quickviewTrigger {\n width: 20px;\n height: 14px;\n object-fit: contain;\n}\n\n.searchBarContainer {\n width: 100%;\n max-width: 856px;\n}\n\n.searchBarContainer :global(.vtex-styleguide-9-x-input) {\n max-width: 100%;\n width: 100%;\n}\n\n.searchBarContainer :global(.vtex-input__suffix) {\n border-radius: 0px;\n}\n\n.imageElement--paymentImage {\n width: 100%;\n object-fit: contain;\n max-height: 18px;\n}\n\n.imageElement--networkImage {\n display: block;\n}\n\n.imageElement--shoByImage {\n width: 80px;\n height: auto;\n object-fit: contain;\n max-height: 80px;\n max-width: 80px;\n margin-bottom: 16px;\n}\n\n.imageElement--imageCategorySlider {\n border: 1px solid #dee7ef;\n padding: 16px;\n border-radius: 50%;\n margin-bottom: 12px;\n}\n\n.imageElement--blogImage {\n display: block;\n margin-bottom: 16px;\n}\n\n.imageElement--benefitImage {\n margin: 0px auto 24px;\n width: 32px;\n height: 34px;\n object-fit: contain;\n}\n\n.userAddressContainer {\n height: 100%;\n background: none;\n padding: 0;\n margin-right: 60px;\n}\n\n.userAddressContainer .container {\n padding: 0;\n}\n\n@media (max-width: 64rem) {\n .imageElement--blogImage {\n width: 100%;\n }\n\n .container {\n padding: 0px 16px;\n }\n\n .imageElement--homeSlider {\n max-height: 384px !important;\n object-fit: cover;\n }\n\n .newsletter {\n height: 136px;\n }\n\n .newsletter .container {\n padding: 0;\n }\n\n .newsletter .form {\n flex-flow: column nowrap;\n }\n\n .newsletter .form .label {\n font-size: 20px;\n line-height: 28px;\n margin-bottom: 12px;\n width: 100%;\n text-align: center;\n }\n\n .newsletter .buttonContainer :global(.vtex-button) {\n font-size: 14px;\n }\n\n .newsletter :global(.vtex-styleguide-9-x-input)::placeholder,\n .newsletter :global(.vtex-styleguide-9-x-input) {\n font-size: 18px;\n line-height: 20px;\n }\n\n .imageElement--paymentImage {\n margin: 0px auto;\n }\n\n .searchBarInnerContainer--searchMobile :global(.vtex-input-prefix__group) {\n border: none;\n }\n\n .searchBarInnerContainer--searchMobile :global(.vtex-styleguide-9-x-input) {\n max-width: 100%;\n }\n\n .searchIcon--searchMobile {\n display: none;\n }\n\n .searchBarIcon--searchMobile:not(.searchBarIcon--searchMobile--clear) {\n background: url(\"assets/icons/searchMobile.svg\");\n width: 18px;\n height: 18px;\n display: block;\n background-repeat: no-repeat;\n background-size: contain;\n }\n\n .imageElement--singleBanner {\n width: 100%;\n object-fit: cover;\n }\n\n .logoLink {\n display: flex !important;\n align-items: center;\n }\n\n .logoImage {\n display: block;\n width: 123px;\n height: 24px;\n }\n\n .suffixWrapper--searchMobile {\n align-items: center;\n }\n\n .searchBarContainer {\n padding: 0;\n }\n\n .imageElement--networkImage {\n display: block;\n }\n\n .resultsList--searchMobile {\n height: 100%;\n max-height: 100%;\n padding: 0px 16px;\n }\n\n .resultsItem--searchMobile {\n color: #717786;\n }\n\n .resultsItemName--searchMobile,\n .searchTerm--searchMobile {\n color: #000 !important;\n }\n\n .productImagesContainer--sellersPage {\n height: 106px !important;\n overflow: hidden;\n width: 106px !important;\n margin-right: 24px;\n }\n\n .productImageTag--sellersPage--main {\n max-height: 106px;\n object-fit: contain;\n }\n}\n\n/* Product Images */\n\n.productImagesContainer--desktop,\n.carouselContainer--desktop {\n width: 564px;\n}\n\n.carouselGaleryThumbs--desktop {\n max-width: 100px;\n}\n\n.productImagesThumb--desktop,\n.productImagesThumb--desktop :not(:global(.vtex-fake)) {\n border-radius: 4px;\n overflow: hidden;\n}\n\n.productImagesThumbActive--desktop .carouselThumbBorder--desktop {\n border: 1px solid #0067c7;\n}\n\n.carouselContainer--desktop .carouselGaleryCursor,\n.productImagesGallerySwiperContainer--desktop,\n.productImagesGallerySlide--desktop,\n.productImage--desktop,\n.productImageTag--desktop {\n height: 448px !important;\n width: 448px !important;\n}\n\n.carouselContainer--desktop .carouselGaleryCursor {\n margin-left: 100px;\n width: 464px !important;\n}\n\n.productImagesContainer--desktop {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.productImagesContainer--desktop::after {\n display: block;\n color: #717786;\n content: \"Roll over image to zoom in\";\n padding-top: 20px;\n padding-left: 116px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n}\n\n.productImageTag--desktop--zoom {\n display: none;\n}\n\n/* Product Brand */\n\n.productBrandContainer {\n font-size: 14px;\n line-height: 16px;\n color: #0067c7;\n}\n\n/* Product Name */\n\n.productNameContainer--product-page {\n color: var(--serious-black);\n font-size: 24px;\n font-weight: 500;\n line-height: 28px;\n}\n\n.productNameContainer--minicart {\n color: var(--black-dark);\n font-size: 14px;\n line-height: 18px;\n}\n\n/* Sku Selector */\n\n.skuSelectorContainer--desktop .skuSelectorSubcontainer {\n margin-bottom: 20px;\n}\n\n.skuSelectorContainer--desktop .skuSelectorNameContainer {\n margin: 0;\n}\n\n.skuSelectorContainer--desktop .skuSelectorName,\n.skuSelectorContainer--desktop .skuSelectorNameSeparator,\n.skuSelectorContainer--desktop .skuSelectorSelectorImageValue {\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n color: #717786;\n}\n\n.skuSelectorContainer--desktop .skuSelectorSelectorImageValue {\n color: #000000;\n}\n\n.skuSelectorContainer--desktop .skuSelectorTextContainer {\n margin-bottom: 8px;\n}\n\n.skuSelectorContainer--desktop .skuSelectorOptionsList {\n margin: 0;\n}\n\n.skuSelectorContainer--desktop .skuSelectorItem.skuSelectorItemImage {\n height: 48px;\n width: 48px;\n}\n\n.skuSelectorContainer--desktop .skuSelectorItem {\n height: 40px;\n}\n\n/* Round SKU Selector */\n\n.skuSelectorContainer--color-round .frameAround {\n border: 1px solid #bdc9d6;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n}\n\n.skuSelectorContainer--color-round .skuSelectorItem--selected .frameAround {\n box-shadow: 0 0 0 4px #f3f9ff;\n border-color: #0067c7;\n}\n\n.skuSelectorContainer--color-round .skuSelectorInternalBox {\n border: none;\n}\n\n.skuSelectorContainer--color-round\n .skuSelectorSubcontainer--cor\n .skuSelectorOptionsList\n :not(:global(.vtex-fake)) {\n border-radius: 9999px;\n}\n\n.productImagesContainer--fake-summary {\n pointer-events: none !important;\n}\n\n.productImagesContainer--fake-summary :not(:global(.vtex-fake)) {\n display: block;\n float: left;\n overflow: hidden;\n width: 100%;\n height: 100%;\n}\n\n.productImagesContainer--fake-summary,\n.productImageTag--fake-summary {\n height: 96px !important;\n overflow: hidden;\n width: 96px !important;\n}\n\n.productImagesGallerySwiperContainer--fake-summary .swiper-pagination,\n.swiperCaret--fake-summary,\n.carouselGaleryThumbs--fake-summary {\n display: none !important;\n}\n\n.carouselContainer--fake-summary .carouselGaleryCursor {\n padding: 0;\n margin: 0;\n width: 100%;\n}\n\n.productNameContainer--fake-summary {\n font-size: 14px;\n line-height: 16px;\n}\n\n.productSKUAttributesContainer--inline {\n color: #717786;\n font-size: 14px;\n line-height: 16px;\n}\n\n.attributeLine--inline,\n.attributeName--inline {\n color: inherit;\n display: inline;\n font-weight: inherit;\n font-size: inherit;\n margin: 0;\n padding: 0;\n}\n\n.attributeName--inline::after {\n content: \" \";\n}\n\n.attributeLine--inline::after {\n content: \", \";\n}\n\n.attributeLine--inline:last-child::after {\n content: \"\";\n}\n\n/* Product Description */\n\n@media (min-width: 64rem) {\n .productDescriptionContainer--desktop {\n max-width: 300px;\n }\n}\n\n.productDescriptionText {\n font-size: 14px;\n line-height: 1.25;\n color: var(--black-medium);\n}\n\n.productDescriptionTitle {\n display: none;\n}\n\n.productDescriptionTitle--desktop {\n display: block;\n font-weight: 500;\n font-size: 24px;\n line-height: 32px;\n color: var(--black-dark);\n margin-bottom: 24px;\n}\n\n/* Product Images Gallery */\n\n.productImagesGallerySwiperContainer--gallery {\n margin: 0;\n padding: 0;\n}\n\n@media (min-width: 64rem) {\n .productImagesGallerySwiperContainer--gallery {\n height: 464px;\n width: 664px;\n }\n}\n\n.carouselGaleryThumbs--gallery {\n display: none;\n}\n\n.productImagesGallerySlide--gallery {\n margin: 0;\n margin-bottom: 16px;\n}\n\n@media (min-width: 64rem) {\n .productImagesGallerySlide--gallery {\n height: 224px;\n width: 50% !important;\n max-width: 324px;\n }\n}\n\n.productImagesGallerySwiperContainer--gallery :not(:global(.vtex-fake)) {\n flex-wrap: wrap;\n justify-content: space-between;\n transform: translate3d(0, 0px, 0px) !important; /* Disables swiping */\n}\n\n.productImageTag--gallery {\n border-radius: 4px;\n}\n\n/* Dots Around */\n\n.productImagesGallerySlide--dots-around {\n padding-bottom: 32px;\n}\n\n.productImagesContainer--dots-around .swiper-pagination {\n bottom: 0;\n}\n\n.productImagesContainer--dots-around .swiperBullet {\n background-color: var(--lines-dark);\n opacity: 1;\n}\n\n.productImagesContainer--dots-around .swiperBullet--active {\n background-color: var(--serious-blue-dark);\n}\n\n/* Shipping Simulator */\n\n.shippingContainer\n :not(:global(.vtex-address-form__postalCode)):not(:global(.vtex-input)):not(:global(.vtex-input-prefix__group)):not(:global(.vtex-address-form-4-x-input)):not(:global(.vtex-button)):not(:global(.vtex-button__label)) {\n display: none;\n}\n\n.shippingContainer {\n display: flex;\n}\n\n@media (min-width: 40rem) {\n .shippingContainer {\n width: 18rem;\n }\n}\n\n.shippingContainer :global(.vtex-address-form__postalCode),\n.shippingContainer :global(.vtex-button) {\n flex: 1 1 auto;\n}\n\n.shippingContainer :global(.vtex-address-form__postalCode) {\n width: 100%;\n}\n\n.shippingContainer :global(.vtex-input-prefix__group) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: none;\n border-width: 0.0625rem;\n height: 2.75rem;\n}\n\n.shippingContainer :global(.vtex-address-form-4-x-input) {\n color: var(--black-dark);\n}\n\n.shippingContainer :global(.vtex-button) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-left: none;\n color: var(--fresh-blue-dark);\n width: auto;\n}\n\n.shippingContainer :global(.vtex-button):focus {\n outline: none;\n}\n\n.shippingContainer :global(.vtex-button):disabled {\n color: var(--lines-light);\n}\n\n.shippingContainer :global(.vtex-input-prefix__group),\n.shippingContainer :global(.vtex-button) {\n border-width: 0.0625rem;\n border-color: var(--lines-light);\n background-color: #fff;\n}\n\n.shippingContainer :global(.vtex-button__label) {\n color: inherit;\n font-size: 0;\n}\n\n.shippingContainer :global(.vtex-button__label)::before {\n content: \"OK\";\n font-size: 0.875rem;\n}\n\n.shippingTable,\n.shippingTableBody,\n.shippingTableRow {\n border: none;\n}\n\n.shippingTable {\n margin: 0;\n margin-top: 1rem;\n padding: 0;\n}\n\n.shippingTableCell {\n padding: 16px;\n}\n\n.shippingTableCellDeliveryName {\n background-color: #f3f9ff;\n padding-top: 32px;\n padding-bottom: 32px;\n height: 92px;\n width: 0px;\n padding-left: 0;\n padding-right: 0;\n}\n\n.shippingTableCellDeliveryEstimate {\n border-left: none;\n}\n\n.shippingTableRow {\n background-color: #fff;\n border: 1px solid #dee7ef;\n border-radius: 0.25rem;\n display: flex;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.shippingTableRow:last-child {\n margin-bottom: 0;\n}\n\n.shippingTableLabel {\n white-space: pre;\n font-weight: 500;\n color: #000;\n position: relative;\n padding-left: 16px;\n}\n\n.shippingTableRadioBtn {\n display: none;\n margin-right: 36px;\n margin-left: 4px;\n top: 8px;\n position: relative;\n}\n\n.shippingTableCellDeliveryPrice {\n font-weight: 500;\n padding-left: 0;\n padding-right: 16px;\n text-align: right;\n width: 100%;\n}\n\n.shippingTableCellDeliveryEstimate,\n.shippingTableCellDeliveryPrice {\n white-space: pre;\n}\n\n.shippingTableCellDeliveryEstimate::before,\n.shippingTableCellDeliveryPrice::after {\n content: \"\\a\";\n display: block;\n}\n\n.shippingNoMessage {\n color: var(--black-medium);\n text-align: center;\n}\n\n```" } ]
code_b2cstoreqa.theme_11d67284
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.wish-list.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.wishlistIconContainer {\n position: absolute;\n width: 38px;\n height: 38px;\n display: block;\n border-radius: 50%;\n background: #f3f9fe;\n transition: all .3s ease;\n opacity: 0;\n text-align: center;\n}\n\n.wishlistIconContainer :global(.vtex-button):hover,\n.wishlistIconContainer :global(.vtex-button){\n outline: none;\n background: none;\n}\n\n.wishlistIconContainer :global(.vtex-button__label){\n padding: 0;\n}\n\n.wishlistIcon.outline {\n background: url(\"assets/icons/heartIcon.svg\");\n background-repeat: no-repeat;\n background-size: contain;\n width: 19px;\n height: 15px;\n}\n\n.wishlistIcon.fill {\n background: url(\"assets/icons/heartFilled.svg\");\n background-repeat: no-repeat;\n background-size: contain;\n width: 19px;\n height: 15px;\n}\n```" } ]
code_b2cstoreqa.theme_5f7afb03
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.wordpress-integration.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.categoryBlockTitle,\n.categoryBlockLink {\n display: none;\n}\n\n.categoryBlockContainer,\n.categoryBlockFlex {\n margin: 0;\n padding: 0;\n}\n\n.categoryBlockFlex {\n margin-left: -1rem;\n margin-right: -1rem;\n}\n\n.categoryBlockFlexItem {\n margin: 0;\n padding-left: 1rem;\n padding-right: 1rem;\n width: 50%;\n}\n\n.categoryBlockFlexItem:first-child {\n width: 100%;\n}\n\n@media (min-width: 64em) {\n .categoryBlockFlexItem,\n .categoryBlockFlexItem:first-child {\n width: 25%;\n }\n}\n\n.categoryBlockFlexItem :global(.vtex-card) {\n box-shadow: none !important;\n}\n\n.teaserImage {\n border-radius: 0.25rem;\n height: auto;\n margin-bottom: 1rem;\n width: 100%;\n}\n\n.teaserTitle,\n.teaserTitleLink,\n.teaserBody {\n padding: 0;\n margin: 0;\n}\n\n.teaserTitle,\n.teaserTitleLink {\n color: #000;\n font-size: 1rem;\n line-height: 1.25;\n font-weight: 500;\n margin-bottom: 8px;\n text-decoration: none;\n}\n\n.teaserBody {\n font-size: 0.875rem;\n line-height: 1.2857142857;\n color: #717786;\n margin-bottom: 24px;\n}\n\n```" } ]
code_b2cstoreqa.theme_078400eb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-footer.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.footerLayout {\n background: var(--fresh-darkest);\n padding-top: 40px;\n padding-bottom: 0px;\n}\n\n.footerLayout--relative {\n position: relative;\n}\n\n.footerLayout--z-999 {\n z-index: 999;\n}\n\n.footerLayout--z-998 {\n z-index: 998;\n}\n\n@media (max-width: 64rem) {\n .footerLayout {\n padding-top: 24px;\n padding-bottom: 32px;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_946e6e22
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-identifier.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.product-identifier--productReference {\n font-size: 12px;\n line-height: 16px;\n color: #717786;\n}\n\n```" } ]
code_b2cstoreqa.theme_fc8db275
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.locale-switcher.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.button {\n padding: 8px 48px 8px 16px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n border-radius: 4px;\n height: 42px;\n position: relative;\n}\n\n.globeIcon {\n color: rgba(255, 255, 255, 0.4);\n margin-right: 8px;\n}\n\n.buttonText {\n color: #fff;\n}\n\n.button::after {\n content: url(\"assets/icons/chevronDownSwitcher.svg\");\n position: absolute;\n right: 16px;\n top: 45%;\n transform: translateY(-50%);\n}\n\n.container--locationDrawer {\n width: auto;\n display: flex;\n justify-content: start;\n margin: 0;\n}\n\n.buttonText--locationDrawer {\n color: #000;\n font-size: 16px;\n line-height: 32px;\n}\n\n.button--locationDrawer {\n padding: 0;\n border: none;\n}\n\n.button--locationDrawer::before {\n content: url(\"assets/icons/globe.svg\");\n width: 20px;\n height: 20px;\n margin-right: 16px;\n}\n\n.button--locationDrawer::after {\n content: none;\n}\n\n.globeIcon--locationDrawer {\n display: none;\n opacity: 0;\n}\n\n@media (max-width: 64rem) {\n .button {\n border: none;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_ebbc833a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.reviews-and-ratings.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.inlineContainer {\n margin: 0;\n}\n\n.container {\n max-width: initial;\n padding: 0;\n margin: 0;\n}\n\n.summaryContainer {\n display: flex;\n font-size: 12px;\n line-height: 16px;\n color: #717786;\n margin: 0;\n margin-bottom: 0.5rem;\n}\n\n.stars {\n display: flex;\n align-items: center;\n padding-right: 8px;\n}\n\n.summaryContainer .stars {\n justify-content: center;\n}\n\n.star {\n background-color: transparent;\n background-position: center;\n background-repeat: no-repeat;\n background-size: contain;\n color: transparent;\n display: inline-block;\n font-size: 0;\n height: 16px;\n width: 16px;\n}\n\n.star--filled {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23FFBA09' d='M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n.star--empty {\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23FFBA09' d='M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n/* Product Page */\n\n@media (min-width: 64rem) {\n .reviewCommentsContainer {\n width: 680px;\n }\n}\n\n:global(.vtex-flex-layout-0-x-flexCol--ratings-only) .container {\n background-color: #f3f9ff;\n border-radius: 4px;\n padding: 32px 24px;\n}\n\n.starsContainer,\n.reviewsRating {\n margin-bottom: 1rem;\n}\n\n.reviewsRating {\n font-size: 16px;\n line-height: 24px;\n text-align: center;\n}\n\n.starsContainer .stars {\n justify-content: center;\n}\n\n.writeReviewContainer {\n text-align: center;\n margin: 0;\n}\n\n.writeReviewContainer\n :global(.vtex-styleguide-9-x-jsFocusVisible)\n :not(:global(.vtex-fake)):first-child {\n justify-content: center;\n}\n\n.writeReviewContainer\n :global(.vtex-styleguide-9-x-jsFocusVisible)\n :not(:global(.vtex-fake)):first-child\n :not(:global(.vtex-fake)):last-child {\n flex-grow: unset;\n}\n\n.formContainer {\n background-color: transparent;\n margin: 0;\n padding: 0;\n text-align: initial;\n}\n\n.formContainer :global(.vtex-card) {\n background-color: transparent;\n box-shadow: none !important;\n padding: 0;\n}\n\n.reviewCommentRating {\n color: var(--black-dark);\n}\n\n.reviewComment {\n border-width: 1px;\n color: var(--black-medium);\n}\n\n```" } ]
code_b2cstoreqa.theme_50934116
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.styleguide.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n:global(.vtex-input-prefix__group),\n:global(.vtex-dropdown__container),\n:global(.vtex-input) {\n border-width: 1px;\n}\n\n:global(.vtex-input-prefix__group),\n.container:global(.vtex-dropdown__container) {\n border-color: var(--lines-darker);\n}\n\n.jsFocusVisible :global(.vtex__icon-caret-down),\n.jsFocusVisible :global(.vtex__icon-caret-up) {\n background-color: transparent;\n background-position: center;\n background-repeat: no-repeat;\n background-size: auto;\n color: transparent;\n}\n\n.jsFocusVisible :global(.vtex__icon-caret-down) {\n background-image: url(\"data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n}\n\n.jsFocusVisible :global(.vtex__icon-caret-up) {\n background-image: url(\"data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 7L7 1L1 7' stroke='%23a3afbc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n}\n\n```" } ]
code_b2cstoreqa.theme_8f0cf92d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.telemarketing.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.wrapper {\n background: var(--fresh-darkest);\n}\n\n.attendantContainer {\n padding: 0;\n}\n\n```" } ]
code_b2cstoreqa.theme_4530722e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-drawer.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.drawer--menuDrawer,\n.overlay--menuDrawer {\n z-index: 999;\n}\n\n.openIconContainer {\n display: flex;\n align-items: center;\n padding: 0;\n}\n\n.closeIconButton--menuDrawer {\n margin-left: auto;\n}\n\n.closeIconContainer--menuDrawer {\n background: #f3f9ff;\n margin-bottom: 40px;\n}\n\n.menuIcon {\n border: 1px solid var(--lines-light);\n border-radius: 4px;\n box-sizing: border-box;\n color: var(--black-dark);\n height: 48px;\n padding: 16px 18px;\n width: 58px;\n}\n\n.childrenContainer--menuDrawer {\n padding: 0px 24px;\n}\n\n@media (max-width: 64rem) {\n .openIconContainer {\n margin-right: 16px;\n }\n\n .menuIcon {\n border-radius: 0;\n height: 14px;\n padding: 0;\n border: 0;\n width: 20px;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_9935f0e7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-quantity.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.quantitySelectorContainer--desktop {\n margin: 0;\n}\n\n.quantitySelectorContainer--desktop :global(.vtex-numeric-stepper__input),\n.quantitySelectorContainer--desktop :global(.vtex-numeric-stepper__plus-button),\n.quantitySelectorContainer--desktop\n :global(.vtex-numeric-stepper__minus-button) {\n border-width: 1px;\n outline: none;\n}\n\n.quantitySelectorContainer--desktop\n :global(.vtex-numeric-stepper__plus-button) {\n border-left: 0;\n}\n\n.quantitySelectorContainer--desktop\n :global(.vtex-numeric-stepper__minus-button) {\n border-right: 0;\n}\n\n.quantitySelectorContainer :global(.vtex-input-prefix__group),\n.quantitySelectorContainer :global(.vtex-dropdown__container) {\n border-width: 1px;\n border-color: var(--lines-darker);\n height: 3rem;\n}\n\n.quantitySelectorContainer :global(.vtex-dropdown__container),\n.quantitySelectorContainer :global(.vtex-input-prefix__group) {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.quantitySelectorContainer :global(.vtex-dropdown__button),\n.quantitySelectorContainer :global(.vtex-styleguide-9-x-input) {\n color: var(--black-dark);\n font-weight: 500;\n font-size: 1rem;\n padding-left: 0;\n}\n\n.quantitySelectorContainer :global(.vtex-dropdown__container)::before,\n.quantitySelectorContainer :global(.vtex-input-prefix__group)::before {\n color: var(--black-medium);\n display: inline-block;\n content: \"Qty:\\00a0\";\n padding-left: 1rem;\n}\n\n.quantitySelectorContainer :global(.vtex-dropdown__arrow) {\n color: var(--lines-darker);\n}\n\n```" } ]
code_b2cstoreqa.theme_5adb4eb2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-availability.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.lowStockText,\n.lowStockHighlight,\n.lowStockText {\n font-size: 12px;\n line-height: 16px;\n color: var(--serious-orange);\n font-weight: 700;\n}\n\n.highStockText {\n font-size: 12px;\n line-height: 16px;\n color: #000;\n font-weight: 400;\n}\n\n.highStockText {\n color: var(--fresh-orange);\n font-weight: 500;\n font-size: 14px;\n}\n\n```" } ]
code_b2cstoreqa.theme_452cc9b3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.flex-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n/* BEGIN - Header */\n.flexRow--header {\n background: var(--bg-header);\n}\n\n.flexRowContent--header {\n height: 72px;\n display: flex;\n align-items: center;\n}\n\n.flexRow--headerStripe {\n background: var(--fresh-blue-dark);\n}\n\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-buttonLink) {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.flexCol--drawerInnerCol :global(.vtex-button)::before,\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-buttonLink)::before {\n content: url(\"assets/icons/drawerLoginIcon.svg\");\n background-repeat: no-repeat;\n background-size: contain;\n display: block;\n width: 18px;\n height: 20px;\n margin-right: 12px;\n}\n\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-container) {\n float: none;\n}\n\n.flexCol--drawerInnerCol\n :global(.vtex-login-2-x-container)\n :global(.vtex-button) {\n display: flex;\n align-items: center;\n}\n\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-label)::after {\n content: none;\n}\n\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-label) {\n color: #000;\n font-size: 16px;\n line-height: 32px;\n}\n\n.flexRow--cartSummary {\n border-bottom: 1px solid var(--lines-light);\n}\n\n.flexRowContent--cartSummary .stretchChildrenWidth:last-child {\n width: 100% !important;\n}\n\n.flexRowContent--bottomInfo {\n align-items: center;\n}\n\n.flexRowContent--bottomInfo .stretchChildrenWidth:last-child {\n max-width: 24px;\n margin-left: 16px;\n}\n\n.flexRowContent--bottomInfo .stretchChildrenWidth:first-child {\n width: 100% !important;\n}\n\n.flexCol--drawerInnerCol :global(.vtex-login-2-x-profile) {\n color: #717786;\n}\n\n/* END - Header */\n/* BEGIN - Header */\n\n.flexRow--full-banner {\n background-color: #3296f2;\n margin-bottom: 1.5rem;\n}\n\n.flexRow--menuHeader {\n width: 100%;\n}\n\n.flexRow--minicart-footer {\n box-shadow: none;\n border-top: 1px solid #dee7ef;\n}\n\n@media (max-width: 64rem) {\n .flexColChild--main-header-mobile:first-child {\n margin-bottom: 12px;\n }\n\n .flexCol--main-header-mobile {\n padding-top: 12px;\n }\n\n .flexCol--drawerInnerCol :global(.vtex-login-2-x-buttonLink)::before {\n content: none;\n }\n}\n\n/* END - Header */\n/* BEGIN - ShopByCategory */\n\n.flexRowContent--shopByCategory {\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-column-gap: 16px;\n}\n\n.flexRow--shopByCategorySection {\n margin-bottom: 40px;\n}\n\n.flexRowContent--shopByCategory .stretchChildrenWidth {\n width: 100%;\n}\n\n@media (max-width: 64rem) {\n .flexRowContent--shopByCategory {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: repeat(3, 2fr);\n grid-column-gap: 8px;\n grid-row-gap: 8px;\n }\n\n .flexRowContent--shopByBrandHead {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #e9eff5;\n }\n\n .flexRow--shopByBrandSection,\n .flexRow--shopByCategorySection {\n margin-bottom: 40px;\n }\n}\n\n/* END - ShopByCategory */\n/* BEGIN - ImageBanners */\n\n.flexRowContent--imageBanners {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-column-gap: 16px;\n padding-top: 30px;\n margin-bottom: 64px;\n border-top: 1px solid #e9eff5;\n}\n\n.flexRowContent--imageBanners .stretchChildrenWidth {\n width: 100%;\n}\n\n/* END - ImageBanners */\n/* BEGIN - Single Banner Home */\n\n.flexRow--singleBanner {\n margin-bottom: 40px;\n}\n\n/* END - Single Banner Home */\n/* BEGIN - Benefits */\n\n.flexRow--benefits {\n margin-bottom: 40px;\n}\n\n.flexRowContent--flex-column {\n flex-flow: column nowrap;\n align-items: center;\n}\n\n/* END - Benefits */\n/* BEGIN - Footer */\n\n.flexRowContent--footer-row-1 {\n padding-bottom: 40px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\n margin-bottom: 16px;\n}\n\n.flexRow--footerStripe {\n background: #002446;\n margin-top: 16px;\n}\n\n/* END - Footer */\n/* BEGIN - Trending Shelf */\n\n.flexRow--trending-section {\n background: #f3f9ff;\n padding: 48px 0px;\n margin-bottom: 40px;\n}\n\n.flexRowContent--trending-head {\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n/* END - Trending Shelf */\n/* BEGIN - Popular Shelf */\n\n.flexRowContent--popularHead {\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #e9eff5;\n margin-bottom: 32px;\n}\n\n/* END - Popular Shelf */\n/* BEGIN - Filter */\n\n.flexColChild--filterCol {\n width: 264px;\n padding-right: 32px;\n border-right: 1px solid #e9eff5;\n}\n\n.flexRowContent--searchHeadInfo {\n justify-content: flex-start;\n border-bottom: 1px solid #e7e9ee;\n margin-bottom: 12px;\n}\n\n.flexRowContent--searchHeadInfo .stretchChildrenWidth:first-child {\n margin-right: auto;\n}\n\n.flexColChild--productCountCol {\n display: flex;\n align-items: center;\n}\n\n/* END - Filter */\n/* BEGIN - SearchPage */\n\n.flexRow--blogTitle :global(.vtex-search-result-3-x-galleryTitle--layout) {\n margin-bottom: 32px;\n}\n\n.flexCol--blogSEO {\n width: 264px;\n}\n\n.flexRow--blog {\n padding-top: 48px;\n padding-bottom: 64px;\n}\n\n/* END - SearchPage */\n\n@media (min-width: 64rem) {\n .flexRowContent--footer-row-1 .stretchChildrenWidth:last-child {\n max-width: 161px;\n width: 100% !important;\n }\n\n .flexRowContent--paymentImages {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n grid-gap: 16px;\n }\n\n .flexRowContent--networks {\n justify-content: flex-start;\n }\n\n .flexRow--paymentImages {\n margin-bottom: 24px;\n }\n}\n\n@media (max-width: 64rem) {\n .flexRowContent--quickOrderContainer {\n padding: 16px 0px 24px;\n }\n\n .flexRowContent--quickOrderContainer\n :global(.vtex-styleguide-9-x-jsFocusVisible) {\n margin: 16px 0px;\n }\n\n .flexRowContent--quickOrderContainer\n :global(.vtex-quickorder-3-x-textContainer)\n :not(:global(.vtex-fake)) {\n margin: 0;\n }\n\n .flexRow--bannersSection {\n margin-bottom: 32px;\n }\n\n .flexRow--blogItemRow {\n margin-bottom: 40px;\n }\n\n .flexRowContent--videoItemRow {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-column-gap: 16px;\n }\n\n .flexRowContent--footerLink {\n display: grid;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 24px;\n }\n\n .flexRowContent--paymentImages {\n align-items: center;\n display: grid;\n grid-template-columns: repeat(5, 1fr);\n }\n\n .flexCol--paymentCol {\n margin-bottom: 32px;\n }\n\n .flexRowContent--networks {\n justify-content: center;\n }\n\n .flexRow--networks {\n margin-bottom: 24px;\n }\n\n .flexColChild--orderByMobileCol {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .flexRow--quickOrderRowMobile {\n padding: 24px 0px;\n }\n\n .flexRow--shelfComplete :global(.vtex-store-components-3-x-container) {\n padding-right: 0;\n }\n\n .flexRowContent--stickyPriceRow\n :global(.vtex-product-price-1-x-savings--desktop),\n .flexRowContent--stickyPriceRow\n :global(.vtex-product-price-1-x-savings--savingPercent) {\n font-size: 12px;\n }\n\n .flexRow--mobileCurrencyRow {\n margin-bottom: 32px;\n padding: 12px 0px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.4);\n border-top: 1px solid rgba(255, 255, 255, 0.4);\n }\n\n .flexRowContent--mobileCurrencyRow .stretchChildrenWidth:first-child {\n position: relative;\n }\n\n .flexRowContent--mobileCurrencyRow .stretchChildrenWidth:first-child::after {\n content: \"\";\n display: block;\n height: 24px;\n width: 1px;\n background: rgba(255, 255, 255, 0.4);\n position: absolute;\n top: 50%;\n right: 0;\n transform: translate(-50%, -50%);\n }\n}\n\n/* Flex Utilities */\n\n.flexRowContent--items-center {\n align-items: center;\n}\n\n.flexRowContent--items-end {\n align-items: flex-end;\n}\n\n.flexRowContent--items-start {\n align-items: flex-start;\n}\n\n.flexRowContent--justify-center {\n justify-content: center;\n}\n\n/* Product Page */\n\n.flexRowContent--priceSavings {\n display: flex;\n}\n\n.flexRow--brand-and-rating {\n margin-bottom: 11px;\n}\n\n.flexRow--product-name {\n margin-bottom: 8px;\n}\n\n.flexRow--product-identifier {\n margin-bottom: 20px;\n}\n\n.flexCol--reset-text :not(:global(.vtex-fake)),\n.flexRow--reset-text :not(:global(.vtex-fake)) {\n color: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n text-decoration: inherit;\n text-transform: inherit;\n}\n\n.flexCol--reset-layout :not(:global(.vtex-fake)),\n.flexRow--reset-layout :not(:global(.vtex-fake)) {\n max-width: unset;\n max-height: unset;\n min-width: auto;\n min-height: auto;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n}\n\n.flexColChild--assembly-options :first-child {\n font-size: 14px;\n font-weight: 500;\n}\n\n.flexColChild--assembly-options :global(.vtex-button) {\n width: 100%;\n}\n\n@media (max-width: 64rem) {\n .flexColChild--assembly-options :global(.vtex-button) {\n width: 100%;\n min-width: initial;\n }\n .flexColChild--assembly-options {\n max-width: 100%;\n }\n}\n\n.flexRow--assembly-options {\n color: #717786;\n line-height: 1.25rem;\n}\n\n.flexRow--assembly-options :global(.vtex-button) {\n border: 1px solid var(--lines-dark);\n margin-top: 0.5rem;\n}\n\n.flexRow--assembly-options :global(.vtex-button) :global(.vtex-button__label) {\n padding: 0 1rem !important;\n}\n\n.flexCol--right-col {\n width: 416px;\n}\n\n.flexRowContent--items-baseline {\n align-items: baseline;\n}\n\n@media (min-width: 64rem) {\n .flexCol--box {\n background-color: #fff;\n border: 1px solid #dee7ef;\n border-radius: 4px;\n padding: 24px;\n width: 334px;\n }\n}\n\n.flexRow--product-price {\n padding-bottom: 1rem;\n}\n\n.flexRowContent--location-availability {\n align-items: center;\n}\n\n.flexRow--location-availability,\n.flexRow--product-availability-and-quantity {\n margin-bottom: 1rem;\n}\n\n.flexRowContent--location-availability::before {\n background-color: #f3f9ff;\n background-image: url(\"data:image/svg+xml,%3Csvg width='26' height='22' viewBox='0 0 26 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.3637 1H1V15.4443H17.3637V1Z' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17.3638 6.55566H21.7274L25.0002 9.88896V15.4444H17.3638V6.55566Z' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.90893 20.9998C7.41516 20.9998 8.63621 19.7562 8.63621 18.2221C8.63621 16.688 7.41516 15.4443 5.90893 15.4443C4.40269 15.4443 3.18164 16.688 3.18164 18.2221C3.18164 19.7562 4.40269 20.9998 5.90893 20.9998Z' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20.0911 20.9998C21.5973 20.9998 22.8183 19.7562 22.8183 18.2221C22.8183 16.688 21.5973 15.4443 20.0911 15.4443C18.5848 15.4443 17.3638 16.688 17.3638 18.2221C17.3638 19.7562 18.5848 20.9998 20.0911 20.9998Z' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n background-position: center;\n background-repeat: no-repeat;\n background-size: auto;\n border-radius: 9999px;\n content: \"\";\n display: block;\n height: 64px;\n margin-right: 16px;\n min-width: 64px;\n}\n\n.flexRow--add-to-cart :global(.vtex-button) {\n background: var(--fresh-orange);\n border-color: var(--fresh-orange);\n color: #fff;\n height: 52px;\n}\n\n.flexRow--buy-now :global(.vtex-button) {\n background: var(--fresh-blue-dark);\n border-color: var(--fresh-blue-dark);\n color: #fff;\n height: 52px;\n}\n\n.flexRow--add-to-cart :global(.vtex-button):disabled,\n.flexRow--buy-now :global(.vtex-button):disabled {\n opacity: 0.5;\n}\n\n.flexRowContent--fake-summary {\n padding-bottom: 1rem;\n border-bottom: 1px solid #dee7ef;\n margin-bottom: 1rem;\n}\n\n.flexRow--visible-sticky {\n max-height: 0;\n overflow: hidden;\n}\n\n:global(.vtex-sticky-layout-0-x-wrapper--stuck) .flexRow--visible-sticky {\n max-height: none;\n overflow: auto;\n}\n\n.flexRowContent--divider,\n.flexCol--divider {\n border-width: 1px;\n border-color: #e9eff5;\n margin: 16px 0;\n}\n\n@media (min-width: 64rem) {\n .flexRowContent--divider,\n .flexCol--divider {\n margin: 32px 0;\n }\n}\n\n/* Table */\n\n.flexRow--table-cell,\n.flexCol--table-cell {\n padding: 1rem;\n}\n\n.flexRow--table-cell,\n.flexCol--table-cell,\n.flexCol--table-heading,\n.flexRow--table-heading {\n background-color: #f3f9ff;\n}\n\n.flexRow--table-row:nth-child(odd) .flexRow--table-cell,\n.flexRow--table-row:nth-child(odd) .flexCol--table-cell,\n.flexRow--table-row:nth-child(odd) .flexCol--table-heading,\n.flexRow--table-row:nth-child(odd) .flexRow--table-heading,\n.flexCol--table-row:nth-child(odd) .flexRow--table-cell,\n.flexCol--table-row:nth-child(odd) .flexCol--table-cell,\n.flexCol--table-row:nth-child(odd) .flexCol--table-heading,\n.flexCol--table-row:nth-child(odd) .flexRow--table-heading {\n background-color: transparent;\n}\n\n.flexRowChild--table-cell,\n.flexColChild--table-cell {\n display: flex;\n align-items: center;\n}\n\n/* Reviews and Rating */\n\n/**\n * Please refer to `store/blocks/product/reviews-and-ratings.jsonc` to better understand the styles bellow\n**/\n\n/* Reviews Only */\n\n.flexRow--reviews-only :global(.vtex-reviews-and-ratings-2-x-reviewsHeading),\n.flexRow--reviews-only :global(.vtex-reviews-and-ratings-2-x-reviewsRating),\n.flexRow--reviews-only\n :global(.vtex-reviews-and-ratings-2-x-writeReviewContainer),\n.flexCol--reviews-only :global(.vtex-reviews-and-ratings-2-x-reviewsHeading),\n.flexCol--reviews-only :global(.vtex-reviews-and-ratings-2-x-reviewsRating),\n.flexCol--reviews-only\n :global(.vtex-reviews-and-ratings-2-x-writeReviewContainer) {\n display: none;\n}\n\n/* Ratings Only */\n\n.flexRow--ratings-only :global(.vtex-reviews-and-ratings-2-x-reviewsHeading),\n.flexRow--ratings-only\n :global(.vtex-reviews-and-ratings-2-x-reviewCommentsContainer),\n.flexCol--ratings-only :global(.vtex-reviews-and-ratings-2-x-reviewsHeading),\n.flexCol--ratings-only\n :global(.vtex-reviews-and-ratings-2-x-reviewCommentsContainer) {\n display: none;\n}\n\n/* Sellers Page */\n\n.flexCol--productBoxSellersPage {\n width: 216px;\n padding: 24px;\n border: 1px solid #dee7ef;\n border-radius: 4px;\n}\n\n.flexRow--sellersPageLayout {\n width: 100%;\n}\n\n@media (max-width: 64rem) {\n .flexRow--sellerLayoutMobile {\n width: 100%;\n }\n}\n\n/* Vertical Divider */\n\n.flexCol--divider--vertical,\n.flexRow--divider--vertical {\n border-bottom-style: solid;\n border-bottom-width: 0.0625rem;\n}\n\n@media (min-width: 40rem) {\n .flexCol--divider--vertical,\n .flexRow--divider--vertical {\n border-right-style: solid;\n border-right-width: 0.0625rem;\n }\n}\n\n/* Border Radius */\n\n.flexRow--br2,\n.flexCol--br2 {\n border-radius: 0.25rem;\n}\n\n/* Position */\n\n.flexRow--relative,\n.flexCol--relative {\n position: relative;\n}\n\n/* Z Index */\n\n.flexRow--z-999,\n.flexCol--z-999 {\n z-index: 999;\n}\n\n.flexRow--z-998,\n.flexCol--z-998 {\n z-index: 998;\n}\n\n/* Background */\n\n.flexRow--bg-base,\n.flexCol--bg-base {\n background-color: var(--base);\n}\n\n.flexRow--bg-blue-medium,\n.flexCol--bg-blue-medium {\n background-color: var(--blue-medium);\n}\n\n.flexRow--bg-fresh-blue,\n.flexCol--bg-fresh-blue {\n background-color: var(--fresh-blue);\n}\n\n.flexRow--bg-fresh-blue-lightest,\n.flexCol--bg-fresh-blue-lightest {\n background-color: var(--fresh-blue-lightest);\n}\n\n/* Colors */\n\n.flexRow--c-on-base--inverted,\n.flexCol--c-on-base--inverted {\n color: #fff;\n}\n\n```" } ]
code_b2cstoreqa.theme_d17eeb76
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.menu.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.menuContainer--flexCol {\n display: flex;\n flex-flow: column nowrap;\n}\n\n.styledLinkContainer--flexCol {\n margin: 0;\n padding: 0;\n}\n\n.styledLink--flexCol {\n color: #fff;\n font-size: 14px;\n line-height: 28px;\n font-weight: 500;\n}\n\n.menuContainer--menuDrawer {\n flex-flow: column nowrap;\n}\n\n.styledLinkContainer--departItem {\n margin: 0;\n padding: 0;\n}\n\n.styledLinkContent--departItem {\n font-size: 16px;\n line-height: 44px;\n color: #717786;\n}\n\n.menuContainerNav--menuDrawer {\n padding-bottom: 32px;\n margin-bottom: 32px;\n border-bottom: 1px solid #dee7ef;\n}\n\n.styledLinkContainer--currencyFakeDropdown {\n padding: 0px 48px 0px 16px;\n margin: 0;\n margin-right: 16px;\n height: 42px;\n line-height: 42px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n border-radius: 4px;\n position: relative;\n}\n\n.menuContainerNav--currencyFakeDropdown {\n display: flex;\n align-items: center;\n}\n\n.styledLinkContent--currencyFakeDropdown {\n font-size: 14px;\n line-height: 42px;\n color: #fff;\n}\n\n.styledLinkContainer--currencyFakeDropdown::after {\n content: url(\"assets/icons/chevronDownSwitcher.svg\");\n position: absolute;\n right: 16px;\n top: 0;\n}\n\n@media (max-width: 64rem) {\n .styledLinkContainer--currencyFakeDropdown {\n border: none;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_08941bdc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-specifications.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.specificationName,\n.specificationValue {\n font-size: 14px;\n}\n\n.specificationName {\n color: #717786;\n}\n\n.specificationValue {\n color: #000;\n}\n\n.specificationName--bullet-list {\n display: block;\n columns: auto 2;\n line-height: 2.5;\n width: 100%;\n white-space: pre-wrap;\n}\n\n```" } ]
code_b2cstoreqa.theme_032531e5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.breadcrumb.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.homeLink--default {\n display: flex;\n align-items: center;\n padding-top: 0;\n padding-left: 0;\n padding-bottom: 0;\n}\n\n.container--default {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n}\n\n.arrow--default {\n display: flex;\n align-items: center;\n}\n\n.arrow--default,\n.caretIcon--default,\n.link--default,\n.term--default {\n color: var(--black-medium);\n font-size: 0.875rem;\n white-space: nowrap;\n}\n\n.arrow--default,\n.caretIcon--default {\n padding-left: 0;\n padding-right: 0.5rem;\n}\n\n.link--default,\n.termArrow--default,\n.term--default {\n padding: 0;\n}\n\n.homeLink--default {\n padding-right: 0.5rem;\n}\n\n```" } ]
code_b2cstoreqa.theme_9c823a2d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.pickup-availability.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container--default,\n.container--default\n :not(:global(.vtex-fake)):not(.storeListItem--default):not(.storeListContainer--default):not(.chooseDifferentStoreButton--default) {\n font-size: 0.875rem;\n margin-top: 0;\n margin-bottom: 0;\n margin-left: 0;\n margin-right: 0;\n}\n\n.container--default {\n text-align: center;\n}\n\n@media (min-width: 40rem) {\n .container--default {\n width: 18rem;\n }\n}\n\n.container--default :global(.vtex-input-prefix__group) {\n border-width: 0.0625rem;\n border-color: var(--lines-dark);\n height: 2.75rem;\n}\n\n.container--default\n :not(:global(.vtex-input)):not(.storeListContainer--default):not(:global(.vtex-styleguide-9-x-input)):not(.availableAtHeader--default):not(.storeList--default):not(.storeSelectedContainer--default) {\n font-size: 0;\n}\n\n.storeSelectedContainer--default,\n.storeListContainer--default {\n font-size: 0.875rem;\n text-align: left;\n}\n\n.storeListContainer--default :not(:global(.vtex-fake)),\n.storeSelectedContainer--default :not(:global(.vtex-fake)) {\n font-size: inherit !important;\n}\n\n.storeListContainer--default :global(.vtex-radio__fakeRadioContainer),\n.storeListContainer--default :global(.vtex-radio__label) {\n display: none;\n}\n\n.storeListContainer--default :global(.vtex-radio__input) {\n display: inline-block;\n height: 0.8125rem !important;\n opacity: 1;\n position: static;\n width: 0.8125rem !important;\n}\n\n.storeListContainer--default :global(.vtex-radio) {\n align-items: center;\n background-color: #f3f9ff;\n border-right: 1px solid #dee7ef;\n border-top-left-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n display: flex;\n height: 100%;\n justify-content: center;\n padding: 32px 16px;\n width: 53px;\n}\n\n.storeListItem--default {\n background-color: #fff;\n border: 1px solid var(--lines-light);\n border-radius: 0.25rem;\n padding: 0;\n margin-bottom: 0.5rem;\n}\n\n.storeListItem--default:last-child {\n margin-bottom: 0;\n}\n\n.storeListItem--default :not(:global(.vtex-fake)) {\n margin: 0;\n}\n\n.storeListItem--default:focus {\n outline: none;\n}\n\n.pickupItem--default {\n align-self: center;\n display: flex;\n line-height: 1.4285714286;\n padding: 1rem;\n width: 100%;\n}\n\n.pickupName--default,\n.pickupEstimate--default,\n.pickupUnavailable--default {\n font-weight: 500;\n}\n\n.pickupEstimate--default,\n.estimateTranslated--default {\n display: inline !important;\n color: var(--green-dark);\n}\n\n.pickupUnavailable--default {\n color: var(--serious-orange);\n}\n\n.storeListContainer--default {\n margin: 0;\n margin-top: 1rem;\n padding: 0;\n}\n\n.availableAtHeader--default,\n.availabilityHeader--default {\n display: none;\n}\n\n.storeSelectedContainer--default .pickupItem--default {\n border-radius: 0.25rem;\n background-color: #fff;\n border: 1px solid var(--lines-light);\n}\n\n.chooseDifferentStoreButton--default {\n margin-top: 1rem;\n}\n\n.chooseDifferentStoreButton--default :global(.vtex-button) {\n background-color: var(--fresh-blue);\n color: #fff;\n height: 3rem;\n width: 100%;\n}\n\n.chooseDifferentStoreButtonText--default {\n font-weight: 500;\n text-transform: uppercase;\n}\n\n```" } ]
code_b2cstoreqa.theme_d6df758c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.search-result.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.filter__container--title {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n.searchResultContainer:global(.vtex-store-components-3-x-container) {\n padding: 0;\n}\n\n.categoryParent {\n display: none;\n opacity: 0;\n}\n\n.filterTitle,\n.categoryItemName {\n font-size: 16px;\n line-height: 32px;\n color: #000;\n font-weight: 500;\n}\n\n.categoryItemChildren {\n padding: 0;\n font-size: 14px;\n line-height: 32px;\n font-weight: 400;\n color: #000;\n background-color: none !important;\n}\n\n.filterTemplateOverflow {\n max-height: 100vh !important;\n}\n\n.filterItem :global(.vtex-checkbox__container) {\n margin-right: 12px;\n}\n\n.filterItem :global(.vtex-checkbox__box-wrapper),\n.filterItem :global(.vtex-checkbox__container),\n.filterItem :global(.vtex-checkbox__inner-container),\n.filterItem :global(.vtex-checkbox__input) {\n width: 20px;\n height: 20px;\n}\n\n.filterItem :global(.vtex__icon-check) {\n width: 16px;\n height: 16px;\n}\n\n.filterAvailable {\n padding: 0;\n padding-bottom: 14px;\n}\n\n.filterItem :global(.vtex-checkbox__line-container) {\n align-items: center;\n}\n\n.filterItem :global(.vtex-checkbox__inner-container) {\n border-color: #a3afbc;\n border-width: 1px;\n}\n\n.filterItem :global(.vtex-checkbox__label) {\n font-size: 14px;\n line-height: 32px;\n color: #000;\n font-weight: 400;\n}\n\n.filter__container--b {\n padding: 16px 0px;\n}\n\n.filter__container {\n border-color: #e9eff5;\n}\n\n.galleryTitle--layout {\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n color: #000;\n margin: 0;\n margin-bottom: 8px;\n}\n\n.galleryItem,\n.gallery {\n padding: 0;\n}\n\n.totalProducts--layout {\n padding: 0;\n}\n\n.totalProductsMessage,\n.totalProducts--layout {\n font-size: 14px;\n line-height: 20px;\n color: #000 !important;\n text-transform: lowercase;\n}\n@media (max-width: 64rem) {\n .totalProducts--layout {\n padding: 8px 0px;\n }\n\n .filterPopupTitle,\n .totalProducts--layout {\n text-align: left;\n }\n\n .orderByButton {\n padding: 0;\n }\n\n .galleryItem--normal\n :global(.vtex-product-summary-2-x-container--summaryComplete) {\n max-width: 100%;\n }\n\n .sidebar {\n width: 85%;\n }\n\n .filterApplyButtonWrapper :global(.vtex-button) {\n height: 48px;\n color: #fff;\n background: #214d8e;\n border: none;\n font-weight: bold;\n font-size: 16px;\n }\n\n .filterClearButtonWrapper :global(.vtex-button) {\n height: 48px;\n border: 1px solid #bdc9d6;\n color: #214d8e;\n font-weight: bold;\n font-size: 16px;\n }\n\n .accordionFilterContainer {\n padding: 0px 16px;\n }\n\n .accordionFilterItemTitle {\n line-height: 64px;\n font-size: 18px;\n color: #000;\n }\n\n .filterAccordionItemBox {\n height: initial;\n padding: 0;\n border: none;\n }\n\n .accordionFilterContent {\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #e9eff5;\n }\n\n .categoryItemChildrenContainer {\n padding: 0;\n }\n\n .categoryGroup {\n margin: 0;\n }\n\n .selectedCategory,\n .categoryItemChildren {\n font-size: 14px;\n line-height: 40px;\n color: #000;\n background: none;\n margin: 0;\n }\n\n .filterAccordionItemBox :global(.vtex-checkbox__label) {\n font-size: 14px;\n line-height: 40px;\n color: #000;\n margin: 0;\n }\n\n .galleryItem--normal\n :global(.vtex-product-summary-2-x-container--summaryComplete) {\n border-bottom: 1px solid #e9eff5;\n border-radius: 0px;\n padding: 16px 0px;\n }\n\n .galleryItem--normal\n :global(.vtex-product-summary-2-x-element--summaryComplete) {\n display: grid;\n grid-template-columns: 1.5fr 2fr;\n grid-column-gap: 16px;\n }\n\n .galleryItem--normal :global(.vtex-product-summary-2-x-imageNormal) {\n height: auto;\n margin-bottom: initial;\n }\n\n .galleryItem--normal\n :global(.vtex-product-summary-2-x-productBrandContainer) {\n margin-bottom: 4px;\n }\n}\n\n.categoryItemChildrenContainer :not(:global(.vtex-fake)) {\n border-color: transparent;\n}\n\n.orderByOptionsContainer {\n z-index: 9;\n}\n\n```" } ]
code_b2cstoreqa.theme_e28f82bb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.slider-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.sliderLayoutContainer:not(.sliderLayoutContainer--dotsCustom) {\n padding-bottom: 26px;\n}\n\n.sliderArrows--homeSlider {\n background-color: rgba(0, 51, 100, 0.32) !important;\n background-repeat: no-repeat !important;\n border-radius: 50%;\n height: 48px;\n padding: 0;\n width: 48px;\n}\n\n.caretIcon--homeSlider {\n display: none;\n}\n\n.sliderLeftArrow--homeSlider {\n background-image: url(\"assets/icons/chevronLeftWhite.svg\") !important;\n background-position: 17px center !important;\n left: 16px;\n}\n\n.sliderRightArrow--homeSlider {\n background-image: url(\"assets/icons/chevronRightWhite.svg\") !important;\n background-position: 20px center !important;\n right: 16px;\n}\n\n.paginationDotsContainer {\n bottom: 16px;\n}\n\n.paginationDotsContainer--dotsCustom {\n display: flex;\n width: auto;\n left: 50%;\n right: initial;\n transform: translateX(-50%);\n bottom: 16px;\n background: #fff;\n border-radius: 40px;\n padding: 2px 6px;\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.16);\n height: 20px;\n align-items: center;\n}\n\n.paginationDot {\n background-color: #bdc9d6;\n}\n\n.paginationDot.paginationDot--isActive {\n background-color: #0067c7;\n}\n\n.sliderLayoutContainer--benefitsSlider {\n margin-top: 44px;\n}\n\n.sliderTrackContainer {\n max-width: 100%;\n}\n\n.sliderTrack--shelfStyle1 {\n padding: 16px 0px;\n}\n\n/* BEGIN - Trending Shelf */\n\n.sliderTrack--shelf-trending {\n width: 100%;\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 16px;\n transform: initial;\n justify-content: initial;\n}\n\n.slide--shelf-trending {\n width: 100% !important;\n}\n\n.sliderArrows--shelfAlsoView,\n.sliderArrows--categorySlider,\n.sliderArrows--shelfPopular,\n.sliderArrows--shelfStyle1 {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid #a3afbc;\n background-color: #fff !important;\n border-radius: 999px;\n padding: 0;\n text-align: center;\n}\n\n.sliderArrows--shelfAlsoView .caretIcon,\n.sliderArrows--shelfPopular .caretIcon,\n.sliderArrows--shelfStyle1 .caretIcon {\n display: none;\n opacity: 0;\n}\n\n.sliderRightArrow--shelfAlsoView,\n.sliderRightArrow--shelfPopular,\n.sliderRightArrow--shelfStyle1 {\n border-color: #0067c7;\n}\n\n.sliderRightArrow--shelfAlsoView,\n.sliderRightArrow--shelfPopular,\n.sliderRightArrow--shelfStyle1,\n.sliderLeftArrow--shelfAlsoView,\n.sliderLeftArrow--shelfPopular,\n.sliderLeftArrow--shelfStyle1 {\n background-repeat: no-repeat !important;\n}\n\n.sliderRightArrow--shelfAlsoView,\n.sliderRightArrow--shelfPopular,\n.sliderRightArrow--shelfStyle1 {\n background-position: 11px center !important;\n background-image: url(\"assets/icons/chevronRightBlue.svg\") !important;\n}\n\n.sliderLeftArrow--shelfAlsoView,\n.sliderLeftArrow--shelfPopular,\n.sliderLeftArrow--shelfStyle1 {\n background-position: 9px center !important;\n background-image: url(\"assets/icons/chevronLeftBlue.svg\") !important;\n}\n\n.sliderLayoutContainer--categorySlider {\n padding: 0px 50px 28px;\n margin-bottom: 24px;\n}\n\n.caretIcon--categorySlider {\n height: 16px;\n width: 12px;\n}\n\n/* END - Trending Shelf */\n\n@media (max-width: 64rem) {\n .sliderLayoutContainer--categorySlider {\n padding: 0px 42px 28px;\n }\n\n .paginationDotsContainer--shelfAlsoView {\n bottom: 0;\n }\n\n .sliderLayoutContainer--shelfAlsoView,\n .sliderLayoutContainer--bannersSlider {\n margin-bottom: 32px;\n }\n\n .sliderLayoutContainer--shelfAlsoView,\n .sliderLayoutContainer.sliderLayoutContainer--bannersSlider {\n padding-bottom: 38px;\n }\n\n .sliderTrack--shelf-trending {\n grid-template-columns: 1fr;\n grid-row-gap: 8px;\n grid-column-gap: initial;\n }\n\n .sliderTrack--shelfPopular {\n overflow: hidden;\n pointer-events: none;\n display: grid;\n grid-template-columns: 1fr 1fr;\n }\n\n .sliderTrack--shelfPopular .slide {\n width: 100% !important;\n }\n\n .sliderLayoutContainer--stripeSlider {\n padding-bottom: 0 !important;\n background: #1b3255;\n margin-top: 16px;\n height: 40px;\n }\n\n .slide--shelfStyle1 {\n max-width: 160px;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_ccbd81c9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.store-newsletter.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.emailInputContainer :global(.vtex-input-prefix__group) {\n height: initial;\n border: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.emailInputContainer :global(.vtex-styleguide-9-x-input) {\n background: #fff;\n border: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n color: var(--black-medium);\n font-size: 1.25rem;\n height: 3.5rem;\n line-height: 1.2;\n}\n\n.emailInputContainer :global(.vtex-styleguide-9-x-input)::placeholder {\n color: var(--black-medium);\n font-size: 20px;\n line-height: 24px;\n}\n\n.formSubmitContainer :global(.vtex-button) {\n background: #fff;\n border: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n color: var(--fresh-blue);\n height: 3.5rem;\n font-size: 1rem;\n font-weight: bold;\n line-height: 1.5;\n padding: 0 1.5rem;\n outline: none;\n}\n\n.formSubmitContainer :global(.vtex-button__label) {\n padding: 0 !important;\n}\n\n@media (max-width: 64rem) {\n .emailInputContainer :global(.vtex-styleguide-9-x-input)::placeholder,\n .emailInputContainer :global(.vtex-styleguide-9-x-input) {\n font-size: 18px;\n line-height: 20px;\n }\n\n .formSubmitContainer :global(.vtex-button) {\n font-size: 14px;\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_9c5a578a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.product-list.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.removeButtonContainer {\n display: flex;\n justify-content: flex-end;\n}\n\n.productName--minicart {\n color: var(--black-dark);\n font-size: 14px;\n line-height: 18px;\n}\n\n.productImage {\n height: 48px;\n object-fit: contain;\n width: 48px;\n}\n\n.productImageAnchor {\n display: block;\n}\n\n.productImageContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n```" } ]
code_b2cstoreqa.theme_7b4ad4da
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.disclosure-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.trigger {\n cursor: pointer;\n}\n\n.content {\n padding-top: 24px;\n}\n\n```" } ]
code_b2cstoreqa.theme_d3a1e313
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.seller-selector.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.sellerMasterContainer {\n max-width: 1440px;\n width: 100%;\n padding: 32px 32px 0px;\n margin: 0px auto;\n}\n\n.sellerHead {\n border-radius: 0px;\n background: #dee7ef;\n}\n\n.sellerRow {\n padding: 16px 0px;\n border: none;\n border-bottom: 1px solid #dee7ef;\n}\n\n.sellerRow:first-child {\n border-top: 1px solid #dee7ef;\n}\n\n.sellerList,\n.sellerHead {\n margin-left: 0;\n margin-right: 0;\n flex: 100%;\n}\n\n.sellerPriceShippingText {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.sellerBuyContainer :global(.vtex-button) {\n height: 48px;\n border-radius: 4px;\n background: var(--fresh-orange);\n border: none;\n outline: none;\n}\n\n.sellerMasterContainer {\n display: flex;\n flex-flow: row wrap;\n}\n\n.simulateShipping,\n.sellerMasterContainer\n :global(.vtex-store-components-3-x-productNameContainer) {\n flex: 50%;\n}\n\n.sellerMasterContainer\n :global(.vtex-store-components-3-x-productNameContainer) {\n display: flex;\n align-items: center;\n font-size: 16px;\n line-height: 18px;\n font-weight: 400;\n margin: 0;\n}\n\n.simulateShipping {\n display: flex;\n flex-flow: column;\n border: none;\n padding: 0;\n}\n\n.simulateShipping :global(.vtex-button) {\n margin: 0;\n border: none;\n height: 48px;\n background: var(--fresh-orange);\n margin-top: 16px;\n outline: none;\n border-radius: 4px;\n}\n\n@media (max-width: 64rem) {\n .sellerMasterContainer\n :global(.vtex-store-components-3-x-productNameContainer) {\n text-align: left;\n }\n\n .simulateShipping {\n margin: 0;\n }\n\n .sellerName {\n background: none;\n }\n\n .sellerBuyContainer {\n padding: 0;\n }\n}\n\n/* Link Seller */\n\n.linkSellerContainer--default {\n display: block;\n flex-direction: initial;\n}\n\n.linkSeller--default {\n background-color: var(--fresh-blue-lightest);\n border: 0.0625rem solid var(--lines-light);\n border-radius: 0.25rem;\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: var(--black-medium);\n text-decoration: none;\n padding: 1.1875rem 1.25rem;\n width: 100%;\n}\n\n.linkSeller--default::after {\n background-color: transparent;\n background-size: 100%;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='%230067C7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n content: \"\";\n display: inline-block;\n height: 0.75rem;\n width: 0.4375rem;\n}\n\n.linkSellerText--default {\n font-size: 0;\n padding: 0;\n margin: 0;\n}\n\n.linkSellerText--default::before {\n font-size: 0.875rem;\n content: \"See from other sellers\";\n}\n\n```" } ]
code_b2cstoreqa.theme_4d663c6f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.checkout-summary.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.summarySmallDisclaimer {\n display: none;\n opacity: 0;\n}\n```" } ]
code_b2cstoreqa.theme_a60f6110
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.stack-layout.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.stackItem--savingsStack:not(.stackItem--first),\n.stackItem--savingsStack:not(:last-child) {\n bottom: 10px;\n top: initial;\n}\n\n.stackItem--savingsStack:last-child {\n bottom: 28px;\n top: initial;\n}\n\n```" } ]
code_b2cstoreqa.theme_baf6cbd5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/css/vtex.shopper-location.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.changeLocationContainer :global(.vtex-input-prefix__group),\n.changeLocationContainer :global(.vtex-address-form-4-x-container) {\n border: 1px solid #A3AFBC;\n}\n\n```" } ]
code_b2cstoreqa.theme_d52a1468
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/configs/style.json from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [3, 2.25, 1.5, 1.25, 1, 0.875, 0.75],\n \"spacing\": [0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 8, 16],\n \"customMedia\": [\n {\n \"s\": 20\n },\n {\n \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n {\n \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#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\": \"transparent\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#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\": \"transparent\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#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 {\n \"name\": \"small\",\n \"value\": 2\n },\n {\n \"name\": \"regular\",\n \"value\": 2.5\n },\n {\n \"name\": \"large\",\n \"value\": 3\n }\n ],\n \"typography\": {\n \"measure\": [30, 34, 20],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -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\": \"Roboto, Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"small\": {\n \"fontFamily\": \"Roboto, Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"Roboto, Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"Roboto, Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"Roboto, Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"Roboto, Fabriga, -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_b2cstoreqa.theme_fba9713e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/styles/configs/font-faces.css from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n@font-face {\n font-family: \"Roboto\";\n font-style: normal;\n font-weight: 400;\n src: local(\"Roboto\"), local(\"Roboto-Regular\"),\n url(\"assets/fonts/roboto-v20-latin-regular.woff2\") format(\"woff2\"),\n url(\"assets/fonts/roboto-v20-latin-regular.woff\") format(\"woff\");\n}\n\n@font-face {\n font-family: \"Roboto\";\n font-style: normal;\n font-weight: 500;\n src: local(\"Roboto Medium\"), local(\"Roboto-Medium\"),\n url(\"assets/fonts/roboto-v20-latin-500.woff2\") format(\"woff2\"),\n url(\"assets/fonts/roboto-v20-latin-500.woff\") format(\"woff\");\n}\n\n@font-face {\n font-family: \"Roboto\";\n font-style: normal;\n font-weight: 700;\n src: local(\"Roboto Bold\"), local(\"Roboto-Bold\"),\n url(\"assets/fonts/roboto-v20-latin-700.woff2\") format(\"woff2\"),\n url(\"assets/fonts/roboto-v20-latin-700.woff\") format(\"woff\");\n}\n\n```" } ]
code_b2cstoreqa.theme_681b91e0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/product-summary.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"product-summary.shelf.product-comparison#complete\": {\n \"props\": {\n \"blockClass\": \"summaryComplete\"\n },\n \"children\": [\n \"flex-layout.row#stackSavings\",\n \"product-summary-brand\",\n \"product-summary-name\",\n \"product-rating-summary\",\n \"product-summary-price\",\n \"flex-layout.row#product-summary-buy-button\",\n \"add-to-list-btn\",\n \"modal-trigger#quickview\",\n \"product-comparison-block.selector\"\n ]\n },\n \"product-summary.shelf#complete\": {\n \"props\": {\n \"blockClass\": \"summaryComplete\"\n },\n \"children\": [\n \"flex-layout.row#stackSavings\",\n \"product-summary-brand\",\n \"product-summary-name\",\n \"product-rating-summary\",\n \"product-summary-price\",\n \"flex-layout.row#product-summary-buy-button\",\n \"add-to-list-btn\",\n \"modal-trigger#quickview\"\n ]\n },\n \"product-summary.shelf#searchBar\": {\n \"props\": {\n \"blockClass\": \"summarySearch\"\n },\n \"children\": [\n \"product-summary-image#searchBar\",\n \"product-summary-brand\",\n \"product-summary-name\"\n ]\n },\n \"product-summary.shelf#searchBarMobile\": {\n \"props\": {\n \"blockClass\": \"summarySearch\"\n },\n \"children\": [\n \"product-summary-image#searchBarMobile\",\n \"product-summary-name\"\n ]\n },\n \"product-summary-image#searchBar\": {\n \"props\": {\n \"height\": 140,\n \"width\": 140,\n \"showBadge\": false\n }\n },\n \"product-summary-image#searchBarMobile\": {\n \"props\": {\n \"height\": 48,\n \"width\": 48,\n \"showBadge\": false\n }\n },\n \"flex-layout.row#stackSavings\": {\n \"children\": [\"stack-layout#summary\"]\n },\n \"stack-layout#summary\": {\n \"children\": [\n \"product-summary-image\",\n \"product-price-savings#summary\",\n \"product-price-savings#discount\"\n ],\n \"props\": {\n \"zIndexOffset\": 3,\n \"blockClass\": [\"savingsStack\"]\n }\n },\n \"product-price-savings#discount\": {\n \"props\": {\n \"message\": \"-{savingsPercentage}\",\n \"blockClass\": \"savingPercentage\"\n }\n },\n \"product-price-savings#summary\": {\n \"props\": {\n \"blockClass\": \"savingSummary\"\n }\n },\n\n \"flex-layout.row#product-summary-buy-button\": {\n \"children\": [\"add-to-cart-button#product-summary-buy-button\"],\n \"props\": {\n \"blockClass\": [\"product-summary-buy-button\"]\n }\n },\n\n \"add-to-cart-button#product-summary-buy-button\": {\n \"props\": {\n \"text\": \"Buy\",\n \"addToCartFeedback\": \"customEvent\",\n \"customPixelEventId\": \"add-to-cart-button\"\n }\n },\n\n \"add-to-list-btn\": {\n \"props\": {\n \"text\": \"Add to Cart\"\n }\n },\n \"product-summary-brand\": {\n \"props\": {\n \"displayMode\": \"text\"\n }\n },\n \"product-summary.shelf#normal\": {\n \"props\": {\n \"blockClass\": \"summaryComplete\"\n },\n \"children\": [\"flex-layout.row#stackSavings\", \"flex-layout.col#summaryInfo\"]\n },\n \"flex-layout.col#summaryInfo\": {\n \"children\": [\n \"product-summary-brand\",\n \"product-summary-name\",\n \"product-rating-summary\",\n \"product-summary-price\"\n ],\n \"props\": {\n \"preventVerticalStretch\": true\n }\n },\n \"product-summary.shelf#trending\": {\n \"children\": [\"flex-layout.row#summaryTrending\"],\n \"props\": {\n \"blockClass\": \"trendingSummary\"\n }\n },\n \"flex-layout.row#summaryTrending\": {\n \"children\": [\n \"product-summary-image#trending\",\n \"product-summary-column#summaryTrending\"\n ],\n \"props\": {\n \"preventHorizontalStretch\": true,\n \"preserveLayoutOnMobile\": true\n }\n },\n \"product-summary-column#summaryTrending\": {\n \"props\": {\n \"blockClass\": \"summaryCol\"\n },\n \"children\": [\n \"product-summary-name#trending\",\n \"product-rating-summary\",\n \"product-summary-price\",\n \"product-availability\"\n ]\n },\n \"product-summary-name#trending\": {\n \"props\": {\n \"width\": {\n \"desktop\": 96,\n \"mobile\": 96\n },\n \"height\": {\n \"desktop\": 96,\n \"mobile\": 96\n }\n }\n },\n \"product-availability\": {\n \"props\": {\n \"threshold\": \"10\",\n \"lowStockMessage\": \"Only {quantity} left in stock\",\n \"highStockMessage\": \"Order now!\"\n }\n },\n \"product-summary-image#trending\": {\n \"props\": {\n \"width\": 96,\n \"height\": 96,\n \"showBadge\": false\n }\n },\n \"product-summary.shelf#minimum\": {\n \"children\": [\n \"product-summary-image\",\n \"product-rating-summary\",\n \"product-summary-price\"\n ],\n \"props\": {\n \"blockClass\": \"minimumSummary\"\n }\n },\n \"product-summary-image\": {\n \"props\": {\n \"showBadge\": false\n }\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_85d905a7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/shopper-location.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"shopper-location\": {\n \"children\": [\"modal-trigger#address\"]\n },\n \"modal-trigger#address\": {\n \"children\": [\"user-address\", \"modal-layout#address\"]\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\": [\"modal-header#address\", \"modal-content#address\"]\n },\n \"modal-header#address\": {\n \"children\": [\"flex-layout.col#address-header\"]\n },\n \"flex-layout.col#address-header\": {\n \"children\": [\"rich-text#address-header\"],\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\": [\"change-location\"]\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_17c0d493
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/default.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.orderplaced\": {\n \"blocks\": [\"order-placed\"]\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 \"product-summary.shelf\": {\n \"children\": [\n \"product-summary-add-to-list-button\",\n \"product-summary-name\",\n \"product-rating-inline\",\n \"product-summary-space\",\n \"product-summary-price\",\n \"product-identifier.summary\",\n \"add-to-cart-button\"\n ]\n },\n\n \"flex-layout.col#spacer\": {\n \"props\": {\n \"width\": \"grow\"\n }\n },\n\n \"flex-layout.col#divider--vertical\": {\n \"children\": [],\n \"props\": {\n \"blockClass\": [\"divider--vertical\"],\n \"borderWidth\": 0,\n \"borderColor\": \"muted-5\"\n }\n },\n\n \"flex-layout.row#divider--vertical\": {\n \"children\": [],\n \"props\": {\n \"blockClass\": [\"divider--vertical\"],\n \"borderWidth\": 0,\n \"borderColor\": \"muted-5\"\n }\n },\n\n \"flex-layout.col#divider\": {\n \"children\": [],\n \"props\": {\n \"blockClass\": \"divider\",\n \"border\": \"top\",\n \"borderWidth\": 1,\n \"borderColor\": \"muted-5\",\n \"width\": \"grow\"\n }\n },\n\n \"flex-layout.row#divider\": {\n \"children\": [],\n \"props\": {\n \"blockClass\": \"divider\",\n \"border\": \"top\",\n \"borderWidth\": 1,\n \"borderColor\": \"muted-5\"\n }\n },\n\n \"disclosure-state-indicator\": {\n \"props\": {\n \"Show\": \"icon-caret#down\",\n \"Hide\": \"icon-caret#up\"\n }\n },\n\n \"icon-caret#down\": {\n \"props\": {\n \"blockClass\": [\"fresh-blue\"],\n \"orientation\": \"down\"\n }\n },\n\n \"icon-caret#up\": {\n \"props\": {\n \"blockClass\": [\"lines-darker\"],\n \"orientation\": \"up\"\n }\n },\n\n \"add-to-cart-button\": {\n \"props\": {\n \"addToCartFeedback\": \"customEvent\",\n \"customPixelEventId\": \"add-to-cart-button\"\n }\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_b5695df6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/sellers.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.sellers\": {\n \"blocks\": [\n \"responsive-layout.desktop#sellerPage\",\n \"responsive-layout.mobile#sellerPage\"\n ]\n },\n \"responsive-layout.desktop#sellerPage\": {\n \"children\": [\n \"seller-table#desktop\"\n ]\n },\n \"responsive-layout.mobile#sellerPage\": {\n \"children\": [\n \"seller-table#mobile\"\n ]\n },\n \"seller-table#desktop\": {\n \"children\": [\n \"flex-layout.row#sellerLayout\"\n ]\n },\n \"flex-layout.row#sellerLayout\": {\n \"children\": [\n \"flex-layout.col#sellerPageProduct\",\n \"flex-layout.col#sellersList\"\n ],\n \"props\": {\n \"colSizing\": \"auto\",\n \"fullWidth\": true,\n \"colGap\": 8,\n \"blockClass\": \"sellersPageLayout\"\n }\n },\n \"flex-layout.col#sellersList\": {\n \"children\": [\n \"seller-body\"\n ],\n \"props\": {\n \"preventVerticalStretch\": true,\n \"width\": \"grow\"\n }\n },\n \"flex-layout.col#sellerPageProduct\": {\n \"children\": [\n \"flex-layout.col#productSellersPage\",\n \"flex-layout.row#simulateShipping\"\n ]\n },\n \"flex-layout.row#simulateShipping\": {\n \"children\": [\n \"seller-simulate-shipping\"\n ]\n },\n \"flex-layout.col#productSellersPage\": {\n \"children\": [\n \"product-images#sellers\",\n \"vtex.store-components:product-name\",\n \"product-identifier.product\"\n ],\n \"props\": {\n \"blockClass\": [\n \"productBoxSellersPage\",\n \"productSellersPageCol\"\n ]\n }\n },\n \"seller-body\": {\n \"children\": [\n \"seller-row\"\n ]\n },\n \"seller-row\": {\n \"children\": [\n \"vtex.seller-selector:seller-name\",\n \"vtex.seller-selector:seller-price\",\n \"seller-shipping\",\n \"seller-price-with-shipping\",\n \"seller-add-to-cart\"\n ]\n },\n \"seller-add-to-cart\": {\n \"blocks\": [\n \"add-to-cart-button\"\n ]\n },\n \"product-images#sellers\": {\n \"props\": {\n \"blockClass\": \"sellersPage\",\n \"aspectRatio\": \"1:1\",\n \"displayThumbnailsArrows\": false,\n \"maxHeight\": 168,\n \"showNavigationArrows\": false,\n \"showPaginationDots\": false,\n \"thumbnailMaxHeight\": 0,\n \"zoomMode\": \"disabled\",\n \"contentType\": \"images\"\n }\n },\n \"seller-table#mobile\": {\n \"children\": [\n \"flex-layout.row#sellerLayoutMobile\"\n ]\n },\n \"flex-layout.row#sellerLayoutMobile\": {\n \"children\": [\n \"flex-layout.row#sellerLayoutMobileCol\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"blockClass\": \"sellerLayoutMobile\"\n }\n },\n \"flex-layout.row#sellerLayoutMobileCol\": {\n \"children\": [\n \"flex-layout.row#productBox\",\n \"seller-simulate-shipping\",\n \"flex-layout.col#sellersList\"\n ],\n \"props\": {\n \"rowGap\": 6\n }\n },\n \"flex-layout.row#productBox\": {\n \"children\": [\n \"product-images#sellers\",\n \"flex-layout.col#productBoxInfo\"\n ],\n \"props\": {\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true\n }\n },\n \"flex-layout.col#productBoxInfo\": {\n \"children\": [\n \"vtex.store-components:product-name\",\n \"product-identifier.product\"\n ],\n \"props\": {\n \"verticalAlign\": \"middle\",\n \"preventVerticalStretch\": true,\n \"rowGap\": 0\n }\n }\n}\n```" } ]
code_b2cstoreqa.theme_1dd1bc94
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/newsletter.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n // Deprecated\n \"newsletter\": {\n \"props\": {\n \"label\": \"Get news and special offers!\",\n \"placeholder\": \"Email address\",\n \"submit\": \"submit\"\n }\n },\n\n \"flex-layout.row#newsletter\": {\n \"children\": [\"rich-text#newsletter-title\", \"newsletter-form\"],\n \"props\": {\n \"blockClass\": [\"items-center\", \"bg-fresh-blue\", \"c-on-base--inverted\"],\n \"paddingBottom\": {\n \"desktop\": 0,\n \"mobile\": 7\n },\n \"fullWidth\": false\n }\n },\n\n \"rich-text#newsletter-title\": {\n \"props\": {\n \"blockClass\": [\"newsletter-title\"],\n \"text\": \"### Get news and special offers!\",\n \"textColor\": \"c-on-base--inverted\"\n }\n },\n\n \"newsletter-form\": {\n \"children\": [\"flex-layout.row#newsletter-content\"]\n },\n\n \"flex-layout.row#newsletter-content\": {\n \"children\": [\"flex-layout.col#newsletter-input-email\", \"newsletter-submit\"],\n \"props\": {\n \"colGap\": 0,\n \"colSizing\": \"auto\",\n \"fullWidth\": true,\n \"preserveLayoutOnMobile\": true,\n \"preventHorizontalStretch\": true,\n \"preventVerticalStretch\": true\n }\n },\n\n \"flex-layout.col#newsletter-input-email\": {\n \"children\": [\"newsletter-input-email\"],\n \"props\": {\n \"width\": \"grow\"\n }\n }\n}\n\n```" } ]
code_b2cstoreqa.theme_4a41ab0a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of b2cstoreqa.theme/store/blocks/ordequote.jsonc from the b2cstoreqa.theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.orderquote\": {\n \"blocks\": [\"orderquote\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n },\n \"store.create\": {\n \"blocks\": [\"create\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n },\n \"store.view\": {\n \"blocks\": [\"view\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n }\n}\n\n```" } ]