@ikas/storefront 1.0.14 → 1.0.15-alpha.1

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 (25) hide show
  1. package/build/__generated__/global-types.d.ts +6 -1
  2. package/build/api/blog/__generated__/getBlog.d.ts +15 -13
  3. package/build/api/blog/__generated__/listBlog.d.ts +15 -13
  4. package/build/api/blog/__generated__/listBlogCategory.d.ts +15 -13
  5. package/build/api/blog/__generated__/listBlogMetaData.d.ts +15 -13
  6. package/build/api/brand/__generated__/listProductBrand.d.ts +3 -3
  7. package/build/api/category/__generated__/listCategory.d.ts +3 -3
  8. package/build/api/checkout/__generated__/getOrder.d.ts +3 -3
  9. package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +1 -1
  10. package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +3 -3
  11. package/build/api/customer/__generated__/customerLogin.d.ts +11 -3
  12. package/build/api/customer/__generated__/getCustomerOrders.d.ts +3 -3
  13. package/build/api/customer/__generated__/getMyCustomer.d.ts +3 -3
  14. package/build/api/customer/__generated__/registerCustomer.d.ts +11 -3
  15. package/build/api/customer/__generated__/saveMyCustomer.d.ts +11 -3
  16. package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +15 -13
  17. package/build/api/variant-type/__generated__/listVariantType.d.ts +3 -3
  18. package/build/index.es.js +1196 -9
  19. package/build/index.js +1196 -8
  20. package/build/models/data/checkout-settings/index.d.ts +1 -1
  21. package/build/models/data/customer/address/index.d.ts +2 -1
  22. package/build/models/data/order/address/index.d.ts +2 -1
  23. package/build/utils/helper.d.ts +1 -0
  24. package/build/utils/postalCodes.d.ts +16 -0
  25. package/package.json +1 -1
package/build/index.js CHANGED
@@ -12018,6 +12018,1153 @@ function forEach$1(collection, iteratee) {
12018
12018
 
12019
12019
  var forEach_1 = forEach$1;
12020
12020
 
12021
+ // Country list source: https://www.dhl.com/en/country_profile.html#.XwODEJNKjOQ
12022
+ // Country abbreviation source: https://planetarynames.wr.usgs.gov/Abbreviations
12023
+ // Postal code: https://gist.githubusercontent.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b/raw/21662445653ac861f8ab81caa8cfaee3185aed15/postal-codes.json
12024
+ // Postal code: https://en.wikipedia.org/wiki/List_of_postal_codes
12025
+ // Country/territory items with no postal code regexes or ranges either do not require postal codes
12026
+ // or there may not be enough information for that country/territory
12027
+ var COUNTRY_ADDRESS_POSTALS = [
12028
+ {
12029
+ abbrev: "AF",
12030
+ name: "Afghanistan",
12031
+ postal: /[0-9]{4}/g,
12032
+ },
12033
+ {
12034
+ abbrev: "AL",
12035
+ name: "Albania",
12036
+ postal: /(120|122)[0-9]{2}/g,
12037
+ },
12038
+ {
12039
+ abbrev: "DZ",
12040
+ name: "Algeria",
12041
+ postal: /[0-9]{5}/g,
12042
+ },
12043
+ {
12044
+ abbrev: "AS",
12045
+ name: "American Samoa",
12046
+ postal: /[0-9]{5}/g,
12047
+ },
12048
+ {
12049
+ abbrev: "AD",
12050
+ name: "Andorra",
12051
+ postal: /[0-9]{5}/g,
12052
+ },
12053
+ {
12054
+ abbrev: "AO",
12055
+ name: "Angola",
12056
+ },
12057
+ {
12058
+ abbrev: "AI",
12059
+ name: "Anguilla",
12060
+ postal: /AI-2640/g,
12061
+ },
12062
+ {
12063
+ abbrev: "AG",
12064
+ name: "Antigua and Barbuda",
12065
+ },
12066
+ {
12067
+ abbrev: "AR",
12068
+ name: "Argentina",
12069
+ postal: /[A-Z]{1}[0-9]{4}[A-Z]{3}/g,
12070
+ },
12071
+ {
12072
+ abbrev: "AM",
12073
+ name: "Armenia",
12074
+ postal: /[0-9]{4}/g,
12075
+ },
12076
+ {
12077
+ abbrev: "AW",
12078
+ name: "Aruba",
12079
+ },
12080
+ {
12081
+ abbrev: "AU",
12082
+ name: "Australia",
12083
+ postal: /[0-9]{4}/g,
12084
+ },
12085
+ {
12086
+ abbrev: "AT",
12087
+ name: "Austria",
12088
+ postal: /[0-9]{4}/g,
12089
+ },
12090
+ {
12091
+ abbrev: "AZ",
12092
+ name: "Azerbaijan",
12093
+ postal: /[0-9]{4}/g,
12094
+ },
12095
+ {
12096
+ abbrev: "BS",
12097
+ name: "Bahamas",
12098
+ },
12099
+ {
12100
+ abbrev: "BH",
12101
+ name: "Bahrain",
12102
+ },
12103
+ {
12104
+ abbrev: "BD",
12105
+ name: "Bangladesh",
12106
+ postal: /[0-9]{4}/g,
12107
+ },
12108
+ {
12109
+ abbrev: "BB",
12110
+ name: "Barbados",
12111
+ postal: /BB[0-9]{5}/g,
12112
+ },
12113
+ {
12114
+ abbrev: "BY",
12115
+ name: "Belarus",
12116
+ postal: /[0-9]{6}/g,
12117
+ },
12118
+ {
12119
+ abbrev: "BE",
12120
+ name: "Belgium",
12121
+ postal: /[0-9]{4}/g,
12122
+ },
12123
+ {
12124
+ abbrev: "BZ",
12125
+ name: "Belize",
12126
+ },
12127
+ {
12128
+ abbrev: "BJ",
12129
+ name: "Benin",
12130
+ },
12131
+ {
12132
+ abbrev: "BM",
12133
+ name: "Bermuda",
12134
+ postal: /[A-Z]{2}[0-9]{2}/g,
12135
+ },
12136
+ {
12137
+ abbrev: "BT",
12138
+ name: "Bhutan",
12139
+ postal: /[0-9]{5}/g,
12140
+ },
12141
+ {
12142
+ abbrev: "BO",
12143
+ name: "Bolivia",
12144
+ },
12145
+ {
12146
+ abbrev: "BQ",
12147
+ name: "Bonaire",
12148
+ },
12149
+ {
12150
+ abbrev: "BA",
12151
+ name: "Bosnia and Herzegovina",
12152
+ postal: /[0-9]{5}/g,
12153
+ },
12154
+ {
12155
+ abbrev: "BW",
12156
+ name: "Botswana",
12157
+ },
12158
+ {
12159
+ abbrev: "BR",
12160
+ name: "Brazil",
12161
+ postal: /[0-9]{5}-[0-9]{3}/g,
12162
+ },
12163
+ {
12164
+ abbrev: "BN",
12165
+ name: "Brunei",
12166
+ postal: /[A-Z]{2}[0-9]{4}/g,
12167
+ },
12168
+ {
12169
+ abbrev: "BG",
12170
+ name: "Bulgaria",
12171
+ postal: /[0-9]{4}/g,
12172
+ },
12173
+ {
12174
+ abbrev: "BF",
12175
+ name: "Burkina Faso",
12176
+ },
12177
+ {
12178
+ abbrev: "BI",
12179
+ name: "Burundi",
12180
+ },
12181
+ {
12182
+ abbrev: "KH",
12183
+ name: "Cambodia",
12184
+ postal: /[0-9]{5}/g,
12185
+ },
12186
+ {
12187
+ abbrev: "CM",
12188
+ name: "Cameroon",
12189
+ },
12190
+ {
12191
+ abbrev: "CA",
12192
+ name: "Canada",
12193
+ postal: /[A-Z][0-9][A-Z] ?[0-9][A-Z][0-9]/g,
12194
+ },
12195
+ {
12196
+ abbrev: "CI",
12197
+ name: "Canary Islands",
12198
+ postal: /[0-9]{5}/g,
12199
+ },
12200
+ {
12201
+ abbrev: "CV",
12202
+ name: "Cape Verde",
12203
+ postal: /[0-9]{4}/g,
12204
+ },
12205
+ {
12206
+ abbrev: "KY",
12207
+ name: "Cayman Islands",
12208
+ postal: /[A-Z]{2}[0-9]-[0-9]{4}/g,
12209
+ },
12210
+ {
12211
+ abbrev: "CF",
12212
+ name: "Central African Republic",
12213
+ },
12214
+ {
12215
+ abbrev: "TD",
12216
+ name: "Chad",
12217
+ },
12218
+ {
12219
+ abbrev: "CI",
12220
+ name: "Channel Islands",
12221
+ postal: /[A-Z]{2}[0-9]{2}/g,
12222
+ },
12223
+ {
12224
+ abbrev: "CL",
12225
+ name: "Chile",
12226
+ postal: /[0-9]{7}/g,
12227
+ },
12228
+ {
12229
+ abbrev: "CN",
12230
+ name: "China, People's Republic",
12231
+ postal: /[0-9]{5}/g,
12232
+ },
12233
+ {
12234
+ abbrev: "CO",
12235
+ name: "Colombia",
12236
+ postal: /[0-9]{6}/g,
12237
+ },
12238
+ {
12239
+ abbrev: "KM",
12240
+ name: "Comoros",
12241
+ },
12242
+ {
12243
+ abbrev: "CG",
12244
+ name: "Congo",
12245
+ },
12246
+ {
12247
+ abbrev: "CD",
12248
+ name: "Congo, The Democratic Republic of",
12249
+ },
12250
+ {
12251
+ abbrev: "CK",
12252
+ name: "Cook Islands",
12253
+ },
12254
+ {
12255
+ abbrev: "CR",
12256
+ name: "Costa Rica",
12257
+ postal: /[0-9]{5}/g,
12258
+ },
12259
+ {
12260
+ abbrev: "CI",
12261
+ name: "Côte d'Ivoire",
12262
+ },
12263
+ {
12264
+ abbrev: "HR",
12265
+ name: "Croatia",
12266
+ postal: /[0-9]{5}/g,
12267
+ },
12268
+ {
12269
+ abbrev: "CU",
12270
+ name: "Cuba",
12271
+ postal: /[0-9]{5}/g,
12272
+ },
12273
+ {
12274
+ abbrev: "CW",
12275
+ name: "Curacao",
12276
+ },
12277
+ {
12278
+ abbrev: "CY",
12279
+ name: "Cyprus",
12280
+ postal: /[0-9]{4}/g,
12281
+ },
12282
+ {
12283
+ abbrev: "CZ",
12284
+ name: "Czech Republic",
12285
+ postal: /[0-9]{3} [0-9]{2}/g,
12286
+ },
12287
+ {
12288
+ abbrev: "DK",
12289
+ name: "Denmark",
12290
+ postal: /[0-9]{5}/g,
12291
+ },
12292
+ {
12293
+ abbrev: "DJ",
12294
+ name: "Djibouti",
12295
+ },
12296
+ {
12297
+ abbrev: "DM",
12298
+ name: "Dominica",
12299
+ },
12300
+ {
12301
+ abbrev: "DO",
12302
+ name: "Dominican Republic",
12303
+ postal: /[0-9]{5}/g,
12304
+ },
12305
+ {
12306
+ abbrev: "TL",
12307
+ name: "East Timor",
12308
+ },
12309
+ {
12310
+ abbrev: "EC",
12311
+ name: "Ecuador",
12312
+ postal: /[0-9]{6}/g,
12313
+ },
12314
+ {
12315
+ abbrev: "EG",
12316
+ name: "Egypt",
12317
+ postal: /[0-9]{5}/g,
12318
+ },
12319
+ {
12320
+ abbrev: "SV",
12321
+ name: "El Salvador",
12322
+ postal: /[0-9]{4}/g,
12323
+ },
12324
+ {
12325
+ abbrev: "ER",
12326
+ name: "Eritrea",
12327
+ },
12328
+ {
12329
+ abbrev: "EE",
12330
+ name: "Estonia",
12331
+ postal: /[0-9]{5}/g,
12332
+ },
12333
+ {
12334
+ abbrev: "ET",
12335
+ name: "Ethiopia",
12336
+ postal: /[0-9]{4}/g,
12337
+ },
12338
+ {
12339
+ abbrev: "FK",
12340
+ name: "Falkland Islands",
12341
+ postal: /FIQQ 1ZZ/g,
12342
+ },
12343
+ {
12344
+ abbrev: "FO",
12345
+ name: "Faroe Islands",
12346
+ postal: /[0-9]{3}/g,
12347
+ },
12348
+ {
12349
+ abbrev: "FJ",
12350
+ name: "Fiji",
12351
+ },
12352
+ {
12353
+ abbrev: "FI",
12354
+ name: "Finland",
12355
+ postal: /[0-9]{5}/g,
12356
+ },
12357
+ {
12358
+ abbrev: "FR",
12359
+ name: "France",
12360
+ postal: /[0-9]{5}/g,
12361
+ },
12362
+ {
12363
+ abbrev: "PF",
12364
+ name: "French Polynesia",
12365
+ postal: /987[0-9]{2}/g,
12366
+ range: ["98700", "98790"],
12367
+ },
12368
+ {
12369
+ abbrev: "GA",
12370
+ name: "Gabon",
12371
+ },
12372
+ {
12373
+ abbrev: "GM",
12374
+ name: "Gambia",
12375
+ },
12376
+ {
12377
+ abbrev: "GE",
12378
+ name: "Georgia",
12379
+ },
12380
+ {
12381
+ abbrev: "DE",
12382
+ name: "Germany",
12383
+ postal: /[0-9]{5}/g,
12384
+ },
12385
+ {
12386
+ abbrev: "GH",
12387
+ name: "Ghana",
12388
+ },
12389
+ {
12390
+ abbrev: "GI",
12391
+ name: "Gibraltar",
12392
+ postal: /GX11 1AA/g,
12393
+ },
12394
+ {
12395
+ abbrev: "GR",
12396
+ name: "Greece",
12397
+ postal: /[0-9]{3} [0-9]{2}/g,
12398
+ },
12399
+ {
12400
+ abbrev: "GL",
12401
+ name: "Greenland",
12402
+ postal: /[0-9]{4}/g,
12403
+ },
12404
+ {
12405
+ abbrev: "GD",
12406
+ name: "Grenada",
12407
+ },
12408
+ {
12409
+ abbrev: "GP",
12410
+ name: "Guadeloupe",
12411
+ postal: /971[0-9]{2}/g,
12412
+ range: ["97100", "97190"],
12413
+ },
12414
+ {
12415
+ abbrev: "GU",
12416
+ name: "Guam",
12417
+ // US postal code
12418
+ // https://stackoverflow.com/questions/2577236/regex-for-zip-code
12419
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12420
+ range: ["96910", "96932"],
12421
+ },
12422
+ {
12423
+ abbrev: "GT",
12424
+ name: "Guatemala",
12425
+ postal: /[0-9]{5}/g,
12426
+ },
12427
+ {
12428
+ abbrev: "GG",
12429
+ name: "Guernsey",
12430
+ // UK postal code
12431
+ // https://stackoverflow.com/questions/164979/regex-for-matching-uk-postcodes
12432
+ postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
12433
+ },
12434
+ {
12435
+ abbrev: "GW",
12436
+ name: "Guinea-Bissau",
12437
+ postal: /[0-9]{4}/g,
12438
+ },
12439
+ {
12440
+ abbrev: "GQ",
12441
+ name: "Guinea-Equatorial",
12442
+ },
12443
+ {
12444
+ abbrev: "GN",
12445
+ name: "Guinea Republic",
12446
+ postal: /[0-9]{3}/g,
12447
+ },
12448
+ {
12449
+ abbrev: "GY",
12450
+ name: "Guyana (British)",
12451
+ },
12452
+ {
12453
+ abbrev: "GF",
12454
+ name: "Guyana (French)",
12455
+ postal: /973[0-9]{2}/g,
12456
+ range: ["97300", "97390"],
12457
+ },
12458
+ {
12459
+ abbrev: "HT",
12460
+ name: "Haiti",
12461
+ postal: /[0-9]{4}/g,
12462
+ },
12463
+ {
12464
+ abbrev: "HN",
12465
+ name: "Honduras",
12466
+ postal: /[0-9]{5}/g,
12467
+ },
12468
+ {
12469
+ abbrev: "HK",
12470
+ name: "Hong Kong",
12471
+ },
12472
+ {
12473
+ abbrev: "HU",
12474
+ name: "Hungary",
12475
+ postal: /[0-9]{4}/g,
12476
+ },
12477
+ {
12478
+ abbrev: "IS",
12479
+ name: "Iceland",
12480
+ postal: /[0-9]{3}/g,
12481
+ },
12482
+ {
12483
+ abbrev: "IN",
12484
+ name: "India",
12485
+ // https://stackoverflow.com/questions/33865525/indian-pincode-validation-regex-only-six-digits-shouldnt-start-with-0
12486
+ postal: /^[1-9][0-9]{5}$/g,
12487
+ },
12488
+ {
12489
+ abbrev: "ID",
12490
+ name: "Indonesia",
12491
+ postal: /[0-9]{5}/g,
12492
+ },
12493
+ {
12494
+ abbrev: "IR",
12495
+ name: "Iran",
12496
+ postal: /[0-9]{5}/g,
12497
+ },
12498
+ {
12499
+ abbrev: "IQ",
12500
+ name: "Iraq",
12501
+ postal: /[0-9]{5}/g,
12502
+ },
12503
+ {
12504
+ abbrev: "IE",
12505
+ name: "Ireland, Republic of",
12506
+ // https://stackoverflow.com/questions/33391412/validation-for-irish-eircode
12507
+ postal: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$/g,
12508
+ },
12509
+ {
12510
+ abbrev: "FK",
12511
+ name: "Islas Malvinas",
12512
+ postal: /FIQQ 1ZZ/g,
12513
+ },
12514
+ {
12515
+ abbrev: "IL",
12516
+ name: "Israel",
12517
+ postal: /[0-9]{5}|[0-9]{7}/g,
12518
+ },
12519
+ {
12520
+ abbrev: "IT",
12521
+ name: "Italy",
12522
+ postal: /[0-9]{5}/g,
12523
+ },
12524
+ {
12525
+ abbrev: "CI",
12526
+ name: "Ivory Coast",
12527
+ },
12528
+ {
12529
+ abbrev: "JM",
12530
+ name: "Jamaica",
12531
+ },
12532
+ {
12533
+ abbrev: "JP",
12534
+ name: "Japan",
12535
+ postal: /[0-9]{3}-[0-9]{4}/g,
12536
+ },
12537
+ {
12538
+ abbrev: "JE",
12539
+ name: "Jersey",
12540
+ postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
12541
+ },
12542
+ {
12543
+ abbrev: "JO",
12544
+ name: "Jordan",
12545
+ postal: /[0-9]{5}/g,
12546
+ },
12547
+ {
12548
+ abbrev: "KZ",
12549
+ name: "Kazakhstan",
12550
+ postal: /[0-9]{6}/g,
12551
+ },
12552
+ {
12553
+ abbrev: "KE",
12554
+ name: "Kenya",
12555
+ postal: /[0-9]{5}/g,
12556
+ },
12557
+ {
12558
+ abbrev: "KI",
12559
+ name: "Kiribati",
12560
+ },
12561
+ {
12562
+ abbrev: "KR",
12563
+ name: "Korea, Republic of",
12564
+ postal: /[0-9]{5}/g,
12565
+ },
12566
+ {
12567
+ abbrev: "KP",
12568
+ name: "Korea, The D.P.R of",
12569
+ },
12570
+ {
12571
+ abbrev: "XK",
12572
+ name: "Kosovo",
12573
+ postal: /[0-9]{5}/g,
12574
+ },
12575
+ {
12576
+ abbrev: "KW",
12577
+ name: "Kuwait",
12578
+ postal: /[0-9]{5}/g,
12579
+ },
12580
+ {
12581
+ abbrev: "KG",
12582
+ name: "Kyrgyzstan",
12583
+ postal: /[0-9]{6}/g,
12584
+ },
12585
+ {
12586
+ abbrev: "LA",
12587
+ name: "Laos",
12588
+ postal: /[0-9]{5}/g,
12589
+ },
12590
+ {
12591
+ abbrev: "LV",
12592
+ name: "Latvia",
12593
+ postal: /LV-[0-9]{4}/g,
12594
+ },
12595
+ {
12596
+ abbrev: "LB",
12597
+ name: "Lebanon",
12598
+ postal: /[0-9]{4} [0-9]{4}/g,
12599
+ },
12600
+ {
12601
+ abbrev: "LS",
12602
+ name: "Lesotho",
12603
+ postal: /[0-9]{3}/g,
12604
+ },
12605
+ {
12606
+ abbrev: "LR",
12607
+ name: "Liberia",
12608
+ postal: /[0-9]{4}/g,
12609
+ },
12610
+ {
12611
+ abbrev: "LY",
12612
+ name: "Libya",
12613
+ },
12614
+ {
12615
+ abbrev: "LI",
12616
+ name: "Liechtenstein",
12617
+ postal: /[0-9]{4}/g,
12618
+ range: ["9485", "9498"],
12619
+ },
12620
+ {
12621
+ abbrev: "LT",
12622
+ name: "Lithuania",
12623
+ postal: /LT-[0-9]{5}/g,
12624
+ },
12625
+ {
12626
+ abbrev: "LU",
12627
+ name: "Luxembourg",
12628
+ postal: /[0-9]{4}/g,
12629
+ },
12630
+ {
12631
+ abbrev: "MO",
12632
+ name: "Macau",
12633
+ },
12634
+ {
12635
+ abbrev: "MK",
12636
+ name: "Macedonia, Republic of",
12637
+ postal: /[0-9]{4}/g,
12638
+ },
12639
+ {
12640
+ abbrev: "MG",
12641
+ name: "Madagascar",
12642
+ postal: /[0-9]{3}/g,
12643
+ },
12644
+ {
12645
+ abbrev: "MW",
12646
+ name: "Malawi",
12647
+ },
12648
+ {
12649
+ abbrev: "MY",
12650
+ name: "Malaysia",
12651
+ postal: /[0-9]{5}/g,
12652
+ },
12653
+ {
12654
+ abbrev: "MV",
12655
+ name: "Maldives",
12656
+ postal: /[0-9]{5}/g,
12657
+ },
12658
+ {
12659
+ abbrev: "ML",
12660
+ name: "Mali",
12661
+ },
12662
+ {
12663
+ abbrev: "MT",
12664
+ name: "Malta",
12665
+ postal: /[A-Z]{3} [0-9]{4}/g,
12666
+ },
12667
+ {
12668
+ abbrev: "MH",
12669
+ name: "Marshall Islands",
12670
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12671
+ range: ["96960", "96970"],
12672
+ },
12673
+ {
12674
+ abbrev: "MQ",
12675
+ name: "Martinique",
12676
+ postal: /972[0-9]{2}/g,
12677
+ range: ["97200", "97290"],
12678
+ },
12679
+ {
12680
+ abbrev: "MR",
12681
+ name: "Mauritania",
12682
+ },
12683
+ {
12684
+ abbrev: "MU",
12685
+ name: "Mauritius",
12686
+ postal: /[0-9]{5}/g,
12687
+ },
12688
+ {
12689
+ abbrev: "YT",
12690
+ name: "Mayotte",
12691
+ postal: /976[0-9]{2}/g,
12692
+ range: ["97600", "97690"],
12693
+ },
12694
+ {
12695
+ abbrev: "MX",
12696
+ name: "Mexico",
12697
+ postal: /[0-9]{5}/g,
12698
+ },
12699
+ {
12700
+ abbrev: "MD",
12701
+ name: "Moldova, Republic of",
12702
+ postal: /MD-?[0-9]{4}/g,
12703
+ },
12704
+ {
12705
+ abbrev: "MC",
12706
+ name: "Monaco",
12707
+ postal: /980[0-9]{2}/g,
12708
+ },
12709
+ {
12710
+ abbrev: "MN",
12711
+ name: "Mongolia",
12712
+ postal: /[0-9]{5}/g,
12713
+ },
12714
+ {
12715
+ abbrev: "ME",
12716
+ name: "Montenegro",
12717
+ postal: /[0-9]{5}/g,
12718
+ },
12719
+ {
12720
+ abbrev: "MS",
12721
+ name: "Montserrat",
12722
+ postal: /MSR [0-9]{4}/g,
12723
+ range: ["MSR 1110", "MSR 1350"],
12724
+ },
12725
+ {
12726
+ abbrev: "MA",
12727
+ name: "Morocco",
12728
+ postal: /[0-9]{5}/g,
12729
+ },
12730
+ {
12731
+ abbrev: "MZ",
12732
+ name: "Mozambique",
12733
+ postal: /[0-9]{4}/g,
12734
+ },
12735
+ {
12736
+ abbrev: "MM",
12737
+ name: "Myanmar",
12738
+ postal: /[0-9]{5}/g,
12739
+ },
12740
+ {
12741
+ abbrev: "NA",
12742
+ name: "Namibia",
12743
+ },
12744
+ {
12745
+ abbrev: "NR",
12746
+ name: "Nauru",
12747
+ },
12748
+ {
12749
+ abbrev: "NP",
12750
+ name: "Nepal",
12751
+ postal: /[0-9]{5}/g,
12752
+ },
12753
+ {
12754
+ abbrev: "NL",
12755
+ name: "Netherlands",
12756
+ // https://rgxdb.com/r/4W9GV8AC
12757
+ postal: /^(?:NL-)?(\d{4})\s*([A-Z]{2})$/i,
12758
+ },
12759
+ {
12760
+ abbrev: "NC",
12761
+ name: "New Caledonia",
12762
+ postal: /988[0-9]{2}/g,
12763
+ range: ["96950", "96952"],
12764
+ },
12765
+ {
12766
+ abbrev: "NZ",
12767
+ name: "New Zealand",
12768
+ postal: /[0-9]{4}/g,
12769
+ },
12770
+ {
12771
+ abbrev: "NI",
12772
+ name: "Nicaragua",
12773
+ },
12774
+ {
12775
+ abbrev: "NE",
12776
+ name: "Niger",
12777
+ postal: /[0-9]{4}/g,
12778
+ },
12779
+ {
12780
+ abbrev: "NG",
12781
+ name: "Nigeria",
12782
+ postal: /[0-9]{6}/g,
12783
+ },
12784
+ {
12785
+ abbrev: "NU",
12786
+ name: "Niue",
12787
+ },
12788
+ {
12789
+ abbrev: "MP",
12790
+ name: "Northern Mariana Islands",
12791
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12792
+ },
12793
+ {
12794
+ abbrev: "NO",
12795
+ name: "Norway",
12796
+ postal: /[0-9]{4}/g,
12797
+ },
12798
+ {
12799
+ abbrev: "OM",
12800
+ name: "Oman",
12801
+ postal: /[0-9]{3}/g,
12802
+ },
12803
+ {
12804
+ abbrev: "PK",
12805
+ name: "Pakistan",
12806
+ postal: /[0-9]{5}/g,
12807
+ },
12808
+ {
12809
+ abbrev: "PW",
12810
+ name: "Palau",
12811
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12812
+ },
12813
+ {
12814
+ abbrev: "PA",
12815
+ name: "Panama",
12816
+ postal: /[0-9]{4}/g,
12817
+ },
12818
+ {
12819
+ abbrev: "PG",
12820
+ name: "Papua New Guinea",
12821
+ postal: /[0-9]{3}/g,
12822
+ },
12823
+ {
12824
+ abbrev: "PY",
12825
+ name: "Paraguay",
12826
+ postal: /[0-9]{4}/g,
12827
+ },
12828
+ {
12829
+ abbrev: "PE",
12830
+ name: "Peru",
12831
+ postal: /[0-9]{5}/g,
12832
+ },
12833
+ {
12834
+ abbrev: "PH",
12835
+ name: "Philippines",
12836
+ postal: /[0-9]{4}/g,
12837
+ },
12838
+ {
12839
+ abbrev: "PL",
12840
+ name: "Poland",
12841
+ postal: /[0-9]{2}-[0-9]{3}/g,
12842
+ },
12843
+ {
12844
+ abbrev: "PT",
12845
+ name: "Portugal",
12846
+ postal: /[0-9]{4}-[0-9]{3}/g,
12847
+ },
12848
+ {
12849
+ abbrev: "PR",
12850
+ name: "Puerto Rico",
12851
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12852
+ },
12853
+ {
12854
+ abbrev: "QA",
12855
+ name: "Qatar",
12856
+ },
12857
+ {
12858
+ abbrev: "RE",
12859
+ name: "Réunion",
12860
+ postal: /974[0-9]{2}/g,
12861
+ range: ["97400", "97490"],
12862
+ },
12863
+ {
12864
+ abbrev: "RO",
12865
+ name: "Romania",
12866
+ postal: /[0-9]{6}/g,
12867
+ },
12868
+ {
12869
+ abbrev: "RU",
12870
+ name: "Russian Federation",
12871
+ postal: /[0-9]{6}/g,
12872
+ },
12873
+ {
12874
+ abbrev: "RW",
12875
+ name: "Rwanda",
12876
+ },
12877
+ {
12878
+ abbrev: "MP",
12879
+ name: "Saipan",
12880
+ postal: /96950/g,
12881
+ },
12882
+ {
12883
+ abbrev: "WS",
12884
+ name: "Samoa",
12885
+ postal: /WS[0-9]{4}/g,
12886
+ },
12887
+ {
12888
+ abbrev: "ST",
12889
+ name: "Sao Tome and Principe",
12890
+ },
12891
+ {
12892
+ abbrev: "SA",
12893
+ name: "Saudi Arabia",
12894
+ postal: /[0-9]{5}(-[0-9]{4})?/g,
12895
+ },
12896
+ {
12897
+ abbrev: "SN",
12898
+ name: "Senegal",
12899
+ postal: /[0-9]{5}/g,
12900
+ },
12901
+ {
12902
+ abbrev: "RS",
12903
+ name: "Serbia",
12904
+ postal: /[0-9]{5}/g,
12905
+ },
12906
+ {
12907
+ abbrev: "SC",
12908
+ name: "Seychelles",
12909
+ },
12910
+ {
12911
+ abbrev: "SL",
12912
+ name: "Sierra Leone",
12913
+ },
12914
+ {
12915
+ abbrev: "SG",
12916
+ name: "Singapore",
12917
+ postal: /[0-9]{6}/g,
12918
+ },
12919
+ {
12920
+ abbrev: "SK",
12921
+ name: "Slovakia",
12922
+ postal: /[0-9]{3} [0-9]{2}/g,
12923
+ },
12924
+ {
12925
+ abbrev: "SI",
12926
+ name: "Slovenia",
12927
+ postal: /[0-9]{4}/g,
12928
+ },
12929
+ {
12930
+ abbrev: "SB",
12931
+ name: "Solomon Islands",
12932
+ },
12933
+ {
12934
+ abbrev: "SO",
12935
+ name: "Somalia",
12936
+ postal: /[A-Z]{2} [0-9]{5}/g,
12937
+ },
12938
+ {
12939
+ abbrev: "ZA",
12940
+ name: "South Africa",
12941
+ postal: /[0-9]{4}/g,
12942
+ },
12943
+ {
12944
+ abbrev: "SS",
12945
+ name: "South Sudan",
12946
+ },
12947
+ {
12948
+ abbrev: "ES",
12949
+ name: "Spain",
12950
+ postal: /[0-9]{5}/g,
12951
+ },
12952
+ {
12953
+ abbrev: "LK",
12954
+ name: "Sri Lanka",
12955
+ postal: /[0-9]{4}/g,
12956
+ },
12957
+ {
12958
+ abbrev: "BL",
12959
+ name: "St. Barthélemy",
12960
+ postal: /[0-9]{5}/g,
12961
+ range: ["97100", "97190"],
12962
+ },
12963
+ {
12964
+ abbrev: "VI",
12965
+ name: "St. Croix",
12966
+ postal: /[0-9]{5}/g,
12967
+ },
12968
+ {
12969
+ abbrev: "SE",
12970
+ name: "St. Eustatius",
12971
+ },
12972
+ {
12973
+ abbrev: "SH",
12974
+ name: "St. Helena",
12975
+ postal: /STHL 1ZZ/g,
12976
+ },
12977
+ {
12978
+ abbrev: "AG",
12979
+ name: "St. John",
12980
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12981
+ },
12982
+ {
12983
+ abbrev: "KN",
12984
+ name: "St. Kitts and Nevis",
12985
+ postal: /[A-Z]{2}[0-9]{4}/g,
12986
+ },
12987
+ {
12988
+ abbrev: "LC",
12989
+ name: "St. Lucia",
12990
+ postal: /[A-Z]{2}[0-9]{2} [0-9]{3}/g,
12991
+ },
12992
+ {
12993
+ abbrev: "SX",
12994
+ name: "St. Maarten",
12995
+ },
12996
+ {
12997
+ abbrev: "VI",
12998
+ name: "St. Thomas",
12999
+ },
13000
+ {
13001
+ abbrev: "VC",
13002
+ name: "St. Vincent and the Grenadines",
13003
+ postal: /VC[0-9]{4}/g,
13004
+ },
13005
+ {
13006
+ abbrev: "SD",
13007
+ name: "Sudan",
13008
+ postal: /[0-9]{5}/g,
13009
+ },
13010
+ {
13011
+ abbrev: "SR",
13012
+ name: "Suriname",
13013
+ },
13014
+ {
13015
+ abbrev: "SZ",
13016
+ name: "Swaziland",
13017
+ postal: /[A-Z]{1}[0-9]{3}/g,
13018
+ },
13019
+ {
13020
+ abbrev: "SE",
13021
+ name: "Sweden",
13022
+ postal: /[0-9]{3} [0-9]{2}/g,
13023
+ },
13024
+ {
13025
+ abbrev: "CH",
13026
+ name: "Switzerland",
13027
+ postal: /[0-9]{4}/g,
13028
+ },
13029
+ {
13030
+ abbrev: "SY",
13031
+ name: "Syria",
13032
+ },
13033
+ {
13034
+ abbrev: "PF",
13035
+ name: "Tahiti",
13036
+ postal: /[0-9]{5}/g,
13037
+ },
13038
+ {
13039
+ abbrev: "TW",
13040
+ name: "Taiwan",
13041
+ postal: /[0-9]{3}(-[0-9]{2})?/g,
13042
+ },
13043
+ {
13044
+ abbrev: "TZ",
13045
+ name: "Tanzania",
13046
+ postal: /[0-9]{5}/g,
13047
+ },
13048
+ {
13049
+ abbrev: "TH",
13050
+ name: "Thailand",
13051
+ postal: /[0-9]{5}/g,
13052
+ },
13053
+ {
13054
+ abbrev: "TG",
13055
+ name: "Togo",
13056
+ },
13057
+ {
13058
+ abbrev: "TO",
13059
+ name: "Tonga",
13060
+ },
13061
+ {
13062
+ abbrev: "VG",
13063
+ name: "Tortola",
13064
+ postal: /VG[0-9]{4}/g,
13065
+ },
13066
+ {
13067
+ abbrev: "TT",
13068
+ name: "Trinidad and Tobago",
13069
+ postal: /[0-9]{6}/g,
13070
+ },
13071
+ {
13072
+ abbrev: "TN",
13073
+ name: "Tunisia",
13074
+ postal: /[0-9]{4}/g,
13075
+ },
13076
+ {
13077
+ abbrev: "TR",
13078
+ name: "Turkey",
13079
+ postal: /[0-9]{5}/g,
13080
+ },
13081
+ {
13082
+ abbrev: "TM",
13083
+ name: "Turkmenistan",
13084
+ postal: /[0-9]{6}/g,
13085
+ },
13086
+ {
13087
+ abbrev: "TC",
13088
+ name: "Turks and Caicos Islands",
13089
+ postal: /TKCA 1ZZ/g,
13090
+ },
13091
+ {
13092
+ abbrev: "TV",
13093
+ name: "Tuvalu",
13094
+ },
13095
+ {
13096
+ abbrev: "UG",
13097
+ name: "Uganda",
13098
+ },
13099
+ {
13100
+ abbrev: "UA",
13101
+ name: "Ukraine",
13102
+ postal: /[0-9]{5}/g,
13103
+ },
13104
+ {
13105
+ abbrev: "AE",
13106
+ name: "United Arab Emirates",
13107
+ },
13108
+ {
13109
+ abbrev: "GB",
13110
+ name: "United Kingdom",
13111
+ postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
13112
+ },
13113
+ {
13114
+ abbrev: "US",
13115
+ name: "United States of America",
13116
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13117
+ },
13118
+ {
13119
+ abbrev: "UY",
13120
+ name: "Uruguay",
13121
+ postal: /[0-9]{5}/g,
13122
+ },
13123
+ {
13124
+ abbrev: "UZ",
13125
+ name: "Uzbekistan",
13126
+ postal: /[0-9]{6}/g,
13127
+ },
13128
+ {
13129
+ abbrev: "VU",
13130
+ name: "Vanuatu",
13131
+ },
13132
+ {
13133
+ abbrev: "VE",
13134
+ name: "Venezuela",
13135
+ postal: /[0-9]{4}(-[A-Z]{1})?/g,
13136
+ },
13137
+ {
13138
+ abbrev: "VN",
13139
+ name: "Vietnam",
13140
+ postal: /[0-9]{6}/g,
13141
+ },
13142
+ {
13143
+ abbrev: "VG",
13144
+ name: "Virgin Islands (British)",
13145
+ postal: /VG[0-9]{4}/g,
13146
+ },
13147
+ {
13148
+ abbrev: "VI",
13149
+ name: "Virgin Islands (US)",
13150
+ range: ["00801", "00851"],
13151
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13152
+ },
13153
+ {
13154
+ abbrev: "YE",
13155
+ name: "Yemen",
13156
+ },
13157
+ {
13158
+ abbrev: "ZM",
13159
+ name: "Zambia",
13160
+ postal: /[0-9]{5}/g,
13161
+ },
13162
+ {
13163
+ abbrev: "ZW",
13164
+ name: "Zimbabwe",
13165
+ },
13166
+ ];
13167
+
12021
13168
  var stringToSlug = function (str) {
12022
13169
  str = str.replace(/^\s+|\s+$/g, ""); // trim
12023
13170
  str = str.toLocaleLowerCase("tr-TR");
@@ -12109,6 +13256,16 @@ function tryForEach(items, callback, printErrors) {
12109
13256
  console.error(err);
12110
13257
  }
12111
13258
  });
13259
+ }
13260
+ function isValidPostalCode(postalCode, iso2) {
13261
+ if (!iso2)
13262
+ return !!postalCode;
13263
+ var postalCodeEntry = COUNTRY_ADDRESS_POSTALS.find(function (a) { return a.abbrev === iso2; });
13264
+ if (postalCodeEntry && postalCodeEntry.postal && postalCode) {
13265
+ var regex = new RegExp(postalCodeEntry.postal);
13266
+ return regex.test(postalCode);
13267
+ }
13268
+ return !!postalCode;
12112
13269
  }
12113
13270
 
12114
13271
  var format = function (p, n, x, s, c) {
@@ -14007,6 +15164,8 @@ var IkasCheckoutSettings = /** @class */ (function () {
14007
15164
  this.updatedAt = data.updatedAt || 0;
14008
15165
  this.phoneRequirement =
14009
15166
  data.phoneRequirement || IkasCheckoutRequirementEnum.OPTIONAL;
15167
+ this.postalCodeRequirement =
15168
+ data.postalCodeRequirement || IkasCheckoutRequirementEnum.OPTIONAL;
14010
15169
  this.identityNumberRequirement =
14011
15170
  data.identityNumberRequirement || IkasCheckoutRequirementEnum.INVISIBLE;
14012
15171
  this.isAccountRequired = data.isAccountRequired || false;
@@ -14020,7 +15179,6 @@ var IkasCheckoutSettings = /** @class */ (function () {
14020
15179
  this.storefrontId = data.storefrontId || "";
14021
15180
  this.giftPackagePriceList = data.giftPackagePriceList || null;
14022
15181
  this.isGiftPackageEnabled = data.isGiftPackageEnabled || false;
14023
- this.isShowPostalCode = data.isShowPostalCode || false;
14024
15182
  }
14025
15183
  return IkasCheckoutSettings;
14026
15184
  }());
@@ -14051,6 +15209,8 @@ var IkasOrderAddress = /** @class */ (function () {
14051
15209
  this.identityNumber = null;
14052
15210
  this.taxNumber = null;
14053
15211
  this.taxOffice = null;
15212
+ // Extra
15213
+ this.checkoutSettings = null;
14054
15214
  this.isDistrictRequired = false;
14055
15215
  this.id = data.id || null;
14056
15216
  this.title = data.title || null;
@@ -14097,10 +15257,13 @@ var IkasOrderAddress = /** @class */ (function () {
14097
15257
  });
14098
15258
  Object.defineProperty(IkasOrderAddress.prototype, "validationResult", {
14099
15259
  get: function () {
14100
- var _a, _b, _c, _d;
15260
+ var _a, _b, _c, _d, _e, _f;
14101
15261
  var isValidPhone = !!this.phone &&
14102
15262
  this.phone.length >= 10 &&
14103
15263
  validatePhoneNumber(this.phone);
15264
+ var _isValidPostalCode = !!this.postalCode &&
15265
+ !!this.country &&
15266
+ isValidPostalCode(this.postalCode, this.country.iso2);
14104
15267
  var results = {
14105
15268
  firstName: !!this.firstName,
14106
15269
  lastName: !!this.lastName,
@@ -14116,7 +15279,14 @@ var IkasOrderAddress = /** @class */ (function () {
14116
15279
  this.phone)
14117
15280
  ? isValidPhone
14118
15281
  : true,
14119
- identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
15282
+ postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
15283
+ IkasCheckoutRequirementEnum.MANDATORY ||
15284
+ (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
15285
+ IkasCheckoutRequirementEnum.OPTIONAL &&
15286
+ this.postalCode)
15287
+ ? _isValidPostalCode
15288
+ : true,
15289
+ identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
14120
15290
  IkasCheckoutRequirementEnum.MANDATORY
14121
15291
  ? !!this.identityNumber
14122
15292
  : true,
@@ -20379,6 +21549,8 @@ var IkasCustomerAddress = /** @class */ (function () {
20379
21549
  this.identityNumber = null;
20380
21550
  this.taxNumber = null;
20381
21551
  this.taxOffice = null;
21552
+ // Extra
21553
+ this.checkoutSettings = null;
20382
21554
  this.isDistrictRequired = false;
20383
21555
  this.id = data.id || null;
20384
21556
  this.title = data.title || null;
@@ -20423,10 +21595,13 @@ var IkasCustomerAddress = /** @class */ (function () {
20423
21595
  });
20424
21596
  Object.defineProperty(IkasCustomerAddress.prototype, "validationResult", {
20425
21597
  get: function () {
20426
- var _a, _b, _c, _d;
21598
+ var _a, _b, _c, _d, _e, _f;
20427
21599
  var isValidPhone = !!this.phone &&
20428
21600
  this.phone.length >= 10 &&
20429
21601
  validatePhoneNumber(this.phone);
21602
+ var _isValidPostalCode = !!this.postalCode &&
21603
+ !!this.country &&
21604
+ isValidPostalCode(this.postalCode, this.country.iso2);
20430
21605
  var results = {
20431
21606
  firstName: !!this.firstName,
20432
21607
  lastName: !!this.lastName,
@@ -20442,7 +21617,14 @@ var IkasCustomerAddress = /** @class */ (function () {
20442
21617
  this.phone)
20443
21618
  ? isValidPhone
20444
21619
  : true,
20445
- identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
21620
+ postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
21621
+ IkasCheckoutRequirementEnum.MANDATORY ||
21622
+ (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
21623
+ IkasCheckoutRequirementEnum.OPTIONAL &&
21624
+ this.postalCode)
21625
+ ? _isValidPostalCode
21626
+ : true,
21627
+ identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
20446
21628
  IkasCheckoutRequirementEnum.MANDATORY
20447
21629
  ? !!this.identityNumber
20448
21630
  : true,
@@ -37760,6 +38942,7 @@ var CancelledReasonEnum;
37760
38942
  var CartStatusEnum;
37761
38943
  (function (CartStatusEnum) {
37762
38944
  CartStatusEnum["ACTIVE"] = "ACTIVE";
38945
+ CartStatusEnum["FREEZE"] = "FREEZE";
37763
38946
  CartStatusEnum["PASSIVE"] = "PASSIVE";
37764
38947
  })(CartStatusEnum || (CartStatusEnum = {}));
37765
38948
  /**
@@ -37944,6 +39127,7 @@ var PaymentMethodEnum;
37944
39127
  PaymentMethodEnum["GIFT_CARD"] = "GIFT_CARD";
37945
39128
  PaymentMethodEnum["MONEY_ORDER"] = "MONEY_ORDER";
37946
39129
  PaymentMethodEnum["OTHER"] = "OTHER";
39130
+ PaymentMethodEnum["WALLET"] = "WALLET";
37947
39131
  })(PaymentMethodEnum || (PaymentMethodEnum = {}));
37948
39132
  /**
37949
39133
  * ProductAttribute Types
@@ -37989,6 +39173,7 @@ var ProductFilterSortTypeEnum;
37989
39173
  var ProductFilterTypeEnum;
37990
39174
  (function (ProductFilterTypeEnum) {
37991
39175
  ProductFilterTypeEnum["ATTRIBUTE"] = "ATTRIBUTE";
39176
+ ProductFilterTypeEnum["AVAILABLE_VARIANT_VALUE"] = "AVAILABLE_VARIANT_VALUE";
37992
39177
  ProductFilterTypeEnum["BRAND"] = "BRAND";
37993
39178
  ProductFilterTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
37994
39179
  ProductFilterTypeEnum["PRICE"] = "PRICE";
@@ -42131,7 +43316,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
42131
43316
  return __generator(this, function (_b) {
42132
43317
  switch (_b.label) {
42133
43318
  case 0:
42134
- QUERY = src(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n isShowPostalCode\n }\n }\n "], ["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n isShowPostalCode\n }\n }\n "])));
43319
+ QUERY = src(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "], ["\n query listCheckoutSettings($storefrontId: StringFilterInput!) {\n listCheckoutSettings(storefrontId: $storefrontId) {\n createdAt\n id\n identityNumberRequirement\n isAccountRequired\n isTermsAndConditionsDefaultChecked\n options {\n name\n required\n }\n phoneRequirement\n showCheckoutNote\n showTermsAndConditionsCheckbox\n storefrontId\n updatedAt\n isGiftPackageEnabled\n giftPackagePriceList {\n currencyCode\n price\n }\n postalCodeRequirement\n }\n }\n "])));
42135
43320
  _b.label = 1;
42136
43321
  case 1:
42137
43322
  _b.trys.push([1, 3, , 4]);
@@ -70244,7 +71429,8 @@ var AddressForm$1 = mobxReactLite.observer(function (props) {
70244
71429
  vm.address.checkoutSettings.identityNumberRequirement !==
70245
71430
  IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement("div", { className: styles$4.RowPB },
70246
71431
  React.createElement(IdentityNumber, __assign({}, props, { vm: vm })))),
70247
- ((_a = vm.address.checkoutSettings) === null || _a === void 0 ? void 0 : _a.isShowPostalCode) ? (React.createElement(React.Fragment, null,
71432
+ ((_a = vm.address.checkoutSettings) === null || _a === void 0 ? void 0 : _a.phoneRequirement) !==
71433
+ IkasCheckoutRequirementEnum.INVISIBLE ? (React.createElement(React.Fragment, null,
70248
71434
  React.createElement("div", { className: styles$4.RowPB },
70249
71435
  React.createElement(AddressFirstLine, __assign({}, props, { vm: vm }))),
70250
71436
  React.createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
@@ -70318,9 +71504,10 @@ var AddressSecondLine = mobxReactLite.observer(function (_a) {
70318
71504
  return (React.createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-line2", label: t("checkout-page:addressLine2"), value: vm.address.addressLine2 || "", onChange: vm.onAddressLine2Change }));
70319
71505
  });
70320
71506
  var PostalCode = mobxReactLite.observer(function (_a) {
71507
+ var _b;
70321
71508
  var vm = _a.vm;
70322
71509
  var t = useTranslation().t;
70323
- return (React.createElement(FormItem, { type: FormItemType.TEXT, label: t("checkout-page:postalCode"), autocomplete: "postal-code", value: vm.address.postalCode || "", onChange: vm.onAddressPostalCodeChange }));
71510
+ return (React.createElement(FormItem, { type: FormItemType.TEXT, label: t("checkout-page:postalCode"), autocomplete: "postal-code", value: vm.address.postalCode || "", onChange: vm.onAddressPostalCodeChange, hasError: vm.isErrorsVisible && !((_b = vm.address.validationResult) === null || _b === void 0 ? void 0 : _b.postalCode), errorText: t("checkout-page:postalCodeError") }));
70324
71511
  });
70325
71512
  var Country = mobxReactLite.observer(function (_a) {
70326
71513
  var _b, _c;
@@ -74403,6 +75590,7 @@ exports.findAllIndexes = findAllIndexes;
74403
75590
  exports.formatDate = formatDate;
74404
75591
  exports.formatMoney = formatMoney;
74405
75592
  exports.getCurrencySymbol = getCurrencySymbol;
75593
+ exports.isValidPostalCode = isValidPostalCode;
74406
75594
  exports.parseRangeStr = parseRangeStr;
74407
75595
  exports.pascalCase = pascalCase;
74408
75596
  exports.stringSorter = stringSorter;