@cavuno/board 1.36.0 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/format.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-5qXIfBcR.mjs';
1
+ import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-DMH3Ytoq.mjs';
2
2
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.mjs';
3
3
  export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.mjs';
4
- import { C as CustomFieldDefinition } from './board-B0Fc98yY.mjs';
4
+ import { C as CustomFieldDefinition } from './board-CBry4f7H.mjs';
5
5
 
6
6
  /**
7
7
  * Date display helpers in the board language (required leading parameter,
@@ -245,6 +245,29 @@ declare function formatSalaryRange(language: string | undefined, min: number | n
245
245
 
246
246
  declare function companyIntro(summary: string | null, description: string | null): string | null;
247
247
 
248
+ /**
249
+ * ISO 3166-1 alpha-2 country lexicon — the `country` slice of the remote-
250
+ * permit taxonomy (`GET /v1/taxonomies/remote-permits`), published so a
251
+ * picker on any surface offers exactly the set the API accepts. Mirrors the
252
+ * platform's canonical `COUNTRIES` dataset (`world-countries` minus `KP`,
253
+ * plus `XK`/Kosovo); an in-monorepo parity test asserts the mirror cannot
254
+ * drift. Codes only — display names localize at render via
255
+ * `countryOptions(language)`.
256
+ */
257
+ declare const COUNTRY_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"];
258
+ type IsoCountryCode = (typeof COUNTRY_CODES)[number];
259
+ interface CountryOption {
260
+ code: IsoCountryCode;
261
+ name: string;
262
+ }
263
+ /**
264
+ * The complete country option list, display-named in the BOARD language
265
+ * (required leading parameter, ADR-0057) and sorted by that language's
266
+ * collation — the shape a country picker renders. Falls back to the bare
267
+ * code when the runtime cannot resolve the language or name a region.
268
+ */
269
+ declare function countryOptions(language: string): CountryOption[];
270
+
248
271
  /**
249
272
  * Resolve a job's opaque `customFieldValues` into ordered, display-ready
250
273
  * entries for the "Additional details" section — the client-side twin of the
@@ -270,4 +293,4 @@ type CustomFieldDisplayEntry = {
270
293
  };
271
294
  declare function resolveCustomFieldDisplay(definitions: CustomFieldDefinition[] | undefined, values: CustomFieldValues | undefined): CustomFieldDisplayEntry[];
272
295
 
273
- export { BoardLabelOverrides, type CustomFieldDisplayEntry, type SalaryFrames, type SalaryLexicon, type SalaryTimeframeInput, type SalaryTimeframeOverrides, type SalaryTimeframeValue, type SeniorityKey, cardLocationLabel, companyIntro, fieldLabel, formatDate, formatMonthYear, formatPublishedRelativeDate, formatSalaryRange, fullJobToCard, getSalaryLexicon, locationLabel, resolveCustomFieldDisplay };
296
+ export { BoardLabelOverrides, COUNTRY_CODES, type CountryOption, type CustomFieldDisplayEntry, type IsoCountryCode, type SalaryFrames, type SalaryLexicon, type SalaryTimeframeInput, type SalaryTimeframeOverrides, type SalaryTimeframeValue, type SeniorityKey, cardLocationLabel, companyIntro, countryOptions, fieldLabel, formatDate, formatMonthYear, formatPublishedRelativeDate, formatSalaryRange, fullJobToCard, getSalaryLexicon, locationLabel, resolveCustomFieldDisplay };
package/dist/format.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-5qXIfBcR.js';
1
+ import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-DMH3Ytoq.js';
2
2
  import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.js';
3
3
  export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.js';
4
- import { C as CustomFieldDefinition } from './board-Z6pLCWxK.js';
4
+ import { C as CustomFieldDefinition } from './board-tV-zcaHs.js';
5
5
 
6
6
  /**
7
7
  * Date display helpers in the board language (required leading parameter,
@@ -245,6 +245,29 @@ declare function formatSalaryRange(language: string | undefined, min: number | n
245
245
 
246
246
  declare function companyIntro(summary: string | null, description: string | null): string | null;
247
247
 
248
+ /**
249
+ * ISO 3166-1 alpha-2 country lexicon — the `country` slice of the remote-
250
+ * permit taxonomy (`GET /v1/taxonomies/remote-permits`), published so a
251
+ * picker on any surface offers exactly the set the API accepts. Mirrors the
252
+ * platform's canonical `COUNTRIES` dataset (`world-countries` minus `KP`,
253
+ * plus `XK`/Kosovo); an in-monorepo parity test asserts the mirror cannot
254
+ * drift. Codes only — display names localize at render via
255
+ * `countryOptions(language)`.
256
+ */
257
+ declare const COUNTRY_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"];
258
+ type IsoCountryCode = (typeof COUNTRY_CODES)[number];
259
+ interface CountryOption {
260
+ code: IsoCountryCode;
261
+ name: string;
262
+ }
263
+ /**
264
+ * The complete country option list, display-named in the BOARD language
265
+ * (required leading parameter, ADR-0057) and sorted by that language's
266
+ * collation — the shape a country picker renders. Falls back to the bare
267
+ * code when the runtime cannot resolve the language or name a region.
268
+ */
269
+ declare function countryOptions(language: string): CountryOption[];
270
+
248
271
  /**
249
272
  * Resolve a job's opaque `customFieldValues` into ordered, display-ready
250
273
  * entries for the "Additional details" section — the client-side twin of the
@@ -270,4 +293,4 @@ type CustomFieldDisplayEntry = {
270
293
  };
271
294
  declare function resolveCustomFieldDisplay(definitions: CustomFieldDefinition[] | undefined, values: CustomFieldValues | undefined): CustomFieldDisplayEntry[];
272
295
 
273
- export { BoardLabelOverrides, type CustomFieldDisplayEntry, type SalaryFrames, type SalaryLexicon, type SalaryTimeframeInput, type SalaryTimeframeOverrides, type SalaryTimeframeValue, type SeniorityKey, cardLocationLabel, companyIntro, fieldLabel, formatDate, formatMonthYear, formatPublishedRelativeDate, formatSalaryRange, fullJobToCard, getSalaryLexicon, locationLabel, resolveCustomFieldDisplay };
296
+ export { BoardLabelOverrides, COUNTRY_CODES, type CountryOption, type CustomFieldDisplayEntry, type IsoCountryCode, type SalaryFrames, type SalaryLexicon, type SalaryTimeframeInput, type SalaryTimeframeOverrides, type SalaryTimeframeValue, type SeniorityKey, cardLocationLabel, companyIntro, countryOptions, fieldLabel, formatDate, formatMonthYear, formatPublishedRelativeDate, formatSalaryRange, fullJobToCard, getSalaryLexicon, locationLabel, resolveCustomFieldDisplay };
package/dist/format.js CHANGED
@@ -20,9 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/format/index.ts
21
21
  var format_exports = {};
22
22
  __export(format_exports, {
23
+ COUNTRY_CODES: () => COUNTRY_CODES,
23
24
  PUBLIC_LABEL_GROUPS: () => PUBLIC_LABEL_GROUPS,
24
25
  cardLocationLabel: () => cardLocationLabel,
25
26
  companyIntro: () => companyIntro,
27
+ countryOptions: () => countryOptions,
26
28
  fieldLabel: () => fieldLabel,
27
29
  formatDate: () => formatDate,
28
30
  formatMonthYear: () => formatMonthYear,
@@ -544,6 +546,281 @@ function companyIntro(summary, description) {
544
546
  return first ?? text;
545
547
  }
546
548
 
549
+ // src/format/countries.ts
550
+ var COUNTRY_CODES = [
551
+ "AD",
552
+ "AE",
553
+ "AF",
554
+ "AG",
555
+ "AI",
556
+ "AL",
557
+ "AM",
558
+ "AO",
559
+ "AQ",
560
+ "AR",
561
+ "AS",
562
+ "AT",
563
+ "AU",
564
+ "AW",
565
+ "AX",
566
+ "AZ",
567
+ "BA",
568
+ "BB",
569
+ "BD",
570
+ "BE",
571
+ "BF",
572
+ "BG",
573
+ "BH",
574
+ "BI",
575
+ "BJ",
576
+ "BL",
577
+ "BM",
578
+ "BN",
579
+ "BO",
580
+ "BQ",
581
+ "BR",
582
+ "BS",
583
+ "BT",
584
+ "BV",
585
+ "BW",
586
+ "BY",
587
+ "BZ",
588
+ "CA",
589
+ "CC",
590
+ "CD",
591
+ "CF",
592
+ "CG",
593
+ "CH",
594
+ "CI",
595
+ "CK",
596
+ "CL",
597
+ "CM",
598
+ "CN",
599
+ "CO",
600
+ "CR",
601
+ "CU",
602
+ "CV",
603
+ "CW",
604
+ "CX",
605
+ "CY",
606
+ "CZ",
607
+ "DE",
608
+ "DJ",
609
+ "DK",
610
+ "DM",
611
+ "DO",
612
+ "DZ",
613
+ "EC",
614
+ "EE",
615
+ "EG",
616
+ "EH",
617
+ "ER",
618
+ "ES",
619
+ "ET",
620
+ "FI",
621
+ "FJ",
622
+ "FK",
623
+ "FM",
624
+ "FO",
625
+ "FR",
626
+ "GA",
627
+ "GB",
628
+ "GD",
629
+ "GE",
630
+ "GF",
631
+ "GG",
632
+ "GH",
633
+ "GI",
634
+ "GL",
635
+ "GM",
636
+ "GN",
637
+ "GP",
638
+ "GQ",
639
+ "GR",
640
+ "GS",
641
+ "GT",
642
+ "GU",
643
+ "GW",
644
+ "GY",
645
+ "HK",
646
+ "HM",
647
+ "HN",
648
+ "HR",
649
+ "HT",
650
+ "HU",
651
+ "ID",
652
+ "IE",
653
+ "IL",
654
+ "IM",
655
+ "IN",
656
+ "IO",
657
+ "IQ",
658
+ "IR",
659
+ "IS",
660
+ "IT",
661
+ "JE",
662
+ "JM",
663
+ "JO",
664
+ "JP",
665
+ "KE",
666
+ "KG",
667
+ "KH",
668
+ "KI",
669
+ "KM",
670
+ "KN",
671
+ "KR",
672
+ "KW",
673
+ "KY",
674
+ "KZ",
675
+ "LA",
676
+ "LB",
677
+ "LC",
678
+ "LI",
679
+ "LK",
680
+ "LR",
681
+ "LS",
682
+ "LT",
683
+ "LU",
684
+ "LV",
685
+ "LY",
686
+ "MA",
687
+ "MC",
688
+ "MD",
689
+ "ME",
690
+ "MF",
691
+ "MG",
692
+ "MH",
693
+ "MK",
694
+ "ML",
695
+ "MM",
696
+ "MN",
697
+ "MO",
698
+ "MP",
699
+ "MQ",
700
+ "MR",
701
+ "MS",
702
+ "MT",
703
+ "MU",
704
+ "MV",
705
+ "MW",
706
+ "MX",
707
+ "MY",
708
+ "MZ",
709
+ "NA",
710
+ "NC",
711
+ "NE",
712
+ "NF",
713
+ "NG",
714
+ "NI",
715
+ "NL",
716
+ "NO",
717
+ "NP",
718
+ "NR",
719
+ "NU",
720
+ "NZ",
721
+ "OM",
722
+ "PA",
723
+ "PE",
724
+ "PF",
725
+ "PG",
726
+ "PH",
727
+ "PK",
728
+ "PL",
729
+ "PM",
730
+ "PN",
731
+ "PR",
732
+ "PS",
733
+ "PT",
734
+ "PW",
735
+ "PY",
736
+ "QA",
737
+ "RE",
738
+ "RO",
739
+ "RS",
740
+ "RU",
741
+ "RW",
742
+ "SA",
743
+ "SB",
744
+ "SC",
745
+ "SD",
746
+ "SE",
747
+ "SG",
748
+ "SH",
749
+ "SI",
750
+ "SJ",
751
+ "SK",
752
+ "SL",
753
+ "SM",
754
+ "SN",
755
+ "SO",
756
+ "SR",
757
+ "SS",
758
+ "ST",
759
+ "SV",
760
+ "SX",
761
+ "SY",
762
+ "SZ",
763
+ "TC",
764
+ "TD",
765
+ "TF",
766
+ "TG",
767
+ "TH",
768
+ "TJ",
769
+ "TK",
770
+ "TL",
771
+ "TM",
772
+ "TN",
773
+ "TO",
774
+ "TR",
775
+ "TT",
776
+ "TV",
777
+ "TW",
778
+ "TZ",
779
+ "UA",
780
+ "UG",
781
+ "UM",
782
+ "US",
783
+ "UY",
784
+ "UZ",
785
+ "VA",
786
+ "VC",
787
+ "VE",
788
+ "VG",
789
+ "VI",
790
+ "VN",
791
+ "VU",
792
+ "WF",
793
+ "WS",
794
+ "XK",
795
+ "YE",
796
+ "YT",
797
+ "ZA",
798
+ "ZM",
799
+ "ZW"
800
+ ];
801
+ function regionNames(language) {
802
+ try {
803
+ return new Intl.DisplayNames([language], { type: "region" });
804
+ } catch {
805
+ return null;
806
+ }
807
+ }
808
+ function collator(language) {
809
+ try {
810
+ return new Intl.Collator(language);
811
+ } catch {
812
+ return new Intl.Collator();
813
+ }
814
+ }
815
+ function countryOptions(language) {
816
+ const names = regionNames(language);
817
+ const compare = collator(language).compare;
818
+ return COUNTRY_CODES.map((code) => ({
819
+ code,
820
+ name: names?.of(code) ?? code
821
+ })).sort((a, b) => compare(a.name, b.name));
822
+ }
823
+
547
824
  // src/format/custom-fields.ts
548
825
  function renderTextValue(def, raw) {
549
826
  switch (def.type) {
package/dist/format.mjs CHANGED
@@ -506,6 +506,281 @@ function companyIntro(summary, description) {
506
506
  return first ?? text;
507
507
  }
508
508
 
509
+ // src/format/countries.ts
510
+ var COUNTRY_CODES = [
511
+ "AD",
512
+ "AE",
513
+ "AF",
514
+ "AG",
515
+ "AI",
516
+ "AL",
517
+ "AM",
518
+ "AO",
519
+ "AQ",
520
+ "AR",
521
+ "AS",
522
+ "AT",
523
+ "AU",
524
+ "AW",
525
+ "AX",
526
+ "AZ",
527
+ "BA",
528
+ "BB",
529
+ "BD",
530
+ "BE",
531
+ "BF",
532
+ "BG",
533
+ "BH",
534
+ "BI",
535
+ "BJ",
536
+ "BL",
537
+ "BM",
538
+ "BN",
539
+ "BO",
540
+ "BQ",
541
+ "BR",
542
+ "BS",
543
+ "BT",
544
+ "BV",
545
+ "BW",
546
+ "BY",
547
+ "BZ",
548
+ "CA",
549
+ "CC",
550
+ "CD",
551
+ "CF",
552
+ "CG",
553
+ "CH",
554
+ "CI",
555
+ "CK",
556
+ "CL",
557
+ "CM",
558
+ "CN",
559
+ "CO",
560
+ "CR",
561
+ "CU",
562
+ "CV",
563
+ "CW",
564
+ "CX",
565
+ "CY",
566
+ "CZ",
567
+ "DE",
568
+ "DJ",
569
+ "DK",
570
+ "DM",
571
+ "DO",
572
+ "DZ",
573
+ "EC",
574
+ "EE",
575
+ "EG",
576
+ "EH",
577
+ "ER",
578
+ "ES",
579
+ "ET",
580
+ "FI",
581
+ "FJ",
582
+ "FK",
583
+ "FM",
584
+ "FO",
585
+ "FR",
586
+ "GA",
587
+ "GB",
588
+ "GD",
589
+ "GE",
590
+ "GF",
591
+ "GG",
592
+ "GH",
593
+ "GI",
594
+ "GL",
595
+ "GM",
596
+ "GN",
597
+ "GP",
598
+ "GQ",
599
+ "GR",
600
+ "GS",
601
+ "GT",
602
+ "GU",
603
+ "GW",
604
+ "GY",
605
+ "HK",
606
+ "HM",
607
+ "HN",
608
+ "HR",
609
+ "HT",
610
+ "HU",
611
+ "ID",
612
+ "IE",
613
+ "IL",
614
+ "IM",
615
+ "IN",
616
+ "IO",
617
+ "IQ",
618
+ "IR",
619
+ "IS",
620
+ "IT",
621
+ "JE",
622
+ "JM",
623
+ "JO",
624
+ "JP",
625
+ "KE",
626
+ "KG",
627
+ "KH",
628
+ "KI",
629
+ "KM",
630
+ "KN",
631
+ "KR",
632
+ "KW",
633
+ "KY",
634
+ "KZ",
635
+ "LA",
636
+ "LB",
637
+ "LC",
638
+ "LI",
639
+ "LK",
640
+ "LR",
641
+ "LS",
642
+ "LT",
643
+ "LU",
644
+ "LV",
645
+ "LY",
646
+ "MA",
647
+ "MC",
648
+ "MD",
649
+ "ME",
650
+ "MF",
651
+ "MG",
652
+ "MH",
653
+ "MK",
654
+ "ML",
655
+ "MM",
656
+ "MN",
657
+ "MO",
658
+ "MP",
659
+ "MQ",
660
+ "MR",
661
+ "MS",
662
+ "MT",
663
+ "MU",
664
+ "MV",
665
+ "MW",
666
+ "MX",
667
+ "MY",
668
+ "MZ",
669
+ "NA",
670
+ "NC",
671
+ "NE",
672
+ "NF",
673
+ "NG",
674
+ "NI",
675
+ "NL",
676
+ "NO",
677
+ "NP",
678
+ "NR",
679
+ "NU",
680
+ "NZ",
681
+ "OM",
682
+ "PA",
683
+ "PE",
684
+ "PF",
685
+ "PG",
686
+ "PH",
687
+ "PK",
688
+ "PL",
689
+ "PM",
690
+ "PN",
691
+ "PR",
692
+ "PS",
693
+ "PT",
694
+ "PW",
695
+ "PY",
696
+ "QA",
697
+ "RE",
698
+ "RO",
699
+ "RS",
700
+ "RU",
701
+ "RW",
702
+ "SA",
703
+ "SB",
704
+ "SC",
705
+ "SD",
706
+ "SE",
707
+ "SG",
708
+ "SH",
709
+ "SI",
710
+ "SJ",
711
+ "SK",
712
+ "SL",
713
+ "SM",
714
+ "SN",
715
+ "SO",
716
+ "SR",
717
+ "SS",
718
+ "ST",
719
+ "SV",
720
+ "SX",
721
+ "SY",
722
+ "SZ",
723
+ "TC",
724
+ "TD",
725
+ "TF",
726
+ "TG",
727
+ "TH",
728
+ "TJ",
729
+ "TK",
730
+ "TL",
731
+ "TM",
732
+ "TN",
733
+ "TO",
734
+ "TR",
735
+ "TT",
736
+ "TV",
737
+ "TW",
738
+ "TZ",
739
+ "UA",
740
+ "UG",
741
+ "UM",
742
+ "US",
743
+ "UY",
744
+ "UZ",
745
+ "VA",
746
+ "VC",
747
+ "VE",
748
+ "VG",
749
+ "VI",
750
+ "VN",
751
+ "VU",
752
+ "WF",
753
+ "WS",
754
+ "XK",
755
+ "YE",
756
+ "YT",
757
+ "ZA",
758
+ "ZM",
759
+ "ZW"
760
+ ];
761
+ function regionNames(language) {
762
+ try {
763
+ return new Intl.DisplayNames([language], { type: "region" });
764
+ } catch {
765
+ return null;
766
+ }
767
+ }
768
+ function collator(language) {
769
+ try {
770
+ return new Intl.Collator(language);
771
+ } catch {
772
+ return new Intl.Collator();
773
+ }
774
+ }
775
+ function countryOptions(language) {
776
+ const names = regionNames(language);
777
+ const compare = collator(language).compare;
778
+ return COUNTRY_CODES.map((code) => ({
779
+ code,
780
+ name: names?.of(code) ?? code
781
+ })).sort((a, b) => compare(a.name, b.name));
782
+ }
783
+
509
784
  // src/format/custom-fields.ts
510
785
  function renderTextValue(def, raw) {
511
786
  switch (def.type) {
@@ -1044,9 +1319,11 @@ function uiCopy(language, labels) {
1044
1319
  return resolved;
1045
1320
  }
1046
1321
  export {
1322
+ COUNTRY_CODES,
1047
1323
  PUBLIC_LABEL_GROUPS,
1048
1324
  cardLocationLabel,
1049
1325
  companyIntro,
1326
+ countryOptions,
1050
1327
  fieldLabel,
1051
1328
  formatDate,
1052
1329
  formatMonthYear,