From 50dc780b94bad6764a152445ac8775508b6a51f5 Mon Sep 17 00:00:00 2001 From: anguyen-yext2 Date: Wed, 18 Feb 2026 00:07:10 -0500 Subject: [PATCH 1/9] WIP: feat: customized result styles per entity type For each entity type, user can customize: pin icon, pin color, and result card. When a pin is selected, apply gray100 (#F9F9F9) color to the corresponding result card's background. TODOs: - use actual entity types from the document once we support multiple entity types per page set - hide primary CTA in result card for standalone locator J=WAT-5362 TEST=manual tested in dev mode --- .../locales/platform/cs/visual-editor.json | 13 + .../locales/platform/da/visual-editor.json | 13 + .../locales/platform/de/visual-editor.json | 13 + .../locales/platform/en-GB/visual-editor.json | 13 + .../locales/platform/en/visual-editor.json | 13 + .../locales/platform/es/visual-editor.json | 13 + .../locales/platform/et/visual-editor.json | 13 + .../locales/platform/fi/visual-editor.json | 13 + .../locales/platform/fr/visual-editor.json | 13 + .../locales/platform/hr/visual-editor.json | 13 + .../locales/platform/hu/visual-editor.json | 13 + .../locales/platform/it/visual-editor.json | 13 + .../locales/platform/ja/visual-editor.json | 13 + .../locales/platform/lt/visual-editor.json | 13 + .../locales/platform/lv/visual-editor.json | 13 + .../locales/platform/nb/visual-editor.json | 13 + .../locales/platform/nl/visual-editor.json | 13 + .../locales/platform/pl/visual-editor.json | 13 + .../locales/platform/pt/visual-editor.json | 13 + .../locales/platform/ro/visual-editor.json | 13 + .../locales/platform/sk/visual-editor.json | 13 + .../locales/platform/sv/visual-editor.json | 13 + .../locales/platform/tr/visual-editor.json | 13 + .../locales/platform/zh-TW/visual-editor.json | 13 + .../locales/platform/zh/visual-editor.json | 13 + packages/visual-editor/package.json | 1 + .../visual-editor/src/components/Locator.tsx | 447 ++++++++++++++++-- .../src/components/LocatorResultCard.tsx | 4 + .../src/components/MapPinIcon.tsx | 130 ++++- .../src/internal/puck/ui/Combobox.tsx | 14 + .../src/internal/types/combobox.ts | 1 + pnpm-lock.yaml | 11 + 32 files changed, 880 insertions(+), 53 deletions(-) diff --git a/packages/visual-editor/locales/platform/cs/visual-editor.json b/packages/visual-editor/locales/platform/cs/visual-editor.json index 43f48184e4..1a19d6915a 100644 --- a/packages/visual-editor/locales/platform/cs/visual-editor.json +++ b/packages/visual-editor/locales/platform/cs/visual-editor.json @@ -255,6 +255,7 @@ "emailsListLength": "Délka seznamu e -mailů", "enableLanguageSelector": "Povolit volič jazyků", "endDate": "Datum ukončení", + "entityType": "Typ entity", "eventName": "Název události", "events": "Události", "expandFooter": "Rozbalte zápatí", @@ -282,6 +283,7 @@ "hoursColumn": "Sloupec hodin", "hoursText": "Hodiny text", "html": "HTML", + "icon": "Ikona", "icons": "ikony", "image": "Obraz", "imageConstrain": "Omezení obrázku", @@ -395,14 +397,19 @@ }, "false": "Falešný", "fillContainer": "Naplňte nádobu", + "financialProfessionals": "Finanční profesionálové", "fixed": "Opravené", "fixedWidth": "Pevná šířka", "friday": "pátek", "fullWidth": "Plná šířka", "gallery": "Galerie", + "healthcareFacilities": "Zdravotnická zařízení", + "healthcareProfessionals": "Zdravotníci", "hide": "Skrýt", + "hotels": "hotely", "hour12": "12 hodin", "hour24": "24 hodin", + "icon": "Ikona", "image": "Obraz", "immersive": "Pohlcující", "includeOpenNow": "Zahrňte tlačítko Open Now", @@ -414,6 +421,7 @@ "left_direction": "Vlevo", "light": "Světlo", "link": "Odkaz", + "locations": "Místa", "long": "Dlouho", "mapStartingLocation": "Počáteční umístění mapy", "matchOtherSections": "Porovnejte jiné sekce ({{value}})", @@ -422,9 +430,11 @@ "navigationDay": "Navigace (den)", "navigationNight": "Navigace (noc)", "no": "Žádný", + "none": "Žádný", "normal": "Normální", "one": "Jeden", "phone": "Telefon", + "restaurants": "Restaurace", "right": "Právo", "right_direction": "Správné", "satellite": "Satelit", @@ -464,6 +474,9 @@ "phoneNumber": "Telefonní číslo", "phoneNumberFormat": "Formát telefonního čísla", "phoneNumbers": "Telefonní čísla", + "pinColor": "Barva špendlíku", + "pinIcon": "Ikona špendlíku", + "pinStyles": "Styly umístění", "pinterestLink": "Pinterest Link", "presetImage": "Přednastavený obrázek", "presetImageType": "Přednastavený typ obrazu", diff --git a/packages/visual-editor/locales/platform/da/visual-editor.json b/packages/visual-editor/locales/platform/da/visual-editor.json index 5800b90d5b..2317cea37c 100644 --- a/packages/visual-editor/locales/platform/da/visual-editor.json +++ b/packages/visual-editor/locales/platform/da/visual-editor.json @@ -256,6 +256,7 @@ "emailsListLength": "E -mails liste længde", "enableLanguageSelector": "Aktivér sprogvælger", "endDate": "Slutdato", + "entityType": "Enhedstype", "eventName": "Begivenhedsnavn", "events": "Begivenheder", "expandFooter": "Udvid sidefod", @@ -283,6 +284,7 @@ "hoursColumn": "Timersøjle", "hoursText": "Teksttekst", "html": "HTML", + "icon": "Ikon", "icons": "Ikoner", "image": "Billede", "imageConstrain": "Billedbegrænsning", @@ -396,14 +398,19 @@ }, "false": "falsk", "fillContainer": "Fyld beholderen", + "financialProfessionals": "Finansielle fagfolk", "fixed": "Fast", "fixedWidth": "Fast bredde", "friday": "fredag", "fullWidth": "Fuld bredde", "gallery": "Galleri", + "healthcareFacilities": "Sundhedsfaciliteter", + "healthcareProfessionals": "Sundhedspersonale", "hide": "Skjule", + "hotels": "Hoteller", "hour12": "12-timers", "hour24": "24-timer", + "icon": "Ikon", "image": "Billede", "immersive": "Fordybende", "includeOpenNow": "Inkluder åbent nu -knap", @@ -415,6 +422,7 @@ "left_direction": "Venstre", "light": "Lys", "link": "Forbindelse", + "locations": "Steder", "long": "Lang", "mapStartingLocation": "Kortstartplacering", "matchOtherSections": "Match andre sektioner ({{value}})", @@ -423,9 +431,11 @@ "navigationDay": "Navigation (dag)", "navigationNight": "Navigation (nat)", "no": "Ingen", + "none": "Ingen", "normal": "Normal", "one": "En", "phone": "Telefon", + "restaurants": "Restauranter", "right": "Højre", "right_direction": "Højre", "satellite": "Satellit", @@ -465,6 +475,9 @@ "phoneNumber": "Telefonnummer", "phoneNumberFormat": "Telefonnummerformat", "phoneNumbers": "Telefonnumre", + "pinColor": "Pin farve", + "pinIcon": "Pin ikon", + "pinStyles": "Placeringsstile", "pinterestLink": "Pinterest -link", "presetImage": "Forudindstillet billede", "presetImageType": "Forudindstillet billedtype", diff --git a/packages/visual-editor/locales/platform/de/visual-editor.json b/packages/visual-editor/locales/platform/de/visual-editor.json index 5df3aa929e..904535b0ea 100644 --- a/packages/visual-editor/locales/platform/de/visual-editor.json +++ b/packages/visual-editor/locales/platform/de/visual-editor.json @@ -254,6 +254,7 @@ "emailsListLength": "E -Mail -Länge", "enableLanguageSelector": "Sprachauswahl aktivieren", "endDate": "Enddatum", + "entityType": "Entitätstyp", "eventName": "Ereignisname", "events": "Ereignisse", "expandFooter": "Fußzeile erweitern", @@ -281,6 +282,7 @@ "hoursColumn": "Stunden Säule", "hoursText": "Stunden Text", "html": "HTML", + "icon": "Symbol", "icons": "Symbole", "image": "Bild", "imageConstrain": "Bildbeschränkung", @@ -394,14 +396,19 @@ }, "false": "FALSCH", "fillContainer": "Behälter füllen", + "financialProfessionals": "Finanzprofis", "fixed": "Behoben", "fixedWidth": "Feste Breite", "friday": "Freitag", "fullWidth": "Volle Breite", "gallery": "Galerie", + "healthcareFacilities": "Gesundheitseinrichtungen", + "healthcareProfessionals": "Fachkräfte im Gesundheitswesen", "hide": "Verstecken", + "hotels": "Hotels", "hour12": "12 Stunden", "hour24": "24 Stunden", + "icon": "Symbol", "image": "Bild", "immersive": "Immersiv", "includeOpenNow": "Fügen Sie Now Open Taste ein", @@ -413,6 +420,7 @@ "left_direction": "Links", "light": "Licht", "link": "Link", + "locations": "Standorte", "long": "Lang", "mapStartingLocation": "Karte Startort", "matchOtherSections": "Übereinstimmen andere Abschnitte ({{value}})", @@ -421,9 +429,11 @@ "navigationDay": "Navigation (Tag)", "navigationNight": "Navigation (Nacht)", "no": "NEIN", + "none": "Keiner", "normal": "Normal", "one": "Eins", "phone": "Telefon", + "restaurants": "Restaurants", "right": "Rechts", "right_direction": "Rechte", "satellite": "Satelliten", @@ -463,6 +473,9 @@ "phoneNumber": "Telefonnummer", "phoneNumberFormat": "Telefonnummer -Format", "phoneNumbers": "Telefonnummern", + "pinColor": "Pin-Farbe", + "pinIcon": "Pin-Symbol", + "pinStyles": "Standortstile", "pinterestLink": "Pinterest Link", "presetImage": "Voreingestelltes Bild", "presetImageType": "Voreingestellter Bildtyp", diff --git a/packages/visual-editor/locales/platform/en-GB/visual-editor.json b/packages/visual-editor/locales/platform/en-GB/visual-editor.json index c725b469e6..de8ac7878d 100644 --- a/packages/visual-editor/locales/platform/en-GB/visual-editor.json +++ b/packages/visual-editor/locales/platform/en-GB/visual-editor.json @@ -248,6 +248,7 @@ "emailsListLength": "Emails List Length", "enableLanguageSelector": "Enable Language Selector", "endDate": "End Date", + "entityType": "Entity Type", "eventName": "Event Name", "events": "Events", "expandFooter": "Expand Footer", @@ -275,6 +276,7 @@ "hoursColumn": "Hours Column", "hoursText": "Hours Text", "html": "HTML", + "icon": "Icon", "icons": "Icons", "image": "Image", "imageConstrain": "Image Constrain", @@ -388,14 +390,19 @@ }, "false": "False", "fillContainer": "Fill Container", + "financialProfessionals": "Financial Professionals", "fixed": "Fixed", "fixedWidth": "Fixed Width", "friday": "Friday", "fullWidth": "Full Width", "gallery": "Gallery", + "healthcareFacilities": "Healthcare Facilities", + "healthcareProfessionals": "Healthcare Professionals", "hide": "Hide", + "hotels": "Hotels", "hour12": "12-hour", "hour24": "24-hour", + "icon": "Icon", "image": "Image", "immersive": "Immersive", "includeOpenNow": "Include Open Now Button", @@ -407,6 +414,7 @@ "left_direction": "Left", "light": "Light", "link": "Link", + "locations": "Locations", "long": "Long", "mapStartingLocation": "Map Starting Location", "matchOtherSections": "Match Other Sections ({{value}})", @@ -415,9 +423,11 @@ "navigationDay": "Navigation (Day)", "navigationNight": "Navigation (Night)", "no": "No", + "none": "None", "normal": "Normal", "one": "One", "phone": "Phone", + "restaurants": "Restaurants", "right": "Right", "right_direction": "Right", "satellite": "Satellite", @@ -457,6 +467,9 @@ "phoneNumber": "Phone Number", "phoneNumberFormat": "Phone Number Format", "phoneNumbers": "Phone Numbers", + "pinColor": "Pin Color", + "pinIcon": "Pin Icon", + "pinStyles": "Location styles", "pinterestLink": "Pinterest Link", "presetImage": "Preset Image", "presetImageType": "Preset Image Type", diff --git a/packages/visual-editor/locales/platform/en/visual-editor.json b/packages/visual-editor/locales/platform/en/visual-editor.json index 271f0f940e..d90ee085b3 100644 --- a/packages/visual-editor/locales/platform/en/visual-editor.json +++ b/packages/visual-editor/locales/platform/en/visual-editor.json @@ -248,6 +248,7 @@ "emailsListLength": "Emails List Length", "enableLanguageSelector": "Enable Language Selector", "endDate": "End Date", + "entityType": "Entity Type", "eventName": "Event Name", "events": "Events", "expandFooter": "Expand Footer", @@ -275,6 +276,7 @@ "hoursColumn": "Hours Column", "hoursText": "Hours Text", "html": "HTML", + "icon": "Icon", "icons": "Icons", "image": "Image", "imageConstrain": "Image Constrain", @@ -388,14 +390,19 @@ }, "false": "False", "fillContainer": "Fill Container", + "financialProfessionals": "Financial Professionals", "fixed": "Fixed", "fixedWidth": "Fixed Width", "friday": "Friday", "fullWidth": "Full Width", "gallery": "Gallery", + "healthcareFacilities": "Healthcare Facilities", + "healthcareProfessionals": "Healthcare Professionals", "hide": "Hide", + "hotels": "Hotels", "hour12": "12-hour", "hour24": "24-hour", + "icon": "Icon", "image": "Image", "immersive": "Immersive", "includeOpenNow": "Include Open Now Button", @@ -407,6 +414,7 @@ "left_direction": "Left", "light": "Light", "link": "Link", + "locations": "Locations", "long": "Long", "mapStartingLocation": "Map Starting Location", "matchOtherSections": "Match Other Sections ({{value}})", @@ -415,9 +423,11 @@ "navigationDay": "Navigation (Day)", "navigationNight": "Navigation (Night)", "no": "No", + "none": "None", "normal": "Normal", "one": "One", "phone": "Phone", + "restaurants": "Restaurants", "right": "Right", "right_direction": "Right", "satellite": "Satellite", @@ -457,6 +467,9 @@ "phoneNumber": "Phone Number", "phoneNumberFormat": "Phone Number Format", "phoneNumbers": "Phone Numbers", + "pinColor": "Pin Color", + "pinIcon": "Pin Icon", + "pinStyles": "Location styles", "pinterestLink": "Pinterest Link", "presetImage": "Preset Image", "presetImageType": "Preset Image Type", diff --git a/packages/visual-editor/locales/platform/es/visual-editor.json b/packages/visual-editor/locales/platform/es/visual-editor.json index 51cee64e3a..22a5f53ce2 100644 --- a/packages/visual-editor/locales/platform/es/visual-editor.json +++ b/packages/visual-editor/locales/platform/es/visual-editor.json @@ -248,6 +248,7 @@ "emailsListLength": "Longitud de la lista de correos electrónicos", "enableLanguageSelector": "Habilitar el selector de idiomas", "endDate": "Fecha de finalización", + "entityType": "Tipo de entidad", "eventName": "Nombre del evento", "events": "Eventos", "expandFooter": "Expandir el pie de página", @@ -275,6 +276,7 @@ "hoursColumn": "Columna de horas", "hoursText": "Mensaje de texto de horas", "html": "HTML", + "icon": "Icono", "icons": "Iconos", "image": "Imagen", "imageConstrain": "Restricción de imagen", @@ -388,14 +390,19 @@ }, "false": "FALSO", "fillContainer": "Llenar el contenedor", + "financialProfessionals": "Profesionales financieros", "fixed": "Fijado", "fixedWidth": "Ancho fijo", "friday": "Viernes", "fullWidth": "Ancho completo", "gallery": "Galería", + "healthcareFacilities": "Instalaciones sanitarias", + "healthcareProfessionals": "Profesionales de la salud", "hide": "Esconder", + "hotels": "Hoteles", "hour12": "De 12 horas", "hour24": "Las 24 horas", + "icon": "Icono", "image": "Imagen", "immersive": "Inmersivo", "includeOpenNow": "Incluir el botón Abrir ahora", @@ -407,6 +414,7 @@ "left_direction": "Izquierda", "light": "Luz", "link": "Enlace", + "locations": "Ubicaciones", "long": "Largo", "mapStartingLocation": "Ubicación de inicio del mapa", "matchOtherSections": "Haga coincidir otras secciones ({{value}})", @@ -415,9 +423,11 @@ "navigationDay": "Navegación (día)", "navigationNight": "Navegación (noche)", "no": "No", + "none": "Ninguno", "normal": "Normal", "one": "Uno", "phone": "Teléfono", + "restaurants": "Restaurantes", "right": "Bien", "right_direction": "Derecha", "satellite": "Satélite", @@ -457,6 +467,9 @@ "phoneNumber": "Número de teléfono", "phoneNumberFormat": "Formato de número de teléfono", "phoneNumbers": "Números de teléfono", + "pinColor": "Color del alfiler", + "pinIcon": "Icono de alfiler", + "pinStyles": "Estilos de ubicación", "pinterestLink": "Enlace Pinterest", "presetImage": "Imagen preestablecida", "presetImageType": "Tipo de imagen preestablecido", diff --git a/packages/visual-editor/locales/platform/et/visual-editor.json b/packages/visual-editor/locales/platform/et/visual-editor.json index 16cd5cb511..8c26b51ed3 100644 --- a/packages/visual-editor/locales/platform/et/visual-editor.json +++ b/packages/visual-editor/locales/platform/et/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E -kirjade loendi pikkus", "enableLanguageSelector": "Luba keelevalija", "endDate": "Lõppkuupäev", + "entityType": "Olemi tüüp", "eventName": "Sündmuse nimi", "events": "Sündmused", "expandFooter": "Laiendage jalus", @@ -276,6 +277,7 @@ "hoursColumn": "Töötundide veerg", "hoursText": "Tundidekst", "html": "HTML", + "icon": "Ikoon", "icons": "Ikoonid", "image": "Pilt", "imageConstrain": "Pildi piiramine", @@ -389,14 +391,19 @@ }, "false": "Vale", "fillContainer": "Täida konteiner", + "financialProfessionals": "Finantsspetsialistid", "fixed": "Fikseeritud", "fixedWidth": "Fikseeritud laius", "friday": "Reede", "fullWidth": "Täielik laius", "gallery": "Galerii", + "healthcareFacilities": "Tervishoiuasutused", + "healthcareProfessionals": "Tervishoiutöötajad", "hide": "Varjama", + "hotels": "Hotellid", "hour12": "12-tunnine", "hour24": "24-tunnine", + "icon": "Ikoon", "image": "Pilt", "immersive": "Ümbritsev", "includeOpenNow": "Lisage avatud nupp avatud", @@ -408,6 +415,7 @@ "left_direction": "Vasakule", "light": "Hele", "link": "Link", + "locations": "Asukohad", "long": "Pikk", "mapStartingLocation": "Kaardi algusasukoht", "matchOtherSections": "Sobitada teisi sektsioone ({{{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigeerimine (päev)", "navigationNight": "Navigeerimine (öö)", "no": "Mitte", + "none": "Mitte ühtegi", "normal": "Tavaline", "one": "Üks", "phone": "Telefon", + "restaurants": "Restoranid", "right": "Paremale", "right_direction": "Õige", "satellite": "Satelliit", @@ -458,6 +468,9 @@ "phoneNumber": "Telefoninumber", "phoneNumberFormat": "Telefoninumbri vorming", "phoneNumbers": "Telefoninumbrid", + "pinColor": "Pin Värv", + "pinIcon": "Kinnitusikoon", + "pinStyles": "Asukoha stiilid", "pinterestLink": "Pinterest Link", "presetImage": "Eelseadistatud pilt", "presetImageType": "Eelseadistatud pildi tüüp", diff --git a/packages/visual-editor/locales/platform/fi/visual-editor.json b/packages/visual-editor/locales/platform/fi/visual-editor.json index 00a5c0c713..1eb7578c9e 100644 --- a/packages/visual-editor/locales/platform/fi/visual-editor.json +++ b/packages/visual-editor/locales/platform/fi/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "Sähköpostiluettelon pituus", "enableLanguageSelector": "Ota kielenvalitsin käyttöön", "endDate": "Päättymispäivämäärä", + "entityType": "Entiteettityyppi", "eventName": "Tapahtuman nimi", "events": "Tapahtumat", "expandFooter": "Laajentaa alatunnistetta", @@ -276,6 +277,7 @@ "hoursColumn": "Tuntiasarake", "hoursText": "Tuntien teksti", "html": "HTML", + "icon": "Kuvake", "icons": "Kuvakkeet", "image": "Kuva", "imageConstrain": "Kuvarajoitus", @@ -389,14 +391,19 @@ }, "false": "Väärennetty", "fillContainer": "Täytä säiliö", + "financialProfessionals": "Talousalan ammattilaiset", "fixed": "Kiinteä", "fixedWidth": "Kiinteä leveys", "friday": "perjantai", "fullWidth": "Täysleveys", "gallery": "Galleria", + "healthcareFacilities": "Terveydenhuollon palvelut", + "healthcareProfessionals": "Terveydenhuollon ammattilaiset", "hide": "Piilottaa", + "hotels": "Hotellit", "hour12": "12 tunnin", "hour24": "24 tunnin", + "icon": "Kuvake", "image": "Kuva", "immersive": "Syventävä", "includeOpenNow": "Sisällytä nyt -painike", @@ -408,6 +415,7 @@ "left_direction": "Vasen", "light": "Valaistus", "link": "Linkki", + "locations": "Sijainnit", "long": "Pitkä", "mapStartingLocation": "Kartan lähtöpaikka", "matchOtherSections": "Vastaa muita osia ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigointi (päivä)", "navigationNight": "Navigointi (yö)", "no": "Ei", + "none": "Ei mitään", "normal": "Normaali", "one": "Yksi", "phone": "Puhelin", + "restaurants": "Ravintolat", "right": "Oikea", "right_direction": "Oikea", "satellite": "Satelliitti", @@ -458,6 +468,9 @@ "phoneNumber": "Puhelinnumero", "phoneNumberFormat": "Puhelinnumeromuoto", "phoneNumbers": "Puhelinnumerot", + "pinColor": "Pin Väri", + "pinIcon": "Pin-kuvake", + "pinStyles": "Sijaintityylit", "pinterestLink": "Pinterest -linkki", "presetImage": "Esiasetettu kuva", "presetImageType": "Esiasetettu kuvatyyppi", diff --git a/packages/visual-editor/locales/platform/fr/visual-editor.json b/packages/visual-editor/locales/platform/fr/visual-editor.json index b8f24aa0b9..4c89bec5a0 100644 --- a/packages/visual-editor/locales/platform/fr/visual-editor.json +++ b/packages/visual-editor/locales/platform/fr/visual-editor.json @@ -248,6 +248,7 @@ "emailsListLength": "Longueur de liste des e-mails", "enableLanguageSelector": "Activer le sélecteur de langue", "endDate": "Date de fin", + "entityType": "Type d'entité", "eventName": "Nom de l'événement", "events": "Événements", "expandFooter": "Développer le pied de page", @@ -275,6 +276,7 @@ "hoursColumn": "Colonne d'heures", "hoursText": "Texte des heures", "html": "HTML", + "icon": "Icône", "icons": "Icônes", "image": "Image", "imageConstrain": "Contrainte d'image", @@ -388,14 +390,19 @@ }, "false": "FAUX", "fillContainer": "Remplir le conteneur", + "financialProfessionals": "Professionnels de la finance", "fixed": "Fixé", "fixedWidth": "Largeur fixe", "friday": "Vendredi", "fullWidth": "Pleine largeur", "gallery": "Galerie", + "healthcareFacilities": "Établissements de santé", + "healthcareProfessionals": "Professionnels de la santé", "hide": "Cacher", + "hotels": "Hôtels", "hour12": "12 heures", "hour24": "24 heures", + "icon": "Icône", "image": "Image", "immersive": "Immersif", "includeOpenNow": "Inclure le bouton Open Now", @@ -407,6 +414,7 @@ "left_direction": "Gauche", "light": "Lumière", "link": "Lien", + "locations": "Emplacements", "long": "Long", "mapStartingLocation": "Emplacement de départ de la carte", "matchOtherSections": "Faire correspondre d'autres sections ({{value}})", @@ -415,9 +423,11 @@ "navigationDay": "Navigation (jour)", "navigationNight": "Navigation (nuit)", "no": "Non", + "none": "Aucun", "normal": "Normale", "one": "Un", "phone": "Téléphone", + "restaurants": "Restaurants", "right": "Droite", "right_direction": "À droite", "satellite": "Satellite", @@ -457,6 +467,9 @@ "phoneNumber": "Numéro de téléphone", "phoneNumberFormat": "Format de numéro de téléphone", "phoneNumbers": "Numéros de téléphone", + "pinColor": "Couleur de la broche", + "pinIcon": "Icône d'épingle", + "pinStyles": "Styles d'emplacement", "pinterestLink": "Lien pinterest", "presetImage": "Image prédéfinie", "presetImageType": "Type d'image prédéfini", diff --git a/packages/visual-editor/locales/platform/hr/visual-editor.json b/packages/visual-editor/locales/platform/hr/visual-editor.json index 230e052839..021b0067f3 100644 --- a/packages/visual-editor/locales/platform/hr/visual-editor.json +++ b/packages/visual-editor/locales/platform/hr/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "Dužina e -mailova", "enableLanguageSelector": "Omogući selektor jezika", "endDate": "Datum završetka", + "entityType": "Vrsta entiteta", "eventName": "Naziv događaja", "events": "Događaj", "expandFooter": "Proširiti podnožje", @@ -276,6 +277,7 @@ "hoursColumn": "Sati stupaca", "hoursText": "Sati teksta", "html": "HTML", + "icon": "Ikona", "icons": "Ikone", "image": "Slika", "imageConstrain": "Ograničenje slike", @@ -389,14 +391,19 @@ }, "false": "Lažan", "fillContainer": "Napunite spremnik", + "financialProfessionals": "Financijski stručnjaci", "fixed": "Fiksni", "fixedWidth": "Fiksna širina", "friday": "petak", "fullWidth": "Puna širina", "gallery": "Galerija", + "healthcareFacilities": "Zdravstvene ustanove", + "healthcareProfessionals": "Zdravstveni radnici", "hide": "Sakriti", + "hotels": "Hoteli", "hour12": "12 sati", "hour24": "24-satni", + "icon": "Ikona", "image": "Slika", "immersive": "Uronjen", "includeOpenNow": "Uključite gumb Otvori sada", @@ -408,6 +415,7 @@ "left_direction": "Lijevo", "light": "Svjetlo", "link": "Link", + "locations": "Lokacije", "long": "Dugačak", "mapStartingLocation": "Početna lokacija karte", "matchOtherSections": "Uskladite ostale odjeljke ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigacija (dan)", "navigationNight": "Navigacija (noć)", "no": "Ne", + "none": "Nijedan", "normal": "Normalan", "one": "Jedan", "phone": "Telefon", + "restaurants": "Restorani", "right": "Pravo", "right_direction": "Desno", "satellite": "Satelit", @@ -458,6 +468,9 @@ "phoneNumber": "Telefonski broj", "phoneNumberFormat": "Format telefonskog broja", "phoneNumbers": "Telefonski brojevi", + "pinColor": "Boja pribadače", + "pinIcon": "Ikona pribadače", + "pinStyles": "Stilovi lokacije", "pinterestLink": "Pinterest veza", "presetImage": "Unaprijed postavljena slika", "presetImageType": "Unaprijed postavljena vrsta slike", diff --git a/packages/visual-editor/locales/platform/hu/visual-editor.json b/packages/visual-editor/locales/platform/hu/visual-editor.json index b3897cd762..52d94ba7b3 100644 --- a/packages/visual-editor/locales/platform/hu/visual-editor.json +++ b/packages/visual-editor/locales/platform/hu/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E -mailek listája hossza", "enableLanguageSelector": "Engedélyezze a nyelvválasztót", "endDate": "Befejezés dátuma", + "entityType": "Entitás típusa", "eventName": "Eseménynév", "events": "Események", "expandFooter": "Bontsa ki a láblécet", @@ -276,6 +277,7 @@ "hoursColumn": "Órás oszlop", "hoursText": "Órás szöveg", "html": "HTML", + "icon": "Ikon", "icons": "Ikonok", "image": "Kép", "imageConstrain": "Képkorlátozás", @@ -389,14 +391,19 @@ }, "false": "Hamis", "fillContainer": "Töltse ki a tartályt", + "financialProfessionals": "Pénzügyi szakemberek", "fixed": "Rögzített", "fixedWidth": "Fix szélesség", "friday": "péntek", "fullWidth": "Teljes szélesség", "gallery": "Galéria", + "healthcareFacilities": "Egészségügyi létesítmények", + "healthcareProfessionals": "Egészségügyi szakemberek", "hide": "Elrejt", + "hotels": "Szállodák", "hour12": "12 órás", "hour24": "24 órás", + "icon": "Ikon", "image": "Kép", "immersive": "Magával ragadó", "includeOpenNow": "Tartsa be a NYUTATÁS gombot", @@ -408,6 +415,7 @@ "left_direction": "Balra", "light": "Fény", "link": "Link", + "locations": "Helyszínek", "long": "Hosszú", "mapStartingLocation": "Térkép kiindulási helye", "matchOtherSections": "Illeszkedjen a többi szakaszhoz ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigáció (nap)", "navigationNight": "Navigáció (éjszaka)", "no": "Nem", + "none": "Egyik sem", "normal": "Normál", "one": "Egy", "phone": "Telefon", + "restaurants": "Éttermek", "right": "Jobbra", "right_direction": "Jobb", "satellite": "Műhold", @@ -458,6 +468,9 @@ "phoneNumber": "Telefonszám", "phoneNumberFormat": "Telefonszám formátuma", "phoneNumbers": "Telefonszámok", + "pinColor": "Pin színe", + "pinIcon": "Pin Ikon", + "pinStyles": "Helyszín stílusok", "pinterestLink": "Pinterest link", "presetImage": "Előre beállított kép", "presetImageType": "Előre beállított képtípus", diff --git a/packages/visual-editor/locales/platform/it/visual-editor.json b/packages/visual-editor/locales/platform/it/visual-editor.json index 6dc22b5c4e..ffb6eef2d5 100644 --- a/packages/visual-editor/locales/platform/it/visual-editor.json +++ b/packages/visual-editor/locales/platform/it/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "Email Lunghezza dell'elenco", "enableLanguageSelector": "Abilita selettore di lingue", "endDate": "Data di fine", + "entityType": "Tipo di entità", "eventName": "Nome dell'evento", "events": "Eventi", "expandFooter": "Espandere il piè di pagina", @@ -276,6 +277,7 @@ "hoursColumn": "Colonna delle ore", "hoursText": "Testo delle ore", "html": "HTML", + "icon": "Icona", "icons": "Icone", "image": "Immagine", "imageConstrain": "Vincolo immagine", @@ -389,14 +391,19 @@ }, "false": "Falso", "fillContainer": "Riempire il contenitore", + "financialProfessionals": "Professionisti finanziari", "fixed": "Fisso", "fixedWidth": "Larghezza fissa", "friday": "Venerdì", "fullWidth": "Larghezza completa", "gallery": "Galleria", + "healthcareFacilities": "Strutture sanitarie", + "healthcareProfessionals": "Professionisti del settore sanitario", "hide": "Nascondere", + "hotels": "Alberghi", "hour12": "12 ore", "hour24": "24 ore", + "icon": "Icona", "image": "Immagine", "immersive": "Immersivo", "includeOpenNow": "Includi il pulsante Open Now", @@ -408,6 +415,7 @@ "left_direction": "Left", "light": "Leggero", "link": "Collegamento", + "locations": "Posizioni", "long": "Lungo", "mapStartingLocation": "Posizione di avvio della mappa", "matchOtherSections": "Abbina altre sezioni ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigazione (giorno)", "navigationNight": "Navigazione (notte)", "no": "NO", + "none": "Nessuno", "normal": "Normale", "one": "Uno", "phone": "Telefono", + "restaurants": "Ristoranti", "right": "Giusto", "right_direction": "A destra", "satellite": "Satellitare", @@ -458,6 +468,9 @@ "phoneNumber": "Numero di telefono", "phoneNumberFormat": "Formato numero di telefono", "phoneNumbers": "Numeri di telefono", + "pinColor": "Colore perno", + "pinIcon": "Icona del perno", + "pinStyles": "Stili di localizzazione", "pinterestLink": "Pinterest Link", "presetImage": "Immagine preimpostata", "presetImageType": "Tipo di immagine preimpostata", diff --git a/packages/visual-editor/locales/platform/ja/visual-editor.json b/packages/visual-editor/locales/platform/ja/visual-editor.json index 8d1de3fef3..ec19fa991c 100644 --- a/packages/visual-editor/locales/platform/ja/visual-editor.json +++ b/packages/visual-editor/locales/platform/ja/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "メールリストの長さ", "enableLanguageSelector": "言語セレクターを有効にします", "endDate": "終了日", + "entityType": "エンティティの種類", "eventName": "イベント名", "events": "イベント", "expandFooter": "フッターを拡張します", @@ -276,6 +277,7 @@ "hoursColumn": "時間列", "hoursText": "時間テキスト", "html": "HTML", + "icon": "アイコン", "icons": "アイコン", "image": "画像", "imageConstrain": "画像の制約", @@ -389,14 +391,19 @@ }, "false": "間違い", "fillContainer": "コンテナを満たす", + "financialProfessionals": "金融専門家", "fixed": "修理済み", "fixedWidth": "固定幅", "friday": "金曜日", "fullWidth": "全幅", "gallery": "ギャラリー", + "healthcareFacilities": "医療施設", + "healthcareProfessionals": "医療従事者", "hide": "隠れる", + "hotels": "ホテル", "hour12": "12時間", "hour24": "24時間", + "icon": "アイコン", "image": "画像", "immersive": "没入型", "includeOpenNow": "今すぐ開くボタンを含めます", @@ -408,6 +415,7 @@ "left_direction": "左", "light": "ライト", "link": "リンク", + "locations": "所在地", "long": "長さ", "mapStartingLocation": "場所の開始場所", "matchOtherSections": "他のセクションを一致させる({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "ナビゲーション(日)", "navigationNight": "ナビゲーション(夜)", "no": "いいえ", + "none": "なし", "normal": "普通", "one": "1つ", "phone": "電話", + "restaurants": "レストラン", "right": "右", "right_direction": "右", "satellite": "衛星", @@ -458,6 +468,9 @@ "phoneNumber": "電話番号", "phoneNumberFormat": "電話番号形式", "phoneNumbers": "電話番号", + "pinColor": "ピンの色", + "pinIcon": "ピンアイコン", + "pinStyles": "場所のスタイル", "pinterestLink": "Pinterestリンク", "presetImage": "プリセット画像", "presetImageType": "プリセット画像タイプ", diff --git a/packages/visual-editor/locales/platform/lt/visual-editor.json b/packages/visual-editor/locales/platform/lt/visual-editor.json index 1b44e919f3..5d534c9c17 100644 --- a/packages/visual-editor/locales/platform/lt/visual-editor.json +++ b/packages/visual-editor/locales/platform/lt/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "El. Laiškų sąrašo ilgis", "enableLanguageSelector": "Įgalinti kalbos parinkiklį", "endDate": "Pabaigos data", + "entityType": "Esybės tipas", "eventName": "Įvykio pavadinimas", "events": "Įvykiai", "expandFooter": "Išplėskite poraštę", @@ -276,6 +277,7 @@ "hoursColumn": "Valandų stulpelis", "hoursText": "Valandų tekstas", "html": "HTML", + "icon": "Piktograma", "icons": "Piktogramos", "image": "Vaizdas", "imageConstrain": "Vaizdo apribojimas", @@ -389,14 +391,19 @@ }, "false": "Melaginga", "fillContainer": "Užpildykite konteinerį", + "financialProfessionals": "Finansų profesionalai", "fixed": "Fiksuota", "fixedWidth": "Fiksuotas plotis", "friday": "Penktadienis", "fullWidth": "Visas plotis", "gallery": "Galerija", + "healthcareFacilities": "Sveikatos priežiūros įstaigos", + "healthcareProfessionals": "Sveikatos priežiūros specialistai", "hide": "Slėptis", + "hotels": "Viešbučiai", "hour12": "12 valandų", "hour24": "24 valandas", + "icon": "Piktograma", "image": "Vaizdas", "immersive": "Įsitraukimas", "includeOpenNow": "Įtraukite mygtuką Atidaryti dabar", @@ -408,6 +415,7 @@ "left_direction": "Kairė", "light": "Lengvas", "link": "Nuoroda", + "locations": "Vietos", "long": "Ilgas", "mapStartingLocation": "Žemėlapio pradžios vieta", "matchOtherSections": "Suderinti kitus skyrius ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigacija (diena)", "navigationNight": "Navigacija (naktis)", "no": "Ne", + "none": "Nėra", "normal": "Normalus", "one": "Vienas", "phone": "Telefonas", + "restaurants": "Restoranai", "right": "Teisingai", "right_direction": "Dešinė", "satellite": "Palydovas", @@ -458,6 +468,9 @@ "phoneNumber": "Telefono numeris", "phoneNumberFormat": "Telefono numerio formatas", "phoneNumbers": "Telefono numeriai", + "pinColor": "Smeigtuko spalva", + "pinIcon": "Smeigtuko piktograma", + "pinStyles": "Vietos stiliai", "pinterestLink": "„Pinterest“ nuoroda", "presetImage": "Iš anksto nustatytas vaizdas", "presetImageType": "Iš anksto nustatytas vaizdo tipas", diff --git a/packages/visual-editor/locales/platform/lv/visual-editor.json b/packages/visual-editor/locales/platform/lv/visual-editor.json index c7d997d965..c6558b95f8 100644 --- a/packages/visual-editor/locales/platform/lv/visual-editor.json +++ b/packages/visual-editor/locales/platform/lv/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E -pastu saraksta garums", "enableLanguageSelector": "Iespējot valodas atlasītāju", "endDate": "Beigu datums", + "entityType": "Entītijas veids", "eventName": "Notikuma nosaukums", "events": "Notikumi", "expandFooter": "Paplašināt kājeni", @@ -276,6 +277,7 @@ "hoursColumn": "Stundu kolonna", "hoursText": "Stundu teksts", "html": "HTML", + "icon": "Ikona", "icons": "Ikonas", "image": "Attēls", "imageConstrain": "Attēla ierobežojums", @@ -389,14 +391,19 @@ }, "false": "Nepatiess", "fillContainer": "Aizpildiet konteineru", + "financialProfessionals": "Finanšu speciālisti", "fixed": "Fiksēts", "fixedWidth": "Fiksēts platums", "friday": "Piektdiena", "fullWidth": "Pilns platums", "gallery": "Galerija", + "healthcareFacilities": "Veselības aprūpes iestādes", + "healthcareProfessionals": "Veselības aprūpes speciālisti", "hide": "Slēpties", + "hotels": "Viesnīcas", "hour12": "12 stundu", "hour24": "Diennakts", + "icon": "Ikona", "image": "Attēls", "immersive": "Ieskaujošs", "includeOpenNow": "Iekļaujiet pogu Atvērt tūlīt", @@ -408,6 +415,7 @@ "left_direction": "Kreisais", "light": "Gaisma", "link": "Saite", + "locations": "Atrašanās vietas", "long": "Ilgs", "mapStartingLocation": "Kartes sākuma vieta", "matchOtherSections": "Saskaņojiet citas sadaļas ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigācija (diena)", "navigationNight": "Navigācija (nakts)", "no": "Ne", + "none": "Nav", "normal": "Normāls", "one": "Viens", "phone": "Tālrunis", + "restaurants": "Restorāni", "right": "Taisnība", "right_direction": "Pa labi", "satellite": "Satelīts", @@ -458,6 +468,9 @@ "phoneNumber": "Tālruņa numurs", "phoneNumberFormat": "Tālruņa numura formāts", "phoneNumbers": "Tālruņu numuri", + "pinColor": "Piespraudes krāsa", + "pinIcon": "Piespraudes ikona", + "pinStyles": "Atrašanās vietas stili", "pinterestLink": "Pinterest saite", "presetImage": "Iepriekš iestatīts attēls", "presetImageType": "Iepriekš iestatīts attēla tips", diff --git a/packages/visual-editor/locales/platform/nb/visual-editor.json b/packages/visual-editor/locales/platform/nb/visual-editor.json index 0d3e3bf7c7..39dc249d0f 100644 --- a/packages/visual-editor/locales/platform/nb/visual-editor.json +++ b/packages/visual-editor/locales/platform/nb/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E-postlistelengde", "enableLanguageSelector": "Aktiver språkvelger", "endDate": "Sluttdato", + "entityType": "Enhetstype", "eventName": "Hendelsesnavn", "events": "Hendelser", "expandFooter": "Utvide bunnteksten", @@ -276,6 +277,7 @@ "hoursColumn": "Timer kolonne", "hoursText": "Timeseks", "html": "HTML", + "icon": "Ikon", "icons": "Ikoner", "image": "Bilde", "imageConstrain": "Bildebegrensning", @@ -389,14 +391,19 @@ }, "false": "falsk", "fillContainer": "Fyll beholderen", + "financialProfessionals": "Finansielle fagfolk", "fixed": "Fast", "fixedWidth": "Fast bredde", "friday": "fredag", "fullWidth": "Full bredde", "gallery": "Galleri", + "healthcareFacilities": "Helsetjenester", + "healthcareProfessionals": "Helsepersonell", "hide": "Gjemme", + "hotels": "Hoteller", "hour12": "12-timers", "hour24": "24-timers", + "icon": "Ikon", "image": "Bilde", "immersive": "Oppslukende", "includeOpenNow": "Inkluder åpen nå -knapp", @@ -408,6 +415,7 @@ "left_direction": "Venstre", "light": "Lys", "link": "Lenke", + "locations": "Steder", "long": "Lang", "mapStartingLocation": "Kartstartsted", "matchOtherSections": "Match andre seksjoner ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigasjon (dag)", "navigationNight": "Navigasjon (natt)", "no": "Ingen", + "none": "Ingen", "normal": "Normal", "one": "En", "phone": "Telefon", + "restaurants": "Restauranter", "right": "Høyre", "right_direction": "Høyre", "satellite": "Satellitt", @@ -458,6 +468,9 @@ "phoneNumber": "Telefonnummer", "phoneNumberFormat": "Telefonnummerformat", "phoneNumbers": "Telefonnumre", + "pinColor": "Pinnefarge", + "pinIcon": "Pin-ikon", + "pinStyles": "Stedsstiler", "pinterestLink": "Pinterest Link", "presetImage": "Forhåndsinnstilt bilde", "presetImageType": "Forhåndsinnstilt bildetype", diff --git a/packages/visual-editor/locales/platform/nl/visual-editor.json b/packages/visual-editor/locales/platform/nl/visual-editor.json index 55e8faebb7..2b8c1b2515 100644 --- a/packages/visual-editor/locales/platform/nl/visual-editor.json +++ b/packages/visual-editor/locales/platform/nl/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E -mails lijst lengte", "enableLanguageSelector": "Schakel taalselector in", "endDate": "Einddatum", + "entityType": "Entiteitstype", "eventName": "Evenementnaam", "events": "Evenementen", "expandFooter": "Footer uitbreiden", @@ -276,6 +277,7 @@ "hoursColumn": "Uren kolom", "hoursText": "Uren tekst", "html": "HTML", + "icon": "Icon", "icons": "Pictogrammen", "image": "Afbeelding", "imageConstrain": "Beeldbeperking", @@ -389,14 +391,19 @@ }, "false": "Vals", "fillContainer": "Vul container", + "financialProfessionals": "Financiële professionals", "fixed": "Vast", "fixedWidth": "Vaste breedte", "friday": "Vrijdag", "fullWidth": "Volledige breedte", "gallery": "Galerij", + "healthcareFacilities": "Gezondheidszorgfaciliteiten", + "healthcareProfessionals": "Beroepsbeoefenaren in de gezondheidszorg", "hide": "Verbergen", + "hotels": "Hotels", "hour12": "12 uur", "hour24": "24 uur", + "icon": "Icon", "image": "Afbeelding", "immersive": "Meeslepend", "includeOpenNow": "Neem de knop Open nu open", @@ -408,6 +415,7 @@ "left_direction": "Links", "light": "Licht", "link": "Link", + "locations": "Locaties", "long": "Lang", "mapStartingLocation": "Kaart startlocatie", "matchOtherSections": "Match andere secties ({{value}}))", @@ -416,9 +424,11 @@ "navigationDay": "Navigatie (dag)", "navigationNight": "Navigatie (nacht)", "no": "Nee", + "none": "Geen", "normal": "Normaal", "one": "Een", "phone": "Telefoon", + "restaurants": "Restaurants", "right": "Rechts", "right_direction": "Rechts", "satellite": "Satelliet", @@ -458,6 +468,9 @@ "phoneNumber": "Telefoonnummer", "phoneNumberFormat": "Telefoonnummerformaat", "phoneNumbers": "Telefoonnummers", + "pinColor": "Speldkleur", + "pinIcon": "Pin-pictogram", + "pinStyles": "Locatiestijlen", "pinterestLink": "Pinterest -link", "presetImage": "Vooraf ingesteld beeld", "presetImageType": "Vooraf ingestelde afbeeldingstype", diff --git a/packages/visual-editor/locales/platform/pl/visual-editor.json b/packages/visual-editor/locales/platform/pl/visual-editor.json index 81b0eb243e..4331099402 100644 --- a/packages/visual-editor/locales/platform/pl/visual-editor.json +++ b/packages/visual-editor/locales/platform/pl/visual-editor.json @@ -250,6 +250,7 @@ "emailsListLength": "Lista e -maili długość", "enableLanguageSelector": "Włącz wybór języka", "endDate": "Data zakończenia", + "entityType": "Typ jednostki", "eventName": "Nazwa wydarzenia", "events": "Wydarzenia", "expandFooter": "Rozwiń stopkę", @@ -277,6 +278,7 @@ "hoursColumn": "Kolumna godzin", "hoursText": "SMS -y", "html": "HTML", + "icon": "Ikona", "icons": "Ikony", "image": "Obraz", "imageConstrain": "Ograniczenie obrazu", @@ -390,14 +392,19 @@ }, "false": "FAŁSZ", "fillContainer": "Wypełnij kontener", + "financialProfessionals": "Specjaliści finansowi", "fixed": "Naprawił", "fixedWidth": "Stała szerokość", "friday": "Piątek", "fullWidth": "Pełna szerokość", "gallery": "Galeria", + "healthcareFacilities": "Placówki opieki zdrowotnej", + "healthcareProfessionals": "Pracownicy służby zdrowia", "hide": "Ukrywać", + "hotels": "Hotele", "hour12": "12-godzinny", "hour24": "24 godziny", + "icon": "Ikona", "image": "Obraz", "immersive": "Pochłaniający", "includeOpenNow": "Dołącz przycisk Otwórz teraz", @@ -409,6 +416,7 @@ "left_direction": "Lewy", "light": "Światło", "link": "Połączyć", + "locations": "Lokalizacje", "long": "Długi", "mapStartingLocation": "Mapa Lokalizacja początkowa", "matchOtherSections": "Dopasuj inne sekcje ({{value}})", @@ -417,9 +425,11 @@ "navigationDay": "Nawigacja (dzień)", "navigationNight": "Nawigacja (noc)", "no": "NIE", + "none": "Nic", "normal": "Normalna", "one": "Jeden", "phone": "Telefon", + "restaurants": "Restauracje", "right": "Prawidłowy", "right_direction": "Racja", "satellite": "Satelita", @@ -459,6 +469,9 @@ "phoneNumber": "Numer telefonu", "phoneNumberFormat": "Format numeru telefonu", "phoneNumbers": "Numery telefonów", + "pinColor": "Kolor szpilki", + "pinIcon": "Ikona pinezki", + "pinStyles": "Style lokalizacji", "pinterestLink": "Pinterest Link", "presetImage": "Wstępnie ustawiony obraz", "presetImageType": "Postanowiony typ obrazu", diff --git a/packages/visual-editor/locales/platform/pt/visual-editor.json b/packages/visual-editor/locales/platform/pt/visual-editor.json index bb647cfc95..d55d8f07aa 100644 --- a/packages/visual-editor/locales/platform/pt/visual-editor.json +++ b/packages/visual-editor/locales/platform/pt/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "Comprimento da lista de e -mails", "enableLanguageSelector": "Ativar seletor de linguagem", "endDate": "Data de término", + "entityType": "Tipo de entidade", "eventName": "Nome do evento", "events": "Eventos", "expandFooter": "Expandir rodapé", @@ -276,6 +277,7 @@ "hoursColumn": "Coluna de horas", "hoursText": "Texto de horas", "html": "HTML", + "icon": "Ícone", "icons": "Ícones", "image": "Imagem", "imageConstrain": "Restrição de imagem", @@ -389,14 +391,19 @@ }, "false": "Falso", "fillContainer": "Preencher contêiner", + "financialProfessionals": "Profissionais Financeiros", "fixed": "Fixo", "fixedWidth": "Largura fixa", "friday": "Sexta-feira", "fullWidth": "Largura total", "gallery": "Galeria", + "healthcareFacilities": "Instalações de saúde", + "healthcareProfessionals": "Profissionais de saúde", "hide": "Esconder", + "hotels": "Hotéis", "hour12": "12 horas", "hour24": "24 horas", + "icon": "Ícone", "image": "Imagem", "immersive": "Imersivo", "includeOpenNow": "Inclua o botão aberto agora", @@ -408,6 +415,7 @@ "left_direction": "Esquerda", "light": "Luz", "link": "Link", + "locations": "Locais", "long": "Longo", "mapStartingLocation": "Localização inicial do mapa", "matchOtherSections": "Combine outras seções ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navegação (dia)", "navigationNight": "Navegação (noite)", "no": "Não", + "none": "Nenhum", "normal": "Normal", "one": "Um", "phone": "Telefone", + "restaurants": "Restaurantes", "right": "Certo", "right_direction": "Right", "satellite": "Satélite", @@ -458,6 +468,9 @@ "phoneNumber": "Número de telefone", "phoneNumberFormat": "Formato do número de telefone", "phoneNumbers": "Números de telefone", + "pinColor": "Cor do alfinete", + "pinIcon": "Ícone de alfinete", + "pinStyles": "Estilos de localização", "pinterestLink": "Pinterest Link", "presetImage": "Imagem predefinida", "presetImageType": "Tipo de imagem predefinido", diff --git a/packages/visual-editor/locales/platform/ro/visual-editor.json b/packages/visual-editor/locales/platform/ro/visual-editor.json index c6b7fc155f..8a7a981c25 100644 --- a/packages/visual-editor/locales/platform/ro/visual-editor.json +++ b/packages/visual-editor/locales/platform/ro/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "Lista listei de e -mailuri", "enableLanguageSelector": "Activați selectorul de limbă", "endDate": "Data de încheiere", + "entityType": "Tip de entitate", "eventName": "Numele evenimentului", "events": "Evenimente", "expandFooter": "Extinde subsolul", @@ -276,6 +277,7 @@ "hoursColumn": "Coloană de ore", "hoursText": "Text text", "html": "HTML", + "icon": "Pictogramă", "icons": "Pictograme", "image": "Imagine", "imageConstrain": "Constrângere imagine", @@ -389,14 +391,19 @@ }, "false": "Fals", "fillContainer": "Umpleți containerul", + "financialProfessionals": "Profesionişti financiari", "fixed": "Fix", "fixedWidth": "Lățime fixă", "friday": "vineri", "fullWidth": "Lățime completă", "gallery": "Galerie", + "healthcareFacilities": "Facilități de sănătate", + "healthcareProfessionals": "Profesioniştii din domeniul sănătăţii", "hide": "Ascunde", + "hotels": "Hoteluri", "hour12": "12 ore", "hour24": "24 de ore", + "icon": "Pictogramă", "image": "Imagine", "immersive": "Imersiv", "includeOpenNow": "Includeți butonul Deschideți acum", @@ -408,6 +415,7 @@ "left_direction": "Stânga", "light": "Aprinde", "link": "Legătură", + "locations": "Locații", "long": "Lung", "mapStartingLocation": "Locația de pornire a hărții", "matchOtherSections": "Potriviți alte secțiuni ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigare (zi)", "navigationNight": "Navigare (noapte)", "no": "Nu", + "none": "Nici unul", "normal": "Normal", "one": "Unul", "phone": "Telefon", + "restaurants": "Restaurante", "right": "Corect", "right_direction": "Dreapta", "satellite": "Satelit", @@ -458,6 +468,9 @@ "phoneNumber": "Număr de telefon", "phoneNumberFormat": "Formatul numărului de telefon", "phoneNumbers": "Numere de telefon", + "pinColor": "Culoare Pin", + "pinIcon": "Pictograma Pin", + "pinStyles": "Stiluri de locație", "pinterestLink": "Link Pinterest", "presetImage": "Imagine prestabilită", "presetImageType": "Tipul de imagine prestabilit", diff --git a/packages/visual-editor/locales/platform/sk/visual-editor.json b/packages/visual-editor/locales/platform/sk/visual-editor.json index 4b84d4f20a..290de8f467 100644 --- a/packages/visual-editor/locales/platform/sk/visual-editor.json +++ b/packages/visual-editor/locales/platform/sk/visual-editor.json @@ -250,6 +250,7 @@ "emailsListLength": "Zoznam e-mailov dĺžka", "enableLanguageSelector": "Povoliť výber jazyka", "endDate": "Dátum ukončenia", + "entityType": "Typ entity", "eventName": "Názov udalosti", "events": "Udalosti", "expandFooter": "Rozširovať pätu", @@ -277,6 +278,7 @@ "hoursColumn": "Stĺp", "hoursText": "Text", "html": "HTML", + "icon": "Ikona", "icons": "ikony", "image": "Predstavovať", "imageConstrain": "Obmedzenie obrázka", @@ -390,14 +392,19 @@ }, "false": "Nepravdivý", "fillContainer": "Naplňte nádobu", + "financialProfessionals": "Finanční profesionáli", "fixed": "Stanovený", "fixedWidth": "Pevná šírka", "friday": "Piatok", "fullWidth": "Plná šírka", "gallery": "Galéria", + "healthcareFacilities": "Zdravotnícke zariadenia", + "healthcareProfessionals": "Zdravotníci", "hide": "Skryť", + "hotels": "hotely", "hour12": "12-hodinový", "hour24": "24-hodinový", + "icon": "Ikona", "image": "Predstavovať", "immersive": "Pohlcujúci", "includeOpenNow": "Zahrňte tlačidlo Otvorené teraz", @@ -409,6 +416,7 @@ "left_direction": "Vľavo", "light": "Osvetlenie", "link": "Odkaz", + "locations": "Miesta", "long": "Dlhý", "mapStartingLocation": "Počiatočná poloha mapy", "matchOtherSections": "Zhodovať sa s ostatnými sekciami ({{value}})", @@ -417,9 +425,11 @@ "navigationDay": "Navigácia (deň)", "navigationNight": "Navigácia (noc)", "no": "Nie", + "none": "žiadne", "normal": "Normálne", "one": "Jeden", "phone": "Telefón", + "restaurants": "Reštaurácie", "right": "Pravý", "right_direction": "Vpravo", "satellite": "Satelit", @@ -459,6 +469,9 @@ "phoneNumber": "Telefónne číslo", "phoneNumberFormat": "Formát telefónneho čísla", "phoneNumbers": "Telefónne čísla", + "pinColor": "Farba špendlíka", + "pinIcon": "Ikona špendlíka", + "pinStyles": "Štýly umiestnenia", "pinterestLink": "Link Pinterest", "presetImage": "Prednastavený obrázok", "presetImageType": "Predvolený typ obrázka", diff --git a/packages/visual-editor/locales/platform/sv/visual-editor.json b/packages/visual-editor/locales/platform/sv/visual-editor.json index 969f9d1dbb..31fb8449b5 100644 --- a/packages/visual-editor/locales/platform/sv/visual-editor.json +++ b/packages/visual-editor/locales/platform/sv/visual-editor.json @@ -250,6 +250,7 @@ "emailsListLength": "E -postlistor", "enableLanguageSelector": "Aktivera språkväljare", "endDate": "Slutdatum", + "entityType": "Enhetstyp", "eventName": "Evenemangsnamn", "events": "Evenemang", "expandFooter": "Expandera sidfot", @@ -277,6 +278,7 @@ "hoursColumn": "Time -kolumn", "hoursText": "Timmars text", "html": "HTML", + "icon": "Ikon", "icons": "Ikoner", "image": "Bild", "imageConstrain": "Bildbegränsning", @@ -390,14 +392,19 @@ }, "false": "Falsk", "fillContainer": "Fyll behållare", + "financialProfessionals": "Finansiella proffs", "fixed": "Fast", "fixedWidth": "Fast bredd", "friday": "Fredag", "fullWidth": "Full bredd", "gallery": "Galleri", + "healthcareFacilities": "Sjukvårdsinrättningar", + "healthcareProfessionals": "Vårdpersonal", "hide": "Dölja", + "hotels": "Hotell", "hour12": "12-timmars", "hour24": "24-timmars", + "icon": "Ikon", "image": "Bild", "immersive": "Uppslukande", "includeOpenNow": "Inkludera öppen nu -knapp", @@ -409,6 +416,7 @@ "left_direction": "Vänster", "light": "Ljus", "link": "Länk", + "locations": "Platser", "long": "Lång", "mapStartingLocation": "Karta startplats", "matchOtherSections": "Matcha andra avsnitt ({{value}})", @@ -417,9 +425,11 @@ "navigationDay": "Navigering (dag)", "navigationNight": "Navigering (natt)", "no": "Inga", + "none": "Ingen", "normal": "Normal", "one": "En", "phone": "Telefon", + "restaurants": "Restauranger", "right": "Rätt", "right_direction": "Höger", "satellite": "Satellit", @@ -459,6 +469,9 @@ "phoneNumber": "Telefonnummer", "phoneNumberFormat": "Telefonnummerformat", "phoneNumbers": "Telefonnummer", + "pinColor": "Pin färg", + "pinIcon": "Pin ikon", + "pinStyles": "Platsstilar", "pinterestLink": "Pinterestlänk", "presetImage": "Förinställd bild", "presetImageType": "Förinställd bildtyp", diff --git a/packages/visual-editor/locales/platform/tr/visual-editor.json b/packages/visual-editor/locales/platform/tr/visual-editor.json index 903f130ad6..eec86d2e86 100644 --- a/packages/visual-editor/locales/platform/tr/visual-editor.json +++ b/packages/visual-editor/locales/platform/tr/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "E -postalar listesi uzunluğu", "enableLanguageSelector": "Dil seçicisini etkinleştir", "endDate": "Bitiş Tarihi", + "entityType": "Varlık Türü", "eventName": "Etkinlik Adı", "events": "Olaylar", "expandFooter": "Altbilgi genişlet", @@ -276,6 +277,7 @@ "hoursColumn": "Saat sütunu", "hoursText": "Saat Metni", "html": "HTML", + "icon": "Simge", "icons": "Simgeler", "image": "İmaj", "imageConstrain": "Görüntü Kısıtlaması", @@ -389,14 +391,19 @@ }, "false": "YANLIŞ", "fillContainer": "Kabı Doldur", + "financialProfessionals": "Finans Uzmanları", "fixed": "Sabit", "fixedWidth": "Sabit Genişlik", "friday": "Cuma", "fullWidth": "Tam genişlik", "gallery": "Galeri", + "healthcareFacilities": "Sağlık Tesisleri", + "healthcareProfessionals": "Sağlık Profesyonelleri", "hide": "Saklamak", + "hotels": "Oteller", "hour12": "12 saat", "hour24": "24 saat", + "icon": "Simge", "image": "İmaj", "immersive": "Sürükleyici", "includeOpenNow": "Now Düğmesini Ekle", @@ -408,6 +415,7 @@ "left_direction": "Sol", "light": "Işık", "link": "Bağlantı", + "locations": "Konumlar", "long": "Uzun", "mapStartingLocation": "Harita Başlangıç ​​Konumu", "matchOtherSections": "Diğer bölümleri eşleştirin ({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "Navigasyon (gün)", "navigationNight": "Navigasyon (gece)", "no": "HAYIR", + "none": "Hiçbiri", "normal": "Normal", "one": "Bir", "phone": "Telefon", + "restaurants": "Restoranlar", "right": "Sağ", "right_direction": "Doğru", "satellite": "Uydu", @@ -458,6 +468,9 @@ "phoneNumber": "Telefon numarası", "phoneNumberFormat": "Telefon numarası biçimi", "phoneNumbers": "Telefon numaraları", + "pinColor": "Pim Rengi", + "pinIcon": "Pin Simgesi", + "pinStyles": "Konum stilleri", "pinterestLink": "Pinterest bağlantısı", "presetImage": "Önceden Ayarlanmış Görüntü", "presetImageType": "Önceden ayarlanmış görüntü türü", diff --git a/packages/visual-editor/locales/platform/zh-TW/visual-editor.json b/packages/visual-editor/locales/platform/zh-TW/visual-editor.json index 19ec710628..342a782ea8 100644 --- a/packages/visual-editor/locales/platform/zh-TW/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh-TW/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "電子郵件列表長度", "enableLanguageSelector": "啟用語言選擇器", "endDate": "結束日期", + "entityType": "實體類型", "eventName": "事件名稱", "events": "事件", "expandFooter": "擴展頁腳", @@ -276,6 +277,7 @@ "hoursColumn": "小時列", "hoursText": "小時文字", "html": "HTML", + "icon": "圖示", "icons": "圖示", "image": "圖像", "imageConstrain": "圖像約束", @@ -389,14 +391,19 @@ }, "false": "錯誤的", "fillContainer": "填充容器", + "financialProfessionals": "金融專業人士", "fixed": "固定的", "fixedWidth": "固定寬度", "friday": "星期五", "fullWidth": "完整的寬度", "gallery": "畫廊", + "healthcareFacilities": "醫療設施", + "healthcareProfessionals": "醫療保健專業人員", "hide": "隱藏", + "hotels": "飯店", "hour12": "12小時", "hour24": "24小時", + "icon": "圖示", "image": "圖像", "immersive": "沉浸式", "includeOpenNow": "包括“立即打開”按鈕", @@ -408,6 +415,7 @@ "left_direction": "左", "light": "光", "link": "鏈接", + "locations": "地點", "long": "長的", "mapStartingLocation": "地圖啟動位置", "matchOtherSections": "匹配其他部分({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "導航(日)", "navigationNight": "導航(晚上)", "no": "不", + "none": "沒有任何", "normal": "普通的", "one": "一", "phone": "電話", + "restaurants": "餐廳", "right": "正確的", "right_direction": "正確", "satellite": "衛星", @@ -459,6 +469,9 @@ "phoneNumber": "電話號碼", "phoneNumberFormat": "電話號碼格式", "phoneNumbers": "電話號碼", + "pinColor": "引腳顏色", + "pinIcon": "針圖示", + "pinStyles": "地點風格", "pinterestLink": "Pinterest鏈接", "presetImage": "預設圖像", "presetImageType": "預設圖像類型", diff --git a/packages/visual-editor/locales/platform/zh/visual-editor.json b/packages/visual-editor/locales/platform/zh/visual-editor.json index 1cd26979f5..39851a7e77 100644 --- a/packages/visual-editor/locales/platform/zh/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh/visual-editor.json @@ -249,6 +249,7 @@ "emailsListLength": "电子邮件列表长度", "enableLanguageSelector": "启用语言选择器", "endDate": "结束日期", + "entityType": "实体类型", "eventName": "事件名称", "events": "事件", "expandFooter": "扩展页脚", @@ -276,6 +277,7 @@ "hoursColumn": "小时列", "hoursText": "小时文字", "html": "HTML", + "icon": "图标", "icons": "图标", "image": "图像", "imageConstrain": "图像约束", @@ -389,14 +391,19 @@ }, "false": "错误的", "fillContainer": "填充容器", + "financialProfessionals": "金融专业人士", "fixed": "固定的", "fixedWidth": "固定宽度", "friday": "星期五", "fullWidth": "完整的宽度", "gallery": "画廊", + "healthcareFacilities": "医疗设施", + "healthcareProfessionals": "医疗保健专业人员", "hide": "隐藏", + "hotels": "酒店", "hour12": "12小时", "hour24": "24小时", + "icon": "图标", "image": "图像", "immersive": "沉浸式", "includeOpenNow": "包括“立即打开”按钮", @@ -408,6 +415,7 @@ "left_direction": "左", "light": "光", "link": "关联", + "locations": "地点", "long": "长的", "mapStartingLocation": "地图启动位置", "matchOtherSections": "匹配其他部分({{value}})", @@ -416,9 +424,11 @@ "navigationDay": "导航(日)", "navigationNight": "导航(晚上)", "no": "不", + "none": "没有任何", "normal": "普通的", "one": "一", "phone": "电话", + "restaurants": "餐厅", "right": "正确的", "right_direction": "正确", "satellite": "卫星", @@ -458,6 +468,9 @@ "phoneNumber": "电话号码", "phoneNumberFormat": "电话号码格式", "phoneNumbers": "电话号码", + "pinColor": "引脚颜色", + "pinIcon": "针图标", + "pinStyles": "地点风格", "pinterestLink": "Pinterest链接", "presetImage": "预设图像", "presetImageType": "预设图像类型", diff --git a/packages/visual-editor/package.json b/packages/visual-editor/package.json index f3f9f3b366..a774d24858 100644 --- a/packages/visual-editor/package.json +++ b/packages/visual-editor/package.json @@ -59,6 +59,7 @@ "i18n:fix-plurals": "pnpm exec tsx scripts/fixPlurals.ts && pnpm run i18n:sort" }, "dependencies": { + "@mapbox/maki": "^8.0.0", "@microsoft/api-documenter": "^7.26.29", "@microsoft/api-extractor": "^7.52.8", "@microsoft/api-extractor-model": "^7.30.6", diff --git a/packages/visual-editor/src/components/Locator.tsx b/packages/visual-editor/src/components/Locator.tsx index 9dbd99bb57..05e9c8b52f 100644 --- a/packages/visual-editor/src/components/Locator.tsx +++ b/packages/visual-editor/src/components/Locator.tsx @@ -1,4 +1,11 @@ -import { ComponentConfig, Fields, WithPuckProps } from "@puckeditor/core"; +import { + AutoField, + ComponentConfig, + FieldLabel, + Fields, + setDeep, + WithPuckProps, +} from "@puckeditor/core"; import { FieldValueFilter, FieldValueStaticFilter, @@ -24,7 +31,7 @@ import { OnDragHandler, OnSelectParams, Pagination, - PinComponent, + PinComponentProps, SearchI18nextProvider, VerticalResults, } from "@yext/search-ui-react"; @@ -53,13 +60,16 @@ import { toMeters, toMiles, } from "../utils/i18n/distance.ts"; -import { msg } from "../utils/i18n/platform.ts"; +import { msg, pt } from "../utils/i18n/platform.ts"; import { resolveComponentData } from "../utils/resolveComponentData.tsx"; import { createSearchAnalyticsConfig, createSearchHeadlessConfig, } from "../utils/searchHeadlessConfig.ts"; -import { BackgroundStyle } from "../utils/themeConfigOptions.ts"; +import { + BackgroundStyle, + backgroundColors, +} from "../utils/themeConfigOptions.ts"; import { StreamDocument } from "../utils/types/StreamDocument.ts"; import { getValueFromQueryString } from "../utils/urlQueryString.tsx"; import { Body } from "./atoms/body.tsx"; @@ -82,9 +92,65 @@ const DEFAULT_RADIUS = 25; const HOURS_FIELD = "builtin.hours"; const INITIAL_LOCATION_KEY = "initialLocation"; const DEFAULT_TITLE = "Find a Location"; +const DEFAULT_LOCATION_STYLE = { + pinIcon: { type: "none" as const }, + pinColor: backgroundColors.background6.value, +}; -const getEntityType = (entityTypeEnvVar?: string) => { - const entityDocument: StreamDocument = useDocument(); +const makiIconModules = import.meta.glob( + "../../node_modules/@mapbox/maki/icons/*.svg", + { + eager: true, + import: "default", + } +) as Record; + +const makiIconEntries = Object.entries(makiIconModules).map(([path, icon]) => { + const name = path.split("/").pop()?.replace(".svg", "") || path; + return [name, icon] as const; +}); + +const makiIconMap: Record = Object.fromEntries(makiIconEntries); + +const formatMakiIconLabel = (name: string) => + name.replace(/[-_]/g, " ").replace(/\b\w/g, (char) => char.toUpperCase()); + +const makiIconOptions = makiIconEntries.map(([name, icon]) => ({ + label: formatMakiIconLabel(name), + value: name, + icon, +})); + +const getEntityTypeLabel = (entityType: string) => { + switch (entityType) { + case "restaurant": + return pt(msg("fields.options.restaurants", "Restaurants")); + case "healthcareFacility": + return pt( + msg("fields.options.healthcareFacilities", "Healthcare Facilities") + ); + case "healthcareProfessional": + return pt( + msg( + "fields.options.healthcareProfessionals", + "Healthcare Professionals" + ) + ); + case "hotel": + return pt(msg("fields.options.hotels", "Hotels")); + case "financialProfessional": + return pt( + msg("fields.options.financialProfessionals", "Financial Professionals") + ); + default: + return pt(msg("fields.options.locations", "Locations")); + } +}; + +const getEntityTypeFromDocument = ( + entityDocument: StreamDocument, + entityTypeEnvVar?: string +) => { if (!entityDocument._pageset && entityTypeEnvVar) { return entityDocument._env?.[entityTypeEnvVar] || DEFAULT_ENTITY_TYPE; } @@ -98,6 +164,19 @@ const getEntityType = (entityTypeEnvVar?: string) => { } }; +const getEntityType = (entityTypeEnvVar?: string) => { + const entityDocument: StreamDocument = useDocument(); + return getEntityTypeFromDocument(entityDocument, entityTypeEnvVar); +}; + +// TODO: use actual entity types from the document once we support multiple entity types per page set +const getEntityTypesFromDocument = ( + entityDocument: StreamDocument, + entityTypeEnvVar?: string +): string[] => { + return [getEntityTypeFromDocument(entityDocument, entityTypeEnvVar)]; +}; + function getFacetFieldOptions(entityType: string): DynamicOption[] { let filterOptions: DynamicOption[] = []; switch (entityType) { @@ -426,6 +505,23 @@ export interface LocatorProps { */ mapStyle?: string; + /** + * Location styles per entity type. + * The number of entries is locked to the locator entity types for the page set. + */ + locationStyles: Array<{ + /** The entity type this style applies to. */ + entityType: string; + /** Whether to render an icon in the pin. */ + pinIcon?: { + type: "none" | "icon"; + /** Defaults to the first available Maki icon when type is 'icon'. */ + iconName?: string; + }; + /** The color applied to the pin. */ + pinColor?: BackgroundStyle; + }>; + /** * Configuration for the filters available in the locator search experience. */ @@ -466,10 +562,15 @@ export interface LocatorProps { color?: BackgroundStyle; }; /** - * Props to customize the locator result card component. - * Controls which fields are displayed and their styling. + * Result card properties per entity type. + * The number of entries is locked to the locator entity types for the page set. */ - resultCard: LocatorResultCardProps; + resultCard: Array<{ + /** The entity type this result card applies to. */ + entityType: string; + /** Props to customize the locator result card component. */ + props: LocatorResultCardProps; + }>; } const locatorFields: Fields = { @@ -502,6 +603,78 @@ const locatorFields: Fields = { }, ], }), + locationStyles: YextField( + msg("fields.pinStyles", "Location styles"), + { + type: "array", + getItemSummary: (item) => getEntityTypeLabel(item.entityType), + arrayFields: { + entityType: YextField(msg("fields.entityType", "Entity Type"), { + type: "text", + visible: false, + }), + pinIcon: { + type: "custom", + render: ({ value, onChange }) => { + const selectedType = value?.type ?? "none"; + return ( +
+ + ({ + options: [ + { + label: msg("fields.options.none", "None"), + value: "none", + }, + { + label: msg("fields.options.icon", "Icon"), + value: "icon", + }, + ], + disableSearch: true, + })} + value={selectedType} + onChange={(nextType) => + onChange({ + type: nextType, + iconName: + nextType === "icon" + ? makiIconOptions[0].value // default to first icon + : undefined, + }) + } + /> + + {selectedType === "icon" && ( + + ({ + options: makiIconOptions, + })} + value={value?.iconName} + onChange={(iconName) => + onChange({ type: "icon", iconName }) + } + /> + + )} +
+ ); + }, + }, + pinColor: YextField(msg("fields.pinColor", "Pin Color"), { + type: "select", + options: "BACKGROUND_COLOR", + }), + }, + defaultItemProps: { + entityType: DEFAULT_ENTITY_TYPE, + pinIcon: { type: "none" }, + pinColor: backgroundColors.background6.value, + }, + } + ), filters: { label: msg("fields.filters", "Filters"), type: "object", @@ -570,7 +743,24 @@ const locatorFields: Fields = { }), }, }), - resultCard: LocatorResultCardFields, + resultCard: YextField( + msg("fields.resultCard", "Result Card"), + { + type: "array", + getItemSummary: (item) => getEntityTypeLabel(item.entityType), + arrayFields: { + entityType: YextField(msg("fields.entityType", "Entity Type"), { + type: "text", + visible: false, + }), + props: LocatorResultCardFields, + }, + defaultItemProps: { + entityType: DEFAULT_ENTITY_TYPE, + props: DEFAULT_LOCATOR_RESULT_CARD_PROPS, + }, + } + ), }; /** @@ -578,7 +768,26 @@ const locatorFields: Fields = { */ export const LocatorComponent: ComponentConfig<{ props: LocatorProps }> = { fields: locatorFields, + resolveFields: (_data, params) => { + const entityDocument = params.metadata?.streamDocument; + const entityTypes = entityDocument + ? getEntityTypesFromDocument( + entityDocument, + params.metadata?.entityTypeEnvVar + ) + : [DEFAULT_ENTITY_TYPE]; + const entityTypeCount = entityTypes.length; + + let fields = locatorFields; + fields = setDeep(fields, "locationStyles.min", entityTypeCount); + fields = setDeep(fields, "locationStyles.max", entityTypeCount); + fields = setDeep(fields, "resultCard.min", entityTypeCount); + fields = setDeep(fields, "resultCard.max", entityTypeCount); + return fields; + }, defaultProps: { + locationStyles: [], + resultCard: [], filters: { openNowButton: false, showDistanceOptions: false, @@ -589,9 +798,97 @@ export const LocatorComponent: ComponentConfig<{ props: LocatorProps }> = { hasLocalizedValue: "true", }, }, - resultCard: DEFAULT_LOCATOR_RESULT_CARD_PROPS, }, label: msg("components.locator", "Locator"), + /** + * Normalizes `props.locationStyles` and `props.resultCard` to align with the + * current locator entity types. If no styles or cards are set, defaults are + * generated; otherwise, existing values are preserved unless the set of entity + * types changes, in which case values are re-keyed by `entityType` and filled + * with defaults as needed. + */ + resolveData: (data, params) => { + const entityDocument = params.metadata?.streamDocument; + const entityTypes = entityDocument + ? getEntityTypesFromDocument( + entityDocument, + params.metadata?.entityTypeEnvVar + ) + : [DEFAULT_ENTITY_TYPE]; + const previousLocationStyles = data.props.locationStyles; + if (!previousLocationStyles || previousLocationStyles.length === 0) { + const newLocationStyles = entityTypes.map((entityType) => ({ + ...DEFAULT_LOCATION_STYLE, + entityType, + })); + data = setDeep(data, "props.locationStyles", newLocationStyles); + } + + const previousResultCards = data.props.resultCard as + | LocatorProps["resultCard"] + | LocatorResultCardProps; + const legacyResultCardProps = Array.isArray(previousResultCards) + ? undefined + : previousResultCards; + const previousResultCardsArray = Array.isArray(previousResultCards) + ? previousResultCards + : undefined; + + if (!previousResultCardsArray || previousResultCardsArray.length === 0) { + const newResultCards = entityTypes.map((entityType) => ({ + entityType, + props: legacyResultCardProps ?? DEFAULT_LOCATOR_RESULT_CARD_PROPS, + })); + data = setDeep(data, "props.resultCard", newResultCards); + } + + const previousEntityTypes = (previousLocationStyles ?? []).map( + (item) => item.entityType + ); + const hasNetChange = + previousEntityTypes.length > 0 && + (previousEntityTypes.length !== entityTypes.length || + !entityTypes.every((entityType) => + previousEntityTypes.includes(entityType) + )); + + if (hasNetChange) { + const locationStylesByEntityType = new globalThis.Map( + (previousLocationStyles ?? []).map( + (item) => [item.entityType, item] as const + ) + ); + const resultCardsByEntityType = new globalThis.Map( + (previousResultCardsArray ?? []).map( + (item) => [item.entityType, item] as const + ) + ); + + const newLocationStyles = entityTypes.map((entityType) => { + const existing = locationStylesByEntityType.get(entityType); + return { + ...DEFAULT_LOCATION_STYLE, + ...existing, + entityType, + }; + }); + const newResultCards = entityTypes.map((entityType) => { + const existing = resultCardsByEntityType.get(entityType); + return { + entityType, + props: + existing?.props ?? + legacyResultCardProps ?? + DEFAULT_LOCATOR_RESULT_CARD_PROPS, + }; + }); + + data = setDeep(data, "props.locationStyles", newLocationStyles); + data = setDeep(data, "props.resultCard", newResultCards); + } + + return data; + }, render: (props) => , }; @@ -635,9 +932,10 @@ type SearchState = "not started" | "loading" | "complete"; const LocatorInternal = ({ mapStyle, + locationStyles, filters: { openNowButton, showDistanceOptions, facetFields }, mapStartingLocation, - resultCard: resultCardProps, + resultCard: resultCardConfigs, puck, pageHeading, }: WithPuckProps) => { @@ -817,6 +1115,10 @@ const LocatorInternal = ({ const resultsRef = React.useRef>([]); const resultsContainer = React.useRef(null); + // Tracks the selected pin index to highlight the corresponding result card. + const [selectedResultIndex, setSelectedResultIndex] = React.useState< + number | null + >(null); const setResultsRef = React.useCallback((index: number) => { if (!resultsRef?.current) return null; @@ -826,6 +1128,9 @@ const LocatorInternal = ({ const scrollToResult = React.useCallback( (result: Result | undefined) => { if (result) { + if (typeof result.index === "number") { + setSelectedResultIndex(result.index); + } let scrollPos = 0; // the search results that are listed above this result const previousResultsRef = resultsRef.current.filter( @@ -843,6 +1148,8 @@ const LocatorInternal = ({ top: scrollPos, behavior: "smooth", }); + } else { + setSelectedResultIndex(null); } }, [resultsContainer] @@ -854,20 +1161,80 @@ const LocatorInternal = ({ } as MarkerOptions; }, []); + const resultCardConfigsArray = React.useMemo(() => { + if (Array.isArray(resultCardConfigs)) { + return resultCardConfigs; + } + if (resultCardConfigs) { + return [ + { + entityType: DEFAULT_ENTITY_TYPE, + props: resultCardConfigs, + }, + ]; + } + return []; + }, [resultCardConfigs]); + + const resultCardPropsByEntityType = React.useMemo(() => { + return resultCardConfigsArray.reduce< + Record + >((acc, item) => { + acc[item.entityType] = item.props; + return acc; + }, {}); + }, [resultCardConfigsArray]); + + const getResultCardProps = React.useCallback( + (entityType?: string) => { + if (entityType && resultCardPropsByEntityType[entityType]) { + return resultCardPropsByEntityType[entityType]; + } + if (resultCardPropsByEntityType[DEFAULT_ENTITY_TYPE]) { + return resultCardPropsByEntityType[DEFAULT_ENTITY_TYPE]; + } + return DEFAULT_LOCATOR_RESULT_CARD_PROPS; + }, + [resultCardPropsByEntityType] + ); + const CardComponent = React.useCallback( (result: CardProps) => ( - + ), - [resultCardProps] + [getResultCardProps, selectedResultIndex] ); const [userLocationRetrieved, setUserLocationRetrieved] = React.useState(false); + const locationStylesConfig = React.useMemo(() => { + const config: Record = + {}; + (locationStyles ?? []).forEach((locationStyle) => { + const entityType = locationStyle.entityType; + if (!entityType) return; + const iconValue = + locationStyle.pinIcon?.type === "icon" + ? locationStyle.pinIcon.iconName + : undefined; + config[entityType] = { + color: locationStyle.pinColor, + icon: + typeof iconValue === "string" ? makiIconMap[iconValue] : undefined, + }; + }); + return config; + }, [locationStyles]); const [mapProps, setMapProps] = React.useState({ mapStyle, onDragHandler: handleDrag, scrollToResult: scrollToResult, markerOptionsOverride: markerOptionsOverride, + locationStyleConfig: locationStylesConfig, }); React.useEffect(() => { @@ -1333,6 +1700,10 @@ interface MapProps { onDragHandler?: OnDragHandler; scrollToResult?: (result: Result | undefined) => void; markerOptionsOverride?: (selected: boolean) => MarkerOptions; + locationStyleConfig?: Record< + string, + { color?: BackgroundStyle; icon?: string } + >; } const Map: React.FC = ({ @@ -1341,6 +1712,7 @@ const Map: React.FC = ({ onDragHandler, scrollToResult, markerOptionsOverride, + locationStyleConfig, }) => { const { t } = useTranslation(); const entityDocument: StreamDocument = useDocument(); @@ -1398,7 +1770,12 @@ const Map: React.FC = ({ mapboxAccessToken={mapboxApiKey || ""} mapboxOptions={mapboxOptions} onDrag={onDragHandler} - PinComponent={LocatorMapPin} + PinComponent={(pinProps) => ( + + )} iframeWindow={iframe?.contentWindow ?? undefined} allowUpdates={!!iframe?.contentDocument} onPinClick={scrollToResult} @@ -1407,31 +1784,33 @@ const Map: React.FC = ({ ); }; -const LocatorMapPin: PinComponent> = (props) => { - const { result, selected } = props; +type LocatorMapPinProps = PinComponentProps & { + locationStyleConfig?: Record< + string, + { color?: BackgroundStyle; icon?: string } + >; +}; - const { width, height, color } = React.useMemo(() => { - return selected - ? { - // zoomed in pin stylings - height: "61.5px", - width: "40.5px", - color: "text-palette-secondary-dark", - } - : { - // default pin stylings - height: "41px", - width: "27px", - color: "text-palette-primary-dark", - }; - }, [selected]); +const LocatorMapPin = (props: LocatorMapPinProps) => { + const { result, selected, locationStyleConfig } = props; + const entityType = result.entityType; + const entityLocationStyle = entityType + ? locationStyleConfig?.[entityType] + : undefined; + + const { color, icon } = React.useMemo(() => { + return { + color: entityLocationStyle?.color, + icon: entityLocationStyle?.icon, + }; + }, [entityType, selected]); return ( ); }; diff --git a/packages/visual-editor/src/components/LocatorResultCard.tsx b/packages/visual-editor/src/components/LocatorResultCard.tsx index bb46de09ca..e208a20421 100644 --- a/packages/visual-editor/src/components/LocatorResultCard.tsx +++ b/packages/visual-editor/src/components/LocatorResultCard.tsx @@ -605,9 +605,11 @@ export const LocatorResultCard = React.memo( ({ result, resultCardProps: props, + isSelected, }: { result: CardProps["result"]; resultCardProps: LocatorResultCardProps; + isSelected?: boolean; }): React.JSX.Element => { const { document: streamDocument, relativePrefixToRoot } = useTemplateProps(); @@ -670,6 +672,7 @@ export const LocatorResultCard = React.memo( )}
+ {/* TODO: Hide primary CTA for standalone locator */} {props.primaryCTA.liveVisibility && ( { + return window.getComputedStyle(element).getPropertyValue(varName).trim(); +}; + +const resolvePinFillColor = ( + backgroundToken: string +): React.CSSProperties | undefined => { + if (backgroundToken === "white" || backgroundToken === "black") { + return { color: backgroundToken }; + } + + if (backgroundToken.endsWith("-light")) { + const baseToken = backgroundToken.replace(/-light$/, ""); + return { color: `hsl(from var(--colors-${baseToken}) h s 98)` }; + } + + if (backgroundToken.endsWith("-dark")) { + const baseToken = backgroundToken.replace(/-dark$/, ""); + return { color: `hsl(from var(--colors-${baseToken}) h s 20)` }; + } + + return { color: `var(--colors-${backgroundToken})` }; +}; + +const resolveContrastColor = ( + element: Element, + textToken: string +): string | undefined => { + if (textToken === "black") { + return "#000000"; + } + + if (textToken === "white") { + return "#FFFFFF"; + } + + if (textToken) { + return resolveCssVarColor(element, `--colors-${textToken}`); + } + + return undefined; +}; + // This look like the default Mapbox pin except that it has a number in the center instead of a white circle export const MapPinIcon = ({ - width, - height, color, resultIndex, + icon, + selected, }: { - width: string; - height: string; - color: string; + color?: BackgroundStyle; resultIndex?: number; + icon?: string; + selected?: boolean; }) => { + const pinHeight = 41; + const pinWidth = 27; + const pinScale = 1.5; + + const centerX = 13.5; + const centerY = 13.5; + const iconSize = 14; + // Theme tokens derived from tailwind class names (e.g., bg-palette-primary-light -> palette-primary-light) + const backgroundToken = normalizeThemeColor(color?.bgColor); + const textToken = normalizeThemeColor(color?.textColor); + const svgRef = React.useRef(null); + const [contrastColor, setContrastColor] = React.useState( + undefined + ); + + React.useLayoutEffect(() => { + // Resolve icon/text contrast color using the theme's text token when possible, + // otherwise fall back to the computed background contrast variable. + if (svgRef.current && textToken) { + setContrastColor(resolveContrastColor(svgRef.current, textToken)); + } + }, [textToken]); + + // SVG children use currentColor for the pin fill; apply contrast for text/icon. + const svgStyle = React.useMemo( + () => (backgroundToken ? resolvePinFillColor(backgroundToken) : undefined), + [backgroundToken] + ); + return ( @@ -39,17 +120,28 @@ export const MapPinIcon = ({ opacity="0.25" d="M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z" > - {resultIndex && ( - - {resultIndex} - + {icon ? ( + + ) : ( + resultIndex && ( + + {resultIndex} + + ) )} ); diff --git a/packages/visual-editor/src/internal/puck/ui/Combobox.tsx b/packages/visual-editor/src/internal/puck/ui/Combobox.tsx index 1401252ec7..a8e751b9cb 100644 --- a/packages/visual-editor/src/internal/puck/ui/Combobox.tsx +++ b/packages/visual-editor/src/internal/puck/ui/Combobox.tsx @@ -39,6 +39,13 @@ export const Combobox = ({ > {selectedOption ? (
+ {selectedOption.icon && ( + {selectedOption.label} + )}
+ {option.icon && ( + {option.label} + )}
{option.label} {colorHexValue && ( diff --git a/packages/visual-editor/src/internal/types/combobox.ts b/packages/visual-editor/src/internal/types/combobox.ts index 7cb7361ced..8fe943ca39 100644 --- a/packages/visual-editor/src/internal/types/combobox.ts +++ b/packages/visual-editor/src/internal/types/combobox.ts @@ -2,6 +2,7 @@ export type ComboboxOption = { label: string; value: any; color?: string; // ex. "bg-palette-primary-light" + icon?: string; }; export type ComboboxOptionGroup = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea25fcf69d..3c73ff4d27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,6 +79,9 @@ importers: packages/visual-editor: dependencies: + "@mapbox/maki": + specifier: ^8.0.0 + version: 8.2.0 "@microsoft/api-documenter": specifier: ^7.26.29 version: 7.26.32(@types/node@20.19.11) @@ -1903,6 +1906,12 @@ packages: } engines: { node: ">= 0.6" } + "@mapbox/maki@8.2.0": + resolution: + { + integrity: sha512-sTd/fEBfkBSidVwwtbijHZYJC7NhqvgLrXzSRHgxbLi52x4IciyTVUufqvJr8oIChw7hT7MIBHu5fyqrrpfFdA==, + } + "@mapbox/mapbox-gl-supported@2.0.1": resolution: { @@ -12065,6 +12074,8 @@ snapshots: "@mapbox/jsonlint-lines-primitives@2.0.2": {} + "@mapbox/maki@8.2.0": {} + "@mapbox/mapbox-gl-supported@2.0.1": {} "@mapbox/point-geometry@0.1.0": {} From 58bef7f2d5523b2e86d9d977d381e698bc7aa665 Mon Sep 17 00:00:00 2001 From: anguyen-yext2 Date: Tue, 24 Feb 2026 16:17:28 -0500 Subject: [PATCH 2/9] resolve coderrabbitai comments --- .../visual-editor/src/components/Locator.tsx | 19 ++++++++++--------- .../src/components/MapPinIcon.tsx | 8 ++++---- .../src/internal/puck/ui/Combobox.tsx | 6 ++++-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/visual-editor/src/components/Locator.tsx b/packages/visual-editor/src/components/Locator.tsx index 6cc4988b98..06d15c5462 100644 --- a/packages/visual-editor/src/components/Locator.tsx +++ b/packages/visual-editor/src/components/Locator.tsx @@ -1266,6 +1266,14 @@ const LocatorInternal = ({ locationStyleConfig: locationStylesConfig, }); + React.useEffect(() => { + setMapProps((prev) => ({ + ...prev, + mapStyle, + locationStyleConfig: locationStylesConfig, + })); + }, [mapStyle, locationStylesConfig]); + React.useEffect(() => { const resolveLocationAndSearch = async () => { const radius = @@ -1858,18 +1866,11 @@ const LocatorMapPin = (props: LocatorMapPinProps) => { ? locationStyleConfig?.[entityType] : undefined; - const { color, icon } = React.useMemo(() => { - return { - color: entityLocationStyle?.color, - icon: entityLocationStyle?.icon, - }; - }, [entityType, selected]); - return ( ); diff --git a/packages/visual-editor/src/components/MapPinIcon.tsx b/packages/visual-editor/src/components/MapPinIcon.tsx index 215edc3eef..289e895b31 100644 --- a/packages/visual-editor/src/components/MapPinIcon.tsx +++ b/packages/visual-editor/src/components/MapPinIcon.tsx @@ -48,7 +48,7 @@ const resolveContrastColor = ( return undefined; }; -// This look like the default Mapbox pin except that it has a number in the center instead of a white circle +// Renders a Mapbox-style pin with theme-aware fill and contrast-aware icon/number in the center. export const MapPinIcon = ({ color, resultIndex, @@ -67,6 +67,7 @@ export const MapPinIcon = ({ const centerX = 13.5; const centerY = 13.5; const iconSize = 14; + // Theme tokens derived from tailwind class names (e.g., bg-palette-primary-light -> palette-primary-light) const backgroundToken = normalizeThemeColor(color?.bgColor); const textToken = normalizeThemeColor(color?.textColor); @@ -76,8 +77,7 @@ export const MapPinIcon = ({ ); React.useLayoutEffect(() => { - // Resolve icon/text contrast color using the theme's text token when possible, - // otherwise fall back to the computed background contrast variable. + // Resolve icon/text contrast color using the theme's text token if (svgRef.current && textToken) { setContrastColor(resolveContrastColor(svgRef.current, textToken)); } @@ -130,7 +130,7 @@ export const MapPinIcon = ({ filter={contrastColor === "#000000" ? "invert(0)" : "invert(1)"} /> ) : ( - resultIndex && ( + !!resultIndex && (