forked from M3-Academy/challenge-vtex-io
refactor(product.jsonc): organizando código do jsonc
This commit is contained in:
parent
f45182dd4f
commit
48659e392d
@ -12,70 +12,9 @@
|
||||
"product-questions-and-answers"
|
||||
]
|
||||
},
|
||||
//
|
||||
"html#slider-block-container": {
|
||||
"children": [
|
||||
"rich-text#slider-block-title",
|
||||
"html#list-context.product-list#slider-block"
|
||||
]
|
||||
},
|
||||
"rich-text#slider-block-title": {
|
||||
"props": {
|
||||
"text": "### Você também pode gostar:",
|
||||
"blockClass": "slider-title"
|
||||
}
|
||||
},
|
||||
"product-summary.shelf#slider-block": {
|
||||
"children": ["html#product-summary.shelf#product-content"]
|
||||
},
|
||||
"html#product-summary.shelf#product-content": {
|
||||
"props": {
|
||||
"testId": "vtex-product-summary"
|
||||
},
|
||||
"children": [
|
||||
"product-summary-image#slider-images",
|
||||
"product-summary-name",
|
||||
// "product-summary-space",
|
||||
"product-summary-price"
|
||||
]
|
||||
},
|
||||
"product-summary-image#slider-images": {
|
||||
"props": {
|
||||
"blockClass": "product-summary-image",
|
||||
"showBadge": false,
|
||||
"aspectRatio": "1:1"
|
||||
// "maxHeight": 300
|
||||
}
|
||||
},
|
||||
"list-context.product-list#slider-block": {
|
||||
"blocks": ["product-summary.shelf#slider-block"],
|
||||
"children": ["html#slider-layout#products-carousel"]
|
||||
},
|
||||
"html#list-context.product-list#slider-block": {
|
||||
"props": {
|
||||
"testId": "product-summary-list"
|
||||
},
|
||||
"children": ["list-context.product-list#slider-block"]
|
||||
},
|
||||
"html#slider-layout#products-carousel": {
|
||||
"props": {
|
||||
"testId": "product-summary-list"
|
||||
},
|
||||
"children": ["slider-layout#products-carousel"]
|
||||
},
|
||||
"slider-layout#products-carousel": {
|
||||
"props": {
|
||||
"itemsPerPage": {
|
||||
"desktop": 4,
|
||||
"tablet": 3,
|
||||
"phone": 2
|
||||
},
|
||||
"infinite": true,
|
||||
"showNavigationArrows": "always",
|
||||
"blockClass": "carousel"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//Breadcrumb
|
||||
|
||||
"html#breadcrumb": {
|
||||
"props": {
|
||||
"tag": "section",
|
||||
@ -85,6 +24,8 @@
|
||||
"children": ["breadcrumb"]
|
||||
},
|
||||
|
||||
//Availability
|
||||
|
||||
"condition-layout.product#availability": {
|
||||
"props": {
|
||||
"conditions": [
|
||||
@ -103,6 +44,14 @@
|
||||
"children": ["html#flex-layout.col#stack", "html#right-col"]
|
||||
},
|
||||
|
||||
"html#flex-layout.col#stack": {
|
||||
"children": ["stack-layout"],
|
||||
"props": {
|
||||
"blockClass": "stack-layout-content",
|
||||
"rowGap": 0
|
||||
}
|
||||
},
|
||||
|
||||
"stack-layout": {
|
||||
"props": {
|
||||
"blockClass": "product"
|
||||
@ -123,124 +72,40 @@
|
||||
}
|
||||
},
|
||||
|
||||
"html#flex-layout.col#stack": {
|
||||
"children": ["stack-layout"],
|
||||
"html#product-availability": {
|
||||
"props": {
|
||||
"blockClass": "stack-layout-content",
|
||||
"rowGap": 0
|
||||
}
|
||||
},
|
||||
"html#flex-layout.row#product-image": {
|
||||
"props": {
|
||||
"testId": "product-images"
|
||||
"blockClass": "product-availability-block"
|
||||
},
|
||||
"children": ["product-images"]
|
||||
"children": ["html#flex-layout.col#stack", "html#right-col-availability"]
|
||||
},
|
||||
"product-images": {
|
||||
|
||||
"html#right-col-availability": {
|
||||
"props": {
|
||||
"aspectRatio": {
|
||||
"desktop": "auto",
|
||||
"phone": "16:9"
|
||||
},
|
||||
"displayThumbnailsArrows": false,
|
||||
"showPaginationDots": false,
|
||||
"thumbnailsOrientation": "horizontal"
|
||||
}
|
||||
},
|
||||
"product-images#description-content": {
|
||||
"props": {
|
||||
"displayMode": "first-image",
|
||||
"zoomMode": "disable",
|
||||
"blockClass": "image-description"
|
||||
}
|
||||
},
|
||||
"tab-layout#description": {
|
||||
"children": ["tab-list#description", "tab-content#description"],
|
||||
"props": {
|
||||
"blockClass": "description-block",
|
||||
"defaultActiveTabId": "firstTab"
|
||||
}
|
||||
},
|
||||
"tab-list#description": {
|
||||
"preventVerticalStretch": true,
|
||||
"rowGap": 0,
|
||||
"blockClass": "info-availability"
|
||||
},
|
||||
"children": [
|
||||
"tab-list.item#firstTab",
|
||||
"tab-list.item#secondTab",
|
||||
"tab-list.item#thirdTab",
|
||||
"tab-list.item#fourthTab",
|
||||
"tab-list.item#fifthTab"
|
||||
"html#identification-product-availability",
|
||||
"flex-layout.row#availability",
|
||||
"html#sku-selector"
|
||||
]
|
||||
},
|
||||
"tab-list.item#firstTab": {
|
||||
|
||||
"html#identification-product-availability": {
|
||||
"props": {
|
||||
"tabId": "firstTab",
|
||||
"label": "Descrição",
|
||||
"defaultActiveTab": true
|
||||
}
|
||||
"blockClass": "identification-product-availability"
|
||||
},
|
||||
"children": ["html#product-name", "product-identifier.product"]
|
||||
},
|
||||
"tab-list.item#secondTab": {
|
||||
|
||||
"flex-layout.row#availability": {
|
||||
"props": {
|
||||
"tabId": "secondTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
"blockClass": "message-availability"
|
||||
},
|
||||
"children": ["availability-subscriber"]
|
||||
},
|
||||
"tab-list.item#thirdTab": {
|
||||
"props": {
|
||||
"tabId": "thirdTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
"tab-list.item#fourthTab": {
|
||||
"props": {
|
||||
"tabId": "fourthTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
"tab-list.item#fifthTab": {
|
||||
"props": {
|
||||
"tabId": "fifthTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
"tab-content#description": {
|
||||
"children": [
|
||||
"tab-content.item#firstTab",
|
||||
"tab-content.item#secondTab",
|
||||
"tab-content.item#thirdTab",
|
||||
"tab-content.item#fourthTab",
|
||||
"tab-content.item#fifthTab"
|
||||
]
|
||||
},
|
||||
"tab-content.item#firstTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "firstTab"
|
||||
}
|
||||
},
|
||||
"tab-content.item#secondTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "secondTab"
|
||||
}
|
||||
},
|
||||
"tab-content.item#thirdTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "thirdTab"
|
||||
}
|
||||
},
|
||||
"tab-content.item#fourthTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "fourthTab"
|
||||
}
|
||||
},
|
||||
"tab-content.item#fifthTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "fifthTab"
|
||||
}
|
||||
},
|
||||
//
|
||||
|
||||
"html#right-col": {
|
||||
"props": {
|
||||
"preventVerticalStretch": true,
|
||||
@ -258,43 +123,21 @@
|
||||
"html#cart-content",
|
||||
// "product-assembly-options",
|
||||
"product-gifts",
|
||||
// "flex-layout.row#buy-button",
|
||||
// "flex-layout.row#add-to-cart-button",
|
||||
"availability-subscriber",
|
||||
"shipping-simulator",
|
||||
"placeholder-component"
|
||||
// "share#default"
|
||||
]
|
||||
},
|
||||
|
||||
"html#identification-product": {
|
||||
"props": {
|
||||
"blockClass": "identification-product-content"
|
||||
},
|
||||
"children": ["html#product-name", "product-identifier.product"]
|
||||
},
|
||||
"html#cart-content": {
|
||||
"props": {
|
||||
"blockClass": "cart-content"
|
||||
},
|
||||
"children": ["html#product-quantity", "html#flex-layout.row#buy-button"]
|
||||
},
|
||||
"html#product-quantity": {
|
||||
"props": {
|
||||
"testId": "product-quantity"
|
||||
},
|
||||
"children": ["product-quantity"]
|
||||
},
|
||||
"html#flex-layout.row#buy-button": {
|
||||
"props": {
|
||||
"testId": "add-to-cart-button"
|
||||
},
|
||||
"children": ["flex-layout.row#buy-button"]
|
||||
},
|
||||
"html#pix-component": {
|
||||
"props": {
|
||||
"testId": "pix-price"
|
||||
},
|
||||
"children": ["pix-component"]
|
||||
},
|
||||
|
||||
"html#product-name": {
|
||||
"props": {
|
||||
"marginBottom": 3
|
||||
@ -302,12 +145,20 @@
|
||||
"children": ["vtex.store-components:product-name"]
|
||||
},
|
||||
|
||||
"html#pix-component": {
|
||||
"props": {
|
||||
"testId": "pix-price"
|
||||
},
|
||||
"children": ["pix-component"]
|
||||
},
|
||||
|
||||
"html#sku-selector": {
|
||||
"props": {
|
||||
"testId": "sku-selector"
|
||||
},
|
||||
"children": ["sku-selector"]
|
||||
},
|
||||
|
||||
"sku-selector": {
|
||||
"props": {
|
||||
"variationsSpacing": 3,
|
||||
@ -316,7 +167,27 @@
|
||||
}
|
||||
},
|
||||
|
||||
"flex-layout.row#buy-button": {
|
||||
"html#cart-content": {
|
||||
"props": {
|
||||
"blockClass": "cart-content"
|
||||
},
|
||||
"children": ["html#product-quantity", "html#add-to-cart-button"]
|
||||
},
|
||||
|
||||
"html#product-quantity": {
|
||||
"props": {
|
||||
"testId": "product-quantity"
|
||||
},
|
||||
"children": ["product-quantity"]
|
||||
},
|
||||
"html#add-to-cart-button": {
|
||||
"props": {
|
||||
"testId": "add-to-cart-button"
|
||||
},
|
||||
"children": ["flex-layout.row#add-to-cart-button"]
|
||||
},
|
||||
|
||||
"flex-layout.row#add-to-cart-button": {
|
||||
"props": {
|
||||
"marginTop": 4,
|
||||
"marginBottom": 7
|
||||
@ -324,45 +195,217 @@
|
||||
"children": ["add-to-cart-button"]
|
||||
},
|
||||
|
||||
"html#product-availability": {
|
||||
"props": {
|
||||
"blockClass": "product-availability-block"
|
||||
},
|
||||
"children": ["html#flex-layout.col#stack", "html#right-col-availability"]
|
||||
},
|
||||
"html#right-col-availability": {
|
||||
"props": {
|
||||
"preventVerticalStretch": true,
|
||||
"rowGap": 0,
|
||||
"blockClass": "info-availability"
|
||||
},
|
||||
//Slider
|
||||
|
||||
"html#slider-block-container": {
|
||||
"children": [
|
||||
"html#identification-product-availability",
|
||||
"flex-layout.row#availability",
|
||||
"html#sku-selector"
|
||||
"rich-text#slider-block-title",
|
||||
"html#list-context.product-list#slider-block"
|
||||
]
|
||||
},
|
||||
"html#identification-product-availability": {
|
||||
|
||||
"rich-text#slider-block-title": {
|
||||
"props": {
|
||||
"blockClass": "identification-product-availability"
|
||||
},
|
||||
"children": ["html#product-name", "product-identifier.product"]
|
||||
},
|
||||
"flex-layout.row#availability": {
|
||||
"props": {
|
||||
"blockClass": "message-availability"
|
||||
},
|
||||
"children": ["availability-subscriber"]
|
||||
"text": "### Você também pode gostar:",
|
||||
"blockClass": "slider-title"
|
||||
}
|
||||
},
|
||||
|
||||
"share#default": {
|
||||
"product-summary.shelf#slider-block": {
|
||||
"children": ["html#product-summary.shelf#product-content"]
|
||||
},
|
||||
|
||||
"html#product-summary.shelf#product-content": {
|
||||
"props": {
|
||||
"social": {
|
||||
"Facebook": true,
|
||||
"WhatsApp": true,
|
||||
"Twitter": false,
|
||||
"Pinterest": true
|
||||
}
|
||||
"testId": "vtex-product-summary"
|
||||
},
|
||||
"children": [
|
||||
"product-summary-image#slider-images",
|
||||
"product-summary-name",
|
||||
// "product-summary-space",
|
||||
"product-summary-price"
|
||||
]
|
||||
},
|
||||
|
||||
"product-summary-image#slider-images": {
|
||||
"props": {
|
||||
"blockClass": "product-summary-image",
|
||||
"showBadge": false,
|
||||
"aspectRatio": "1:1"
|
||||
// "maxHeight": 300
|
||||
}
|
||||
},
|
||||
|
||||
"list-context.product-list#slider-block": {
|
||||
"blocks": ["product-summary.shelf#slider-block"],
|
||||
"children": ["html#slider-layout#products-carousel"]
|
||||
},
|
||||
|
||||
"html#list-context.product-list#slider-block": {
|
||||
"props": {
|
||||
"testId": "product-summary-list"
|
||||
},
|
||||
"children": ["list-context.product-list#slider-block"]
|
||||
},
|
||||
|
||||
"html#slider-layout#products-carousel": {
|
||||
"props": {
|
||||
"testId": "product-summary-list"
|
||||
},
|
||||
"children": ["slider-layout#products-carousel"]
|
||||
},
|
||||
|
||||
"slider-layout#products-carousel": {
|
||||
"props": {
|
||||
"itemsPerPage": {
|
||||
"desktop": 4,
|
||||
"tablet": 3,
|
||||
"phone": 2
|
||||
},
|
||||
"infinite": true,
|
||||
"showNavigationArrows": "always",
|
||||
"blockClass": "carousel"
|
||||
}
|
||||
},
|
||||
|
||||
//Product Images
|
||||
|
||||
"html#flex-layout.row#product-image": {
|
||||
"props": {
|
||||
"testId": "product-images"
|
||||
},
|
||||
"children": ["product-images"]
|
||||
},
|
||||
|
||||
"product-images": {
|
||||
"props": {
|
||||
"aspectRatio": {
|
||||
"desktop": "auto",
|
||||
"phone": "16:9"
|
||||
},
|
||||
"displayThumbnailsArrows": false,
|
||||
"showPaginationDots": false,
|
||||
"thumbnailsOrientation": "horizontal"
|
||||
}
|
||||
},
|
||||
|
||||
// Tab-Layout
|
||||
|
||||
"product-images#description-content": {
|
||||
"props": {
|
||||
"displayMode": "first-image",
|
||||
"zoomMode": "disabled",
|
||||
"blockClass": "image-description"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-layout#description": {
|
||||
"children": ["tab-list#description", "tab-content#description"],
|
||||
"props": {
|
||||
"blockClass": "description-block",
|
||||
"defaultActiveTabId": "firstTab"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-list#description": {
|
||||
"children": [
|
||||
"tab-list.item#firstTab",
|
||||
"tab-list.item#secondTab",
|
||||
"tab-list.item#thirdTab",
|
||||
"tab-list.item#fourthTab",
|
||||
"tab-list.item#fifthTab"
|
||||
]
|
||||
},
|
||||
|
||||
"tab-list.item#firstTab": {
|
||||
"props": {
|
||||
"tabId": "firstTab",
|
||||
"label": "Descrição",
|
||||
"defaultActiveTab": true
|
||||
}
|
||||
},
|
||||
|
||||
"tab-list.item#secondTab": {
|
||||
"props": {
|
||||
"tabId": "secondTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-list.item#thirdTab": {
|
||||
"props": {
|
||||
"tabId": "thirdTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-list.item#fourthTab": {
|
||||
"props": {
|
||||
"tabId": "fourthTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-list.item#fifthTab": {
|
||||
"props": {
|
||||
"tabId": "fifthTab",
|
||||
"label": "Descrição"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-content#description": {
|
||||
"children": [
|
||||
"tab-content.item#firstTab",
|
||||
"tab-content.item#secondTab",
|
||||
"tab-content.item#thirdTab",
|
||||
"tab-content.item#fourthTab",
|
||||
"tab-content.item#fifthTab"
|
||||
]
|
||||
},
|
||||
|
||||
"tab-content.item#firstTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "firstTab"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-content.item#secondTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "secondTab"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-content.item#thirdTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "thirdTab"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-content.item#fourthTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "fourthTab"
|
||||
}
|
||||
},
|
||||
|
||||
"tab-content.item#fifthTab": {
|
||||
"children": ["product-images#description-content", "product-description"],
|
||||
"props": {
|
||||
"tabId": "fifthTab"
|
||||
}
|
||||
}
|
||||
|
||||
// "share#default": {
|
||||
// "props": {
|
||||
// "social": {
|
||||
// "Facebook": true,
|
||||
// "WhatsApp": true,
|
||||
// "Twitter": false,
|
||||
// "Pinterest": true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user