Security patch for contact

This commit is contained in:
2026-10-09 18:00:24 +02:00
parent 2dfacb0414
commit d034ddf990
24 changed files with 437 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
/**
* Resolves a possibly-localized value to a string for the given locale.
* Payload returns a localized field as a plain string (current locale) OR, with
* locale:'all' / unflattened docs, as a { pl: '…', en: '…' } map. This handles
* both, with a safe fallback to the first available value — replacing the
* hand-rolled `getSafeString` with `any` copied into every project (JSON-LD,
* rich text, form topics, …).
*
* import { resolveLocalized } from '@intecion/ipal-kit'
* const name = resolveLocalized(item.label, locale) // '' if nothing
* const city = resolveLocalized(company.city, locale, '—') // custom fallback
*/
export declare function resolveLocalized(value: unknown, locale: string, fallback?: string): string;