id
stringlengths 12
53
| messages
listlengths 3
3
|
|---|---|
code_product-list_cb2605cb
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/de.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# verfügbares Produkt} other {# verfügbare Produkte}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nicht verfügbares Produkt} other {# nicht verfügbare Produkte}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dieses Produkt kann nicht an die angegebene Adresse geliefert werden.\",\n \"store/product-list.message.noLongerAvailable\": \"Dieses Produkt ist nicht mehr erhältlich.\",\n \"store/product-list.message.remove\": \"entfernen\",\n \"store/product-list.quantity-selector.remove\": \"Entfernen\",\n \"store/product-list.quantity-label\": \"{quantity} Un.\",\n \"store/product-list.delete-button.default-label\": \"Produkt entfernen\",\n \"store/product-list.priceChanged\": \"Geändert\",\n \"store/product-list.priceOptions\": \"Preisoptionen\",\n \"store/product-list.changePrice\": \"Preis ändern\",\n \"store/product-list.revertToOriginal\": \"Zurück zum Original\",\n \"store/product-list.originalPrice\": \"Originalpreis\",\n \"store/product-list.changeTo\": \"Wechseln zu\",\n \"store/product-list.manualPricePlaceholder\": \"Geben Sie einen Geldwert ein\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dieses Produkt wird in Bruchteilen von {unitMultiplier}{measurementUnit} verkauft. Daher wurde die eingesetzte Menge auf {roundedValue}{measurementUnit} gerundet.\",\n \"store/product-list.quantityStepper.label\": \"Produktmenge\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Menge erhöhen\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Menge verringern\"\n}\n\n```"
}
] |
code_product-list_67474932
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ru.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"за {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# доступный товар} few {# доступных товара} many {# доступных товаров} other {# доступных товаров}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# недоступный товар} few {# недоступных товара} many {# недоступных товаров} other {# недоступных товаров}}\",\n \"store/product-list.message.cantBeDelivered\": \"Данный товар нельзя доставить по указанному адресу.\",\n \"store/product-list.message.noLongerAvailable\": \"Товар больше недоступен.\",\n \"store/product-list.message.remove\": \"удалить\",\n \"store/product-list.quantity-selector.remove\": \"Удалить\",\n \"store/product-list.quantity-label\": \"{quantity} шт.\",\n \"store/product-list.delete-button.default-label\": \"Удалить товар\",\n \"store/product-list.priceChanged\": \"Изменено\",\n \"store/product-list.priceOptions\": \"Варианты цены\",\n \"store/product-list.changePrice\": \"Изменить цену\",\n \"store/product-list.revertToOriginal\": \"Вернуться к начальной\",\n \"store/product-list.originalPrice\": \"Начальная цена\",\n \"store/product-list.changeTo\": \"Изменить на\",\n \"store/product-list.manualPricePlaceholder\": \"Введите цену\",\n \"store/product-list.applyManualPrice\": \"хорошо\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Этот товар продается по {unitMultiplier} {measurementUnit}. В связи с этим указанное количество было округлено до {roundedValue} {measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Количество товара\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Увеличить количество\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Уменьшить количество\"\n}\n\n```"
}
] |
code_product-list_74d6d8c9
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/pl.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostępny produkt} few {# dostępne produkty} other {# dostępne produkty}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# niedostępny produkt} other {# niedostępne produkty}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tego produktu nie można dostarczyć pod podany adres.\",\n \"store/product-list.message.noLongerAvailable\": \"Ten produkt nie jest już dostępny.\",\n \"store/product-list.message.remove\": \"usuń\",\n \"store/product-list.quantity-selector.remove\": \"Usuń\",\n \"store/product-list.quantity-label\": \"{quantity} nied.\",\n \"store/product-list.delete-button.default-label\": \"Usuń produkt\",\n \"store/product-list.priceChanged\": \"Zmieniono\",\n \"store/product-list.priceOptions\": \"Opcje cenowe\",\n \"store/product-list.changePrice\": \"Zmień cenę\",\n \"store/product-list.revertToOriginal\": \"Przywróć oryginalne\",\n \"store/product-list.originalPrice\": \"Oryginalna cena\",\n \"store/product-list.changeTo\": \"Zmień na\",\n \"store/product-list.manualPricePlaceholder\": \"Wpisz wartość pieniężną\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Ten produkt jest sprzedawany według ułamków {unitMultiplier}{measurementUnit}. Biorąc to pod uwagę, wstawiona ilość została zaokrąglona do {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Ilość produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zwiększ ilość\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Zmniejsz ilość\"\n}\n\n```"
}
] |
code_product-list_692eaae1
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/uk.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"за {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# наявний товар} few {# наявні товари} many {# наявних товарів} other {# наявних товарів}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# товар недоступний} few {# товари недоступні} many {# товарів недоступні} other {# товарів недоступні}}\",\n \"store/product-list.message.cantBeDelivered\": \"Цей товар не можна доставити за вказаною адресою.\",\n \"store/product-list.message.noLongerAvailable\": \"Товар більше не доступний.\",\n \"store/product-list.message.remove\": \"прибрати\",\n \"store/product-list.quantity-selector.remove\": \"Видалити\",\n \"store/product-list.quantity-label\": \"{quantity} шт.\",\n \"store/product-list.delete-button.default-label\": \"Видалити товар\",\n \"store/product-list.priceChanged\": \"Змінено\",\n \"store/product-list.priceOptions\": \"Варіанти вартості\",\n \"store/product-list.changePrice\": \"Змінити ціну\",\n \"store/product-list.revertToOriginal\": \"Повернутися до початкової\",\n \"store/product-list.originalPrice\": \"Початкова ціна\",\n \"store/product-list.changeTo\": \"Змінити на\",\n \"store/product-list.manualPricePlaceholder\": \"Введіть ціну\",\n \"store/product-list.applyManualPrice\": \"добре\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Цей товар продається по {unitMultiplier} {measurementUnit}. Через це введена кількість була округлена до {roundedValue} {measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Кількість товару\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Збільшити кількість\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Зменшити кількість\"\n}\n\n```"
}
] |
code_product-list_a3893cf8
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ko-KR.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"{unitMultiplier} {measurementUnit}당.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {#가능한 제품} other {#개의 가능한 제품}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# 불가한 제품} other {#개의 불가한 제품}}\",\n \"store/product-list.message.cantBeDelivered\": \"이 제품은 제공된 주소로 배송할 수 없습니다.\",\n \"store/product-list.message.noLongerAvailable\": \"이 제품은 더 이상 사용할 수 없습니다.\",\n \"store/product-list.message.remove\": \"제거\",\n \"store/product-list.quantity-selector.remove\": \"제거\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"제품 제거\",\n \"store/product-list.priceChanged\": \"변경됨\",\n \"store/product-list.priceOptions\": \"가격 옵션\",\n \"store/product-list.changePrice\": \"가격 변경\",\n \"store/product-list.revertToOriginal\": \"본래대로 되돌리기\",\n \"store/product-list.originalPrice\": \"정가\",\n \"store/product-list.changeTo\": \"변경\",\n \"store/product-list.manualPricePlaceholder\": \"통화 값 입력\",\n \"store/product-list.applyManualPrice\": \"확인\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"이 제품은 {unitMultiplier}{measurementUnit}의 일부로 판매됩니다. 따라서 삽입된 수량은 {roundedValue}{measurementUnit}로 반올림되었습니다.\",\n \"store/product-list.quantityStepper.label\": \"제품 수량\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"수량 올리기\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"수량 내리기\"\n}\n\n```"
}
] |
code_product-list_5ccc6e5a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/fi.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# saatavilla oleva tuote} other {# saatavilla olevaa tuotetta}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# tuote ei saatavilla} other {# tuotetta ei saatavilla}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tätä tuotetta ei voida toimittaa antamaasi osoitteeseen.\",\n \"store/product-list.message.noLongerAvailable\": \"Tätä tuotetta ei ole enää saatavilla.\",\n \"store/product-list.message.remove\": \"poista\",\n \"store/product-list.quantity-selector.remove\": \"Poista\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Poista tuote\",\n \"store/product-list.priceChanged\": \"Muutettu\",\n \"store/product-list.priceOptions\": \"Hinta-asetukset\",\n \"store/product-list.changePrice\": \"Muuta hintaa\",\n \"store/product-list.revertToOriginal\": \"Palauta alkuperäiseen\",\n \"store/product-list.originalPrice\": \"Alkuperäinen hinta\",\n \"store/product-list.changeTo\": \"Muuta täksi\",\n \"store/product-list.manualPricePlaceholder\": \"Kirjoita rahallinen arvo\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tätä tuotetta myydään {unitMultiplier}{measurementUnit} murto-osissa. Tämän vuoksi syötetty määrä on pyöristetty summaan {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Tuotemäärä\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Lisää määrää\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Vähennä määrää\"\n}\n\n```"
}
] |
code_product-list_be5d4a62
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/bg-BG.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"на {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# наличен продукт} other {# налични продукта}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# неналичен продукт} other {# неналични продукта}}\",\n \"store/product-list.message.cantBeDelivered\": \"Този продукт не може да бъде доставен до предоставения адрес.\",\n \"store/product-list.message.noLongerAvailable\": \"Продуктът вече не е наличен.\",\n \"store/product-list.message.remove\": \"премахване\",\n \"store/product-list.quantity-selector.remove\": \"Премахване\",\n \"store/product-list.quantity-label\": \"{quantity} ед.\",\n \"store/product-list.delete-button.default-label\": \"Премахване на продукт\",\n \"store/product-list.priceChanged\": \"Променено\",\n \"store/product-list.priceOptions\": \"Ценови опции\",\n \"store/product-list.changePrice\": \"Промяна на цената\",\n \"store/product-list.revertToOriginal\": \"Връщане към първоначалното състояние\",\n \"store/product-list.originalPrice\": \"Първоначална цена\",\n \"store/product-list.changeTo\": \"Промяна на\",\n \"store/product-list.manualPricePlaceholder\": \"Вид парична стойност\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Този продукт се продава на части от {unitMultiplier}{measurementUnit}. Предвид това вмъкнатото количество е закръглено на {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Количество продукт\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Увеличаване на количеството\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Намаляване на количеството\"\n}\n\n```"
}
] |
code_product-list_0d16d2f6
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/sk.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostupný produkt} few {# dostupné produkty} many {# dostupných produktov} other {# dostupných produktov}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nedostupný produkt} few {# nedostupné produkty} many {# nedostupných produktov} other {# nedostupných produktov}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tento produkt nie je možné doručiť na uvedenú adresu.\",\n \"store/product-list.message.noLongerAvailable\": \"Tento produkt už nie je dostupný.\",\n \"store/product-list.message.remove\": \"odstrániť\",\n \"store/product-list.quantity-selector.remove\": \"Odstrániť\",\n \"store/product-list.quantity-label\": \"{quantity} kus.\",\n \"store/product-list.delete-button.default-label\": \"Odstrániť produkt\",\n \"store/product-list.priceChanged\": \"Zmenené\",\n \"store/product-list.priceOptions\": \"Možnosti ceny\",\n \"store/product-list.changePrice\": \"Zmeniť cenu\",\n \"store/product-list.revertToOriginal\": \"Vrátiť sa k pôvodnej možnosti\",\n \"store/product-list.originalPrice\": \"Pôvodná cena\",\n \"store/product-list.changeTo\": \"Zmeniť na\",\n \"store/product-list.manualPricePlaceholder\": \"Zadajte peňažnú hodnotu\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tento produkt sa predáva v násobkoch {unitMultiplier}{measurementUnit}. Vzhľadom na to bolo vložené množstvo zaokrúhlené na {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Množstvo produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zvýšiť množstvo\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Znížiť množstvo\"\n}\n\n```"
}
] |
code_product-list_cf3beb8a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/id-ID.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produk tersedia} other {# produk tersedia}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produk tersedia} other {# produk tersedia}}\",\n \"store/product-list.message.cantBeDelivered\": \"Produk ini tidak dapat dikirim ke alamat yang diberikan.\",\n \"store/product-list.message.noLongerAvailable\": \"Produk ini tidak tersedia lagi.\",\n \"store/product-list.message.remove\": \"hapus\",\n \"store/product-list.quantity-selector.remove\": \"Hapus\",\n \"store/product-list.quantity-label\": \"{quantity} unit\",\n \"store/product-list.delete-button.default-label\": \"Hapus Produk\",\n \"store/product-list.priceChanged\": \"Berubah\",\n \"store/product-list.priceOptions\": \"Opsi harga\",\n \"store/product-list.changePrice\": \"Ubah harga\",\n \"store/product-list.revertToOriginal\": \"Kembalikan ke aslinya\",\n \"store/product-list.originalPrice\": \"Harga asli\",\n \"store/product-list.changeTo\": \"Ubah ke\",\n \"store/product-list.manualPricePlaceholder\": \"Ketik nilai uang\",\n \"store/product-list.applyManualPrice\": \"oke\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Produk ini dijual berdasarkan pecahan {unitMultiplier}{measurementUnit}. Karenanya, jumlah yang dimasukkan telah dibulatkan ke {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Jumlah produk\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Naikkan jumlah\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Turunkan jumlah\"\n}\n\n```"
}
] |
code_product-list_312fffca
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/pt.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"por {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produto disponível} other {# produtos disponíveis}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produto indisponível} other {# produtos indisponíveis}}\",\n \"store/product-list.message.cantBeDelivered\": \"Este produto não pode ser entregue no endereço fornecido.\",\n \"store/product-list.message.noLongerAvailable\": \"Este produto não está mais disponível.\",\n \"store/product-list.message.remove\": \"remover\",\n \"store/product-list.quantity-selector.remove\": \"Remover\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Remover Produto\",\n \"store/product-list.priceChanged\": \"Alterado\",\n \"store/product-list.priceOptions\": \"Opções de preço\",\n \"store/product-list.changePrice\": \"Alterar preço\",\n \"store/product-list.revertToOriginal\": \"Reverter preço\",\n \"store/product-list.originalPrice\": \"Preço original\",\n \"store/product-list.changeTo\": \"Alterar para\",\n \"store/product-list.manualPricePlaceholder\": \"Digite um valor\",\n \"store/product-list.applyManualPrice\": \"Aplicar\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Esse produto é vendido por frações de {unitMultiplier}{measurementUnit}. Por isso, a quantidade inserida foi arredondada para {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantidade do produto\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aumentar quantidade\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Decrementar quantidade\"\n}\n\n```"
}
] |
code_product-list_9c17b6f7
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ar-SA.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"لكل {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# منتج متاح} other {# منتجات متاحة}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# منتج غير متاح} other {# منتجات غير متاحة}}\",\n \"store/product-list.message.cantBeDelivered\": \"لا يمكن توصيل هذا المنتج إلى العنوان المقدم.\",\n \"store/product-list.message.noLongerAvailable\": \"هذا المنتج لم يعد متاحًا.\",\n \"store/product-list.message.remove\": \"حذف\",\n \"store/product-list.quantity-selector.remove\": \"حذف\",\n \"store/product-list.quantity-label\": \"{quantity}.\",\n \"store/product-list.delete-button.default-label\": \"حذف منتج\",\n \"store/product-list.priceChanged\": \"تبديل\",\n \"store/product-list.priceOptions\": \"خيارات السعر\",\n \"store/product-list.changePrice\": \"تغيير السعر\",\n \"store/product-list.revertToOriginal\": \"تحويل إلى الأصلي\",\n \"store/product-list.originalPrice\": \"السعر الأصلي\",\n \"store/product-list.changeTo\": \"تغيير إلى\",\n \"store/product-list.manualPricePlaceholder\": \"اكتب قيمة نقدية\",\n \"store/product-list.applyManualPrice\": \"موافق\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"يُباع هذا المنتج بأجزاء من {unitMultiplier}{measurementUnit}. بالنظر إلى ذلك، تم تقريب الكمية المدرجة إلى {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"كمية المنتج\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"زيادة الكمية\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"إنقاص الكمية\"\n}\n\n```"
}
] |
code_product-list_069c52a7
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/en.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# available product} other {# available products}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# unavailable product} other {# unavailable products}}\",\n \"store/product-list.message.cantBeDelivered\": \"This product cannot be delivered to the address provided.\",\n \"store/product-list.message.noLongerAvailable\": \"This product is no longer available.\",\n \"store/product-list.message.remove\": \"remove\",\n \"store/product-list.quantity-selector.remove\": \"Remove\",\n \"store/product-list.quantity-label\": \"{quantity} unit(s)\",\n \"store/product-list.delete-button.default-label\": \"Remove Product\",\n \"store/product-list.priceChanged\": \"Changed\",\n \"store/product-list.priceOptions\": \"Price options\",\n \"store/product-list.changePrice\": \"Change Price\",\n \"store/product-list.revertToOriginal\": \"Revert to Original\",\n \"store/product-list.originalPrice\": \"Original price\",\n \"store/product-list.changeTo\": \"Change to\",\n \"store/product-list.manualPricePlaceholder\": \"Enter an amount\",\n \"store/product-list.applyManualPrice\": \"OK\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"This product is sold by fractions of {unitMultiplier}{measurementUnit}. That is why the entered quantity has been rounded to {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Product quantity\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Increase quantity\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Decrease quantity\"\n}\n\n```"
}
] |
code_product-list_4f60ce00
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/hu-HU.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"/ {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# termék érhető el} other {# termék érhető el}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# termék nem érhető el} other {# termék nem érhető el}}\",\n \"store/product-list.message.cantBeDelivered\": \"Ez a termék nem kézbesíthető a megadott címre.\",\n \"store/product-list.message.noLongerAvailable\": \"Ez a termék már nem érhető el.\",\n \"store/product-list.message.remove\": \"eltávolítás\",\n \"store/product-list.quantity-selector.remove\": \"Eltávolítás\",\n \"store/product-list.quantity-label\": \"{quantity} egység\",\n \"store/product-list.delete-button.default-label\": \"Termék eltávolítása\",\n \"store/product-list.priceChanged\": \"Módosítva\",\n \"store/product-list.priceOptions\": \"Árlehetőségek\",\n \"store/product-list.changePrice\": \"Ár módosítása\",\n \"store/product-list.revertToOriginal\": \"Visszaállítás ez eredetire\",\n \"store/product-list.originalPrice\": \"Eredeti ár\",\n \"store/product-list.changeTo\": \"Módosítás a következőre:\",\n \"store/product-list.manualPricePlaceholder\": \"Írja be a pénzbeli értéket\",\n \"store/product-list.applyManualPrice\": \"rendben\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Ezt a terméket {unitMultiplier}{measurementUnit} kiadásokban értékesítik. Ezért a megadott mennyiség kerekítésre került: {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Termékmennyiség\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Mennyiség növelése\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Mennyiség csökkentése\"\n}\n\n```"
}
] |
code_product-list_ebf0b0f2
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/it.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# prodotto disponibile} other {# prodotti disponibili}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# prodotto non disponibile} other {# prodotti non disponibili}}\",\n \"store/product-list.message.cantBeDelivered\": \"Questo prodotto non può essere consegnalo presso l'indirizzo indicato.\",\n \"store/product-list.message.noLongerAvailable\": \"Questo prodotto non è più disponibile.\",\n \"store/product-list.message.remove\": \"rimuovi\",\n \"store/product-list.quantity-selector.remove\": \"Rimuovi\",\n \"store/product-list.quantity-label\": \"{quantity}.\",\n \"store/product-list.delete-button.default-label\": \"Rimuovi prodotto\",\n \"store/product-list.priceChanged\": \"Modificato\",\n \"store/product-list.priceOptions\": \"Opzioni di prezzo\",\n \"store/product-list.changePrice\": \"Modifica il prezzo\",\n \"store/product-list.revertToOriginal\": \"Ripristina l'originale\",\n \"store/product-list.originalPrice\": \"Prezzo originale\",\n \"store/product-list.changeTo\": \"Modifica in\",\n \"store/product-list.manualPricePlaceholder\": \"Inserisci una valuta\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Questo prodotto è venduto per frazioni di {unitMultiplier}{measurementUnit}. Per questo motivo, la quantità inserita è stata arrotondata a {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantità del prodotto\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aumenta la quantità\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Riduci la quantità\"\n}\n\n```"
}
] |
code_product-list_b2dc6564
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/no-NO.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dette produktet kan ikke leveres til den oppgitte adressen.\",\n \"store/product-list.message.noLongerAvailable\": \"Produktet er ikke lenger tilgjengelig.\",\n \"store/product-list.message.remove\": \"fjern\",\n \"store/product-list.quantity-selector.remove\": \"Fjern\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Fjern produkt\",\n \"store/product-list.priceChanged\": \"Endret\",\n \"store/product-list.priceOptions\": \"Prisalternativer\",\n \"store/product-list.changePrice\": \"Endre pris\",\n \"store/product-list.revertToOriginal\": \"Gå tilbake til originalen\",\n \"store/product-list.originalPrice\": \"Opprinnelig pris\",\n \"store/product-list.changeTo\": \"Endre til\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv inn en pengeverdi\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dette produktet selges i brøkdeler av {unitMultiplier}{measurementUnit}. Gitt at det innsatte antallet har blitt avrundet til {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktantall\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Øk antall\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Reduser antall\"\n}\n\n```"
}
] |
code_product-list_2bf13493
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/sv-SE.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tillgänglig produkt} other {# tillgängliga produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# otillgänglig produkt} other {# otillgängliga produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Denna produkt kan inte levereras till den angivna adressen.\",\n \"store/product-list.message.noLongerAvailable\": \"Produkten är inte längre tillgänglig.\",\n \"store/product-list.message.remove\": \"ta bort\",\n \"store/product-list.quantity-selector.remove\": \"Ta bort\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Ta bort produkten\",\n \"store/product-list.priceChanged\": \"Förändrad\",\n \"store/product-list.priceOptions\": \"Prisalternativ\",\n \"store/product-list.changePrice\": \"Ändra priset\",\n \"store/product-list.revertToOriginal\": \"Återställ till original\",\n \"store/product-list.originalPrice\": \"Ordinarie pris\",\n \"store/product-list.changeTo\": \"Byt till\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv in ett monetärt värde\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Denna produkt säljs med bråkdelar av {unitMultiplier}{measurementUnit}. Eftersom den insatta kvantiteten har avrundats till {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktkvantitet\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Öka kvantiteten\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Minska kvantiteten\"\n}\n\n```"
}
] |
code_product-list_0e58ae4a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ro-RO.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produs disponibil} other {# produse disponibile}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produs indisponibil} other {# produse indisponibile}}\",\n \"store/product-list.message.cantBeDelivered\": \"Acest produs nu poate fi livrat la adresa furnizată.\",\n \"store/product-list.message.noLongerAvailable\": \"Acest produs nu este mai este disponibil.\",\n \"store/product-list.message.remove\": \"înlătură\",\n \"store/product-list.quantity-selector.remove\": \"Șterge\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Șterge produsul\",\n \"store/product-list.priceChanged\": \"Modificat\",\n \"store/product-list.priceOptions\": \"Opțiuni preț\",\n \"store/product-list.changePrice\": \"Modifică prețul\",\n \"store/product-list.revertToOriginal\": \"Revino la original\",\n \"store/product-list.originalPrice\": \"Preț original\",\n \"store/product-list.changeTo\": \"Schimbă în\",\n \"store/product-list.manualPricePlaceholder\": \"Introdu o valoare monetară\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Produsul este vândut prin fracțiuni de {unitMultiplier}{measurementUnit}. În aceste condiții, cantitatea introdusă a fost rotunjită la {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Cantitate produs\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Crește cantitatea\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Scade cantitatea\"\n}\n\n```"
}
] |
code_product-list_bcab2444
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/sk-SK.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostupný produkt} few {# dostupné produkty} many {# dostupných produktov} other {# dostupných produktov}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nedostupný produkt} few {# nedostupné produkty} many {# nedostupných produktov} other {# nedostupných produktov}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tento produkt nie je možné doručiť na uvedenú adresu.\",\n \"store/product-list.message.noLongerAvailable\": \"Tento produkt už nie je dostupný.\",\n \"store/product-list.message.remove\": \"odstrániť\",\n \"store/product-list.quantity-selector.remove\": \"Odstrániť\",\n \"store/product-list.quantity-label\": \"{quantity} kus.\",\n \"store/product-list.delete-button.default-label\": \"Odstrániť produkt\",\n \"store/product-list.priceChanged\": \"Zmenené\",\n \"store/product-list.priceOptions\": \"Možnosti ceny\",\n \"store/product-list.changePrice\": \"Zmeniť cenu\",\n \"store/product-list.revertToOriginal\": \"Vrátiť sa k pôvodnej možnosti\",\n \"store/product-list.originalPrice\": \"Pôvodná cena\",\n \"store/product-list.changeTo\": \"Zmeniť na\",\n \"store/product-list.manualPricePlaceholder\": \"Zadajte peňažnú hodnotu\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tento produkt sa predáva v násobkoch {unitMultiplier}{measurementUnit}. Vzhľadom na to bolo vložené množstvo zaokrúhlené na {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Množstvo produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zvýšiť množstvo\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Znížiť množstvo\"\n}\n\n```"
}
] |
code_product-list_9c0ab051
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/uk-UA.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"за {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# наявний товар} few {# наявні товари} many {# наявних товарів} other {# наявних товарів}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# товар недоступний} few {# товари недоступні} many {# товарів недоступні} other {# товарів недоступні}}\",\n \"store/product-list.message.cantBeDelivered\": \"Цей товар не можна доставити за вказаною адресою.\",\n \"store/product-list.message.noLongerAvailable\": \"Товар більше не доступний.\",\n \"store/product-list.message.remove\": \"прибрати\",\n \"store/product-list.quantity-selector.remove\": \"Видалити\",\n \"store/product-list.quantity-label\": \"{quantity} шт.\",\n \"store/product-list.delete-button.default-label\": \"Видалити товар\",\n \"store/product-list.priceChanged\": \"Змінено\",\n \"store/product-list.priceOptions\": \"Варіанти вартості\",\n \"store/product-list.changePrice\": \"Змінити ціну\",\n \"store/product-list.revertToOriginal\": \"Повернутися до початкової\",\n \"store/product-list.originalPrice\": \"Початкова ціна\",\n \"store/product-list.changeTo\": \"Змінити на\",\n \"store/product-list.manualPricePlaceholder\": \"Введіть ціну\",\n \"store/product-list.applyManualPrice\": \"добре\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Цей товар продається по {unitMultiplier} {measurementUnit}. Через це введена кількість була округлена до {roundedValue} {measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Кількість товару\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Збільшити кількість\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Зменшити кількість\"\n}\n\n```"
}
] |
code_product-list_defff9b2
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/pl-PL.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostępny produkt} few {# dostępne produkty} other {# dostępne produkty}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# niedostępny produkt} other {# niedostępne produkty}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tego produktu nie można dostarczyć pod podany adres.\",\n \"store/product-list.message.noLongerAvailable\": \"Ten produkt nie jest już dostępny.\",\n \"store/product-list.message.remove\": \"usuń\",\n \"store/product-list.quantity-selector.remove\": \"Usuń\",\n \"store/product-list.quantity-label\": \"{quantity} nied.\",\n \"store/product-list.delete-button.default-label\": \"Usuń produkt\",\n \"store/product-list.priceChanged\": \"Zmieniono\",\n \"store/product-list.priceOptions\": \"Opcje cenowe\",\n \"store/product-list.changePrice\": \"Zmień cenę\",\n \"store/product-list.revertToOriginal\": \"Przywróć oryginalne\",\n \"store/product-list.originalPrice\": \"Oryginalna cena\",\n \"store/product-list.changeTo\": \"Zmień na\",\n \"store/product-list.manualPricePlaceholder\": \"Wpisz wartość pieniężną\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Ten produkt jest sprzedawany według ułamków {unitMultiplier}{measurementUnit}. Biorąc to pod uwagę, wstawiona ilość została zaokrąglona do {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Ilość produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zwiększ ilość\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Zmniejsz ilość\"\n}\n\n```"
}
] |
code_product-list_fc7af616
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/fr.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"par {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produit disponible} other {# produits disponibles}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produit indisponible} other {# produits indisponibles}}\",\n \"store/product-list.message.cantBeDelivered\": \"Ce produit ne peut pas être livré à l'adresse indiquée.\",\n \"store/product-list.message.noLongerAvailable\": \"Ce produit n'est plus disponible.\",\n \"store/product-list.message.remove\": \"retirer\",\n \"store/product-list.quantity-selector.remove\": \"Retirer\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Supprimer le produit\",\n \"store/product-list.priceChanged\": \"Changé\",\n \"store/product-list.priceOptions\": \"Options des prix\",\n \"store/product-list.changePrice\": \"Modifier le prix\",\n \"store/product-list.revertToOriginal\": \"Revenir à la version originale\",\n \"store/product-list.originalPrice\": \"Prix d’origine\",\n \"store/product-list.changeTo\": \"Changer en\",\n \"store/product-list.manualPricePlaceholder\": \"Tapez une valeur monétaire\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Ce produit est vendu par fractions de {unitMultiplier}{measurementUnit}. Compte tenu de cela, la quantité insérée a été arrondie à {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantité du produit\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Augmenter la quantité\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Diminuer la quantité\"\n}\n\n```"
}
] |
code_product-list_6e9fca89
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/da-DK.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"pr {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tilgængeligt produkt} other {# tilgængelige produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# utilgængeligt produkt } other {# utilgængelige produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dette produkt kan ikke leveres til denne adresse.\",\n \"store/product-list.message.noLongerAvailable\": \"Dette produkt er ikke længere tilgængeligt.\",\n \"store/product-list.message.remove\": \"fjern\",\n \"store/product-list.quantity-selector.remove\": \"Fjern\",\n \"store/product-list.quantity-label\": \"{quantity} en.\",\n \"store/product-list.delete-button.default-label\": \"Fjern produkt\",\n \"store/product-list.priceChanged\": \"Ændret\",\n \"store/product-list.priceOptions\": \"Prismuligheder\",\n \"store/product-list.changePrice\": \"Skift pris\",\n \"store/product-list.revertToOriginal\": \"Tilbage til original\",\n \"store/product-list.originalPrice\": \"Original pris\",\n \"store/product-list.changeTo\": \"Skift til\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv en monetær værdi\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dette produkt sælges i brøkdele af {unitMultiplier}{measurementUnit}. I betragtning af at den indsatte mængde er afrundet til {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktantal\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Øg antal\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Sænk antal\"\n}\n\n```"
}
] |
code_product-list_b88b9239
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/el.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"ανά {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# διαθέσιμο προϊόν} other {# διαθέσιμα προϊόντα}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# μη διαθέσιμο προϊόν} other {# μη διαθέσιμα προϊόντα}}\",\n \"store/product-list.message.cantBeDelivered\": \"Αυτό το προϊόν δεν μπορεί να παραδοθεί στην παρεχόμενη διεύθυνση.\",\n \"store/product-list.message.noLongerAvailable\": \"Αυτό το προϊόν δεν είναι πλέον διαθέσιμο.\",\n \"store/product-list.message.remove\": \"αφαίρεση\",\n \"store/product-list.quantity-selector.remove\": \"Αφαιρώ\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Αφαίρεση προϊόντος\",\n \"store/product-list.priceChanged\": \"Άλλαξε\",\n \"store/product-list.priceOptions\": \"Επιλογές τιμής\",\n \"store/product-list.changePrice\": \"Αλλαγή τιμής\",\n \"store/product-list.revertToOriginal\": \"Επιστροφή στο αρχικό\",\n \"store/product-list.originalPrice\": \"Αρχική τιμή\",\n \"store/product-list.changeTo\": \"Άλλαξε σε\",\n \"store/product-list.manualPricePlaceholder\": \"Πληκτρολογήστε μια χρηματική αξία\",\n \"store/product-list.applyManualPrice\": \"οκ\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Αυτό το προϊόν πωλείται με κλάσματα του {unitMultiplier}{measurementUnit}. Δεδομένου αυτού, η εισαγόμενη ποσότητα έχει στρογγυλοποιηθεί σε {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Ποιότητα προϊόντος\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Αύξηση ποσότητας\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Μείωση ποσότητας\"\n}\n\n```"
}
] |
code_product-list_8c9a1f28
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/bg.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"на {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# наличен продукт} other {# налични продукта}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# неналичен продукт} other {# неналични продукта}}\",\n \"store/product-list.message.cantBeDelivered\": \"Този продукт не може да бъде доставен до предоставения адрес.\",\n \"store/product-list.message.noLongerAvailable\": \"Продуктът вече не е наличен.\",\n \"store/product-list.message.remove\": \"премахване\",\n \"store/product-list.quantity-selector.remove\": \"Премахване\",\n \"store/product-list.quantity-label\": \"{quantity} ед.\",\n \"store/product-list.delete-button.default-label\": \"Премахване на продукт\",\n \"store/product-list.priceChanged\": \"Променено\",\n \"store/product-list.priceOptions\": \"Ценови опции\",\n \"store/product-list.changePrice\": \"Промяна на цената\",\n \"store/product-list.revertToOriginal\": \"Връщане към първоначалното състояние\",\n \"store/product-list.originalPrice\": \"Първоначална цена\",\n \"store/product-list.changeTo\": \"Промяна на\",\n \"store/product-list.manualPricePlaceholder\": \"Вид парична стойност\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Този продукт се продава на части от {unitMultiplier}{measurementUnit}. Предвид това вмъкнатото количество е закръглено на {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Количество продукт\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Увеличаване на количеството\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Намаляване на количеството\"\n}\n\n```"
}
] |
code_product-list_4b0251fb
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ro.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produs disponibil} other {# produse disponibile}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produs indisponibil} other {# produse indisponibile}}\",\n \"store/product-list.message.cantBeDelivered\": \"Acest produs nu poate fi livrat la adresa furnizată.\",\n \"store/product-list.message.noLongerAvailable\": \"Acest produs nu este mai este disponibil.\",\n \"store/product-list.message.remove\": \"înlătură\",\n \"store/product-list.quantity-selector.remove\": \"Șterge\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Șterge produsul\",\n \"store/product-list.priceChanged\": \"Modificat\",\n \"store/product-list.priceOptions\": \"Opțiuni preț\",\n \"store/product-list.changePrice\": \"Modifică prețul\",\n \"store/product-list.revertToOriginal\": \"Revino la original\",\n \"store/product-list.originalPrice\": \"Preț original\",\n \"store/product-list.changeTo\": \"Schimbă în\",\n \"store/product-list.manualPricePlaceholder\": \"Introdu o valoare monetară\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Produsul este vândut prin fracțiuni de {unitMultiplier}{measurementUnit}. În aceste condiții, cantitatea introdusă a fost rotunjită la {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Cantitate produs\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Crește cantitatea\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Scade cantitatea\"\n}\n\n```"
}
] |
code_product-list_9f3d56f6
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ca.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# producte disponible} other {# productes disponibles}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# producte no disponible} other {# productes no disponibles}}\",\n \"store/product-list.message.cantBeDelivered\": \"No es pot lliurar aquest producte a l'adreça facilitada.\",\n \"store/product-list.message.noLongerAvailable\": \"Aquest producte ja no està disponible.\",\n \"store/product-list.message.remove\": \"treu-lo\",\n \"store/product-list.quantity-selector.remove\": \"Treu-lo\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Treu el producte\",\n \"store/product-list.priceChanged\": \"Canviat\",\n \"store/product-list.priceOptions\": \"Opcions de preu\",\n \"store/product-list.changePrice\": \"Canvia el preu\",\n \"store/product-list.revertToOriginal\": \"Reverteix-lo a l'original\",\n \"store/product-list.originalPrice\": \"Preu original\",\n \"store/product-list.changeTo\": \"Canvieu-lo a\",\n \"store/product-list.manualPricePlaceholder\": \"Escriviu un valor monetari\",\n \"store/product-list.applyManualPrice\": \"d'acord\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Aquest producte es ven per fraccions de {unitMultiplier}{measurementUnit}. Per aquest motiu, la quantitat inserida s'ha arrodonit a {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantitat de producte\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Augmenta la quantitat\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Disminueix la quantitat\"\n}\n\n```"
}
] |
code_product-list_8e9b4383
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/pt-BR.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"por {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produto disponível} other {# produtos disponíveis}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produto indisponível} other {# produtos indisponíveis}}\",\n \"store/product-list.message.cantBeDelivered\": \"Não é possível entregar este produto no endereço informado.\",\n \"store/product-list.message.noLongerAvailable\": \"Este produto não está mais disponível.\",\n \"store/product-list.message.remove\": \"remover\",\n \"store/product-list.quantity-selector.remove\": \"Remover\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Remover produto\",\n \"store/product-list.priceChanged\": \"Alterado\",\n \"store/product-list.priceOptions\": \"Opções de preço\",\n \"store/product-list.changePrice\": \"Alterar preço\",\n \"store/product-list.revertToOriginal\": \"Reverter preço\",\n \"store/product-list.originalPrice\": \"Preço original\",\n \"store/product-list.changeTo\": \"Alterar para\",\n \"store/product-list.manualPricePlaceholder\": \"Digite um valor\",\n \"store/product-list.applyManualPrice\": \"Aplicar\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Esse produto é vendido por frações de {unitMultiplier}{measurementUnit}. Por isso, a quantidade inserida foi arredondada para {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantidade do produto\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aumentar quantidade\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Diminuir quantidade\"\n}\n\n```"
}
] |
code_product-list_203ab038
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/de-DE.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# verfügbares Produkt} other {# verfügbare Produkte}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nicht verfügbares Produkt} other {# nicht verfügbare Produkte}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dieses Produkt kann nicht an die angegebene Adresse geliefert werden.\",\n \"store/product-list.message.noLongerAvailable\": \"Dieses Produkt ist nicht mehr erhältlich.\",\n \"store/product-list.message.remove\": \"entfernen\",\n \"store/product-list.quantity-selector.remove\": \"Entfernen\",\n \"store/product-list.quantity-label\": \"{quantity} Un.\",\n \"store/product-list.delete-button.default-label\": \"Produkt entfernen\",\n \"store/product-list.priceChanged\": \"Geändert\",\n \"store/product-list.priceOptions\": \"Preisoptionen\",\n \"store/product-list.changePrice\": \"Preis ändern\",\n \"store/product-list.revertToOriginal\": \"Zurück zum Original\",\n \"store/product-list.originalPrice\": \"Originalpreis\",\n \"store/product-list.changeTo\": \"Wechseln zu\",\n \"store/product-list.manualPricePlaceholder\": \"Geben Sie einen Geldwert ein\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dieses Produkt wird in Bruchteilen von {unitMultiplier}{measurementUnit} verkauft. Daher wurde die eingesetzte Menge auf {roundedValue}{measurementUnit} gerundet.\",\n \"store/product-list.quantityStepper.label\": \"Produktmenge\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Menge erhöhen\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Menge verringern\"\n}\n\n```"
}
] |
code_product-list_3cdc628e
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ko.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"{unitMultiplier} {measurementUnit}당.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {#가능한 제품} other {#개의 가능한 제품}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# 불가한 제품} other {#개의 불가한 제품}}\",\n \"store/product-list.message.cantBeDelivered\": \"이 제품은 제공된 주소로 배송할 수 없습니다.\",\n \"store/product-list.message.noLongerAvailable\": \"이 제품은 더 이상 사용할 수 없습니다.\",\n \"store/product-list.message.remove\": \"제거\",\n \"store/product-list.quantity-selector.remove\": \"제거\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"제품 제거\",\n \"store/product-list.priceChanged\": \"변경됨\",\n \"store/product-list.priceOptions\": \"가격 옵션\",\n \"store/product-list.changePrice\": \"가격 변경\",\n \"store/product-list.revertToOriginal\": \"본래대로 되돌리기\",\n \"store/product-list.originalPrice\": \"정가\",\n \"store/product-list.changeTo\": \"변경\",\n \"store/product-list.manualPricePlaceholder\": \"통화 값 입력\",\n \"store/product-list.applyManualPrice\": \"확인\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"이 제품은 {unitMultiplier}{measurementUnit}의 일부로 판매됩니다. 따라서 삽입된 수량은 {roundedValue}{measurementUnit}로 반올림되었습니다.\",\n \"store/product-list.quantityStepper.label\": \"제품 수량\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"수량 올리기\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"수량 내리기\"\n}\n\n```"
}
] |
code_product-list_3dee6a40
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ca-ES.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# producte disponible} other {# productes disponibles}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# producte no disponible} other {# productes no disponibles}}\",\n \"store/product-list.message.cantBeDelivered\": \"No es pot lliurar aquest producte a l'adreça facilitada.\",\n \"store/product-list.message.noLongerAvailable\": \"Aquest producte ja no està disponible.\",\n \"store/product-list.message.remove\": \"treu-lo\",\n \"store/product-list.quantity-selector.remove\": \"Treu-lo\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Treu el producte\",\n \"store/product-list.priceChanged\": \"Canviat\",\n \"store/product-list.priceOptions\": \"Opcions de preu\",\n \"store/product-list.changePrice\": \"Canvia el preu\",\n \"store/product-list.revertToOriginal\": \"Reverteix-lo a l'original\",\n \"store/product-list.originalPrice\": \"Preu original\",\n \"store/product-list.changeTo\": \"Canvieu-lo a\",\n \"store/product-list.manualPricePlaceholder\": \"Escriviu un valor monetari\",\n \"store/product-list.applyManualPrice\": \"d'acord\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Aquest producte es ven per fraccions de {unitMultiplier}{measurementUnit}. Per aquest motiu, la quantitat inserida s'ha arrodonit a {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantitat de producte\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Augmenta la quantitat\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Disminueix la quantitat\"\n}\n\n```"
}
] |
code_product-list_e6715c3d
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/cs-CZ.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price}{perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostupný produkt} other {# dostupné produkty}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nedostupný produkt} other {# nedostupné produkty}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tento produkt nelze doručit na uvedenou adresu.\",\n \"store/product-list.message.noLongerAvailable\": \"Tento produkt již není k dispozici.\",\n \"store/product-list.message.remove\": \"odstranit\",\n \"store/product-list.quantity-selector.remove\": \"Odstranit\",\n \"store/product-list.quantity-label\": \"{quantity} jedn.\",\n \"store/product-list.delete-button.default-label\": \"Odstranit produkt\",\n \"store/product-list.priceChanged\": \"Změněno\",\n \"store/product-list.priceOptions\": \"Cenové možnosti\",\n \"store/product-list.changePrice\": \"Změnit cenu\",\n \"store/product-list.revertToOriginal\": \"Vrátit na původní\",\n \"store/product-list.originalPrice\": \"Původní cena\",\n \"store/product-list.changeTo\": \"Změnit na\",\n \"store/product-list.manualPricePlaceholder\": \"Zadejte peněžní hodnotu\",\n \"store/product-list.applyManualPrice\": \"oK\",\n \"store/product-list.quantitySelector.label\": \"{quantity}{measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity}{measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tento výrobek se prodává po násobcích {unitMultiplier}{measurementUnit}. Vložené množství bylo proto zaokrouhleno na {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Množství produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zvýšit množství\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Snížit množství\"\n}\n\n```"
}
] |
code_product-list_4889bd56
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/fr-FR.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"par {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produit disponible} other {# produits disponibles}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produit indisponible} other {# produits indisponibles}}\",\n \"store/product-list.message.cantBeDelivered\": \"Ce produit ne peut pas être livré à l'adresse indiquée.\",\n \"store/product-list.message.noLongerAvailable\": \"Ce produit n'est plus disponible.\",\n \"store/product-list.message.remove\": \"retirer\",\n \"store/product-list.quantity-selector.remove\": \"Retirer\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Supprimer le produit\",\n \"store/product-list.priceChanged\": \"Changé\",\n \"store/product-list.priceOptions\": \"Options des prix\",\n \"store/product-list.changePrice\": \"Modifier le prix\",\n \"store/product-list.revertToOriginal\": \"Revenir à la version originale\",\n \"store/product-list.originalPrice\": \"Prix d’origine\",\n \"store/product-list.changeTo\": \"Changer en\",\n \"store/product-list.manualPricePlaceholder\": \"Tapez une valeur monétaire\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Ce produit est vendu par fractions de {unitMultiplier}{measurementUnit}. Compte tenu de cela, la quantité insérée a été arrondie à {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Quantité du produit\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Augmenter la quantité\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Diminuer la quantité\"\n}\n\n```"
}
] |
code_product-list_a8c720dc
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/cs.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price}{perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"za {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# dostupný produkt} other {# dostupné produkty}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# nedostupný produkt} other {# nedostupné produkty}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tento produkt nelze doručit na uvedenou adresu.\",\n \"store/product-list.message.noLongerAvailable\": \"Tento produkt již není k dispozici.\",\n \"store/product-list.message.remove\": \"odstranit\",\n \"store/product-list.quantity-selector.remove\": \"Odstranit\",\n \"store/product-list.quantity-label\": \"{quantity} jedn.\",\n \"store/product-list.delete-button.default-label\": \"Odstranit produkt\",\n \"store/product-list.priceChanged\": \"Změněno\",\n \"store/product-list.priceOptions\": \"Cenové možnosti\",\n \"store/product-list.changePrice\": \"Změnit cenu\",\n \"store/product-list.revertToOriginal\": \"Vrátit na původní\",\n \"store/product-list.originalPrice\": \"Původní cena\",\n \"store/product-list.changeTo\": \"Změnit na\",\n \"store/product-list.manualPricePlaceholder\": \"Zadejte peněžní hodnotu\",\n \"store/product-list.applyManualPrice\": \"oK\",\n \"store/product-list.quantitySelector.label\": \"{quantity}{measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity}{measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tento výrobek se prodává po násobcích {unitMultiplier}{measurementUnit}. Vložené množství bylo proto zaokrouhleno na {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Množství produktu\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Zvýšit množství\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Snížit množství\"\n}\n\n```"
}
] |
code_product-list_34efb10a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ru-RU.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"за {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# доступный товар} few {# доступных товара} many {# доступных товаров} other {# доступных товаров}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# недоступный товар} few {# недоступных товара} many {# недоступных товаров} other {# недоступных товаров}}\",\n \"store/product-list.message.cantBeDelivered\": \"Данный товар нельзя доставить по указанному адресу.\",\n \"store/product-list.message.noLongerAvailable\": \"Товар больше недоступен.\",\n \"store/product-list.message.remove\": \"удалить\",\n \"store/product-list.quantity-selector.remove\": \"Удалить\",\n \"store/product-list.quantity-label\": \"{quantity} шт.\",\n \"store/product-list.delete-button.default-label\": \"Удалить товар\",\n \"store/product-list.priceChanged\": \"Изменено\",\n \"store/product-list.priceOptions\": \"Варианты цены\",\n \"store/product-list.changePrice\": \"Изменить цену\",\n \"store/product-list.revertToOriginal\": \"Вернуться к начальной\",\n \"store/product-list.originalPrice\": \"Начальная цена\",\n \"store/product-list.changeTo\": \"Изменить на\",\n \"store/product-list.manualPricePlaceholder\": \"Введите цену\",\n \"store/product-list.applyManualPrice\": \"хорошо\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Этот товар продается по {unitMultiplier} {measurementUnit}. В связи с этим указанное количество было округлено до {roundedValue} {measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Количество товара\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Увеличить количество\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Уменьшить количество\"\n}\n\n```"
}
] |
code_product-list_2a9ca3be
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/id.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# produk tersedia} other {# produk tersedia}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# produk tersedia} other {# produk tersedia}}\",\n \"store/product-list.message.cantBeDelivered\": \"Produk ini tidak dapat dikirim ke alamat yang diberikan.\",\n \"store/product-list.message.noLongerAvailable\": \"Produk ini tidak tersedia lagi.\",\n \"store/product-list.message.remove\": \"hapus\",\n \"store/product-list.quantity-selector.remove\": \"Hapus\",\n \"store/product-list.quantity-label\": \"{quantity} unit\",\n \"store/product-list.delete-button.default-label\": \"Hapus Produk\",\n \"store/product-list.priceChanged\": \"Berubah\",\n \"store/product-list.priceOptions\": \"Opsi harga\",\n \"store/product-list.changePrice\": \"Ubah harga\",\n \"store/product-list.revertToOriginal\": \"Kembalikan ke aslinya\",\n \"store/product-list.originalPrice\": \"Harga asli\",\n \"store/product-list.changeTo\": \"Ubah ke\",\n \"store/product-list.manualPricePlaceholder\": \"Ketik nilai uang\",\n \"store/product-list.applyManualPrice\": \"oke\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Produk ini dijual berdasarkan pecahan {unitMultiplier}{measurementUnit}. Karenanya, jumlah yang dimasukkan telah dibulatkan ke {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Jumlah produk\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Naikkan jumlah\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Turunkan jumlah\"\n}\n\n```"
}
] |
code_product-list_c38c919b
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/no.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dette produktet kan ikke leveres til den oppgitte adressen.\",\n \"store/product-list.message.noLongerAvailable\": \"Produktet er ikke lenger tilgjengelig.\",\n \"store/product-list.message.remove\": \"fjern\",\n \"store/product-list.quantity-selector.remove\": \"Fjern\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Fjern produkt\",\n \"store/product-list.priceChanged\": \"Endret\",\n \"store/product-list.priceOptions\": \"Prisalternativer\",\n \"store/product-list.changePrice\": \"Endre pris\",\n \"store/product-list.revertToOriginal\": \"Gå tilbake til originalen\",\n \"store/product-list.originalPrice\": \"Opprinnelig pris\",\n \"store/product-list.changeTo\": \"Endre til\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv inn en pengeverdi\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dette produktet selges i brøkdeler av {unitMultiplier}{measurementUnit}. Gitt at det innsatte antallet har blitt avrundet til {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktantall\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Øk antall\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Reduser antall\"\n}\n\n```"
}
] |
code_product-list_115d25e2
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/nl-NL.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# beschikbaar product} other {# beschikbare producten}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# niet beschikbaar product} other {# niet beschikbare producten}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dit product kan niet worden geleverd op het opgegeven adres.\",\n \"store/product-list.message.noLongerAvailable\": \"Dit product is niet langer verkrijgbaar.\",\n \"store/product-list.message.remove\": \"verwijder\",\n \"store/product-list.quantity-selector.remove\": \"Verwijder\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Product verwijderen\",\n \"store/product-list.priceChanged\": \"Veranderd\",\n \"store/product-list.priceOptions\": \"Prijsopties\",\n \"store/product-list.changePrice\": \"Prijs wijzigen\",\n \"store/product-list.revertToOriginal\": \"Ga terug naar het origineel\",\n \"store/product-list.originalPrice\": \"Originele prijs\",\n \"store/product-list.changeTo\": \"Wijzigen naar\",\n \"store/product-list.manualPricePlaceholder\": \"Typ een monetaire waarde\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dit product wordt verkocht met een fractie van {unitMultiplier}{measurementUnit}. Gegeven dat, de ingevoegde hoeveelheid is afgerond op {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Productaantal\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aantal verhogen\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Aantal verlagen\"\n}\n\n```"
}
] |
code_product-list_959104ab
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/da.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"pr {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tilgængeligt produkt} other {# tilgængelige produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# utilgængeligt produkt } other {# utilgængelige produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dette produkt kan ikke leveres til denne adresse.\",\n \"store/product-list.message.noLongerAvailable\": \"Dette produkt er ikke længere tilgængeligt.\",\n \"store/product-list.message.remove\": \"fjern\",\n \"store/product-list.quantity-selector.remove\": \"Fjern\",\n \"store/product-list.quantity-label\": \"{quantity} en.\",\n \"store/product-list.delete-button.default-label\": \"Fjern produkt\",\n \"store/product-list.priceChanged\": \"Ændret\",\n \"store/product-list.priceOptions\": \"Prismuligheder\",\n \"store/product-list.changePrice\": \"Skift pris\",\n \"store/product-list.revertToOriginal\": \"Tilbage til original\",\n \"store/product-list.originalPrice\": \"Original pris\",\n \"store/product-list.changeTo\": \"Skift til\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv en monetær værdi\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dette produkt sælges i brøkdele af {unitMultiplier}{measurementUnit}. I betragtning af at den indsatte mængde er afrundet til {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktantal\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Øg antal\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Sænk antal\"\n}\n\n```"
}
] |
code_product-list_37c4fc0c
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/en-US.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# available product} other {# available products}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# unavailable product} other {# unavailable products}}\",\n \"store/product-list.message.cantBeDelivered\": \"This product cannot be delivered to the address provided.\",\n \"store/product-list.message.noLongerAvailable\": \"This product is no longer available.\",\n \"store/product-list.message.remove\": \"remove\",\n \"store/product-list.quantity-selector.remove\": \"Remove\",\n \"store/product-list.quantity-label\": \"{quantity} unit(s)\",\n \"store/product-list.delete-button.default-label\": \"Remove Product\",\n \"store/product-list.priceChanged\": \"Changed\",\n \"store/product-list.priceOptions\": \"Price options\",\n \"store/product-list.changePrice\": \"Change Price\",\n \"store/product-list.revertToOriginal\": \"Revert to Original\",\n \"store/product-list.originalPrice\": \"Original price\",\n \"store/product-list.changeTo\": \"Change to\",\n \"store/product-list.manualPricePlaceholder\": \"Enter an amount\",\n \"store/product-list.applyManualPrice\": \"OK\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"This product is sold by fractions of {unitMultiplier}{measurementUnit}. That is why the entered quantity has been rounded to {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Product quantity\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Increase quantity\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Decrease quantity\"\n}\n\n```"
}
] |
code_product-list_3e80d06e
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/th.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"ต่อ {unitMultiplier} {measurementUnit}\",\n \"store/product-list.availableItems\": \"ผลิตภัณฑ์ที่พร้อม {quantity, plural, one {# รายการ} other {# รายการ}}\",\n \"store/product-list.unavailableItems\": \"ผลิตภัณฑ์ที่ไม่พร้อม {quantity, plural, one {# รายการ} other {# รายการ}}\",\n \"store/product-list.message.cantBeDelivered\": \"ไม่สามารถจัดส่งผลิตภัณฑ์นี้ไปยังที่อยู่ที่ให้มา\",\n \"store/product-list.message.noLongerAvailable\": \"ผลิตภัณฑ์นี้ไม่มีจำหน่ายแล้ว\",\n \"store/product-list.message.remove\": \"ลบออก\",\n \"store/product-list.quantity-selector.remove\": \"ลบออก\",\n \"store/product-list.quantity-label\": \"{quantity} หน่วย\",\n \"store/product-list.delete-button.default-label\": \"ลบผลิตภัณฑ์ออก\",\n \"store/product-list.priceChanged\": \"เปลี่ยนแปลงแล้ว\",\n \"store/product-list.priceOptions\": \"ตัวเลือกราคา\",\n \"store/product-list.changePrice\": \"เปลี่ยนราคา\",\n \"store/product-list.revertToOriginal\": \"เปลี่ยนกลับเป็นค่าเดิม\",\n \"store/product-list.originalPrice\": \"ราคาเดิม\",\n \"store/product-list.changeTo\": \"เปลี่ยนเป็น\",\n \"store/product-list.manualPricePlaceholder\": \"พิมพ์จำนวนเงิน\",\n \"store/product-list.applyManualPrice\": \"ตกลง\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"ผลิตภัณฑ์นี้ขายทีละ {unitMultiplier} {measurementUnit} ดังนั้นจำนวนที่ใส่จะถูกปัดเป็น {roundedValue} {measurementUnit}\",\n \"store/product-list.quantityStepper.label\": \"จำนวนผลิตภัณฑ์\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"จำนวนเพิ่ม\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"จำนวนลด\"\n}\n\n```"
}
] |
code_product-list_aae6df7d
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/sv.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tillgänglig produkt} other {# tillgängliga produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# otillgänglig produkt} other {# otillgängliga produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Denna produkt kan inte levereras till den angivna adressen.\",\n \"store/product-list.message.noLongerAvailable\": \"Produkten är inte längre tillgänglig.\",\n \"store/product-list.message.remove\": \"ta bort\",\n \"store/product-list.quantity-selector.remove\": \"Ta bort\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Ta bort produkten\",\n \"store/product-list.priceChanged\": \"Förändrad\",\n \"store/product-list.priceOptions\": \"Prisalternativ\",\n \"store/product-list.changePrice\": \"Ändra priset\",\n \"store/product-list.revertToOriginal\": \"Återställ till original\",\n \"store/product-list.originalPrice\": \"Ordinarie pris\",\n \"store/product-list.changeTo\": \"Byt till\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv in ett monetärt värde\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Denna produkt säljs med bråkdelar av {unitMultiplier}{measurementUnit}. Eftersom den insatta kvantiteten har avrundats till {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktkvantitet\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Öka kvantiteten\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Minska kvantiteten\"\n}\n\n```"
}
] |
code_product-list_2a58aa80
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/fi-FI.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# saatavilla oleva tuote} other {# saatavilla olevaa tuotetta}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# tuote ei saatavilla} other {# tuotetta ei saatavilla}}\",\n \"store/product-list.message.cantBeDelivered\": \"Tätä tuotetta ei voida toimittaa antamaasi osoitteeseen.\",\n \"store/product-list.message.noLongerAvailable\": \"Tätä tuotetta ei ole enää saatavilla.\",\n \"store/product-list.message.remove\": \"poista\",\n \"store/product-list.quantity-selector.remove\": \"Poista\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Poista tuote\",\n \"store/product-list.priceChanged\": \"Muutettu\",\n \"store/product-list.priceOptions\": \"Hinta-asetukset\",\n \"store/product-list.changePrice\": \"Muuta hintaa\",\n \"store/product-list.revertToOriginal\": \"Palauta alkuperäiseen\",\n \"store/product-list.originalPrice\": \"Alkuperäinen hinta\",\n \"store/product-list.changeTo\": \"Muuta täksi\",\n \"store/product-list.manualPricePlaceholder\": \"Kirjoita rahallinen arvo\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Tätä tuotetta myydään {unitMultiplier}{measurementUnit} murto-osissa. Tämän vuoksi syötetty määrä on pyöristetty summaan {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Tuotemäärä\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Lisää määrää\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Vähennä määrää\"\n}\n\n```"
}
] |
code_product-list_749a6acc
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/nn.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"per {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# tilgjengelig produkt} other {# tilgjengelige produkter}}\",\n \"store/product-list.message.cantBeDelivered\": \"Dette produktet kan ikke leveres til den oppgitte adressen.\",\n \"store/product-list.message.noLongerAvailable\": \"Produktet er ikke lenger tilgjengelig.\",\n \"store/product-list.message.remove\": \"fjern\",\n \"store/product-list.quantity-selector.remove\": \"Fjern\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Fjern produkt\",\n \"store/product-list.priceChanged\": \"Endret\",\n \"store/product-list.priceOptions\": \"Prisalternativer\",\n \"store/product-list.changePrice\": \"Endre pris\",\n \"store/product-list.revertToOriginal\": \"Gå tilbake til originalen\",\n \"store/product-list.originalPrice\": \"Opprinnelig pris\",\n \"store/product-list.changeTo\": \"Endre til\",\n \"store/product-list.manualPricePlaceholder\": \"Skriv inn en pengeverdi\",\n \"store/product-list.applyManualPrice\": \"ok\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Dette produktet selges i brøkdeler av {unitMultiplier}{measurementUnit}. Gitt at det innsatte antallet har blitt avrundet til {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Produktantall\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Øk antall\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Reduser antall\"\n}\n\n```"
}
] |
code_product-list_08e08f4d
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/es.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"por {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# producto disponible} other {# productos disponibles}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# producto no disponible} other {# productos no disponibles}}\",\n \"store/product-list.message.cantBeDelivered\": \"Este producto no se puede entregar en la dirección proporcionada.\",\n \"store/product-list.message.noLongerAvailable\": \"Este producto no está disponible actualmente.\",\n \"store/product-list.message.remove\": \"retirar\",\n \"store/product-list.quantity-selector.remove\": \"Retirar\",\n \"store/product-list.quantity-label\": \"{quantity} un.\",\n \"store/product-list.delete-button.default-label\": \"Eliminar Producto\",\n \"store/product-list.priceChanged\": \"Cambiado\",\n \"store/product-list.priceOptions\": \"Opciones\",\n \"store/product-list.changePrice\": \"Cambio de precio\",\n \"store/product-list.revertToOriginal\": \"Volver al original\",\n \"store/product-list.originalPrice\": \"Original precio\",\n \"store/product-list.changeTo\": \"Cambiar a\",\n \"store/product-list.manualPricePlaceholder\": \"Ingrese un valor monetario\",\n \"store/product-list.applyManualPrice\": \"Aplicar\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"Este producto se vende por fracciones de {unitMultiplier}{measurementUnit}. Por lo tanto, la cantidad ingresada se ha redondeado a {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"Cantidad de producto\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"Aumentar la cantidad\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"Cantidad decreciente\"\n}\n\n```"
}
] |
code_product-list_27e7ad22
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/messages/ar.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"store/product-list.pricePerUnit\": \"{price} {perMeasurementUnit}\",\n \"store/product-list.pricePerUnit.measurementUnit\": \"لكل {unitMultiplier} {measurementUnit}.\",\n \"store/product-list.availableItems\": \"{quantity, plural, one {# منتج متاح} other {# منتجات متاحة}}\",\n \"store/product-list.unavailableItems\": \"{quantity, plural, one {# منتج غير متاح} other {# منتجات غير متاحة}}\",\n \"store/product-list.message.cantBeDelivered\": \"لا يمكن توصيل هذا المنتج إلى العنوان المقدم.\",\n \"store/product-list.message.noLongerAvailable\": \"هذا المنتج لم يعد متاحًا.\",\n \"store/product-list.message.remove\": \"حذف\",\n \"store/product-list.quantity-selector.remove\": \"حذف\",\n \"store/product-list.quantity-label\": \"{quantity}.\",\n \"store/product-list.delete-button.default-label\": \"حذف منتج\",\n \"store/product-list.priceChanged\": \"تبديل\",\n \"store/product-list.priceOptions\": \"خيارات السعر\",\n \"store/product-list.changePrice\": \"تغيير السعر\",\n \"store/product-list.revertToOriginal\": \"تحويل إلى الأصلي\",\n \"store/product-list.originalPrice\": \"السعر الأصلي\",\n \"store/product-list.changeTo\": \"تغيير إلى\",\n \"store/product-list.manualPricePlaceholder\": \"اكتب قيمة نقدية\",\n \"store/product-list.applyManualPrice\": \"موافق\",\n \"store/product-list.quantitySelector.label\": \"{quantity} {measurementUnit}\",\n \"store/product-list.quantitySelector.maxValueLabel\": \"{quantity} {measurementUnit} +\",\n \"store/product-list.quantityUnitMultiplierMismatch\": \"يُباع هذا المنتج بأجزاء من {unitMultiplier}{measurementUnit}. بالنظر إلى ذلك، تم تقريب الكمية المدرجة إلى {roundedValue}{measurementUnit}.\",\n \"store/product-list.quantityStepper.label\": \"كمية المنتج\",\n \"store/product-list.quantityStepper.increaseQuantity\": \"زيادة الكمية\",\n \"store/product-list.quantityStepper.decreaseQuantity\": \"إنقاص الكمية\"\n}\n\n```"
}
] |
code_product-list_19024672
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/docs/README.md from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```markdown\n\n📢 Use this project, [contribute](https://github.com/vtex-apps/product-list) to it or open issues to help evolve it using [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Product List\n\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\nThe Product List component displays all items in the user's cart and informs users when items are unavailable.\n\n> ⚠️ Currently, the Product List only works with [Minicart v2](https://developers.vtex.com/docs/apps/vtex.minicart/).\n\n\n\n## Configuration\n\n1. Add the Product List app to your theme dependencies in `manifest.json`. For example:\n\n```json\n \"dependencies\": {\n \"vtex.product-list\": \"0.x\"\n }\n```\n\n2. Add the `product-list` block to the `minicart-product-list` block (exported by the Minicart app). For example:\n\n```json\n \"minicart-product-list#example\": {\n \"blocks\": [\"product-list\"]\n }\n```\n\nOnce you have added the `product-list` to the `minicart-product-list`, no further actions are required, as the block works with a default implementation behind the scenes. This means that the Product List component is ready to be rendered.\n\n### Advanced configuration\n\nCurrently, the `product-list` default implementation is the following:\n\n```json\n{\n \"product-list\": {\n \"blocks\": [\n \"product-list-content-desktop\", \n \"product-list-content-mobile\"\n ]\n },\n \"product-list-content-desktop\": {\n \"children\": [\"flex-layout.row#list-row.desktop\"]\n },\n \"flex-layout.row#list-row.desktop\": {\n \"children\": [\n \"flex-layout.col#image.desktop\",\n \"flex-layout.col#main-container.desktop\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"paddingBottom\": \"7\",\n \"paddingTop\": \"6\",\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.col#image.desktop\": {\n \"children\": [\"product-list-image\"],\n \"props\": {\n \"marginRight\": \"6\"\n }\n },\n \"flex-layout.col#main-container.desktop\": {\n \"children\": [\n \"flex-layout.row#sub-container.desktop\",\n \"flex-layout.row#message.desktop\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"flex-layout.row#sub-container.desktop\": {\n \"children\": [\n \"flex-layout.col#product-description\",\n \"flex-layout.col#quantity.desktop\",\n \"flex-layout.row#price-remove\"\n ],\n \"props\": {\n \"preserveLayoutOnMobile\": \"true\",\n \"colSizing\": \"auto\"\n }\n },\n \"flex-layout.col#quantity.desktop\": {\n \"children\": [\n \"flex-layout.row#quantity-selector.desktop\",\n \"flex-layout.row#unit-price.desktop\"\n ],\n \"props\": {\n \"marginLeft\": \"8\"\n }\n },\n \"flex-layout.row#price-remove\": {\n \"children\": [\n \"flex-layout.col#price.desktop\",\n \"flex-layout.col#remove-button.desktop\"\n ],\n \"props\": {\n \"colSizing\": \"auto\"\n }\n },\n \"flex-layout.row#quantity-selector.desktop\": {\n \"children\": [\"quantity-selector\"],\n \"props\": {\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"flex-layout.row#unit-price.desktop\": {\n \"children\": [\"unit-price#desktop\"],\n \"props\": {\n \"marginTop\": \"3\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"unit-price#desktop\": {\n \"props\": {\n \"textAlign\": \"center\"\n }\n },\n \"flex-layout.col#price.desktop\": {\n \"children\": [\"price#desktop\"],\n \"props\": {\n \"blockClass\": \"priceWrapper\",\n \"marginLeft\": \"6\",\n \"preventHorizontalStretch\": \"true\",\n \"verticalAlign\": \"middle\"\n }\n },\n \"price#desktop\": {\n \"props\": {\n \"textAlign\": \"right\"\n }\n },\n \"flex-layout.col#remove-button.desktop\": {\n \"children\": [\"remove-button\"],\n \"props\": {\n \"marginLeft\": \"6\",\n \"verticalAlign\": \"middle\"\n }\n },\n \"flex-layout.row#message.desktop\": {\n \"children\": [\"message#desktop\"],\n \"props\": {\n \"marginTop\": \"4\"\n }\n },\n \"message#desktop\": {\n \"props\": {\n \"layout\": \"cols\"\n }\n },\n \"product-list-content-mobile\": {\n \"children\": [\"flex-layout.row#list-row.mobile\"]\n },\n \"flex-layout.row#list-row.mobile\": {\n \"children\": [\n \"flex-layout.col#image.mobile\",\n \"flex-layout.col#main-container.mobile\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"paddingBottom\": \"6\",\n \"paddingTop\": \"5\",\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.col#image.mobile\": {\n \"children\": [\"product-list-image\"],\n \"props\": {\n \"marginRight\": \"5\"\n }\n },\n \"flex-layout.col#main-container.mobile\": {\n \"children\": [\n \"flex-layout.row#top.mobile\",\n \"flex-layout.row#quantity-selector.mobile\",\n \"flex-layout.row#unit-price.mobile\",\n \"flex-layout.row#price.mobile\",\n \"flex-layout.row#message.mobile\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"flex-layout.row#top.mobile\": {\n \"children\": [\n \"flex-layout.col#product-description\",\n \"flex-layout.col#remove-button.mobile\"\n ],\n \"props\": {\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.row#quantity-selector.mobile\": {\n \"children\": [\"quantity-selector\"],\n \"props\": {\n \"marginTop\": \"5\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"flex-layout.row#unit-price.mobile\": {\n \"children\": [\"unit-price\"],\n \"props\": {\n \"marginTop\": \"3\"\n }\n },\n \"flex-layout.row#price.mobile\": {\n \"children\": [\"price#mobile\"],\n \"props\": {\n \"marginTop\": \"5\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"price#mobile\": {\n \"props\": {\n \"textAlign\": \"left\"\n }\n },\n \"flex-layout.col#remove-button.mobile\": {\n \"children\": [\"remove-button\"],\n \"props\": {\n \"marginLeft\": \"3\"\n }\n },\n \"flex-layout.row#message.mobile\": {\n \"children\": [\"message#mobile\"],\n \"props\": {\n \"marginTop\": \"3\"\n }\n },\n \"message#mobile\": {\n \"props\": {\n \"layout\": \"rows\"\n }\n }\n}\n```\n\nThe default implementation means that whenever you declare the `product-list` block in your store, you are actually telling your theme to render the above `json` behind the scenes.\n\nIn order to customize the `product-list` configuration, copy the code above, paste it, and change it as you wish.\n\n| Block name | Description |\n| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `product-list` |  Top level block that must be declared in the `minicart-product-list` block to render a default detailed list with all products added to the shopping cart. |\n| `product-list-content-desktop` | Creates the product list layout for desktop devices. |\n| `product-list-content-mobile` | Creates the product list layout for mobile devices. |\n| `message` | Renders a message about the product availability. |\n| `product-name` | Renders the product names. |\n| `product-reference` | Renders the product reference information. |\n| `price` | Renders the product prices. |\n| `unit-price` | Renders the price for each unit of the product added to the cart. |\n| `product-list-image` | Renders the product images. |\n| `product-brand` | Renders the product brands. |\n| `product-variations` | Renders the product variations. |\n| `product-quantity-label` | Renders a product label that displays the number of items added to the cart. |\n| `quantity-selector` | Renders a selector that allows users to choose how many units of a product they want to add to the cart. |\n| `remove-button` | Renders a button that allows users to remove a product from the list. |\n\n### `minicart-product-list` props\n\n| Prop name | Type | Description | Default value |\n| --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `splitItem` | `boolean` | Determines whether products with attachments should be split and treated as individual items (`true`) or as a single item (`false`) when their quantity is increased in the minicart. | `false` |\n\n\n### `product-list` props\n\n| Prop name | Type | Description | Default value |\n| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `itemCountMode` | `enum` | Quantity badge behavior when displaying the total number of items added in Minicart. Possible values are: `total` (the quantity badge displays the number of items added to the cart), `distinct` (the quantity badge only displays the number of different products added to the cart), `totalAvailable` (the quantity badge displays the number of available items added to the cart), and `distinctAvailable` (the quantity badge only displays the number of different and available products added to the cart). | `distinct` |\n| `lazyRenderHeight` | `number` | The height (px) of each item loading element. | `100` |\n| `lazyRenderOffset` | `number` | The distance (px) that each item should be from the viewport at the time of its rendering. | `300` |\n\n### `message` props\n\n| Prop name | Type | Description | Default value |\n| --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `layout` | `enum` | Position of the availability message in the list. Possible values are: `rows` (displaying the message in the product row) or `cols` (displaying the message in the product column). | `cols` |\n\n### `price` props\n\n| Prop name | Type | Description | Default value |\n| --------------- | --------- | ---------------------------------------------------------------------------------- | ------------- |\n| `textAlign` | `string` | Position of the product's price in the list. | `left` |\n| `showListPrice` | `boolean` | Whether the product prices should be displayed in the list: (`true`) or (`false`). | `true` |\n\n### `unit-price` props\n\n| Prop name | Type | Description | Default value |\n| ---------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `textAlign` | `string` | Position of the product's unit price in the list. | `left` |\n| `unitPriceType` | `enum` | Defines whether the price type should be displayed. Possible values are: `sellingPrice` or `price` | `price` |\n| `unitPriceDisplay` | `enum` | Defines when the unit price should be displayed. Possible values are: `always` (unit price is always displayed) or `default` (unit price is only displayed when the number of products is greater than one). | `default` |\n| `displayUnitListPrice` | `enum` | Defines whether the product list price should be displayed. Possible values are: `showWhenDifferent` (the list price is displayed when it is different from the regular price), and `notShow` (the list price is never displayed). | `notShow` |\n\n### `product-list-image` props\n\n| Prop name | Type | Description | Default value |\n| --------- | -------- | -------------------------------- | ------------- |\n| `width` | `number` | Product image width (in pixels). | `96` |\n\n### `product-reference` props\n\n| Prop name | Type | Description | Default value |\n|:-----------------:|:--------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------:|\n| `identifierLabel` | `string` | Text label to be displayed to the left of the product reference value. | `undefined` |\n| `identifyOption` | `enum` | Desired product reference data, i.e., product identifier, to be displayed. Possible options are: `ProductId`, `ProductSkuItemId`, `ProductReferenceId`, and `ProductSkuReferenceId`. | `ProductReferenceId` |\n\n### `remove-button` props\n\n| Prop name | Type | Description | Default value |\n| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |\n| `variation` | `enum` | Variation for the button's visual prominence based on the [VTEX Styleguide](https://styleguide.vtex.com/#/Components/Forms/Button). Possible values are: `primary`, `secondary`, `tertiary`, `inverted-tertiary`, `danger`, and `danger-tertiary`. | `danger` |\n| `displayMode` | `enum` | Defines how the remove button should be displayed. Possible values are: `icon-button` (renders an icon button), and `text-button` (renders a text message button). If you want to [create a modal in the remove button](https://developers.vtex.com/docs/guides/vtex-io-documentation-creating-modals-using-icons), use the `icon-button` value. | `icon-button` |\n\n### `quantity-selector` props\n\n| Prop name | Type | Description | Default value |\n| ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |\n| `mode` | `enum` | Type of quantity selector input. Possible values are `default`, and `stepper`. In the default mode, the quantity stepper will initially render a dropdown component, and after the quantity exceeds 10, it will switch to an input. The stepper mode will always render a numeric stepper component. | `default` |\n| `quantitySelectorStep` | `enum` | Defines how the number of products that have unitMultiplier will work. Possible values are: `singleUnit` (the quantity will be not affected with the unitMultiplier), and `unitMultiplier` (the quantity will be affected with the unitMultiplier). | `unitMultiplier` |\n\n## Customization\n\nTo apply CSS customizations to this and other blocks, follow the instructions in [Using CSS Handles for store customization](https://developers.vtex.com/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization).\n\n| CSS Handles |\n| ------------------------------------ |\n| `availabilityMessageContainer` |\n| `availabilityMessageTextContainer` |\n| `availabilityMessageText` |\n| `productBrandName` |\n| `productImageAnchor` |\n| `productImageContainer` |\n| `productImage` |\n| `productListAvailableItemsMessage` |\n| `productListItem` |\n| `productListUnavailableItemsMessage` |\n| `productName` |\n| `productPriceContainer` |\n| `productPriceCurrency` |\n| `productPrice` |\n| `productQuantityLabel` |\n| `productIdentifier` |\n| `productIdentifierValue` |\n| `productIdentifierLabelValue` |\n| `productVariationsContainer` |\n| `productVariationsItem` |\n| `quantityDropdownContainer` |\n| `quantityDropdownMobileContainer` |\n| `quantityInputContainer` |\n| `quantityInputMobileContainer` |\n| `quantitySelectorContainer` |\n| `quantitySelectorWrapper` |\n| `quantitySelectorButton` |\n| `quantitySelectorDecrease` |\n| `quantitySelectorIncrease` |\n| `removeButtonContainer` |\n| `item` |\n| `removeButton` |\n| `unitPriceContainer` |\n| `unitListPrice` |\n| `unitPriceMeasurementUnit` |\n| `unitPricePerUnitCurrency` |\n\n<!-- DOCS-IGNORE:start -->\n\n## Contributors ✨\n\nThanks goes to these wonderful people:\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- 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_product-list_abeb8601
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductList.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { ReactNode } from 'react'\nimport React, { useMemo, memo } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport type { Item } from 'vtex.checkout-graphql'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { ItemContextProvider } from './ItemContext'\nimport { AVAILABLE } from './constants/Availability'\nimport { CALL_CENTER_OPERATOR } from './constants/User'\nimport LazyRender from './LazyRender'\n\ntype TotalItemsType =\n | 'total'\n | 'distinct'\n | 'totalAvailable'\n | 'distinctAvailable'\n\ninterface Props {\n allowManualPrice?: boolean\n items: ItemWithIndex[]\n loading: boolean\n userType?: string\n itemCountMode?: TotalItemsType\n onQuantityChange: (\n uniqueId: string,\n value: number,\n item?: ItemWithIndex\n ) => void\n onRemove: (uniqueId: string, item?: ItemWithIndex) => void\n onSetManualPrice?: (price: number, itemIndex: number) => void\n lazyRenderHeight?: number\n lazyRenderOffset?: number\n children: ReactNode\n}\n\ninterface ItemWithIndex extends Item {\n index: number\n}\n\nconst CSS_HANDLES = [\n 'productListItem',\n 'productListUnavailableItemsMessage',\n 'productListAvailableItemsMessage',\n] as const\n\ninterface ItemWrapperProps\n extends Pick<Props, 'onQuantityChange' | 'onRemove'> {\n item: ItemWithIndex\n itemIndex: number\n loading: boolean\n children: ReactNode\n shouldAllowManualPrice: boolean\n onSetManualPrice?: (price: number, itemIndex: number) => void\n lazyRenderHeight?: number\n lazyRenderOffset?: number\n}\n\nconst ItemContextWrapper = memo<ItemWrapperProps>(function ItemContextWrapper({\n item,\n itemIndex,\n loading,\n onQuantityChange,\n onRemove,\n children,\n shouldAllowManualPrice,\n onSetManualPrice,\n lazyRenderHeight,\n lazyRenderOffset,\n}) {\n const context = useMemo(\n () => ({\n item,\n itemIndex,\n loading,\n shouldAllowManualPrice,\n onQuantityChange: (value: number) =>\n onQuantityChange(item.uniqueId, value, item),\n onRemove: () => onRemove(item.uniqueId, item),\n onSetManualPrice: (price: number, index: number) =>\n onSetManualPrice?.(price, index),\n }),\n [\n item,\n itemIndex,\n loading,\n onQuantityChange,\n onRemove,\n onSetManualPrice,\n shouldAllowManualPrice,\n ]\n )\n\n return (\n <LazyRender height={lazyRenderHeight} offset={lazyRenderOffset}>\n <ItemContextProvider value={context}>{children}</ItemContextProvider>\n </LazyRender>\n )\n})\n\nconst countCartItems = (countMode: TotalItemsType, arr: Item[]) => {\n if (countMode === 'distinctAvailable') {\n return arr.reduce((itemQuantity: number, item: Item) => {\n if (item.availability === 'available') {\n return itemQuantity + 1\n }\n\n return itemQuantity\n }, 0)\n }\n\n if (countMode === 'totalAvailable') {\n return arr.reduce((itemQuantity: number, item: Item) => {\n if (item.availability === 'available') {\n return itemQuantity + Number(item.quantity)\n }\n\n return itemQuantity\n }, 0)\n }\n\n if (countMode === 'total') {\n return arr.reduce((itemQuantity: number, item: Item) => {\n return itemQuantity + Number(item.quantity)\n }, 0)\n }\n\n // countMode === 'distinct'\n return arr.length\n}\n\nconst ProductList = memo<Props>(function ProductList(props) {\n const {\n items,\n itemCountMode = 'distinct',\n lazyRenderHeight = 100,\n lazyRenderOffset = 300,\n userType = 'STORE_USER',\n allowManualPrice = false,\n children,\n } = props\n\n const shouldAllowManualPrice =\n allowManualPrice && userType === CALL_CENTER_OPERATOR\n\n const handles = useCssHandles(CSS_HANDLES)\n\n const [availableItems, unavailableItems] = items\n .map((item, index) => ({ ...item, index }))\n .reduce<ItemWithIndex[][]>(\n (acc, item) => {\n acc[item.availability === AVAILABLE ? 0 : 1].push(item)\n\n return acc\n },\n [[], []]\n )\n\n return (\n /* Replacing the outer div by a Fragment may break the layout. See PR #39. */\n <div>\n {unavailableItems.length > 0 ? (\n <div\n id=\"unavailable-items\"\n className={`${handles.productListUnavailableItemsMessage} c-muted-1 bb b--muted-4 fw5 pv5 pl5 pl6-m pl0-l t-heading-5-l`}\n >\n <FormattedMessage\n id=\"store/product-list.unavailableItems\"\n values={{\n quantity: countCartItems(itemCountMode, unavailableItems),\n }}\n />\n </div>\n ) : null}\n {unavailableItems.map((item) => {\n return (\n <ItemContextWrapper\n key={`${item.uniqueId}-${item.sellingPrice}-${item.index}`}\n item={item}\n itemIndex={item.index}\n shouldAllowManualPrice={shouldAllowManualPrice}\n {...props}\n lazyRenderHeight={lazyRenderHeight}\n lazyRenderOffset={lazyRenderOffset}\n >\n {children}\n </ItemContextWrapper>\n )\n })}\n {unavailableItems.length > 0 && availableItems.length > 0 ? (\n <div\n className={`${handles.productListAvailableItemsMessage} c-muted-1 bb b--muted-4 fw5 mt7 pv5 pl5 pl6-m pl0-l t-heading-5-l`}\n >\n <FormattedMessage\n id=\"store/product-list.availableItems\"\n values={{\n quantity: countCartItems(itemCountMode, availableItems),\n }}\n />\n </div>\n ) : null}\n {availableItems.map((item) => {\n return (\n <ItemContextWrapper\n key={`${item.uniqueId}-${item.sellingPrice}-${item.index}`}\n item={item}\n itemIndex={item.index}\n shouldAllowManualPrice={shouldAllowManualPrice}\n {...props}\n lazyRenderHeight={lazyRenderHeight}\n lazyRenderOffset={lazyRenderOffset}\n >\n {children}\n </ItemContextWrapper>\n )\n })}\n </div>\n )\n})\n\nexport default ProductList\n\n```"
}
] |
code_product-list_6d7bbba2
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductQuantityLabel.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\n\nconst CSS_HANDLES = ['productQuantityLabel'] as const\n\nconst ProductQuantityLabel: React.FC = () => {\n const { item } = useItemContext()\n const cssHandles = useCssHandles(CSS_HANDLES)\n\n return (\n <span className={`${cssHandles.productQuantityLabel} c-muted-1 t-body`}>\n <FormattedMessage\n id=\"store/product-list.quantity-label\"\n values={{ quantity: item.quantity }}\n />\n </span>\n )\n}\n\nexport default ProductQuantityLabel\n\n```"
}
] |
code_product-list_293a7db8
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/styles.css from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```css\n@media screen and (max-width: 39.9em) {\n .quantitySelector {\n width: 4.4rem;\n }\n}\n\n@media screen and (min-width: 40em) {\n .price {\n width: 7.25rem;\n }\n .quantity {\n max-width: 7.25rem;\n }\n}\n\n.quantity :global(.vtex-input) input {\n flex-shrink: 1;\n min-width: 0;\n}\n\n.unitPrice {\n max-width: 100%;\n}\n\n.quantityStepper {\n max-width: none;\n}\n\n```"
}
] |
code_product-list_7a548d5e
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductListWrapper.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { SizeMe } from 'react-sizeme'\nimport type { Item } from 'vtex.checkout-graphql'\nimport { ExtensionPoint, useChildBlock } from 'vtex.render-runtime'\nimport { useDevice } from 'vtex.device-detector'\nimport { OrderForm } from 'vtex.order-manager'\n\nconst { useOrderForm } = OrderForm\n\nconst MAX_MOBILE_WIDTH = 640\n\ninterface Props {\n items: Item[]\n onQuantityChange: (uniqueId: string, value: number) => void\n onRemove: (uniqueId: string) => void\n}\n\nconst ProductListWrapper: React.FC<Props> = (props) => {\n const { loading } = useOrderForm()\n const { device } = useDevice()\n const hasMobileContent = Boolean(\n useChildBlock({ id: 'product-list-content-mobile' })\n )\n\n const hasDesktopContent = Boolean(\n useChildBlock({ id: 'product-list-content-desktop' })\n )\n\n if (!hasMobileContent) {\n return <ExtensionPoint id=\"product-list-content-desktop\" {...props} />\n }\n\n if (!hasDesktopContent) {\n return <ExtensionPoint id=\"product-list-content-mobile\" {...props} />\n }\n\n return (\n <SizeMe noPlaceholder>\n {({ size }) =>\n (loading && device === 'phone') ||\n (size.width && size.width < MAX_MOBILE_WIDTH) ? (\n <ExtensionPoint id=\"product-list-content-mobile\" {...props} />\n ) : (\n <ExtensionPoint id=\"product-list-content-desktop\" {...props} />\n )\n }\n </SizeMe>\n )\n}\n\nexport default ProductListWrapper\n\n```"
}
] |
code_product-list_fc2ba004
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductBrand.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React from 'react'\nimport { Loading } from 'vtex.render-runtime'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\n\nconst CSS_HANDLES = ['productBrandName'] as const\n\nconst ProductBrand: FunctionComponent = () => {\n const { item, loading } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return <Loading />\n }\n\n return (\n <div\n id={`brand-name-${item.id}`}\n className={`ttu f7 fw6 c-muted-1 fw5-m ${\n handles.productBrandName\n } ${opaque(item.availability)}`}\n >\n {item.additionalInfo?.brandName}\n </div>\n )\n}\n\nexport default ProductBrand\n\n```"
}
] |
code_product-list_1b86b34a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/QuantitySelector.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { VFC } from 'react'\nimport React from 'react'\nimport classnames from 'classnames'\nimport { Loading } from 'vtex.render-runtime'\nimport { useCssHandles, applyModifiers } from 'vtex.css-handles'\n\nimport Selector from './components/QuantitySelector'\nimport QuantityStepper from './components/QuantityStepper'\nimport { useItemContext } from './ItemContext'\nimport { AVAILABLE, CANNOT_BE_DELIVERED } from './constants/Availability'\nimport { opaque } from './utils/opaque'\nimport styles from './styles.css'\n\nconst MAX_ITEM_QUANTITY = 99999\nconst CSS_HANDLES = ['quantitySelectorContainer'] as const\n\ntype QuantitySelectorMode = 'default' | 'stepper'\nexport type QuantitySelectorStepType = 'unitMultiplier' | 'singleUnit'\n\ninterface Props {\n mode?: QuantitySelectorMode\n quantitySelectorStep?: QuantitySelectorStepType\n}\n\nconst enabledSelectorAvailability = [AVAILABLE, CANNOT_BE_DELIVERED]\n\nfunction shouldDisableSelector(availability: string | null | undefined) {\n return !enabledSelectorAvailability.includes(availability ?? '')\n}\n\nconst QuantitySelector: VFC<Props> = ({\n mode = 'default',\n quantitySelectorStep = 'unitMultiplier',\n}) => {\n const { item, loading, onQuantityChange } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return <Loading />\n }\n\n const unitMultiplier =\n quantitySelectorStep === 'singleUnit' ? 1 : item.unitMultiplier ?? undefined\n\n if (mode === 'stepper') {\n return (\n <div\n className={classnames(\n opaque(item.availability),\n handles.quantitySelectorContainer,\n styles.quantity,\n styles.quantityStepper,\n applyModifiers(\n styles.quantitySelector,\n item.sellingPrice === 0 ? 'gift' : ''\n )\n )}\n >\n <QuantityStepper\n id={item.id}\n value={item.quantity}\n maxValue={MAX_ITEM_QUANTITY}\n onChange={onQuantityChange}\n unitMultiplier={unitMultiplier}\n disabled={shouldDisableSelector(item.availability)}\n measurementUnit={item.measurementUnit ?? undefined}\n />\n </div>\n )\n }\n\n return (\n <div\n className={classnames(\n opaque(item.availability),\n handles.quantitySelectorContainer,\n styles.quantity,\n styles.quantitySelector,\n applyModifiers(\n styles.quantitySelector,\n item.sellingPrice === 0 ? 'gift' : ''\n )\n )}\n >\n <Selector\n id={item.id}\n value={item.quantity}\n maxValue={MAX_ITEM_QUANTITY}\n onChange={onQuantityChange}\n disabled={shouldDisableSelector(item.availability)}\n unitMultiplier={unitMultiplier}\n measurementUnit={item.measurementUnit ?? undefined}\n />\n </div>\n )\n}\n\nexport default QuantitySelector\n\n```"
}
] |
code_product-list_fa455d12
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ManualPrice.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React, { Fragment, useState } from 'react'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { FormattedPrice } from 'vtex.formatted-price'\nimport { Button, ButtonPlain, InputCurrency, Modal, Tag } from 'vtex.styleguide'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport { useItemContext } from './ItemContext'\nimport { getFormattedPrice } from './utils/price'\n\nconst ManualPrice: FunctionComponent = () => {\n const {\n item,\n itemIndex,\n shouldAllowManualPrice,\n onSetManualPrice,\n } = useItemContext()\n\n const [isModalOpen, setIsModalOpen] = useState(false)\n const [manualPrice, setManualPrice] = useState(item.manualPrice)\n const {\n culture: { currency, locale },\n } = useRuntime()\n\n const intl = useIntl()\n const priceChanged =\n item.sellingPrice === item.manualPrice && item.sellingPrice !== item.price\n\n const submitManualPrice = (evt: React.FormEvent<HTMLFormElement>) => {\n evt.preventDefault()\n\n if (manualPrice != null && !Number.isNaN(manualPrice)) {\n onSetManualPrice(manualPrice, itemIndex)\n }\n\n setIsModalOpen(false)\n }\n\n const handleManualPriceChange = (\n evt: React.ChangeEvent<HTMLInputElement>\n ) => {\n const newManualPrice = (evt.target.value as unknown) as number\n\n setManualPrice(Math.floor(newManualPrice * 100))\n }\n\n const handleOpenModal = () => {\n setIsModalOpen(true)\n }\n\n const handleCloseModal = () => {\n setManualPrice(item.sellingPrice)\n setIsModalOpen(false)\n }\n\n const revertToOriginalPrice = () => {\n if (item.price != null) {\n onSetManualPrice(item.price, itemIndex)\n setManualPrice(item.price)\n }\n\n setIsModalOpen(false)\n }\n\n return (\n <Fragment>\n {shouldAllowManualPrice && (\n <div className=\"flex flex-column items-center mt3\">\n {priceChanged ? (\n <div>\n <div className=\"flex-grow-0 tc mb2 c-muted-1\">\n <FormattedPrice value={getFormattedPrice(item.manualPrice)} />\n </div>\n <div className=\"flex-grow-0 mb3 tc\">\n <Tag size=\"small\" bgColor=\"#3F3F40\" className=\"fw5\">\n <FormattedMessage id=\"store/product-list.priceChanged\" />\n </Tag>\n </div>\n <ButtonPlain size=\"small\" onClick={handleOpenModal}>\n <FormattedMessage id=\"store/product-list.priceOptions\" />\n </ButtonPlain>\n </div>\n ) : (\n <ButtonPlain size=\"small\" onClick={handleOpenModal}>\n <FormattedMessage id=\"store/product-list.changePrice\" />\n </ButtonPlain>\n )}\n </div>\n )}\n\n <Modal isOpen={isModalOpen} onClose={handleCloseModal} className=\"w-25\">\n <div className=\"flex flex-column\">\n <span className=\"t-small mw9 mb1\">\n <FormattedMessage id=\"store/product-list.originalPrice\" />\n </span>\n <div className={`c-muted-1 mb3 ${priceChanged ? 'strike' : ''}`}>\n <FormattedPrice value={getFormattedPrice(item.price)} />\n </div>\n\n <label className=\"t-small mw9 mb2\" htmlFor=\"manual-price-input\">\n <FormattedMessage id=\"store/product-list.changeTo\" />\n </label>\n <div className=\"flex flex-row flex-grow mb3\">\n <div className=\"mr2\">\n <InputCurrency\n id=\"manual-price-input\"\n placeholder={intl.formatMessage({\n id: 'store/product-list.manualPricePlaceholder',\n })}\n locale={locale}\n currencyCode={currency}\n value={getFormattedPrice(manualPrice)}\n onChange={handleManualPriceChange}\n />\n </div>\n\n <Button\n variation=\"secondary\"\n size=\"regular\"\n onClick={submitManualPrice}\n >\n <FormattedMessage id=\"store/product-list.applyManualPrice\" />\n </Button>\n </div>\n\n {priceChanged && (\n <div>\n <ButtonPlain onClick={revertToOriginalPrice}>\n <FormattedMessage id=\"store/product-list.revertToOriginal\" />\n </ButtonPlain>\n </div>\n )}\n </div>\n </Modal>\n </Fragment>\n )\n}\n\nexport default ManualPrice\n\n```"
}
] |
code_product-list_72b6b882
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/RemoveButton.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Loading } from 'vtex.render-runtime'\nimport { applyModifiers, useCssHandles } from 'vtex.css-handles'\nimport { Button } from 'vtex.styleguide'\nimport { IconDelete } from 'vtex.store-icons'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\n\nconst CSS_HANDLES = ['removeButtonContainer', 'removeButton', 'item'] as const\n\ntype DisplayMode = 'icon-button' | 'text-button'\ntype Variation =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'inverted-tertiary'\n | 'danger'\n | 'danger-tertiary'\n\ninterface Props {\n displayMode?: DisplayMode\n variation?: Variation\n}\n\nfunction RemoveButton(props: Props) {\n const { displayMode = 'icon-button', variation = 'danger' } = props\n const { item, loading, onRemove } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return <Loading />\n }\n\n if (displayMode === 'text-button') {\n return (\n <Button variation={variation} onClick={onRemove}>\n <FormattedMessage id=\"store/product-list.delete-button.default-label\" />\n </Button>\n )\n }\n\n return (\n <div\n className={`${handles.removeButtonContainer} ${applyModifiers(\n handles.item,\n item.sellingPrice === 0 ? 'gift' : ''\n )} ${opaque(item.availability)}`}\n >\n <button\n id={`remove-button-${item.id}`}\n style={{ color: '#727273' }}\n className={`${handles.removeButton} pointer bg-transparent bn pa2`}\n title=\"remove\"\n onClick={onRemove}\n >\n <IconDelete />\n </button>\n </div>\n )\n}\n\nexport default RemoveButton\n\n```"
}
] |
code_product-list_5dd30479
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/LazyRender.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React, { useRef, useState } from 'react'\nimport { useOnView } from 'vtex.on-view'\n\ninterface Props {\n height?: number\n offset?: number\n initializeOnInteraction?: boolean\n}\n\nconst LazyRender: FunctionComponent<Props> = ({\n children,\n height = 400,\n offset = 300,\n initializeOnInteraction = false,\n}) => {\n const ref = useRef(null)\n const [hasBeenViewed, setHasBeenViewed] = useState(false)\n\n const handleView = () => {\n setHasBeenViewed(true)\n }\n\n useOnView({\n ref,\n onView: handleView,\n once: true,\n initializeOnInteraction,\n })\n\n if (hasBeenViewed) {\n return <>{children}</>\n }\n\n return (\n <div\n style={{\n position: 'relative',\n width: '100%',\n height,\n }}\n >\n <div\n ref={ref}\n style={{\n position: 'relative',\n width: '100%',\n top: -offset,\n height: '100%',\n paddingBottom: offset * 2,\n boxSizing: 'content-box',\n }}\n />\n </div>\n )\n}\n\nexport default LazyRender\n\n```"
}
] |
code_product-list_9d529d48
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/package.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"scripts\": {\n \"test\": \"vtex-test-tools test\",\n \"lint\": \"tsc --noEmit && eslint --ext ts,tsx .\"\n },\n \"dependencies\": {\n \"@vtex/css-handles\": \"^1.0.0\",\n \"classnames\": \"^2.2.6\",\n \"react\": \"^16.8.3\",\n \"react-apollo\": \"^2.5.8\",\n \"react-dom\": \"^16.8.3\",\n \"react-intl\": \"3\",\n \"react-sizeme\": \"^2.6.7\"\n },\n \"devDependencies\": {\n \"@apollo/react-testing\": \"^3.1.3\",\n \"@types/classnames\": \"^2.2.7\",\n \"@types/graphql\": \"^14.2.0\",\n \"@types/jest\": \"^24.0.11\",\n \"@types/node\": \"^11.13.0\",\n \"@types/prop-types\": \"^15.7.0\",\n \"@types/react\": \"^16.8.10\",\n \"@vtex/styleguide\": \"^8.70.4\",\n \"@vtex/test-tools\": \"^3.0.0\",\n \"apollo-client\": \"^2.5.1\",\n \"typescript\": \"3.9.7\",\n \"vtex.checkout-graphql\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-graphql@0.55.1/public/@types/vtex.checkout-graphql\",\n \"vtex.css-handles\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@0.4.4/public/@types/vtex.css-handles\",\n \"vtex.device-detector\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.device-detector@0.2.6/public/@types/vtex.device-detector\",\n \"vtex.flex-layout\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.flex-layout@0.15.2/public/@types/vtex.flex-layout\",\n \"vtex.format-currency\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency\",\n \"vtex.formatted-price\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.formatted-price@0.4.0/public/@types/vtex.formatted-price\",\n \"vtex.on-view\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.on-view@1.0.0/public/@types/vtex.on-view\",\n \"vtex.order-manager\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.order-manager@0.9.0/public/@types/vtex.order-manager\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.126.7/public/@types/vtex.render-runtime\",\n \"vtex.store-icons\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons\",\n \"vtex.styleguide\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.134.1/public/@types/vtex.styleguide\"\n },\n \"version\": \"0.37.4\"\n}\n\n```"
}
] |
code_product-list_cd1c543b
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductVariations.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React from 'react'\nimport type { SkuSpecification } from 'vtex.checkout-graphql'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\n\nconst CSS_HANDLES = [\n 'productVariationsContainer',\n 'productVariationsItem',\n] as const\n\nconst ProductVariations: FunctionComponent = () => {\n const { item } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n return item.skuSpecifications && item.skuSpecifications.length > 0 ? (\n <div\n className={`c-muted-1 f6 lh-copy ${\n handles.productVariationsContainer\n } ${opaque(item.availability)}`}\n >\n {item.skuSpecifications.map((spec: SkuSpecification) => {\n return (\n <div\n className={handles.productVariationsItem}\n id={`specification-${item.id}-${spec.fieldName}`}\n key={spec.fieldName ?? undefined}\n >\n {`${spec.fieldName}: ${spec.fieldValues.join(', ')}`}\n </div>\n )\n })}\n </div>\n ) : null\n}\n\nexport default ProductVariations\n\n```"
}
] |
code_product-list_d2852693
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/UnitPrice.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport classnames from 'classnames'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { FormattedCurrency } from 'vtex.format-currency'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\nimport type { TextAlignProp } from './utils/textAlign'\nimport { parseTextAlign } from './utils/textAlign'\nimport styles from './styles.css'\n\nconst CSS_HANDLES = [\n 'unitPriceContainer',\n 'unitPricePerUnitCurrency',\n 'unitPriceMeasurementUnit',\n 'unitListPrice',\n] as const\n\ninterface UnitPriceProps extends TextAlignProp {\n unitPriceType?: UnitPriceType\n unitPriceDisplay?: UnitPriceDisplayType\n displayUnitListPrice?: DisplayUnitListPriceType\n}\n\ntype UnitPriceDisplayType = 'always' | 'default'\n\ntype DisplayUnitListPriceType = 'showWhenDifferent' | 'notShow'\n\ntype UnitPriceType = 'price' | 'sellingPrice'\n\nconst UnitPrice: React.FC<UnitPriceProps> = ({\n textAlign = 'left',\n unitPriceType = 'sellingPrice',\n unitPriceDisplay = 'default',\n displayUnitListPrice = 'notShow',\n}) => {\n const { item, loading } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n const intl = useIntl()\n const isManualPriceDefined =\n item.sellingPrice === item.manualPrice && item.sellingPrice !== item.price\n\n if (loading) {\n return null\n }\n\n const unitPrice = item[unitPriceType] ?? 0\n\n if (\n !(\n (item.quantity > 1 || unitPriceDisplay === 'always') &&\n unitPrice > 0 &&\n !isManualPriceDefined\n )\n ) {\n return null\n }\n\n return (\n <div\n id={`unit-price-${item.id}`}\n className={classnames(\n handles.unitPriceContainer,\n opaque(item.availability),\n parseTextAlign(textAlign),\n // kept for backwards compatibility\n styles.quantity,\n styles.unitPrice,\n 't-mini c-muted-1 lh-title'\n )}\n >\n {item.listPrice &&\n unitPrice !== item.listPrice &&\n displayUnitListPrice === 'showWhenDifferent' && (\n <div className={`strike ${handles.unitListPrice}`}>\n <FormattedCurrency value={item.listPrice / 100} />\n </div>\n )}\n <FormattedMessage\n id=\"store/product-list.pricePerUnit\"\n values={{\n price: (\n <div className={`${handles.unitPricePerUnitCurrency} dib`}>\n <FormattedCurrency value={unitPrice / 100} />\n </div>\n ),\n perMeasurementUnit: (\n <div className={`${handles.unitPriceMeasurementUnit} dib`}>\n <FormattedMessage\n id=\"store/product-list.pricePerUnit.measurementUnit\"\n values={{\n unitMultiplier: intl.formatNumber(item.unitMultiplier ?? 1),\n measurementUnit: item.measurementUnit,\n }}\n />\n </div>\n ),\n }}\n />\n </div>\n )\n}\n\nUnitPrice.schema = {\n properties: {\n textAlign: {\n type: 'string',\n default: 'left',\n isLayout: true,\n },\n },\n}\n\nexport default UnitPrice\n\n```"
}
] |
code_product-list_251ddce9
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/Price.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { FormattedCurrency } from 'vtex.format-currency'\nimport { FormattedPrice } from 'vtex.formatted-price'\nimport { Loading } from 'vtex.render-runtime'\nimport { useCssHandles, applyModifiers } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\nimport type { TextAlignProp } from './utils/textAlign'\nimport { parseTextAlign } from './utils/textAlign'\nimport styles from './styles.css'\n\nconst CSS_HANDLES = [\n 'productPriceContainer',\n 'productPriceCurrency',\n 'productPrice',\n] as const\n\ntype PriceProps = TextAlignProp & {\n showListPrice?: boolean\n}\n\nconst Price: React.FC<PriceProps> = ({\n textAlign = 'left',\n showListPrice = true,\n}) => {\n const { item, loading } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return <Loading />\n }\n\n return (\n <div\n className={`${opaque(item.availability)} ${styles.price} ${\n handles.productPriceContainer\n } ${parseTextAlign(textAlign)}`}\n >\n {item.listPrice && item.listPrice !== item.sellingPrice && showListPrice ? (\n <div\n id={`list-price-${item.id}`}\n className={`${handles.productPriceCurrency} ${applyModifiers(\n handles.productPriceCurrency,\n item.sellingPrice === 0 ? 'gift' : ''\n )} c-muted-1 strike t-mini mb2`}\n >\n <FormattedCurrency\n value={\n (item.listPrice * (item.unitMultiplier ?? 1) * item.quantity) /\n 100\n }\n />\n </div>\n ) : null}\n <div\n id={`price-${item.id}`}\n className={`${handles.productPrice} ${applyModifiers(\n handles.productPrice,\n item.sellingPrice === 0 ? 'gift' : ''\n )} div fw6 fw5-m`}\n >\n <FormattedPrice\n value={\n item.sellingPrice != null\n ? (item.sellingPrice * item.quantity) / 100\n : item.sellingPrice\n }\n />\n </div>\n </div>\n )\n}\n\nPrice.schema = {\n properties: {\n textAlign: {\n type: 'string',\n default: 'left',\n isLayout: true,\n },\n },\n}\n\nexport default Price\n\n```"
}
] |
code_product-list_bc4dfd77
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/AvailabilityMessage.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { AVAILABLE, CANNOT_BE_DELIVERED } from './constants/Availability'\n\ninterface Props {\n layout: 'cols' | 'rows'\n}\n\nconst setContainerLayout = (prop: string) => {\n switch (prop) {\n case 'cols':\n return 'flex justify-between items-center'\n\n case 'rows':\n return ''\n\n default:\n return ''\n }\n}\n\nconst CSS_HANDLES = [\n 'availabilityMessageContainer',\n 'availabilityMessageTextContainer',\n 'availabilityMessageText',\n] as const\n\nconst AvailabilityMessage: React.FC<Props> = ({ layout }) => {\n const {\n item: { availability },\n loading,\n } = useItemContext()\n\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return null\n }\n\n return availability !== AVAILABLE ? (\n <div\n className={`bg-warning--faded br2 ${\n handles.availabilityMessageContainer\n } ${setContainerLayout(layout)}`}\n >\n <div\n className={`lh-title pa4 ${handles.availabilityMessageTextContainer}`}\n >\n {availability === CANNOT_BE_DELIVERED ? (\n <FormattedMessage id=\"store/product-list.message.cantBeDelivered\">\n {(message) => (\n <span className={handles.availabilityMessageText}>{message}</span>\n )}\n </FormattedMessage>\n ) : (\n <FormattedMessage id=\"store/product-list.message.noLongerAvailable\">\n {(message) => (\n <span className={handles.availabilityMessageText}>{message}</span>\n )}\n </FormattedMessage>\n )}\n </div>\n </div>\n ) : null\n}\n\nAvailabilityMessage.defaultProps = {\n layout: 'cols',\n}\n\nAvailabilityMessage.schema = {\n properties: {\n layout: {\n type: 'string',\n default: AvailabilityMessage.defaultProps.layout,\n isLayout: true,\n },\n },\n}\n\nexport default AvailabilityMessage\n\n```"
}
] |
code_product-list_e6ca2764
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductName.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React from 'react'\nimport { Loading, useRuntime } from 'vtex.render-runtime'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\n\nconst CSS_HANDLES = ['productName'] as const\n\nconst ProductName: FunctionComponent = () => {\n const { item, loading } = useItemContext()\n const { rootPath = '' } = useRuntime()\n const handles = useCssHandles(CSS_HANDLES)\n\n if (loading) {\n return <Loading />\n }\n\n return (\n <a\n id={`name-${item.id}`}\n className={`c-on-base t-title lh-copy fw6 no-underline fw5-m ${\n handles.productName\n } ${opaque(item.availability)}`}\n href={item.detailUrl ? `${rootPath}${item.detailUrl}` : undefined}\n >\n {item.name}\n </a>\n )\n}\n\nexport default ProductName\n\n```"
}
] |
code_product-list_a9a961c7
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/Image.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React from 'react'\nimport { Loading, useRuntime } from 'vtex.render-runtime'\nimport type { Item } from 'vtex.checkout-graphql'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { NoImageIcon } from './components/NoImageIcon'\nimport { opaque } from './utils/opaque'\n\nconst getImageUrl = (imageUrls: Item['imageUrls']) => {\n if (!imageUrls) {\n return null\n }\n\n if (!window || !window.devicePixelRatio) {\n return imageUrls.at1x\n }\n\n if (window.devicePixelRatio <= 1.25) {\n return imageUrls.at1x\n }\n\n if (window.devicePixelRatio <= 2.25) {\n return imageUrls.at2x\n }\n\n return imageUrls.at3x\n}\n\nconst CSS_HANDLES = [\n 'productImageContainer',\n 'productImageAnchor',\n 'productImage',\n] as const\n\ninterface ImageProps {\n width?: number\n}\n\nconst Image: FunctionComponent<ImageProps> = ({ width = 96 }) => {\n const { item, loading } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n const { rootPath = '' } = useRuntime()\n\n if (loading) {\n return <Loading />\n }\n\n const imageUrl = getImageUrl(item.imageUrls)\n\n return (\n <div\n id={`image-${item.id}`}\n className={`${handles.productImageContainer} ${opaque(\n item.availability\n )}`}\n style={{ width }}\n >\n <a\n className={handles.productImageAnchor}\n href={item.detailUrl ? `${rootPath}${item.detailUrl}` : undefined}\n >\n {imageUrl ? (\n <img\n className={`${handles.productImage} br2`}\n loading=\"lazy\"\n alt={item.name ?? undefined}\n src={imageUrl}\n width=\"100%\"\n />\n ) : (\n <NoImageIcon />\n )}\n </a>\n </div>\n )\n}\n\nexport default Image\n\n```"
}
] |
code_product-list_4bb20698
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ItemContext.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FC } from 'react'\nimport React, { createContext, useContext } from 'react'\nimport type { Item } from 'vtex.checkout-graphql'\n\ninterface Context {\n item: Item\n itemIndex: number\n loading: boolean\n shouldAllowManualPrice: boolean\n onQuantityChange: (value: number) => void\n onRemove: () => void\n onSetManualPrice: (price: number, itemIndex: number) => void\n}\n\ninterface ItemContextProviderProps {\n value: Context\n}\n\nconst ItemContext = createContext<Context | undefined>(undefined)\n\nexport const ItemContextProvider: FC<ItemContextProviderProps> = ({\n value,\n children,\n}) => <ItemContext.Provider value={value}>{children}</ItemContext.Provider>\n\nexport const useItemContext = () => {\n const context = useContext(ItemContext)\n\n if (context === undefined) {\n throw new Error('useItemContext must be used within a ItemContextProvider')\n }\n\n return context\n}\n\nexport default { useItemContext }\n\n```"
}
] |
code_product-list_990b7d72
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/ProductReference.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React, { useMemo } from 'react'\nimport { Loading } from 'vtex.render-runtime'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { useItemContext } from './ItemContext'\nimport { opaque } from './utils/opaque'\nimport { IdentifierType } from './constants/Identifiers'\n\nconst CSS_HANDLES = [\n 'productIdentifier',\n 'productIdentifierValue',\n 'productIdentifierLabelValue',\n] as const\n\ninterface Props {\n identifierLabel?: string\n identifierOption?: string\n}\n\nconst ProductReference: FunctionComponent<Props> = (props) => {\n const { identifierOption, identifierLabel } = props\n const { item, loading } = useItemContext()\n const handles = useCssHandles(CSS_HANDLES)\n\n const identifierValue = useMemo(() => {\n if (identifierOption === IdentifierType.PRODUCT_REFERENCE_ID)\n return item.productRefId\n if (identifierOption === IdentifierType.PRODUCT_SKU_REFERENCE_ID)\n return item.refId\n if (identifierOption === IdentifierType.PRODUCT_SKU_ITEM_ID) return item.id\n if (identifierOption === IdentifierType.PRODUCT_ID) return item.productId\n\n return item.productRefId\n }, [item.productRefId, identifierOption, item.id, item.productId, item.refId])\n\n if (loading) return <Loading />\n if (!identifierValue) return null\n\n return (\n <div\n className={`c-on-base t-title lh-copy fw6 fw5-m ${\n handles.productIdentifier\n } ${opaque(item.availability)}`}\n >\n {identifierLabel && (\n <span className={`${handles.productIdentifierLabelValue}`}>\n {identifierLabel}\n </span>\n )}\n <span className={`${handles.productIdentifierValue}`}>\n {identifierValue}\n </span>\n </div>\n )\n}\n\nexport default ProductReference\n\n```"
}
] |
code_product-list_68ef8cf0
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/store/blocks.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"product-list\": {\n \"blocks\": [\n \"product-list-content-desktop\",\n \"product-list-content-mobile\"\n ]\n }\n}\n\n```"
}
] |
code_product-list_cb46dcb3
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/store/interfaces.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"product-list\": {\n \"component\": \"ProductListWrapper\",\n \"allowed\": [\"product-list-content-desktop\", \"product-list-content-mobile\"]\n },\n \"product-list-content-desktop\": {\n \"component\": \"ProductList\",\n \"composition\": \"children\",\n \"allowed\": \"*\"\n },\n \"product-list-content-mobile\": {\n \"component\": \"ProductList\",\n \"composition\": \"children\",\n \"allowed\": \"*\"\n },\n \"product-list-image\": {\n \"component\": \"Image\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 96,\n \"width\": 96,\n \"options\": {\n \"padding\": 0,\n \"minWidth\": 96\n }\n }\n },\n \"message\": {\n \"component\": \"AvailabilityMessage\"\n },\n \"product-name\": {\n \"component\": \"ProductName\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 30,\n \"width\": 140,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"product-reference\": {\n \"component\": \"ProductReference\"\n },\n \"product-brand\": {\n \"component\": \"ProductBrand\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 15,\n \"width\": 110,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"product-variations\": {\n \"component\": \"ProductVariations\"\n },\n \"product-quantity-label\": {\n \"component\": \"ProductQuantityLabel\"\n },\n \"quantity-selector\": {\n \"component\": \"QuantitySelector\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 35,\n \"width\": 80,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"unit-price\": {\n \"component\": \"UnitPrice\"\n },\n \"price\": {\n \"component\": \"Price\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 35,\n \"width\": 90,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"remove-button\": {\n \"component\": \"RemoveButton\",\n \"preview\": {\n \"type\": \"box\",\n \"height\": 25,\n \"width\": 25,\n \"options\": {\n \"padding\": 0\n }\n }\n },\n \"manual-pricing\": {\n \"component\": \"ManualPrice\"\n }\n}\n\n```"
}
] |
code_product-list_9d0bd468
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/__fixtures__/items.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nimport type { Item } from 'vtex.checkout-graphql'\n\nexport const items: Array<Item & { index: number }> = [\n {\n index: 0,\n additionalInfo: {\n brandName: 'Test Brand 0',\n },\n availability: 'available',\n id: '1',\n detailUrl: '/work-shirt/p',\n listPrice: 2800000,\n measurementUnit: 'un',\n name: 'قميص العمل الأعلى',\n price: 2400000,\n productId: '1',\n quantity: 3,\n sellingPrice: 2400000,\n skuName: 'Test SKU 0',\n skuSpecifications: [],\n uniqueId: 'SomeUniqueId0',\n attachmentOfferings: [],\n priceTags: [],\n bundleItems: [],\n offerings: [],\n attachments: [],\n },\n {\n index: 1,\n additionalInfo: {\n brandName: 'Test Brand 1',\n },\n availability: 'withoutStock',\n id: '30',\n detailUrl: '/long-sleeve-shirt/p',\n listPrice: 945000,\n measurementUnit: 'un',\n name: '上品なサングラス',\n price: 945000,\n productId: '2000005',\n quantity: 1,\n sellingPrice: 945000,\n skuName: 'Test SKU 1',\n skuSpecifications: [],\n uniqueId: 'SomeUniqueId1',\n attachmentOfferings: [],\n priceTags: [],\n bundleItems: [],\n offerings: [],\n attachments: [],\n },\n {\n index: 2,\n additionalInfo: {\n brandName: 'Test Brand 2',\n },\n availability: 'cannotBeDelivered',\n id: '2000535',\n detailUrl: '/classy--sunglasses/p',\n listPrice: 400000,\n measurementUnit: 'un',\n name: 'กางเกงขาสั้น St Tropez',\n price: 360000,\n productId: '13',\n quantity: 4,\n sellingPrice: 360000,\n skuName: 'Test SKU 2',\n skuSpecifications: [],\n uniqueId: 'SomeUniqueId2',\n attachmentOfferings: [],\n priceTags: [],\n bundleItems: [],\n offerings: [],\n attachments: [],\n },\n]\n\n```"
}
] |
code_product-list_d31d293a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/constants/Availability.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport const AVAILABLE = 'available'\nexport const CANNOT_BE_DELIVERED = 'cannotBeDelivered'\nexport const WITHOUT_STOCK = 'withoutStock'\n\n```"
}
] |
code_product-list_ce5b6a78
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/constants/Identifiers.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport const enum IdentifierType {\n PRODUCT_ID = 'ProductId',\n PRODUCT_SKU_ITEM_ID = 'ProductSkuItemId',\n PRODUCT_REFERENCE_ID = 'ProductReferenceId',\n PRODUCT_SKU_REFERENCE_ID = 'ProductSkuReferenceId',\n}\n\n```"
}
] |
code_product-list_b8a839fe
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/constants/User.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport const CALL_CENTER_OPERATOR = 'CALL_CENTER_OPERATOR'\n\n```"
}
] |
code_product-list_5f9033f9
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/typings/react.d.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nimport 'react'\n\ndeclare module 'react' {\n export interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {\n loading?: 'auto' | 'eager' | 'lazy'\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n export interface FunctionComponent<P = {}> extends FunctionComponent<P> {\n schema?: Record<string, unknown>\n }\n}\n\n```"
}
] |
code_product-list_845f6d98
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/typings/css.d.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\ndeclare module '*.css' {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const css: any\n export default css\n}\n\n```"
}
] |
code_product-list_ad7a59cc
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/typings/graphql.d.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\ndeclare module '*.graphql' {\n import type { DocumentNode } from 'graphql'\n\n const value: DocumentNode\n export default value\n}\n\n```"
}
] |
code_product-list_4bc5f6a5
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/typings/vtex.styleguide.d.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { ComponentType, Context } from 'react'\n\ndeclare module 'vtex.styleguide' {\n interface InputProps {\n [key: string]: any\n }\n\n export const Button: ComponentType<any>\n export const Dropdown: ComponentType<any>\n export const IconDelete: ComponentType<any>\n export const Input: ComponentType<InputProps>\n export const InputCurrency: ComponentType<any>\n export const Link: ComponentType<any>\n export const Modal: ComponentType<any>\n export const Spinner: ComponentType<any>\n export const Tag: ComponentType<any>\n export const ToastContext: Context<{ showToast(message: string): void }>\n}\n\n```"
}
] |
code_product-list_22c138c2
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/utils/price.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport const getFormattedPrice = (price: number | undefined | null) => {\n return price != null ? price / 100 : price\n}\n\n```"
}
] |
code_product-list_a741cdf3
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/utils/textAlign.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport interface TextAlignProp {\n textAlign: 'left' | 'center' | 'right'\n}\n\nexport const parseTextAlign = (prop: string) => {\n switch (prop) {\n case 'left':\n return 'tl'\n\n case 'center':\n return 'tc'\n\n case 'right':\n return 'tr'\n\n default:\n return ''\n }\n}\n\n```"
}
] |
code_product-list_6b0ff08a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/utils/opaque.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nimport { WITHOUT_STOCK } from '../constants/Availability'\n\nexport const opaque = (availability?: string | null) =>\n availability === WITHOUT_STOCK ? 'o-70' : ''\n\n```"
}
] |
code_product-list_3277d616
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/useQuantitySelectorState.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nimport { useContext, useCallback } from 'react'\nimport { ToastContext } from 'vtex.styleguide'\nimport { useIntl } from 'react-intl'\n\nimport { parseValue, parseDisplayValue } from './utils'\n\nconst useQuantitySelectorState = ({\n maxValue,\n measurementUnit,\n minValue: propMinValue = 0,\n}: {\n maxValue?: number\n minValue?: number\n measurementUnit?: string\n}) => {\n const { showToast } = useContext(ToastContext)\n const intl = useIntl()\n\n const onChange = useCallback(\n ({\n value,\n unitMultiplier,\n displayUnitMultiplier = unitMultiplier,\n minValue = propMinValue,\n }: {\n value: string\n unitMultiplier: number\n displayUnitMultiplier?: number\n minValue?: number\n }) => {\n const validatedValue = parseValue({\n value,\n maxValue,\n unitMultiplier,\n minValue,\n })\n\n const rawParsedValue = parseValue({\n value,\n maxValue,\n unitMultiplier,\n minValue: 0,\n round: false,\n })\n\n const validatedDisplayValue = intl.formatNumber(\n parseDisplayValue({\n value: validatedValue.toString(),\n maxValue,\n unitMultiplier: displayUnitMultiplier,\n }),\n { useGrouping: false }\n )\n\n if (validatedValue !== rawParsedValue) {\n showToast(\n intl.formatMessage(\n {\n id: 'store/product-list.quantityUnitMultiplierMismatch',\n },\n {\n unitMultiplier: intl.formatNumber(unitMultiplier),\n measurementUnit,\n roundedValue: intl.formatNumber(validatedValue * unitMultiplier),\n }\n )\n )\n }\n\n return { validatedValue, validatedDisplayValue }\n },\n [intl, maxValue, propMinValue, measurementUnit, showToast]\n )\n\n return [onChange] as const\n}\n\nexport default useQuantitySelectorState\n\n```"
}
] |
code_product-list_a0ef5531
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/IncreaseIcon.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { VFC } from 'react'\nimport React from 'react'\n\nconst IncreaseIcon: VFC = () => {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6666 6.88905H9.11103V1.3335H6.88881V6.88905H1.33325V9.11127H6.88881V14.6668H9.11103V9.11127H14.6666V6.88905Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nexport default IncreaseIcon\n\n```"
}
] |
code_product-list_c3019797
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/utils.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\nexport const parseValue = ({\n value,\n maxValue,\n minValue,\n unitMultiplier,\n round = true,\n}: {\n value: string\n maxValue?: number\n minValue: number\n unitMultiplier: number\n round?: boolean\n}) => {\n const parsedValue = parseFloat(value.replace(',', '.'))\n\n if (Number.isNaN(parsedValue)) {\n return 1\n }\n\n const roundedValue = Math.max(\n (round ? Math.round : (n: number) => n)(parsedValue / unitMultiplier),\n minValue\n )\n\n return Math.min(roundedValue, maxValue ?? roundedValue)\n}\n\nexport const parseDisplayValue = ({\n value,\n maxValue,\n unitMultiplier,\n}: {\n value: string\n maxValue?: number\n unitMultiplier: number\n}) => {\n const parsedValue = parseFloat(value.replace(',', '.'))\n\n if (Number.isNaN(parsedValue) || parsedValue < 0) {\n return unitMultiplier\n }\n\n return Math.min(parsedValue, maxValue ?? parsedValue) * unitMultiplier\n}\n\n```"
}
] |
code_product-list_5579dbf7
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/QuantitySelector.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { ComponentProps, FC } from 'react'\nimport React, { useState, Fragment, useEffect } from 'react'\nimport type { IntlShape } from 'react-intl'\nimport { defineMessages, useIntl } from 'react-intl'\nimport { Dropdown, Input } from 'vtex.styleguide'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport { parseDisplayValue } from './utils'\nimport useQuantitySelectorState from './useQuantitySelectorState'\n\nconst range = (startValue: number, endNumber: number) => {\n const array = []\n\n for (let i = startValue; i < endNumber; i++) {\n array.push(i)\n }\n\n return array\n}\n\nconst messages = defineMessages({\n remove: {\n defaultMessage: '',\n id: 'store/product-list.quantity-selector.remove',\n },\n label: { id: 'store/product-list.quantitySelector.label' },\n maxValueLabel: { id: 'store/product-list.quantitySelector.maxValueLabel' },\n})\n\nconst MAX_DROPDOWN_VALUE = 10\nconst MAX_INPUT_LENGTH = 5\n\n/* eslint-disable @typescript-eslint/no-shadow */\nconst enum SelectorType {\n Dropdown = 'Dropdown',\n Input = 'Input',\n}\n/* eslint-enable @typescript-eslint/no-shadow */\n\ninterface Props {\n id?: string\n value: number\n maxValue: number\n onChange: (value: number) => void\n disabled?: boolean\n unitMultiplier?: number\n measurementUnit?: string\n}\n\nconst getDropdownOptions = ({\n maxValue,\n intl,\n unitMultiplier,\n measurementUnit,\n}: {\n maxValue: number\n intl: IntlShape\n unitMultiplier: number\n measurementUnit?: string\n}) => {\n const limit = Math.min(9, maxValue)\n const options = [\n { value: 0, label: `0 - ${intl.formatMessage(messages.remove)}` },\n ...range(1, limit + 1).map((idx) => ({\n value: idx,\n label: intl.formatMessage(messages.label, {\n quantity: intl.formatNumber(idx * unitMultiplier),\n measurementUnit,\n }),\n })),\n ]\n\n if (maxValue >= MAX_DROPDOWN_VALUE) {\n options.push({\n value: MAX_DROPDOWN_VALUE,\n label: intl.formatMessage(messages.maxValueLabel, {\n quantity: intl.formatNumber(MAX_DROPDOWN_VALUE * unitMultiplier),\n measurementUnit,\n }),\n })\n }\n\n return options\n}\n\nconst CSS_HANDLES = [\n 'quantityDropdownMobileContainer',\n 'quantityDropdownContainer',\n 'quantityInputMobileContainer',\n 'quantityInputContainer',\n] as const\n\nconst QuantitySelector: FC<Props> = ({\n id,\n value,\n maxValue,\n onChange,\n disabled = false,\n unitMultiplier = 1,\n measurementUnit: itemMeasurementUnit,\n}) => {\n const measurementUnit =\n itemMeasurementUnit && itemMeasurementUnit !== 'un'\n ? itemMeasurementUnit\n : undefined\n\n const intl = useIntl()\n\n const [curSelector, setSelector] = useState(\n value < MAX_DROPDOWN_VALUE ? SelectorType.Dropdown : SelectorType.Input\n )\n\n const [inputFocused, setInputFocused] = useState(false)\n const [getUpdatedValue] = useQuantitySelectorState({\n maxValue,\n measurementUnit,\n minValue: 1,\n })\n\n const normalizedValue = Math.min(value, maxValue)\n\n const [curDisplayValue, setDisplayValue] = useState(\n intl.formatNumber(\n parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n }),\n { useGrouping: false }\n )\n )\n\n const handles = useCssHandles(CSS_HANDLES)\n\n const handleDropdownChange: ComponentProps<'select'>['onChange'] = (\n event\n ) => {\n const { validatedValue, validatedDisplayValue } = getUpdatedValue({\n value: event.target.value,\n unitMultiplier: 1,\n displayUnitMultiplier: unitMultiplier,\n minValue: 0,\n })\n\n if (validatedValue >= MAX_DROPDOWN_VALUE) {\n setSelector(SelectorType.Input)\n }\n\n setDisplayValue(validatedDisplayValue)\n onChange(validatedValue)\n }\n\n const handleInputChange: ComponentProps<'input'>['onChange'] = (event) => {\n setDisplayValue(event.target.value)\n }\n\n const handleInputBlur = () => {\n setInputFocused(false)\n\n if (curDisplayValue === '') {\n setDisplayValue(\n intl.formatNumber(\n parseDisplayValue({ value: '1', maxValue, unitMultiplier }),\n {\n useGrouping: false,\n }\n )\n )\n }\n\n const { validatedValue, validatedDisplayValue } = getUpdatedValue({\n value: curDisplayValue,\n unitMultiplier,\n })\n\n onChange(validatedValue)\n\n if (validatedValue < MAX_DROPDOWN_VALUE) {\n setSelector(SelectorType.Dropdown)\n }\n\n setDisplayValue(validatedDisplayValue)\n }\n\n const handleInputFocus = () => {\n setInputFocused(true)\n }\n\n useEffect(() => {\n if (inputFocused) {\n return\n }\n\n if (normalizedValue >= MAX_DROPDOWN_VALUE) {\n setSelector(SelectorType.Input)\n }\n\n setDisplayValue(\n intl.formatNumber(\n parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n }),\n { useGrouping: false }\n )\n )\n }, [\n inputFocused,\n maxValue,\n measurementUnit,\n unitMultiplier,\n normalizedValue,\n intl,\n ])\n\n if (curSelector === SelectorType.Dropdown) {\n const dropdownOptions = getDropdownOptions({\n maxValue,\n intl,\n unitMultiplier,\n measurementUnit,\n })\n\n return (\n <Fragment>\n <div className={`${handles.quantityDropdownMobileContainer} dn-m`}>\n <Dropdown\n id={`quantity-dropdown-mobile-${id}`}\n testId={`quantity-dropdown-mobile-${id}`}\n options={dropdownOptions}\n size=\"small\"\n value={normalizedValue}\n onChange={handleDropdownChange}\n placeholder=\" \"\n disabled={disabled}\n />\n </div>\n <div className={`${handles.quantityDropdownContainer} dn db-m`}>\n <Dropdown\n id={`quantity-dropdown-${id}`}\n testId={`quantity-dropdown-${id}`}\n options={dropdownOptions}\n value={normalizedValue}\n onChange={handleDropdownChange}\n placeholder=\" \"\n disabled={disabled}\n />\n </div>\n </Fragment>\n )\n }\n\n return (\n <Fragment>\n <div className={`${handles.quantityInputMobileContainer} dn-m`}>\n <Input\n id={`quantity-input-mobile-${id}`}\n size=\"small\"\n value={curDisplayValue}\n maxLength={MAX_INPUT_LENGTH}\n onChange={handleInputChange}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n placeholder=\"\"\n disabled={disabled}\n suffix={measurementUnit}\n />\n </div>\n <div className={`${handles.quantityInputContainer} dn db-m`}>\n <Input\n id={`quantity-input-${id}`}\n value={curDisplayValue}\n maxLength={MAX_INPUT_LENGTH}\n onChange={handleInputChange}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n placeholder=\"\"\n disabled={disabled}\n suffix={measurementUnit}\n />\n </div>\n </Fragment>\n )\n}\n\nexport default QuantitySelector\n\n```"
}
] |
code_product-list_f7894194
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/NoImageIcon.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React, { memo } from 'react'\n\nexport const NoImageIcon = memo(function NoImageIcon() {\n return (\n <svg\n width=\"96\"\n height=\"96\"\n viewBox=\"0 0 96 96\"\n fill=\"#F2F4F5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect width=\"96\" height=\"96\" rx=\"4\" fill=\"#F2F4F5\" />\n <path\n d=\"M52.9312 47.3125C52.9622 47.5395 53.0002 47.7645 53.0002 48.0005C53.0002 50.7615 50.7612 53.0005 48.0002 53.0005C47.7642 53.0005 47.5392 52.9625 47.3122 52.9315L44.2422 56.0005H58.0002C58.5532 56.0005 59.0002 55.5525 59.0002 55.0005V42.0005C59.0002 41.7875 58.9182 41.6005 58.8052 41.4385L52.9312 47.3125Z\"\n fill=\"#979899\"\n />\n <path\n d=\"M38 56H40L44.464 51.536C43.56 50.631 43 49.381 43 48C43 45.239 45.239 43 48 43C49.381 43 50.631 43.56 51.536 44.464L55 41H53.535L51.832 38.445C51.646 38.167 51.334 38 51 38H45C44.666 38 44.354 38.167 44.168 38.445L42.465 41H38C37.447 41 37 41.448 37 42V55C37 55.552 37.447 56 38 56Z\"\n fill=\"#979899\"\n />\n <path\n d=\"M37.0002 60.0002C36.7442 60.0002 36.4882 59.9023 36.2932 59.7073C35.9022 59.3162 35.9022 58.6842 36.2932 58.2932L58.2932 36.2932C58.6842 35.9022 59.3162 35.9022 59.7073 36.2932C60.0983 36.6842 60.0983 37.3162 59.7073 37.7072L37.7072 59.7073C37.5122 59.9023 37.2563 60.0002 37.0002 60.0002Z\"\n fill=\"#979899\"\n />\n </svg>\n )\n})\n\n```"
}
] |
code_product-list_8bc06d6a
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/VisuallyHidden.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FC } from 'react'\nimport React from 'react'\n\nimport styles from './VisuallyHidden.css'\n\nconst VisuallyHidden: FC = ({ children }) => {\n return <div className={styles.visuallyHidden}>{children}</div>\n}\n\nexport default VisuallyHidden\n\n```"
}
] |
code_product-list_7bc680c6
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/DecreaseIcon.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { VFC } from 'react'\nimport React from 'react'\n\nconst DecreaseIcon: VFC = () => {\n return (\n <svg width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M1.333 9.334h13.334V7.11H1.333v2.223z\" fill=\"currentColor\" />\n </svg>\n )\n}\n\nexport default DecreaseIcon\n\n```"
}
] |
code_product-list_c4e5748e
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/VisuallyHidden.css from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```css\n.visuallyHidden {\n /**\n * Visually hidden styles, equivalent to\n * the `sr-only` class of TailwindCSS: https://tailwindcss.com/docs/screen-readers#class-reference\n */\n border: 0;\n clip: rect(0, 0, 0, 0);\n clip: rect(0 0 0 0);\n width: 2px;\n height: 2px;\n margin: -2px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n}\n\n```"
}
] |
code_product-list_015960cc
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/QuantityStepper.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { VFC } from 'react'\nimport React, { useState, useEffect } from 'react'\nimport { FormattedMessage, useIntl, defineMessages } from 'react-intl'\nimport classnames from 'classnames'\nimport { useCssHandles } from 'vtex.css-handles'\n\nimport VisuallyHidden from './VisuallyHidden'\nimport IncreaseIcon from './IncreaseIcon'\nimport DecreaseIcon from './DecreaseIcon'\nimport { parseDisplayValue } from './utils'\nimport useQuantitySelectorState from './useQuantitySelectorState'\nimport styles from './QuantityStepper.css'\n\nconst CSS_HANDLES = [\n 'quantitySelectorWrapper',\n 'quantitySelectorButton',\n 'quantitySelectorDecrease',\n 'quantitySelectorIncrease',\n] as const\n\nconst messages = defineMessages({\n increaseQuantity: {\n id: 'store/product-list.quantityStepper.increaseQuantity',\n },\n decreaseQuantity: {\n id: 'store/product-list.quantityStepper.decreaseQuantity',\n },\n})\n\ninterface Props {\n id?: string\n value?: number\n maxValue?: number\n onChange?: (value: number) => void\n disabled?: boolean\n unitMultiplier?: number\n measurementUnit?: string\n}\n\nconst QuantityStepper: VFC<Props> = ({\n id,\n value = 1,\n maxValue,\n onChange,\n disabled,\n unitMultiplier = 1,\n measurementUnit = 'un',\n}) => {\n const intl = useIntl()\n\n const normalizedValue = Math.min(value, maxValue ?? value)\n\n const [getUpdatedValue] = useQuantitySelectorState({\n maxValue,\n measurementUnit,\n minValue: 1,\n })\n\n const handles = useCssHandles(CSS_HANDLES)\n\n const [focused, setFocused] = useState(false)\n\n const [currentValue, setCurrentValue] = useState(\n intl.formatNumber(\n parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n }),\n { useGrouping: false }\n )\n )\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (\n evt\n ) => {\n setCurrentValue(evt.target.value)\n }\n\n const handleInputBlur = () => {\n const { validatedValue, validatedDisplayValue } = getUpdatedValue({\n value: currentValue,\n unitMultiplier,\n })\n\n onChange?.(validatedValue)\n\n setCurrentValue(validatedDisplayValue)\n setFocused(false)\n }\n\n const handleDecrease: React.MouseEventHandler = (evt) => {\n evt.preventDefault()\n\n const parsedValue = parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n })\n\n const { validatedValue, validatedDisplayValue } = getUpdatedValue({\n value: (parsedValue - unitMultiplier).toString(),\n unitMultiplier,\n minValue: 0,\n })\n\n onChange?.(validatedValue)\n setCurrentValue(validatedDisplayValue)\n }\n\n const handleIncrease: React.MouseEventHandler = (evt) => {\n evt.preventDefault()\n\n const parsedValue = parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n })\n\n const { validatedValue, validatedDisplayValue } = getUpdatedValue({\n value: (parsedValue + unitMultiplier).toString(),\n unitMultiplier,\n })\n\n onChange?.(validatedValue)\n setCurrentValue(validatedDisplayValue)\n }\n\n useEffect(() => {\n if (focused) {\n return\n }\n\n setCurrentValue(\n intl.formatNumber(\n parseDisplayValue({\n value: normalizedValue.toString(),\n maxValue,\n unitMultiplier,\n }),\n { useGrouping: false }\n )\n )\n }, [focused, intl, normalizedValue, maxValue, unitMultiplier])\n\n const uniqueId = id ? `product-list-quantity-stepper-${id}` : undefined\n\n return (\n <div className={`flex ${handles.quantitySelectorWrapper}`}>\n <button\n className={classnames(\n handles.quantitySelectorButton,\n handles.quantitySelectorDecrease,\n 'pa4 ba br2 br--left flex items-center justify-center',\n {\n 'c-muted-1 b--muted-4 hover-b--muted-3 bg-muted-5 hover-bg-muted-4 pointer': !disabled,\n 'bg-muted-5 c-muted-3 b--muted-4': disabled,\n }\n )}\n aria-label={intl.formatMessage(messages.decreaseQuantity)}\n disabled={disabled}\n onClick={handleDecrease}\n >\n <DecreaseIcon />\n </button>\n <VisuallyHidden>\n <label htmlFor={uniqueId}>\n <FormattedMessage id=\"store/product-list.quantityStepper.label\" />\n </label>\n </VisuallyHidden>\n <div\n className={classnames(\n styles.inputContainer,\n 'flex-auto flex-shrink-0 flex items-center pv1 bt bb ph5',\n {\n 'c-muted-3 b--muted-4': disabled,\n 'b--muted-4 hover-b--muted-3': !disabled,\n }\n )}\n >\n <input\n className={classnames('flex-auto h-100 bn bg-transparent', {\n tc: measurementUnit === 'un',\n tr: measurementUnit !== 'un',\n })}\n id={uniqueId}\n disabled={disabled}\n value={currentValue}\n onChange={handleInputChange}\n onFocus={() => setFocused(true)}\n onBlur={handleInputBlur}\n />\n {measurementUnit !== 'un' && (\n <span className=\"c-muted-1 ml3\">{measurementUnit}</span>\n )}\n </div>\n <button\n className={classnames(\n handles.quantitySelectorButton,\n handles.quantitySelectorIncrease,\n 'pa4 ba br2 br--right flex items-center justify-center',\n {\n 'c-action-primary b--muted-4 hover-b--muted-3 bg-base hover-bg-muted-5 pointer': !disabled,\n 'bg-muted-5 c-muted-3 b--muted-4': disabled,\n }\n )}\n aria-label={intl.formatMessage(messages.increaseQuantity)}\n disabled={disabled}\n onClick={handleIncrease}\n >\n <IncreaseIcon />\n </button>\n </div>\n )\n}\n\nexport default QuantityStepper\n\n```"
}
] |
code_product-list_9f5f1782
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/__tests__/ProductList.test.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport type { FunctionComponent } from 'react'\nimport React from 'react'\nimport { render, fireEvent, screen } from '@vtex/test-tools/react'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport { items } from '../__fixtures__/items'\nimport AvailabilityMessage from '../AvailabilityMessage'\nimport Image from '../Image'\nimport Price from '../Price'\nimport ProductBrand from '../ProductBrand'\nimport ProductList from '../ProductList'\nimport ProductName from '../ProductName'\nimport ProductVariations from '../ProductVariations'\nimport QuantitySelector from '../QuantitySelector'\nimport RemoveButton from '../RemoveButton'\nimport UnitPrice from '../UnitPrice'\n\njest.mock('../LazyRender', () => ({ children } = { children: undefined }) =>\n children\n)\n\nconst ListItem: FunctionComponent = () => (\n <div>\n <AvailabilityMessage layout=\"cols\" />\n <Image />\n <Price textAlign=\"left\" />\n <ProductBrand />\n <ProductName />\n <ProductVariations />\n <QuantitySelector />\n <RemoveButton />\n <UnitPrice textAlign=\"left\" />\n </div>\n)\n\ndescribe('Product List', () => {\n it('should display the list of products', () => {\n const { queryByText } = render(\n <ProductList\n items={items}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n\n expect(queryByText(items[0].name as string)).toBeTruthy()\n expect(queryByText(items[1].name as string)).toBeTruthy()\n expect(queryByText(items[2].name as string)).toBeTruthy()\n })\n\n it('should call onRemove when remove button is clicked', () => {\n const mockHandleRemove = jest.fn((_: string) => {})\n\n const { getByTitle } = render(\n <ProductList\n items={[items[2]]}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={mockHandleRemove}\n >\n <ListItem />\n </ProductList>\n )\n\n const removeButton = getByTitle('remove')\n\n fireEvent.click(removeButton)\n\n expect(mockHandleRemove).toHaveBeenCalledTimes(1)\n expect(mockHandleRemove.mock.calls[0][0]).toBe(items[2].uniqueId)\n })\n\n it('should display unavailable items separately', () => {\n const { getByText } = render(\n <ProductList\n items={items}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n\n expect(getByText('2 unavailable products')).toBeTruthy()\n expect(getByText('1 available product')).toBeTruthy()\n })\n\n it('should display a message when item is out of stock', () => {\n const { queryByText } = render(\n <ProductList\n items={[items[1]]}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n\n expect(queryByText(/no longer available/)).toBeTruthy()\n })\n\n it('should display a message when item cannot be delivered', () => {\n const { queryByText } = render(\n <ProductList\n items={[items[2]]}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n\n expect(queryByText(/cannot be delivered/)).toBeTruthy()\n })\n\n it('should render the product detailUrl with correct rootPath', () => {\n const { unmount } = render(\n <ProductList\n items={[items[0]]}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n\n let [productImageLink, productNameLink] = screen.getAllByRole('link')\n\n expect(productImageLink).toHaveAttribute('href', '/work-shirt/p')\n expect(productImageLink).toHaveClass('productImageAnchor')\n expect(productNameLink).toHaveAttribute('href', '/work-shirt/p')\n expect(productNameLink).toHaveClass('productName')\n\n const mockedUseRuntime = useRuntime as jest.MockedFunction<\n () => ReturnType<typeof useRuntime>\n >\n\n // @ts-expect-error: we are not mocking everything on purpose\n mockedUseRuntime.mockReturnValue({\n rootPath: '/pt-br',\n })\n\n unmount()\n\n render(\n <ProductList\n items={[items[0]]}\n loading={false}\n onQuantityChange={() => {}}\n onRemove={() => {}}\n >\n <ListItem />\n </ProductList>\n )\n ;[productImageLink, productNameLink] = screen.getAllByRole('link')\n\n expect(productImageLink).toHaveAttribute('href', '/pt-br/work-shirt/p')\n expect(productImageLink).toHaveClass('productImageAnchor')\n expect(productNameLink).toHaveAttribute('href', '/pt-br/work-shirt/p')\n expect(productNameLink).toHaveClass('productName')\n })\n})\n\n```"
}
] |
code_product-list_ec8a4826
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/typings/@vtex/styleguide.d.ts from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```typescript\ndeclare module '@vtex/styleguide/lib/Button'\ndeclare module '@vtex/styleguide/lib/Dropdown'\ndeclare module '@vtex/styleguide/lib/Input'\ndeclare module '@vtex/styleguide/lib/Link'\ndeclare module '@vtex/styleguide/lib/Spinner'\ndeclare module '@vtex/styleguide/lib/icon/Delete'\ndeclare module '@vtex/styleguide/lib/ToastProvider' {\n export const ToastContext: Context<{ showToast(message: string): void }>\n}\n\n```"
}
] |
code_product-list_2b95efa7
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/__tests__/QuantitySelector.test.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render, screen, fireEvent } from '@vtex/test-tools/react'\nimport { ToastContext } from '@vtex/styleguide/lib/ToastProvider'\n\nimport QuantitySelector from '../QuantitySelector'\n\ndescribe('<QuantitySelector />', () => {\n it('should change from dropdown to input after quantity exceeds max value', () => {\n const onChange = jest.fn()\n\n render(\n <QuantitySelector id=\"1\" value={5} maxValue={50} onChange={onChange} />\n )\n\n const [dropdown] = screen.getAllByRole('combobox')\n\n expect(dropdown).toHaveValue('5')\n\n fireEvent.change(dropdown, { target: { value: '10' } })\n\n expect(onChange).toHaveBeenLastCalledWith(10)\n expect(dropdown).not.toBeInTheDocument()\n\n const [input] = screen.getAllByRole('textbox')\n\n expect(input).toHaveValue('10')\n })\n\n it('should change back to dropdown after changing the value to under max value', () => {\n const onChange = jest.fn()\n\n render(\n <QuantitySelector id=\"1\" value={10} maxValue={50} onChange={onChange} />\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '5' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenLastCalledWith(5)\n expect(input).not.toBeInTheDocument()\n })\n\n it(\"shouldn't display default measurement unit value\", () => {\n render(\n <QuantitySelector\n id=\"1\"\n value={1}\n maxValue={50}\n onChange={jest.fn()}\n measurementUnit=\"un\"\n />\n )\n\n const [dropdown] = screen.getAllByRole('combobox')\n\n expect(dropdown).toHaveDisplayValue('1')\n })\n\n it(\"shouldn't display raw quantity value when unit multiplier exists\", () => {\n const onChange = jest.fn()\n\n render(\n <QuantitySelector\n id=\"1\"\n value={1}\n maxValue={50}\n onChange={onChange}\n unitMultiplier={0.5}\n measurementUnit=\"kg\"\n />\n )\n\n const [dropdown] = screen.getAllByRole('combobox')\n\n expect(dropdown).toHaveValue('1')\n expect(dropdown).toHaveDisplayValue('0.5 kg')\n\n let options = screen.getAllByRole('option')\n\n // Get the first half options, because we have two\n // dropdowns in the page\n options = options.slice(0, options.length / 2)\n\n expect(options).toHaveLength(12)\n\n expect(options[1]).toHaveTextContent('0 - Remove')\n expect(options[1]).toHaveValue('0')\n\n expect(options[11]).toHaveTextContent('5 kg +')\n expect(options[11]).toHaveValue('10')\n\n fireEvent.change(dropdown, { target: { value: '10' } })\n expect(onChange).toHaveBeenLastCalledWith(10)\n\n expect(dropdown).not.toBeInTheDocument()\n\n const [input] = screen.getAllByRole('textbox')\n\n expect(input).toHaveValue('5')\n\n fireEvent.change(input, { target: { value: '6' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenLastCalledWith(12)\n })\n\n it('can handle decimal values with both periods and commas with unit multiplier', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider\n value={{ showToast, hideToast: jest.fn(), toastState: {} }}\n >\n <QuantitySelector\n id=\"1\"\n value={10}\n maxValue={50}\n onChange={onChange}\n unitMultiplier={0.5}\n measurementUnit=\"kg\"\n />\n </ToastContext.Provider>\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '5.5' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenLastCalledWith(11)\n\n fireEvent.change(input, { target: { value: '5.6' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenCalledTimes(2)\n expect(onChange).toHaveBeenLastCalledWith(11)\n\n expect(showToast).toHaveBeenCalledTimes(1)\n expect(showToast).toHaveBeenLastCalledWith(\n 'This product is sold by fractions of 0.5kg. That is why the entered quantity has been rounded to 5.5kg.'\n )\n\n fireEvent.change(input, { target: { value: '6,5' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenLastCalledWith(13)\n })\n\n it('should not include grouping separators on large numbers', () => {\n const onChange = jest.fn()\n\n render(\n <QuantitySelector id=\"1\" value={10} maxValue={1000} onChange={onChange} />\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '1000' } })\n fireEvent.blur(input)\n\n expect(input).toHaveValue('1000')\n expect(onChange).toHaveBeenLastCalledWith(1000)\n })\n\n it('should not remove the product when rounding down the value', () => {\n const onChange = jest.fn()\n\n render(\n <QuantitySelector id=\"1\" value={10} maxValue={50} onChange={onChange} />\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '0.1' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenLastCalledWith(1)\n })\n\n it('should not show toast if typed number is the same', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider\n value={{ showToast, hideToast: jest.fn(), toastState: {} }}\n >\n <QuantitySelector\n id=\"1\"\n value={11}\n maxValue={50}\n onChange={onChange}\n unitMultiplier={0.5}\n measurementUnit=\"kg\"\n />\n </ToastContext.Provider>\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '5,5' } })\n fireEvent.blur(input)\n\n expect(showToast).not.toHaveBeenCalled()\n })\n\n it('should show toast if number is rounded to below MAX_DROPDOWN_VALUE threshold', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider\n value={{ showToast, hideToast: jest.fn(), toastState: {} }}\n >\n <QuantitySelector\n id=\"1\"\n value={10}\n maxValue={50}\n onChange={onChange}\n unitMultiplier={0.5}\n measurementUnit=\"kg\"\n />\n </ToastContext.Provider>\n )\n\n const [input] = screen.getAllByRole('textbox')\n\n fireEvent.change(input, { target: { value: '0.1' } })\n fireEvent.blur(input)\n\n expect(showToast).toHaveBeenCalled()\n })\n\n it('should remove item when changing quantity in dropdown to 0', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider\n value={{ showToast, hideToast: jest.fn(), toastState: {} }}\n >\n <QuantitySelector id=\"1\" value={1} maxValue={50} onChange={onChange} />\n </ToastContext.Provider>\n )\n\n const [input] = screen.getAllByRole('combobox')\n\n fireEvent.change(input, { target: { value: '0' } })\n\n expect(showToast).not.toHaveBeenCalled()\n expect(onChange).toHaveBeenCalledWith(0)\n })\n})\n\n```"
}
] |
code_product-list_a6c1c489
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/react/components/__tests__/QuantityStepper.test.tsx from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { render, screen, fireEvent } from '@vtex/test-tools/react'\nimport { ToastContext } from '@vtex/styleguide/lib/ToastProvider'\n\nimport QuantityStepper from '../QuantityStepper'\n\ndescribe('<QuantityStepper />', () => {\n it('should allow use to type the quantity', () => {\n const onChange = jest.fn()\n\n render(<QuantityStepper id=\"1\" value={1} onChange={onChange} />)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('1')\n\n fireEvent.change(input, { target: { value: '10' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenCalledWith(10)\n expect(input).toHaveValue('10')\n })\n\n it('should display toast when rounding values', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider value={{ showToast }}>\n <QuantityStepper id=\"1\" value={1} onChange={onChange} />\n </ToastContext.Provider>\n )\n\n const input = screen.getByLabelText(/product quantity/i)\n\n fireEvent.change(input, { target: { value: '1.9' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenCalledWith(2)\n expect(input).toHaveValue('2')\n expect(showToast).toHaveBeenCalledTimes(1)\n expect(showToast).toHaveBeenCalledWith(\n 'This product is sold by fractions of 1un. That is why the entered quantity has been rounded to 2un.'\n )\n })\n\n it('should increase quantity by one when pressing the increase button', () => {\n const onChange = jest.fn()\n\n render(<QuantityStepper id=\"1\" value={1} onChange={onChange} />)\n\n const increaseButton = screen.getByRole('button', {\n name: /Increase quantity/i,\n })\n\n fireEvent.click(increaseButton)\n\n expect(onChange).toHaveBeenCalledWith(2)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('2')\n })\n\n it('should decrease quantity by one when pressing the decrease button', () => {\n const onChange = jest.fn()\n\n render(<QuantityStepper id=\"1\" value={2} onChange={onChange} />)\n\n const decreaseButton = screen.getByRole('button', {\n name: /Decrease quantity/i,\n })\n\n fireEvent.click(decreaseButton)\n\n expect(onChange).toHaveBeenCalledWith(1)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('1')\n })\n\n it('should update input value when value prop changes', () => {\n const { rerender } = render(<QuantityStepper id=\"1\" value={1} />)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('1')\n\n rerender(<QuantityStepper id=\"1\" value={2} />)\n\n expect(input).toHaveValue('2')\n })\n\n it('should not update input value when input is focused', () => {\n const { rerender } = render(<QuantityStepper id=\"1\" value={1} />)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('1')\n\n fireEvent.focus(input)\n\n rerender(<QuantityStepper id=\"1\" value={2} />)\n\n expect(input).toHaveValue('1')\n\n fireEvent.blur(input)\n\n expect(input).toHaveValue('2')\n })\n\n it('can handle unit multipliers changes in the input', () => {\n const onChange = jest.fn()\n const showToast = jest.fn()\n\n render(\n <ToastContext.Provider value={{ showToast }}>\n <QuantityStepper\n id=\"1\"\n value={1}\n onChange={onChange}\n unitMultiplier={0.5}\n />\n </ToastContext.Provider>\n )\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('0.5')\n\n fireEvent.change(input, { target: { value: '1.4' } })\n fireEvent.blur(input)\n\n expect(input).toHaveValue('1.5')\n expect(onChange).toHaveBeenLastCalledWith(3)\n expect(showToast).toHaveBeenLastCalledWith(\n 'This product is sold by fractions of 0.5un. That is why the entered quantity has been rounded to 1.5un.'\n )\n })\n\n it('can handle increments of unit multiplier in increase and decrease button', () => {\n const onChange = jest.fn()\n\n const { rerender } = render(\n <QuantityStepper\n id=\"1\"\n value={1}\n onChange={onChange}\n unitMultiplier={0.5}\n />\n )\n\n const increaseButton = screen.getByRole('button', {\n name: /increase quantity/i,\n })\n\n const decreaseButton = screen.getByRole('button', {\n name: /decrease quantity/i,\n })\n\n const input = screen.getByLabelText(/product quantity/i)\n\n expect(input).toHaveValue('0.5')\n\n fireEvent.click(increaseButton)\n\n expect(input).toHaveValue('1')\n expect(onChange).toHaveBeenLastCalledWith(2)\n\n expect(onChange).toHaveBeenCalledTimes(1)\n\n rerender(\n <QuantityStepper\n id=\"1\"\n value={2}\n onChange={onChange}\n unitMultiplier={0.5}\n />\n )\n\n fireEvent.click(decreaseButton)\n\n expect(input).toHaveValue('0.5')\n expect(onChange).toHaveBeenLastCalledWith(1)\n\n expect(onChange).toHaveBeenCalledTimes(2)\n })\n\n it('should display measurement unit alongside input', () => {\n render(<QuantityStepper id=\"1\" value={1} measurementUnit=\"kg\" />)\n\n expect(screen.getByText('kg')).toBeInTheDocument()\n })\n\n it('should remove item when decreasing quantity with button', () => {\n const onChange = jest.fn()\n\n render(<QuantityStepper id=\"1\" value={1} onChange={onChange} />)\n\n const decreaseButton = screen.getByLabelText(/decrease quantity/i)\n\n fireEvent.click(decreaseButton)\n\n expect(onChange).toHaveBeenCalledWith(0)\n })\n\n it(\"shouldn't show toast when typed number isn't a number\", () => {\n const showToast = jest.fn()\n const onChange = jest.fn()\n\n render(\n <ToastContext.Provider value={{ showToast }}>\n <QuantityStepper\n id=\"1\"\n value={1}\n unitMultiplier={0.5}\n onChange={onChange}\n />\n </ToastContext.Provider>\n )\n\n const input = screen.getByLabelText(/product quantity/i)\n\n fireEvent.change(input, { target: { value: 'abc' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenCalledWith(1)\n expect(showToast).not.toHaveBeenCalled()\n })\n\n it(\"shouldn't remove product when quantity is rounded to minimum value\", () => {\n const onChange = jest.fn()\n\n render(<QuantityStepper id=\"1\" value={1} onChange={onChange} />)\n\n const input = screen.getByLabelText(/product quantity/i)\n\n fireEvent.change(input, { target: { value: '0.1' } })\n fireEvent.blur(input)\n\n expect(onChange).toHaveBeenCalledWith(1)\n })\n})\n\n```"
}
] |
code_product-list_6fed2765
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/store/blocks/mobile.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"product-list-content-mobile\": {\n \"children\": [\"flex-layout.row#list-row.mobile\"]\n },\n \"flex-layout.row#list-row.mobile\": {\n \"children\": [\n \"flex-layout.col#image.mobile\",\n \"flex-layout.col#main-container.mobile\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"paddingBottom\": \"6\",\n \"paddingTop\": \"5\",\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.col#image.mobile\": {\n \"children\": [\"product-list-image\"],\n \"props\": {\n \"marginRight\": \"5\"\n }\n },\n \"flex-layout.col#main-container.mobile\": {\n \"children\": [\n \"flex-layout.row#top.mobile\",\n \"flex-layout.row#quantity-selector.mobile\",\n \"flex-layout.row#unit-price.mobile\",\n \"flex-layout.row#price.mobile\",\n \"flex-layout.row#message.mobile\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"flex-layout.row#top.mobile\": {\n \"children\": [\n \"flex-layout.col#product-description\",\n \"flex-layout.col#remove-button.mobile\"\n ],\n \"props\": {\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.row#quantity-selector.mobile\": {\n \"children\": [\"quantity-selector\"],\n \"props\": {\n \"marginTop\": \"5\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"flex-layout.row#unit-price.mobile\": {\n \"children\": [\"unit-price\"],\n \"props\": {\n \"marginTop\": \"3\"\n }\n },\n \"flex-layout.row#price.mobile\": {\n \"children\": [\"price#mobile\"],\n \"props\": {\n \"marginTop\": \"5\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"price#mobile\": {\n \"props\": {\n \"textAlign\": \"left\"\n }\n },\n \"flex-layout.col#remove-button.mobile\": {\n \"children\": [\"remove-button\"],\n \"props\": {\n \"marginLeft\": \"3\"\n }\n },\n \"flex-layout.row#message.mobile\": {\n \"children\": [\"message#mobile\"],\n \"props\": {\n \"marginTop\": \"3\"\n }\n },\n \"message#mobile\": {\n \"props\": {\n \"layout\": \"rows\"\n }\n }\n}\n\n```"
}
] |
code_product-list_707a97e6
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/store/blocks/common.jsonc from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"flex-layout.col#product-description\": {\n \"children\": [\n \"flex-layout.row#product-brand\",\n \"flex-layout.row#product-name\",\n \"flex-layout.row#product-variations\"\n ],\n \"props\": {\n \"marginBottom\": \"5\",\n \"width\": \"grow\",\n \"preventVerticalStretch\": \"true\"\n }\n },\n \"flex-layout.row#product-brand\": {\n \"children\": [\"product-brand\"],\n \"props\": {\n \"marginBottom\": \"2\"\n }\n },\n \"flex-layout.row#product-name\": {\n // Using app prefix here because it might conflict with\n // vtex.store-components:product-name\n \"children\": [\"vtex.product-list:product-name\"]\n },\n \"flex-layout.row#product-variations\": {\n \"children\": [\"product-variations\"],\n \"props\": {\n \"marginTop\": \"2\"\n }\n }\n}\n\n```"
}
] |
code_product-list_e90045b5
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of product-list/store/blocks/desktop.json from the product-list VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"product-list-content-desktop\": {\n \"children\": [\"flex-layout.row#list-row.desktop\"]\n },\n \"flex-layout.row#list-row.desktop\": {\n \"children\": [\n \"flex-layout.col#image.desktop\",\n \"flex-layout.col#main-container.desktop\"\n ],\n \"props\": {\n \"fullWidth\": true,\n \"paddingBottom\": \"7\",\n \"paddingTop\": \"6\",\n \"colSizing\": \"auto\",\n \"preserveLayoutOnMobile\": \"true\"\n }\n },\n \"flex-layout.col#image.desktop\": {\n \"children\": [\"product-list-image\"],\n \"props\": {\n \"marginRight\": \"6\"\n }\n },\n \"flex-layout.col#main-container.desktop\": {\n \"children\": [\n \"flex-layout.row#sub-container.desktop\",\n \"flex-layout.row#message.desktop\"\n ],\n \"props\": {\n \"width\": \"grow\"\n }\n },\n \"flex-layout.row#sub-container.desktop\": {\n \"children\": [\n \"flex-layout.col#product-description\",\n \"flex-layout.col#quantity.desktop\",\n \"flex-layout.row#price-remove\"\n ],\n \"props\": {\n \"preserveLayoutOnMobile\": \"true\",\n \"colSizing\": \"auto\"\n }\n },\n \"flex-layout.col#quantity.desktop\": {\n \"children\": [\n \"flex-layout.row#quantity-selector.desktop\",\n \"flex-layout.row#unit-price.desktop\",\n \"flex-layout.col#manual-pricing\"\n ],\n \"props\": {\n \"marginLeft\": \"8\",\n \"horizontalAlign\": \"center\"\n }\n },\n \"flex-layout.row#price-remove\": {\n \"children\": [\n \"flex-layout.col#price.desktop\",\n \"flex-layout.col#remove-button.desktop\"\n ],\n \"props\": {\n \"colSizing\": \"auto\"\n }\n },\n \"flex-layout.row#quantity-selector.desktop\": {\n \"children\": [\"quantity-selector\"],\n \"props\": {\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"flex-layout.row#unit-price.desktop\": {\n \"children\": [\"unit-price#desktop\"],\n \"props\": {\n \"marginTop\": \"3\",\n \"preventHorizontalStretch\": \"true\"\n }\n },\n \"unit-price#desktop\": {\n \"props\": {\n \"textAlign\": \"center\"\n }\n },\n \"flex-layout.col#price.desktop\": {\n \"children\": [\"price#desktop\"],\n \"props\": {\n \"blockClass\": \"priceWrapper\",\n \"marginLeft\": \"6\",\n \"preventHorizontalStretch\": \"true\",\n \"verticalAlign\": \"middle\"\n }\n },\n \"price#desktop\": {\n \"props\": {\n \"textAlign\": \"right\"\n }\n },\n \"flex-layout.col#remove-button.desktop\": {\n \"children\": [\"remove-button\"],\n \"props\": {\n \"marginLeft\": \"6\",\n \"verticalAlign\": \"middle\"\n }\n },\n \"flex-layout.row#message.desktop\": {\n \"children\": [\"message#desktop\"],\n \"props\": {\n \"marginTop\": \"4\"\n }\n },\n \"message#desktop\": {\n \"props\": {\n \"layout\": \"cols\"\n }\n },\n \"flex-layout.col#manual-pricing\": {\n \"children\": [\"manual-pricing\"]\n }\n}\n\n```"
}
] |
code_vtex-ads_3c09cc9d
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/messages/pt.json from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"admin/vtex-vtex-ads.common.active.title\": \"Ativo\",\n \"admin/vtex-vtex-ads.common.placementNameAdmin.title\": \"Nome do placement\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.title\": \"Quantidade de anúncios\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.banner.description\": \"Insira um valor maior ou igual a 1. Por padrão, será solicitado 1 anúncio. Para desativar um placement, utilize a propriedade 'Ativo'.\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.product.description\": \"Insira um valor maior ou igual a 1. Por padrão, serão solicitados 20 anúncios. Para desativar um placement, utilize a propriedade 'Ativo'.\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.title\": \"Categoria (opcional)\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.description\": \"[Avançado] Use esse campo em páginas que não tem contexto e precise forçar alguma categoria para o banner ou em casos pontuais.\",\n\n \"admin/vtex-vtex-ads.shelf.title\": \"VTEX Ads - Shelf\",\n \"admin/vtex-vtex-ads.shelf.placementNameAdmin.description\": \"Por padrão, será usado 'placement_product_default'. Dê preferência ao nome cadastrado na plataforma de anúncios.\",\n\n \"admin/vtex-vtex-ads.sponsoredBrand.title\": \"VTEX Ads - Sponsored Brand\",\n \"admin/vtex-vtex-ads.sponsoredBrand.placementNameAdmin.description\": \"Caso não tenho um nome de placement cadastrado no tema ou no admin, será usado 'placement_sb_default' por padrão. Dê preferência ao nome cadastrado na plataforma de anúncios.\",\n\n \"admin/vtex-vtex-ads.banner.title\": \"VTEX Ads - Banner\",\n \"admin/vtex-vtex-ads.banner.placementNameAdmin.description\": \"Por padrão, será usado 'placement_banner_default'. Dê preferência ao nome cadastrado na plataforma de anúncios.\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.title\": \"Tamanho da mídia desktop\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.description\": \"Use o mesmo tamanho cadastrado na plataforma de anúncios. Por padrão, será usado o valor 'banner'.\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.title\": \"Tamanho da mídia mobile (opcional)\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.description\": \"Use o mesmo tamanho cadastrado na plataforma de anúncios. Se não for passado, o valor 'Tamanho da mídia desktop' será usado.\",\n\n \"admin/vtex-vtex-ads.search.title\": \"VTEX Ads - Busca\",\n \"admin/vtex-vtex-ads.search.placementNameAdmin.description\": \"Por padrão, será usado 'placement_search_default'. Dê preferência ao nome cadastrado na plataforma de anúncios.\",\n \"admin/vtex-vtex-ads.search.tagPosition.title\": \"Posição da tag\",\n \"admin/vtex-vtex-ads.search.tagPosition.description\": \"Indique onde a tag deverá ser exibida dentro do card do produto\",\n \"admin/vtex-vtex-ads.search.tagPosition.start\": \"Começo\",\n \"admin/vtex-vtex-ads.search.tagPosition.end\": \"Fim\",\n \"admin/vtex-vtex-ads.search.tagText.default\": \"Patrocinado\",\n \"admin/vtex-vtex-ads.search.tagText.title\": \"Texto da tag patrocinada\",\n \"admin/vtex-vtex-ads.search.tagText.description\": \"Por padrão, será usado 'patrocinado' com tradução automática. Para substituir, preencha este campo.\",\n \"admin/vtex-vtex-ads.search.tagClassname.title\": \"Classe da Tag\",\n \"admin/vtex-vtex-ads.search.tagClassname.description\": \"Por padrão, será usado '.newtail-sponsored-tag'.\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.title\": \"Elemento HTML para Inserção de Tags\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.description\": \"[Avançado] Este campo deve ser editado apenas por desenvolvedores. Por padrão, será usado '.vtex-search-result-3-x-searchResultContainer #gallery-layout-container'.\",\n \"admin/vtex-vtex-ads.search.onlyFirstSKU.title\": \"Usar só primeiro SKU. Se marcado, será usado apenas o primeiro SKU do produto para busca no Newtail. Se desmarcado, serão usados todos os SKUs do produto para busca no Newtail.\"\n}\n\n```"
}
] |
code_vtex-ads_7333bd09
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/messages/en.json from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"admin/vtex-vtex-ads.common.active.title\": \"Active\",\n \"admin/vtex-vtex-ads.common.placementNameAdmin.title\": \"Placement Name\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.title\": \"Quantity of Ads\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.banner.description\": \"Enter a value greater than or equal to 1. By default, 1 ad will be requested. To disable a placement, use the 'Active' property.\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.product.description\": \"Enter a value greater than or equal to 1. By default, 20 ads will be requested. To disable a placement, use the 'Active' property.\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.title\": \"Category (optional)\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.description\": \"[Advanced] Use this field on pages without context where a category needs to be forced for the banner or in specific cases.\",\n\n \"admin/vtex-vtex-ads.shelf.title\": \"VTEX Ads - Shelf\",\n \"admin/vtex-vtex-ads.shelf.placementNameAdmin.description\": \"By default, 'placement_product_default' will be used. Prefer the name registered in the ad platform.\",\n\n \"admin/vtex-vtex-ads.sponsoredBrand.title\": \"VTEX Ads - Sponsored Brand\",\n \"admin/vtex-vtex-ads.sponsoredBrand.placementNameAdmin.description\": \"If you don't have a placement name registered in the theme or admin, 'placement_sb_default' will be used by default. Prefer the name registered in the ad platform.\",\n\n \"admin/vtex-vtex-ads.banner.title\": \"VTEX Ads - Banner\",\n \"admin/vtex-vtex-ads.banner.placementNameAdmin.description\": \"By default, 'placement_banner_default' will be used. Prefer the name registered in the ad platform.\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.title\": \"Desktop Media Size\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.description\": \"Use the same size registered in the ad platform. By default, the value 'banner' will be used.\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.title\": \"Mobile Media Size (optional)\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.description\": \"Use the same size registered in the ad platform. If not provided, the 'Desktop Media Size' value will be used.\",\n\n \"admin/vtex-vtex-ads.search.title\": \"VTEX Ads - Search\",\n \"admin/vtex-vtex-ads.search.placementNameAdmin.description\": \"By default, 'placement_search_default' will be used. Prefer the name registered in the ad platform.\",\n \"admin/vtex-vtex-ads.search.tagPosition.title\": \"Tag Position\",\n \"admin/vtex-vtex-ads.search.tagPosition.description\": \"Indicate where the tag should be displayed within the product card\",\n \"admin/vtex-vtex-ads.search.tagPosition.start\": \"Start\",\n \"admin/vtex-vtex-ads.search.tagPosition.end\": \"End\",\n \"admin/vtex-vtex-ads.search.tagText.default\": \"Sponsored\",\n \"admin/vtex-vtex-ads.search.tagText.title\": \"Sponsored Tag Text\",\n \"admin/vtex-vtex-ads.search.tagText.description\": \"By default, 'sponsored' will be used with automatic translation. To replace it, fill in this field.\",\n \"admin/vtex-vtex-ads.search.tagClassname.title\": \"Tag Class\",\n \"admin/vtex-vtex-ads.search.tagClassname.description\": \"By default, '.newtail-sponsored-tag' will be used.\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.title\": \"HTML Element for Tag Insertion\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.description\": \"[Advanced] This field should only be edited by developers. By default, '.vtex-search-result-3-x-searchResultContainer #gallery-layout-container' will be used.\",\n \"admin/vtex-vtex-ads.search.onlyFirstSKU.title\": \"Use only the first SKU. If checked, only the first SKU of the product will be used for search in Newtail. If unchecked, all SKUs of the product will be used for search in Newtail.\"\n}\n\n```"
}
] |
code_vtex-ads_d0ac6772
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/messages/es.json from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```json\n{\n \"admin/vtex-vtex-ads.common.active.title\": \"Activo\",\n \"admin/vtex-vtex-ads.common.placementNameAdmin.title\": \"Nombre del placement\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.title\": \"Cantidad de anuncios\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.banner.description\": \"Ingrese un valor mayor o igual a 1. Por defecto, se solicitará 1 anuncio. Para desactivar un placement, utilice la propiedad 'Activo'.\",\n \"admin/vtex-vtex-ads.common.quantityAdmin.product.description\": \"Ingrese un valor mayor o igual a 1. Por defecto, se solicitarán 20 anuncios. Para desactivar un placement, utilice la propiedad 'Activo'.\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.title\": \"Categoría (opcional)\",\n \"admin/vtex-vtex-ads.common.categoryNameAdmin.description\": \"[Avanzado] Use este campo en páginas que no tienen contexto y necesitan forzar alguna categoría para el banner o en casos puntuales.\",\n\n \"admin/vtex-vtex-ads.shelf.title\": \"VTEX Ads - Shelf\",\n \"admin/vtex-vtex-ads.shelf.placementNameAdmin.description\": \"Por defecto, se utilizará 'placement_product_default'. Prefiera el nombre registrado en la plataforma de anuncios.\",\n\n \"admin/vtex-vtex-ads.sponsoredBrand.title\": \"VTEX Ads - Sponsored Brand\",\n \"admin/vtex-vtex-ads.sponsoredBrand.placementNameAdmin.description\": \"Si no tiene un nombre de placement registrado en el tema o en el admin, se utilizará 'placement_sb_default' por defecto. Prefiera el nombre registrado en la plataforma de anuncios.\",\n\n \"admin/vtex-vtex-ads.banner.title\": \"VTEX Ads - Banner\",\n \"admin/vtex-vtex-ads.banner.placementNameAdmin.description\": \"Por defecto, se utilizará 'placement_banner_default'. Prefiera el nombre registrado en la plataforma de anuncios.\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.title\": \"Tamaño del medio - desktop\",\n \"admin/vtex-vtex-ads.banner.sizeAdmin.description\": \"Utilice el mismo tamaño registrado en la plataforma de anuncios. Por defecto, se utilizará el valor 'banner'.\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.title\": \"Tamaño del medio - móvil (opcional)\",\n \"admin/vtex-vtex-ads.banner.sizeMobileAdmin.description\": \"Utilice el mismo tamaño registrado en la plataforma de anuncios. Si no se proporciona, se utilizará el valor 'Tamaño del medio - desktop'.\",\n\n \"admin/vtex-vtex-ads.search.title\": \"VTEX Ads - Búsqueda\",\n \"admin/vtex-vtex-ads.search.placementNameAdmin.description\": \"Por defecto, se utilizará 'placement_search_default'. Prefiera el nombre registrado en la plataforma de anuncios.\",\n \"admin/vtex-vtex-ads.search.tagPosition.title\": \"Posición de la etiqueta\",\n \"admin/vtex-vtex-ads.search.tagPosition.description\": \"Indique dónde se debe mostrar la etiqueta dentro de la tarjeta del producto\",\n \"admin/vtex-vtex-ads.search.tagPosition.start\": \"Inicio\",\n \"admin/vtex-vtex-ads.search.tagPosition.end\": \"Final\",\n \"admin/vtex-vtex-ads.search.tagText.default\": \"Patrocinado\",\n \"admin/vtex-vtex-ads.search.tagText.title\": \"Texto de la etiqueta patrocinada\",\n \"admin/vtex-vtex-ads.search.tagText.description\": \"Por defecto, se utilizará 'patrocinado' con traducción automática. Para reemplazar, complete este campo.\",\n \"admin/vtex-vtex-ads.search.tagClassname.title\": \"Clase de la etiqueta\",\n \"admin/vtex-vtex-ads.search.tagClassname.description\": \"Por defecto, se utilizará '.newtail-sponsored-tag'.\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.title\": \"Elemento HTML para Inserción de Etiquetas\",\n \"admin/vtex-vtex-ads.search.parentSearchSelector.description\": \"[Avanzado] Este campo debe ser editado solo por desarrolladores. Por defecto, se utilizará '.vtex-search-result-3-x-searchResultContainer #gallery-layout-container'.\",\n \"admin/vtex-vtex-ads.search.onlyFirstSKU.title\": \"Usar solo el primer SKU. Si está marcado, solo se utilizará el primer SKU del producto para la búsqueda en Newtail. Si no está marcado, se utilizarán todos los SKUs del producto para la búsqueda en Newtail.\"\n}\n\n```"
}
] |
code_vtex-ads_898f46d1
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/react/Banner.tsx from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\n/* eslint-disable no-console */\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { defineMessages } from 'react-intl'\n\nimport { VTEXAdsProvider } from './hooks/useAds'\nimport Banners from './components/Banner'\nimport { useDebug } from './utils/debug'\n\nfunction Banner(props: PropsWithChildren<NewtailMediaBannerProps>) {\n useDebug({\n name: 'Banner',\n props,\n template: 'primary',\n })\n\n const isActive = props.active ?? true\n\n if (!isActive) return <></>\n\n return (\n <VTEXAdsProvider adType=\"banner\" {...props}>\n <Banners />\n </VTEXAdsProvider>\n )\n}\n\nconst messages = defineMessages({\n 'banner.title': {\n id: 'admin/vtex-vtex-ads.banner.title',\n defaultMessage: '',\n },\n 'common.active.title': {\n id: 'admin/vtex-vtex-ads.common.active.title',\n defaultMessage: '',\n },\n 'common.placementNameAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.placementNameAdmin.title',\n defaultMessage: '',\n },\n 'banner.placementNameAdmin.description': {\n id: 'admin/vtex-vtex-ads.banner.placementNameAdmin.description',\n defaultMessage: '',\n },\n 'banner.sizeAdmin.title': {\n id: 'admin/vtex-vtex-ads.banner.sizeAdmin.title',\n defaultMessage: '',\n },\n 'banner.sizeAdmin.description': {\n id: 'admin/vtex-vtex-ads.banner.sizeAdmin.description',\n defaultMessage: '',\n },\n 'banner.sizeMobileAdmin.title': {\n id: 'admin/vtex-vtex-ads.banner.sizeMobileAdmin.title',\n defaultMessage: '',\n },\n 'banner.sizeMobileAdmin.description': {\n id: 'admin/vtex-vtex-ads.banner.sizeMobileAdmin.description',\n defaultMessage: '',\n },\n 'common.quantityAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.quantityAdmin.title',\n defaultMessage: '',\n },\n 'common.quantityAdmin.banner.description': {\n id: 'admin/vtex-vtex-ads.common.quantityAdmin.banner.description',\n defaultMessage: '',\n },\n 'common.categoryNameAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.categoryNameAdmin.title',\n defaultMessage: '',\n },\n 'common.categoryNameAdmin.description': {\n id: 'admin/vtex-vtex-ads.common.categoryNameAdmin.description',\n defaultMessage: '',\n },\n})\n\nBanner.schema = {\n title: messages['banner.title'].id,\n type: 'object',\n properties: {\n placementName: {\n default: 'banner',\n isLayout: true,\n type: 'string',\n },\n size: {\n default: 'banner',\n isLayout: true,\n type: 'string',\n },\n sizeMobile: {\n default: null,\n isLayout: true,\n type: 'string',\n },\n quantity: {\n default: 1,\n isLayout: true,\n type: 'string',\n },\n categoryName: {\n default: null,\n isLayout: true,\n type: 'string',\n },\n },\n}\n\nexport default Banner\n\n```"
}
] |
code_vtex-ads_0843cd88
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/react/Conversion.tsx from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\n/* eslint-disable no-console */\nimport React from 'react'\n\nimport { VTEXAdsProvider } from './hooks/useAds'\nimport ConversionComponent from './components/Conversion'\n\nconst Conversion: React.FC = () => {\n return (\n <VTEXAdsProvider adType=\"conversion\">\n <ConversionComponent />\n </VTEXAdsProvider>\n )\n}\n\nexport default Conversion\n\n```"
}
] |
code_vtex-ads_4fa5509b
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/react/ProductSponsoredTag.tsx from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\nexport { default } from './components/ProductSponsoredTag'\n\n```"
}
] |
code_vtex-ads_a4234106
|
[
{
"role": "system",
"content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms."
},
{
"role": "user",
"content": "Show me the implementation of vtex-ads/react/SponsoredProducts.tsx from the vtex-ads VTEX app."
},
{
"role": "assistant",
"content": "Here's the implementation:\n\n```tsx\n/* eslint-disable no-console */\nimport React from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { defineMessages } from 'react-intl'\n\nimport Products from './components/Products'\nimport { VTEXAdsProvider } from './hooks/useAds'\nimport { useDebug } from './utils/debug'\n\nfunction SponsoredProducts(\n props: PropsWithChildren<NewtailMediaProductsProps>\n) {\n useDebug({\n name: 'Sponsored products',\n props,\n template: 'primary',\n })\n\n const isActive = props.active ?? true\n\n if (!isActive) return <></>\n\n return (\n <VTEXAdsProvider adType=\"product\" {...props}>\n <Products />\n </VTEXAdsProvider>\n )\n}\n\nconst messages = defineMessages({\n 'shelf.title': {\n id: 'admin/vtex-vtex-ads.shelf.title',\n defaultMessage: '',\n },\n 'common.active.title': {\n id: 'admin/vtex-vtex-ads.common.active.title',\n defaultMessage: '',\n },\n 'common.placementNameAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.placementNameAdmin.title',\n defaultMessage: '',\n },\n 'shelf.placementNameAdmin.description': {\n id: 'admin/vtex-vtex-ads.shelf.placementNameAdmin.description',\n defaultMessage: '',\n },\n 'common.quantityAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.quantityAdmin.title',\n defaultMessage: '',\n },\n 'common.quantityAdmin.product.description': {\n id: 'admin/vtex-vtex-ads.common.quantityAdmin.product.description',\n defaultMessage: '',\n },\n 'common.categoryNameAdmin.title': {\n id: 'admin/vtex-vtex-ads.common.categoryNameAdmin.title',\n defaultMessage: '',\n },\n 'common.categoryNameAdmin.description': {\n id: 'admin/vtex-vtex-ads.common.categoryNameAdmin.description',\n defaultMessage: '',\n },\n})\n\nSponsoredProducts.schema = {\n title: messages['shelf.title'].id,\n type: 'object',\n properties: {\n placementName: {\n default: 'products',\n isLayout: true,\n type: 'string',\n },\n quantity: {\n default: 20,\n isLayout: true,\n type: 'string',\n },\n categoryName: {\n default: null,\n isLayout: true,\n type: 'string',\n },\n },\n}\n\nexport default SponsoredProducts\n\n```"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.