diff --git a/apps/civicsignalblog/payload.config.ts b/apps/civicsignalblog/payload.config.ts index e957914af..4a5b41c4e 100644 --- a/apps/civicsignalblog/payload.config.ts +++ b/apps/civicsignalblog/payload.config.ts @@ -12,16 +12,21 @@ import nestedDocs from "@payloadcms/plugin-nested-docs"; import { s3Adapter } from "@payloadcms/plugin-cloud-storage/s3"; import { loadEnvConfig } from "@next/env"; -import Authors from "./src/payload/collections/Authors"; -import Media from "./src/payload/collections/Media"; -import Pages from "./src/payload/collections/Pages"; -import Posts from "./src/payload/collections/Posts"; +import Authors from "./src/payload/collections/Research/Authors"; +import Media from "./src/payload/collections/Research/Media"; +import Pages from "./src/payload/collections/Research/Pages"; +import CivicSignalPages from "./src/payload/collections/Main/Pages"; + +import Posts from "./src/payload/collections/Research/Posts"; import Publication from "./src/payload/globals/Publication"; -import Site from "./src/payload/globals/Site"; -import Tags from "./src/payload/collections/Tags"; +import Research from "./src/payload/globals/Site/research"; +import Main from "./src/payload/globals/Site/main"; +import Tags from "./src/payload/collections/Research/Tags"; import Users from "./src/payload/collections/Users"; import { defaultLocale, locales } from "./src/payload/utils/locales"; +import Actions from "./src/payload/components/actions"; + const dev = process.env.NODE_ENV !== "production"; const projectDir = process.cwd(); loadEnvConfig(projectDir, dev); @@ -62,9 +67,10 @@ export default buildConfig({ Pages, Posts, Tags, + CivicSignalPages, Users, ] as CollectionConfig[], - globals: [Publication, Site] as GlobalConfig[], + globals: [Publication, Research, Main] as GlobalConfig[], ...(locales?.length ? { localization: { @@ -77,6 +83,9 @@ export default buildConfig({ admin: { css: path.resolve(__dirname, "./src/payload/admin/scss/custom.scss"), user: Users.slug, + components: { + actions: [Actions], + }, livePreview: { breakpoints: [ { diff --git a/apps/civicsignalblog/src/lib/data/json/countries.js b/apps/civicsignalblog/src/lib/data/json/countries.js deleted file mode 100644 index 6a73f772b..000000000 --- a/apps/civicsignalblog/src/lib/data/json/countries.js +++ /dev/null @@ -1,4227 +0,0 @@ -export const countries = [ - { - region: "Asia", - continent: "Asia", - value: "Afghanistan", - label: { pt: "Afeganistão", en: "Afghanistan", fr: "Afghanistan" }, - slug: "AFG", - name: "Afghanistan", - alpha3: "AFG", - alpha2: "AF", - countryCode: "004", - iso: "ISO 3166-2:AF", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Åland Islands", - label: { en: "Åland Islands" }, - slug: "ALA", - name: "Åland Islands", - alpha3: "ALA", - alpha2: "AX", - countryCode: "248", - iso: "ISO 3166-2:AX", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Albania", - label: { pt: "Albânia", en: "Albania", fr: "Albanie" }, - slug: "ALB", - name: "Albania", - alpha3: "ALB", - alpha2: "AL", - countryCode: "008", - iso: "ISO 3166-2:AL", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Algeria", - label: { pt: "Argélia", en: "Algeria", fr: "Algérie" }, - slug: "DZA", - name: "Algeria", - alpha3: "DZA", - alpha2: "DZ", - countryCode: "012", - iso: "ISO 3166-2:DZ", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "American Samoa", - label: { en: "American Samoa" }, - slug: "ASM", - name: "American Samoa", - alpha3: "ASM", - alpha2: "AS", - countryCode: "016", - iso: "ISO 3166-2:AS", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Andorra", - label: { pt: "Andorra", en: "Andorra", fr: "Andorre" }, - slug: "AND", - name: "Andorra", - alpha3: "AND", - alpha2: "AD", - countryCode: "020", - iso: "ISO 3166-2:AD", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Angola", - label: { pt: "Angola", en: "Angola", fr: "Angola" }, - slug: "AGO", - name: "Angola", - alpha3: "AGO", - alpha2: "AO", - countryCode: "024", - iso: "ISO 3166-2:AO", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Americas", - value: "Anguilla", - label: { en: "Anguilla" }, - slug: "AIA", - name: "Anguilla", - alpha3: "AIA", - alpha2: "AI", - countryCode: "660", - iso: "ISO 3166-2:AI", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "", - value: "Antarctica", - label: { en: "Antarctica" }, - slug: "ATA", - name: "Antarctica", - alpha3: "ATA", - alpha2: "AQ", - countryCode: "010", - iso: "ISO 3166-2:AQ", - subRegion: "", - intermediateRegion: "", - regionCode: "", - subRegionCode: "", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Antigua and Barbuda", - label: { - pt: "Antígua e Barbuda", - en: "Antigua and Barbuda", - fr: "Antigua-et-Barbuda", - }, - slug: "ATG", - name: "Antigua and Barbuda", - alpha3: "ATG", - alpha2: "AG", - countryCode: "028", - iso: "ISO 3166-2:AG", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - continent: "South America", - value: "Argentina", - label: { pt: "Argentina", en: "Argentina", fr: "Argentine" }, - slug: "ARG", - name: "Argentina", - alpha3: "ARG", - alpha2: "AR", - countryCode: "032", - iso: "ISO 3166-2:AR", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Asia", - continent: "Asia", - value: "Armenia", - label: { pt: "Armênia", en: "Armenia", fr: "Arménie" }, - slug: "ARM", - name: "Armenia", - alpha3: "ARM", - alpha2: "AM", - countryCode: "051", - iso: "ISO 3166-2:AM", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Aruba", - label: { en: "Aruba" }, - slug: "ABW", - name: "Aruba", - alpha3: "ABW", - alpha2: "AW", - countryCode: "533", - iso: "ISO 3166-2:AW", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Australia", - label: { pt: "Austrália", en: "Australia", fr: "Australie" }, - slug: "AUS", - name: "Australia", - alpha3: "AUS", - alpha2: "AU", - countryCode: "036", - iso: "ISO 3166-2:AU", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Austria", - label: { pt: "Áustria", en: "Austria", fr: "Autriche" }, - slug: "AUT", - name: "Austria", - alpha3: "AUT", - alpha2: "AT", - countryCode: "040", - iso: "ISO 3166-2:AT", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Azerbaijan", - label: { pt: "Azerbaijão", en: "Azerbaijan", fr: "Azerbaïdjan" }, - slug: "AZE", - name: "Azerbaijan", - alpha3: "AZE", - alpha2: "AZ", - countryCode: "031", - iso: "ISO 3166-2:AZ", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Bahamas", - label: { pt: "Bahamas", en: "Bahamas", fr: "Bahamas" }, - slug: "BHS", - name: "Bahamas", - alpha3: "BHS", - alpha2: "BS", - countryCode: "044", - iso: "ISO 3166-2:BS", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Asia", - continent: "Asia", - value: "Bahrain", - label: { pt: "Bahrein", en: "Bahrain", fr: "Bahreïn" }, - slug: "BHR", - name: "Bahrain", - alpha3: "BHR", - alpha2: "BH", - countryCode: "048", - iso: "ISO 3166-2:BH", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Bangladesh", - label: { pt: "Bangladesh", en: "Bangladesh", fr: "Bangladesh" }, - slug: "BGD", - name: "Bangladesh", - alpha3: "BGD", - alpha2: "BD", - countryCode: "050", - iso: "ISO 3166-2:BD", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Barbados", - label: { pt: "Barbados", en: "Barbados", fr: "Barbade" }, - slug: "BRB", - name: "Barbados", - alpha3: "BRB", - alpha2: "BB", - countryCode: "052", - iso: "ISO 3166-2:BB", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Europe", - continent: "Europe", - value: "Belarus", - label: { pt: "Belarus", en: "Belarus", fr: "Biélorussie" }, - slug: "BLR", - name: "Belarus", - alpha3: "BLR", - alpha2: "BY", - countryCode: "112", - iso: "ISO 3166-2:BY", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Belgium", - label: { pt: "Bélgica", en: "Belgium", fr: "Belgique" }, - slug: "BEL", - name: "Belgium", - alpha3: "BEL", - alpha2: "BE", - countryCode: "056", - iso: "ISO 3166-2:BE", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Belize", - label: { pt: "Belize", en: "Belize", fr: "Belize" }, - slug: "BLZ", - name: "Belize", - alpha3: "BLZ", - alpha2: "BZ", - countryCode: "084", - iso: "ISO 3166-2:BZ", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Africa", - continent: "Africa", - value: "Benin", - label: { pt: "Benin", en: "Benin", fr: "Bénin" }, - slug: "BEN", - name: "Benin", - alpha3: "BEN", - alpha2: "BJ", - countryCode: "204", - iso: "ISO 3166-2:BJ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Americas", - value: "Bermuda", - label: { en: "Bermuda" }, - slug: "BMU", - name: "Bermuda", - alpha3: "BMU", - alpha2: "BM", - countryCode: "060", - iso: "ISO 3166-2:BM", - subRegion: "Northern America", - intermediateRegion: "", - regionCode: "019", - subRegionCode: "021", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Bhutan", - label: { pt: "Butão", en: "Bhutan", fr: "Bhoutan" }, - slug: "BTN", - name: "Bhutan", - alpha3: "BTN", - alpha2: "BT", - countryCode: "064", - iso: "ISO 3166-2:BT", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Bolivia (Plurinational State of)", - label: { en: "Bolivia (Plurinational State of)" }, - slug: "BOL", - name: "Bolivia (Plurinational State of)", - alpha3: "BOL", - alpha2: "BO", - countryCode: "068", - iso: "ISO 3166-2:BO", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Americas", - value: "Bonaire, Sint Eustatius and Saba", - label: { en: "Bonaire, Sint Eustatius and Saba" }, - slug: "BES", - name: "Bonaire, Sint Eustatius and Saba", - alpha3: "BES", - alpha2: "BQ", - countryCode: "535", - iso: "ISO 3166-2:BQ", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Europe", - continent: "Europe", - value: "Bosnia and Herzegovina", - label: { - pt: "Bósnia e Herzegovina", - en: "Bosnia and Herzegovina", - fr: "Bosnie-Herzégovine", - }, - slug: "BIH", - name: "Bosnia and Herzegovina", - alpha3: "BIH", - alpha2: "BA", - countryCode: "070", - iso: "ISO 3166-2:BA", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Botswana", - label: { pt: "Botsuana", en: "Botswana", fr: "Botswana" }, - slug: "BWA", - name: "Botswana", - alpha3: "BWA", - alpha2: "BW", - countryCode: "072", - iso: "ISO 3166-2:BW", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Southern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "018", - }, - { - region: "Americas", - value: "Bouvet Island", - label: { en: "Bouvet Island" }, - slug: "BVT", - name: "Bouvet Island", - alpha3: "BVT", - alpha2: "BV", - countryCode: "074", - iso: "ISO 3166-2:BV", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Americas", - continent: "South America", - value: "Brazil", - label: { pt: "Brasil", en: "Brazil", fr: "Brésil" }, - slug: "BRA", - name: "Brazil", - alpha3: "BRA", - alpha2: "BR", - countryCode: "076", - iso: "ISO 3166-2:BR", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Africa", - value: "British Indian Ocean Territory", - label: { en: "British Indian Ocean Territory" }, - slug: "IOT", - name: "British Indian Ocean Territory", - alpha3: "IOT", - alpha2: "IO", - countryCode: "086", - iso: "ISO 3166-2:IO", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Asia", - value: "Brunei Darussalam", - label: { en: "Brunei Darussalam" }, - slug: "BRN", - name: "Brunei Darussalam", - alpha3: "BRN", - alpha2: "BN", - countryCode: "096", - iso: "ISO 3166-2:BN", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Bulgaria", - label: { pt: "Bulgária", en: "Bulgaria", fr: "Bulgarie" }, - slug: "BGR", - name: "Bulgaria", - alpha3: "BGR", - alpha2: "BG", - countryCode: "100", - iso: "ISO 3166-2:BG", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Burkina Faso", - label: { pt: "Burquina Faso", en: "Burkina Faso", fr: "Burkina Faso" }, - slug: "BFA", - name: "Burkina Faso", - alpha3: "BFA", - alpha2: "BF", - countryCode: "854", - iso: "ISO 3166-2:BF", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Africa", - continent: "Africa", - value: "Burundi", - label: { pt: "Burundi", en: "Burundi", fr: "Burundi" }, - slug: "BDI", - name: "Burundi", - alpha3: "BDI", - alpha2: "BI", - countryCode: "108", - iso: "ISO 3166-2:BI", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "Cabo Verde", - label: { pt: "Cabo Verde", en: "Cabo Verde", fr: "Cap-Vert" }, - slug: "CPV", - name: "Cabo Verde", - alpha3: "CPV", - alpha2: "CV", - countryCode: "132", - iso: "ISO 3166-2:CV", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Asia", - continent: "Asia", - value: "Cambodia", - label: { pt: "Camboja", en: "Cambodia", fr: "Cambodge" }, - slug: "KHM", - name: "Cambodia", - alpha3: "KHM", - alpha2: "KH", - countryCode: "116", - iso: "ISO 3166-2:KH", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Cameroon", - label: { pt: "Camarões", en: "Cameroon", fr: "Cameroun" }, - slug: "CMR", - name: "Cameroon", - alpha3: "CMR", - alpha2: "CM", - countryCode: "120", - iso: "ISO 3166-2:CM", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Americas", - continent: "North America", - value: "Canada", - label: { pt: "Canadá", en: "Canada", fr: "Canada" }, - slug: "CAN", - name: "Canada", - alpha3: "CAN", - alpha2: "CA", - countryCode: "124", - iso: "ISO 3166-2:CA", - subRegion: "Northern America", - intermediateRegion: "", - regionCode: "019", - subRegionCode: "021", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Cayman Islands", - label: { en: "Cayman Islands" }, - slug: "CYM", - name: "Cayman Islands", - alpha3: "CYM", - alpha2: "KY", - countryCode: "136", - iso: "ISO 3166-2:KY", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Africa", - continent: "Africa", - value: "Central African Republic", - label: { - pt: "República Centro-Africana", - en: "Central African Republic", - fr: "République centrafricaine", - }, - slug: "CAF", - name: "Central African Republic", - alpha3: "CAF", - alpha2: "CF", - countryCode: "140", - iso: "ISO 3166-2:CF", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Africa", - continent: "Africa", - value: "Chad", - label: { pt: "Chade", en: "Chad", fr: "Tchad" }, - slug: "TCD", - name: "Chad", - alpha3: "TCD", - alpha2: "TD", - countryCode: "148", - iso: "ISO 3166-2:TD", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Americas", - continent: "South America", - value: "Chile", - label: { pt: "Chile", en: "Chile", fr: "Chili" }, - slug: "CHL", - name: "Chile", - alpha3: "CHL", - alpha2: "CL", - countryCode: "152", - iso: "ISO 3166-2:CL", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Asia", - continent: "Asia", - value: "China", - label: { pt: "China", en: "China", fr: "Chine" }, - slug: "CHN", - name: "China", - alpha3: "CHN", - alpha2: "CN", - countryCode: "156", - iso: "ISO 3166-2:CN", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "Christmas Island", - label: { en: "Christmas Island" }, - slug: "CXR", - name: "Christmas Island", - alpha3: "CXR", - alpha2: "CX", - countryCode: "162", - iso: "ISO 3166-2:CX", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "Cocos (Keeling) Islands", - label: { en: "Cocos (Keeling) Islands" }, - slug: "CCK", - name: "Cocos (Keeling) Islands", - alpha3: "CCK", - alpha2: "CC", - countryCode: "166", - iso: "ISO 3166-2:CC", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "South America", - value: "Colombia", - label: { pt: "Colômbia", en: "Colombia", fr: "Colombie" }, - slug: "COL", - name: "Colombia", - alpha3: "COL", - alpha2: "CO", - countryCode: "170", - iso: "ISO 3166-2:CO", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Africa", - continent: "Africa", - value: "Comoros", - label: { pt: "Comores", en: "Comoros", fr: "Comores" }, - slug: "COM", - name: "Comoros", - alpha3: "COM", - alpha2: "KM", - countryCode: "174", - iso: "ISO 3166-2:KM", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - value: "Congo", - label: { en: "Congo" }, - slug: "COG", - name: "Congo", - alpha3: "COG", - alpha2: "CG", - countryCode: "178", - iso: "ISO 3166-2:CG", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Africa", - value: "Congo, Democratic Republic of the", - label: { en: "Congo, Democratic Republic of the" }, - slug: "COD", - name: "Congo, Democratic Republic of the", - alpha3: "COD", - alpha2: "CD", - countryCode: "180", - iso: "ISO 3166-2:CD", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Oceania", - value: "Cook Islands", - label: { en: "Cook Islands" }, - slug: "COK", - name: "Cook Islands", - alpha3: "COK", - alpha2: "CK", - countryCode: "184", - iso: "ISO 3166-2:CK", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Costa Rica", - label: { pt: "Costa Rica", en: "Costa Rica", fr: "Costa Rica" }, - slug: "CRI", - name: "Costa Rica", - alpha3: "CRI", - alpha2: "CR", - countryCode: "188", - iso: "ISO 3166-2:CR", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Africa", - continent: "Africa", - value: "Côte d'Ivoire", - label: { pt: "Costa do Marfim", en: "Côte d'Ivoire", fr: "Côte d'Ivoire" }, - slug: "CIV", - name: "Côte d'Ivoire", - alpha3: "CIV", - alpha2: "CI", - countryCode: "384", - iso: "ISO 3166-2:CI", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Europe", - continent: "Europe", - value: "Croatia", - label: { pt: "Croácia", en: "Croatia", fr: "Croatie" }, - slug: "HRV", - name: "Croatia", - alpha3: "HRV", - alpha2: "HR", - countryCode: "191", - iso: "ISO 3166-2:HR", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Cuba", - label: { pt: "Cuba", en: "Cuba", fr: "Cuba" }, - slug: "CUB", - name: "Cuba", - alpha3: "CUB", - alpha2: "CU", - countryCode: "192", - iso: "ISO 3166-2:CU", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - value: "Curaçao", - label: { en: "Curaçao" }, - slug: "CUW", - name: "Curaçao", - alpha3: "CUW", - alpha2: "CW", - countryCode: "531", - iso: "ISO 3166-2:CW", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Asia", - continent: "Asia", - value: "Cyprus", - label: { pt: "Chipre", en: "Cyprus", fr: "Chypre" }, - slug: "CYP", - name: "Cyprus", - alpha3: "CYP", - alpha2: "CY", - countryCode: "196", - iso: "ISO 3166-2:CY", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Czechia", - label: { en: "Czechia" }, - slug: "CZE", - name: "Czechia", - alpha3: "CZE", - alpha2: "CZ", - countryCode: "203", - iso: "ISO 3166-2:CZ", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Denmark", - label: { pt: "Dinamarca", en: "Denmark", fr: "Danemark" }, - slug: "DNK", - name: "Denmark", - alpha3: "DNK", - alpha2: "DK", - countryCode: "208", - iso: "ISO 3166-2:DK", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Djibouti", - label: { pt: "Djibuti", en: "Djibouti", fr: "Djibouti" }, - slug: "DJI", - name: "Djibouti", - alpha3: "DJI", - alpha2: "DJ", - countryCode: "262", - iso: "ISO 3166-2:DJ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Americas", - continent: "North America", - value: "Dominica", - label: { pt: "Dominica", en: "Dominica", fr: "Dominique" }, - slug: "DMA", - name: "Dominica", - alpha3: "DMA", - alpha2: "DM", - countryCode: "212", - iso: "ISO 3166-2:DM", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - continent: "North America", - value: "Dominican Republic", - label: { - pt: "República Dominicana", - en: "Dominican Republic", - fr: "République dominicaine", - }, - slug: "DOM", - name: "Dominican Republic", - alpha3: "DOM", - alpha2: "DO", - countryCode: "214", - iso: "ISO 3166-2:DO", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - continent: "South America", - value: "Ecuador", - label: { pt: "Equador", en: "Ecuador", fr: "Équateur" }, - slug: "ECU", - name: "Ecuador", - alpha3: "ECU", - alpha2: "EC", - countryCode: "218", - iso: "ISO 3166-2:EC", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Africa", - continent: "Africa", - value: "Egypt", - label: { pt: "Egito", en: "Egypt", fr: "Égypte" }, - slug: "EGY", - name: "Egypt", - alpha3: "EGY", - alpha2: "EG", - countryCode: "818", - iso: "ISO 3166-2:EG", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "El Salvador", - label: { pt: "El Salvador", en: "El Salvador", fr: "El Salvador" }, - slug: "SLV", - name: "El Salvador", - alpha3: "SLV", - alpha2: "SV", - countryCode: "222", - iso: "ISO 3166-2:SV", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Africa", - continent: "Africa", - value: "Equatorial Guinea", - label: { - pt: "Guiné Equatorial", - en: "Equatorial Guinea", - fr: "Guinée équatoriale", - }, - slug: "GNQ", - name: "Equatorial Guinea", - alpha3: "GNQ", - alpha2: "GQ", - countryCode: "226", - iso: "ISO 3166-2:GQ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Africa", - continent: "Africa", - value: "Eritrea", - label: { pt: "Eritreia", en: "Eritrea", fr: "Érythrée" }, - slug: "ERI", - name: "Eritrea", - alpha3: "ERI", - alpha2: "ER", - countryCode: "232", - iso: "ISO 3166-2:ER", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Europe", - continent: "Europe", - value: "Estonia", - label: { pt: "Estônia", en: "Estonia", fr: "Estonie" }, - slug: "EST", - name: "Estonia", - alpha3: "EST", - alpha2: "EE", - countryCode: "233", - iso: "ISO 3166-2:EE", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Eswatini", - label: { pt: "Eswatini", en: "Eswatini", fr: "Eswatini" }, - slug: "SWZ", - name: "Eswatini", - alpha3: "SWZ", - alpha2: "SZ", - countryCode: "748", - iso: "ISO 3166-2:SZ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Southern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "018", - }, - { - region: "Africa", - continent: "Africa", - value: "Ethiopia", - label: { pt: "Etiópia", en: "Ethiopia", fr: "Éthiopie" }, - slug: "ETH", - name: "Ethiopia", - alpha3: "ETH", - alpha2: "ET", - countryCode: "231", - iso: "ISO 3166-2:ET", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Americas", - value: "Falkland Islands (Malvinas)", - label: { en: "Falkland Islands (Malvinas)" }, - slug: "FLK", - name: "Falkland Islands (Malvinas)", - alpha3: "FLK", - alpha2: "FK", - countryCode: "238", - iso: "ISO 3166-2:FK", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Europe", - value: "Faroe Islands", - label: { en: "Faroe Islands" }, - slug: "FRO", - name: "Faroe Islands", - alpha3: "FRO", - alpha2: "FO", - countryCode: "234", - iso: "ISO 3166-2:FO", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Fiji", - label: { pt: "Fiji", en: "Fiji", fr: "Fidji" }, - slug: "FJI", - name: "Fiji", - alpha3: "FJI", - alpha2: "FJ", - countryCode: "242", - iso: "ISO 3166-2:FJ", - subRegion: "Melanesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "054", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Finland", - label: { pt: "Finlândia", en: "Finland", fr: "Finlande" }, - slug: "FIN", - name: "Finland", - alpha3: "FIN", - alpha2: "FI", - countryCode: "246", - iso: "ISO 3166-2:FI", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "France", - label: { pt: "França", en: "France", fr: "France" }, - slug: "FRA", - name: "France", - alpha3: "FRA", - alpha2: "FR", - countryCode: "250", - iso: "ISO 3166-2:FR", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "French Guiana", - label: { en: "French Guiana" }, - slug: "GUF", - name: "French Guiana", - alpha3: "GUF", - alpha2: "GF", - countryCode: "254", - iso: "ISO 3166-2:GF", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Oceania", - value: "French Polynesia", - label: { en: "French Polynesia" }, - slug: "PYF", - name: "French Polynesia", - alpha3: "PYF", - alpha2: "PF", - countryCode: "258", - iso: "ISO 3166-2:PF", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Africa", - value: "French Southern Territories", - label: { en: "French Southern Territories" }, - slug: "ATF", - name: "French Southern Territories", - alpha3: "ATF", - alpha2: "TF", - countryCode: "260", - iso: "ISO 3166-2:TF", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "Gabon", - label: { pt: "Gabão", en: "Gabon", fr: "Gabon" }, - slug: "GAB", - name: "Gabon", - alpha3: "GAB", - alpha2: "GA", - countryCode: "266", - iso: "ISO 3166-2:GA", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Africa", - continent: "Africa", - value: "Gambia", - label: { pt: "Gâmbia", en: "Gambia", fr: "Gambie" }, - slug: "GMB", - name: "Gambia", - alpha3: "GMB", - alpha2: "GM", - countryCode: "270", - iso: "ISO 3166-2:GM", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Asia", - continent: "Asia", - value: "Georgia", - label: { pt: "Geórgia", en: "Georgia", fr: "Géorgie" }, - slug: "GEO", - name: "Georgia", - alpha3: "GEO", - alpha2: "GE", - countryCode: "268", - iso: "ISO 3166-2:GE", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Germany", - label: { pt: "Alemanha", en: "Germany", fr: "Allemagne" }, - slug: "DEU", - name: "Germany", - alpha3: "DEU", - alpha2: "DE", - countryCode: "276", - iso: "ISO 3166-2:DE", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Ghana", - label: { pt: "Gana", en: "Ghana", fr: "Ghana" }, - slug: "GHA", - name: "Ghana", - alpha3: "GHA", - alpha2: "GH", - countryCode: "288", - iso: "ISO 3166-2:GH", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Europe", - value: "Gibraltar", - label: { en: "Gibraltar" }, - slug: "GIB", - name: "Gibraltar", - alpha3: "GIB", - alpha2: "GI", - countryCode: "292", - iso: "ISO 3166-2:GI", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Greece", - label: { pt: "Grécia", en: "Greece", fr: "Grèce" }, - slug: "GRC", - name: "Greece", - alpha3: "GRC", - alpha2: "GR", - countryCode: "300", - iso: "ISO 3166-2:GR", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Greenland", - label: { en: "Greenland" }, - slug: "GRL", - name: "Greenland", - alpha3: "GRL", - alpha2: "GL", - countryCode: "304", - iso: "ISO 3166-2:GL", - subRegion: "Northern America", - intermediateRegion: "", - regionCode: "019", - subRegionCode: "021", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Grenada", - label: { pt: "Granada", en: "Grenada", fr: "Grenade" }, - slug: "GRD", - name: "Grenada", - alpha3: "GRD", - alpha2: "GD", - countryCode: "308", - iso: "ISO 3166-2:GD", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - value: "Guadeloupe", - label: { en: "Guadeloupe" }, - slug: "GLP", - name: "Guadeloupe", - alpha3: "GLP", - alpha2: "GP", - countryCode: "312", - iso: "ISO 3166-2:GP", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - value: "Guam", - label: { en: "Guam" }, - slug: "GUM", - name: "Guam", - alpha3: "GUM", - alpha2: "GU", - countryCode: "316", - iso: "ISO 3166-2:GU", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Guatemala", - label: { pt: "Guatemala", en: "Guatemala", fr: "Guatemala" }, - slug: "GTM", - name: "Guatemala", - alpha3: "GTM", - alpha2: "GT", - countryCode: "320", - iso: "ISO 3166-2:GT", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Europe", - value: "Guernsey", - label: { en: "Guernsey" }, - slug: "GGY", - name: "Guernsey", - alpha3: "GGY", - alpha2: "GG", - countryCode: "831", - iso: "ISO 3166-2:GG", - subRegion: "Northern Europe", - intermediateRegion: "Channel Islands", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "830", - }, - { - region: "Africa", - continent: "Africa", - value: "Guinea", - label: { pt: "Guiné", en: "Guinea", fr: "Guinée" }, - slug: "GIN", - name: "Guinea", - alpha3: "GIN", - alpha2: "GN", - countryCode: "324", - iso: "ISO 3166-2:GN", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Africa", - continent: "Africa", - value: "Guinea-Bissau", - label: { pt: "Guiné-Bissau", en: "Guinea-Bissau", fr: "Guinée-Bissau" }, - slug: "GNB", - name: "Guinea-Bissau", - alpha3: "GNB", - alpha2: "GW", - countryCode: "624", - iso: "ISO 3166-2:GW", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Americas", - continent: "South America", - value: "Guyana", - label: { pt: "Guiana", en: "Guyana", fr: "Guyana" }, - slug: "GUY", - name: "Guyana", - alpha3: "GUY", - alpha2: "GY", - countryCode: "328", - iso: "ISO 3166-2:GY", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Americas", - continent: "North America", - value: "Haiti", - label: { pt: "Haiti", en: "Haiti", fr: "Haïti" }, - slug: "HTI", - name: "Haiti", - alpha3: "HTI", - alpha2: "HT", - countryCode: "332", - iso: "ISO 3166-2:HT", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - value: "Heard Island and McDonald Islands", - label: { en: "Heard Island and McDonald Islands" }, - slug: "HMD", - name: "Heard Island and McDonald Islands", - alpha3: "HMD", - alpha2: "HM", - countryCode: "334", - iso: "ISO 3166-2:HM", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Holy See", - label: { en: "Holy See" }, - slug: "VAT", - name: "Holy See", - alpha3: "VAT", - alpha2: "VA", - countryCode: "336", - iso: "ISO 3166-2:VA", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Honduras", - label: { pt: "Honduras", en: "Honduras", fr: "Honduras" }, - slug: "HND", - name: "Honduras", - alpha3: "HND", - alpha2: "HN", - countryCode: "340", - iso: "ISO 3166-2:HN", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Asia", - value: "Hong Kong", - label: { en: "Hong Kong" }, - slug: "HKG", - name: "Hong Kong", - alpha3: "HKG", - alpha2: "HK", - countryCode: "344", - iso: "ISO 3166-2:HK", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Hungary", - label: { pt: "Hungria", en: "Hungary", fr: "Hongrie" }, - slug: "HUN", - name: "Hungary", - alpha3: "HUN", - alpha2: "HU", - countryCode: "348", - iso: "ISO 3166-2:HU", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Iceland", - label: { pt: "Islândia", en: "Iceland", fr: "Islande" }, - slug: "ISL", - name: "Iceland", - alpha3: "ISL", - alpha2: "IS", - countryCode: "352", - iso: "ISO 3166-2:IS", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "India", - label: { pt: "Índia", en: "India", fr: "Inde" }, - slug: "IND", - name: "India", - alpha3: "IND", - alpha2: "IN", - countryCode: "356", - iso: "ISO 3166-2:IN", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Indonesia", - label: { pt: "Indonésia", en: "Indonesia", fr: "Indonésie" }, - slug: "IDN", - name: "Indonesia", - alpha3: "IDN", - alpha2: "ID", - countryCode: "360", - iso: "ISO 3166-2:ID", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Iran (Islamic Republic of)", - label: { en: "Iran (Islamic Republic of)" }, - slug: "IRN", - name: "Iran (Islamic Republic of)", - alpha3: "IRN", - alpha2: "IR", - countryCode: "364", - iso: "ISO 3166-2:IR", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Iraq", - label: { pt: "Iraque", en: "Iraq", fr: "Irak" }, - slug: "IRQ", - name: "Iraq", - alpha3: "IRQ", - alpha2: "IQ", - countryCode: "368", - iso: "ISO 3166-2:IQ", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Ireland", - label: { pt: "Irlanda", en: "Ireland", fr: "Irlande" }, - slug: "IRL", - name: "Ireland", - alpha3: "IRL", - alpha2: "IE", - countryCode: "372", - iso: "ISO 3166-2:IE", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Isle of Man", - label: { en: "Isle of Man" }, - slug: "IMN", - name: "Isle of Man", - alpha3: "IMN", - alpha2: "IM", - countryCode: "833", - iso: "ISO 3166-2:IM", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Israel", - label: { pt: "Israel", en: "Israel", fr: "Israël" }, - slug: "ISR", - name: "Israel", - alpha3: "ISR", - alpha2: "IL", - countryCode: "376", - iso: "ISO 3166-2:IL", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Italy", - label: { pt: "Itália", en: "Italy", fr: "Italie" }, - slug: "ITA", - name: "Italy", - alpha3: "ITA", - alpha2: "IT", - countryCode: "380", - iso: "ISO 3166-2:IT", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Jamaica", - label: { pt: "Jamaica", en: "Jamaica", fr: "Jamaïque" }, - slug: "JAM", - name: "Jamaica", - alpha3: "JAM", - alpha2: "JM", - countryCode: "388", - iso: "ISO 3166-2:JM", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Asia", - continent: "Asia", - value: "Japan", - label: { pt: "Japão", en: "Japan", fr: "Japon" }, - slug: "JPN", - name: "Japan", - alpha3: "JPN", - alpha2: "JP", - countryCode: "392", - iso: "ISO 3166-2:JP", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Jersey", - label: { en: "Jersey" }, - slug: "JEY", - name: "Jersey", - alpha3: "JEY", - alpha2: "JE", - countryCode: "832", - iso: "ISO 3166-2:JE", - subRegion: "Northern Europe", - intermediateRegion: "Channel Islands", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "830", - }, - { - region: "Asia", - continent: "Asia", - value: "Jordan", - label: { pt: "Jordânia", en: "Jordan", fr: "Jordanie" }, - slug: "JOR", - name: "Jordan", - alpha3: "JOR", - alpha2: "JO", - countryCode: "400", - iso: "ISO 3166-2:JO", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Kazakhstan", - label: { pt: "Cazaquistão", en: "Kazakhstan", fr: "Kazakhstan" }, - slug: "KAZ", - name: "Kazakhstan", - alpha3: "KAZ", - alpha2: "KZ", - countryCode: "398", - iso: "ISO 3166-2:KZ", - subRegion: "Central Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "143", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Kenya", - label: { pt: "Quênia", en: "Kenya", fr: "Kenya" }, - slug: "KEN", - name: "Kenya", - alpha3: "KEN", - alpha2: "KE", - countryCode: "404", - iso: "ISO 3166-2:KE", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Kiribati", - label: { pt: "Kiribati", en: "Kiribati", fr: "Kiribati" }, - slug: "KIR", - name: "Kiribati", - alpha3: "KIR", - alpha2: "KI", - countryCode: "296", - iso: "ISO 3166-2:KI", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Korea (Democratic People's Republic of)", - label: { en: "Korea (Democratic People's Republic of)" }, - slug: "PRK", - name: "Korea (Democratic People's Republic of)", - alpha3: "PRK", - alpha2: "KP", - countryCode: "408", - iso: "ISO 3166-2:KP", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Korea, Republic of", - label: { en: "Korea, Republic of" }, - slug: "KOR", - name: "Korea, Republic of", - alpha3: "KOR", - alpha2: "KR", - countryCode: "410", - iso: "ISO 3166-2:KR", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Kuwait", - label: { pt: "Kuwait", en: "Kuwait", fr: "Koweït" }, - slug: "KWT", - name: "Kuwait", - alpha3: "KWT", - alpha2: "KW", - countryCode: "414", - iso: "ISO 3166-2:KW", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Kyrgyzstan", - label: { pt: "Quirguistão", en: "Kyrgyzstan", fr: "Kirghizistan" }, - slug: "KGZ", - name: "Kyrgyzstan", - alpha3: "KGZ", - alpha2: "KG", - countryCode: "417", - iso: "ISO 3166-2:KG", - subRegion: "Central Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "143", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Lao People's Democratic Republic", - label: { en: "Lao People's Democratic Republic" }, - slug: "LAO", - name: "Lao People's Democratic Republic", - alpha3: "LAO", - alpha2: "LA", - countryCode: "418", - iso: "ISO 3166-2:LA", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Latvia", - label: { pt: "Letônia", en: "Latvia", fr: "Lettonie" }, - slug: "LVA", - name: "Latvia", - alpha3: "LVA", - alpha2: "LV", - countryCode: "428", - iso: "ISO 3166-2:LV", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Lebanon", - label: { pt: "Líbano", en: "Lebanon", fr: "Liban" }, - slug: "LBN", - name: "Lebanon", - alpha3: "LBN", - alpha2: "LB", - countryCode: "422", - iso: "ISO 3166-2:LB", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Lesotho", - label: { pt: "Lesoto", en: "Lesotho", fr: "Lesotho" }, - slug: "LSO", - name: "Lesotho", - alpha3: "LSO", - alpha2: "LS", - countryCode: "426", - iso: "ISO 3166-2:LS", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Southern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "018", - }, - { - region: "Africa", - continent: "Africa", - value: "Liberia", - label: { pt: "Libéria", en: "Liberia", fr: "Libéria" }, - slug: "LBR", - name: "Liberia", - alpha3: "LBR", - alpha2: "LR", - countryCode: "430", - iso: "ISO 3166-2:LR", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Africa", - continent: "Africa", - value: "Libya", - label: { pt: "Líbia", en: "Libya", fr: "Libye" }, - slug: "LBY", - name: "Libya", - alpha3: "LBY", - alpha2: "LY", - countryCode: "434", - iso: "ISO 3166-2:LY", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Liechtenstein", - label: { pt: "Liechtenstein", en: "Liechtenstein", fr: "Liechtenstein" }, - slug: "LIE", - name: "Liechtenstein", - alpha3: "LIE", - alpha2: "LI", - countryCode: "438", - iso: "ISO 3166-2:LI", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Lithuania", - label: { pt: "Lituânia", en: "Lithuania", fr: "Lituanie" }, - slug: "LTU", - name: "Lithuania", - alpha3: "LTU", - alpha2: "LT", - countryCode: "440", - iso: "ISO 3166-2:LT", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Luxembourg", - label: { pt: "Luxemburgo", en: "Luxembourg", fr: "Luxembourg" }, - slug: "LUX", - name: "Luxembourg", - alpha3: "LUX", - alpha2: "LU", - countryCode: "442", - iso: "ISO 3166-2:LU", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Macao", - label: { en: "Macao" }, - slug: "MAC", - name: "Macao", - alpha3: "MAC", - alpha2: "MO", - countryCode: "446", - iso: "ISO 3166-2:MO", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Madagascar", - label: { pt: "Madagáscar", en: "Madagascar", fr: "Madagascar" }, - slug: "MDG", - name: "Madagascar", - alpha3: "MDG", - alpha2: "MG", - countryCode: "450", - iso: "ISO 3166-2:MG", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "Malawi", - label: { pt: "Malawi", en: "Malawi", fr: "Malawi" }, - slug: "MWI", - name: "Malawi", - alpha3: "MWI", - alpha2: "MW", - countryCode: "454", - iso: "ISO 3166-2:MW", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Asia", - continent: "Asia", - value: "Malaysia", - label: { pt: "Malásia", en: "Malaysia", fr: "Malaisie" }, - slug: "MYS", - name: "Malaysia", - alpha3: "MYS", - alpha2: "MY", - countryCode: "458", - iso: "ISO 3166-2:MY", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Maldives", - label: { pt: "Maldivas", en: "Maldives", fr: "Maldives" }, - slug: "MDV", - name: "Maldives", - alpha3: "MDV", - alpha2: "MV", - countryCode: "462", - iso: "ISO 3166-2:MV", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Mali", - label: { pt: "Mali", en: "Mali", fr: "Mali" }, - slug: "MLI", - name: "Mali", - alpha3: "MLI", - alpha2: "ML", - countryCode: "466", - iso: "ISO 3166-2:ML", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Europe", - continent: "Europe", - value: "Malta", - label: { pt: "Malta", en: "Malta", fr: "Malte" }, - slug: "MLT", - name: "Malta", - alpha3: "MLT", - alpha2: "MT", - countryCode: "470", - iso: "ISO 3166-2:MT", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Marshall Islands", - label: { - pt: "Ilhas Marshall", - en: "Marshall Islands", - fr: "Îles Marshall", - }, - slug: "MHL", - name: "Marshall Islands", - alpha3: "MHL", - alpha2: "MH", - countryCode: "584", - iso: "ISO 3166-2:MH", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Martinique", - label: { en: "Martinique" }, - slug: "MTQ", - name: "Martinique", - alpha3: "MTQ", - alpha2: "MQ", - countryCode: "474", - iso: "ISO 3166-2:MQ", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Africa", - continent: "Africa", - value: "Mauritania", - label: { pt: "Mauritânia", en: "Mauritania", fr: "Mauritanie" }, - slug: "MRT", - name: "Mauritania", - alpha3: "MRT", - alpha2: "MR", - countryCode: "478", - iso: "ISO 3166-2:MR", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Africa", - continent: "Africa", - value: "Mauritius", - label: { pt: "Maurício", en: "Mauritius", fr: "Maurice" }, - slug: "MUS", - name: "Mauritius", - alpha3: "MUS", - alpha2: "MU", - countryCode: "480", - iso: "ISO 3166-2:MU", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - value: "Mayotte", - label: { en: "Mayotte" }, - slug: "MYT", - name: "Mayotte", - alpha3: "MYT", - alpha2: "YT", - countryCode: "175", - iso: "ISO 3166-2:YT", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Americas", - continent: "North America", - value: "Mexico", - label: { pt: "México", en: "Mexico", fr: "Mexique" }, - slug: "MEX", - name: "Mexico", - alpha3: "MEX", - alpha2: "MX", - countryCode: "484", - iso: "ISO 3166-2:MX", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Oceania", - value: "Micronesia (Federated States of)", - label: { en: "Micronesia (Federated States of)" }, - slug: "FSM", - name: "Micronesia (Federated States of)", - alpha3: "FSM", - alpha2: "FM", - countryCode: "583", - iso: "ISO 3166-2:FM", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Moldova, Republic of", - label: { en: "Moldova, Republic of" }, - slug: "MDA", - name: "Moldova, Republic of", - alpha3: "MDA", - alpha2: "MD", - countryCode: "498", - iso: "ISO 3166-2:MD", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Monaco", - label: { pt: "Mônaco", en: "Monaco", fr: "Monaco" }, - slug: "MCO", - name: "Monaco", - alpha3: "MCO", - alpha2: "MC", - countryCode: "492", - iso: "ISO 3166-2:MC", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Mongolia", - label: { pt: "Mongólia", en: "Mongolia", fr: "Mongolie" }, - slug: "MNG", - name: "Mongolia", - alpha3: "MNG", - alpha2: "MN", - countryCode: "496", - iso: "ISO 3166-2:MN", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Montenegro", - label: { pt: "Montenegro", en: "Montenegro", fr: "Monténégro" }, - slug: "MNE", - name: "Montenegro", - alpha3: "MNE", - alpha2: "ME", - countryCode: "499", - iso: "ISO 3166-2:ME", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Montserrat", - label: { en: "Montserrat" }, - slug: "MSR", - name: "Montserrat", - alpha3: "MSR", - alpha2: "MS", - countryCode: "500", - iso: "ISO 3166-2:MS", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Africa", - continent: "Africa", - value: "Morocco", - label: { pt: "Marrocos", en: "Morocco", fr: "Maroc" }, - slug: "MAR", - name: "Morocco", - alpha3: "MAR", - alpha2: "MA", - countryCode: "504", - iso: "ISO 3166-2:MA", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Mozambique", - label: { pt: "Moçambique", en: "Mozambique", fr: "Mozambique" }, - slug: "MOZ", - name: "Mozambique", - alpha3: "MOZ", - alpha2: "MZ", - countryCode: "508", - iso: "ISO 3166-2:MZ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Asia", - continent: "Asia", - value: "Myanmar", - label: { pt: "Myanmar", en: "Myanmar", fr: "Myanmar" }, - slug: "MMR", - name: "Myanmar", - alpha3: "MMR", - alpha2: "MM", - countryCode: "104", - iso: "ISO 3166-2:MM", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Namibia", - label: { pt: "Namíbia", en: "Namibia", fr: "Namibie" }, - slug: "NAM", - name: "Namibia", - alpha3: "NAM", - alpha2: "NA", - countryCode: "516", - iso: "ISO 3166-2:NA", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Southern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "018", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Nauru", - label: { pt: "Nauru", en: "Nauru", fr: "Nauru" }, - slug: "NRU", - name: "Nauru", - alpha3: "NRU", - alpha2: "NR", - countryCode: "520", - iso: "ISO 3166-2:NR", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Nepal", - label: { pt: "Nepal", en: "Nepal", fr: "Népal" }, - slug: "NPL", - name: "Nepal", - alpha3: "NPL", - alpha2: "NP", - countryCode: "524", - iso: "ISO 3166-2:NP", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Netherlands", - label: { pt: "Países Baixos", en: "Netherlands", fr: "Pays-Bas" }, - slug: "NLD", - name: "Netherlands", - alpha3: "NLD", - alpha2: "NL", - countryCode: "528", - iso: "ISO 3166-2:NL", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "New Caledonia", - label: { en: "New Caledonia" }, - slug: "NCL", - name: "New Caledonia", - alpha3: "NCL", - alpha2: "NC", - countryCode: "540", - iso: "ISO 3166-2:NC", - subRegion: "Melanesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "054", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "New Zealand", - label: { pt: "Nova Zelândia", en: "New Zealand", fr: "Nouvelle-Zélande" }, - slug: "NZL", - name: "New Zealand", - alpha3: "NZL", - alpha2: "NZ", - countryCode: "554", - iso: "ISO 3166-2:NZ", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Nicaragua", - label: { pt: "Nicarágua", en: "Nicaragua", fr: "Nicaragua" }, - slug: "NIC", - name: "Nicaragua", - alpha3: "NIC", - alpha2: "NI", - countryCode: "558", - iso: "ISO 3166-2:NI", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Africa", - continent: "Africa", - value: "Niger", - label: { pt: "Níger", en: "Niger", fr: "Niger" }, - slug: "NER", - name: "Niger", - alpha3: "NER", - alpha2: "NE", - countryCode: "562", - iso: "ISO 3166-2:NE", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Africa", - continent: "Africa", - value: "Nigeria", - label: { pt: "Nigéria", en: "Nigeria", fr: "Nigeria" }, - slug: "NGA", - name: "Nigeria", - alpha3: "NGA", - alpha2: "NG", - countryCode: "566", - iso: "ISO 3166-2:NG", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Oceania", - value: "Niue", - label: { en: "Niue" }, - slug: "NIU", - name: "Niue", - alpha3: "NIU", - alpha2: "NU", - countryCode: "570", - iso: "ISO 3166-2:NU", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "Norfolk Island", - label: { en: "Norfolk Island" }, - slug: "NFK", - name: "Norfolk Island", - alpha3: "NFK", - alpha2: "NF", - countryCode: "574", - iso: "ISO 3166-2:NF", - subRegion: "Australia and New Zealand", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "053", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "North Macedonia", - label: { - pt: "Macedônia do Norte", - en: "North Macedonia", - fr: "Macédoine du Nord", - }, - slug: "MKD", - name: "North Macedonia", - alpha3: "MKD", - alpha2: "MK", - countryCode: "807", - iso: "ISO 3166-2:MK", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "Northern Mariana Islands", - label: { en: "Northern Mariana Islands" }, - slug: "MNP", - name: "Northern Mariana Islands", - alpha3: "MNP", - alpha2: "MP", - countryCode: "580", - iso: "ISO 3166-2:MP", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Norway", - label: { pt: "Noruega", en: "Norway", fr: "Norvège" }, - slug: "NOR", - name: "Norway", - alpha3: "NOR", - alpha2: "NO", - countryCode: "578", - iso: "ISO 3166-2:NO", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Oman", - label: { pt: "Omã", en: "Oman", fr: "Oman" }, - slug: "OMN", - name: "Oman", - alpha3: "OMN", - alpha2: "OM", - countryCode: "512", - iso: "ISO 3166-2:OM", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Pakistan", - label: { pt: "Paquistão", en: "Pakistan", fr: "Pakistan" }, - slug: "PAK", - name: "Pakistan", - alpha3: "PAK", - alpha2: "PK", - countryCode: "586", - iso: "ISO 3166-2:PK", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Palau", - label: { pt: "Palau", en: "Palau", fr: "Palaos" }, - slug: "PLW", - name: "Palau", - alpha3: "PLW", - alpha2: "PW", - countryCode: "585", - iso: "ISO 3166-2:PW", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Palestine, State of", - label: { en: "Palestine, State of" }, - slug: "PSE", - name: "Palestine, State of", - alpha3: "PSE", - alpha2: "PS", - countryCode: "275", - iso: "ISO 3166-2:PS", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Panama", - label: { pt: "Panamá", en: "Panama", fr: "Panama" }, - slug: "PAN", - name: "Panama", - alpha3: "PAN", - alpha2: "PA", - countryCode: "591", - iso: "ISO 3166-2:PA", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Central America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "013", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Papua New Guinea", - label: { - pt: "Papua-Nova Guiné", - en: "Papua New Guinea", - fr: "Papouasie-Nouvelle-Guinée", - }, - slug: "PNG", - name: "Papua New Guinea", - alpha3: "PNG", - alpha2: "PG", - countryCode: "598", - iso: "ISO 3166-2:PG", - subRegion: "Melanesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "054", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "South America", - value: "Paraguay", - label: { pt: "Paraguai", en: "Paraguay", fr: "Paraguay" }, - slug: "PRY", - name: "Paraguay", - alpha3: "PRY", - alpha2: "PY", - countryCode: "600", - iso: "ISO 3166-2:PY", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Americas", - continent: "South America", - value: "Peru", - label: { pt: "Peru", en: "Peru", fr: "Pérou" }, - slug: "PER", - name: "Peru", - alpha3: "PER", - alpha2: "PE", - countryCode: "604", - iso: "ISO 3166-2:PE", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Asia", - continent: "Asia", - value: "Philippines", - label: { pt: "Filipinas", en: "Philippines", fr: "Philippines" }, - slug: "PHL", - name: "Philippines", - alpha3: "PHL", - alpha2: "PH", - countryCode: "608", - iso: "ISO 3166-2:PH", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "Pitcairn", - label: { en: "Pitcairn" }, - slug: "PCN", - name: "Pitcairn", - alpha3: "PCN", - alpha2: "PN", - countryCode: "612", - iso: "ISO 3166-2:PN", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Poland", - label: { pt: "Polônia", en: "Poland", fr: "Pologne" }, - slug: "POL", - name: "Poland", - alpha3: "POL", - alpha2: "PL", - countryCode: "616", - iso: "ISO 3166-2:PL", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Portugal", - label: { pt: "Portugal", en: "Portugal", fr: "Portugal" }, - slug: "PRT", - name: "Portugal", - alpha3: "PRT", - alpha2: "PT", - countryCode: "620", - iso: "ISO 3166-2:PT", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Puerto Rico", - label: { en: "Puerto Rico" }, - slug: "PRI", - name: "Puerto Rico", - alpha3: "PRI", - alpha2: "PR", - countryCode: "630", - iso: "ISO 3166-2:PR", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Asia", - continent: "Asia", - value: "Qatar", - label: { pt: "Catar", en: "Qatar", fr: "Qatar" }, - slug: "QAT", - name: "Qatar", - alpha3: "QAT", - alpha2: "QA", - countryCode: "634", - iso: "ISO 3166-2:QA", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Africa", - value: "Réunion", - label: { en: "Réunion" }, - slug: "REU", - name: "Réunion", - alpha3: "REU", - alpha2: "RE", - countryCode: "638", - iso: "ISO 3166-2:RE", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Europe", - continent: "Europe", - value: "Romania", - label: { pt: "Romênia", en: "Romania", fr: "Roumanie" }, - slug: "ROU", - name: "Romania", - alpha3: "ROU", - alpha2: "RO", - countryCode: "642", - iso: "ISO 3166-2:RO", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "Russian Federation", - label: { en: "Russian Federation" }, - slug: "RUS", - name: "Russian Federation", - alpha3: "RUS", - alpha2: "RU", - countryCode: "643", - iso: "ISO 3166-2:RU", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Rwanda", - label: { pt: "Ruanda", en: "Rwanda", fr: "Rwanda" }, - slug: "RWA", - name: "Rwanda", - alpha3: "RWA", - alpha2: "RW", - countryCode: "646", - iso: "ISO 3166-2:RW", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Americas", - value: "Saint Barthélemy", - label: { en: "Saint Barthélemy" }, - slug: "BLM", - name: "Saint Barthélemy", - alpha3: "BLM", - alpha2: "BL", - countryCode: "652", - iso: "ISO 3166-2:BL", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Africa", - value: "Saint Helena, Ascension and Tristan da Cunha", - label: { en: "Saint Helena, Ascension and Tristan da Cunha" }, - slug: "SHN", - name: "Saint Helena, Ascension and Tristan da Cunha", - alpha3: "SHN", - alpha2: "SH", - countryCode: "654", - iso: "ISO 3166-2:SH", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Americas", - continent: "North America", - value: "Saint Kitts and Nevis", - label: { - pt: "São Cristóvão e Nevis", - en: "Saint Kitts and Nevis", - fr: "Saint-Christophe-et-Niévès", - }, - slug: "KNA", - name: "Saint Kitts and Nevis", - alpha3: "KNA", - alpha2: "KN", - countryCode: "659", - iso: "ISO 3166-2:KN", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - continent: "North America", - value: "Saint Lucia", - label: { pt: "Santa Lúcia", en: "Saint Lucia", fr: "Sainte-Lucie" }, - slug: "LCA", - name: "Saint Lucia", - alpha3: "LCA", - alpha2: "LC", - countryCode: "662", - iso: "ISO 3166-2:LC", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - value: "Saint Martin (French part)", - label: { en: "Saint Martin (French part)" }, - slug: "MAF", - name: "Saint Martin (French part)", - alpha3: "MAF", - alpha2: "MF", - countryCode: "663", - iso: "ISO 3166-2:MF", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - value: "Saint Pierre and Miquelon", - label: { en: "Saint Pierre and Miquelon" }, - slug: "SPM", - name: "Saint Pierre and Miquelon", - alpha3: "SPM", - alpha2: "PM", - countryCode: "666", - iso: "ISO 3166-2:PM", - subRegion: "Northern America", - intermediateRegion: "", - regionCode: "019", - subRegionCode: "021", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Saint Vincent and the Grenadines", - label: { - pt: "São Vicente e Granadinas", - en: "Saint Vincent and the Grenadines", - fr: "Saint-Vincent-et-les Grenadines", - }, - slug: "VCT", - name: "Saint Vincent and the Grenadines", - alpha3: "VCT", - alpha2: "VC", - countryCode: "670", - iso: "ISO 3166-2:VC", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Samoa", - label: { pt: "Samoa", en: "Samoa", fr: "Samoa" }, - slug: "WSM", - name: "Samoa", - alpha3: "WSM", - alpha2: "WS", - countryCode: "882", - iso: "ISO 3166-2:WS", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "San Marino", - label: { pt: "San Marino", en: "San Marino", fr: "Saint-Marin" }, - slug: "SMR", - name: "San Marino", - alpha3: "SMR", - alpha2: "SM", - countryCode: "674", - iso: "ISO 3166-2:SM", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Sao Tome and Principe", - label: { - pt: "São Tomé e Príncipe", - en: "Sao Tome and Principe", - fr: "Sao Tomé-et-Principe", - }, - slug: "STP", - name: "Sao Tome and Principe", - alpha3: "STP", - alpha2: "ST", - countryCode: "678", - iso: "ISO 3166-2:ST", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Middle Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "017", - }, - { - region: "Asia", - continent: "Asia", - value: "Saudi Arabia", - label: { pt: "Arábia Saudita", en: "Saudi Arabia", fr: "Arabie saoudite" }, - slug: "SAU", - name: "Saudi Arabia", - alpha3: "SAU", - alpha2: "SA", - countryCode: "682", - iso: "ISO 3166-2:SA", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Senegal", - label: { pt: "Senegal", en: "Senegal", fr: "Sénégal" }, - slug: "SEN", - name: "Senegal", - alpha3: "SEN", - alpha2: "SN", - countryCode: "686", - iso: "ISO 3166-2:SN", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Europe", - continent: "Europe", - value: "Serbia", - label: { pt: "Sérvia", en: "Serbia", fr: "Serbie" }, - slug: "SRB", - name: "Serbia", - alpha3: "SRB", - alpha2: "RS", - countryCode: "688", - iso: "ISO 3166-2:RS", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Seychelles", - label: { pt: "Seychelles", en: "Seychelles", fr: "Seychelles" }, - slug: "SYC", - name: "Seychelles", - alpha3: "SYC", - alpha2: "SC", - countryCode: "690", - iso: "ISO 3166-2:SC", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "Sierra Leone", - label: { pt: "Serra Leoa", en: "Sierra Leone", fr: "Sierra Leone" }, - slug: "SLE", - name: "Sierra Leone", - alpha3: "SLE", - alpha2: "SL", - countryCode: "694", - iso: "ISO 3166-2:SL", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Asia", - continent: "Asia", - value: "Singapore", - label: { pt: "Singapura", en: "Singapore", fr: "Singapour" }, - slug: "SGP", - name: "Singapore", - alpha3: "SGP", - alpha2: "SG", - countryCode: "702", - iso: "ISO 3166-2:SG", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Sint Maarten (Dutch part)", - label: { en: "Sint Maarten (Dutch part)" }, - slug: "SXM", - name: "Sint Maarten (Dutch part)", - alpha3: "SXM", - alpha2: "SX", - countryCode: "534", - iso: "ISO 3166-2:SX", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Europe", - continent: "Europe", - value: "Slovakia", - label: { pt: "Eslováquia", en: "Slovakia", fr: "Slovaquie" }, - slug: "SVK", - name: "Slovakia", - alpha3: "SVK", - alpha2: "SK", - countryCode: "703", - iso: "ISO 3166-2:SK", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Slovenia", - label: { pt: "Eslovênia", en: "Slovenia", fr: "Slovénie" }, - slug: "SVN", - name: "Slovenia", - alpha3: "SVN", - alpha2: "SI", - countryCode: "705", - iso: "ISO 3166-2:SI", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Solomon Islands", - label: { pt: "Ilhas Salomão", en: "Solomon Islands", fr: "Îles Salomon" }, - slug: "SLB", - name: "Solomon Islands", - alpha3: "SLB", - alpha2: "SB", - countryCode: "090", - iso: "ISO 3166-2:SB", - subRegion: "Melanesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "054", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Somalia", - label: { pt: "Somália", en: "Somalia", fr: "Somalie" }, - slug: "SOM", - name: "Somalia", - alpha3: "SOM", - alpha2: "SO", - countryCode: "706", - iso: "ISO 3166-2:SO", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "South Africa", - label: { pt: "África do Sul", en: "South Africa", fr: "Afrique du Sud" }, - slug: "ZAF", - name: "South Africa", - alpha3: "ZAF", - alpha2: "ZA", - countryCode: "710", - iso: "ISO 3166-2:ZA", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Southern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "018", - }, - { - region: "Americas", - value: "South Georgia and the South Sandwich Islands", - label: { en: "South Georgia and the South Sandwich Islands" }, - slug: "SGS", - name: "South Georgia and the South Sandwich Islands", - alpha3: "SGS", - alpha2: "GS", - countryCode: "239", - iso: "ISO 3166-2:GS", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Africa", - continent: "Africa", - value: "South Sudan", - label: { pt: "Sudão do Sul", en: "South Sudan", fr: "Soudan du Sud" }, - slug: "SSD", - name: "South Sudan", - alpha3: "SSD", - alpha2: "SS", - countryCode: "728", - iso: "ISO 3166-2:SS", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Europe", - continent: "Europe", - value: "Spain", - label: { pt: "Espanha", en: "Spain", fr: "Espagne" }, - slug: "ESP", - name: "Spain", - alpha3: "ESP", - alpha2: "ES", - countryCode: "724", - iso: "ISO 3166-2:ES", - subRegion: "Southern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "039", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Sri Lanka", - label: { pt: "Sri Lanka", en: "Sri Lanka", fr: "Sri Lanka" }, - slug: "LKA", - name: "Sri Lanka", - alpha3: "LKA", - alpha2: "LK", - countryCode: "144", - iso: "ISO 3166-2:LK", - subRegion: "Southern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "034", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Sudan", - label: { pt: "Sudão", en: "Sudan", fr: "Soudan" }, - slug: "SDN", - name: "Sudan", - alpha3: "SDN", - alpha2: "SD", - countryCode: "729", - iso: "ISO 3166-2:SD", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "South America", - value: "Suriname", - label: { pt: "Suriname", en: "Suriname", fr: "Suriname" }, - slug: "SUR", - name: "Suriname", - alpha3: "SUR", - alpha2: "SR", - countryCode: "740", - iso: "ISO 3166-2:SR", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Europe", - value: "Svalbard and Jan Mayen", - label: { en: "Svalbard and Jan Mayen" }, - slug: "SJM", - name: "Svalbard and Jan Mayen", - alpha3: "SJM", - alpha2: "SJ", - countryCode: "744", - iso: "ISO 3166-2:SJ", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Sweden", - label: { pt: "Suécia", en: "Sweden", fr: "Suède" }, - slug: "SWE", - name: "Sweden", - alpha3: "SWE", - alpha2: "SE", - countryCode: "752", - iso: "ISO 3166-2:SE", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Europe", - continent: "Europe", - value: "Switzerland", - label: { pt: "Suíça", en: "Switzerland", fr: "Suisse" }, - slug: "CHE", - name: "Switzerland", - alpha3: "CHE", - alpha2: "CH", - countryCode: "756", - iso: "ISO 3166-2:CH", - subRegion: "Western Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "155", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Syrian Arab Republic", - label: { en: "Syrian Arab Republic" }, - slug: "SYR", - name: "Syrian Arab Republic", - alpha3: "SYR", - alpha2: "SY", - countryCode: "760", - iso: "ISO 3166-2:SY", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - value: "Taiwan, Province of China", - label: { en: "Taiwan, Province of China" }, - slug: "TWN", - name: "Taiwan, Province of China", - alpha3: "TWN", - alpha2: "TW", - countryCode: "158", - iso: "ISO 3166-2:TW", - subRegion: "Eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "030", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Tajikistan", - label: { pt: "Tajiquistão", en: "Tajikistan", fr: "Tadjikistan" }, - slug: "TJK", - name: "Tajikistan", - alpha3: "TJK", - alpha2: "TJ", - countryCode: "762", - iso: "ISO 3166-2:TJ", - subRegion: "Central Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "143", - intermediateRegionCode: "", - }, - { - region: "Africa", - value: "Tanzania, United Republic of", - label: { en: "Tanzania, United Republic of" }, - slug: "TZA", - name: "Tanzania, United Republic of", - alpha3: "TZA", - alpha2: "TZ", - countryCode: "834", - iso: "ISO 3166-2:TZ", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Asia", - continent: "Asia", - value: "Thailand", - label: { pt: "Tailândia", en: "Thailand", fr: "Thaïlande" }, - slug: "THA", - name: "Thailand", - alpha3: "THA", - alpha2: "TH", - countryCode: "764", - iso: "ISO 3166-2:TH", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Timor-Leste", - label: { pt: "Timor-Leste", en: "Timor-Leste", fr: "Timor oriental" }, - slug: "TLS", - name: "Timor-Leste", - alpha3: "TLS", - alpha2: "TL", - countryCode: "626", - iso: "ISO 3166-2:TL", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Togo", - label: { pt: "Togo", en: "Togo", fr: "Togo" }, - slug: "TGO", - name: "Togo", - alpha3: "TGO", - alpha2: "TG", - countryCode: "768", - iso: "ISO 3166-2:TG", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Western Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "011", - }, - { - region: "Oceania", - value: "Tokelau", - label: { en: "Tokelau" }, - slug: "TKL", - name: "Tokelau", - alpha3: "TKL", - alpha2: "TK", - countryCode: "772", - iso: "ISO 3166-2:TK", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Tonga", - label: { pt: "Tonga", en: "Tonga", fr: "Tonga" }, - slug: "TON", - name: "Tonga", - alpha3: "TON", - alpha2: "TO", - countryCode: "776", - iso: "ISO 3166-2:TO", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "North America", - value: "Trinidad and Tobago", - label: { - pt: "Trinidad e Tobago", - en: "Trinidad and Tobago", - fr: "Trinidad-et-Tobago", - }, - slug: "TTO", - name: "Trinidad and Tobago", - alpha3: "TTO", - alpha2: "TT", - countryCode: "780", - iso: "ISO 3166-2:TT", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Africa", - continent: "Africa", - value: "Tunisia", - label: { pt: "Tunísia", en: "Tunisia", fr: "Tunisie" }, - slug: "TUN", - name: "Tunisia", - alpha3: "TUN", - alpha2: "TN", - countryCode: "788", - iso: "ISO 3166-2:TN", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Turkey", - label: { pt: "Turquia", en: "Turkey", fr: "Turquie" }, - slug: "TUR", - name: "Turkey", - alpha3: "TUR", - alpha2: "TR", - countryCode: "792", - iso: "ISO 3166-2:TR", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Turkmenistan", - label: { pt: "Turcomenistão", en: "Turkmenistan", fr: "Turkménistan" }, - slug: "TKM", - name: "Turkmenistan", - alpha3: "TKM", - alpha2: "TM", - countryCode: "795", - iso: "ISO 3166-2:TM", - subRegion: "Central Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "143", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Turks and Caicos Islands", - label: { en: "Turks and Caicos Islands" }, - slug: "TCA", - name: "Turks and Caicos Islands", - alpha3: "TCA", - alpha2: "TC", - countryCode: "796", - iso: "ISO 3166-2:TC", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Tuvalu", - label: { pt: "Tuvalu", en: "Tuvalu", fr: "Tuvalu" }, - slug: "TUV", - name: "Tuvalu", - alpha3: "TUV", - alpha2: "TV", - countryCode: "798", - iso: "ISO 3166-2:TV", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Uganda", - label: { pt: "Uganda", en: "Uganda", fr: "Ouganda" }, - slug: "UGA", - name: "Uganda", - alpha3: "UGA", - alpha2: "UG", - countryCode: "800", - iso: "ISO 3166-2:UG", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Europe", - continent: "Europe", - value: "Ukraine", - label: { pt: "Ucrânia", en: "Ukraine", fr: "Ukraine" }, - slug: "UKR", - name: "Ukraine", - alpha3: "UKR", - alpha2: "UA", - countryCode: "804", - iso: "ISO 3166-2:UA", - subRegion: "Eastern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "151", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "United Arab Emirates", - label: { - pt: "Emirados Árabes Unidos", - en: "United Arab Emirates", - fr: "Émirats arabes unis", - }, - slug: "ARE", - name: "United Arab Emirates", - alpha3: "ARE", - alpha2: "AE", - countryCode: "784", - iso: "ISO 3166-2:AE", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Europe", - value: "United Kingdom of Great Britain and Northern Ireland", - label: { en: "United Kingdom of Great Britain and Northern Ireland" }, - slug: "GBR", - name: "United Kingdom of Great Britain and Northern Ireland", - alpha3: "GBR", - alpha2: "GB", - countryCode: "826", - iso: "ISO 3166-2:GB", - subRegion: "Northern Europe", - intermediateRegion: "", - regionCode: "150", - subRegionCode: "154", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "United States of America", - label: { en: "United States of America" }, - slug: "USA", - name: "United States of America", - alpha3: "USA", - alpha2: "US", - countryCode: "840", - iso: "ISO 3166-2:US", - subRegion: "Northern America", - intermediateRegion: "", - regionCode: "019", - subRegionCode: "021", - intermediateRegionCode: "", - }, - { - region: "Oceania", - value: "United States Minor Outlying Islands", - label: { en: "United States Minor Outlying Islands" }, - slug: "UMI", - name: "United States Minor Outlying Islands", - alpha3: "UMI", - alpha2: "UM", - countryCode: "581", - iso: "ISO 3166-2:UM", - subRegion: "Micronesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "057", - intermediateRegionCode: "", - }, - { - region: "Americas", - continent: "South America", - value: "Uruguay", - label: { pt: "Uruguai", en: "Uruguay", fr: "Uruguay" }, - slug: "URY", - name: "Uruguay", - alpha3: "URY", - alpha2: "UY", - countryCode: "858", - iso: "ISO 3166-2:UY", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Asia", - continent: "Asia", - value: "Uzbekistan", - label: { pt: "Uzbequistão", en: "Uzbekistan", fr: "Ouzbékistan" }, - slug: "UZB", - name: "Uzbekistan", - alpha3: "UZB", - alpha2: "UZ", - countryCode: "860", - iso: "ISO 3166-2:UZ", - subRegion: "Central Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "143", - intermediateRegionCode: "", - }, - { - region: "Oceania", - continent: "Oceania", - value: "Vanuatu", - label: { pt: "Vanuatu", en: "Vanuatu", fr: "Vanuatu" }, - slug: "VUT", - name: "Vanuatu", - alpha3: "VUT", - alpha2: "VU", - countryCode: "548", - iso: "ISO 3166-2:VU", - subRegion: "Melanesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "054", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Venezuela (Bolivarian Republic of)", - label: { en: "Venezuela (Bolivarian Republic of)" }, - slug: "VEN", - name: "Venezuela (Bolivarian Republic of)", - alpha3: "VEN", - alpha2: "VE", - countryCode: "862", - iso: "ISO 3166-2:VE", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "South America", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "005", - }, - { - region: "Asia", - value: "Viet Nam", - label: { en: "Viet Nam" }, - slug: "VNM", - name: "Viet Nam", - alpha3: "VNM", - alpha2: "VN", - countryCode: "704", - iso: "ISO 3166-2:VN", - subRegion: "South-eastern Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "035", - intermediateRegionCode: "", - }, - { - region: "Americas", - value: "Virgin Islands (British)", - label: { en: "Virgin Islands (British)" }, - slug: "VGB", - name: "Virgin Islands (British)", - alpha3: "VGB", - alpha2: "VG", - countryCode: "092", - iso: "ISO 3166-2:VG", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Americas", - value: "Virgin Islands (U.S.)", - label: { en: "Virgin Islands (U.S.)" }, - slug: "VIR", - name: "Virgin Islands (U.S.)", - alpha3: "VIR", - alpha2: "VI", - countryCode: "850", - iso: "ISO 3166-2:VI", - subRegion: "Latin America and the Caribbean", - intermediateRegion: "Caribbean", - regionCode: "019", - subRegionCode: "419", - intermediateRegionCode: "029", - }, - { - region: "Oceania", - value: "Wallis and Futuna", - label: { en: "Wallis and Futuna" }, - slug: "WLF", - name: "Wallis and Futuna", - alpha3: "WLF", - alpha2: "WF", - countryCode: "876", - iso: "ISO 3166-2:WF", - subRegion: "Polynesia", - intermediateRegion: "", - regionCode: "009", - subRegionCode: "061", - intermediateRegionCode: "", - }, - { - region: "Africa", - value: "Western Sahara", - label: { en: "Western Sahara" }, - slug: "ESH", - name: "Western Sahara", - alpha3: "ESH", - alpha2: "EH", - countryCode: "732", - iso: "ISO 3166-2:EH", - subRegion: "Northern Africa", - intermediateRegion: "", - regionCode: "002", - subRegionCode: "015", - intermediateRegionCode: "", - }, - { - region: "Asia", - continent: "Asia", - value: "Yemen", - label: { pt: "Iêmen", en: "Yemen", fr: "Yémen" }, - slug: "YEM", - name: "Yemen", - alpha3: "YEM", - alpha2: "YE", - countryCode: "887", - iso: "ISO 3166-2:YE", - subRegion: "Western Asia", - intermediateRegion: "", - regionCode: "142", - subRegionCode: "145", - intermediateRegionCode: "", - }, - { - region: "Africa", - continent: "Africa", - value: "Zambia", - label: { pt: "Zâmbia", en: "Zambia", fr: "Zambie" }, - slug: "ZMB", - name: "Zambia", - alpha3: "ZMB", - alpha2: "ZM", - countryCode: "894", - iso: "ISO 3166-2:ZM", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, - { - region: "Africa", - continent: "Africa", - value: "Zimbabwe", - label: { pt: "Zimbábue", en: "Zimbabwe", fr: "Zimbabwe" }, - slug: "ZWE", - name: "Zimbabwe", - alpha3: "ZWE", - alpha2: "ZW", - countryCode: "716", - iso: "ISO 3166-2:ZW", - subRegion: "Sub-Saharan Africa", - intermediateRegion: "Eastern Africa", - regionCode: "002", - subRegionCode: "202", - intermediateRegionCode: "014", - }, -]; - -export const countriesByContinent = (continent) => { - return countries - .filter((country) => continent === country.continent) - .map((country) => ({ - value: country.alpha3, - label: country.label, - })); -}; - -export const allCountries = countries.map((country) => ({ - value: country.alpha3, - label: country.label, -})); diff --git a/apps/civicsignalblog/src/lib/payload/index.js b/apps/civicsignalblog/src/lib/payload/index.js index 8bb041faf..f677c4aa7 100644 --- a/apps/civicsignalblog/src/lib/payload/index.js +++ b/apps/civicsignalblog/src/lib/payload/index.js @@ -1,9 +1,11 @@ import payload from "payload"; +import { RESEARCH } from "../../payload/lib/data/common/applications"; + async function findPage(slug, options) { return payload.find({ ...options, - collection: "pages", + collection: `${RESEARCH}-pages`, where: { ...options?.where, slug: { @@ -24,7 +26,7 @@ async function getCollection(collection, options) { async function findGlobal(slug, options) { return payload.findGlobal({ ...options, - slug, + slug: `settings-${RESEARCH}-site`, }); } diff --git a/apps/civicsignalblog/src/payload/access/applications/main.js b/apps/civicsignalblog/src/payload/access/applications/main.js new file mode 100644 index 000000000..ea89b28e6 --- /dev/null +++ b/apps/civicsignalblog/src/payload/access/applications/main.js @@ -0,0 +1,8 @@ +import { MAIN } from "../../lib/data/common/applications"; +import canAccessApplication from "../canAccessApplication"; + +const canRead = ({ req: { user } }) => { + return canAccessApplication(user, MAIN); +}; + +export default canRead; diff --git a/apps/civicsignalblog/src/payload/access/applications/research.js b/apps/civicsignalblog/src/payload/access/applications/research.js new file mode 100644 index 000000000..2171f614e --- /dev/null +++ b/apps/civicsignalblog/src/payload/access/applications/research.js @@ -0,0 +1,8 @@ +import { RESEARCH } from "../../lib/data/common/applications"; +import canAccessApplication from "../canAccessApplication"; + +const canRead = ({ req: { user } }) => { + return canAccessApplication(user, RESEARCH); +}; + +export default canRead; diff --git a/apps/civicsignalblog/src/payload/access/canAccessApplication.js b/apps/civicsignalblog/src/payload/access/canAccessApplication.js new file mode 100644 index 000000000..faf206265 --- /dev/null +++ b/apps/civicsignalblog/src/payload/access/canAccessApplication.js @@ -0,0 +1,7 @@ +export default function canAccessApplication(user, searchString) { + if (user) { + const app = user.currentApp || user.defaultApp; + return app === searchString.toLowerCase(); + } + return false; +} diff --git a/apps/civicsignalblog/src/payload/collections/Main/Pages.js b/apps/civicsignalblog/src/payload/collections/Main/Pages.js new file mode 100644 index 000000000..aeae6a6d8 --- /dev/null +++ b/apps/civicsignalblog/src/payload/collections/Main/Pages.js @@ -0,0 +1,29 @@ +import canRead from "../../access/applications/main"; +import CustomPageHeader from "../../blocks/CustomPageHeader"; +import Error from "../../blocks/Error"; +import FeaturedStories from "../../blocks/FeaturedStories"; +import LongForm from "../../blocks/LongForm"; +import PageHeader from "../../blocks/PageHeader"; +import Posts from "../../blocks/Posts"; +import { MAIN } from "../../lib/data/common/applications"; +import pages from "../../utils/createPagesCollection"; + +const Pages = pages({ + pageSlug: `${MAIN}-pages`, + label: "Pages", + group: "Publication", + defaultColumns: ["fullTitle", "updatedAt"], + blocks: [ + Error, + FeaturedStories, + PageHeader, + Posts, + CustomPageHeader, + LongForm, + ], + access: { + read: canRead, + }, +}); + +export default Pages; diff --git a/apps/civicsignalblog/src/payload/collections/Pages.js b/apps/civicsignalblog/src/payload/collections/Pages.js deleted file mode 100644 index 22902fe77..000000000 --- a/apps/civicsignalblog/src/payload/collections/Pages.js +++ /dev/null @@ -1,65 +0,0 @@ -import CustomPageHeader from "../blocks/CustomPageHeader"; -import Error from "../blocks/Error"; -import FeaturedStories from "../blocks/FeaturedStories"; -import LongForm from "../blocks/LongForm"; -import PageHeader from "../blocks/PageHeader"; -import Posts from "../blocks/Posts"; -import fullTitle from "../fields/fullTitle"; -import slug from "../fields/slug"; -import formatDraftUrl from "../utils/formatDraftUrl"; - -const Pages = { - slug: "pages", - access: { - read: () => true, - create: () => true, - update: () => true, - }, - admin: { - defaultColumns: ["fullTitle", "updatedAt"], - group: "Publication", - preview: (doc, options) => formatDraftUrl("pages", doc, options), - useAsTitle: "title", - livePreview: { - url: ({ data }) => - `${process.env.PAYLOAD_PUBLIC_APP_URL}/${data.slug !== "index" ? `${data.slug}` : ""}`, - }, - }, - fields: [ - { - name: "title", - type: "text", - required: true, - localized: true, - }, - fullTitle({ overrides: { localized: true } }), - slug(), - { - name: "blocks", - type: "blocks", - // Generally sort blocks alphabetically but keep related blocks next to - // each other e.g. while alphabecially CustomPageHeader should be with C, - // it's functiaonally equivalent with PageHeader so we keep it next to - // PageHeader - blocks: [ - Error, - FeaturedStories, - PageHeader, - Posts, - CustomPageHeader, - LongForm, - ], - localized: true, - admin: { - initCollapsed: true, - }, - }, - ], - versions: { - drafts: { - autosave: true, - }, - }, -}; - -export default Pages; diff --git a/apps/civicsignalblog/src/payload/collections/Authors.js b/apps/civicsignalblog/src/payload/collections/Research/Authors.js similarity index 84% rename from apps/civicsignalblog/src/payload/collections/Authors.js rename to apps/civicsignalblog/src/payload/collections/Research/Authors.js index 6b5a84e13..ae7479291 100644 --- a/apps/civicsignalblog/src/payload/collections/Authors.js +++ b/apps/civicsignalblog/src/payload/collections/Research/Authors.js @@ -1,7 +1,9 @@ +import canRead from "../../access/applications/research"; + const Authors = { slug: "author", access: { - read: () => true, + read: canRead, }, admin: { defaultColumns: ["fullName", "updatedAt"], diff --git a/apps/civicsignalblog/src/payload/collections/Media.js b/apps/civicsignalblog/src/payload/collections/Research/Media.js similarity index 100% rename from apps/civicsignalblog/src/payload/collections/Media.js rename to apps/civicsignalblog/src/payload/collections/Research/Media.js diff --git a/apps/civicsignalblog/src/payload/collections/Research/Pages.js b/apps/civicsignalblog/src/payload/collections/Research/Pages.js new file mode 100644 index 000000000..90356848a --- /dev/null +++ b/apps/civicsignalblog/src/payload/collections/Research/Pages.js @@ -0,0 +1,32 @@ +import canRead from "../../access/applications/research"; +import CustomPageHeader from "../../blocks/CustomPageHeader"; +import Error from "../../blocks/Error"; +import FeaturedStories from "../../blocks/FeaturedStories"; +import LongForm from "../../blocks/LongForm"; +import PageHeader from "../../blocks/PageHeader"; +import Posts from "../../blocks/Posts"; +import { RESEARCH } from "../../lib/data/common/applications"; +import pages from "../../utils/createPagesCollection"; + +const Pages = pages({ + pageSlug: `${RESEARCH}-pages`, + label: "Pages", + group: "Publication", + defaultColumns: ["fullTitle", "updatedAt"], + blocks: [ + Error, + FeaturedStories, + PageHeader, + Posts, + CustomPageHeader, + LongForm, + ], + access: { + read: canRead, + }, + adminOptions: { + description: "Research", + }, +}); + +export default Pages; diff --git a/apps/civicsignalblog/src/payload/collections/Posts.js b/apps/civicsignalblog/src/payload/collections/Research/Posts.js similarity index 77% rename from apps/civicsignalblog/src/payload/collections/Posts.js rename to apps/civicsignalblog/src/payload/collections/Research/Posts.js index 45163f498..f4d88f9a2 100644 --- a/apps/civicsignalblog/src/payload/collections/Posts.js +++ b/apps/civicsignalblog/src/payload/collections/Research/Posts.js @@ -1,10 +1,11 @@ -import authors from "../fields/authors"; -import content from "../fields/content"; -import image from "../fields/image"; -import publishedOn from "../fields/publishedOn"; -import slug from "../fields/slug"; -import tags from "../fields/tags"; -import formatDraftUrl from "../utils/formatDraftUrl"; +import canRead from "../../access/applications/research"; +import authors from "../../fields/authors"; +import content from "../../fields/content"; +import image from "../../fields/image"; +import publishedOn from "../../fields/publishedOn"; +import slug from "../../fields/slug"; +import tags from "../../fields/tags"; +import formatDraftUrl from "../../utils/formatDraftUrl"; const Posts = { slug: "posts", @@ -17,7 +18,7 @@ const Posts = { }, }, access: { - read: () => true, + read: canRead, }, admin: { defaultColumns: ["title", "authors", "publishedOn"], diff --git a/apps/civicsignalblog/src/payload/collections/Tags.js b/apps/civicsignalblog/src/payload/collections/Research/Tags.js similarity index 76% rename from apps/civicsignalblog/src/payload/collections/Tags.js rename to apps/civicsignalblog/src/payload/collections/Research/Tags.js index 46c6deb60..33b027e6a 100644 --- a/apps/civicsignalblog/src/payload/collections/Tags.js +++ b/apps/civicsignalblog/src/payload/collections/Research/Tags.js @@ -1,4 +1,5 @@ -import slug from "../fields/slug"; +import canRead from "../../access/applications/research"; +import slug from "../../fields/slug"; const Tags = { slug: "tag", @@ -9,7 +10,7 @@ const Tags = { useAsTitle: "name", }, access: { - read: () => true, + read: canRead, }, fields: [ { diff --git a/apps/civicsignalblog/src/payload/collections/Users.js b/apps/civicsignalblog/src/payload/collections/Users.js index daeeef760..46baa9954 100644 --- a/apps/civicsignalblog/src/payload/collections/Users.js +++ b/apps/civicsignalblog/src/payload/collections/Users.js @@ -1,9 +1,12 @@ +import payload from "payload"; + import { isAdmin, isAdminFieldLevel } from "../access/isAdmin"; import { isAdminOrSelf, isAdminOrSelfFieldLevel, } from "../access/isAdminOrSelf"; import { ROLE_DEFAULT, ROLE_OPTIONS } from "../access/roles"; +import applications, { RESEARCH } from "../lib/data/common/applications"; const Users = { slug: "users", @@ -53,6 +56,72 @@ const Users = { }, options: ROLE_OPTIONS, }, + { + name: "defaultApp", + type: "select", + defaultValue: RESEARCH, + hasMany: false, + admin: { + isClearable: true, + isSortable: true, + }, + options: applications, + }, + { + name: "currentApp", + defaultValue: RESEARCH, + type: "select", + hasMany: false, + admin: { + isClearable: true, + isSortable: true, + }, + options: applications, + }, + ], + endpoints: [ + { + path: "/apps/current", + method: "patch", + handler: async (req, res) => { + if (!req.user) { + res.status(401).send({ + error: "You need to be authenticated to perform this action", + }); + } + + const { selectedApp } = req.body; + if (!selectedApp) { + res.status(400).send({ + error: `Incorrect message format was received:${JSON.stringify(req.body)}`, + }); + } + + const userId = req.user.id; + const currentUser = await payload.findByID({ + collection: "users", + id: userId, + showHiddenFields: true, + }); + if (!currentUser) { + res + .status(404) + .send({ error: "User with specified ID was not found" }); + } + + const updatedUser = await payload.update({ + collection: "users", + id: userId, + data: { + currentApp: selectedApp || currentUser.defaultApp, + }, + }); + res.status(200).send({ + message: "Application updated successfully", + currentApp: updatedUser.currentApp, + }); + }, + }, ], }; diff --git a/apps/civicsignalblog/src/payload/components/actions/index.tsx b/apps/civicsignalblog/src/payload/components/actions/index.tsx new file mode 100644 index 000000000..6f8a313cd --- /dev/null +++ b/apps/civicsignalblog/src/payload/components/actions/index.tsx @@ -0,0 +1,98 @@ +import { useAuth } from "payload/components/utilities"; +import React, { useEffect, useState } from "react"; + +import applications, { RESEARCH } from "../../lib/data/common/applications"; + +function BeforeDashboard() { + const { user } = useAuth(); + + const [selectedApp, setSelectedApp] = useState( + user.currentApp || user.defaultApp || RESEARCH, + ); + + const [loading, setLoading] = useState(false); + + useEffect(() => { + const updateCurrentApp = async () => { + if ( + selectedApp && + selectedApp !== "select" && + selectedApp !== String(user.currentApp) + ) { + try { + setLoading(true); + const response = await fetch(`/api/users/apps/current`, { + method: "PATCH", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ selectedApp }), + }); + + if (!response.ok) { + throw new Error("Network response was not ok"); + } + + const data = await response.json(); + window.location.replace(`/admin?app=${encodeURI(data.currentApp)}`); + } catch (error) { + console.error("Error updating current app:", error); + } finally { + setLoading(false); + } + } + }; + + updateCurrentApp(); + }, [selectedApp]); + + const handleChange = (event) => { + const selectedValue = event.target.value; + setSelectedApp(selectedValue); + }; + + return ( +
+ {loading ? ( +

+ Loading... +

+ ) : ( + <> + + + + )} +
+ ); +} + +export default BeforeDashboard; diff --git a/apps/civicsignalblog/src/payload/fields/links/link.js b/apps/civicsignalblog/src/payload/fields/links/link.js index 88d80d0a7..2518eff0e 100644 --- a/apps/civicsignalblog/src/payload/fields/links/link.js +++ b/apps/civicsignalblog/src/payload/fields/links/link.js @@ -1,5 +1,6 @@ import { deepmerge } from "@mui/utils"; +import { RESEARCH, MAIN } from "../../lib/data/common/applications"; import mapLinkTypeToHref from "../../utils/mapLinkTypeToHref"; export async function mapLinkToHrefBeforeValidate({ @@ -72,7 +73,7 @@ const link = ({ pt: "Documento para link para", }, type: "relationship", - relationTo: ["pages"], + relationTo: [`${RESEARCH}-pages`, `${MAIN}-pages`], required, maxDepth: 1, admin: { diff --git a/apps/civicsignalblog/src/payload/globals/Publication/index.js b/apps/civicsignalblog/src/payload/globals/Publication/index.js index 3f08a2dab..51ce83255 100644 --- a/apps/civicsignalblog/src/payload/globals/Publication/index.js +++ b/apps/civicsignalblog/src/payload/globals/Publication/index.js @@ -1,10 +1,12 @@ +import canRead from "../../access/applications/research"; + import PostTab from "./PostTab"; const Publication = { slug: "settings-publication", label: "Publication", access: { - read: () => true, + read: canRead, }, admin: { group: "Settings", diff --git a/apps/civicsignalblog/src/payload/globals/Site/EngagementTab.js b/apps/civicsignalblog/src/payload/globals/Site/Components/EngagementTab.js similarity index 96% rename from apps/civicsignalblog/src/payload/globals/Site/EngagementTab.js rename to apps/civicsignalblog/src/payload/globals/Site/Components/EngagementTab.js index ca7c01f84..d8f369c31 100644 --- a/apps/civicsignalblog/src/payload/globals/Site/EngagementTab.js +++ b/apps/civicsignalblog/src/payload/globals/Site/Components/EngagementTab.js @@ -1,4 +1,4 @@ -import socialLinks from "../../fields/socialLinks"; +import socialLinks from "../../../fields/socialLinks"; const EngagementTab = { label: "Engagement", diff --git a/apps/civicsignalblog/src/payload/globals/Site/GeneralTab.js b/apps/civicsignalblog/src/payload/globals/Site/Components/GeneralTab.js similarity index 91% rename from apps/civicsignalblog/src/payload/globals/Site/GeneralTab.js rename to apps/civicsignalblog/src/payload/globals/Site/Components/GeneralTab.js index a1fa6fb64..729bd12bd 100644 --- a/apps/civicsignalblog/src/payload/globals/Site/GeneralTab.js +++ b/apps/civicsignalblog/src/payload/globals/Site/Components/GeneralTab.js @@ -1,5 +1,5 @@ -import image from "../../fields/image"; -import richText from "../../fields/richText"; +import image from "../../../fields/image"; +import richText from "../../../fields/richText"; const GeneralTab = { label: "General", diff --git a/apps/civicsignalblog/src/payload/globals/Site/NavigationTab.js b/apps/civicsignalblog/src/payload/globals/Site/Components/NavigationTab.js similarity index 90% rename from apps/civicsignalblog/src/payload/globals/Site/NavigationTab.js rename to apps/civicsignalblog/src/payload/globals/Site/Components/NavigationTab.js index 6c2a3cf8b..5d6778435 100644 --- a/apps/civicsignalblog/src/payload/globals/Site/NavigationTab.js +++ b/apps/civicsignalblog/src/payload/globals/Site/Components/NavigationTab.js @@ -1,6 +1,6 @@ -import link from "../../fields/links/link"; -import linkArray from "../../fields/links/linkArray"; -import { socialMediaOptions } from "../../fields/socialLinks"; +import link from "../../../fields/links/link"; +import linkArray from "../../../fields/links/linkArray"; +import { socialMediaOptions } from "../../../fields/socialLinks"; const linkField = link({ disableOpenInNewTab: true, diff --git a/apps/civicsignalblog/src/payload/globals/Site/index.js b/apps/civicsignalblog/src/payload/globals/Site/index.js deleted file mode 100644 index 207b83587..000000000 --- a/apps/civicsignalblog/src/payload/globals/Site/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import EngagementTab from "./EngagementTab"; -import GeneralTab from "./GeneralTab"; -import NavigationTab from "./NavigationTab"; - -const Site = { - slug: "settings-site", - label: "Site", - access: { - read: () => true, - }, - admin: { - group: "Settings", - }, - fields: [ - { - type: "tabs", - tabs: [GeneralTab, NavigationTab, EngagementTab], - }, - ], -}; - -export default Site; diff --git a/apps/civicsignalblog/src/payload/globals/Site/main.js b/apps/civicsignalblog/src/payload/globals/Site/main.js new file mode 100644 index 000000000..8f74ccebe --- /dev/null +++ b/apps/civicsignalblog/src/payload/globals/Site/main.js @@ -0,0 +1,19 @@ +import canRead from "../../access/applications/main"; +import { MAIN } from "../../lib/data/common/applications"; +import settings from "../../utils/createGlobalSettings"; + +import EngagementTab from "./Components/EngagementTab"; +import GeneralTab from "./Components/GeneralTab"; +import NavigationTab from "./Components/NavigationTab"; + +const Main = settings({ + slug: `settings-${MAIN}-site`, + label: "Site", + group: "Settings", + access: { + read: canRead, + }, + tabs: [GeneralTab, NavigationTab, EngagementTab], +}); + +export default Main; diff --git a/apps/civicsignalblog/src/payload/globals/Site/research.js b/apps/civicsignalblog/src/payload/globals/Site/research.js new file mode 100644 index 000000000..f0fbd5256 --- /dev/null +++ b/apps/civicsignalblog/src/payload/globals/Site/research.js @@ -0,0 +1,19 @@ +import canRead from "../../access/applications/research"; +import { RESEARCH } from "../../lib/data/common/applications"; +import settings from "../../utils/createGlobalSettings"; + +import EngagementTab from "./Components/EngagementTab"; +import GeneralTab from "./Components/GeneralTab"; +import NavigationTab from "./Components/NavigationTab"; + +const Research = settings({ + slug: `settings-${RESEARCH}-site`, + label: " Site", + group: "Settings", + access: { + read: canRead, + }, + tabs: [GeneralTab, NavigationTab, EngagementTab], +}); + +export default Research; diff --git a/apps/civicsignalblog/src/payload/lib/data/common/applications.js b/apps/civicsignalblog/src/payload/lib/data/common/applications.js new file mode 100644 index 000000000..9478b1608 --- /dev/null +++ b/apps/civicsignalblog/src/payload/lib/data/common/applications.js @@ -0,0 +1,22 @@ +export const MAIN = "main"; +export const EXPLORER = "explorer"; +export const TOPIC_MAPPER = "topic-mapper"; +export const SOURCE_MAPPER = "source-manager"; +export const RESEARCH = "research"; + +const applicationLabels = { + [MAIN]: "CivicSignal", + [EXPLORER]: "Explorer", + [TOPIC_MAPPER]: "Topic Mapper", + [SOURCE_MAPPER]: "Source Manager", + [RESEARCH]: "Research", +}; + +const applications = Object.entries(applicationLabels).map( + ([value, label]) => ({ + label, + value, + }), +); + +export default applications; diff --git a/apps/civicsignalblog/src/payload/utils/createGlobalSettings.js b/apps/civicsignalblog/src/payload/utils/createGlobalSettings.js new file mode 100644 index 000000000..8fa6c9d48 --- /dev/null +++ b/apps/civicsignalblog/src/payload/utils/createGlobalSettings.js @@ -0,0 +1,28 @@ +const settings = ({ + slug, + label, + group, + tabs, + access = { + read: () => true, + }, + settingsOptions = {}, +}) => { + return { + slug, + label, + access, + admin: { + group, + }, + fields: [ + { + type: "tabs", + tabs, + }, + ], + ...settingsOptions, + }; +}; + +export default settings; diff --git a/apps/civicsignalblog/src/payload/utils/createPagesCollection.js b/apps/civicsignalblog/src/payload/utils/createPagesCollection.js new file mode 100644 index 000000000..f5b409b5d --- /dev/null +++ b/apps/civicsignalblog/src/payload/utils/createPagesCollection.js @@ -0,0 +1,67 @@ +import fullTitle from "../fields/fullTitle"; +import slug from "../fields/slug"; + +import formatDraftUrl from "./formatDraftUrl"; + +const Pages = ({ + pageSlug, + group, + defaultColumns, + blocks, + access = { + read: () => true, + create: () => true, + update: () => true, + }, + pagesOptions = {}, +}) => { + return { + slug: pageSlug, + access, + labels: { + singular: "Page", + plural: "Pages", + }, + admin: { + defaultColumns, + group, + preview: (doc, options) => formatDraftUrl("pages", doc, options), + useAsTitle: "title", + livePreview: { + url: ({ data }) => + `${process.env.PAYLOAD_PUBLIC_APP_URL}/${data.slug !== "index" ? `${data.slug}` : ""}`, + }, + }, + fields: [ + { + name: "title", + type: "text", + required: true, + localized: true, + }, + fullTitle({ overrides: { localized: true } }), + slug(), + { + name: "blocks", + type: "blocks", + // Generally sort blocks alphabetically but keep related blocks next to + // each other e.g. while alphabecially CustomPageHeader should be with C, + // it's functiaonally equivalent with PageHeader so we keep it next to + // PageHeader + blocks, + localized: true, + admin: { + initCollapsed: true, + }, + }, + ], + versions: { + drafts: { + autosave: true, + }, + }, + ...pagesOptions, + }; +}; + +export default Pages;