diff --git a/packages/visual-editor/CHANGELOG.md b/packages/visual-editor/CHANGELOG.md index 4cad5528b9..d80549c94c 100644 --- a/packages/visual-editor/CHANGELOG.md +++ b/packages/visual-editor/CHANGELOG.md @@ -1,3 +1,16 @@ +#### 1.3.3 (2026-06-12) + +##### New Features + +- add additional fields in Professional Hero ([#1234](https://github.com/yext/visual-editor/pull/1234)) ([d03f15f4](https://github.com/yext/visual-editor/commit/d03f15f405f3d71f1a24dbf980ac08dcdc5a7f19)) +- mapbox uses YEXT_MAPBOX_API_KEY ([#1227](https://github.com/yext/visual-editor/pull/1227)) ([9467295b](https://github.com/yext/visual-editor/commit/9467295beb7a57acbdd2a2cf45786df587c745ef)) +- text satisfies rich_text selectors ([#1229](https://github.com/yext/visual-editor/pull/1229)) ([18d19723](https://github.com/yext/visual-editor/commit/18d197233b6b5c76b1f1d576b97466194ff6d69b)) + +##### Bug Fixes + +- remove separate locator results scrollbar for mobile ([#1237](https://github.com/yext/visual-editor/pull/1237)) ([e211f13c](https://github.com/yext/visual-editor/commit/e211f13c5bad860aecc76623ff1f6e816854ef3c)) +- squished email icon ([#1232](https://github.com/yext/visual-editor/pull/1232)) ([67e03aa2](https://github.com/yext/visual-editor/commit/67e03aa2d04e2410f49d1fe3127ad8ec91652726)) + #### 1.3.2 (2026-06-02) ##### New Features diff --git a/packages/visual-editor/locales/components/cs/visual-editor.json b/packages/visual-editor/locales/components/cs/visual-editor.json index 3ebb9f9e5c..7b0c8e03cd 100644 --- a/packages/visual-editor/locales/components/cs/visual-editor.json +++ b/packages/visual-editor/locales/components/cs/visual-editor.json @@ -96,6 +96,7 @@ "servicesSection": "Sekce služeb", "showLess": "Ukázat méně", "showMore": "Ukázat více", + "showMoreLocations": "Zobrazit další místa", "showPinDetails": "Zobrazit podrobnosti pinu {{number}}", "showPinDetailsDefault": "Zobrazit podrobnosti špendlíku", "socialLinks": { diff --git a/packages/visual-editor/locales/components/da/visual-editor.json b/packages/visual-editor/locales/components/da/visual-editor.json index 3c72e67e13..84a2383d4c 100644 --- a/packages/visual-editor/locales/components/da/visual-editor.json +++ b/packages/visual-editor/locales/components/da/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Servicesektion", "showLess": "Vis mindre", "showMore": "Vis mere", + "showMoreLocations": "Vis flere lokationer", "showPinDetails": "Vis pin {{number}} detaljer", "showPinDetailsDefault": "Vis pindetaljer", "socialLinks": { diff --git a/packages/visual-editor/locales/components/de/visual-editor.json b/packages/visual-editor/locales/components/de/visual-editor.json index 1fbfeba949..8900197479 100644 --- a/packages/visual-editor/locales/components/de/visual-editor.json +++ b/packages/visual-editor/locales/components/de/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Leistungen-Modul", "showLess": "Weniger anzeigen", "showMore": "Mehr anzeigen", + "showMoreLocations": "Weitere Standorte anzeigen", "showPinDetails": "Details zu Pin {{number}} anzeigen", "showPinDetailsDefault": "Pin-Details anzeigen", "socialLinks": { diff --git a/packages/visual-editor/locales/components/en-GB/visual-editor.json b/packages/visual-editor/locales/components/en-GB/visual-editor.json index c3ce02a7a4..504e3cda7e 100644 --- a/packages/visual-editor/locales/components/en-GB/visual-editor.json +++ b/packages/visual-editor/locales/components/en-GB/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Services Section", "showLess": "Show less", "showMore": "Show more", + "showMoreLocations": "Show more locations", "showPinDetails": "Show pin {{number}} details", "showPinDetailsDefault": "Show pin details", "socialLinks": { diff --git a/packages/visual-editor/locales/components/en/visual-editor.json b/packages/visual-editor/locales/components/en/visual-editor.json index c6e4400c02..8735af167a 100644 --- a/packages/visual-editor/locales/components/en/visual-editor.json +++ b/packages/visual-editor/locales/components/en/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Services Section", "showLess": "Show less", "showMore": "Show more", + "showMoreLocations": "Show more locations", "showPinDetails": "Show pin {{number}} details", "showPinDetailsDefault": "Show pin details", "socialLinks": { diff --git a/packages/visual-editor/locales/components/es/visual-editor.json b/packages/visual-editor/locales/components/es/visual-editor.json index c5b03c3fb1..a9ced8907b 100644 --- a/packages/visual-editor/locales/components/es/visual-editor.json +++ b/packages/visual-editor/locales/components/es/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Sección de servicios", "showLess": "Mostrar menos", "showMore": "Mostrar más", + "showMoreLocations": "Mostrar más ubicaciones", "showPinDetails": "Mostrar detalles del pin {{number}}", "showPinDetailsDefault": "Mostrar detalles del pin", "socialLinks": { diff --git a/packages/visual-editor/locales/components/et/visual-editor.json b/packages/visual-editor/locales/components/et/visual-editor.json index bf249ed1af..5660746b5b 100644 --- a/packages/visual-editor/locales/components/et/visual-editor.json +++ b/packages/visual-editor/locales/components/et/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Teenuste sektsioon", "showLess": "Näitama vähem", "showMore": "Näidata veel", + "showMoreLocations": "Kuva rohkem asukohti", "showPinDetails": "Kuva nööpnõela {{number}} üksikasjad", "showPinDetailsDefault": "Kuva nööpnõela üksikasjad", "socialLinks": { diff --git a/packages/visual-editor/locales/components/fi/visual-editor.json b/packages/visual-editor/locales/components/fi/visual-editor.json index e715b6fe67..73a78e19f0 100644 --- a/packages/visual-editor/locales/components/fi/visual-editor.json +++ b/packages/visual-editor/locales/components/fi/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Palvelusosasto", "showLess": "Näytä vähemmän", "showMore": "Näytä enemmän", + "showMoreLocations": "Näytä lisää paikkoja", "showPinDetails": "Näytä pin {{number}} tiedot", "showPinDetailsDefault": "Näytä merkin tiedot", "socialLinks": { diff --git a/packages/visual-editor/locales/components/fr/visual-editor.json b/packages/visual-editor/locales/components/fr/visual-editor.json index d33f3c6611..b4393fcef8 100644 --- a/packages/visual-editor/locales/components/fr/visual-editor.json +++ b/packages/visual-editor/locales/components/fr/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Section des services", "showLess": "Montrer moins", "showMore": "Montrer plus", + "showMoreLocations": "Afficher plus d'emplacements", "showPinDetails": "Afficher les détails de la broche {{number}}", "showPinDetailsDefault": "Afficher les détails de l'épingle", "socialLinks": { diff --git a/packages/visual-editor/locales/components/hr/visual-editor.json b/packages/visual-editor/locales/components/hr/visual-editor.json index 8639d38d78..e30a4b065f 100644 --- a/packages/visual-editor/locales/components/hr/visual-editor.json +++ b/packages/visual-editor/locales/components/hr/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Odjeljak za usluge", "showLess": "Pokazati manje", "showMore": "Pokažite više", + "showMoreLocations": "Prikaži više lokacija", "showPinDetails": "Prikaži detalje pribadače {{number}}", "showPinDetailsDefault": "Prikaži detalje pribadače", "socialLinks": { diff --git a/packages/visual-editor/locales/components/hu/visual-editor.json b/packages/visual-editor/locales/components/hu/visual-editor.json index 73b6910f78..8f03f9cb0c 100644 --- a/packages/visual-editor/locales/components/hu/visual-editor.json +++ b/packages/visual-editor/locales/components/hu/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Szolgáltatási szakasz", "showLess": "Mutasson kevesebbet", "showMore": "Mutasson többet", + "showMoreLocations": "További helyek megjelenítése", "showPinDetails": "A tű {{number}} részleteinek megjelenítése", "showPinDetailsDefault": "A gombostű részleteinek megjelenítése", "socialLinks": { diff --git a/packages/visual-editor/locales/components/it/visual-editor.json b/packages/visual-editor/locales/components/it/visual-editor.json index 613b9883bf..eb231f2a1e 100644 --- a/packages/visual-editor/locales/components/it/visual-editor.json +++ b/packages/visual-editor/locales/components/it/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Sezione Servizi", "showLess": "Mostra meno", "showMore": "Mostra di più", + "showMoreLocations": "Mostra più località", "showPinDetails": "Mostra i dettagli del segnaposto {{number}}", "showPinDetailsDefault": "Mostra i dettagli del segnaposto", "socialLinks": { diff --git a/packages/visual-editor/locales/components/ja/visual-editor.json b/packages/visual-editor/locales/components/ja/visual-editor.json index d385d10d38..268f9d6075 100644 --- a/packages/visual-editor/locales/components/ja/visual-editor.json +++ b/packages/visual-editor/locales/components/ja/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "サービスセクション", "showLess": "少なく表示します", "showMore": "もっと見せてください", + "showMoreLocations": "さらに多くの場所を表示", "showPinDetails": "ピン {{number}} の詳細を表示", "showPinDetailsDefault": "ピンの詳細を表示", "socialLinks": { diff --git a/packages/visual-editor/locales/components/lt/visual-editor.json b/packages/visual-editor/locales/components/lt/visual-editor.json index 79770f1fbd..83de69457c 100644 --- a/packages/visual-editor/locales/components/lt/visual-editor.json +++ b/packages/visual-editor/locales/components/lt/visual-editor.json @@ -96,6 +96,7 @@ "servicesSection": "Paslaugų skyrius", "showLess": "Parodyk mažiau", "showMore": "Parodyk daugiau", + "showMoreLocations": "Rodyti daugiau vietų", "showPinDetails": "Rodyti smeigtuko {{number}} informaciją", "showPinDetailsDefault": "Rodyti smeigtuko informaciją", "socialLinks": { diff --git a/packages/visual-editor/locales/components/lv/visual-editor.json b/packages/visual-editor/locales/components/lv/visual-editor.json index 9c1d54be20..f7999931d8 100644 --- a/packages/visual-editor/locales/components/lv/visual-editor.json +++ b/packages/visual-editor/locales/components/lv/visual-editor.json @@ -89,6 +89,7 @@ "servicesSection": "Pakalpojumu nodaļa", "showLess": "Rādīt mazāk", "showMore": "Parādīt vairāk", + "showMoreLocations": "Rādīt vairāk atrašanās vietu", "showPinDetails": "Rādīt spraudītes {{number}} informāciju", "showPinDetailsDefault": "Rādīt spraudītes informāciju", "socialLinks": { diff --git a/packages/visual-editor/locales/components/nb/visual-editor.json b/packages/visual-editor/locales/components/nb/visual-editor.json index 4b5d91df4d..55df9499ff 100644 --- a/packages/visual-editor/locales/components/nb/visual-editor.json +++ b/packages/visual-editor/locales/components/nb/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Serviceseksjonen", "showLess": "Vis mindre", "showMore": "Vis mer", + "showMoreLocations": "Vis flere lokasjoner", "showPinDetails": "Vis detaljer om pin {{number}}", "showPinDetailsDefault": "Vis pindetaljer", "socialLinks": { diff --git a/packages/visual-editor/locales/components/nl/visual-editor.json b/packages/visual-editor/locales/components/nl/visual-editor.json index 6b8cf1489f..0b2673a156 100644 --- a/packages/visual-editor/locales/components/nl/visual-editor.json +++ b/packages/visual-editor/locales/components/nl/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Dienstensectie", "showLess": "Minder laten zien", "showMore": "Laat meer zien", + "showMoreLocations": "Toon meer locaties", "showPinDetails": "Toon pin {{number}} details", "showPinDetailsDefault": "Toon pingegevens", "socialLinks": { diff --git a/packages/visual-editor/locales/components/pl/visual-editor.json b/packages/visual-editor/locales/components/pl/visual-editor.json index 917691f411..69e23c0d3a 100644 --- a/packages/visual-editor/locales/components/pl/visual-editor.json +++ b/packages/visual-editor/locales/components/pl/visual-editor.json @@ -96,6 +96,7 @@ "servicesSection": "Sekcja usług", "showLess": "Pokaż mniej", "showMore": "Pokaż więcej", + "showMoreLocations": "Pokaż więcej lokalizacji", "showPinDetails": "Pokaż szczegóły pinu {{number}}", "showPinDetailsDefault": "Pokaż szczegóły pinu", "socialLinks": { diff --git a/packages/visual-editor/locales/components/pt/visual-editor.json b/packages/visual-editor/locales/components/pt/visual-editor.json index b1981c959a..8481dcc261 100644 --- a/packages/visual-editor/locales/components/pt/visual-editor.json +++ b/packages/visual-editor/locales/components/pt/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Seção de serviços", "showLess": "Mostre menos", "showMore": "Mostre mais", + "showMoreLocations": "Mostrar mais locais", "showPinDetails": "Mostrar detalhes do pino {{number}}", "showPinDetailsDefault": "Mostrar detalhes do alfinete", "socialLinks": { diff --git a/packages/visual-editor/locales/components/ro/visual-editor.json b/packages/visual-editor/locales/components/ro/visual-editor.json index 55cd1e95c7..3669850efc 100644 --- a/packages/visual-editor/locales/components/ro/visual-editor.json +++ b/packages/visual-editor/locales/components/ro/visual-editor.json @@ -91,6 +91,7 @@ "servicesSection": "Secțiunea Servicii", "showLess": "Arată mai puțin", "showMore": "Arată mai mult", + "showMoreLocations": "Afișați mai multe locații", "showPinDetails": "Afișați detaliile codului {{number}}", "showPinDetailsDefault": "Afișați detaliile codului", "socialLinks": { diff --git a/packages/visual-editor/locales/components/sk/visual-editor.json b/packages/visual-editor/locales/components/sk/visual-editor.json index 9d22bbcc54..f2661c9c7f 100644 --- a/packages/visual-editor/locales/components/sk/visual-editor.json +++ b/packages/visual-editor/locales/components/sk/visual-editor.json @@ -96,6 +96,7 @@ "servicesSection": "Sekcia", "showLess": "Vykazovať menej", "showMore": "Ukázať viac", + "showMoreLocations": "Zobraziť viac miest", "showPinDetails": "Zobraziť podrobnosti špendlíka {{number}}", "showPinDetailsDefault": "Zobraziť podrobnosti špendlíka", "socialLinks": { diff --git a/packages/visual-editor/locales/components/sv/visual-editor.json b/packages/visual-editor/locales/components/sv/visual-editor.json index 7c85cfbafa..48e6be032d 100644 --- a/packages/visual-editor/locales/components/sv/visual-editor.json +++ b/packages/visual-editor/locales/components/sv/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Serviceavdelning", "showLess": "Visa mindre", "showMore": "Visa mer", + "showMoreLocations": "Visa fler platser", "showPinDetails": "Visa pin {{number}} detaljer", "showPinDetailsDefault": "Visa pindetaljer", "socialLinks": { diff --git a/packages/visual-editor/locales/components/tr/visual-editor.json b/packages/visual-editor/locales/components/tr/visual-editor.json index c3d0c1cac0..c1ad8ec16a 100644 --- a/packages/visual-editor/locales/components/tr/visual-editor.json +++ b/packages/visual-editor/locales/components/tr/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "Hizmetler Bölümü", "showLess": "Daha az göster", "showMore": "Daha Fazla Göster", + "showMoreLocations": "Daha fazla konum göster", "showPinDetails": "{{number}} pin ayrıntılarını göster", "showPinDetailsDefault": "Pin ayrıntılarını göster", "socialLinks": { diff --git a/packages/visual-editor/locales/components/zh-TW/visual-editor.json b/packages/visual-editor/locales/components/zh-TW/visual-editor.json index 6af597205e..477940d27a 100644 --- a/packages/visual-editor/locales/components/zh-TW/visual-editor.json +++ b/packages/visual-editor/locales/components/zh-TW/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "服務部分", "showLess": "少顯示", "showMore": "顯示更多", + "showMoreLocations": "顯示更多地點", "showPinDetails": "顯示引腳 {{number}} 詳細信息", "showPinDetailsDefault": "顯示引腳詳細信息", "socialLinks": { diff --git a/packages/visual-editor/locales/components/zh/visual-editor.json b/packages/visual-editor/locales/components/zh/visual-editor.json index 2ea4e108b5..4b15087504 100644 --- a/packages/visual-editor/locales/components/zh/visual-editor.json +++ b/packages/visual-editor/locales/components/zh/visual-editor.json @@ -86,6 +86,7 @@ "servicesSection": "服务部分", "showLess": "少显示", "showMore": "显示更多", + "showMoreLocations": "显示更多地点", "showPinDetails": "显示引脚 {{number}} 详细信息", "showPinDetailsDefault": "显示引脚详细信息", "socialLinks": { diff --git a/packages/visual-editor/locales/platform/cs/visual-editor.json b/packages/visual-editor/locales/platform/cs/visual-editor.json index b0625694a3..b952a304e0 100644 --- a/packages/visual-editor/locales/platform/cs/visual-editor.json +++ b/packages/visual-editor/locales/platform/cs/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Odpověď", "answerColor": "Barva odpovědi", "answerVariant": "Varianta odpovědi", - "apiKey": "Klíč API", "ariaLabel": "Značka Aria", "backgroundColor": "Barva pozadí", "bannerText": "Text banneru", @@ -508,6 +507,8 @@ "showUtilityImages": "Zobrazit pomocné obrázky", "startOfTheWeek": "Začátek týdne", "styles": "Styly", + "subtitleAlignmentDesktop": "Zarovnání titulků na ploše", + "subtitleAlignmentMobile": "Zarovnání titulků v mobilu", "tertiaryHeading": "Terciární nadpis", "text": "Text", "textAlignment": "Zarovnání textu", @@ -668,6 +669,7 @@ "showLabels": "Zobrazit štítky", "showLess": "Ukázat méně", "showMore": "Ukázat více", + "showMoreLocations": "Zobrazit další místa", "showPinDetails": "Zobrazit podrobnosti pinu {{number}}", "showPinDetailsDefault": "Zobrazit podrobnosti špendlíku", "siteColors": "Barvy webu", @@ -690,7 +692,7 @@ }, "spacingDefaultLabel": "Výchozí", "staticContent": "Statický obsah", - "staticMapEmptyStateAddApiKey": "Chcete-li zobrazit náhled mapy, přidejte klíč API", + "staticMapEmptyStateMissingApiKey": "Načtení YEXT_MAPBOX_API_KEY se nezdařilo. Zkontrolujte pokročilou konfiguraci svého webu.", "staticMapEmptyStateSectionHidden": "Sekce skrytá pro všechna umístění", "sunday": "neděle", "teamMember": "Člen týmu", diff --git a/packages/visual-editor/locales/platform/da/visual-editor.json b/packages/visual-editor/locales/platform/da/visual-editor.json index 4fe2294df4..6a52d5b1af 100644 --- a/packages/visual-editor/locales/platform/da/visual-editor.json +++ b/packages/visual-editor/locales/platform/da/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Svar", "answerColor": "Svarfarve", "answerVariant": "Svarvariant", - "apiKey": "API -nøgle", "ariaLabel": "Aria Label", "backgroundColor": "Baggrundsfarve", "bannerText": "Bannertekst", @@ -508,6 +507,8 @@ "showUtilityImages": "Vis hjælpebilleder", "startOfTheWeek": "Ugens start", "styles": "Stilarter", + "subtitleAlignmentDesktop": "Undertekstjustering på skrivebordet", + "subtitleAlignmentMobile": "Undertekstjustering på mobil", "tertiaryHeading": "Tertiær overskrift", "text": "Tekst", "textAlignment": "Tekstjustering", @@ -658,6 +659,7 @@ "showLabels": "Vis etiketter", "showLess": "Vis mindre", "showMore": "Vis mere", + "showMoreLocations": "Vis flere lokationer", "showPinDetails": "Vis pin {{number}} detaljer", "showPinDetailsDefault": "Vis pindetaljer", "siteColors": "Webstedsfarver", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Misligholdelse", "staticContent": "Statisk indhold", - "staticMapEmptyStateAddApiKey": "Tilføj en API-nøgle for at få vist dit kort", + "staticMapEmptyStateMissingApiKey": "Kunne ikke indlæse YEXT_MAPBOX_API_KEY. Tjek venligst dit websteds avancerede konfiguration.", "staticMapEmptyStateSectionHidden": "Sektion skjult for alle lokationer", "sunday": "søndag", "teamMember": "Teammedlem", diff --git a/packages/visual-editor/locales/platform/de/visual-editor.json b/packages/visual-editor/locales/platform/de/visual-editor.json index 770c98fc62..61b9a60804 100644 --- a/packages/visual-editor/locales/platform/de/visual-editor.json +++ b/packages/visual-editor/locales/platform/de/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Antwort", "answerColor": "Antwortfarbe", "answerVariant": "Antwort-Variante", - "apiKey": "API-Key", "ariaLabel": "Aria-Label", "backgroundColor": "Hintergrundfarbe", "bannerText": "Banner-Text", @@ -508,6 +507,8 @@ "showUtilityImages": "Dienstprogrammbilder anzeigen", "startOfTheWeek": "Wochenbeginn", "styles": "Styles", + "subtitleAlignmentDesktop": "Untertitelausrichtung im Desktop", + "subtitleAlignmentMobile": "Untertitelausrichtung in Mobilgeräten", "tertiaryHeading": "Tertiäre Überschrift", "text": "Text", "textAlignment": "Textausrichtung", @@ -658,6 +659,7 @@ "showLabels": "Labels anzeigen", "showLess": "Weniger anzeigen", "showMore": "Mehr anzeigen", + "showMoreLocations": "Weitere Standorte anzeigen", "showPinDetails": "Details zu Pin {{number}} anzeigen", "showPinDetailsDefault": "Pin-Details anzeigen", "siteColors": "Site-Farben", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Standard", "staticContent": "Statischer Inhalt", - "staticMapEmptyStateAddApiKey": "Fügen Sie einen API-Key hinzu, um die Karte anzuzeigen", + "staticMapEmptyStateMissingApiKey": "YEXT_MAPBOX_API_KEY konnte nicht geladen werden. Bitte überprüfen Sie die erweiterte Konfiguration Ihrer Site.", "staticMapEmptyStateSectionHidden": "Modul für alle Standorte ausgeblendet", "sunday": "Sonntag", "teamMember": "Teammitglied", 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 ad47d756ec..73b22e432b 100644 --- a/packages/visual-editor/locales/platform/en-GB/visual-editor.json +++ b/packages/visual-editor/locales/platform/en-GB/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Answer", "answerColor": "Answer Color", "answerVariant": "Answer Variant", - "apiKey": "API Key", "ariaLabel": "Aria Label", "backgroundColor": "Background Color", "bannerText": "Banner Text", @@ -508,6 +507,8 @@ "showUtilityImages": "Show Utility Images", "startOfTheWeek": "Start of the Week", "styles": "Styles", + "subtitleAlignmentDesktop": "Subtitle Alignment in Desktop", + "subtitleAlignmentMobile": "Subtitle Alignment in Mobile", "tertiaryHeading": "Tertiary Heading", "text": "Text", "textAlignment": "Text Alignment", @@ -658,6 +659,7 @@ "showLabels": "Show Labels", "showLess": "Show less", "showMore": "Show more", + "showMoreLocations": "Show more locations", "showPinDetails": "Show pin {{number}} details", "showPinDetailsDefault": "Show pin details", "siteColors": "Site Colors", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Default", "staticContent": "Static content", - "staticMapEmptyStateAddApiKey": "Add an API key to preview your map", + "staticMapEmptyStateMissingApiKey": "Failed to load YEXT_MAPBOX_API_KEY. Please check your site's advanced configuration.", "staticMapEmptyStateSectionHidden": "Section hidden for all locations", "sunday": "Sunday", "teamMember": "Team Member", diff --git a/packages/visual-editor/locales/platform/en/visual-editor.json b/packages/visual-editor/locales/platform/en/visual-editor.json index 26db380caa..fad52bb3c9 100644 --- a/packages/visual-editor/locales/platform/en/visual-editor.json +++ b/packages/visual-editor/locales/platform/en/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Answer", "answerColor": "Answer Color", "answerVariant": "Answer Variant", - "apiKey": "API Key", "ariaLabel": "Aria Label", "backgroundColor": "Background Color", "bannerText": "Banner Text", @@ -508,6 +507,8 @@ "showUtilityImages": "Show Utility Images", "startOfTheWeek": "Start of the Week", "styles": "Styles", + "subtitleAlignmentDesktop": "Subtitle Alignment in Desktop", + "subtitleAlignmentMobile": "Subtitle Alignment in Mobile", "tertiaryHeading": "Tertiary Heading", "text": "Text", "textAlignment": "Text Alignment", @@ -658,6 +659,7 @@ "showLabels": "Show Labels", "showLess": "Show less", "showMore": "Show more", + "showMoreLocations": "Show more locations", "showPinDetails": "Show pin {{number}} details", "showPinDetailsDefault": "Show pin details", "siteColors": "Site Colors", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Default", "staticContent": "Static content", - "staticMapEmptyStateAddApiKey": "Add an API key to preview your map", + "staticMapEmptyStateMissingApiKey": "Failed to load YEXT_MAPBOX_API_KEY. Please check your site's advanced configuration.", "staticMapEmptyStateSectionHidden": "Section hidden for all locations", "sunday": "Sunday", "teamMember": "Team Member", diff --git a/packages/visual-editor/locales/platform/es/visual-editor.json b/packages/visual-editor/locales/platform/es/visual-editor.json index aea11302b0..bbbbca79ba 100644 --- a/packages/visual-editor/locales/platform/es/visual-editor.json +++ b/packages/visual-editor/locales/platform/es/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Respuesta", "answerColor": "Color de respuesta", "answerVariant": "Variante de respuesta", - "apiKey": "Llave de API", "ariaLabel": "Etiqueta Aria", "backgroundColor": "Color de fondo", "bannerText": "Texto banner", @@ -508,6 +507,8 @@ "showUtilityImages": "Mostrar imágenes de utilidad", "startOfTheWeek": "Comienzo de la semana", "styles": "Estilos", + "subtitleAlignmentDesktop": "Alineación de subtítulos en el escritorio", + "subtitleAlignmentMobile": "Alineación de subtítulos en dispositivos móviles", "tertiaryHeading": "Título terciario", "text": "Texto", "textAlignment": "Alineación de texto", @@ -663,6 +664,7 @@ "showLabels": "Espectáculo de etiquetas", "showLess": "Mostrar menos", "showMore": "Mostrar más", + "showMoreLocations": "Mostrar más ubicaciones", "showPinDetails": "Mostrar detalles del pin {{number}}", "showPinDetailsDefault": "Mostrar detalles del pin", "siteColors": "Colores del sitio", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Por defecto", "staticContent": "Contenido estático", - "staticMapEmptyStateAddApiKey": "Agregue una clave API para obtener una vista previa de su mapa", + "staticMapEmptyStateMissingApiKey": "No se pudo cargar YEXT_MAPBOX_API_KEY. Por favor verifique la configuración avanzada de su sitio.", "staticMapEmptyStateSectionHidden": "Sección oculta para todas las ubicaciones.", "sunday": "Domingo", "teamMember": "Miembro del equipo", diff --git a/packages/visual-editor/locales/platform/et/visual-editor.json b/packages/visual-editor/locales/platform/et/visual-editor.json index 83b63177fa..b13beddfa4 100644 --- a/packages/visual-editor/locales/platform/et/visual-editor.json +++ b/packages/visual-editor/locales/platform/et/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Vastus", "answerColor": "Vastus Värv", "answerVariant": "Vastuse variant", - "apiKey": "API -võti", "ariaLabel": "Aria silt", "backgroundColor": "Taustvärv", "bannerText": "Ribareklaam", @@ -508,6 +507,8 @@ "showUtilityImages": "Näita kasulikke pilte", "startOfTheWeek": "Nädala algus", "styles": "Stiilid", + "subtitleAlignmentDesktop": "Subtiitrite joondamine töölaual", + "subtitleAlignmentMobile": "Subtiitrite joondamine mobiilis", "tertiaryHeading": "Kolmanda taseme rubriik", "text": "Tekst", "textAlignment": "Teksti joondamine", @@ -658,6 +659,7 @@ "showLabels": "Näita silte", "showLess": "Näitama vähem", "showMore": "Näidata veel", + "showMoreLocations": "Kuva rohkem asukohti", "showPinDetails": "Kuva nööpnõela {{number}} üksikasjad", "showPinDetailsDefault": "Kuva nööpnõela üksikasjad", "siteColors": "Saidi värvid", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Täitmata jätmine", "staticContent": "Staatiline sisu", - "staticMapEmptyStateAddApiKey": "Lisage oma kaardi eelvaate kuvamiseks API-võti", + "staticMapEmptyStateMissingApiKey": "YEXT_MAPBOX_API_KEY laadimine ebaõnnestus. Kontrollige oma saidi täpsemat konfiguratsiooni.", "staticMapEmptyStateSectionHidden": "Jaotis on peidetud kõigi asukohtade jaoks", "sunday": "Pühapäev", "teamMember": "Meeskonnaliige", diff --git a/packages/visual-editor/locales/platform/fi/visual-editor.json b/packages/visual-editor/locales/platform/fi/visual-editor.json index 84e9afa86f..767047f4d1 100644 --- a/packages/visual-editor/locales/platform/fi/visual-editor.json +++ b/packages/visual-editor/locales/platform/fi/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Vastaus", "answerColor": "Vastaus Väri", "answerVariant": "Vastausvariantti", - "apiKey": "API -avain", "ariaLabel": "Aria-merkki", "backgroundColor": "Taustaväri", "bannerText": "Banneriteksti", @@ -508,6 +507,8 @@ "showUtilityImages": "Näytä hyödyllisyyskuvat", "startOfTheWeek": "Viikon alku", "styles": "Tyylit", + "subtitleAlignmentDesktop": "Tekstityksen kohdistus työpöydällä", + "subtitleAlignmentMobile": "Tekstityksen kohdistus mobiilissa", "tertiaryHeading": "Kolmannen asteen otsikko", "text": "Teksti", "textAlignment": "Tekstin suuntaus", @@ -658,6 +659,7 @@ "showLabels": "Näyttötarrat", "showLess": "Näytä vähemmän", "showMore": "Näytä enemmän", + "showMoreLocations": "Näytä lisää paikkoja", "showPinDetails": "Näytä pin {{number}} tiedot", "showPinDetailsDefault": "Näytä merkin tiedot", "siteColors": "Sivuston värit", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Oletus", "staticContent": "Staattinen sisältö", - "staticMapEmptyStateAddApiKey": "Lisää API-avain esikatsellaksesi karttaasi", + "staticMapEmptyStateMissingApiKey": "YEXT_MAPBOX_API_KEY lataus epäonnistui. Tarkista sivustosi lisäasetukset.", "staticMapEmptyStateSectionHidden": "Osio piilotettu kaikille sijainneille", "sunday": "sunnuntai", "teamMember": "Tiimin jäsen", diff --git a/packages/visual-editor/locales/platform/fr/visual-editor.json b/packages/visual-editor/locales/platform/fr/visual-editor.json index 3e199fcfae..8fb0c5ea34 100644 --- a/packages/visual-editor/locales/platform/fr/visual-editor.json +++ b/packages/visual-editor/locales/platform/fr/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Répondre", "answerColor": "Couleur de la réponse", "answerVariant": "Variante de réponse", - "apiKey": "Clé API", "ariaLabel": "Étiquette Aria", "backgroundColor": "Couleur de fond", "bannerText": "Texte de bannière", @@ -508,6 +507,8 @@ "showUtilityImages": "Afficher les images utilitaires", "startOfTheWeek": "Début de la semaine", "styles": "Styles", + "subtitleAlignmentDesktop": "Alignement des sous-titres sur le bureau", + "subtitleAlignmentMobile": "Alignement des sous-titres sur mobile", "tertiaryHeading": "Rubrique Tertiaire", "text": "Texte", "textAlignment": "Alignement du texte", @@ -663,6 +664,7 @@ "showLabels": "Montrer les étiquettes", "showLess": "Montrer moins", "showMore": "Montrer plus", + "showMoreLocations": "Afficher plus d'emplacements", "showPinDetails": "Afficher les détails de la broche {{number}}", "showPinDetailsDefault": "Afficher les détails de l'épingle", "siteColors": "Couleurs du site", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Défaut", "staticContent": "Contenu statique", - "staticMapEmptyStateAddApiKey": "Ajoutez une clé API pour prévisualiser votre carte", + "staticMapEmptyStateMissingApiKey": "Échec du chargement de YEXT_MAPBOX_API_KEY. Veuillez vérifier la configuration avancée de votre site.", "staticMapEmptyStateSectionHidden": "Section masquée pour tous les emplacements", "sunday": "Dimanche", "teamMember": "Membre de l'équipe", diff --git a/packages/visual-editor/locales/platform/hr/visual-editor.json b/packages/visual-editor/locales/platform/hr/visual-editor.json index 199be2d07e..a022e95547 100644 --- a/packages/visual-editor/locales/platform/hr/visual-editor.json +++ b/packages/visual-editor/locales/platform/hr/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Odgovor", "answerColor": "Boja odgovora", "answerVariant": "Varijanta odgovora", - "apiKey": "API ključ", "ariaLabel": "Etiketa Aria", "backgroundColor": "Boja pozadine", "bannerText": "Tekst natpisa", @@ -508,6 +507,8 @@ "showUtilityImages": "Prikaži pomoćne slike", "startOfTheWeek": "Početak tjedna", "styles": "Stil", + "subtitleAlignmentDesktop": "Poravnanje podnaslova na radnoj površini", + "subtitleAlignmentMobile": "Poravnanje titlova u mobitelu", "tertiaryHeading": "Tercijarni naslov", "text": "Tekst", "textAlignment": "Poravnanje teksta", @@ -663,6 +664,7 @@ "showLabels": "Prikaži naljepnice", "showLess": "Pokazati manje", "showMore": "Pokažite više", + "showMoreLocations": "Prikaži više lokacija", "showPinDetails": "Prikaži detalje pribadače {{number}}", "showPinDetailsDefault": "Prikaži detalje pribadače", "siteColors": "Boje mjesta", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Zadano", "staticContent": "Statički sadržaj", - "staticMapEmptyStateAddApiKey": "Dodajte API ključ za pregled svoje karte", + "staticMapEmptyStateMissingApiKey": "Nije uspjelo učitavanje YEXT_MAPBOX_API_KEY. Provjerite naprednu konfiguraciju svoje stranice.", "staticMapEmptyStateSectionHidden": "Odjeljak skriven za sve lokacije", "sunday": "nedjelja", "teamMember": "Član tima", diff --git a/packages/visual-editor/locales/platform/hu/visual-editor.json b/packages/visual-editor/locales/platform/hu/visual-editor.json index 1aa5e0f19c..47db1f6e14 100644 --- a/packages/visual-editor/locales/platform/hu/visual-editor.json +++ b/packages/visual-editor/locales/platform/hu/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Válasz", "answerColor": "Válasz Szín", "answerVariant": "Válasz változat", - "apiKey": "API kulcs", "ariaLabel": "Aria címke", "backgroundColor": "Háttérszín", "bannerText": "Szalaghirdetés", @@ -508,6 +507,8 @@ "showUtilityImages": "Segédképek megjelenítése", "startOfTheWeek": "A hét kezdete", "styles": "Stílusok", + "subtitleAlignmentDesktop": "Felirat igazítása az asztalon", + "subtitleAlignmentMobile": "Felirat igazítása mobilban", "tertiaryHeading": "Harmadlagos rovat", "text": "Szöveg", "textAlignment": "Szöveges igazítás", @@ -658,6 +659,7 @@ "showLabels": "A címkék megjelenítését", "showLess": "Mutasson kevesebbet", "showMore": "Mutasson többet", + "showMoreLocations": "További helyek megjelenítése", "showPinDetails": "A tű {{number}} részleteinek megjelenítése", "showPinDetailsDefault": "A gombostű részleteinek megjelenítése", "siteColors": "Helyszínek", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Mulasztás", "staticContent": "Statikus tartalom", - "staticMapEmptyStateAddApiKey": "Adjon hozzá egy API-kulcsot a térkép előnézetéhez", + "staticMapEmptyStateMissingApiKey": "A YEXT_MAPBOX_API_KEY betöltése sikertelen. Kérjük, ellenőrizze webhelye speciális konfigurációját.", "staticMapEmptyStateSectionHidden": "A szakasz minden helyen el van rejtve", "sunday": "vasárnap", "teamMember": "Csapattag", diff --git a/packages/visual-editor/locales/platform/it/visual-editor.json b/packages/visual-editor/locales/platform/it/visual-editor.json index f0a6dfe2fe..f1801fdced 100644 --- a/packages/visual-editor/locales/platform/it/visual-editor.json +++ b/packages/visual-editor/locales/platform/it/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Risposta", "answerColor": "Colore della risposta", "answerVariant": "Variante di risposta", - "apiKey": "Chiave API", "ariaLabel": "Etichetta Aria", "backgroundColor": "Colore di sfondo", "bannerText": "Banner Testo", @@ -508,6 +507,8 @@ "showUtilityImages": "Mostra immagini di utilità", "startOfTheWeek": "Inizio della settimana", "styles": "Stili", + "subtitleAlignmentDesktop": "Allineamento dei sottotitoli sul desktop", + "subtitleAlignmentMobile": "Allineamento dei sottotitoli nel cellulare", "tertiaryHeading": "Titolo terziario", "text": "Testo", "textAlignment": "Allineamento del testo", @@ -663,6 +664,7 @@ "showLabels": "Etichette per mostrare", "showLess": "Mostra meno", "showMore": "Mostra di più", + "showMoreLocations": "Mostra più località", "showPinDetails": "Mostra i dettagli del segnaposto {{number}}", "showPinDetailsDefault": "Mostra i dettagli del segnaposto", "siteColors": "Colori del sito", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Predefinito", "staticContent": "Contenuto statico", - "staticMapEmptyStateAddApiKey": "Aggiungi una chiave API per visualizzare l'anteprima della mappa", + "staticMapEmptyStateMissingApiKey": "Impossibile caricare YEXT_MAPBOX_API_KEY. Controlla la configurazione avanzata del tuo sito.", "staticMapEmptyStateSectionHidden": "Sezione nascosta per tutte le località", "sunday": "Domenica", "teamMember": "Membro del team", diff --git a/packages/visual-editor/locales/platform/ja/visual-editor.json b/packages/visual-editor/locales/platform/ja/visual-editor.json index 7b40356b61..85d1fe60fe 100644 --- a/packages/visual-editor/locales/platform/ja/visual-editor.json +++ b/packages/visual-editor/locales/platform/ja/visual-editor.json @@ -180,7 +180,6 @@ "answer": "答え", "answerColor": "答えの色", "answerVariant": "回答のバリエーション", - "apiKey": "APIキー", "ariaLabel": "アリアレーベル", "backgroundColor": "背景色", "bannerText": "バナーテキスト", @@ -508,6 +507,8 @@ "showUtilityImages": "ユーティリティ画像を表示", "startOfTheWeek": "今週の始まり", "styles": "スタイル", + "subtitleAlignmentDesktop": "デスクトップでの字幕の配置", + "subtitleAlignmentMobile": "モバイルでの字幕の配置", "tertiaryHeading": "第 3 見出し", "text": "文章", "textAlignment": "テキストアライメント", @@ -658,6 +659,7 @@ "showLabels": "ラベルを表示します", "showLess": "少なく表示します", "showMore": "もっと見せてください", + "showMoreLocations": "さらに多くの場所を表示", "showPinDetails": "ピン {{number}} の詳細を表示", "showPinDetailsDefault": "ピンの詳細を表示", "siteColors": "サイトの色", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "デフォルト", "staticContent": "静的コンテンツ", - "staticMapEmptyStateAddApiKey": "API キーを追加してマップをプレビューする", + "staticMapEmptyStateMissingApiKey": "YEXT_MAPBOX_API_KEY のロードに失敗しました。サイトの詳細設定を確認してください。", "staticMapEmptyStateSectionHidden": "すべての場所で非表示のセクション", "sunday": "日曜日", "teamMember": "チームメンバー", diff --git a/packages/visual-editor/locales/platform/lt/visual-editor.json b/packages/visual-editor/locales/platform/lt/visual-editor.json index ffa3ff5f3c..7e90308320 100644 --- a/packages/visual-editor/locales/platform/lt/visual-editor.json +++ b/packages/visual-editor/locales/platform/lt/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Atsakymas", "answerColor": "Atsakymas Spalva", "answerVariant": "Atsakymo variantas", - "apiKey": "API raktas", "ariaLabel": "Aria etiketė", "backgroundColor": "Fono spalva", "bannerText": "Reklamjuostės tekstas", @@ -508,6 +507,8 @@ "showUtilityImages": "Rodyti naudingumo vaizdus", "startOfTheWeek": "Savaitės pradžia", "styles": "Stiliai", + "subtitleAlignmentDesktop": "Subtitrų lygiavimas darbalaukyje", + "subtitleAlignmentMobile": "Subtitrų lygiavimas mobiliajame telefone", "tertiaryHeading": "Tretinė antraštė", "text": "Tekstas", "textAlignment": "Teksto derinimas", @@ -668,6 +669,7 @@ "showLabels": "Rodyti etiketes", "showLess": "Parodyk mažiau", "showMore": "Parodyk daugiau", + "showMoreLocations": "Rodyti daugiau vietų", "showPinDetails": "Rodyti smeigtuko {{number}} informaciją", "showPinDetailsDefault": "Rodyti smeigtuko informaciją", "siteColors": "Svetainės spalvos", @@ -690,7 +692,7 @@ }, "spacingDefaultLabel": "Numatytasis", "staticContent": "Statinis turinys", - "staticMapEmptyStateAddApiKey": "Pridėkite API raktą, kad peržiūrėtumėte žemėlapį", + "staticMapEmptyStateMissingApiKey": "Nepavyko įkelti YEXT_MAPBOX_API_KEY. Patikrinkite savo svetainės išplėstinę konfigūraciją.", "staticMapEmptyStateSectionHidden": "Skiltis paslėpta visose vietose", "sunday": "Sekmadienis", "teamMember": "Komandos narys", diff --git a/packages/visual-editor/locales/platform/lv/visual-editor.json b/packages/visual-editor/locales/platform/lv/visual-editor.json index 52add0102b..de806364fa 100644 --- a/packages/visual-editor/locales/platform/lv/visual-editor.json +++ b/packages/visual-editor/locales/platform/lv/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Atbildēt", "answerColor": "Atbildes krāsa", "answerVariant": "Atbildes variants", - "apiKey": "API atslēga", "ariaLabel": "Ārijas etiķete", "backgroundColor": "Fona krāsa", "bannerText": "Reklāmkarogu teksts", @@ -508,6 +507,8 @@ "showUtilityImages": "Rādīt lietderīgos attēlus", "startOfTheWeek": "Nedēļas sākums", "styles": "Stils", + "subtitleAlignmentDesktop": "Subtitru līdzināšana darbvirsmā", + "subtitleAlignmentMobile": "Subtitru līdzināšana mobilajā ierīcē", "tertiaryHeading": "Terciārā pozīcija", "text": "Teksts", "textAlignment": "Teksta izlīdzināšana", @@ -661,6 +662,7 @@ "showLabels": "Izrādes etiķetes", "showLess": "Rādīt mazāk", "showMore": "Parādīt vairāk", + "showMoreLocations": "Rādīt vairāk atrašanās vietu", "showPinDetails": "Rādīt spraudītes {{number}} informāciju", "showPinDetailsDefault": "Rādīt spraudītes informāciju", "siteColors": "Vietnes krāsas", @@ -683,7 +685,7 @@ }, "spacingDefaultLabel": "Nepildīt", "staticContent": "Statisks saturs", - "staticMapEmptyStateAddApiKey": "Pievienojiet API atslēgu, lai priekšskatītu karti", + "staticMapEmptyStateMissingApiKey": "Neizdevās ielādēt YEXT_MAPBOX_API_KEY. Lūdzu, pārbaudiet savas vietnes papildu konfigurāciju.", "staticMapEmptyStateSectionHidden": "Sadaļa ir paslēpta visām atrašanās vietām", "sunday": "Svētdiena", "teamMember": "Komandas loceklis", diff --git a/packages/visual-editor/locales/platform/nb/visual-editor.json b/packages/visual-editor/locales/platform/nb/visual-editor.json index 66175fd0e6..d2f4d025c5 100644 --- a/packages/visual-editor/locales/platform/nb/visual-editor.json +++ b/packages/visual-editor/locales/platform/nb/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Svare", "answerColor": "Svar farge", "answerVariant": "Svarvariant", - "apiKey": "API -nøkkel", "ariaLabel": "Aria-etikett", "backgroundColor": "Bakgrunnsfarge", "bannerText": "Bannertekst", @@ -508,6 +507,8 @@ "showUtilityImages": "Vis verktøybilder", "startOfTheWeek": "Ukens start", "styles": "Stiler", + "subtitleAlignmentDesktop": "Undertekstjustering på skrivebordet", + "subtitleAlignmentMobile": "Undertekstjustering på mobil", "tertiaryHeading": "Tertiær overskrift", "text": "Tekst", "textAlignment": "Tekstjustering", @@ -658,6 +659,7 @@ "showLabels": "Vis etiketter", "showLess": "Vis mindre", "showMore": "Vis mer", + "showMoreLocations": "Vis flere lokasjoner", "showPinDetails": "Vis detaljer om pin {{number}}", "showPinDetailsDefault": "Vis pindetaljer", "siteColors": "Nettstedsfarger", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Misligholde", "staticContent": "Statisk innhold", - "staticMapEmptyStateAddApiKey": "Legg til en API-nøkkel for å forhåndsvise kartet ditt", + "staticMapEmptyStateMissingApiKey": "Kunne ikke laste inn YEXT_MAPBOX_API_KEY. Vennligst sjekk nettstedets avanserte konfigurasjon.", "staticMapEmptyStateSectionHidden": "Seksjon skjult for alle lokasjoner", "sunday": "søndag", "teamMember": "Teammedlem", diff --git a/packages/visual-editor/locales/platform/nl/visual-editor.json b/packages/visual-editor/locales/platform/nl/visual-editor.json index d6f53eb965..77700f4637 100644 --- a/packages/visual-editor/locales/platform/nl/visual-editor.json +++ b/packages/visual-editor/locales/platform/nl/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Antwoord", "answerColor": "Antwoord Kleur", "answerVariant": "Antwoordvariant", - "apiKey": "API -sleutel", "ariaLabel": "Aria-label", "backgroundColor": "Achtergrondkleur", "bannerText": "Banner Tekst", @@ -508,6 +507,8 @@ "showUtilityImages": "Toon hulpprogramma-afbeeldingen", "startOfTheWeek": "Begin van de week", "styles": "Stijlen", + "subtitleAlignmentDesktop": "Uitlijning van ondertitels op het bureaublad", + "subtitleAlignmentMobile": "Ondertiteling uitlijnen op mobiel", "tertiaryHeading": "Tertiaire rubriek", "text": "Tekst", "textAlignment": "Tekstuitlijning", @@ -658,6 +659,7 @@ "showLabels": "Toon labels", "showLess": "Minder laten zien", "showMore": "Laat meer zien", + "showMoreLocations": "Toon meer locaties", "showPinDetails": "Toon pin {{number}} details", "showPinDetailsDefault": "Toon pingegevens", "siteColors": "Sitekleuren", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Standaard", "staticContent": "Statische inhoud", - "staticMapEmptyStateAddApiKey": "Voeg een API-sleutel toe om een ​​voorbeeld van uw kaart te bekijken", + "staticMapEmptyStateMissingApiKey": "Kan YEXT_MAPBOX_API_KEY niet laden. Controleer de geavanceerde configuratie van uw site.", "staticMapEmptyStateSectionHidden": "Sectie verborgen voor alle locaties", "sunday": "Zondag", "teamMember": "Teamlid", diff --git a/packages/visual-editor/locales/platform/pl/visual-editor.json b/packages/visual-editor/locales/platform/pl/visual-editor.json index d38e41fae3..062fa29663 100644 --- a/packages/visual-editor/locales/platform/pl/visual-editor.json +++ b/packages/visual-editor/locales/platform/pl/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Odpowiedź", "answerColor": "Odpowiedź Kolor", "answerVariant": "Wariant odpowiedzi", - "apiKey": "Klucz API", "ariaLabel": "Etykieta Arii", "backgroundColor": "Kolor tła", "bannerText": "Tekst banerowy", @@ -508,6 +507,8 @@ "showUtilityImages": "Pokaż obrazy narzędziowe", "startOfTheWeek": "Początek tygodnia", "styles": "Style", + "subtitleAlignmentDesktop": "Wyrównanie napisów na pulpicie", + "subtitleAlignmentMobile": "Wyrównanie napisów w telefonie komórkowym", "tertiaryHeading": "Tytuł trzeciorzędny", "text": "Tekst", "textAlignment": "Wyrównanie tekstu", @@ -668,6 +669,7 @@ "showLabels": "Pokaż etykiety", "showLess": "Pokaż mniej", "showMore": "Pokaż więcej", + "showMoreLocations": "Pokaż więcej lokalizacji", "showPinDetails": "Pokaż szczegóły pinu {{number}}", "showPinDetailsDefault": "Pokaż szczegóły pinu", "siteColors": "Kolory strony", @@ -690,7 +692,7 @@ }, "spacingDefaultLabel": "Domyślny", "staticContent": "Treść statyczna", - "staticMapEmptyStateAddApiKey": "Dodaj klucz API, aby wyświetlić podgląd mapy", + "staticMapEmptyStateMissingApiKey": "Nie udało się załadować YEXT_MAPBOX_API_KEY. Sprawdź zaawansowaną konfigurację swojej witryny.", "staticMapEmptyStateSectionHidden": "Sekcja ukryta dla wszystkich lokalizacji", "sunday": "Niedziela", "teamMember": "Członek zespołu", diff --git a/packages/visual-editor/locales/platform/pt/visual-editor.json b/packages/visual-editor/locales/platform/pt/visual-editor.json index 83d8f8907a..45a2a97dd5 100644 --- a/packages/visual-editor/locales/platform/pt/visual-editor.json +++ b/packages/visual-editor/locales/platform/pt/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Responder", "answerColor": "Cor da resposta", "answerVariant": "Variante de resposta", - "apiKey": "Chave da API", "ariaLabel": "Etiqueta Ária", "backgroundColor": "Cor de fundo", "bannerText": "Texto do banner", @@ -508,6 +507,8 @@ "showUtilityImages": "Mostrar imagens utilitárias", "startOfTheWeek": "Começo da semana", "styles": "Estilos", + "subtitleAlignmentDesktop": "Alinhamento de legendas na área de trabalho", + "subtitleAlignmentMobile": "Alinhamento de legendas no celular", "tertiaryHeading": "Título Terciário", "text": "Texto", "textAlignment": "Alinhamento de texto", @@ -663,6 +664,7 @@ "showLabels": "Mostrar rótulos", "showLess": "Mostre menos", "showMore": "Mostre mais", + "showMoreLocations": "Mostrar mais locais", "showPinDetails": "Mostrar detalhes do pino {{number}}", "showPinDetailsDefault": "Mostrar detalhes do alfinete", "siteColors": "Cores do site", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Padrão", "staticContent": "Conteúdo estático", - "staticMapEmptyStateAddApiKey": "Adicione uma chave de API para visualizar seu mapa", + "staticMapEmptyStateMissingApiKey": "Falha ao carregar YEXT_MAPBOX_API_KEY. Verifique a configuração avançada do seu site.", "staticMapEmptyStateSectionHidden": "Seção oculta para todos os locais", "sunday": "Domingo", "teamMember": "Membro da equipe", diff --git a/packages/visual-editor/locales/platform/ro/visual-editor.json b/packages/visual-editor/locales/platform/ro/visual-editor.json index 3de4375e68..c592177f33 100644 --- a/packages/visual-editor/locales/platform/ro/visual-editor.json +++ b/packages/visual-editor/locales/platform/ro/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Răspuns", "answerColor": "Răspuns Culoare", "answerVariant": "Varianta de răspuns", - "apiKey": "Cheia API", "ariaLabel": "Eticheta Aria", "backgroundColor": "Culoarea fundalului", "bannerText": "Text banner", @@ -508,6 +507,8 @@ "showUtilityImages": "Afișați imagini utilitare", "startOfTheWeek": "Începutul săptămânii", "styles": "Stiluri", + "subtitleAlignmentDesktop": "Alinierea subtitrarilor pe desktop", + "subtitleAlignmentMobile": "Alinierea subtitrarilor pe mobil", "tertiaryHeading": "Direcție terțiară", "text": "Text", "textAlignment": "Alinierea textului", @@ -663,6 +664,7 @@ "showLabels": "Arată etichete", "showLess": "Arată mai puțin", "showMore": "Arată mai mult", + "showMoreLocations": "Afișați mai multe locații", "showPinDetails": "Afișați detaliile codului {{number}}", "showPinDetailsDefault": "Afișați detaliile codului", "siteColors": "Culorile site -ului", @@ -685,7 +687,7 @@ }, "spacingDefaultLabel": "Implicit", "staticContent": "Conținut static", - "staticMapEmptyStateAddApiKey": "Adăugați o cheie API pentru a vă previzualiza harta", + "staticMapEmptyStateMissingApiKey": "Nu s-a încărcat YEXT_MAPBOX_API_KEY. Vă rugăm să verificați configurația avansată a site-ului dvs.", "staticMapEmptyStateSectionHidden": "Secțiune ascunsă pentru toate locațiile", "sunday": "duminică", "teamMember": "Membru al echipei", diff --git a/packages/visual-editor/locales/platform/sk/visual-editor.json b/packages/visual-editor/locales/platform/sk/visual-editor.json index e2568da6d2..0bfb9f2222 100644 --- a/packages/visual-editor/locales/platform/sk/visual-editor.json +++ b/packages/visual-editor/locales/platform/sk/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Odpoveď", "answerColor": "Farba odpovede", "answerVariant": "Odpoveď Variant", - "apiKey": "API Kľúč", "ariaLabel": "Značka Aria", "backgroundColor": "Farba pozadia", "bannerText": "Text", @@ -508,6 +507,8 @@ "showUtilityImages": "Zobraziť pomocné obrázky", "startOfTheWeek": "Začiatok týždňa", "styles": "Štýl", + "subtitleAlignmentDesktop": "Zarovnanie titulkov na ploche", + "subtitleAlignmentMobile": "Zarovnanie titulkov v mobile", "tertiaryHeading": "Terciárny nadpis", "text": "Text", "textAlignment": "Vyrovnanie textu", @@ -668,6 +669,7 @@ "showLabels": "Ukazovať štítky", "showLess": "Vykazovať menej", "showMore": "Ukázať viac", + "showMoreLocations": "Zobraziť viac miest", "showPinDetails": "Zobraziť podrobnosti špendlíka {{number}}", "showPinDetailsDefault": "Zobraziť podrobnosti špendlíka", "siteColors": "Farby stránok", @@ -690,7 +692,7 @@ }, "spacingDefaultLabel": "Predvolený", "staticContent": "Statický obsah", - "staticMapEmptyStateAddApiKey": "Ak chcete zobraziť ukážku mapy, pridajte kľúč API", + "staticMapEmptyStateMissingApiKey": "Nepodarilo sa načítať YEXT_MAPBOX_API_KEY. Skontrolujte pokročilú konfiguráciu svojich stránok.", "staticMapEmptyStateSectionHidden": "Sekcia skrytá pre všetky miesta", "sunday": "Nedeľa", "teamMember": "Člen tímu", diff --git a/packages/visual-editor/locales/platform/sv/visual-editor.json b/packages/visual-editor/locales/platform/sv/visual-editor.json index e7b3828dd9..4dc5aa56c2 100644 --- a/packages/visual-editor/locales/platform/sv/visual-editor.json +++ b/packages/visual-editor/locales/platform/sv/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Svar", "answerColor": "Svarsfärg", "answerVariant": "Svarsvariant", - "apiKey": "API -nyckel", "ariaLabel": "Aria-etikett", "backgroundColor": "Bakgrundsfärg", "bannerText": "Bannertext", @@ -508,6 +507,8 @@ "showUtilityImages": "Visa verktygsbilder", "startOfTheWeek": "Veckans början", "styles": "Stilar", + "subtitleAlignmentDesktop": "Undertextjustering på skrivbordet", + "subtitleAlignmentMobile": "Undertextjustering i mobil", "tertiaryHeading": "Tertiär rubrik", "text": "Text", "textAlignment": "Textinriktning", @@ -658,6 +659,7 @@ "showLabels": "Visa etiketter", "showLess": "Visa mindre", "showMore": "Visa mer", + "showMoreLocations": "Visa fler platser", "showPinDetails": "Visa pin {{number}} detaljer", "showPinDetailsDefault": "Visa pindetaljer", "siteColors": "Platsfärger", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Standard", "staticContent": "Statiskt innehåll", - "staticMapEmptyStateAddApiKey": "Lägg till en API-nyckel för att förhandsgranska din karta", + "staticMapEmptyStateMissingApiKey": "Det gick inte att ladda YEXT_MAPBOX_API_KEY. Kontrollera din webbplats avancerade konfiguration.", "staticMapEmptyStateSectionHidden": "Avsnittet är dolt för alla platser", "sunday": "Söndag", "teamMember": "Teammedlem", diff --git a/packages/visual-editor/locales/platform/tr/visual-editor.json b/packages/visual-editor/locales/platform/tr/visual-editor.json index f8cb12a8b9..384abaa507 100644 --- a/packages/visual-editor/locales/platform/tr/visual-editor.json +++ b/packages/visual-editor/locales/platform/tr/visual-editor.json @@ -180,7 +180,6 @@ "answer": "Cevap", "answerColor": "Cevap Rengi", "answerVariant": "Cevap Varyantı", - "apiKey": "API Anahtarı", "ariaLabel": "Arya Etiketi", "backgroundColor": "Arka plan rengi", "bannerText": "Banner metni", @@ -508,6 +507,8 @@ "showUtilityImages": "Faydalı Görselleri Göster", "startOfTheWeek": "Haftanın başlangıcı", "styles": "Stiller", + "subtitleAlignmentDesktop": "Masaüstünde Altyazı Hizalaması", + "subtitleAlignmentMobile": "Mobil Cihazlarda Altyazı Hizalaması", "tertiaryHeading": "Üçüncül Başlık", "text": "Metin", "textAlignment": "Metin uyumu", @@ -658,6 +659,7 @@ "showLabels": "Etiketleri Göster", "showLess": "Daha az göster", "showMore": "Daha Fazla Göster", + "showMoreLocations": "Daha fazla konum göster", "showPinDetails": "{{number}} pin ayrıntılarını göster", "showPinDetailsDefault": "Pin ayrıntılarını göster", "siteColors": "Site Renkleri", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "Varsayılan", "staticContent": "Statik içerik", - "staticMapEmptyStateAddApiKey": "Haritanızı önizlemek için bir API anahtarı ekleyin", + "staticMapEmptyStateMissingApiKey": "YEXT_MAPBOX_API_KEY yüklenemedi. Lütfen sitenizin gelişmiş yapılandırmasını kontrol edin.", "staticMapEmptyStateSectionHidden": "Bölüm tüm konumlar için gizlendi", "sunday": "Pazar", "teamMember": "Ekip üyesi", 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 67b00d99c1..07e5a8cfc7 100644 --- a/packages/visual-editor/locales/platform/zh-TW/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh-TW/visual-editor.json @@ -180,7 +180,6 @@ "answer": "回答", "answerColor": "答案顏色", "answerVariant": "答案變體", - "apiKey": "API鍵", "ariaLabel": "詠嘆調標籤", "backgroundColor": "背景顏色", "bannerText": "橫幅文字", @@ -508,6 +507,8 @@ "showUtilityImages": "顯示實用程式圖像", "startOfTheWeek": "一周開始", "styles": "樣式", + "subtitleAlignmentDesktop": "桌面中的字幕對齊", + "subtitleAlignmentMobile": "行動裝置中的字幕對齊方式", "tertiaryHeading": "第三標題", "text": "文字", "textAlignment": "文字對齊", @@ -658,6 +659,7 @@ "showLabels": "顯示標籤", "showLess": "少顯示", "showMore": "顯示更多", + "showMoreLocations": "顯示更多地點", "showPinDetails": "顯示引腳 {{number}} 詳細信息", "showPinDetailsDefault": "顯示引腳詳細信息", "siteColors": "站點顏色", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "預設", "staticContent": "靜態內容", - "staticMapEmptyStateAddApiKey": "添加 API 密鑰以預覽地圖", + "staticMapEmptyStateMissingApiKey": "無法載入 YEXT_MAPBOX_API_KEY。請檢查您網站的進階配置。", "staticMapEmptyStateSectionHidden": "所有位置均隱藏部分", "sunday": "星期日", "teamMember": "隊員", diff --git a/packages/visual-editor/locales/platform/zh/visual-editor.json b/packages/visual-editor/locales/platform/zh/visual-editor.json index 381e9f9cb7..4a0b1f1740 100644 --- a/packages/visual-editor/locales/platform/zh/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh/visual-editor.json @@ -180,7 +180,6 @@ "answer": "回答", "answerColor": "答案颜色", "answerVariant": "答案变体", - "apiKey": "API键", "ariaLabel": "咏叹调标签", "backgroundColor": "背景颜色", "bannerText": "横幅文字", @@ -508,6 +507,8 @@ "showUtilityImages": "显示实用程序图像", "startOfTheWeek": "一周开始", "styles": "样式", + "subtitleAlignmentDesktop": "桌面中的字幕对齐", + "subtitleAlignmentMobile": "移动设备中的字幕对齐方式", "tertiaryHeading": "第三标题", "text": "文本", "textAlignment": "文字对齐", @@ -658,6 +659,7 @@ "showLabels": "显示标签", "showLess": "少显示", "showMore": "显示更多", + "showMoreLocations": "显示更多地点", "showPinDetails": "显示引脚 {{number}} 详细信息", "showPinDetailsDefault": "显示引脚详细信息", "siteColors": "站点颜色", @@ -680,7 +682,7 @@ }, "spacingDefaultLabel": "默认", "staticContent": "静态内容", - "staticMapEmptyStateAddApiKey": "添加 API 密钥以预览地图", + "staticMapEmptyStateMissingApiKey": "无法加载 YEXT_MAPBOX_API_KEY。请检查您站点的高级配置。", "staticMapEmptyStateSectionHidden": "所有位置均隐藏部分", "sunday": "星期日", "teamMember": "队员", diff --git a/packages/visual-editor/package.json b/packages/visual-editor/package.json index 920914fa70..8799c76613 100644 --- a/packages/visual-editor/package.json +++ b/packages/visual-editor/package.json @@ -1,7 +1,7 @@ { "name": "@yext/visual-editor", "description": "Component library for Yext Pages Visual Editor", - "version": "1.3.2", + "version": "1.3.3", "author": "sumo@yext.com", "repository": { "type": "git", diff --git a/packages/visual-editor/src/components/Locator.test.tsx b/packages/visual-editor/src/components/Locator.test.tsx index 95a2697c7f..b2ec11ad91 100644 --- a/packages/visual-editor/src/components/Locator.test.tsx +++ b/packages/visual-editor/src/components/Locator.test.tsx @@ -1390,14 +1390,14 @@ describe("Locator", async () => { const translations = await injectTranslations(document); vi.stubGlobal("fetch", createLocatorFetchMock(document)); + await page.viewport(width, height); + const { container } = reactRender( ); - await page.viewport(width, height); - // Unless testing empty state, wait for search to load if (!name.includes("empty document")) { await waitFor(() => { diff --git a/packages/visual-editor/src/components/Locator.tsx b/packages/visual-editor/src/components/Locator.tsx index 31f66e692d..d60cf5f98c 100644 --- a/packages/visual-editor/src/components/Locator.tsx +++ b/packages/visual-editor/src/components/Locator.tsx @@ -28,8 +28,8 @@ import { Pagination, PinComponentProps, SearchI18nextProvider, - VerticalResults, useAnalytics as useSearchAnalytics, + VerticalResults, } from "@yext/search-ui-react"; import React, { useEffect } from "react"; import { useCollapse } from "react-collapsed"; @@ -48,6 +48,8 @@ import { import { ImageField } from "../fields/ImageField.tsx"; import { YextAutoField } from "../fields/YextAutoField.tsx"; import { useDocument } from "../hooks/useDocument.tsx"; +import { usePreviewWindow } from "../hooks/usePreviewWindow.ts"; +import { getViewport, useWindowWidth } from "../hooks/useViewport.ts"; import { Button } from "./atoms/button.tsx"; import { ImageStylingFields } from "./contentBlocks/image/styling.ts"; import { TranslatableString } from "../types/types.ts"; @@ -1176,6 +1178,9 @@ const LocatorInternal = ({ }, [searchAnalytics, pagesAnalytics]); const { t, i18n } = useTranslation(); + const previewWindow = usePreviewWindow(); + const windowWidth = useWindowWidth(previewWindow); + const { isMobile } = getViewport(windowWidth); const preferredUnit = getPreferredDistanceUnit(i18n.language); const streamDocument = useDocument(); const entityTypeSourceMap = getLocatorEntityTypeSourceMap(streamDocument); @@ -1184,6 +1189,9 @@ const LocatorInternal = ({ const resultCount = useSearchState( (state) => state.vertical.resultsCount || 0 ); + const searchResults = useSearchState( + (state) => (state.vertical.results || []) as Result[] + ); const queryParamString = typeof window === "undefined" ? "" : window.location.search; const initialLocationParam = getValueFromQueryString( @@ -1268,6 +1276,7 @@ const LocatorInternal = ({ }; const searchActions = useSearchActions(); + const selectedFacets: string[] = React.useMemo( () => facetFields?.selections @@ -1358,6 +1367,9 @@ const LocatorInternal = ({ const resultsRef = React.useRef>([]); const resultsContainer = React.useRef(null); + const [mobileResults, setMobileResults] = React.useState[]>( + [] + ); // Tracks the selected pin index to highlight the corresponding result card. const [selectedResultIndex, setSelectedResultIndex] = React.useState< number | null @@ -1493,6 +1505,8 @@ const LocatorInternal = ({ React.useState(initialMapCenter); const [isInitialMapLocationResolved, setIsInitialMapLocationResolved] = React.useState(false); + const canShowMoreMobileResults = + isMobile && mobileResults.length < resultCount; const mapProps = React.useMemo( () => ({ @@ -1696,10 +1710,12 @@ const LocatorInternal = ({ const searchFilters = useSearchState((state) => state.filters); const currentOffset = useSearchState((state) => state.vertical.offset); const previousOffset = React.useRef(undefined); + const prevIsMobile = React.useRef(isMobile); // Scroll to top when pagination changes React.useEffect(() => { if ( + !isMobile && currentOffset !== previousOffset.current && previousOffset.current !== undefined ) { @@ -1709,7 +1725,37 @@ const LocatorInternal = ({ }); } previousOffset.current = currentOffset; - }, [currentOffset]); + }, [currentOffset, isMobile]); + + React.useEffect(() => { + const switchedToMobile = isMobile && !prevIsMobile.current; + + prevIsMobile.current = isMobile; + + if (!switchedToMobile || searchLoading || (currentOffset ?? 0) === 0) { + return; + } + + // Always reload from offset 0 if switching to mobile + setMobileResults([]); + searchActions.setOffset(0); + executeSearch(searchActions); + setSearchState("loading"); + }, [currentOffset, isMobile, searchActions, searchLoading]); + + React.useEffect(() => { + if (!isMobile || searchLoading) { + return; + } + + setMobileResults((previousResults) => { + // Mobile keeps a single growing list: later offsets append, while + // offset 0 replaces the list after a fresh search. + return (currentOffset ?? 0) > 0 && searchResults.length > 0 + ? [...previousResults, ...searchResults] + : searchResults; + }); + }, [currentOffset, isMobile, searchLoading, searchResults]); const handleDistanceClick = ( distance: number, @@ -1899,15 +1945,36 @@ const LocatorInternal = ({ /> -
- {resultCount > 0 && ( - - )} -
- {resultCount > RESULTS_LIMIT && ( + {resultCount > 0 && ( +
+ {isMobile ? ( + { + if (searchLoading || mobileResults.length >= resultCount) { + return; + } + + searchActions.setOffset(mobileResults.length); + executeSearch(searchActions); + setSearchState("loading"); + }} + /> + ) : ( + + )} +
+ )} + {!isMobile && resultCount > RESULTS_LIMIT && (
>; + results: Result[]; + hasMoreResults: boolean; + handleShowMoreResults: () => void; +} + +const MobileLocatorResultsSection = ({ + CardComponent, + results, + hasMoreResults, + handleShowMoreResults, +}: MobileLocatorResultsSectionProps) => { + const { t } = useTranslation(); + + return ( + <> + {results.length > 0 && ( +
+ {results.map((result, position) => ( +
+ +
+ ))} +
+ )} + {hasMoreResults && ( + // Mobile replaces numbered pagination with incremental loading. +
+ +
+ )} + + ); +}; + interface ResultsCountSummaryProps { searchState: SearchState; resultCount: number; diff --git a/packages/visual-editor/src/components/contentBlocks/Emails.tsx b/packages/visual-editor/src/components/contentBlocks/Emails.tsx index 22998496d7..53dc015d69 100644 --- a/packages/visual-editor/src/components/contentBlocks/Emails.tsx +++ b/packages/visual-editor/src/components/contentBlocks/Emails.tsx @@ -120,11 +120,11 @@ const EmailsComponent: PuckComponent = (props) => { >
    {filteredEmailList.map((email, index) => ( -
  • +
  • {showEmailIcon && ( @@ -138,6 +138,7 @@ const EmailsComponent: PuckComponent = (props) => { variant="link" color={styles?.color} alwaysHideCaret={true} + className="min-w-0 w-full justify-start whitespace-normal break-all text-left" />
  • ))} diff --git a/packages/visual-editor/src/components/contentBlocks/MapboxStaticMap.tsx b/packages/visual-editor/src/components/contentBlocks/MapboxStaticMap.tsx index e075ff5ddd..c6a3d54af4 100644 --- a/packages/visual-editor/src/components/contentBlocks/MapboxStaticMap.tsx +++ b/packages/visual-editor/src/components/contentBlocks/MapboxStaticMap.tsx @@ -16,7 +16,6 @@ import { getThemeValue } from "../../utils/getThemeValue.ts"; import { YextComponentConfig, YextFields } from "../../fields/fields.ts"; export type MapboxStaticProps = { - apiKey: string; coordinate: YextEntityField; mapStyle: string; height?: string; @@ -48,10 +47,6 @@ export const mapStyleField: BasicSelectorField = { }; const mapboxFields: YextFields = { - apiKey: { - label: msg("fields.apiKey", "API Key"), - type: "text", - }, coordinate: { type: "entityField", label: msg("fields.coordinates", "Coordinates"), @@ -69,7 +64,6 @@ const getPrimaryColor = (streamDocument: StreamDocument) => { }; export const MapboxStaticMapComponent: PuckComponent = ({ - apiKey, coordinate: coordinateField, height = "300px", zoom = 14, @@ -85,8 +79,21 @@ export const MapboxStaticMapComponent: PuckComponent = ({ streamDocument ); + // If we are in the layout editor, use the non-URL-restricted Mapbox API key + const iframe = + typeof document === "undefined" + ? undefined + : (document.getElementById("preview-frame") as HTMLIFrameElement); + let mapboxApiKey = streamDocument._env?.YEXT_MAPBOX_API_KEY; + if ( + iframe?.contentDocument && + streamDocument._env?.YEXT_EDIT_LAYOUT_MODE_MAPBOX_API_KEY + ) { + mapboxApiKey = streamDocument._env.YEXT_EDIT_LAYOUT_MODE_MAPBOX_API_KEY; + } + // Show empty state in editor mode when API key is missing - if (!apiKey) { + if (!mapboxApiKey) { if (puck?.isEditing) { return (
    = ({ {pt( - "staticMapEmptyStateAddApiKey", - "Add an API key to preview your map" + "staticMapEmptyStateMissingApiKey", + "Failed to load YEXT_MAPBOX_API_KEY. Please check your site's advanced configuration." )}
); } - console.warn("API Key is required for MapboxStaticMap"); + console.warn("YEXT_MAPBOX_API_KEY is required for MapboxStaticMap"); return <>; } @@ -133,7 +140,7 @@ export const MapboxStaticMapComponent: PuckComponent = ({ type StaticImageSize = keyof typeof staticImageSizes; const getMapboxStaticImageUrl = (size: StaticImageSize) => { - return `https://api.mapbox.com/styles/v1/mapbox/${mapStyle}/static/${marker}/${coordinate.longitude},${coordinate.latitude},${zoom}/${staticImageSizes[size]}?access_token=${apiKey}&logo=false&attribution=false`; + return `https://api.mapbox.com/styles/v1/mapbox/${mapStyle}/static/${marker}/${coordinate.longitude},${coordinate.latitude},${zoom}/${staticImageSizes[size]}?access_token=${mapboxApiKey}&logo=false&attribution=false`; }; return ( @@ -188,7 +195,6 @@ export const MapboxStaticMap: YextComponentConfig = { label: msg("components.mapboxStaticMap", "Mapbox Static Map"), fields: mapboxFields, defaultProps: { - apiKey: "", coordinate: { field: "yextDisplayCoordinate", constantValue: { diff --git a/packages/visual-editor/src/components/header/HeaderLinks.tsx b/packages/visual-editor/src/components/header/HeaderLinks.tsx index 23300f6906..71d462a63f 100644 --- a/packages/visual-editor/src/components/header/HeaderLinks.tsx +++ b/packages/visual-editor/src/components/header/HeaderLinks.tsx @@ -9,13 +9,13 @@ import { TranslatableCTA } from "../../types/types.ts"; import { useDocument } from "../../hooks/useDocument.tsx"; import { useOverflow } from "../../hooks/useOverflow.ts"; import { usePreviewWindow } from "../../hooks/usePreviewWindow.ts"; +import { getViewport, useWindowWidth } from "../../hooks/useViewport.ts"; import { YextAutoField } from "../../fields/YextAutoField.tsx"; import { linkTypeOptions } from "../../internal/puck/constant-value-fields/CallToAction.tsx"; import { useExpandedHeaderMenu, useHeaderLinksDisplayMode, } from "./ExpandedHeaderMenuContext.tsx"; -import { getHeaderViewport } from "./viewport.ts"; import { ThemeColor, ThemeOptions } from "../../utils/themeConfigOptions.ts"; import { BodyProps } from "../atoms/body.tsx"; import { isNonNormalizableLinkType } from "../../utils/normalizeLink.ts"; @@ -182,20 +182,6 @@ const headerLinksFields: YextFields = { }, }; -const useWindowWidth = (externalWindow?: Window | null) => { - const [width, setWidth] = React.useState(externalWindow?.innerWidth ?? 1024); - - React.useLayoutEffect(() => { - const win = externalWindow || window; - const handleResize = () => setWidth(win.innerWidth); - handleResize(); - win.addEventListener("resize", handleResize); - return () => win.removeEventListener("resize", handleResize); - }, [externalWindow]); - - return width; -}; - const HeaderLinksComponent: PuckComponent = ({ data, styles, @@ -212,7 +198,7 @@ const HeaderLinksComponent: PuckComponent = ({ const menuContext = useExpandedHeaderMenu(); const windowWidth = useWindowWidth(previewWindow); - const { isMobile, isDesktop } = getHeaderViewport(windowWidth); + const { isMobile, isDesktop } = getViewport(windowWidth); const isOverflow = useOverflow(navRef, measureContainerRef, 0); const type = parentData?.type || "Primary"; diff --git a/packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx b/packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx index 028a36da79..2ab76ac72b 100644 --- a/packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx +++ b/packages/visual-editor/src/components/header/PrimaryHeaderSlot.tsx @@ -16,6 +16,7 @@ import { PageSection, PageSectionProps } from "../atoms/pageSection.tsx"; import { resolveComponentData } from "../../utils/resolveComponentData.tsx"; import { useOverflow } from "../../hooks/useOverflow.ts"; import { usePreviewWindow } from "../../hooks/usePreviewWindow.ts"; +import { getViewport } from "../../hooks/useViewport.ts"; import * as React from "react"; import { useTranslation } from "react-i18next"; import { FaBars, FaTimes } from "react-icons/fa"; @@ -24,7 +25,6 @@ import { HeaderLinksDisplayModeProvider, useExpandedHeaderMenu, } from "./ExpandedHeaderMenuContext.tsx"; -import { getHeaderViewport } from "./viewport.ts"; import { SlidePanel } from "./SlidePanel.tsx"; import { type YextCTAField } from "../../fields/CTASelectorField.tsx"; import { YextComponentConfig, YextFields } from "../../fields/fields.ts"; @@ -142,7 +142,7 @@ const PrimaryHeaderSlotWrapper: PuckComponent = ({ const showCTAs = puck.isEditing || conditionalRender?.CTAs; const showNavContent = puck.isEditing || conditionalRender?.navContent; - const { isTablet, isDesktop } = getHeaderViewport(layout.viewportWidth); + const { isTablet, isDesktop } = getViewport(layout.viewportWidth); const primaryOverflow = useOverflow( containerRef, diff --git a/packages/visual-editor/src/components/header/viewport.ts b/packages/visual-editor/src/components/header/viewport.ts deleted file mode 100644 index 11814aeda2..0000000000 --- a/packages/visual-editor/src/components/header/viewport.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const HEADER_BREAKPOINTS = { - md: 768, - lg: 1024, -} as const; - -export const getHeaderViewport = (width: number) => { - const isMobile = width < HEADER_BREAKPOINTS.md; - const isDesktop = width >= HEADER_BREAKPOINTS.lg; - const isTablet = !isMobile && !isDesktop; - - return { - isMobile, - isTablet, - isDesktop, - }; -}; diff --git a/packages/visual-editor/src/components/migrations/0078_remove_mapbox_api_key_props.ts b/packages/visual-editor/src/components/migrations/0078_remove_mapbox_api_key_props.ts new file mode 100644 index 0000000000..417b8be752 --- /dev/null +++ b/packages/visual-editor/src/components/migrations/0078_remove_mapbox_api_key_props.ts @@ -0,0 +1,31 @@ +import { Migration } from "../../utils/migrate.ts"; + +type MigrationProps = { id: string } & Record; + +/** + * Removes legacy Mapbox API key props that are now sourced from environment config. + * + * 1. Drops the old `apiKey` prop from `MapboxStaticMap`. + * 2. Drops the old `data` wrapper from `StaticMapSection`. + */ +const removeLegacyProp = + (propName: "apiKey" | "data") => + (props: MigrationProps): MigrationProps => { + if (!(propName in props)) { + return props; + } + + const { [propName]: _removedProp, ...updatedProps } = props; + return updatedProps; + }; + +export const removeMapboxApiKeyPropsMigration: Migration = { + MapboxStaticMap: { + action: "updated", + propTransformation: removeLegacyProp("apiKey"), + }, + StaticMapSection: { + action: "updated", + propTransformation: removeLegacyProp("data"), + }, +}; diff --git a/packages/visual-editor/src/components/migrations/migrationRegistry.ts b/packages/visual-editor/src/components/migrations/migrationRegistry.ts index 0e1821f3c3..7850aec228 100644 --- a/packages/visual-editor/src/components/migrations/migrationRegistry.ts +++ b/packages/visual-editor/src/components/migrations/migrationRegistry.ts @@ -76,6 +76,7 @@ import { flattenLocatorResultCardSingleSelectFields } from "./0074_flatten_locat import { normalizeFooterLogoImageMigration } from "./0075_normalize_footer_logo_image.ts"; import { slotMappedCardsMigration } from "./0076_slot_mapped_cards.ts"; import { directoryCardTitleField } from "./0077_directory_card_title_field.ts"; +import { removeMapboxApiKeyPropsMigration } from "./0078_remove_mapbox_api_key_props.ts"; // To add a migration: // Create a new file in this directory that exports a Migration @@ -160,4 +161,5 @@ export const migrationRegistry: MigrationRegistry = [ normalizeFooterLogoImageMigration, slotMappedCardsMigration, directoryCardTitleField, + removeMapboxApiKeyPropsMigration, ]; diff --git a/packages/visual-editor/src/components/pageSections/ProfessionalHeroSection.tsx b/packages/visual-editor/src/components/pageSections/ProfessionalHeroSection.tsx index af49aa58e3..377fdc8fce 100644 --- a/packages/visual-editor/src/components/pageSections/ProfessionalHeroSection.tsx +++ b/packages/visual-editor/src/components/pageSections/ProfessionalHeroSection.tsx @@ -72,6 +72,18 @@ export interface ProfessionalHeroStyles { */ showSubtitle?: boolean; + /** + * The horizontal alignment of the subtitle slot on mobile. + * @defaultValue center + */ + subtitleMobileAlignment: "left" | "center" | "right"; + + /** + * The horizontal alignment of the subtitle slot on desktop. + * @defaultValue left + */ + subtitleDesktopAlignment: "left" | "center" | "right"; + /** * Whether to show the business name slot. * @defaultValue true @@ -164,6 +176,18 @@ const ProfessionalHero: PuckComponent = ( const showImage = styles.showImage ?? true; const desktopImageRight = styles.desktopImagePosition === "right"; const mobileImageTop = styles.mobileImagePosition === "top"; + const subtitleMobileAlignment = styles.subtitleMobileAlignment ?? "center"; + const subtitleDesktopAlignment = styles.subtitleDesktopAlignment ?? "left"; + const subtitleMobileAlignmentClass = { + left: "text-left", + center: "text-center", + right: "text-right", + }[subtitleMobileAlignment]; + const subtitleDesktopAlignmentClass = { + left: "lg:text-left", + center: "lg:text-center", + right: "lg:text-right", + }[subtitleDesktopAlignment]; const containerClasses = themeManagerCn( "flex gap-8 lg:gap-16", @@ -223,7 +247,13 @@ const ProfessionalHero: PuckComponent = ( )} {styles.showSubtitle && ( -
+
)} @@ -339,6 +369,22 @@ const professionalHeroSectionFields: YextFields = type: "radio", options: ThemeOptions.SHOW_HIDE, }, + subtitleMobileAlignment: { + label: msg( + "fields.subtitleAlignmentMobile", + "Subtitle Alignment in Mobile" + ), + type: "radio", + options: ThemeOptions.ALIGNMENT, + }, + subtitleDesktopAlignment: { + label: msg( + "fields.subtitleAlignmentDesktop", + "Subtitle Alignment in Desktop" + ), + type: "radio", + options: ThemeOptions.ALIGNMENT, + }, showAverageReview: { label: msg("fields.showAverageReview", "Show Average Review"), type: "radio", @@ -431,6 +477,8 @@ export const ProfessionalHeroSection: YextComponentConfig { } } ); + + it("migrates version 77 by removing the legacy data prop", async () => { + const data = migrate( + { + root: { + props: { + version: 77, + }, + }, + content: [ + { + type: "StaticMapSection", + props: { + id: "static-map-section", + liveVisibility: true, + data: { + apiKey: "fixture-static-map-api-key", + }, + styles: { + backgroundColor: { + selectedColor: "white", + contrastingColor: "black", + }, + mapStyle: "streets-v12", + }, + }, + }, + ], + }, + migrationRegistry, + puckConfig, + { + _env: { YEXT_MAPBOX_API_KEY: "fixture-static-map-api-key" }, + yextDisplayCoordinate: { + latitude: 38.895546, + longitude: -77.069915, + }, + } + ); + + expect(data.content[0]).toEqual({ + type: "StaticMapSection", + props: { + id: "static-map-section", + liveVisibility: true, + styles: { + backgroundColor: { + selectedColor: "white", + contrastingColor: "black", + }, + mapStyle: "streets-v12", + }, + }, + }); + }); }); diff --git a/packages/visual-editor/src/components/pageSections/StaticMapSection.tsx b/packages/visual-editor/src/components/pageSections/StaticMapSection.tsx index 1fc52e6484..fc15bb98b3 100644 --- a/packages/visual-editor/src/components/pageSections/StaticMapSection.tsx +++ b/packages/visual-editor/src/components/pageSections/StaticMapSection.tsx @@ -12,14 +12,6 @@ import { import { PuckComponent } from "@puckeditor/core"; import { YextComponentConfig, YextFields } from "../../fields/fields.ts"; -export interface StaticMapData { - /** - * The API key used to generate the map image. - * @defaultValue "" - */ - apiKey: string; -} - export interface StaticMapStyles { /** * The background color of the section. @@ -35,12 +27,6 @@ export interface StaticMapStyles { } export interface StaticMapSectionProps { - /** - * This object contains the configuration needed to generate the map. - * @propCategory Data Props - */ - data: StaticMapData; - /** * If 'true', the component is visible on the live page; if 'false', it's hidden. * @defaultValue true @@ -55,16 +41,6 @@ export interface StaticMapSectionProps { } const staticMapSectionFields: YextFields = { - data: { - type: "object", - label: msg("fields.data", "Data"), - objectFields: { - apiKey: { - label: msg("fields.apiKey", "API Key"), - type: "text", - }, - }, - }, liveVisibility: { label: msg("fields.visibleOnLivePage", "Visible on Live Page"), type: "radio", @@ -88,7 +64,6 @@ const staticMapSectionFields: YextFields = { }; const StaticMapSectionWrapper: PuckComponent = ({ - data, styles, puck, id, @@ -99,7 +74,6 @@ const StaticMapSectionWrapper: PuckComponent = ({ className={`flex items-center`} > = ({ }; /** - * The Static Map Section displays a non-interactive map image of a business's location. It uses the entity's address or coordinates to generate the map and requires a valid API key from mapbox. + * The Static Map Section displays a non-interactive map image of a business's location. + * It uses the entity's address or coordinates to generate the map. + * * Available on Location templates. */ export const StaticMapSection: YextComponentConfig = { label: msg("components.staticMapSection", "Static Map Section"), fields: staticMapSectionFields, defaultProps: { - data: { - apiKey: "", - }, liveVisibility: true, styles: { backgroundColor: backgroundColors.background1.value, diff --git a/packages/visual-editor/src/components/testing/screenshots/PhotoGallerySection/[desktop] version 59 with showSectionHeading false.png b/packages/visual-editor/src/components/testing/screenshots/PhotoGallerySection/[desktop] version 59 with showSectionHeading false.png index b9bf47805f..78479fbdf2 100644 Binary files a/packages/visual-editor/src/components/testing/screenshots/PhotoGallerySection/[desktop] version 59 with showSectionHeading false.png and b/packages/visual-editor/src/components/testing/screenshots/PhotoGallerySection/[desktop] version 59 with showSectionHeading false.png differ diff --git a/packages/visual-editor/src/docs/components.md b/packages/visual-editor/src/docs/components.md index 9f8a733216..a5492447d1 100644 --- a/packages/visual-editor/src/docs/components.md +++ b/packages/visual-editor/src/docs/components.md @@ -684,23 +684,25 @@ If 'true', the component is visible on the live page; if 'false', it's hidden. This object contains properties for customizing the component's appearance. -| Prop | Type | Description | Default | -| :----------------------------- | :------------------ | :----------------------------------------------------------------------- | :------------------- | -| `styles.backgroundColor` | `ThemeColor` | The background color for the section. | `Background Color 1` | -| `styles.desktopImagePosition` | `"left" \| "right"` | Positions the image to the left or right of the hero content on desktop. | `left` | -| `styles.mobileImagePosition` | `"bottom" \| "top"` | Positions the image to the top or bottom of the hero content on mobile. | `top` | -| `styles.reviewStarsColor` | `ThemeColor` | The color applied to review stars when average review is shown. | | -| `styles.showAddress` | `boolean` | Whether to show the address slot. | `true` | -| `styles.showAverageReview` | `boolean` | If 'true', displays the entity's average review rating. | `true` | -| `styles.showBusinessName` | `boolean` | Whether to show the business name slot. | `true` | -| `styles.showCredentials` | `boolean` | Whether to show the credentials slot. | `true` | -| `styles.showEmail` | `boolean` | Whether to show the email slot. | `true` | -| `styles.showImage` | `boolean` | Whether to show the hero image. | `true` | -| `styles.showPhone` | `boolean` | Whether to show the phone slot. | `true` | -| `styles.showPrimaryCTA` | `boolean` | Whether to show the primary CTA slot. | `true` | -| `styles.showProfessionalTitle` | `boolean` | Whether to show the professional title slot. | `true` | -| `styles.showSecondaryCTA` | `boolean` | Whether to show the secondary CTA slot. | `true` | -| `styles.showSubtitle` | `boolean` | Whether to show the subtitle slot. | `true` | +| Prop | Type | Description | Default | +| :-------------------------------- | :------------------------------ | :----------------------------------------------------------------------- | :------------------- | +| `styles.backgroundColor` | `ThemeColor` | The background color for the section. | `Background Color 1` | +| `styles.desktopImagePosition` | `"left" \| "right"` | Positions the image to the left or right of the hero content on desktop. | `left` | +| `styles.mobileImagePosition` | `"bottom" \| "top"` | Positions the image to the top or bottom of the hero content on mobile. | `top` | +| `styles.reviewStarsColor` | `ThemeColor` | The color applied to review stars when average review is shown. | | +| `styles.showAddress` | `boolean` | Whether to show the address slot. | `true` | +| `styles.showAverageReview` | `boolean` | If 'true', displays the entity's average review rating. | `true` | +| `styles.showBusinessName` | `boolean` | Whether to show the business name slot. | `true` | +| `styles.showCredentials` | `boolean` | Whether to show the credentials slot. | `true` | +| `styles.showEmail` | `boolean` | Whether to show the email slot. | `true` | +| `styles.showImage` | `boolean` | Whether to show the hero image. | `true` | +| `styles.showPhone` | `boolean` | Whether to show the phone slot. | `true` | +| `styles.showPrimaryCTA` | `boolean` | Whether to show the primary CTA slot. | `true` | +| `styles.showProfessionalTitle` | `boolean` | Whether to show the professional title slot. | `true` | +| `styles.showSecondaryCTA` | `boolean` | Whether to show the secondary CTA slot. | `true` | +| `styles.showSubtitle` | `boolean` | Whether to show the subtitle slot. | `true` | +| `styles.subtitleDesktopAlignment` | `"left" \| "center" \| "right"` | The horizontal alignment of the subtitle slot on desktop. | `left` | +| `styles.subtitleMobileAlignment` | `"left" \| "center" \| "right"` | The horizontal alignment of the subtitle slot on mobile. | `center` | #### Other Props @@ -801,20 +803,14 @@ Styling configuration for the secondary footer. ## StaticMapSection -The Static Map Section displays a non-interactive map image of a business's location. It uses the entity's address or coordinates to generate the map and requires a valid API key from mapbox. Available on Location templates. +The Static Map Section displays a non-interactive map image of a business's location. It uses the entity's address or coordinates to generate the map. + +Available on Location templates. ![Preview of the StaticMapSection component](../components/testing/screenshots/StaticMapSection/%5Bdesktop%5D%20default%20props%20with%20coordinate%20-%20with%20api%20key.png) ### Props -#### Data Props - -This object contains the configuration needed to generate the map. - -| Prop | Type | Description | Default | -| :----- | :-------------- | :----------------------------------------------------------------- | :------ | -| `data` | `StaticMapData` | This object contains the configuration needed to generate the map. | | - #### Styles Props This object contains properties for customizing the component's appearance. diff --git a/packages/visual-editor/src/editor/yextEntityFieldUtils.test.ts b/packages/visual-editor/src/editor/yextEntityFieldUtils.test.ts index c17822179f..5699749e05 100644 --- a/packages/visual-editor/src/editor/yextEntityFieldUtils.test.ts +++ b/packages/visual-editor/src/editor/yextEntityFieldUtils.test.ts @@ -50,6 +50,96 @@ describe("getFieldsForSelector", () => { ); }); + it("allows string descendants to satisfy rich text item source requirements", () => { + const fields = getFieldsForSelector( + { + fields: [ + { + name: "c_articles", + definition: { + name: "c_articles", + typeName: "c_articles", + isList: true, + type: {}, + }, + children: { + fields: [ + { + name: "title", + definition: { + name: "title", + typeName: "type.string", + type: {}, + }, + }, + ], + }, + }, + ], + displayNames: { + c_articles: "Articles", + "c_articles.title": "Articles > Title", + }, + }, + { + itemSourceTypes: [["type.rich_text_v2"]], + } + ); + + expect(fields).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + name: "c_articles", + }), + ]) + ); + }); + + it("applies rich text compatibility to mapped source descendant checks", () => { + const fields = getFieldsForSelector( + { + fields: [ + { + name: "c_articles", + definition: { + name: "c_articles", + typeName: "c_articles", + isList: true, + type: {}, + }, + children: { + fields: [ + { + name: "title", + definition: { + name: "title", + typeName: "type.string", + type: {}, + }, + }, + ], + }, + }, + ], + displayNames: { + c_articles: "Articles", + "c_articles.title": "Articles > Title", + }, + }, + { + mappedSourceTypes: [["type.rich_text_v2"]], + } + ); + + expect(fields).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + name: "c_articles", + }), + ]) + ); + }); + it("merges duplicate scoped fields when one has a display name and another has nested children", () => { const fields = getFieldsForSelector( { diff --git a/packages/visual-editor/src/editor/yextEntityFieldUtils.ts b/packages/visual-editor/src/editor/yextEntityFieldUtils.ts index 0a0a89f0b9..35cadf934c 100644 --- a/packages/visual-editor/src/editor/yextEntityFieldUtils.ts +++ b/packages/visual-editor/src/editor/yextEntityFieldUtils.ts @@ -1,5 +1,6 @@ import { getFilteredEntityFields, + getCompatibleEntityFieldTypes, RenderEntityFieldFilter, } from "../internal/utils/getFilteredEntityFields.ts"; import { StreamFields, YextSchemaField } from "../types/entityFields.ts"; @@ -353,7 +354,7 @@ export const getFieldsForSelector = ( { fields: [availableField] }, { allowList: [availableField.name], - types: requiredTypes, + types: requiredTypes.flatMap(getCompatibleEntityFieldTypes), } ).length > 0 ) diff --git a/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx b/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx index baf8fb8c70..0d2086e8b9 100644 --- a/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx +++ b/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx @@ -393,6 +393,46 @@ describe("EntityFieldSelectorField", () => { expect(screen.getByText("Linked Location > Name")).toBeDefined(); }); + it("shows string fields for rich text selectors", () => { + renderEntityField({ + field: { + type: "entityField", + label: "Body", + filter: { + types: ["type.rich_text_v2"], + }, + }, + value: { + field: "", + constantValue: { defaultValue: { html: "" } }, + constantValueEnabled: false, + }, + entityFields: { + ...defaultEntityFields, + fields: [ + ...defaultEntityFields.fields, + { + name: "longDescription", + definition: { + name: "longDescription", + typeName: "type.rich_text_v2", + type: {}, + }, + }, + ], + displayNames: { + ...defaultEntityFields.displayNames, + longDescription: "Long Description", + }, + }, + }); + + fireEvent.click(screen.getAllByRole("combobox")[0]); + + expect(screen.getByText("Description")).toBeDefined(); + expect(screen.getByText("Long Description")).toBeDefined(); + }); + it("does not show linked entity fields for list-only selectors", () => { renderEntityField({ field: { diff --git a/packages/visual-editor/src/hooks/useViewport.ts b/packages/visual-editor/src/hooks/useViewport.ts new file mode 100644 index 0000000000..b379f68aef --- /dev/null +++ b/packages/visual-editor/src/hooks/useViewport.ts @@ -0,0 +1,35 @@ +import * as React from "react"; + +export const VIEWPORT_BREAKPOINTS = { + md: 768, + lg: 1024, +} as const; + +export const getViewport = (width: number) => { + const isMobile = width < VIEWPORT_BREAKPOINTS.md; + const isDesktop = width >= VIEWPORT_BREAKPOINTS.lg; + const isTablet = !isMobile && !isDesktop; + + return { + isMobile, + isTablet, + isDesktop, + }; +}; + +export const useWindowWidth = (externalWindow?: Window | null) => { + const [width, setWidth] = React.useState(externalWindow?.innerWidth ?? 1024); + + React.useLayoutEffect(() => { + const targetWindow = externalWindow || window; + const handleResize = () => setWidth(targetWindow.innerWidth); + handleResize(); + targetWindow.addEventListener("resize", handleResize); + + return () => { + targetWindow.removeEventListener("resize", handleResize); + }; + }, [externalWindow]); + + return width; +}; diff --git a/packages/visual-editor/src/internal/utils/getFilteredEntityFields.test.ts b/packages/visual-editor/src/internal/utils/getFilteredEntityFields.test.ts index e416e47b5c..2151410953 100644 --- a/packages/visual-editor/src/internal/utils/getFilteredEntityFields.test.ts +++ b/packages/visual-editor/src/internal/utils/getFilteredEntityFields.test.ts @@ -64,6 +64,20 @@ describe("getFilteredEntityFields", () => { ); }); + test("treats string fields as compatible with rich text filters", () => { + const result = getFilteredEntityFields(mockStreamFields, { + types: ["type.rich_text_v2"], + }); + + expect(result.map((field) => field.name)).toEqual( + expect.arrayContaining([ + "c_deliveryPromo.description", + "name", + "additionalHoursText", + ]) + ); + }); + test("handles nested fields correctly", () => { const result = getFilteredEntityFields(mockStreamFields, { allowList: ["address"], diff --git a/packages/visual-editor/src/internal/utils/getFilteredEntityFields.ts b/packages/visual-editor/src/internal/utils/getFilteredEntityFields.ts index 0fcfa33800..d5bccecf4e 100644 --- a/packages/visual-editor/src/internal/utils/getFilteredEntityFields.ts +++ b/packages/visual-editor/src/internal/utils/getFilteredEntityFields.ts @@ -61,6 +61,11 @@ export type EntityFieldTypes = export type ConstantValueTypes = EntityFieldTypes | "imageOrVideo"; const DEFAULT_DISALLOWED_ENTITY_FIELDS = ["uid", "meta", "slug"]; +const ENTITY_FIELD_TYPE_COMPATIBILITY: Partial< + Record +> = { + "type.rich_text_v2": ["type.string"], +}; // Populate this with fields that aren't allowed to have subfields. const TOP_LEVEL_ONLY_FIELD_TYPES: string[] = ["type.hours"]; @@ -156,6 +161,19 @@ const getEntityTypeToFieldNames = ( }, new Map()); }; +/** + * Returns the set of acceptable schema types for one requested selector type, + * including one-way compatibility used by rich-text pickers. + */ +export const getCompatibleEntityFieldTypes = ( + entityFieldType: EntityFieldTypes +): EntityFieldTypes[] => { + return [ + entityFieldType, + ...(ENTITY_FIELD_TYPE_COMPATIBILITY[entityFieldType] ?? []), + ]; +}; + export const getFilteredEntityFields = >( streamFields: StreamFields | null, filter: RenderEntityFieldFilter @@ -228,9 +246,11 @@ export const getFilteredEntityFields = >( const updatedFilteredEntitySubFields: YextSchemaField[] = []; filter.types.forEach((type) => { updatedFilteredEntitySubFields.push( - ...filteredEntitySubFields.filter((field) => { - return typeToFieldNames.get(type)?.includes(field.name); - }) + ...getCompatibleEntityFieldTypes(type).flatMap((compatibleType) => + filteredEntitySubFields.filter((field) => + typeToFieldNames.get(compatibleType)?.includes(field.name) + ) + ) ); }); filteredEntitySubFields = updatedFilteredEntitySubFields; diff --git a/packages/visual-editor/src/utils/migrate.test.ts b/packages/visual-editor/src/utils/migrate.test.ts index 5e3174de4a..f27dc5bf15 100644 --- a/packages/visual-editor/src/utils/migrate.test.ts +++ b/packages/visual-editor/src/utils/migrate.test.ts @@ -6,6 +6,7 @@ import { themeColorPropertyKeyMigration } from "../components/migrations/0071_th import { mainContentWrapperMigration } from "../components/migrations/0073_main_content_wrapper.ts"; import { normalizeFooterLogoImageMigration } from "../components/migrations/0075_normalize_footer_logo_image.ts"; import { slotMappedCardsMigration } from "../components/migrations/0076_slot_mapped_cards.ts"; +import { removeMapboxApiKeyPropsMigration } from "../components/migrations/0078_remove_mapbox_api_key_props.ts"; describe("migrate", () => { it("successfully applies a migration", async () => { @@ -113,6 +114,97 @@ describe("migrate", () => { }); }); + it("removes Mapbox API key props that now come from environment config", async () => { + const migratedData = migrate( + { + root: { + props: { + version: 0, + }, + }, + content: [ + { + type: "MapboxStaticMap", + props: { + id: "mapbox-static-map", + apiKey: "fixture-mapbox-api-key", + coordinate: { + field: "yextDisplayCoordinate", + constantValue: { + latitude: 38.895546, + longitude: -77.069915, + }, + }, + mapStyle: "streets-v12", + }, + }, + { + type: "StaticMapSection", + props: { + id: "static-map-section", + liveVisibility: true, + data: { + apiKey: "fixture-mapbox-api-key", + }, + styles: { + backgroundColor: { + selectedColor: "white", + contrastingColor: "black", + }, + mapStyle: "streets-v12", + }, + }, + }, + ], + zones: {}, + }, + [removeMapboxApiKeyPropsMigration], + { + components: {}, + }, + {} + ); + + expect(migratedData).toEqual({ + root: { + props: { + version: 1, + }, + }, + content: [ + { + type: "MapboxStaticMap", + props: { + id: "mapbox-static-map", + coordinate: { + field: "yextDisplayCoordinate", + constantValue: { + latitude: 38.895546, + longitude: -77.069915, + }, + }, + mapStyle: "streets-v12", + }, + }, + { + type: "StaticMapSection", + props: { + id: "static-map-section", + liveVisibility: true, + styles: { + backgroundColor: { + selectedColor: "white", + contrastingColor: "black", + }, + mapStyle: "streets-v12", + }, + }, + }, + ], + zones: {}, + }); + }); + it("wraps all top-level body components in MainContent when there is no page chrome", async () => { const migratedData = migrate( { diff --git a/starter/localData/dev-location-stream__en__cbafb9cd1c3e63d9814e236ba9181377.json b/starter/localData/dev-location-stream__en__cbafb9cd1c3e63d9814e236ba9181377.json index 26a45655b7..61de5b31a0 100644 --- a/starter/localData/dev-location-stream__en__cbafb9cd1c3e63d9814e236ba9181377.json +++ b/starter/localData/dev-location-stream__en__cbafb9cd1c3e63d9814e236ba9181377.json @@ -4,6 +4,16 @@ "name": "dev-location", "isPrimaryLocale": true }, + "_env": { + "YEXT_CLOUD_CHOICE": "GLOBAL-MULTI", + "YEXT_CLOUD_REGION": "US", + "YEXT_ENVIRONMENT": "DEV", + "YEXT_EDIT_LAYOUT_MODE_MAPBOX_API_KEY": "REPLACE ME WITH KEY FROM ENV VARS", + "YEXT_MAPBOX_API_KEY": "REPLACE ME WITH KEY FROM ENV VARS", + "YEXT_PUBLIC_EVENTS_API_KEY": "REPLACE ME WITH KEY FROM ENV VARS", + "YEXT_PUBLIC_VISUAL_EDITOR_APP_API_KEY": "REPLACE ME WITH KEY FROM ENV VARS", + "YEXT_SEARCH_API_KEY": "REPLACE ME WITH KEY FROM ENV VARS" + }, "_pageset": "{\"config\":{\"urlTemplate\":{\"primary\":\"[[address.region]]/[[address.city]]/[[address.line1]]\"}}}", "_favicon": "https://www.yext.com/favicon.ico", "dm_directoryParents_63590_locations": [