From 593780aef1dd8eb068aaa521cf7f79cbc7f4a2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Mon, 4 Dec 2023 10:07:45 +0100 Subject: [PATCH] Have regions as an array --- .../extensions/forms/constants/countries.ts | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/packages/dnb-eufemia/src/extensions/forms/constants/countries.ts b/packages/dnb-eufemia/src/extensions/forms/constants/countries.ts index 4caa78a00c5..1fd3e1e1166 100644 --- a/packages/dnb-eufemia/src/extensions/forms/constants/countries.ts +++ b/packages/dnb-eufemia/src/extensions/forms/constants/countries.ts @@ -11,11 +11,18 @@ export type CountryType = { en: string nb: string } - continent: string - regions?: string + continent: + | 'Asia' + | 'Europe' + | 'Africa' + | 'Oceania' + | 'Antarctica' + | 'North America' + | 'South America' + regions?: Array<'Scandinavia' | 'NorthernNordic' | 'AutonomousNordic'> } -export default [ +const countries: Array = [ { i18n: { en: 'Afghanistan', @@ -528,7 +535,7 @@ export default [ cdc: '45', iso: 'DK', continent: 'Europe', - regions: 'Scandinavia, NorthernNordic', + regions: ['Scandinavia', 'NorthernNordic'], }, { i18n: { @@ -655,7 +662,7 @@ export default [ cdc: '298', iso: 'FO', continent: 'Europe', - regions: 'AutonomousNordic', + regions: ['AutonomousNordic'], }, { i18n: { @@ -674,7 +681,7 @@ export default [ cdc: '358', iso: 'FI', continent: 'Europe', - regions: 'NorthernNordic', + regions: ['NorthernNordic'], }, { i18n: { @@ -774,7 +781,7 @@ export default [ cdc: '299', iso: 'GL', continent: 'North America', - regions: 'AutonomousNordic', + regions: ['AutonomousNordic'], }, { i18n: { @@ -892,7 +899,7 @@ export default [ cdc: '354', iso: 'IS', continent: 'Europe', - regions: 'NorthernNordic', + regions: ['NorthernNordic'], }, { i18n: { @@ -1469,7 +1476,7 @@ export default [ cdc: '47', iso: 'NO', continent: 'Europe', - regions: 'Scandinavia, NorthernNordic', + regions: ['Scandinavia', 'NorthernNordic'], }, { i18n: { @@ -1920,7 +1927,7 @@ export default [ cdc: '46', iso: 'SE', continent: 'Europe', - regions: 'Scandinavia, NorthernNordic', + regions: ['Scandinavia', 'NorthernNordic'], }, { i18n: { @@ -2210,4 +2217,6 @@ export default [ iso: 'ZW', continent: 'Africa', }, -] as Array +] + +export default countries