diff --git a/packages/visual-editor/locales/platform/cs/visual-editor.json b/packages/visual-editor/locales/platform/cs/visual-editor.json index 305fe25a67..31dcb9b50b 100644 --- a/packages/visual-editor/locales/platform/cs/visual-editor.json +++ b/packages/visual-editor/locales/platform/cs/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Barva odkazu", "linkedInLink": "LinkedIn Link", "linkLabel": "Štítek odkazu", + "linkPath": "Cesta odkazu", "links": "Odkazy", "linksTooltip": "Pokud je výřez příliš úzký, odkazy se automaticky sbalí", "linkTarget": "Cíl odkazu", @@ -426,6 +427,7 @@ "width": "Šířka", "yes": "Ano" }, + "overrideLink": "Přepište odkaz", "pageHeading": "Záhlaví stránky", "phone": "Telefon", "phoneFormat": "Formát telefonu", @@ -567,6 +569,7 @@ "link": "odkaz", "linkedEntityFields": "Pole propojených entit", "linkedEntityMultiValueWarning": "{{linkedField}} obsahuje několik propojených entit. Používá se první pro {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Pro odkaz na název každé karty použijte vlastní cestu URL. Pokud je hodnota prázdná, použije se vygenerovaná adresa URL adresáře.", "linkTypes": { "clickToWebsite": "Klikněte na web", "drivingDirections": "Směry jízdy", diff --git a/packages/visual-editor/locales/platform/da/visual-editor.json b/packages/visual-editor/locales/platform/da/visual-editor.json index f6457e36ec..3aa40549a7 100644 --- a/packages/visual-editor/locales/platform/da/visual-editor.json +++ b/packages/visual-editor/locales/platform/da/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link farve", "linkedInLink": "LinkedIn -link", "linkLabel": "Link-etiket", + "linkPath": "Link sti", "links": "Links", "linksTooltip": "Links vil automatisk kollapse, hvis visningsporten er for smal", "linkTarget": "Linkmål", @@ -426,6 +427,7 @@ "width": "Bredde", "yes": "Ja" }, + "overrideLink": "Tilsidesæt link", "pageHeading": "Sideoverskrift", "phone": "Telefon", "phoneFormat": "Telefonformat", @@ -565,6 +567,7 @@ "link": "forbindelse", "linkedEntityFields": "Tilknyttede enhedsfelter", "linkedEntityMultiValueWarning": "{{linkedField}} indeholder flere sammenkædede enheder. Brug af den første til {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Brug en tilpasset URL-sti til hvert korts titellink. Hvis værdien er tom, vil den genererede mappe-URL blive brugt.", "linkTypes": { "clickToWebsite": "Klik på webstedet", "drivingDirections": "Kørselsvejledning", diff --git a/packages/visual-editor/locales/platform/de/visual-editor.json b/packages/visual-editor/locales/platform/de/visual-editor.json index 93af198591..b052d63173 100644 --- a/packages/visual-editor/locales/platform/de/visual-editor.json +++ b/packages/visual-editor/locales/platform/de/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link-Farbe", "linkedInLink": "LinkedIn-Link", "linkLabel": "Link-Label", + "linkPath": "Linkpfad", "links": "Links", "linksTooltip": "Links werden automatisch eingeklappt, wenn das Viewport zu schmal ist", "linkTarget": "Link-Ziel", @@ -426,6 +427,7 @@ "width": "Breite", "yes": "Ja" }, + "overrideLink": "Link überschreiben", "pageHeading": "Seitenüberschrift", "phone": "Telefon", "phoneFormat": "Telefonformat", @@ -565,6 +567,7 @@ "link": "Link", "linkedEntityFields": "Verknüpfte Entitätsfelder", "linkedEntityMultiValueWarning": "{{linkedField}} enthält mehrere verknüpfte Entitäten. Verwenden des ersten für {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Verwenden Sie einen benutzerdefinierten URL-Pfad für den Titellink jeder Karte. Wenn der Wert leer ist, wird die generierte Verzeichnis-URL verwendet.", "linkTypes": { "clickToWebsite": "Klick zur Website", "drivingDirections": "Routenplaner", 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 5252126515..f2921cbb4a 100644 --- a/packages/visual-editor/locales/platform/en-GB/visual-editor.json +++ b/packages/visual-editor/locales/platform/en-GB/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link Color", "linkedInLink": "LinkedIn Link", "linkLabel": "Link Label", + "linkPath": "Link Path", "links": "Links", "linksTooltip": "Links will automatically collapse if the viewport is too narrow", "linkTarget": "Link Target", @@ -426,6 +427,7 @@ "width": "Width", "yes": "Yes" }, + "overrideLink": "Override Link", "pageHeading": "Page Heading", "phone": "Phone", "phoneFormat": "Phone Format", @@ -565,6 +567,7 @@ "link": "link", "linkedEntityFields": "Linked Entity Fields", "linkedEntityMultiValueWarning": "{{linkedField}} contains multiple linked entities. Using the first one for {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Use a custom URL path for each card's title link. If the value is empty, the generated directory URL will be used.", "linkTypes": { "clickToWebsite": "Click to Website", "drivingDirections": "Driving Directions", diff --git a/packages/visual-editor/locales/platform/en/visual-editor.json b/packages/visual-editor/locales/platform/en/visual-editor.json index bc8cafe561..1496bc71f2 100644 --- a/packages/visual-editor/locales/platform/en/visual-editor.json +++ b/packages/visual-editor/locales/platform/en/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link Color", "linkedInLink": "LinkedIn Link", "linkLabel": "Link Label", + "linkPath": "Link Path", "links": "Links", "linksTooltip": "Links will automatically collapse if the viewport is too narrow", "linkTarget": "Link Target", @@ -426,6 +427,7 @@ "width": "Width", "yes": "Yes" }, + "overrideLink": "Override Link", "pageHeading": "Page Heading", "phone": "Phone", "phoneFormat": "Phone Format", @@ -565,6 +567,7 @@ "link": "Link", "linkedEntityFields": "Linked Entity Fields", "linkedEntityMultiValueWarning": "{{linkedField}} contains multiple linked entities. Using the first one for {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Use a custom URL path for each card's title link. If the value is empty, the generated directory URL will be used.", "linkTypes": { "clickToWebsite": "Click to Website", "drivingDirections": "Driving Directions", diff --git a/packages/visual-editor/locales/platform/es/visual-editor.json b/packages/visual-editor/locales/platform/es/visual-editor.json index 84b7705dd5..9692b63d11 100644 --- a/packages/visual-editor/locales/platform/es/visual-editor.json +++ b/packages/visual-editor/locales/platform/es/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Color del enlace", "linkedInLink": "LinkedIn Link", "linkLabel": "Etiqueta de enlace", + "linkPath": "Ruta de enlace", "links": "Campo de golf", "linksTooltip": "Los enlaces se colapsarán automáticamente si la ventana gráfica es demasiado estrecha", "linkTarget": "Destino del enlace", @@ -426,6 +427,7 @@ "width": "Ancho", "yes": "Sí" }, + "overrideLink": "Anular enlace", "pageHeading": "Encabezado de página", "phone": "Teléfono", "phoneFormat": "Formato de teléfono", @@ -566,6 +568,7 @@ "link": "enlace", "linkedEntityFields": "Campos de entidad vinculados", "linkedEntityMultiValueWarning": "{{linkedField}} contiene varias entidades vinculadas. Usando el primero para {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Utilice una ruta URL personalizada para el enlace del título de cada tarjeta. Si el valor está vacío, se utilizará la URL del directorio generado.", "linkTypes": { "clickToWebsite": "Haga clic en el sitio web", "drivingDirections": "Instrucciones de conducción", diff --git a/packages/visual-editor/locales/platform/et/visual-editor.json b/packages/visual-editor/locales/platform/et/visual-editor.json index 3fd7de4541..08353330c7 100644 --- a/packages/visual-editor/locales/platform/et/visual-editor.json +++ b/packages/visual-editor/locales/platform/et/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Lingi värv", "linkedInLink": "LinkedIn Link", "linkLabel": "Lingi silt", + "linkPath": "Lingi tee", "links": "Lingid", "linksTooltip": "Lingid ahenevad automaatselt, kui vaateava on liiga kitsas", "linkTarget": "Lingi sihtmärk", @@ -426,6 +427,7 @@ "width": "Laius", "yes": "Jah" }, + "overrideLink": "Alista link", "pageHeading": "Lehekülje pealkiri", "phone": "Telefon", "phoneFormat": "Telefonivorming", @@ -565,6 +567,7 @@ "link": "link", "linkedEntityFields": "Lingitud olemiväljad", "linkedEntityMultiValueWarning": "{{linkedField}} sisaldab mitut lingitud olemit. Kasutades esimest {{resolvedField}} jaoks.", + "linkOverrideDirectoryTooltip": "Kasutage iga kaardi pealkirja lingi jaoks kohandatud URL-i teed. Kui väärtus on tühi, kasutatakse loodud kataloogi URL-i.", "linkTypes": { "clickToWebsite": "Klõpsake veebisaidil", "drivingDirections": "Juhtimissuunad", diff --git a/packages/visual-editor/locales/platform/fi/visual-editor.json b/packages/visual-editor/locales/platform/fi/visual-editor.json index 72597fc101..48371def9e 100644 --- a/packages/visual-editor/locales/platform/fi/visual-editor.json +++ b/packages/visual-editor/locales/platform/fi/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Linkin väri", "linkedInLink": "LinkedIn -linkki", "linkLabel": "Linkin etiketti", + "linkPath": "Linkkipolku", "links": "Linkit", "linksTooltip": "Linkit kutistuvat automaattisesti, jos näkymä on liian kapea", "linkTarget": "Linkki kohde", @@ -426,6 +427,7 @@ "width": "Leveys", "yes": "Kyllä" }, + "overrideLink": "Ohita linkki", "pageHeading": "Sivun otsikko", "phone": "Puhelin", "phoneFormat": "Puhelinmuoto", @@ -565,6 +567,7 @@ "link": "linkki", "linkedEntityFields": "Linkitetyt entiteettikentät", "linkedEntityMultiValueWarning": "{{linkedField}} sisältää useita linkitettyjä kokonaisuuksia. Ensimmäistä käytetään mallille {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Käytä muokattua URL-osoitepolkua kunkin kortin otsikkolinkille. Jos arvo on tyhjä, käytetään luotua hakemiston URL-osoitetta.", "linkTypes": { "clickToWebsite": "Napsauta verkkosivustoa", "drivingDirections": "Ajo -ohjeet", diff --git a/packages/visual-editor/locales/platform/fr/visual-editor.json b/packages/visual-editor/locales/platform/fr/visual-editor.json index 8a9b2be26e..d476f404ea 100644 --- a/packages/visual-editor/locales/platform/fr/visual-editor.json +++ b/packages/visual-editor/locales/platform/fr/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Couleur du lien", "linkedInLink": "Lien linkedin", "linkLabel": "Libellé du lien", + "linkPath": "Chemin du lien", "links": "Links", "linksTooltip": "Les liens s'effondreront automatiquement si la fenêtre d'affichage est trop étroite", "linkTarget": "Cible du lien", @@ -426,6 +427,7 @@ "width": "Largeur", "yes": "Oui" }, + "overrideLink": "Remplacer le lien", "pageHeading": "En-tête de page", "phone": "Téléphone", "phoneFormat": "Format de téléphone", @@ -566,6 +568,7 @@ "link": "lien", "linkedEntityFields": "Champs d'entité liée", "linkedEntityMultiValueWarning": "{{linkedField}} contient plusieurs entités liées. Utilisation du premier pour {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Utilisez un chemin d'URL personnalisé pour le lien de titre de chaque carte. Si la valeur est vide, l'URL du répertoire généré sera utilisée.", "linkTypes": { "clickToWebsite": "Cliquez sur le site Web", "drivingDirections": "Itinéraires", diff --git a/packages/visual-editor/locales/platform/hr/visual-editor.json b/packages/visual-editor/locales/platform/hr/visual-editor.json index 5209d92b27..68686f2f72 100644 --- a/packages/visual-editor/locales/platform/hr/visual-editor.json +++ b/packages/visual-editor/locales/platform/hr/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Boja veze", "linkedInLink": "LinkedIn veza", "linkLabel": "Oznaka veze", + "linkPath": "Put veze", "links": "Veze", "linksTooltip": "Veze će se automatski skupiti ako je okvir za prikaz preuzak", "linkTarget": "Odredište", @@ -426,6 +427,7 @@ "width": "Širina", "yes": "Da" }, + "overrideLink": "Nadjačaj vezu", "pageHeading": "Naslov stranice", "phone": "Telefon", "phoneFormat": "Format telefona", @@ -566,6 +568,7 @@ "link": "link", "linkedEntityFields": "Polja povezanih entiteta", "linkedEntityMultiValueWarning": "{{linkedField}} sadrži više povezanih entiteta. Korištenje prvog za {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Upotrijebite prilagođeni URL put za naslovnu vezu svake kartice. Ako je vrijednost prazna, koristit će se generirani URL imenika.", "linkTypes": { "clickToWebsite": "Kliknite na web mjesto", "drivingDirections": "Upute za vožnju", diff --git a/packages/visual-editor/locales/platform/hu/visual-editor.json b/packages/visual-editor/locales/platform/hu/visual-editor.json index cf5206292e..eefda08b57 100644 --- a/packages/visual-editor/locales/platform/hu/visual-editor.json +++ b/packages/visual-editor/locales/platform/hu/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link színe", "linkedInLink": "LinkedIn Link", "linkLabel": "Link címke", + "linkPath": "Link útvonal", "links": "Linkek", "linksTooltip": "A hivatkozások automatikusan összecsukódnak, ha a nézetablak túl keskeny", "linkTarget": "cél", @@ -426,6 +427,7 @@ "width": "Szélesség", "yes": "Igen" }, + "overrideLink": "Hivatkozás felülbírálása", "pageHeading": "Oldalfejléc", "phone": "Telefon", "phoneFormat": "Telefonformátum", @@ -565,6 +567,7 @@ "link": "link", "linkedEntityFields": "Kapcsolt entitásmezők", "linkedEntityMultiValueWarning": "A {{linkedField}} több összekapcsolt entitást tartalmaz. Az első használata a következőhöz: {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Használjon egyéni URL-útvonalat minden egyes kártya címlinkjéhez. Ha az érték üres, akkor a generált címtár URL-je kerül felhasználásra.", "linkTypes": { "clickToWebsite": "Kattintson a weboldalra", "drivingDirections": "Vezetési útmutatások", diff --git a/packages/visual-editor/locales/platform/it/visual-editor.json b/packages/visual-editor/locales/platform/it/visual-editor.json index aedb57cf97..c2e8ca4963 100644 --- a/packages/visual-editor/locales/platform/it/visual-editor.json +++ b/packages/visual-editor/locales/platform/it/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Colore collegamento", "linkedInLink": "LinkedIn Link", "linkLabel": "Etichetta di collegamento", + "linkPath": "Percorso di collegamento", "links": "Link", "linksTooltip": "I collegamenti verranno compressi automaticamente se la finestra è troppo stretta", "linkTarget": "Obiettivo del collegamento", @@ -426,6 +427,7 @@ "width": "Larghezza", "yes": "SÌ" }, + "overrideLink": "Sostituisci collegamento", "pageHeading": "Intestazione della pagina", "phone": "Telefono", "phoneFormat": "Formato del telefono", @@ -566,6 +568,7 @@ "link": "collegamento", "linkedEntityFields": "Campi di entità collegate", "linkedEntityMultiValueWarning": "{{linkedField}} contiene più entità collegate. Utilizzando il primo per {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Utilizza un percorso URL personalizzato per il collegamento del titolo di ciascuna scheda. Se il valore è vuoto, verrà utilizzato l'URL della directory generata.", "linkTypes": { "clickToWebsite": "Fai clic sul sito Web", "drivingDirections": "Indicazioni stradali", diff --git a/packages/visual-editor/locales/platform/ja/visual-editor.json b/packages/visual-editor/locales/platform/ja/visual-editor.json index 7ad766df09..1d12ee7891 100644 --- a/packages/visual-editor/locales/platform/ja/visual-editor.json +++ b/packages/visual-editor/locales/platform/ja/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "リンクの色", "linkedInLink": "LinkedInリンク", "linkLabel": "リンクラベル", + "linkPath": "リンクパス", "links": "リンク", "linksTooltip": "ビューポートが狭すぎる場合、リンクは自動的に折りたたまれます", "linkTarget": "リンクターゲット", @@ -426,6 +427,7 @@ "width": "幅", "yes": "はい" }, + "overrideLink": "オーバーライドリンク", "pageHeading": "ページ見出し", "phone": "電話", "phoneFormat": "電話形式", @@ -565,6 +567,7 @@ "link": "リンク", "linkedEntityFields": "リンクされたエンティティフィールド", "linkedEntityMultiValueWarning": "{{linkedField}} には、複数のリンクされたエンティティが含まれています。最初のものを {{resolvedField}} に使用します。", + "linkOverrideDirectoryTooltip": "各カードのタイトル リンクにはカスタム URL パスを使用します。値が空の場合は、生成されたディレクトリ URL が使用されます。", "linkTypes": { "clickToWebsite": "Webサイトをクリックしてください", "drivingDirections": "運転方向", diff --git a/packages/visual-editor/locales/platform/lt/visual-editor.json b/packages/visual-editor/locales/platform/lt/visual-editor.json index 5565a219ae..d8fb8188d6 100644 --- a/packages/visual-editor/locales/platform/lt/visual-editor.json +++ b/packages/visual-editor/locales/platform/lt/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Nuorodos spalva", "linkedInLink": "„LinkedIn“ nuoroda", "linkLabel": "Nuorodos etiketė", + "linkPath": "Nuorodos kelias", "links": "Nuorodos", "linksTooltip": "Jei peržiūros sritis per siaura, nuorodos bus automatiškai sutrauktos", "linkTarget": "Nuoroda Tikslas", @@ -426,6 +427,7 @@ "width": "Plotis", "yes": "Taip" }, + "overrideLink": "Perrašyti nuorodą", "pageHeading": "Puslapio antraštė", "phone": "Telefonas", "phoneFormat": "Telefono formatas", @@ -567,6 +569,7 @@ "link": "nuoroda", "linkedEntityFields": "Susieti esybių laukai", "linkedEntityMultiValueWarning": "{{linkedField}} yra keli susieti objektai. Naudojamas pirmasis, skirtas {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Naudokite tinkintą URL kelią kiekvienos kortelės pavadinimo nuorodai. Jei reikšmė tuščia, bus naudojamas sugeneruotas katalogo URL.", "linkTypes": { "clickToWebsite": "Spustelėkite svetainę", "drivingDirections": "Važiavimo kryptys", diff --git a/packages/visual-editor/locales/platform/lv/visual-editor.json b/packages/visual-editor/locales/platform/lv/visual-editor.json index 1f120fe40b..2fddf86ff8 100644 --- a/packages/visual-editor/locales/platform/lv/visual-editor.json +++ b/packages/visual-editor/locales/platform/lv/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Saites krāsa", "linkedInLink": "LinkedIn saite", "linkLabel": "Saites etiķete", + "linkPath": "Saites ceļš", "links": "Saites", "linksTooltip": "Ja skata logs ir pārāk šaurs, saites tiks automātiski sakļautas", "linkTarget": "Saites mērķis", @@ -426,6 +427,7 @@ "width": "Platums", "yes": "Jā" }, + "overrideLink": "Pārrakstīt saiti", "pageHeading": "Lapas virsraksts", "phone": "Tālrunis", "phoneFormat": "Tālruņa formāts", @@ -565,6 +567,7 @@ "link": "saite", "linkedEntityFields": "Saistītie entītiju lauki", "linkedEntityMultiValueWarning": "{{linkedField}} satur vairākas saistītas entītijas. Izmantojot pirmo {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Katras kartītes virsraksta saitei izmantojiet pielāgotu URL ceļu. Ja vērtība ir tukša, tiks izmantots ģenerētais direktorija URL.", "linkTypes": { "clickToWebsite": "Noklikšķiniet uz vietni", "drivingDirections": "Braukšanas norādījumi", diff --git a/packages/visual-editor/locales/platform/nb/visual-editor.json b/packages/visual-editor/locales/platform/nb/visual-editor.json index 293d0bd24f..fd1363f3e7 100644 --- a/packages/visual-editor/locales/platform/nb/visual-editor.json +++ b/packages/visual-editor/locales/platform/nb/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Link farge", "linkedInLink": "LinkedIn Link", "linkLabel": "Koblingsetikett", + "linkPath": "Koblingssti", "links": "Lenker", "linksTooltip": "Lenker vil automatisk kollapse hvis visningsporten er for smal", "linkTarget": "Linkmål", @@ -426,6 +427,7 @@ "width": "Bredde", "yes": "Ja" }, + "overrideLink": "Overstyr kobling", "pageHeading": "Sideoverskrift", "phone": "Telefon", "phoneFormat": "Telefonformat", @@ -565,6 +567,7 @@ "link": "lenke", "linkedEntityFields": "Koblede enhetsfelt", "linkedEntityMultiValueWarning": "{{linkedField}} inneholder flere koblede enheter. Bruker den første for {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Bruk en egendefinert URL-bane for hvert korts tittelkobling. Hvis verdien er tom, vil den genererte katalog-URLen bli brukt.", "linkTypes": { "clickToWebsite": "Klikk til nettstedet", "drivingDirections": "Veibeskrivelse", diff --git a/packages/visual-editor/locales/platform/nl/visual-editor.json b/packages/visual-editor/locales/platform/nl/visual-editor.json index 84d54ddd83..e0b5aed4d4 100644 --- a/packages/visual-editor/locales/platform/nl/visual-editor.json +++ b/packages/visual-editor/locales/platform/nl/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Linkkleur", "linkedInLink": "LinkedIn -link", "linkLabel": "Linklabel", + "linkPath": "Linkpad", "links": "Links", "linksTooltip": "Links worden automatisch samengevouwen als de viewport te smal is", "linkTarget": "Doel koppelen", @@ -426,6 +427,7 @@ "width": "Breedte", "yes": "Ja" }, + "overrideLink": "Link overschrijven", "pageHeading": "Paginakop", "phone": "Telefoon", "phoneFormat": "Telefoonformaat", @@ -565,6 +567,7 @@ "link": "link", "linkedEntityFields": "Gekoppelde entiteitsvelden", "linkedEntityMultiValueWarning": "{{linkedField}} bevat meerdere gekoppelde entiteiten. Gebruik de eerste voor {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Gebruik een aangepast URL-pad voor de titellink van elke kaart. Als de waarde leeg is, wordt de gegenereerde map-URL gebruikt.", "linkTypes": { "clickToWebsite": "Klik op de website", "drivingDirections": "Routebeschrijving", diff --git a/packages/visual-editor/locales/platform/pl/visual-editor.json b/packages/visual-editor/locales/platform/pl/visual-editor.json index 0e3c811c8a..245e2b0bc0 100644 --- a/packages/visual-editor/locales/platform/pl/visual-editor.json +++ b/packages/visual-editor/locales/platform/pl/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Kolor łącza", "linkedInLink": "Link LinkedIn", "linkLabel": "Etykieta łącza", + "linkPath": "Ścieżka łącza", "links": "Spinki do mankietów", "linksTooltip": "Łącza zostaną automatycznie zwinięte, jeśli rzutnia jest zbyt wąska", "linkTarget": "Cel łącza", @@ -426,6 +427,7 @@ "width": "Szerokość", "yes": "Tak" }, + "overrideLink": "Zastąp łącze", "pageHeading": "Nagłówek strony", "phone": "Telefon", "phoneFormat": "Format telefonu", @@ -567,6 +569,7 @@ "link": "Link", "linkedEntityFields": "Pola encji połączonych", "linkedEntityMultiValueWarning": "{{linkedField}} zawiera wiele połączonych jednostek. Używanie pierwszego dla {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Użyj niestandardowej ścieżki URL dla linku tytułowego każdej karty. Jeśli wartość jest pusta, zostanie użyty wygenerowany adres URL katalogu.", "linkTypes": { "clickToWebsite": "Kliknij na stronę internetową", "drivingDirections": "Kierunki jazdy", diff --git a/packages/visual-editor/locales/platform/pt/visual-editor.json b/packages/visual-editor/locales/platform/pt/visual-editor.json index 4b98d62bee..50a086b9bc 100644 --- a/packages/visual-editor/locales/platform/pt/visual-editor.json +++ b/packages/visual-editor/locales/platform/pt/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Cor do link", "linkedInLink": "Link LinkedIn", "linkLabel": "Etiqueta do link", + "linkPath": "Caminho do link", "links": "Links", "linksTooltip": "Os links serão recolhidos automaticamente se a janela de visualização for muito estreita", "linkTarget": "Alvo do link", @@ -426,6 +427,7 @@ "width": "Largura", "yes": "Sim" }, + "overrideLink": "Substituir link", "pageHeading": "Título da página", "phone": "Telefone", "phoneFormat": "Formato de telefone", @@ -566,6 +568,7 @@ "link": "link", "linkedEntityFields": "Campos de entidade vinculada", "linkedEntityMultiValueWarning": "{{linkedField}} contém várias entidades vinculadas. Usando o primeiro para {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Use um caminho de URL personalizado para o link do título de cada cartão. Se o valor estiver vazio, a URL do diretório gerada será usada.", "linkTypes": { "clickToWebsite": "Clique no site", "drivingDirections": "Direções de direção", diff --git a/packages/visual-editor/locales/platform/ro/visual-editor.json b/packages/visual-editor/locales/platform/ro/visual-editor.json index f33bdae0c4..ca575907d1 100644 --- a/packages/visual-editor/locales/platform/ro/visual-editor.json +++ b/packages/visual-editor/locales/platform/ro/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Culoare link", "linkedInLink": "LinkedIn Link", "linkLabel": "Etichetă de link", + "linkPath": "Calea legăturii", "links": "Link -uri", "linksTooltip": "Linkurile se vor restrânge automat dacă fereastra de vizualizare este prea îngustă", "linkTarget": "Link țintă", @@ -426,6 +427,7 @@ "width": "Lăţime", "yes": "Da" }, + "overrideLink": "Înlocuiți linkul", "pageHeading": "Titlul paginii", "phone": "Telefon", "phoneFormat": "Format telefonic", @@ -566,6 +568,7 @@ "link": "legătură", "linkedEntityFields": "Câmpurile de entitate conectate", "linkedEntityMultiValueWarning": "{{linkedField}} conține mai multe entități legate. Folosind primul pentru {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Utilizați o cale URL personalizată pentru linkul de titlu al fiecărui card. Dacă valoarea este goală, va fi utilizat URL-ul directorului generat.", "linkTypes": { "clickToWebsite": "Faceți clic pe site -ul web", "drivingDirections": "Direcții de conducere", diff --git a/packages/visual-editor/locales/platform/sk/visual-editor.json b/packages/visual-editor/locales/platform/sk/visual-editor.json index 9ea612f4fa..45adab9420 100644 --- a/packages/visual-editor/locales/platform/sk/visual-editor.json +++ b/packages/visual-editor/locales/platform/sk/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Farba odkazu", "linkedInLink": "LinkedIn link", "linkLabel": "Označenie odkazu", + "linkPath": "Cesta odkazu", "links": "Odkazy", "linksTooltip": "Ak je výrez príliš úzky, prepojenia sa automaticky zbalia", "linkTarget": "Cieľ odkazu", @@ -426,6 +427,7 @@ "width": "Šírka", "yes": "Áno" }, + "overrideLink": "Prepísať odkaz", "pageHeading": "Záhlavie stránky", "phone": "Telefón", "phoneFormat": "Formát telefónu", @@ -567,6 +569,7 @@ "link": "prepojiť", "linkedEntityFields": "Polia prepojených entít", "linkedEntityMultiValueWarning": "{{linkedField}} obsahuje viacero prepojených entít. Používa sa prvý pre {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Pre odkaz na názov každej karty použite vlastnú cestu URL. Ak je hodnota prázdna, použije sa vygenerovaná adresa URL adresára.", "linkTypes": { "clickToWebsite": "Kliknite na webovú stránku", "drivingDirections": "Riadenie", diff --git a/packages/visual-editor/locales/platform/sv/visual-editor.json b/packages/visual-editor/locales/platform/sv/visual-editor.json index 37b06be9dd..92b19727a2 100644 --- a/packages/visual-editor/locales/platform/sv/visual-editor.json +++ b/packages/visual-editor/locales/platform/sv/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Länkfärg", "linkedInLink": "LinkedIn -länk", "linkLabel": "Länketikett", + "linkPath": "Länkväg", "links": "Länkar", "linksTooltip": "Länkar kommer automatiskt att kollapsa om visningsporten är för smal", "linkTarget": "Länkmål", @@ -426,6 +427,7 @@ "width": "Bredd", "yes": "Ja" }, + "overrideLink": "Åsidosätt länk", "pageHeading": "Sidrubrik", "phone": "Telefon", "phoneFormat": "Telefonformat", @@ -565,6 +567,7 @@ "link": "länk", "linkedEntityFields": "Länkade enhetsfält", "linkedEntityMultiValueWarning": "{{linkedField}} innehåller flera länkade enheter. Använder den första för {{resolvedField}}.", + "linkOverrideDirectoryTooltip": "Använd en anpassad webbadresssökväg för varje korts titellänk. Om värdet är tomt kommer den genererade katalogadressen att användas.", "linkTypes": { "clickToWebsite": "Klicka på webbplatsen", "drivingDirections": "Vägbeskrivning", diff --git a/packages/visual-editor/locales/platform/tr/visual-editor.json b/packages/visual-editor/locales/platform/tr/visual-editor.json index 46111eb012..efa07d62c6 100644 --- a/packages/visual-editor/locales/platform/tr/visual-editor.json +++ b/packages/visual-editor/locales/platform/tr/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "Bağlantı Rengi", "linkedInLink": "LinkedIn Link", "linkLabel": "Bağlantı Etiketi", + "linkPath": "Bağlantı Yolu", "links": "Bağlar", "linksTooltip": "Görünüm çok darsa bağlantılar otomatik olarak daraltılır", "linkTarget": "Bağlantı Hedefi", @@ -426,6 +427,7 @@ "width": "Genişlik", "yes": "Evet" }, + "overrideLink": "Bağlantıyı Geçersiz Kıl", "pageHeading": "Sayfa Başlığı", "phone": "Telefon", "phoneFormat": "Telefon formatı", @@ -565,6 +567,7 @@ "link": "bağlantı", "linkedEntityFields": "Bağlantılı Varlık Alanları", "linkedEntityMultiValueWarning": "{{linkedField}} birden fazla bağlantılı varlık içerir. {{resolvedField}} için ilkini kullanma.", + "linkOverrideDirectoryTooltip": "Her kartın başlık bağlantısı için özel bir URL yolu kullanın. Değer boşsa oluşturulan dizin URL'si kullanılacaktır.", "linkTypes": { "clickToWebsite": "Web sitesine tıklayın", "drivingDirections": "Yol Tarifi", 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 051b6b2b74..816a8b6319 100644 --- a/packages/visual-editor/locales/platform/zh-TW/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh-TW/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "連結顏色", "linkedInLink": "LinkedIn鏈接", "linkLabel": "鏈接標籤", + "linkPath": "連結路徑", "links": "鏈接", "linksTooltip": "如果視口太窄,鏈接將自動折疊", "linkTarget": "鏈接目標", @@ -426,6 +427,7 @@ "width": "寬度", "yes": "是的" }, + "overrideLink": "覆蓋連結", "pageHeading": "頁面標題", "phone": "電話", "phoneFormat": "電話格式", @@ -565,6 +567,7 @@ "link": "鏈接", "linkedEntityFields": "連結實體字段", "linkedEntityMultiValueWarning": "{{linkedField}} 包含多個連結實體。將第一個用於 {{resolvedField}}。", + "linkOverrideDirectoryTooltip": "對每張卡片的標題連結使用自訂 URL 路徑。如果該值為空,則將使用產生的目錄 URL。", "linkTypes": { "clickToWebsite": "單擊網站", "drivingDirections": "行駛方向", diff --git a/packages/visual-editor/locales/platform/zh/visual-editor.json b/packages/visual-editor/locales/platform/zh/visual-editor.json index 91f3cc6c04..9e95e8a93b 100644 --- a/packages/visual-editor/locales/platform/zh/visual-editor.json +++ b/packages/visual-editor/locales/platform/zh/visual-editor.json @@ -277,6 +277,7 @@ "linkColor": "链接颜色", "linkedInLink": "LinkedIn链接", "linkLabel": "链接标签", + "linkPath": "链接路径", "links": "链接", "linksTooltip": "如果视口太窄,链接将自动折叠", "linkTarget": "链接目标", @@ -426,6 +427,7 @@ "width": "宽度", "yes": "是的" }, + "overrideLink": "覆盖链接", "pageHeading": "页面标题", "phone": "电话", "phoneFormat": "电话格式", @@ -565,6 +567,7 @@ "link": "关联", "linkedEntityFields": "链接实体字段", "linkedEntityMultiValueWarning": "{{linkedField}} 包含多个链接实体。将第一个用于 {{resolvedField}}。", + "linkOverrideDirectoryTooltip": "对每张卡片的标题链接使用自定义 URL 路径。如果该值为空,则将使用生成的目录 URL。", "linkTypes": { "clickToWebsite": "单击网站", "drivingDirections": "行驶方向", diff --git a/packages/visual-editor/src/components/directory/DirectoryCard.tsx b/packages/visual-editor/src/components/directory/DirectoryCard.tsx index efc35c1d09..d8c376e9e0 100644 --- a/packages/visual-editor/src/components/directory/DirectoryCard.tsx +++ b/packages/visual-editor/src/components/directory/DirectoryCard.tsx @@ -32,6 +32,8 @@ import { } from "./directoryChildReference.tsx"; import { YextComponentConfig, YextFields } from "../../fields/fields.ts"; import { YextEntityField } from "../../editor/yextEntityFieldUtils.ts"; +import { resolveComponentData } from "../../utils/resolveComponentData.tsx"; +import { normalizeSlug } from "../../utils/slugifier.ts"; const defaultCardTitle: YextEntityField = { field: "name", @@ -39,6 +41,26 @@ const defaultCardTitle: YextEntityField = { constantValueEnabled: false, }; +// DirectoryCardLinkOverrideField is a yes/no toggle +// that displays an entity field selector when set to yes. +export type DirectoryCardLinkOverrideFieldValue = + YextEntityField & { + enabled: boolean; + normalizeLink: boolean; + }; + +export const createDefaultLinkOverrideFieldValue = + (): DirectoryCardLinkOverrideFieldValue => ({ + enabled: false, + normalizeLink: false, + field: "", + constantValue: { + defaultValue: "", + hasLocalizedValue: "true", + }, + constantValueEnabled: false, + }); + const isHeadingTextField = ( value: unknown ): value is HeadingTextProps["data"]["text"] => @@ -70,6 +92,10 @@ export const defaultDirectoryCardSlotData = ( index, data: { cardTitle: defaultCardTitle, + linkOverride: createDefaultLinkOverrideFieldValue(), + showAddress: true, + showHoursStatus: true, + showPhoneNumber: true, }, styles: { backgroundColor: @@ -213,6 +239,10 @@ export type DirectoryCardProps = { data: { cardTitle: YextEntityField; + linkOverride: DirectoryCardLinkOverrideFieldValue; + showAddress: boolean; + showHoursStatus: boolean; + showPhoneNumber: boolean; }; /** Styling for all the cards. */ @@ -239,7 +269,7 @@ export type DirectoryCardProps = { }; const DirectoryCardComponent: PuckComponent = (props) => { - const { styles, slots, parentData, index, puck } = props; + const { data, styles, slots, parentData, index, puck } = props; const { document: streamDocument, relativePrefixToRoot } = useTemplateProps(); const directoryChildrenFromContext = useDirectoryChildren(); const sortedDirectoryChildren = React.useMemo( @@ -276,13 +306,32 @@ const DirectoryCardComponent: PuckComponent = (props) => { [resolvedChild, relativePrefixToRoot, streamDocument] ); - const resolvedUrl = resolvedChild - ? resolveUrlTemplateOfChild( - resolvedChild, - streamDocument, - relativePrefixToRoot + const linkOverrideValue = data.linkOverride.enabled + ? resolveComponentData( + data.linkOverride, + streamDocument.locale || "en", + childDocumentContext.document ) - : undefined; + : ""; + const resolvedLinkOverride = + typeof linkOverrideValue === "string" + ? data.linkOverride.normalizeLink + ? normalizeSlug(linkOverrideValue) + : linkOverrideValue + : ""; + + // If there is a value for link override, it should be used. + // Otherwise, construct the url based on the entity page's url template. + let resolvedUrl: undefined | string; + if (resolvedLinkOverride) { + resolvedUrl = resolvedLinkOverride; + } else if (resolvedChild) { + resolvedUrl = resolveUrlTemplateOfChild( + resolvedChild, + streamDocument, + relativePrefixToRoot + ); + } const { sharedCardProps, setSharedCardProps } = useCardContext<{ cardStyles: DirectoryCardProps["styles"]; @@ -389,11 +438,13 @@ const DirectoryCardComponent: PuckComponent = (props) => { - {resolvedChild?.hours && } - {resolvedChild?.mainPhone && ( + {data.showHoursStatus && resolvedChild?.hours && ( + + )} + {data.showPhoneNumber && resolvedChild?.mainPhone && ( )} - {resolvedChild?.address && ( + {data.showAddress && resolvedChild?.address && (
@@ -404,21 +455,11 @@ const DirectoryCardComponent: PuckComponent = (props) => { }; const directoryCardFields: YextFields = { + // The data fields are configured by directoryCardsSource.mappingFields in DirectoryWrapper.tsx. data: { - label: msg("fields.data", "Data"), - type: "object", + type: "custom", visible: false, - objectFields: { - cardTitle: { - type: "translatableString", - label: msg("fields.title", "Title"), - filter: { - types: ["type.string"], - }, - sourceField: "dm_directoryChildren", - showApplyAllOption: true, - }, - }, + render: () => <>, }, styles: { type: "object", @@ -449,6 +490,10 @@ export const DirectoryCard: YextComponentConfig = { defaultProps: { data: { cardTitle: defaultCardTitle, + linkOverride: createDefaultLinkOverrideFieldValue(), + showAddress: true, + showHoursStatus: true, + showPhoneNumber: true, }, styles: { backgroundColor: backgroundColors.background1.value, diff --git a/packages/visual-editor/src/components/directory/DirectoryWrapper.tsx b/packages/visual-editor/src/components/directory/DirectoryWrapper.tsx index 7065258ddd..3d8eac924d 100644 --- a/packages/visual-editor/src/components/directory/DirectoryWrapper.tsx +++ b/packages/visual-editor/src/components/directory/DirectoryWrapper.tsx @@ -1,12 +1,13 @@ import React from "react"; -import { PuckComponent, Slot } from "@puckeditor/core"; +import { FieldLabel, PuckComponent, Slot } from "@puckeditor/core"; import { backgroundColors, ThemeColor, + ThemeOptions, } from "../../utils/themeConfigOptions.ts"; import { Body } from "../atoms/body.tsx"; import { MaybeLink } from "../atoms/maybeLink.tsx"; -import { msg } from "../../utils/i18n/platform.ts"; +import { msg, pt } from "../../utils/i18n/platform.ts"; import { PageSection } from "../atoms/pageSection.tsx"; import { CardContextProvider } from "../../hooks/useCardContext.tsx"; import { @@ -14,6 +15,7 @@ import { sortAlphabetically, } from "../../utils/directory/utils.ts"; import { + createDefaultLinkOverrideFieldValue, defaultDirectoryCardSlotData, DirectoryCardProps, } from "./DirectoryCard.tsx"; @@ -26,10 +28,25 @@ import { DirectoryChildrenProvider, getSortedDirectoryChildren, } from "./directoryChildReference.tsx"; -import { YextComponentConfig, YextFields } from "../../fields/fields.ts"; +import { + YextComponentConfig, + type YextCustomFieldRenderProps, + type YextFieldDefinition, + YextFields, +} from "../../fields/fields.ts"; import { createSlottedItemSource } from "../../utils/itemSource/index.ts"; import { syncLinkedSlotMappedCards } from "../../utils/cardSlots/slotMappedCards.ts"; import { resolveComponentData } from "../../utils/resolveComponentData.tsx"; +import { YextAutoField } from "../../fields/YextAutoField.tsx"; +import { + Tooltip, + TooltipArrow, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "../../internal/puck/ui/Tooltip.tsx"; +import { FaInfoCircle } from "react-icons/fa"; +import { useTemplateMetadata } from "../../internal/hooks/useMessageReceivers.ts"; export type DirectoryGridProps = { data: typeof directoryCardsSource.value; @@ -45,6 +62,113 @@ export type DirectoryGridProps = { }; }; +const DirectoryFieldTooltip = () => { + const templateMetadata = useTemplateMetadata(); + return ( + + + + + + + {pt( + "linkOverrideDirectoryTooltip", + "Use a custom URL path for each card's title link. If the value is empty, the generated directory URL will be used.", + { + entityType: templateMetadata.entityTypeDisplayName, + } + )} + + + + + ); +}; + +const linkOverrideField: YextFieldDefinition< + DirectoryCardProps["data"]["linkOverride"] +> = { + type: "custom", + render: ({ + value, + onChange, + }: YextCustomFieldRenderProps< + DirectoryCardProps["data"]["linkOverride"] + >) => { + const enabled = value?.enabled ?? false; + const normalizeLink = value?.normalizeLink ?? false; + const label = pt("fields.overrideLink", "Override Link"); + + return ( + }> +
+ + onChange({ + ...createDefaultLinkOverrideFieldValue(), + ...value, + enabled: nextEnabled, + }) + } + /> + {enabled && ( + <> + + onChange({ + ...nextValue, + enabled: true, + }) + } + /> + + + onChange({ + ...value, + normalizeLink: nextNormalizeLink, + }) + } + /> + + + )} +
+
+ ); + }, +}; + const directoryCardsSource = createSlottedItemSource< DirectoryCardProps["data"], DirectoryCardProps @@ -62,6 +186,22 @@ const directoryCardsSource = createSlottedItemSource< types: ["type.string"], }, }, + linkOverride: linkOverrideField, + showAddress: { + type: "radio", + label: msg("fields.showAddress", "Show Address"), + options: ThemeOptions.SHOW_HIDE, + }, + showHoursStatus: { + type: "radio", + label: msg("fields.showHoursStatus", "Show Hours Status"), + options: ThemeOptions.SHOW_HIDE, + }, + showPhoneNumber: { + type: "radio", + label: msg("fields.showPhone", "Show Phone"), + options: ThemeOptions.SHOW_HIDE, + }, }, }); @@ -83,6 +223,13 @@ const getNormalizedDirectoryGridData = ( ...value?.mappings?.cardTitle, field: value?.mappings?.cardTitle?.field || "name", }, + linkOverride: { + ...createDefaultLinkOverrideFieldValue(), + ...value?.mappings?.linkOverride, + }, + showAddress: value?.mappings?.showAddress ?? true, + showHoursStatus: value?.mappings?.showHoursStatus ?? true, + showPhoneNumber: value?.mappings?.showPhoneNumber ?? true, }, }); @@ -175,6 +322,7 @@ const directoryGridFields: YextFields = { ...directoryCardsSource.field, disableConstantValueToggle: true, fixedRepeatedField: "dm_directoryChildren", + hideRequirementsTooltip: true, }, styles: { type: "object", @@ -280,24 +428,52 @@ export const DirectoryGrid: YextComponentConfig = { childRef: createDirectoryChildReference(child, childIndex), }), normalizeId: (id) => `DirectoryCard-${id}`, - }).map((card, index) => ({ - ...card, - props: { - ...card.props, - field: titleField, - data: { - cardTitle: - titleItems[index]?.cardTitle !== undefined - ? resolveComponentData( - titleItems[index].cardTitle, - streamDocument.locale || "en", - streamDocument, - { output: "plainText" } - ) - : "[[name]]", + }).map((card, index) => { + const cardTitle = + titleItems[index]?.cardTitle !== undefined + ? resolveComponentData( + titleItems[index].cardTitle, + streamDocument.locale || "en", + streamDocument, + { output: "plainText" } + ) + : "[[name]]"; + const cardSlots = card.props.slots ?? {}; + + return { + ...card, + props: { + ...card.props, + field: titleField, + data: { + ...card.props.data, + cardTitle, + linkOverride: normalizedData.mappings?.linkOverride, + showAddress: normalizedData.mappings?.showAddress, + showHoursStatus: normalizedData.mappings?.showHoursStatus, + showPhoneNumber: normalizedData.mappings?.showPhoneNumber, + }, + slots: { + ...cardSlots, + HeadingSlot: (cardSlots.HeadingSlot ?? []).map( + (headingSlot, headingIndex) => + headingIndex === 0 + ? { + ...headingSlot, + props: { + ...headingSlot.props, + parentData: { + field: titleField, + text: cardTitle, + }, + }, + } + : headingSlot + ), + }, }, - }, - })); + }; + }); return { ...data, diff --git a/packages/visual-editor/src/components/migrations/0079_directory_card_display_props.ts b/packages/visual-editor/src/components/migrations/0079_directory_card_display_props.ts new file mode 100644 index 0000000000..5baf266cce --- /dev/null +++ b/packages/visual-editor/src/components/migrations/0079_directory_card_display_props.ts @@ -0,0 +1,56 @@ +import { Migration } from "../../utils/migrate.ts"; + +const defaultLinkOverride = { + enabled: false, + normalizeLink: false, + field: "", + constantValue: { + defaultValue: "", + hasLocalizedValue: "true", + }, + constantValueEnabled: false, +}; + +type MigrationProps = { id: string } & Record; + +const addDirectoryCardDisplayProps = ( + props: MigrationProps +): MigrationProps => ({ + ...props, + data: { + ...props.data, + linkOverride: { + ...defaultLinkOverride, + ...props.data?.linkOverride, + }, + showAddress: props.data?.showAddress ?? true, + showHoursStatus: props.data?.showHoursStatus ?? true, + showPhoneNumber: props.data?.showPhoneNumber ?? true, + }, +}); + +export const directoryCardDisplayProps: Migration = { + DirectoryGrid: { + action: "updated", + propTransformation: (props) => ({ + ...props, + data: { + ...props.data, + mappings: { + ...props.data?.mappings, + linkOverride: { + ...defaultLinkOverride, + ...props.data?.mappings?.linkOverride, + }, + showAddress: props.data?.mappings?.showAddress ?? true, + showHoursStatus: props.data?.mappings?.showHoursStatus ?? true, + showPhoneNumber: props.data?.mappings?.showPhoneNumber ?? true, + }, + }, + }), + }, + DirectoryCard: { + action: "updated", + propTransformation: addDirectoryCardDisplayProps, + }, +}; diff --git a/packages/visual-editor/src/components/migrations/migrationRegistry.ts b/packages/visual-editor/src/components/migrations/migrationRegistry.ts index 7850aec228..adc4703dff 100644 --- a/packages/visual-editor/src/components/migrations/migrationRegistry.ts +++ b/packages/visual-editor/src/components/migrations/migrationRegistry.ts @@ -77,6 +77,7 @@ import { normalizeFooterLogoImageMigration } from "./0075_normalize_footer_logo_ 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"; +import { directoryCardDisplayProps } from "./0079_directory_card_display_props.ts"; // To add a migration: // Create a new file in this directory that exports a Migration @@ -162,4 +163,5 @@ export const migrationRegistry: MigrationRegistry = [ slotMappedCardsMigration, directoryCardTitleField, removeMapboxApiKeyPropsMigration, + directoryCardDisplayProps, ]; diff --git a/packages/visual-editor/src/components/testing/screenshots/EventSection/[tablet] version 26 props with entity values.png b/packages/visual-editor/src/components/testing/screenshots/EventSection/[tablet] version 26 props with entity values.png index 71219d0c8c..4201ddc840 100644 Binary files a/packages/visual-editor/src/components/testing/screenshots/EventSection/[tablet] version 26 props with entity values.png and b/packages/visual-editor/src/components/testing/screenshots/EventSection/[tablet] version 26 props with entity values.png differ diff --git a/packages/visual-editor/src/components/testing/screenshots/PromoSection/[mobile] [classic] version 50 with constant values and video.png b/packages/visual-editor/src/components/testing/screenshots/PromoSection/[mobile] [classic] version 50 with constant values and video.png index df2b9389fd..ddff77d85c 100644 Binary files a/packages/visual-editor/src/components/testing/screenshots/PromoSection/[mobile] [classic] version 50 with constant values and video.png and b/packages/visual-editor/src/components/testing/screenshots/PromoSection/[mobile] [classic] version 50 with constant values and video.png differ diff --git a/packages/visual-editor/src/editor/YextEntityFieldSelector.tsx b/packages/visual-editor/src/editor/YextEntityFieldSelector.tsx index 10f432cb98..497a7de95b 100644 --- a/packages/visual-editor/src/editor/YextEntityFieldSelector.tsx +++ b/packages/visual-editor/src/editor/YextEntityFieldSelector.tsx @@ -37,6 +37,7 @@ export const YextEntityFieldSelector = < disableConstantValueToggle: props.disableConstantValueToggle, disallowTranslation: props.disallowTranslation, sourceFieldPath: props.sourceFieldPath, + hideRequirementsTooltip: props.hideRequirementsTooltip, }; return field as unknown as Field>; diff --git a/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx b/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx index a49e18b17f..318d601124 100644 --- a/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx +++ b/packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx @@ -84,15 +84,17 @@ const renderEntityField = ({ constantValueEnabled: false, }, entityFields = defaultEntityFields, + document = {}, }: { field?: EntityFieldSelectorField; value?: Record; entityFields?: StreamFields | null; + document?: Record; } = {}) => { const onChange = vi.fn(); render( - + { ); }); + it("shows Apply to all locales for configured string constants", () => { + renderEntityField({ + field: { + type: "entityField", + label: "Link Path", + filter: { types: ["type.string"] }, + showApplyAllOption: true, + }, + value: { + field: "", + constantValueEnabled: true, + constantValue: { + en: "locations", + hasLocalizedValue: "true", + }, + }, + document: { + _pageset: JSON.stringify({ + scope: { + locales: ["en", "fr"], + }, + }), + }, + }); + + expect( + screen.getByRole("button", { name: "Apply to all locales" }) + ).toBeDefined(); + }); + it("renders the entity field selector path", () => { const { onChange } = renderEntityField({ value: { @@ -635,6 +667,35 @@ describe("EntityFieldSelectorField", () => { expect(within(tooltip).getByText("image")).toBeDefined(); }); + it("hides parent field requirements when configured", () => { + renderRepeatedEntityField({ + field: { + type: "entityField", + label: "Directory Children", + filter: { + itemSourceTypes: [["type.string"]], + }, + hideRequirementsTooltip: true, + repeated: { + defaultItemValue: {}, + defaultMappings: {}, + manualItemFields: {}, + mappingFields: {}, + }, + }, + value: { + field: "c_articles", + constantValueEnabled: false, + constantValue: [], + mappings: {}, + }, + }); + + expect( + screen.queryByRole("button", { name: "Parent field requirements" }) + ).toBeNull(); + }); + it("hides parent field requirements in constant value mode", () => { renderRepeatedEntityField({ value: { diff --git a/packages/visual-editor/src/fields/EntityFieldSelectorField.tsx b/packages/visual-editor/src/fields/EntityFieldSelectorField.tsx index 8c6a9f6bc1..02361c04f9 100644 --- a/packages/visual-editor/src/fields/EntityFieldSelectorField.tsx +++ b/packages/visual-editor/src/fields/EntityFieldSelectorField.tsx @@ -73,10 +73,19 @@ export type EntityFieldSelectorField< visible?: boolean; filter: MappedSourceFieldFilter; constantValueFilter?: RenderEntityFieldFilter; + /** Hides the Knowledge Graph/static-content toggle when enabled. */ disableConstantValueToggle?: boolean; + /** Whether the field can be translated or not. */ disallowTranslation?: boolean; + /** Shows the "Apply to all locales" control for translatable static values. */ + showApplyAllOption?: boolean; + /** A dotted path to the linked source field on the active Puck item. Used for directories. */ sourceFieldPath?: string; + /** Uses this linked source field and hides the repeated-source selector. Used for directories. */ fixedRepeatedField?: string; + /** Hides the parent-field requirements tooltip for repeated sources. */ + hideRequirementsTooltip?: boolean; + /** Configures repeated linked-item and manual-item editing. */ repeated?: RepeatedEntityFieldMetadata; }; @@ -240,9 +249,11 @@ const RepeatedEntityFieldSelector = ({ } disableConstantValue={field.disableConstantValueToggle} label={translatedLabel} - infoTooltipRequirements={getItemSourceTooltipRequirements( - field.filter?.itemSourceTypes - )} + infoTooltipRequirements={ + field.hideRequirementsTooltip + ? undefined + : getItemSourceTooltipRequirements(field.filter?.itemSourceTypes) + } /> {constantValueEnabled ? (
@@ -344,6 +355,7 @@ export const EntityFieldSelectorFieldOverride = ({ value={value} filter={constantValueFilter} disallowTranslation={field.disallowTranslation} + showApplyAllOption={field.showApplyAllOption} sourceField={field.filter.subdocumentField} sourceFieldPath={field.sourceFieldPath} /> @@ -466,6 +478,7 @@ type InputProps> = { value: any; className?: string; disallowTranslation?: boolean; + showApplyAllOption?: boolean; label?: string; sourceFieldPath?: string; sourceField?: string; @@ -476,6 +489,7 @@ export const ConstantValueInput = >({ onChange, value, disallowTranslation, + showApplyAllOption, sourceField, }: InputProps) => { const constantFieldConfig = returnConstantFieldConfig( @@ -498,12 +512,13 @@ export const ConstantValueInput = >({ : undefined) ?? sourceField ?? sourceFieldFromContext; - const scopedConstantField = resolvedSourceField - ? ({ - ...constantFieldConfig, - sourceField: resolvedSourceField, - } as YextFieldDefinition) - : constantFieldConfig; + const scopedConstantField = { + ...constantFieldConfig, + ...(resolvedSourceField ? { sourceField: resolvedSourceField } : {}), + ...(constantFieldConfig.type === "translatableString" + ? { showApplyAllOption } + : {}), + } as YextFieldDefinition; const fieldEditor = (