{
"name": "Stores",
"view": "Default",
"section": "SectionA",
"settings": {
"groups": [
{
"title": "Sample title",
"stores": [
{
"name": "Sample text",
"address": {
"address1": "Sample text",
"address2": "",
"city": "Sample text",
"state": "Sample text",
"country": "",
"postalCode": "",
"translation": {}
},
"phone": "Sample text",
"email": "sample@example.com",
"workingHours": "<p>Sample text</p>",
"latitude": "37.000000",
"longitude": "23.000000",
"url": "https://example.com/store",
"imageTranslation": {}
},
"..."
]
},
"..."
],
"markerLink": {
"id": "Marker Media Id",
"link": "https://example.com/media/marker.png",
"mediaType": "Image"
},
"id": "Component Id",
"section": "SectionA",
"type": "NoirStores",
"name": "Stores",
"configuredInContentApi": true,
"view": "Default",
"displayName": "",
"cssClass": ""
},
"translations": {
"mainStore": "Sample text",
"noStoresFound": "Sample text",
"findNearestStores": "Sample text",
"...": "..."
}
}settings.idsettings.cssClasssettings.groups[]GlobalData.Company.Address.*, if presenttranslations.noStoresAvailablesettings.markerLink.link (custom marker icon)translations.*Components/Stores/Default.js exposes:<section
x-data='storesdefault.initComponent(groups, markerLink, id, viewStoreTranslation, viewDirectionsTranslation)'
>initComponent(groups, markerLink, id, viewStoreTranslation, viewDirectionsTranslation)init()groups[] into flatStores[] and adds groupTitle into each store.this.groups = this.flatStores.groups is effectively the flat list.initMap()L.map) in #map-<id>.setInteractionsEnabled(enabled)addMarkers()latitude/longitude:markerLink exists)filterStores()searchQuery across:removeAccents(...).removeAccents(str)NFD.filteredStoresCount (getter)toggleStoreDetails(storeIndex)zoomStore(storeIndex)findNearestStores()navigator.geolocation.alert(...) messages for geolocation errors.calculateDistance(lat1, lon1, lat2, lon2)degToRad(deg)L)L.markerClusterGroup)generalreusabledefault.searchComponent() (search input model)flatStores for rendering; groups is mutated into the flat list during init().bindPopup(...) with HTML strings.GlobalData.Company.Address.*.settings.groups.size > 0.GlobalData.Company.Address.*translations.noStoresAvailable.zoomStore(...) when the user clicks “Find us on the map” under a store.