@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.es.js CHANGED
@@ -12001,6 +12001,1153 @@ function forEach$1(collection, iteratee) {
12001
12001
 
12002
12002
  var forEach_1 = forEach$1;
12003
12003
 
12004
+ // Country list source: https://www.dhl.com/en/country_profile.html#.XwODEJNKjOQ
12005
+ // Country abbreviation source: https://planetarynames.wr.usgs.gov/Abbreviations
12006
+ // Postal code: https://gist.githubusercontent.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b/raw/21662445653ac861f8ab81caa8cfaee3185aed15/postal-codes.json
12007
+ // Postal code: https://en.wikipedia.org/wiki/List_of_postal_codes
12008
+ // Country/territory items with no postal code regexes or ranges either do not require postal codes
12009
+ // or there may not be enough information for that country/territory
12010
+ var COUNTRY_ADDRESS_POSTALS = [
12011
+ {
12012
+ abbrev: "AF",
12013
+ name: "Afghanistan",
12014
+ postal: /[0-9]{4}/g,
12015
+ },
12016
+ {
12017
+ abbrev: "AL",
12018
+ name: "Albania",
12019
+ postal: /(120|122)[0-9]{2}/g,
12020
+ },
12021
+ {
12022
+ abbrev: "DZ",
12023
+ name: "Algeria",
12024
+ postal: /[0-9]{5}/g,
12025
+ },
12026
+ {
12027
+ abbrev: "AS",
12028
+ name: "American Samoa",
12029
+ postal: /[0-9]{5}/g,
12030
+ },
12031
+ {
12032
+ abbrev: "AD",
12033
+ name: "Andorra",
12034
+ postal: /[0-9]{5}/g,
12035
+ },
12036
+ {
12037
+ abbrev: "AO",
12038
+ name: "Angola",
12039
+ },
12040
+ {
12041
+ abbrev: "AI",
12042
+ name: "Anguilla",
12043
+ postal: /AI-2640/g,
12044
+ },
12045
+ {
12046
+ abbrev: "AG",
12047
+ name: "Antigua and Barbuda",
12048
+ },
12049
+ {
12050
+ abbrev: "AR",
12051
+ name: "Argentina",
12052
+ postal: /[A-Z]{1}[0-9]{4}[A-Z]{3}/g,
12053
+ },
12054
+ {
12055
+ abbrev: "AM",
12056
+ name: "Armenia",
12057
+ postal: /[0-9]{4}/g,
12058
+ },
12059
+ {
12060
+ abbrev: "AW",
12061
+ name: "Aruba",
12062
+ },
12063
+ {
12064
+ abbrev: "AU",
12065
+ name: "Australia",
12066
+ postal: /[0-9]{4}/g,
12067
+ },
12068
+ {
12069
+ abbrev: "AT",
12070
+ name: "Austria",
12071
+ postal: /[0-9]{4}/g,
12072
+ },
12073
+ {
12074
+ abbrev: "AZ",
12075
+ name: "Azerbaijan",
12076
+ postal: /[0-9]{4}/g,
12077
+ },
12078
+ {
12079
+ abbrev: "BS",
12080
+ name: "Bahamas",
12081
+ },
12082
+ {
12083
+ abbrev: "BH",
12084
+ name: "Bahrain",
12085
+ },
12086
+ {
12087
+ abbrev: "BD",
12088
+ name: "Bangladesh",
12089
+ postal: /[0-9]{4}/g,
12090
+ },
12091
+ {
12092
+ abbrev: "BB",
12093
+ name: "Barbados",
12094
+ postal: /BB[0-9]{5}/g,
12095
+ },
12096
+ {
12097
+ abbrev: "BY",
12098
+ name: "Belarus",
12099
+ postal: /[0-9]{6}/g,
12100
+ },
12101
+ {
12102
+ abbrev: "BE",
12103
+ name: "Belgium",
12104
+ postal: /[0-9]{4}/g,
12105
+ },
12106
+ {
12107
+ abbrev: "BZ",
12108
+ name: "Belize",
12109
+ },
12110
+ {
12111
+ abbrev: "BJ",
12112
+ name: "Benin",
12113
+ },
12114
+ {
12115
+ abbrev: "BM",
12116
+ name: "Bermuda",
12117
+ postal: /[A-Z]{2}[0-9]{2}/g,
12118
+ },
12119
+ {
12120
+ abbrev: "BT",
12121
+ name: "Bhutan",
12122
+ postal: /[0-9]{5}/g,
12123
+ },
12124
+ {
12125
+ abbrev: "BO",
12126
+ name: "Bolivia",
12127
+ },
12128
+ {
12129
+ abbrev: "BQ",
12130
+ name: "Bonaire",
12131
+ },
12132
+ {
12133
+ abbrev: "BA",
12134
+ name: "Bosnia and Herzegovina",
12135
+ postal: /[0-9]{5}/g,
12136
+ },
12137
+ {
12138
+ abbrev: "BW",
12139
+ name: "Botswana",
12140
+ },
12141
+ {
12142
+ abbrev: "BR",
12143
+ name: "Brazil",
12144
+ postal: /[0-9]{5}-[0-9]{3}/g,
12145
+ },
12146
+ {
12147
+ abbrev: "BN",
12148
+ name: "Brunei",
12149
+ postal: /[A-Z]{2}[0-9]{4}/g,
12150
+ },
12151
+ {
12152
+ abbrev: "BG",
12153
+ name: "Bulgaria",
12154
+ postal: /[0-9]{4}/g,
12155
+ },
12156
+ {
12157
+ abbrev: "BF",
12158
+ name: "Burkina Faso",
12159
+ },
12160
+ {
12161
+ abbrev: "BI",
12162
+ name: "Burundi",
12163
+ },
12164
+ {
12165
+ abbrev: "KH",
12166
+ name: "Cambodia",
12167
+ postal: /[0-9]{5}/g,
12168
+ },
12169
+ {
12170
+ abbrev: "CM",
12171
+ name: "Cameroon",
12172
+ },
12173
+ {
12174
+ abbrev: "CA",
12175
+ name: "Canada",
12176
+ postal: /[A-Z][0-9][A-Z] ?[0-9][A-Z][0-9]/g,
12177
+ },
12178
+ {
12179
+ abbrev: "CI",
12180
+ name: "Canary Islands",
12181
+ postal: /[0-9]{5}/g,
12182
+ },
12183
+ {
12184
+ abbrev: "CV",
12185
+ name: "Cape Verde",
12186
+ postal: /[0-9]{4}/g,
12187
+ },
12188
+ {
12189
+ abbrev: "KY",
12190
+ name: "Cayman Islands",
12191
+ postal: /[A-Z]{2}[0-9]-[0-9]{4}/g,
12192
+ },
12193
+ {
12194
+ abbrev: "CF",
12195
+ name: "Central African Republic",
12196
+ },
12197
+ {
12198
+ abbrev: "TD",
12199
+ name: "Chad",
12200
+ },
12201
+ {
12202
+ abbrev: "CI",
12203
+ name: "Channel Islands",
12204
+ postal: /[A-Z]{2}[0-9]{2}/g,
12205
+ },
12206
+ {
12207
+ abbrev: "CL",
12208
+ name: "Chile",
12209
+ postal: /[0-9]{7}/g,
12210
+ },
12211
+ {
12212
+ abbrev: "CN",
12213
+ name: "China, People's Republic",
12214
+ postal: /[0-9]{5}/g,
12215
+ },
12216
+ {
12217
+ abbrev: "CO",
12218
+ name: "Colombia",
12219
+ postal: /[0-9]{6}/g,
12220
+ },
12221
+ {
12222
+ abbrev: "KM",
12223
+ name: "Comoros",
12224
+ },
12225
+ {
12226
+ abbrev: "CG",
12227
+ name: "Congo",
12228
+ },
12229
+ {
12230
+ abbrev: "CD",
12231
+ name: "Congo, The Democratic Republic of",
12232
+ },
12233
+ {
12234
+ abbrev: "CK",
12235
+ name: "Cook Islands",
12236
+ },
12237
+ {
12238
+ abbrev: "CR",
12239
+ name: "Costa Rica",
12240
+ postal: /[0-9]{5}/g,
12241
+ },
12242
+ {
12243
+ abbrev: "CI",
12244
+ name: "Côte d'Ivoire",
12245
+ },
12246
+ {
12247
+ abbrev: "HR",
12248
+ name: "Croatia",
12249
+ postal: /[0-9]{5}/g,
12250
+ },
12251
+ {
12252
+ abbrev: "CU",
12253
+ name: "Cuba",
12254
+ postal: /[0-9]{5}/g,
12255
+ },
12256
+ {
12257
+ abbrev: "CW",
12258
+ name: "Curacao",
12259
+ },
12260
+ {
12261
+ abbrev: "CY",
12262
+ name: "Cyprus",
12263
+ postal: /[0-9]{4}/g,
12264
+ },
12265
+ {
12266
+ abbrev: "CZ",
12267
+ name: "Czech Republic",
12268
+ postal: /[0-9]{3} [0-9]{2}/g,
12269
+ },
12270
+ {
12271
+ abbrev: "DK",
12272
+ name: "Denmark",
12273
+ postal: /[0-9]{5}/g,
12274
+ },
12275
+ {
12276
+ abbrev: "DJ",
12277
+ name: "Djibouti",
12278
+ },
12279
+ {
12280
+ abbrev: "DM",
12281
+ name: "Dominica",
12282
+ },
12283
+ {
12284
+ abbrev: "DO",
12285
+ name: "Dominican Republic",
12286
+ postal: /[0-9]{5}/g,
12287
+ },
12288
+ {
12289
+ abbrev: "TL",
12290
+ name: "East Timor",
12291
+ },
12292
+ {
12293
+ abbrev: "EC",
12294
+ name: "Ecuador",
12295
+ postal: /[0-9]{6}/g,
12296
+ },
12297
+ {
12298
+ abbrev: "EG",
12299
+ name: "Egypt",
12300
+ postal: /[0-9]{5}/g,
12301
+ },
12302
+ {
12303
+ abbrev: "SV",
12304
+ name: "El Salvador",
12305
+ postal: /[0-9]{4}/g,
12306
+ },
12307
+ {
12308
+ abbrev: "ER",
12309
+ name: "Eritrea",
12310
+ },
12311
+ {
12312
+ abbrev: "EE",
12313
+ name: "Estonia",
12314
+ postal: /[0-9]{5}/g,
12315
+ },
12316
+ {
12317
+ abbrev: "ET",
12318
+ name: "Ethiopia",
12319
+ postal: /[0-9]{4}/g,
12320
+ },
12321
+ {
12322
+ abbrev: "FK",
12323
+ name: "Falkland Islands",
12324
+ postal: /FIQQ 1ZZ/g,
12325
+ },
12326
+ {
12327
+ abbrev: "FO",
12328
+ name: "Faroe Islands",
12329
+ postal: /[0-9]{3}/g,
12330
+ },
12331
+ {
12332
+ abbrev: "FJ",
12333
+ name: "Fiji",
12334
+ },
12335
+ {
12336
+ abbrev: "FI",
12337
+ name: "Finland",
12338
+ postal: /[0-9]{5}/g,
12339
+ },
12340
+ {
12341
+ abbrev: "FR",
12342
+ name: "France",
12343
+ postal: /[0-9]{5}/g,
12344
+ },
12345
+ {
12346
+ abbrev: "PF",
12347
+ name: "French Polynesia",
12348
+ postal: /987[0-9]{2}/g,
12349
+ range: ["98700", "98790"],
12350
+ },
12351
+ {
12352
+ abbrev: "GA",
12353
+ name: "Gabon",
12354
+ },
12355
+ {
12356
+ abbrev: "GM",
12357
+ name: "Gambia",
12358
+ },
12359
+ {
12360
+ abbrev: "GE",
12361
+ name: "Georgia",
12362
+ },
12363
+ {
12364
+ abbrev: "DE",
12365
+ name: "Germany",
12366
+ postal: /[0-9]{5}/g,
12367
+ },
12368
+ {
12369
+ abbrev: "GH",
12370
+ name: "Ghana",
12371
+ },
12372
+ {
12373
+ abbrev: "GI",
12374
+ name: "Gibraltar",
12375
+ postal: /GX11 1AA/g,
12376
+ },
12377
+ {
12378
+ abbrev: "GR",
12379
+ name: "Greece",
12380
+ postal: /[0-9]{3} [0-9]{2}/g,
12381
+ },
12382
+ {
12383
+ abbrev: "GL",
12384
+ name: "Greenland",
12385
+ postal: /[0-9]{4}/g,
12386
+ },
12387
+ {
12388
+ abbrev: "GD",
12389
+ name: "Grenada",
12390
+ },
12391
+ {
12392
+ abbrev: "GP",
12393
+ name: "Guadeloupe",
12394
+ postal: /971[0-9]{2}/g,
12395
+ range: ["97100", "97190"],
12396
+ },
12397
+ {
12398
+ abbrev: "GU",
12399
+ name: "Guam",
12400
+ // US postal code
12401
+ // https://stackoverflow.com/questions/2577236/regex-for-zip-code
12402
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12403
+ range: ["96910", "96932"],
12404
+ },
12405
+ {
12406
+ abbrev: "GT",
12407
+ name: "Guatemala",
12408
+ postal: /[0-9]{5}/g,
12409
+ },
12410
+ {
12411
+ abbrev: "GG",
12412
+ name: "Guernsey",
12413
+ // UK postal code
12414
+ // https://stackoverflow.com/questions/164979/regex-for-matching-uk-postcodes
12415
+ 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,
12416
+ },
12417
+ {
12418
+ abbrev: "GW",
12419
+ name: "Guinea-Bissau",
12420
+ postal: /[0-9]{4}/g,
12421
+ },
12422
+ {
12423
+ abbrev: "GQ",
12424
+ name: "Guinea-Equatorial",
12425
+ },
12426
+ {
12427
+ abbrev: "GN",
12428
+ name: "Guinea Republic",
12429
+ postal: /[0-9]{3}/g,
12430
+ },
12431
+ {
12432
+ abbrev: "GY",
12433
+ name: "Guyana (British)",
12434
+ },
12435
+ {
12436
+ abbrev: "GF",
12437
+ name: "Guyana (French)",
12438
+ postal: /973[0-9]{2}/g,
12439
+ range: ["97300", "97390"],
12440
+ },
12441
+ {
12442
+ abbrev: "HT",
12443
+ name: "Haiti",
12444
+ postal: /[0-9]{4}/g,
12445
+ },
12446
+ {
12447
+ abbrev: "HN",
12448
+ name: "Honduras",
12449
+ postal: /[0-9]{5}/g,
12450
+ },
12451
+ {
12452
+ abbrev: "HK",
12453
+ name: "Hong Kong",
12454
+ },
12455
+ {
12456
+ abbrev: "HU",
12457
+ name: "Hungary",
12458
+ postal: /[0-9]{4}/g,
12459
+ },
12460
+ {
12461
+ abbrev: "IS",
12462
+ name: "Iceland",
12463
+ postal: /[0-9]{3}/g,
12464
+ },
12465
+ {
12466
+ abbrev: "IN",
12467
+ name: "India",
12468
+ // https://stackoverflow.com/questions/33865525/indian-pincode-validation-regex-only-six-digits-shouldnt-start-with-0
12469
+ postal: /^[1-9][0-9]{5}$/g,
12470
+ },
12471
+ {
12472
+ abbrev: "ID",
12473
+ name: "Indonesia",
12474
+ postal: /[0-9]{5}/g,
12475
+ },
12476
+ {
12477
+ abbrev: "IR",
12478
+ name: "Iran",
12479
+ postal: /[0-9]{5}/g,
12480
+ },
12481
+ {
12482
+ abbrev: "IQ",
12483
+ name: "Iraq",
12484
+ postal: /[0-9]{5}/g,
12485
+ },
12486
+ {
12487
+ abbrev: "IE",
12488
+ name: "Ireland, Republic of",
12489
+ // https://stackoverflow.com/questions/33391412/validation-for-irish-eircode
12490
+ postal: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$/g,
12491
+ },
12492
+ {
12493
+ abbrev: "FK",
12494
+ name: "Islas Malvinas",
12495
+ postal: /FIQQ 1ZZ/g,
12496
+ },
12497
+ {
12498
+ abbrev: "IL",
12499
+ name: "Israel",
12500
+ postal: /[0-9]{5}|[0-9]{7}/g,
12501
+ },
12502
+ {
12503
+ abbrev: "IT",
12504
+ name: "Italy",
12505
+ postal: /[0-9]{5}/g,
12506
+ },
12507
+ {
12508
+ abbrev: "CI",
12509
+ name: "Ivory Coast",
12510
+ },
12511
+ {
12512
+ abbrev: "JM",
12513
+ name: "Jamaica",
12514
+ },
12515
+ {
12516
+ abbrev: "JP",
12517
+ name: "Japan",
12518
+ postal: /[0-9]{3}-[0-9]{4}/g,
12519
+ },
12520
+ {
12521
+ abbrev: "JE",
12522
+ name: "Jersey",
12523
+ 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,
12524
+ },
12525
+ {
12526
+ abbrev: "JO",
12527
+ name: "Jordan",
12528
+ postal: /[0-9]{5}/g,
12529
+ },
12530
+ {
12531
+ abbrev: "KZ",
12532
+ name: "Kazakhstan",
12533
+ postal: /[0-9]{6}/g,
12534
+ },
12535
+ {
12536
+ abbrev: "KE",
12537
+ name: "Kenya",
12538
+ postal: /[0-9]{5}/g,
12539
+ },
12540
+ {
12541
+ abbrev: "KI",
12542
+ name: "Kiribati",
12543
+ },
12544
+ {
12545
+ abbrev: "KR",
12546
+ name: "Korea, Republic of",
12547
+ postal: /[0-9]{5}/g,
12548
+ },
12549
+ {
12550
+ abbrev: "KP",
12551
+ name: "Korea, The D.P.R of",
12552
+ },
12553
+ {
12554
+ abbrev: "XK",
12555
+ name: "Kosovo",
12556
+ postal: /[0-9]{5}/g,
12557
+ },
12558
+ {
12559
+ abbrev: "KW",
12560
+ name: "Kuwait",
12561
+ postal: /[0-9]{5}/g,
12562
+ },
12563
+ {
12564
+ abbrev: "KG",
12565
+ name: "Kyrgyzstan",
12566
+ postal: /[0-9]{6}/g,
12567
+ },
12568
+ {
12569
+ abbrev: "LA",
12570
+ name: "Laos",
12571
+ postal: /[0-9]{5}/g,
12572
+ },
12573
+ {
12574
+ abbrev: "LV",
12575
+ name: "Latvia",
12576
+ postal: /LV-[0-9]{4}/g,
12577
+ },
12578
+ {
12579
+ abbrev: "LB",
12580
+ name: "Lebanon",
12581
+ postal: /[0-9]{4} [0-9]{4}/g,
12582
+ },
12583
+ {
12584
+ abbrev: "LS",
12585
+ name: "Lesotho",
12586
+ postal: /[0-9]{3}/g,
12587
+ },
12588
+ {
12589
+ abbrev: "LR",
12590
+ name: "Liberia",
12591
+ postal: /[0-9]{4}/g,
12592
+ },
12593
+ {
12594
+ abbrev: "LY",
12595
+ name: "Libya",
12596
+ },
12597
+ {
12598
+ abbrev: "LI",
12599
+ name: "Liechtenstein",
12600
+ postal: /[0-9]{4}/g,
12601
+ range: ["9485", "9498"],
12602
+ },
12603
+ {
12604
+ abbrev: "LT",
12605
+ name: "Lithuania",
12606
+ postal: /LT-[0-9]{5}/g,
12607
+ },
12608
+ {
12609
+ abbrev: "LU",
12610
+ name: "Luxembourg",
12611
+ postal: /[0-9]{4}/g,
12612
+ },
12613
+ {
12614
+ abbrev: "MO",
12615
+ name: "Macau",
12616
+ },
12617
+ {
12618
+ abbrev: "MK",
12619
+ name: "Macedonia, Republic of",
12620
+ postal: /[0-9]{4}/g,
12621
+ },
12622
+ {
12623
+ abbrev: "MG",
12624
+ name: "Madagascar",
12625
+ postal: /[0-9]{3}/g,
12626
+ },
12627
+ {
12628
+ abbrev: "MW",
12629
+ name: "Malawi",
12630
+ },
12631
+ {
12632
+ abbrev: "MY",
12633
+ name: "Malaysia",
12634
+ postal: /[0-9]{5}/g,
12635
+ },
12636
+ {
12637
+ abbrev: "MV",
12638
+ name: "Maldives",
12639
+ postal: /[0-9]{5}/g,
12640
+ },
12641
+ {
12642
+ abbrev: "ML",
12643
+ name: "Mali",
12644
+ },
12645
+ {
12646
+ abbrev: "MT",
12647
+ name: "Malta",
12648
+ postal: /[A-Z]{3} [0-9]{4}/g,
12649
+ },
12650
+ {
12651
+ abbrev: "MH",
12652
+ name: "Marshall Islands",
12653
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12654
+ range: ["96960", "96970"],
12655
+ },
12656
+ {
12657
+ abbrev: "MQ",
12658
+ name: "Martinique",
12659
+ postal: /972[0-9]{2}/g,
12660
+ range: ["97200", "97290"],
12661
+ },
12662
+ {
12663
+ abbrev: "MR",
12664
+ name: "Mauritania",
12665
+ },
12666
+ {
12667
+ abbrev: "MU",
12668
+ name: "Mauritius",
12669
+ postal: /[0-9]{5}/g,
12670
+ },
12671
+ {
12672
+ abbrev: "YT",
12673
+ name: "Mayotte",
12674
+ postal: /976[0-9]{2}/g,
12675
+ range: ["97600", "97690"],
12676
+ },
12677
+ {
12678
+ abbrev: "MX",
12679
+ name: "Mexico",
12680
+ postal: /[0-9]{5}/g,
12681
+ },
12682
+ {
12683
+ abbrev: "MD",
12684
+ name: "Moldova, Republic of",
12685
+ postal: /MD-?[0-9]{4}/g,
12686
+ },
12687
+ {
12688
+ abbrev: "MC",
12689
+ name: "Monaco",
12690
+ postal: /980[0-9]{2}/g,
12691
+ },
12692
+ {
12693
+ abbrev: "MN",
12694
+ name: "Mongolia",
12695
+ postal: /[0-9]{5}/g,
12696
+ },
12697
+ {
12698
+ abbrev: "ME",
12699
+ name: "Montenegro",
12700
+ postal: /[0-9]{5}/g,
12701
+ },
12702
+ {
12703
+ abbrev: "MS",
12704
+ name: "Montserrat",
12705
+ postal: /MSR [0-9]{4}/g,
12706
+ range: ["MSR 1110", "MSR 1350"],
12707
+ },
12708
+ {
12709
+ abbrev: "MA",
12710
+ name: "Morocco",
12711
+ postal: /[0-9]{5}/g,
12712
+ },
12713
+ {
12714
+ abbrev: "MZ",
12715
+ name: "Mozambique",
12716
+ postal: /[0-9]{4}/g,
12717
+ },
12718
+ {
12719
+ abbrev: "MM",
12720
+ name: "Myanmar",
12721
+ postal: /[0-9]{5}/g,
12722
+ },
12723
+ {
12724
+ abbrev: "NA",
12725
+ name: "Namibia",
12726
+ },
12727
+ {
12728
+ abbrev: "NR",
12729
+ name: "Nauru",
12730
+ },
12731
+ {
12732
+ abbrev: "NP",
12733
+ name: "Nepal",
12734
+ postal: /[0-9]{5}/g,
12735
+ },
12736
+ {
12737
+ abbrev: "NL",
12738
+ name: "Netherlands",
12739
+ // https://rgxdb.com/r/4W9GV8AC
12740
+ postal: /^(?:NL-)?(\d{4})\s*([A-Z]{2})$/i,
12741
+ },
12742
+ {
12743
+ abbrev: "NC",
12744
+ name: "New Caledonia",
12745
+ postal: /988[0-9]{2}/g,
12746
+ range: ["96950", "96952"],
12747
+ },
12748
+ {
12749
+ abbrev: "NZ",
12750
+ name: "New Zealand",
12751
+ postal: /[0-9]{4}/g,
12752
+ },
12753
+ {
12754
+ abbrev: "NI",
12755
+ name: "Nicaragua",
12756
+ },
12757
+ {
12758
+ abbrev: "NE",
12759
+ name: "Niger",
12760
+ postal: /[0-9]{4}/g,
12761
+ },
12762
+ {
12763
+ abbrev: "NG",
12764
+ name: "Nigeria",
12765
+ postal: /[0-9]{6}/g,
12766
+ },
12767
+ {
12768
+ abbrev: "NU",
12769
+ name: "Niue",
12770
+ },
12771
+ {
12772
+ abbrev: "MP",
12773
+ name: "Northern Mariana Islands",
12774
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12775
+ },
12776
+ {
12777
+ abbrev: "NO",
12778
+ name: "Norway",
12779
+ postal: /[0-9]{4}/g,
12780
+ },
12781
+ {
12782
+ abbrev: "OM",
12783
+ name: "Oman",
12784
+ postal: /[0-9]{3}/g,
12785
+ },
12786
+ {
12787
+ abbrev: "PK",
12788
+ name: "Pakistan",
12789
+ postal: /[0-9]{5}/g,
12790
+ },
12791
+ {
12792
+ abbrev: "PW",
12793
+ name: "Palau",
12794
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12795
+ },
12796
+ {
12797
+ abbrev: "PA",
12798
+ name: "Panama",
12799
+ postal: /[0-9]{4}/g,
12800
+ },
12801
+ {
12802
+ abbrev: "PG",
12803
+ name: "Papua New Guinea",
12804
+ postal: /[0-9]{3}/g,
12805
+ },
12806
+ {
12807
+ abbrev: "PY",
12808
+ name: "Paraguay",
12809
+ postal: /[0-9]{4}/g,
12810
+ },
12811
+ {
12812
+ abbrev: "PE",
12813
+ name: "Peru",
12814
+ postal: /[0-9]{5}/g,
12815
+ },
12816
+ {
12817
+ abbrev: "PH",
12818
+ name: "Philippines",
12819
+ postal: /[0-9]{4}/g,
12820
+ },
12821
+ {
12822
+ abbrev: "PL",
12823
+ name: "Poland",
12824
+ postal: /[0-9]{2}-[0-9]{3}/g,
12825
+ },
12826
+ {
12827
+ abbrev: "PT",
12828
+ name: "Portugal",
12829
+ postal: /[0-9]{4}-[0-9]{3}/g,
12830
+ },
12831
+ {
12832
+ abbrev: "PR",
12833
+ name: "Puerto Rico",
12834
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12835
+ },
12836
+ {
12837
+ abbrev: "QA",
12838
+ name: "Qatar",
12839
+ },
12840
+ {
12841
+ abbrev: "RE",
12842
+ name: "Réunion",
12843
+ postal: /974[0-9]{2}/g,
12844
+ range: ["97400", "97490"],
12845
+ },
12846
+ {
12847
+ abbrev: "RO",
12848
+ name: "Romania",
12849
+ postal: /[0-9]{6}/g,
12850
+ },
12851
+ {
12852
+ abbrev: "RU",
12853
+ name: "Russian Federation",
12854
+ postal: /[0-9]{6}/g,
12855
+ },
12856
+ {
12857
+ abbrev: "RW",
12858
+ name: "Rwanda",
12859
+ },
12860
+ {
12861
+ abbrev: "MP",
12862
+ name: "Saipan",
12863
+ postal: /96950/g,
12864
+ },
12865
+ {
12866
+ abbrev: "WS",
12867
+ name: "Samoa",
12868
+ postal: /WS[0-9]{4}/g,
12869
+ },
12870
+ {
12871
+ abbrev: "ST",
12872
+ name: "Sao Tome and Principe",
12873
+ },
12874
+ {
12875
+ abbrev: "SA",
12876
+ name: "Saudi Arabia",
12877
+ postal: /[0-9]{5}(-[0-9]{4})?/g,
12878
+ },
12879
+ {
12880
+ abbrev: "SN",
12881
+ name: "Senegal",
12882
+ postal: /[0-9]{5}/g,
12883
+ },
12884
+ {
12885
+ abbrev: "RS",
12886
+ name: "Serbia",
12887
+ postal: /[0-9]{5}/g,
12888
+ },
12889
+ {
12890
+ abbrev: "SC",
12891
+ name: "Seychelles",
12892
+ },
12893
+ {
12894
+ abbrev: "SL",
12895
+ name: "Sierra Leone",
12896
+ },
12897
+ {
12898
+ abbrev: "SG",
12899
+ name: "Singapore",
12900
+ postal: /[0-9]{6}/g,
12901
+ },
12902
+ {
12903
+ abbrev: "SK",
12904
+ name: "Slovakia",
12905
+ postal: /[0-9]{3} [0-9]{2}/g,
12906
+ },
12907
+ {
12908
+ abbrev: "SI",
12909
+ name: "Slovenia",
12910
+ postal: /[0-9]{4}/g,
12911
+ },
12912
+ {
12913
+ abbrev: "SB",
12914
+ name: "Solomon Islands",
12915
+ },
12916
+ {
12917
+ abbrev: "SO",
12918
+ name: "Somalia",
12919
+ postal: /[A-Z]{2} [0-9]{5}/g,
12920
+ },
12921
+ {
12922
+ abbrev: "ZA",
12923
+ name: "South Africa",
12924
+ postal: /[0-9]{4}/g,
12925
+ },
12926
+ {
12927
+ abbrev: "SS",
12928
+ name: "South Sudan",
12929
+ },
12930
+ {
12931
+ abbrev: "ES",
12932
+ name: "Spain",
12933
+ postal: /[0-9]{5}/g,
12934
+ },
12935
+ {
12936
+ abbrev: "LK",
12937
+ name: "Sri Lanka",
12938
+ postal: /[0-9]{4}/g,
12939
+ },
12940
+ {
12941
+ abbrev: "BL",
12942
+ name: "St. Barthélemy",
12943
+ postal: /[0-9]{5}/g,
12944
+ range: ["97100", "97190"],
12945
+ },
12946
+ {
12947
+ abbrev: "VI",
12948
+ name: "St. Croix",
12949
+ postal: /[0-9]{5}/g,
12950
+ },
12951
+ {
12952
+ abbrev: "SE",
12953
+ name: "St. Eustatius",
12954
+ },
12955
+ {
12956
+ abbrev: "SH",
12957
+ name: "St. Helena",
12958
+ postal: /STHL 1ZZ/g,
12959
+ },
12960
+ {
12961
+ abbrev: "AG",
12962
+ name: "St. John",
12963
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12964
+ },
12965
+ {
12966
+ abbrev: "KN",
12967
+ name: "St. Kitts and Nevis",
12968
+ postal: /[A-Z]{2}[0-9]{4}/g,
12969
+ },
12970
+ {
12971
+ abbrev: "LC",
12972
+ name: "St. Lucia",
12973
+ postal: /[A-Z]{2}[0-9]{2} [0-9]{3}/g,
12974
+ },
12975
+ {
12976
+ abbrev: "SX",
12977
+ name: "St. Maarten",
12978
+ },
12979
+ {
12980
+ abbrev: "VI",
12981
+ name: "St. Thomas",
12982
+ },
12983
+ {
12984
+ abbrev: "VC",
12985
+ name: "St. Vincent and the Grenadines",
12986
+ postal: /VC[0-9]{4}/g,
12987
+ },
12988
+ {
12989
+ abbrev: "SD",
12990
+ name: "Sudan",
12991
+ postal: /[0-9]{5}/g,
12992
+ },
12993
+ {
12994
+ abbrev: "SR",
12995
+ name: "Suriname",
12996
+ },
12997
+ {
12998
+ abbrev: "SZ",
12999
+ name: "Swaziland",
13000
+ postal: /[A-Z]{1}[0-9]{3}/g,
13001
+ },
13002
+ {
13003
+ abbrev: "SE",
13004
+ name: "Sweden",
13005
+ postal: /[0-9]{3} [0-9]{2}/g,
13006
+ },
13007
+ {
13008
+ abbrev: "CH",
13009
+ name: "Switzerland",
13010
+ postal: /[0-9]{4}/g,
13011
+ },
13012
+ {
13013
+ abbrev: "SY",
13014
+ name: "Syria",
13015
+ },
13016
+ {
13017
+ abbrev: "PF",
13018
+ name: "Tahiti",
13019
+ postal: /[0-9]{5}/g,
13020
+ },
13021
+ {
13022
+ abbrev: "TW",
13023
+ name: "Taiwan",
13024
+ postal: /[0-9]{3}(-[0-9]{2})?/g,
13025
+ },
13026
+ {
13027
+ abbrev: "TZ",
13028
+ name: "Tanzania",
13029
+ postal: /[0-9]{5}/g,
13030
+ },
13031
+ {
13032
+ abbrev: "TH",
13033
+ name: "Thailand",
13034
+ postal: /[0-9]{5}/g,
13035
+ },
13036
+ {
13037
+ abbrev: "TG",
13038
+ name: "Togo",
13039
+ },
13040
+ {
13041
+ abbrev: "TO",
13042
+ name: "Tonga",
13043
+ },
13044
+ {
13045
+ abbrev: "VG",
13046
+ name: "Tortola",
13047
+ postal: /VG[0-9]{4}/g,
13048
+ },
13049
+ {
13050
+ abbrev: "TT",
13051
+ name: "Trinidad and Tobago",
13052
+ postal: /[0-9]{6}/g,
13053
+ },
13054
+ {
13055
+ abbrev: "TN",
13056
+ name: "Tunisia",
13057
+ postal: /[0-9]{4}/g,
13058
+ },
13059
+ {
13060
+ abbrev: "TR",
13061
+ name: "Turkey",
13062
+ postal: /[0-9]{5}/g,
13063
+ },
13064
+ {
13065
+ abbrev: "TM",
13066
+ name: "Turkmenistan",
13067
+ postal: /[0-9]{6}/g,
13068
+ },
13069
+ {
13070
+ abbrev: "TC",
13071
+ name: "Turks and Caicos Islands",
13072
+ postal: /TKCA 1ZZ/g,
13073
+ },
13074
+ {
13075
+ abbrev: "TV",
13076
+ name: "Tuvalu",
13077
+ },
13078
+ {
13079
+ abbrev: "UG",
13080
+ name: "Uganda",
13081
+ },
13082
+ {
13083
+ abbrev: "UA",
13084
+ name: "Ukraine",
13085
+ postal: /[0-9]{5}/g,
13086
+ },
13087
+ {
13088
+ abbrev: "AE",
13089
+ name: "United Arab Emirates",
13090
+ },
13091
+ {
13092
+ abbrev: "GB",
13093
+ name: "United Kingdom",
13094
+ 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,
13095
+ },
13096
+ {
13097
+ abbrev: "US",
13098
+ name: "United States of America",
13099
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13100
+ },
13101
+ {
13102
+ abbrev: "UY",
13103
+ name: "Uruguay",
13104
+ postal: /[0-9]{5}/g,
13105
+ },
13106
+ {
13107
+ abbrev: "UZ",
13108
+ name: "Uzbekistan",
13109
+ postal: /[0-9]{6}/g,
13110
+ },
13111
+ {
13112
+ abbrev: "VU",
13113
+ name: "Vanuatu",
13114
+ },
13115
+ {
13116
+ abbrev: "VE",
13117
+ name: "Venezuela",
13118
+ postal: /[0-9]{4}(-[A-Z]{1})?/g,
13119
+ },
13120
+ {
13121
+ abbrev: "VN",
13122
+ name: "Vietnam",
13123
+ postal: /[0-9]{6}/g,
13124
+ },
13125
+ {
13126
+ abbrev: "VG",
13127
+ name: "Virgin Islands (British)",
13128
+ postal: /VG[0-9]{4}/g,
13129
+ },
13130
+ {
13131
+ abbrev: "VI",
13132
+ name: "Virgin Islands (US)",
13133
+ range: ["00801", "00851"],
13134
+ postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13135
+ },
13136
+ {
13137
+ abbrev: "YE",
13138
+ name: "Yemen",
13139
+ },
13140
+ {
13141
+ abbrev: "ZM",
13142
+ name: "Zambia",
13143
+ postal: /[0-9]{5}/g,
13144
+ },
13145
+ {
13146
+ abbrev: "ZW",
13147
+ name: "Zimbabwe",
13148
+ },
13149
+ ];
13150
+
12004
13151
  var stringToSlug = function (str) {
12005
13152
  str = str.replace(/^\s+|\s+$/g, ""); // trim
12006
13153
  str = str.toLocaleLowerCase("tr-TR");
@@ -12092,6 +13239,16 @@ function tryForEach(items, callback, printErrors) {
12092
13239
  console.error(err);
12093
13240
  }
12094
13241
  });
13242
+ }
13243
+ function isValidPostalCode(postalCode, iso2) {
13244
+ if (!iso2)
13245
+ return !!postalCode;
13246
+ var postalCodeEntry = COUNTRY_ADDRESS_POSTALS.find(function (a) { return a.abbrev === iso2; });
13247
+ if (postalCodeEntry && postalCodeEntry.postal && postalCode) {
13248
+ var regex = new RegExp(postalCodeEntry.postal);
13249
+ return regex.test(postalCode);
13250
+ }
13251
+ return !!postalCode;
12095
13252
  }
12096
13253
 
12097
13254
  var format = function (p, n, x, s, c) {
@@ -13992,6 +15149,8 @@ var IkasCheckoutSettings = /** @class */ (function () {
13992
15149
  this.updatedAt = data.updatedAt || 0;
13993
15150
  this.phoneRequirement =
13994
15151
  data.phoneRequirement || IkasCheckoutRequirementEnum.OPTIONAL;
15152
+ this.postalCodeRequirement =
15153
+ data.postalCodeRequirement || IkasCheckoutRequirementEnum.OPTIONAL;
13995
15154
  this.identityNumberRequirement =
13996
15155
  data.identityNumberRequirement || IkasCheckoutRequirementEnum.INVISIBLE;
13997
15156
  this.isAccountRequired = data.isAccountRequired || false;
@@ -14005,7 +15164,6 @@ var IkasCheckoutSettings = /** @class */ (function () {
14005
15164
  this.storefrontId = data.storefrontId || "";
14006
15165
  this.giftPackagePriceList = data.giftPackagePriceList || null;
14007
15166
  this.isGiftPackageEnabled = data.isGiftPackageEnabled || false;
14008
- this.isShowPostalCode = data.isShowPostalCode || false;
14009
15167
  }
14010
15168
  return IkasCheckoutSettings;
14011
15169
  }());
@@ -14036,6 +15194,8 @@ var IkasOrderAddress = /** @class */ (function () {
14036
15194
  this.identityNumber = null;
14037
15195
  this.taxNumber = null;
14038
15196
  this.taxOffice = null;
15197
+ // Extra
15198
+ this.checkoutSettings = null;
14039
15199
  this.isDistrictRequired = false;
14040
15200
  this.id = data.id || null;
14041
15201
  this.title = data.title || null;
@@ -14082,10 +15242,13 @@ var IkasOrderAddress = /** @class */ (function () {
14082
15242
  });
14083
15243
  Object.defineProperty(IkasOrderAddress.prototype, "validationResult", {
14084
15244
  get: function () {
14085
- var _a, _b, _c, _d;
15245
+ var _a, _b, _c, _d, _e, _f;
14086
15246
  var isValidPhone = !!this.phone &&
14087
15247
  this.phone.length >= 10 &&
14088
15248
  validatePhoneNumber(this.phone);
15249
+ var _isValidPostalCode = !!this.postalCode &&
15250
+ !!this.country &&
15251
+ isValidPostalCode(this.postalCode, this.country.iso2);
14089
15252
  var results = {
14090
15253
  firstName: !!this.firstName,
14091
15254
  lastName: !!this.lastName,
@@ -14101,7 +15264,14 @@ var IkasOrderAddress = /** @class */ (function () {
14101
15264
  this.phone)
14102
15265
  ? isValidPhone
14103
15266
  : true,
14104
- identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
15267
+ postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
15268
+ IkasCheckoutRequirementEnum.MANDATORY ||
15269
+ (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
15270
+ IkasCheckoutRequirementEnum.OPTIONAL &&
15271
+ this.postalCode)
15272
+ ? _isValidPostalCode
15273
+ : true,
15274
+ identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
14105
15275
  IkasCheckoutRequirementEnum.MANDATORY
14106
15276
  ? !!this.identityNumber
14107
15277
  : true,
@@ -20370,6 +21540,8 @@ var IkasCustomerAddress = /** @class */ (function () {
20370
21540
  this.identityNumber = null;
20371
21541
  this.taxNumber = null;
20372
21542
  this.taxOffice = null;
21543
+ // Extra
21544
+ this.checkoutSettings = null;
20373
21545
  this.isDistrictRequired = false;
20374
21546
  this.id = data.id || null;
20375
21547
  this.title = data.title || null;
@@ -20414,10 +21586,13 @@ var IkasCustomerAddress = /** @class */ (function () {
20414
21586
  });
20415
21587
  Object.defineProperty(IkasCustomerAddress.prototype, "validationResult", {
20416
21588
  get: function () {
20417
- var _a, _b, _c, _d;
21589
+ var _a, _b, _c, _d, _e, _f;
20418
21590
  var isValidPhone = !!this.phone &&
20419
21591
  this.phone.length >= 10 &&
20420
21592
  validatePhoneNumber(this.phone);
21593
+ var _isValidPostalCode = !!this.postalCode &&
21594
+ !!this.country &&
21595
+ isValidPostalCode(this.postalCode, this.country.iso2);
20421
21596
  var results = {
20422
21597
  firstName: !!this.firstName,
20423
21598
  lastName: !!this.lastName,
@@ -20433,7 +21608,14 @@ var IkasCustomerAddress = /** @class */ (function () {
20433
21608
  this.phone)
20434
21609
  ? isValidPhone
20435
21610
  : true,
20436
- identityNumber: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.identityNumberRequirement) ===
21611
+ postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
21612
+ IkasCheckoutRequirementEnum.MANDATORY ||
21613
+ (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
21614
+ IkasCheckoutRequirementEnum.OPTIONAL &&
21615
+ this.postalCode)
21616
+ ? _isValidPostalCode
21617
+ : true,
21618
+ identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
20437
21619
  IkasCheckoutRequirementEnum.MANDATORY
20438
21620
  ? !!this.identityNumber
20439
21621
  : true,
@@ -37780,6 +38962,7 @@ var CancelledReasonEnum;
37780
38962
  var CartStatusEnum;
37781
38963
  (function (CartStatusEnum) {
37782
38964
  CartStatusEnum["ACTIVE"] = "ACTIVE";
38965
+ CartStatusEnum["FREEZE"] = "FREEZE";
37783
38966
  CartStatusEnum["PASSIVE"] = "PASSIVE";
37784
38967
  })(CartStatusEnum || (CartStatusEnum = {}));
37785
38968
  /**
@@ -37964,6 +39147,7 @@ var PaymentMethodEnum;
37964
39147
  PaymentMethodEnum["GIFT_CARD"] = "GIFT_CARD";
37965
39148
  PaymentMethodEnum["MONEY_ORDER"] = "MONEY_ORDER";
37966
39149
  PaymentMethodEnum["OTHER"] = "OTHER";
39150
+ PaymentMethodEnum["WALLET"] = "WALLET";
37967
39151
  })(PaymentMethodEnum || (PaymentMethodEnum = {}));
37968
39152
  /**
37969
39153
  * ProductAttribute Types
@@ -38009,6 +39193,7 @@ var ProductFilterSortTypeEnum;
38009
39193
  var ProductFilterTypeEnum;
38010
39194
  (function (ProductFilterTypeEnum) {
38011
39195
  ProductFilterTypeEnum["ATTRIBUTE"] = "ATTRIBUTE";
39196
+ ProductFilterTypeEnum["AVAILABLE_VARIANT_VALUE"] = "AVAILABLE_VARIANT_VALUE";
38012
39197
  ProductFilterTypeEnum["BRAND"] = "BRAND";
38013
39198
  ProductFilterTypeEnum["DISCOUNT_RATIO"] = "DISCOUNT_RATIO";
38014
39199
  ProductFilterTypeEnum["PRICE"] = "PRICE";
@@ -42154,7 +43339,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
42154
43339
  return __generator(this, function (_b) {
42155
43340
  switch (_b.label) {
42156
43341
  case 0:
42157
- 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 "])));
43342
+ 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 "])));
42158
43343
  _b.label = 1;
42159
43344
  case 1:
42160
43345
  _b.trys.push([1, 3, , 4]);
@@ -70267,7 +71452,8 @@ var AddressForm$1 = observer(function (props) {
70267
71452
  vm.address.checkoutSettings.identityNumberRequirement !==
70268
71453
  IkasCheckoutRequirementEnum.INVISIBLE && (createElement("div", { className: styles$4.RowPB },
70269
71454
  createElement(IdentityNumber, __assign({}, props, { vm: vm })))),
70270
- ((_a = vm.address.checkoutSettings) === null || _a === void 0 ? void 0 : _a.isShowPostalCode) ? (createElement(Fragment$1, null,
71455
+ ((_a = vm.address.checkoutSettings) === null || _a === void 0 ? void 0 : _a.phoneRequirement) !==
71456
+ IkasCheckoutRequirementEnum.INVISIBLE ? (createElement(Fragment$1, null,
70271
71457
  createElement("div", { className: styles$4.RowPB },
70272
71458
  createElement(AddressFirstLine, __assign({}, props, { vm: vm }))),
70273
71459
  createElement("div", { className: [commonStyles.Grid, commonStyles.Grid2].join(" ") },
@@ -70341,9 +71527,10 @@ var AddressSecondLine = observer(function (_a) {
70341
71527
  return (createElement(FormItem, { type: FormItemType.TEXT, autocomplete: "address-line2", label: t("checkout-page:addressLine2"), value: vm.address.addressLine2 || "", onChange: vm.onAddressLine2Change }));
70342
71528
  });
70343
71529
  var PostalCode = observer(function (_a) {
71530
+ var _b;
70344
71531
  var vm = _a.vm;
70345
71532
  var t = useTranslation().t;
70346
- return (createElement(FormItem, { type: FormItemType.TEXT, label: t("checkout-page:postalCode"), autocomplete: "postal-code", value: vm.address.postalCode || "", onChange: vm.onAddressPostalCodeChange }));
71533
+ return (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") }));
70347
71534
  });
70348
71535
  var Country = observer(function (_a) {
70349
71536
  var _b, _c;
@@ -74280,4 +75467,4 @@ var en$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Ob
74280
75467
  'default': en
74281
75468
  }));
74282
75469
 
74283
- export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, CustomerReviewForm, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutCustomer, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasCustomerReview, IkasCustomerReviewAPI, IkasCustomerReviewList, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductBackInStockReminderAPI, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductOption, IkasProductOptionDateSettings, IkasProductOptionFileSettings, IkasProductOptionSelectSettings, IkasProductOptionSelectType, IkasProductOptionSelectValue, IkasProductOptionSelectValueTranslations, IkasProductOptionSet, IkasProductOptionSetAPI, IkasProductOptionSetTranslations, IkasProductOptionTextSettings, IkasProductOptionTranslations, IkasProductOptionType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, getCurrencySymbol, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };
75470
+ export { AccountInfoForm, index$4 as AccountPage, AddressForm, addresses$1 as AddressesPage, Analytics, AnalyticsBody, AnalyticsHead, index$8 as BlogPage, _slug_$3 as BlogSlugPage, cart$1 as CartPage, checkout$1 as CheckoutPage, ContactForm, _slug_$1 as CustomPage, CustomerReviewForm, editor$1 as EditorPage, EmailRule, EqualsRule, favoriteProducts$1 as FavoriteProductsPage, ForgotPasswordForm, forgotPassword$1 as ForgotPasswordPage, IkasAmountTypeEnum$1 as IkasAmountTypeEnum, IkasApplicableProductFilterValue, IkasAttributeDetail, IkasAttributeList, IkasBaseStore, IkasBlog, IkasBlogAPI, IkasBlogCategory, IkasBlogCategoryList, IkasBlogCategoryListPropValue, IkasBlogCategoryListType, IkasBlogCategoryPropValue, IkasBlogContent, IkasBlogList, IkasBlogListPropValue, IkasBlogListType, IkasBlogMetaData, IkasBlogMetadataTargetType, IkasBlogPropValue, IkasBlogTag, IkasBlogWriter, IkasBrand, IkasBrandAPI, IkasBrandList, IkasBrandListPropValue, IkasBrandListSortType, IkasBrandListType, IkasBrandPropValue, IkasCardAssociation, IkasCardType, IkasCartAPI, IkasCategory, IkasCategoryAPI, IkasCategoryList, IkasCategoryListPropValue, IkasCategoryListSortType, IkasCategoryListType, IkasCategoryPropValue, IkasCheckout, IkasCheckoutAPI, IkasCheckoutCustomer, IkasCheckoutRecoveryEmailStatus, IkasCheckoutRecoveryStatus, IkasCheckoutStatus, IkasCityAPI, IkasComponentRenderer, IkasContactForm, IkasContactFormAPI, IkasCountryAPI, IkasCustomer, IkasCustomerAPI, IkasCustomerAddress, IkasCustomerReview, IkasCustomerReviewAPI, IkasCustomerReviewList, IkasDistrictAPI, IkasFavoriteProduct, IkasFavoriteProductAPI, IkasHTMLMetaData, IkasHTMLMetaDataAPI, IkasHTMLMetaDataTargetType, IkasImage, IkasLinkPropValue, IkasLinkType, IkasMerchantAPI, IkasMerchantSettings, IkasNavigationLink, IkasOrder, IkasOrderCancelledReason, IkasOrderLineItem, IkasOrderPackageFulfillStatus, IkasOrderPackageStatus, IkasOrderPaymentStatus, IkasOrderRefundSettings, IkasOrderShippingMethod, IkasOrderStatus, IkasOrderTransaction, IkasPage, IkasPageEditor, IkasPageHead, IkasPaymentMethod, IkasProduct, IkasProductAttribute, IkasProductAttributeAPI, IkasProductAttributeType, IkasProductAttributeValue, IkasProductBackInStockReminderAPI, IkasProductDetail, IkasProductDetailPropValue, IkasProductFilter, IkasProductFilterDisplayType, IkasProductFilterSettings, IkasProductFilterSortType, IkasProductFilterType, IkasProductFilterValue, IkasProductList, IkasProductListPropValue, IkasProductListSortType, IkasProductListType, IkasProductOption, IkasProductOptionDateSettings, IkasProductOptionFileSettings, IkasProductOptionSelectSettings, IkasProductOptionSelectType, IkasProductOptionSelectValue, IkasProductOptionSelectValueTranslations, IkasProductOptionSet, IkasProductOptionSetAPI, IkasProductOptionSetTranslations, IkasProductOptionTextSettings, IkasProductOptionTranslations, IkasProductOptionType, IkasProductPrice, IkasProductSearchAPI, IkasProductType, IkasProductVariant, IkasProductVariantType, IkasShippingMethod, IkasShippingMethodEnum, IkasStateAPI, IkasStorefrontConfig, IkasTheme, IkasThemeComponent, IkasThemeComponentProp, IkasThemeComponentPropType, IkasThemeCustomData, IkasThemePage, IkasThemePageComponent, IkasThemePageType, IkasThemeSettings, IkasTransactionStatusEnum, IkasTransactionTypeEnum, IkasVariantSelectionType, IkasVariantType, IkasVariantTypeAPI, IkasVariantValue, Image, home$1 as IndexPage, LessThanRule, LoginForm, login$1 as LoginPage, MaxRule, MinRule, _404 as NotFoundPage, _id_$1 as OrderDetailPage, OrderLineItemStatusEnum$1 as OrderLineItemStatusEnum, index$6 as OrdersPage, PhoneRule, RangeValue, RecoverPasswordForm, recoverPassword$1 as RecoverPasswordPage, RegisterForm, register$1 as RegisterPage, RequiredRule, search$1 as SearchPage, index$2 as SlugPage, ValidationRule, Validator, ValidatorErrorType, apollo, createTranslationInputData, decodeBase64, findAllIndexes, formatDate, formatMoney, getCurrencySymbol, isValidPostalCode, parseRangeStr, pascalCase, stringSorter, stringToSlug, tryForEach, useTranslation, validatePhoneNumber };