feat(web): стандартизированный справочник стран и городов в @cfdm/shared/geo

- packages/shared/src/geo: страны ISO 3166-1 alpha-2 + топ-города по странам
- vps.tsx: countryOptions/cityOptions из справочника + существующих VPS,
  города фильтруются по выбранной стране
- auto-complete-input: убран onBlur-хак с setTimeout, фильтрация по
  основному полю, initialFocus=false чтобы popover не закрывался
- vite.config.ts + tsconfig.json: алиас @cfdm/shared/geo

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-06-26 22:56:54 +07:00
co-authored by Cursor
parent a51b5f3594
commit db1d26d324
10 changed files with 429 additions and 33 deletions
+6
View File
@@ -37,6 +37,12 @@ export function getCountryFlagEmoji(country?: string): string {
return code.toUpperCase().split('').map((c) => String.fromCodePoint(127397 + c.charCodeAt(0))).join('')
}
/** Флаг по ISO 3166-1 alpha-2 коду страны. */
export function getCountryFlagEmojiByCode(code?: string): string {
if (!code || code.length !== 2) return '🌐'
return code.toUpperCase().split('').map((c) => String.fromCodePoint(127397 + c.charCodeAt(0))).join('')
}
const PAYMENT_TYPE_LABELS: Record<string, string> = {
direct_vps_payment: 'Прямой платеж за VPS',
provider_balance_topup: 'Пополнение баланса хостера',