@ikas/storefront 4.0.0-alpha.4 → 4.0.0-alpha.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/package.json +13 -13
  2. package/src/analytics/analytics.ts +2 -1
  3. package/src/analytics/googleUniversal.ts +12 -2
  4. package/src/analytics/head/index.tsx +1 -2
  5. package/src/analytics/ikas.ts +24 -6
  6. package/src/components/checkout/components/address-form/index.tsx +1 -1
  7. package/src/components/checkout/components/cart-summary/cart-item/index.tsx +11 -9
  8. package/src/components/checkout/components/cart-summary/cart-item/style.module.scss +7 -10
  9. package/src/components/checkout/components/cart-summary/index.tsx +41 -17
  10. package/src/components/checkout/components/customer-addresses/index.tsx +6 -2
  11. package/src/components/checkout/components/form-item/index.tsx +9 -11
  12. package/src/components/checkout/components/master-pass/credit-card-form/index.tsx +2 -0
  13. package/src/components/checkout/components/offer-product/index.tsx +16 -19
  14. package/src/components/checkout/components/offer-product/style.module.scss +1 -3
  15. package/src/components/checkout/components/phone-number-input/get-countries.ts +37 -5
  16. package/src/components/checkout/components/phone-number-input/index.tsx +15 -10
  17. package/src/components/checkout/index.tsx +14 -12
  18. package/src/components/checkout/model.ts +95 -61
  19. package/src/components/checkout/modelMasterPass.ts +2 -2
  20. package/src/components/checkout/steps/step-payment/index.tsx +6 -1
  21. package/src/components/checkout/steps/step-payment/payment-gateways/index.tsx +12 -3
  22. package/src/components/checkout/steps/step-payment/payment-gateways/installments/index.tsx +5 -3
  23. package/src/components/checkout/steps/step-payment/style.module.scss +5 -0
  24. package/src/components/checkout/steps/step-shipping/index.tsx +9 -4
  25. package/src/components/checkout/steps/step-success/index.tsx +4 -3
  26. package/src/components/page/head.tsx +12 -0
  27. package/src/components/page/index.tsx +10 -9
  28. package/src/components/page-editor/ThemeComponentEditor.tsx +15 -8
  29. package/src/components/page-editor/model.ts +44 -107
  30. package/src/models/data/cart/campaign-offer/index.ts +13 -2
  31. package/src/models/data/cart/index.ts +1 -1
  32. package/src/models/data/category/path-item/index.ts +4 -0
  33. package/src/models/data/checkout/index.ts +11 -3
  34. package/src/models/data/checkout-settings/price/index.ts +2 -0
  35. package/src/models/data/index.ts +3 -0
  36. package/src/models/data/merchant-settings/index.ts +9 -0
  37. package/src/models/data/order/index.ts +51 -32
  38. package/src/models/data/order/line-item/index.ts +34 -13
  39. package/src/models/data/order/line-item/variant/value/index.ts +1 -1
  40. package/src/models/data/order/transaction/index.ts +2 -5
  41. package/src/models/data/product/filter/index.ts +4 -13
  42. package/src/models/data/product/index.ts +21 -3
  43. package/src/models/data/product/option-set/index.ts +4 -0
  44. package/src/models/data/product/option-set/option/index.ts +33 -10
  45. package/src/models/data/product/variant/index.ts +23 -1
  46. package/src/models/data/product/variant/price/index.ts +23 -9
  47. package/src/models/data/product/variant-type/index.ts +2 -0
  48. package/src/models/data/raffle/index.ts +9 -7
  49. package/src/models/data/state/index.ts +6 -2
  50. package/src/models/data/storefront/index.ts +2 -0
  51. package/src/models/ui/product-list/index.ts +26 -17
  52. package/src/models/ui/raffle-list/index.ts +1 -1
  53. package/src/models/ui/validator/form/raffle-form.ts +16 -3
  54. package/src/models/ui/validator/rules/index.ts +14 -13
  55. package/src/page-data-init/index.ts +159 -404
  56. package/src/pages/checkout.tsx +2 -1
  57. package/src/pages/editor.tsx +5 -2
  58. package/src/store/cart/index.ts +2 -2
  59. package/src/store/customer/index.ts +7 -17
  60. package/src/store/raffle/index.ts +7 -10
  61. package/src/utils/constants.ts +1 -1
  62. package/src/utils/currency.ts +9 -183
  63. package/src/components/checkout/components/phone-number-input/locale/en.ts +0 -257
@@ -9,7 +9,7 @@ import IkasCheckoutPage, {
9
9
  import { useRouter } from "next/router.js";
10
10
  import { FullscreenLoading } from "../components/checkout/components/fullscreen-loading";
11
11
  import { CheckoutStep } from "../components/checkout/model";
12
- import { getCartById } from "@ikas/storefront-api";
12
+ import { getCartById, setAPIClientConfig } from "@ikas/storefront-api";
13
13
  import { IkasStorefrontConfig } from "@ikas/storefront-config";
14
14
  import { IkasBaseStore } from "..";
15
15
  import { IkasCheckout, IkasCheckoutSettings } from "../models/data";
@@ -35,6 +35,7 @@ const CheckoutPage: React.FC<Props> = ({
35
35
  const [checkout, setCheckout] = React.useState<IkasCheckout | undefined>();
36
36
 
37
37
  IkasStorefrontConfig.init(configJson);
38
+ setAPIClientConfig();
38
39
 
39
40
  React.useEffect(() => {
40
41
  setCustomizationProps(customizationProps);
@@ -8,7 +8,7 @@ const IkasPageEditor = dynamic(
8
8
  );
9
9
 
10
10
  type Props = {
11
- configJson: Record<string, any>;
11
+ configJson?: Record<string, any>; // local only
12
12
  components?: Record<string, any>;
13
13
  };
14
14
 
@@ -19,9 +19,12 @@ export default class Page extends React.Component<Props> {
19
19
  if (configJson) {
20
20
  IkasStorefrontConfig.init({
21
21
  ...configJson,
22
- currentPageComponents: components || {},
23
22
  });
24
23
  }
24
+
25
+ IkasStorefrontConfig.init({
26
+ currentPageComponents: components || {},
27
+ });
25
28
  }
26
29
 
27
30
  render() {
@@ -100,7 +100,7 @@ export class IkasCartStore {
100
100
 
101
101
  product.productOptionSet?.initOptionValues();
102
102
 
103
- return true;
103
+ return response;
104
104
  } catch (err) {
105
105
  console.log(err);
106
106
  return false;
@@ -145,7 +145,7 @@ export class IkasCartStore {
145
145
  Analytics.addToCart(item, quantity - oldQuantity, eventId, this.cart);
146
146
  }
147
147
  }
148
- return true;
148
+ return response;
149
149
  } catch (err) {
150
150
  console.log(err);
151
151
  return false;
@@ -24,6 +24,7 @@ import { IkasStorefrontConfig } from "@ikas/storefront-config";
24
24
  import { SaveMyCustomerInput } from "@ikas/storefront-api";
25
25
  import { populateRaffleProducts } from "@ikas/storefront-providers";
26
26
  import { IkasBaseStore } from "../base";
27
+ import { IkasRaffle } from "@ikas/storefront-models";
27
28
 
28
29
  const isServer = typeof localStorage === "undefined";
29
30
  const LS_TOKEN_KEY = "customerToken";
@@ -293,7 +294,7 @@ export class IkasCustomerStore {
293
294
  const favoriteProductsResponse =
294
295
  await CustomerStoreAPI.listFavoriteProducts();
295
296
  if (
296
- favoriteProductsResponse.isSuccess ||
297
+ !favoriteProductsResponse.isSuccess ||
297
298
  !favoriteProductsResponse.data?.length
298
299
  )
299
300
  return [];
@@ -403,22 +404,11 @@ export class IkasCustomerStore {
403
404
  };
404
405
 
405
406
  getRaffles = async () => {
406
- const rafflesResponse = await RaffleStore.getRafflesByCustomerId({
407
- winnerFilter: false,
408
- });
409
- const wonRafflesResponse = await RaffleStore.getRafflesByCustomerId({
410
- winnerFilter: true,
411
- });
412
-
413
- const raffles = rafflesResponse.data;
414
- const wonRaffles = wonRafflesResponse.data;
415
-
416
- raffles?.forEach((raffle) => {
417
- if (wonRaffles?.find((wonRaffle) => wonRaffle.id === raffle.id))
418
- raffle.isCustomerWinner = true;
419
- });
420
-
421
- if (raffles) await populateRaffleProducts(raffles);
407
+ const rafflesResponse = await RaffleStore.listRaffleParticipants();
408
+ let raffles: IkasRaffle[] = [];
409
+ if (!rafflesResponse.data?.length) return raffles;
410
+ raffles = rafflesResponse.data;
411
+ if (raffles.length) await populateRaffleProducts(raffles);
422
412
  return raffles || [];
423
413
  };
424
414
 
@@ -1,11 +1,10 @@
1
1
  import { APIResponse } from "@ikas/fe-api-client";
2
2
  import {
3
- getRafflesByCustomerId,
4
- GetRafflesByCustomerIdQueryParams,
5
- listRaffle,
3
+ listRaffleParticipants,
4
+ listStorefrontRaffle,
6
5
  listRaffleMetaData,
7
6
  ListRaffleMetadataQueryParams,
8
- ListRaffleQueryParams,
7
+ ListStorefrontRaffleParams,
9
8
  saveRaffleParticipant,
10
9
  SaveRaffleParticipantQueryParams,
11
10
  } from "@ikas/storefront-api";
@@ -16,8 +15,8 @@ import {
16
15
  } from "../../models/data/raffle";
17
16
 
18
17
  export default class RaffleStore {
19
- static async listRaffle(params: ListRaffleQueryParams) {
20
- const response = await listRaffle(params);
18
+ static async listStorefrontRaffle(params: ListStorefrontRaffleParams) {
19
+ const response = await listStorefrontRaffle(params);
21
20
  return new APIResponse({
22
21
  ...response.data,
23
22
  data: response.data?.data?.map(
@@ -46,10 +45,8 @@ export default class RaffleStore {
46
45
  );
47
46
  }
48
47
 
49
- static async getRafflesByCustomerId(
50
- params: GetRafflesByCustomerIdQueryParams
51
- ) {
52
- const response = await getRafflesByCustomerId(params);
48
+ static async listRaffleParticipants() {
49
+ const response = await listRaffleParticipants();
53
50
  return new APIResponse(
54
51
  response.data?.map((d) => new IkasRaffle(d as unknown as IkasRaffle)),
55
52
  response.graphQLErrors
@@ -1,2 +1,2 @@
1
- export const FREE_TEXT_CITY_COUNTRY_LIST = ["DE", "US"];
1
+ export const FREE_TEXT_CITY_COUNTRY_LIST = ["DE", "US", "AT"];
2
2
  export const DISTRICT_HIDDEN_COUNTRY_LIST = ["US"];
@@ -13,14 +13,19 @@ const format = (p: number, n: number, x: number, s: string, c: string) => {
13
13
  /**
14
14
  *
15
15
  * @param price Price to format
16
- * @param currencyCode Code for the currency, USD, EUR, TRY, etc..
16
+ * @param currencyCode Currency code
17
+ * @param currencySymbol Symbol for the currency
17
18
  */
18
- export const formatMoney = (price: number, currencyCode: string) => {
19
+ export const formatCurrency = (
20
+ price: number,
21
+ currencyCode: string,
22
+ currencySymbol: string | null
23
+ ) => {
19
24
  const formatSettings =
20
25
  IkasStorefrontConfig.getMerchantSettings()?.currencyFormats?.find(
21
26
  (s) => s.currencyCode === currencyCode
22
27
  );
23
- const symbol = formatSettings?.symbol || getCurrencySymbol(currencyCode);
28
+ const symbol = formatSettings?.symbol || currencySymbol || "";
24
29
  const decimalSeparator = formatSettings?.decimalSeparator || ".";
25
30
  const thousandSeparator = formatSettings?.thousandSeparator || ",";
26
31
  const symbolPosition = formatSettings?.symbolPosition || "LEFT";
@@ -62,189 +67,10 @@ export const formatMoney = (price: number, currencyCode: string) => {
62
67
  IkasStorefrontConfig.getCurrentLocale(),
63
68
  {
64
69
  style: "currency",
65
- currency: currencyCode || "TRY",
70
+ currency: currencySymbol || "TRY",
66
71
  }
67
72
  );
68
73
 
69
74
  return formatter.format(price);
70
75
  }
71
76
  };
72
-
73
- export function getCurrencySymbol(currencyCode: string) {
74
- return CURRENCIES[currencyCode] || currencyCode;
75
- }
76
-
77
- const CURRENCIES: Record<string, string> = {
78
- TRY: "₺",
79
- USD: "$",
80
- EUR: "€",
81
- AZN: "₼",
82
- AED: "د.إ.",
83
- AFN: "؋",
84
- ALL: "L",
85
- AMD: "դր",
86
- ANG: "ƒ",
87
- AOA: "Kz",
88
- ARS: "$",
89
- AUD: "$",
90
- AWG: "ƒ",
91
- BAM: "КМ",
92
- BBD: "$",
93
- BDT: "৳",
94
- BGN: "лв.",
95
- BHD: "د.ب.",
96
- BIF: "FBu",
97
- BMD: "$",
98
- BND: "$",
99
- BOB: "Bs.",
100
- BRL: "R$",
101
- BSD: "$",
102
- BTN: "Nu.",
103
- BWP: "P",
104
- BYN: "руб.",
105
- BZD: "$",
106
- CAD: "$",
107
- CDF: "₣",
108
- CHF: "₣",
109
- CKD: "$",
110
- CLP: "$",
111
- CNY: "¥元",
112
- COP: "$",
113
- CRC: "₡",
114
- CUC: "$",
115
- CUP: "₱",
116
- CVE: "$",
117
- CZK: "Kč",
118
- DJF: "ف.ج.",
119
- DKK: "kr.",
120
- DOP: "$",
121
- DZD: "د.ج.",
122
- EGP: "ج.م.",
123
- EHP: "Ptas.",
124
- ERN: "ناكفا",
125
- ETB: "ብር",
126
- FJD: "$",
127
- FKP: "£",
128
- FOK: "kr",
129
- GBP: "£",
130
- GEL: "₾",
131
- GGP: "£",
132
- GHS: "₵",
133
- GIP: "£",
134
- GMD: "D",
135
- GNF: "FG",
136
- GTQ: "$",
137
- GYD: "$",
138
- HKD: "$",
139
- HNL: "L",
140
- HRK: "kn",
141
- HTG: "G",
142
- HUF: "Ft",
143
- IDR: "Rp",
144
- ILS: "₪",
145
- IMP: "£",
146
- INR: "₹",
147
- IQD: "د.ع.",
148
- IRR: "﷼",
149
- ISK: "kr",
150
- JEP: "£",
151
- JMD: "$",
152
- JOD: "د.أ.",
153
- JPY: "¥",
154
- KES: "KSh",
155
- KGS: "с",
156
- KHR: "៛",
157
- KID: "$",
158
- KMF: "CF",
159
- KPW: "₩",
160
- KRW: "₩",
161
- KWD: "د.ك.",
162
- KYD: "$",
163
- KZT: "₸",
164
- LAK: "₭",
165
- LBP: "ل.ل.",
166
- LKR: "රු or ரூ",
167
- LRD: "$",
168
- LSL: "L",
169
- LYD: "ل.د.",
170
- MAD: "د.م.",
171
- MDL: "L",
172
- MGA: "Ar",
173
- MKD: "ден",
174
- MMK: "Ks",
175
- MNT: "₮",
176
- MOP: "MOP$",
177
- MRU: "أ.م.",
178
- MUR: "रु ",
179
- MVR: ".ރ",
180
- MWK: "MK",
181
- MXN: "$",
182
- MYR: "RM",
183
- MZN: "MT",
184
- NAD: "$",
185
- NGN: "₦",
186
- NIO: "C$",
187
- NOK: "kr",
188
- NPR: "रू",
189
- NZD: "$",
190
- OMR: "ر.ع.",
191
- PAB: "B/.",
192
- PEN: "S/.",
193
- PGK: "K",
194
- PHP: "₱",
195
- PKR: "Rs",
196
- PLN: "zł",
197
- PND: "$",
198
- PRB: "р.",
199
- PYG: "₲",
200
- QAR: "ر.ق.",
201
- RON: "L",
202
- RSD: "дин",
203
- RUB: "₽",
204
- RWF: "R₣",
205
- SAR: "ر.س.",
206
- SBD: "$",
207
- SCR: "Rs",
208
- SDG: "ج.س.",
209
- SEK: "kr",
210
- SGD: "$",
211
- SHP: "£",
212
- SLL: "Le",
213
- SLS: "Sl",
214
- SOS: "Ssh",
215
- SRD: "$",
216
- SSP: "SS£",
217
- STN: "Db",
218
- SVC: "₡",
219
- SYP: "ل.س.",
220
- SZL: "L",
221
- THB: "฿",
222
- TJS: "SM",
223
- TMT: "T",
224
- TND: "د.ت.",
225
- TOP: "PT",
226
- TTD: "$",
227
- TVD: "$",
228
- TWD: "圓",
229
- TZS: "TSh",
230
- UAH: "грн",
231
- UGX: "Sh",
232
- UYU: "$",
233
- UZS: "сум",
234
- VED: "Bs.",
235
- VES: "Bs.F",
236
- VND: "₫",
237
- VUV: "VT",
238
- WST: "ST",
239
- XAF: "Fr.",
240
- XCD: "$",
241
- XOF: "₣",
242
- XPF: "₣",
243
- YER: "ر.ي.",
244
- ZAR: "R",
245
- ZMW: "ZK",
246
- ZWB: "",
247
- ZWL: "$",
248
- Abkhazia: "",
249
- Artsakh: "դր.",
250
- };
@@ -1,257 +0,0 @@
1
- export default {
2
- "AB": "Abkhazia",
3
- "AC": "Ascension Island",
4
- "AD": "Andorra",
5
- "AE": "United Arab Emirates",
6
- "AF": "Afghanistan",
7
- "AG": "Antigua and Barbuda",
8
- "AI": "Anguilla",
9
- "AL": "Albania",
10
- "AM": "Armenia",
11
- "AO": "Angola",
12
- "AQ": "Antarctica",
13
- "AR": "Argentina",
14
- "AS": "American Samoa",
15
- "AT": "Austria",
16
- "AU": "Australia",
17
- "AW": "Aruba",
18
- "AX": "Åland Islands",
19
- "AZ": "Azerbaijan",
20
- "BA": "Bosnia and Herzegovina",
21
- "BB": "Barbados",
22
- "BD": "Bangladesh",
23
- "BE": "Belgium",
24
- "BF": "Burkina Faso",
25
- "BG": "Bulgaria",
26
- "BH": "Bahrain",
27
- "BI": "Burundi",
28
- "BJ": "Benin",
29
- "BL": "Saint Barthélemy",
30
- "BM": "Bermuda",
31
- "BN": "Brunei Darussalam",
32
- "BO": "Bolivia",
33
- "BQ": "Bonaire, Sint Eustatius and Saba",
34
- "BR": "Brazil",
35
- "BS": "Bahamas",
36
- "BT": "Bhutan",
37
- "BV": "Bouvet Island",
38
- "BW": "Botswana",
39
- "BY": "Belarus",
40
- "BZ": "Belize",
41
- "CA": "Canada",
42
- "CC": "Cocos (Keeling) Islands",
43
- "CD": "Congo, Democratic Republic of the",
44
- "CF": "Central African Republic",
45
- "CG": "Congo",
46
- "CH": "Switzerland",
47
- "CI": "Cote d'Ivoire",
48
- "CK": "Cook Islands",
49
- "CL": "Chile",
50
- "CM": "Cameroon",
51
- "CN": "China",
52
- "CO": "Colombia",
53
- "CR": "Costa Rica",
54
- "CU": "Cuba",
55
- "CV": "Cape Verde",
56
- "CW": "Curaçao",
57
- "CX": "Christmas Island",
58
- "CY": "Cyprus",
59
- "CZ": "Czech Republic",
60
- "DE": "Germany",
61
- "DJ": "Djibouti",
62
- "DK": "Denmark",
63
- "DM": "Dominica",
64
- "DO": "Dominican Republic",
65
- "DZ": "Algeria",
66
- "EC": "Ecuador",
67
- "EE": "Estonia",
68
- "EG": "Egypt",
69
- "EH": "Western Sahara",
70
- "ER": "Eritrea",
71
- "ES": "Spain",
72
- "ET": "Ethiopia",
73
- "FI": "Finland",
74
- "FJ": "Fiji",
75
- "FK": "Falkland Islands",
76
- "FM": "Federated States of Micronesia",
77
- "FO": "Faroe Islands",
78
- "FR": "France",
79
- "GA": "Gabon",
80
- "GB": "United Kingdom",
81
- "GD": "Grenada",
82
- "GE": "Georgia",
83
- "GF": "French Guiana",
84
- "GG": "Guernsey",
85
- "GH": "Ghana",
86
- "GI": "Gibraltar",
87
- "GL": "Greenland",
88
- "GM": "Gambia",
89
- "GN": "Guinea",
90
- "GP": "Guadeloupe",
91
- "GQ": "Equatorial Guinea",
92
- "GR": "Greece",
93
- "GS": "South Georgia and the South Sandwich Islands",
94
- "GT": "Guatemala",
95
- "GU": "Guam",
96
- "GW": "Guinea-Bissau",
97
- "GY": "Guyana",
98
- "HK": "Hong Kong",
99
- "HM": "Heard Island and McDonald Islands",
100
- "HN": "Honduras",
101
- "HR": "Croatia",
102
- "HT": "Haiti",
103
- "HU": "Hungary",
104
- "ID": "Indonesia",
105
- "IE": "Ireland",
106
- "IL": "Israel",
107
- "IM": "Isle of Man",
108
- "IN": "India",
109
- "IO": "British Indian Ocean Territory",
110
- "IQ": "Iraq",
111
- "IR": "Iran",
112
- "IS": "Iceland",
113
- "IT": "Italy",
114
- "JE": "Jersey",
115
- "JM": "Jamaica",
116
- "JO": "Jordan",
117
- "JP": "Japan",
118
- "KE": "Kenya",
119
- "KG": "Kyrgyzstan",
120
- "KH": "Cambodia",
121
- "KI": "Kiribati",
122
- "KM": "Comoros",
123
- "KN": "Saint Kitts and Nevis",
124
- "KP": "North Korea",
125
- "KR": "South Korea",
126
- "KW": "Kuwait",
127
- "KY": "Cayman Islands",
128
- "KZ": "Kazakhstan",
129
- "LA": "Laos",
130
- "LB": "Lebanon",
131
- "LC": "Saint Lucia",
132
- "LI": "Liechtenstein",
133
- "LK": "Sri Lanka",
134
- "LR": "Liberia",
135
- "LS": "Lesotho",
136
- "LT": "Lithuania",
137
- "LU": "Luxembourg",
138
- "LV": "Latvia",
139
- "LY": "Libya",
140
- "MA": "Morocco",
141
- "MC": "Monaco",
142
- "MD": "Moldova",
143
- "ME": "Montenegro",
144
- "MF": "Saint Martin (French Part)",
145
- "MG": "Madagascar",
146
- "MH": "Marshall Islands",
147
- "MK": "North Macedonia",
148
- "ML": "Mali",
149
- "MM": "Burma",
150
- "MN": "Mongolia",
151
- "MO": "Macao",
152
- "MP": "Northern Mariana Islands",
153
- "MQ": "Martinique",
154
- "MR": "Mauritania",
155
- "MS": "Montserrat",
156
- "MT": "Malta",
157
- "MU": "Mauritius",
158
- "MV": "Maldives",
159
- "MW": "Malawi",
160
- "MX": "Mexico",
161
- "MY": "Malaysia",
162
- "MZ": "Mozambique",
163
- "NA": "Namibia",
164
- "NC": "New Caledonia",
165
- "NE": "Niger",
166
- "NF": "Norfolk Island",
167
- "NG": "Nigeria",
168
- "NI": "Nicaragua",
169
- "NL": "Netherlands",
170
- "NO": "Norway",
171
- "NP": "Nepal",
172
- "NR": "Nauru",
173
- "NU": "Niue",
174
- "NZ": "New Zealand",
175
- "OM": "Oman",
176
- "OS": "South Ossetia",
177
- "PA": "Panama",
178
- "PE": "Peru",
179
- "PF": "French Polynesia",
180
- "PG": "Papua New Guinea",
181
- "PH": "Philippines",
182
- "PK": "Pakistan",
183
- "PL": "Poland",
184
- "PM": "Saint Pierre and Miquelon",
185
- "PN": "Pitcairn",
186
- "PR": "Puerto Rico",
187
- "PS": "Palestine",
188
- "PT": "Portugal",
189
- "PW": "Palau",
190
- "PY": "Paraguay",
191
- "QA": "Qatar",
192
- "RE": "Reunion",
193
- "RO": "Romania",
194
- "RS": "Serbia",
195
- "RU": "Russia",
196
- "RW": "Rwanda",
197
- "SA": "Saudi Arabia",
198
- "SB": "Solomon Islands",
199
- "SC": "Seychelles",
200
- "SD": "Sudan",
201
- "SE": "Sweden",
202
- "SG": "Singapore",
203
- "SH": "Saint Helena",
204
- "SI": "Slovenia",
205
- "SJ": "Svalbard and Jan Mayen",
206
- "SK": "Slovakia",
207
- "SL": "Sierra Leone",
208
- "SM": "San Marino",
209
- "SN": "Senegal",
210
- "SO": "Somalia",
211
- "SR": "Suriname",
212
- "SS": "South Sudan",
213
- "ST": "Sao Tome and Principe",
214
- "SV": "El Salvador",
215
- "SX": "Sint Maarten",
216
- "SY": "Syria",
217
- "SZ": "Swaziland",
218
- "TA": "Tristan da Cunha",
219
- "TC": "Turks and Caicos Islands",
220
- "TD": "Chad",
221
- "TF": "French Southern Territories",
222
- "TG": "Togo",
223
- "TH": "Thailand",
224
- "TJ": "Tajikistan",
225
- "TK": "Tokelau",
226
- "TL": "Timor-Leste",
227
- "TM": "Turkmenistan",
228
- "TN": "Tunisia",
229
- "TO": "Tonga",
230
- "TR": "Turkey",
231
- "TT": "Trinidad and Tobago",
232
- "TV": "Tuvalu",
233
- "TW": "Taiwan",
234
- "TZ": "Tanzania",
235
- "UA": "Ukraine",
236
- "UG": "Uganda",
237
- "UM": "United States Minor Outlying Islands",
238
- "US": "United States",
239
- "UY": "Uruguay",
240
- "UZ": "Uzbekistan",
241
- "VA": "Holy See (Vatican City State)",
242
- "VC": "Saint Vincent and the Grenadines",
243
- "VE": "Venezuela",
244
- "VG": "Virgin Islands, British",
245
- "VI": "Virgin Islands, U.S.",
246
- "VN": "Vietnam",
247
- "VU": "Vanuatu",
248
- "WF": "Wallis and Futuna",
249
- "WS": "Samoa",
250
- "XK": "Kosovo",
251
- "YE": "Yemen",
252
- "YT": "Mayotte",
253
- "ZA": "South Africa",
254
- "ZM": "Zambia",
255
- "ZW": "Zimbabwe",
256
- "ZZ": "International"
257
- }