challenge-vtex-io-gabriel-l.../store/blocks/search.jsonc

314 lines
6.7 KiB
Plaintext

{
"store.search": {
"blocks": ["search-result-layout"],
"props": {
"context": {
"skusFilter": "ALL",
"simulationBehavior": "skip"
}
}
},
"store.search#brand": {
"blocks": ["search-result-layout"],
"props": {
"context": {
"orderByField": "OrderByReleaseDateDESC",
"hideUnavailableItems": true,
"maxItemsPerPage": 10,
"skusFilter": "ALL",
"simulationBehavior": "skip"
}
}
},
"store.search#department": {
"blocks": ["search-result-layout"],
"props": {
"context": {
"skusFilter": "ALL",
"simulationBehavior": "skip"
}
}
},
"store.search#category": {
"blocks": ["search-result-layout"],
"props": {
"context": {
"skusFilter": "ALL",
"simulationBehavior": "skip"
}
}
},
"store.search#subcategory": {
"blocks": ["search-result-layout"],
"props": {
"context": {
"skusFilter": "ALL",
"simulationBehavior": "skip"
}
}
},
"search-result-layout": {
"blocks": [
"search-result-layout.desktop",
"search-result-layout.mobile",
"search-not-found-layout"
]
},
"search-result-layout.desktop": {
"children": [
"flex-layout.row#searchbread",
"flex-layout.row#searchtitle",
"flex-layout.row#result"
],
"props": {
"pagination": "show-more",
"preventRouteChange": false,
"defaultGalleryLayout": "grid"
}
},
"flex-layout.row#searchbread": {
"children": ["breadcrumb.search"],
"props": {
"preserveLayoutOnMobile": true,
"fullWidth": true
}
},
"flex-layout.row#searchtitle": {
"children": ["search-title.v2"]
},
"flex-layout.row#result": {
"children": ["flex-layout.col#filter", "flex-layout.col#content"],
"props": {
"preventHorizontalStretch": true,
"fullWidth": true
}
},
"flex-layout.col#filter": {
"children": ["filter-navigator.v3"],
"props": {
"blockClass": "filterCol"
}
},
"flex-layout.col#content": {
"children": [
"flex-layout.row#searchinfo",
"flex-layout.row#fetchprevious",
"flex-layout.row#products",
"flex-layout.row#fetchmore"
],
"props": {
"width": "grow",
"preventVerticalStretch": true
}
},
"flex-layout.row#searchinfo": {
"children": ["flex-layout.col#productCount", "flex-layout.row#orderByAndSwitcher"]
},
"flex-layout.row#orderByAndSwitcher": {
"children": ["order-by.v2", "gallery-layout-switcher"],
"props": {
"horizontalAlign": "right",
"preventHorizontalStretch": true,
"blockClass": "orderByAndSwitcher",
"colGap": 3
}
},
"flex-layout.col#productCount": {
"children": ["total-products.v2"],
"props": {
"blockClass": "productCountCol"
}
},
"flex-layout.row#fetchprevious": {
"props": {
"marginBottom": 3
},
"children": ["search-fetch-previous"]
},
"flex-layout.row#fetchmore": {
"props": {
"marginTop": 3
},
"children": ["search-fetch-more"]
},
"search-fetch-previous": {
"props": {
"htmlElementForButton": "a"
}
},
"search-fetch-more": {
"props": {
"htmlElementForButton": "a"
}
},
"flex-layout.row#products": {
"children": ["search-content"]
},
"search-content": {
"blocks": ["gallery", "not-found"]
},
"search-result-layout.mobile": {
"children": [
"flex-layout.row#searchinfomobile",
"flex-layout.row#searchbread",
"flex-layout.row#productCountMobile",
"flex-layout.row#fetchprevious",
"flex-layout.row#contentmobile",
"flex-layout.row#fetchmore"
],
"props": {
"pagination": "show-more",
"mobileLayout": {
"mode1": "small",
"mode2": "normal"
},
"defaultGalleryLayout": "grid"
}
},
"flex-layout.row#contentmobile": {
"children": ["search-content"],
"props": {
"preserveLayoutOnMobile": true
}
},
"flex-layout.row#searchinfomobile": {
"children": [
"flex-layout.col#orderByMobile",
"flex-layout.col#filterMobile",
"flex-layout.col#switcherMobile"
],
"props": {
"preserveLayoutOnMobile": true,
"colSizing": "auto",
"colJustify": "around"
}
},
"flex-layout.col#orderByMobile": {
"children": ["order-by.v2"],
"props": {
"blockClass": "orderByMobileCol"
}
},
"flex-layout.row#productCountMobile": {
"children": ["total-products.v2"],
"props": {
"blockClass": "productCountMobileRow"
}
},
"flex-layout.col#filterMobile": {
"children": ["filter-navigator.v3"],
"props": {
"blockClass": "filterMobileCol"
}
},
"flex-layout.col#switcherMobile": {
"children": ["gallery-layout-switcher"],
"props": {
"verticalAlign": "middle"
}
},
"search-not-found-layout": {
"children": ["flex-layout.row#searchbread", "flex-layout.row#notfound"]
},
"flex-layout.row#notfound": {
"children": ["not-found"],
"props": {
"fullWidth": true
}
},
"breadcrumb": {
"props": {
"showOnMobile": true
}
},
"gallery": {
"props": {
"layouts": [
{
"name": "grid",
"component": "GridSummary",
"itemsPerRow": {
"(min-width:1300px)": 4,
"desktop": 3,
"tablet": 3,
"phone": 2
}
},
{
"name": "list",
"component": "ListSummary",
"itemsPerRow": 1
}
],
"ListSummary": "product-summary.shelf#listLayout",
"GridSummary": "product-summary.shelf"
}
},
"gallery-layout-switcher": {
"children": [
/*
* For accessbility to work properly,
* It's important to define the options in the same order as the layouts
*/
"gallery-layout-option#grid",
"gallery-layout-option#list"
]
},
"gallery-layout-option#grid": {
"props": {
"name": "grid"
},
"children": [
"icon-grid",
"responsive-layout.desktop#textOptionGrid"
]
},
"gallery-layout-option#list": {
"props": {
"name": "list"
},
"children": [
"icon-inline-grid",
"responsive-layout.desktop#textOptionList"
]
},
"responsive-layout.desktop#textOptionGrid": {
"children": [
"rich-text#option-grid"
]
},
"responsive-layout.desktop#textOptionList": {
"children": [
"rich-text#option-list"
]
},
"rich-text#option-grid": {
"props": {
"text": "Grid",
"textColor": "c-auto",
"blockClass": "layout-option"
}
},
"rich-text#option-list": {
"props": {
"text": "List",
"textColor": "c-auto",
"blockClass": "layout-option"
}
}
}