@salesgenterp/ui-components 0.4.515 → 0.4.517

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.
package/dist/index.js CHANGED
@@ -1138,12 +1138,14 @@ var getCustomer = function getCustomer(_ref14) {
1138
1138
  };
1139
1139
  var getDeliveryOption = function getDeliveryOption(_ref15) {
1140
1140
  var apiEndPoint = _ref15.apiEndPoint,
1141
- token = _ref15.token;
1141
+ token = _ref15.token,
1142
+ queryParams = _ref15.queryParams;
1142
1143
  try {
1143
1144
  return Promise.resolve(API({
1144
1145
  apiEndPoint: apiEndPoint,
1145
1146
  token: token,
1146
- url: "/shipping/options"
1147
+ url: "/shipping/options",
1148
+ queryParams: queryParams
1147
1149
  }));
1148
1150
  } catch (e) {
1149
1151
  return Promise.reject(e);
@@ -11581,7 +11583,7 @@ var Step1 = function Step1(_ref) {
11581
11583
 
11582
11584
  var _templateObject$N;
11583
11585
  var Step2 = function Step2(_ref) {
11584
- var _filter, _customer$customerDto, _addressList$, _addressList2, _styles$button2, _JSON$parse2, _styles$button3;
11586
+ var _filter, _customer$customerDto, _addressList$, _addressList3, _styles$button2, _JSON$parse2, _styles$button3;
11585
11587
  var apiEndPoint = _ref.apiEndPoint,
11586
11588
  token = _ref.token,
11587
11589
  cartData = _ref.cartData,
@@ -11591,6 +11593,8 @@ var Step2 = function Step2(_ref) {
11591
11593
  _ref$options = _ref.options,
11592
11594
  options = _ref$options === void 0 ? [] : _ref$options,
11593
11595
  setShipping = _ref.setShipping,
11596
+ refetchDeliveryOptions = _ref.refetchDeliveryOptions,
11597
+ deliveryOptionsLoading = _ref.deliveryOptionsLoading,
11594
11598
  countries = _ref.countries,
11595
11599
  states = _ref.states,
11596
11600
  addShipping = _ref.addShipping,
@@ -11647,6 +11651,7 @@ var Step2 = function Step2(_ref) {
11647
11651
  var _useState = React.useState(parseInt(shippingAddressId) || ((_addressList$ = addressList[0]) === null || _addressList$ === void 0 ? void 0 : _addressList$.id)),
11648
11652
  address = _useState[0],
11649
11653
  setAddress = _useState[1];
11654
+ var hasFetchedInitialDeliveryOptions = React.useRef(false);
11650
11655
  var onSubmit = function onSubmit(data) {
11651
11656
  var _addressList, _addressList$2;
11652
11657
  var modifyData = _extends({}, data, {
@@ -11657,6 +11662,17 @@ var Step2 = function Step2(_ref) {
11657
11662
  setAddress(shippingAddressId || ((_addressList = addressList) === null || _addressList === void 0 ? void 0 : (_addressList$2 = _addressList[0]) === null || _addressList$2 === void 0 ? void 0 : _addressList$2.id));
11658
11663
  resetField('shippingAddress');
11659
11664
  };
11665
+ React.useEffect(function () {
11666
+ var _addressList2;
11667
+ if (refetchDeliveryOptions && (_addressList2 = addressList) !== null && _addressList2 !== void 0 && _addressList2[0] && !hasFetchedInitialDeliveryOptions.current) {
11668
+ var selectedAddr = addressList.find(function (addr) {
11669
+ return addr.id === address;
11670
+ }) || addressList[0];
11671
+ setShipping(address, method, selectedAddr);
11672
+ refetchDeliveryOptions(selectedAddr);
11673
+ hasFetchedInitialDeliveryOptions.current = true;
11674
+ }
11675
+ }, []);
11660
11676
  React.useEffect(function () {
11661
11677
  setSelectedCountry(selectedCountry);
11662
11678
  }, [selectedCountry]);
@@ -11794,9 +11810,19 @@ var Step2 = function Step2(_ref) {
11794
11810
  }, /*#__PURE__*/React__default.createElement(Select, null, /*#__PURE__*/React__default.createElement("select", {
11795
11811
  value: address,
11796
11812
  onChange: function onChange(e) {
11797
- return setAddress(parseInt(e.target.value));
11813
+ var newAddress = parseInt(e.target.value);
11814
+ setAddress(newAddress);
11815
+ if (newAddress !== 99999999) {
11816
+ var selectedAddr = addressList.find(function (address) {
11817
+ return address.id === newAddress;
11818
+ });
11819
+ setShipping(newAddress, method, selectedAddr);
11820
+ if (refetchDeliveryOptions && selectedAddr) {
11821
+ refetchDeliveryOptions(selectedAddr);
11822
+ }
11823
+ }
11798
11824
  }
11799
- }, (_addressList2 = addressList) === null || _addressList2 === void 0 ? void 0 : _addressList2.map(function (address, i) {
11825
+ }, (_addressList3 = addressList) === null || _addressList3 === void 0 ? void 0 : _addressList3.map(function (address, i) {
11800
11826
  return /*#__PURE__*/React__default.createElement("option", {
11801
11827
  key: i,
11802
11828
  value: address.id
@@ -11819,7 +11845,9 @@ var Step2 = function Step2(_ref) {
11819
11845
  width: "100%",
11820
11846
  alignItems: 'flex-start',
11821
11847
  paddingBottom: '1rem'
11822
- }, modifyOptions === null || modifyOptions === void 0 ? void 0 : modifyOptions.map(function (option, i) {
11848
+ }, deliveryOptionsLoading ? /*#__PURE__*/React__default.createElement(Loader, {
11849
+ height: 100
11850
+ }) : modifyOptions === null || modifyOptions === void 0 ? void 0 : modifyOptions.map(function (option, i) {
11823
11851
  return deliveryOption(option, i);
11824
11852
  })), (method === null || method === void 0 ? void 0 : method.description) && /*#__PURE__*/React__default.createElement("span", {
11825
11853
  style: {
@@ -13214,53 +13242,59 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13214
13242
  var _useState6 = React.useState([]),
13215
13243
  deliveryOptions = _useState6[0],
13216
13244
  setDeliveryOptions = _useState6[1];
13217
- var _useState7 = React.useState([]),
13218
- paymentMethods = _useState7[0],
13219
- setPaymentMethods = _useState7[1];
13220
- var _useState8 = React.useState(),
13221
- billingAddressId = _useState8[0],
13222
- setBillingAddressId = _useState8[1];
13245
+ var _useState7 = React.useState(false),
13246
+ deliveryOptionsLoading = _useState7[0],
13247
+ setDeliveryOptionsLoading = _useState7[1];
13248
+ var _useState8 = React.useState([]),
13249
+ paymentMethods = _useState8[0],
13250
+ setPaymentMethods = _useState8[1];
13223
13251
  var _useState9 = React.useState(),
13224
- shippingAddressId = _useState9[0],
13225
- setShippingAddressId = _useState9[1];
13226
- var _useState10 = React.useState(false),
13227
- showShipping = _useState10[0],
13228
- setShowShipping = _useState10[1];
13229
- var _useState11 = React.useState(),
13230
- shippingMethod = _useState11[0],
13231
- setShippingMethod = _useState11[1];
13252
+ billingAddressId = _useState9[0],
13253
+ setBillingAddressId = _useState9[1];
13254
+ var _useState10 = React.useState(),
13255
+ shippingAddressId = _useState10[0],
13256
+ setShippingAddressId = _useState10[1];
13257
+ var _useState11 = React.useState(false),
13258
+ showShipping = _useState11[0],
13259
+ setShowShipping = _useState11[1];
13232
13260
  var _useState12 = React.useState(),
13233
- selectedPaymentMethod = _useState12[0],
13234
- setSelectedPaymentMethod = _useState12[1];
13261
+ shippingMethod = _useState12[0],
13262
+ setShippingMethod = _useState12[1];
13235
13263
  var _useState13 = React.useState(),
13236
- selectedStoreCredits = _useState13[0],
13237
- setStoreCredits = _useState13[1];
13264
+ selectedPaymentMethod = _useState13[0],
13265
+ setSelectedPaymentMethod = _useState13[1];
13238
13266
  var _useState14 = React.useState(),
13239
- selectedCountry = _useState14[0],
13240
- setSelectedCountry = _useState14[1];
13241
- var _useState15 = React.useState([]),
13242
- countries = _useState15[0],
13243
- setCountries = _useState15[1];
13267
+ selectedStoreCredits = _useState14[0],
13268
+ setStoreCredits = _useState14[1];
13269
+ var _useState15 = React.useState(),
13270
+ selectedCountry = _useState15[0],
13271
+ setSelectedCountry = _useState15[1];
13244
13272
  var _useState16 = React.useState([]),
13245
- states = _useState16[0],
13246
- setStates = _useState16[1];
13247
- var _useState17 = React.useState(),
13248
- card = _useState17[0],
13249
- setCard = _useState17[1];
13250
- var _useState18 = React.useState({}),
13251
- orderTotal = _useState18[0],
13252
- setOrderTotal = _useState18[1];
13253
- var _useState19 = React.useState({
13273
+ countries = _useState16[0],
13274
+ setCountries = _useState16[1];
13275
+ var _useState17 = React.useState([]),
13276
+ states = _useState17[0],
13277
+ setStates = _useState17[1];
13278
+ var _useState18 = React.useState(),
13279
+ card = _useState18[0],
13280
+ setCard = _useState18[1];
13281
+ var _useState19 = React.useState({}),
13282
+ orderTotal = _useState19[0],
13283
+ setOrderTotal = _useState19[1];
13284
+ var _useState20 = React.useState({
13254
13285
  openDiscountModal: false,
13255
13286
  discountCouponsData: []
13256
13287
  }),
13257
- discountCoupons = _useState19[0],
13258
- setDiscountCoupons = _useState19[1];
13259
- var _useState20 = React.useState(null),
13260
- totalTaxAmount = _useState20[0],
13261
- setTotalTaxAmount = _useState20[1];
13288
+ discountCoupons = _useState20[0],
13289
+ setDiscountCoupons = _useState20[1];
13290
+ var _useState21 = React.useState(null),
13291
+ totalTaxAmount = _useState21[0],
13292
+ setTotalTaxAmount = _useState21[1];
13262
13293
  var previousSubTotalRef = React.useRef(null);
13263
13294
  var previousShippingAddressIdRef = React.useRef(null);
13295
+ var _useState22 = React.useState(),
13296
+ selectedAddress = _useState22[0],
13297
+ setSelectedAddress = _useState22[1];
13264
13298
  React.useEffect(function () {
13265
13299
  if (apiEndPoint && token) {
13266
13300
  (function () {
@@ -13290,11 +13324,40 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13290
13324
  })();
13291
13325
  }
13292
13326
  }, [token]);
13327
+ var refetchDeliveryOptions = function refetchDeliveryOptions(addressOverride) {
13328
+ try {
13329
+ if (!(apiEndPoint && token)) return Promise.resolve();
13330
+ var addressToUse = addressOverride || selectedAddress;
13331
+ var _temp2 = _finallyRethrows(function () {
13332
+ return _catch(function () {
13333
+ setDeliveryOptionsLoading(true);
13334
+ return Promise.resolve(getDeliveryOption({
13335
+ apiEndPoint: apiEndPoint,
13336
+ token: token,
13337
+ queryParams: {
13338
+ toZipCode: addressToUse === null || addressToUse === void 0 ? void 0 : addressToUse.zip,
13339
+ toCountryId: addressToUse === null || addressToUse === void 0 ? void 0 : addressToUse.countryId,
13340
+ storeId: storeId
13341
+ }
13342
+ })).then(function (data) {
13343
+ setDeliveryOptions(data);
13344
+ });
13345
+ }, function () {});
13346
+ }, function (_wasThrown, _result) {
13347
+ setDeliveryOptionsLoading(false);
13348
+ if (_wasThrown) throw _result;
13349
+ return _result;
13350
+ });
13351
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
13352
+ } catch (e) {
13353
+ return Promise.reject(e);
13354
+ }
13355
+ };
13293
13356
  React.useEffect(function () {
13294
13357
  if (apiEndPoint && token) {
13295
13358
  (function () {
13296
13359
  return _catch(function () {
13297
- var _temp2 = function () {
13360
+ var _temp3 = function () {
13298
13361
  if (selectedCountry) {
13299
13362
  return Promise.resolve(getStatesById({
13300
13363
  id: selectedCountry,
@@ -13305,7 +13368,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13305
13368
  });
13306
13369
  }
13307
13370
  }();
13308
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
13371
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
13309
13372
  }, function () {});
13310
13373
  })();
13311
13374
  }
@@ -13313,31 +13376,20 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13313
13376
  React.useEffect(function () {
13314
13377
  (function () {
13315
13378
  try {
13316
- var _temp8 = function () {
13379
+ var _temp7 = function () {
13317
13380
  if (apiEndPoint && token) {
13318
- var _temp7 = function _temp7() {
13319
- function _temp5() {
13320
- var _temp3 = _catch(function () {
13321
- return Promise.resolve(getPaymentMethods({
13322
- apiEndPoint: apiEndPoint,
13323
- token: token
13324
- })).then(function (data) {
13325
- setPaymentMethods(data);
13326
- });
13327
- }, function () {});
13328
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
13329
- }
13381
+ var _temp6 = function _temp6() {
13330
13382
  var _temp4 = _catch(function () {
13331
- return Promise.resolve(getDeliveryOption({
13383
+ return Promise.resolve(getPaymentMethods({
13332
13384
  apiEndPoint: apiEndPoint,
13333
13385
  token: token
13334
13386
  })).then(function (data) {
13335
- setDeliveryOptions(data);
13387
+ setPaymentMethods(data);
13336
13388
  });
13337
13389
  }, function () {});
13338
- return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
13390
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
13339
13391
  };
13340
- var _temp6 = _catch(function () {
13392
+ var _temp5 = _catch(function () {
13341
13393
  return Promise.resolve(getCustomer({
13342
13394
  apiEndPoint: apiEndPoint,
13343
13395
  token: token
@@ -13345,10 +13397,10 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13345
13397
  setCustomer(data);
13346
13398
  });
13347
13399
  }, function () {});
13348
- return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
13400
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
13349
13401
  }
13350
13402
  }();
13351
- return _temp8 && _temp8.then ? _temp8.then(function () {}) : void 0;
13403
+ return _temp7 && _temp7.then ? _temp7.then(function () {}) : void 0;
13352
13404
  } catch (e) {
13353
13405
  Promise.reject(e);
13354
13406
  }
@@ -13372,7 +13424,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13372
13424
  alert('Product quantity must be greater than 0');
13373
13425
  window.location.replace("/cart");
13374
13426
  }
13375
- var _temp9 = function () {
13427
+ var _temp8 = function () {
13376
13428
  if (customer) {
13377
13429
  setSubmitting(function (prev) {
13378
13430
  return _extends({}, prev, {
@@ -13395,7 +13447,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13395
13447
  });
13396
13448
  }
13397
13449
  }();
13398
- return _temp9 && _temp9.then ? _temp9.then(function () {}) : void 0;
13450
+ return _temp8 && _temp8.then ? _temp8.then(function () {}) : void 0;
13399
13451
  } catch (e) {
13400
13452
  Promise.reject(e);
13401
13453
  }
@@ -13404,10 +13456,10 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13404
13456
  var taxFunction = function taxFunction() {
13405
13457
  try {
13406
13458
  var taxAmount = totalTaxAmount || 0;
13407
- var _temp11 = function (_cartData$cartLineIte2) {
13459
+ var _temp10 = function (_cartData$cartLineIte2) {
13408
13460
  if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte2 = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte2 === void 0 ? void 0 : _cartData$cartLineIte2.length) > 0 && shippingAddressId && (shippingAddressId !== previousShippingAddressIdRef.current || (cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal) !== previousSubTotalRef.current)) {
13409
13461
  previousShippingAddressIdRef.current = shippingAddressId;
13410
- var _temp10 = _catch(function () {
13462
+ var _temp9 = _catch(function () {
13411
13463
  return Promise.resolve(getTaxData({
13412
13464
  apiEndPoint: apiEndPoint,
13413
13465
  token: token,
@@ -13420,10 +13472,10 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13420
13472
  setTotalTaxAmount(taxAmount);
13421
13473
  });
13422
13474
  }, function () {});
13423
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
13475
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
13424
13476
  }
13425
13477
  }();
13426
- return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {
13478
+ return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {
13427
13479
  return taxAmount;
13428
13480
  }) : taxAmount);
13429
13481
  } catch (e) {
@@ -13434,16 +13486,16 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13434
13486
  try {
13435
13487
  var _ref2;
13436
13488
  var couponDiscountTotal = parseFloat((_ref2 = lodash.sumBy(discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.discountCouponsData, 'amount') || 0) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2));
13437
- var _temp14 = function () {
13489
+ var _temp13 = function () {
13438
13490
  if (!isNullUndefined(cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal) && (cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal) !== previousSubTotalRef.current) {
13439
13491
  previousSubTotalRef.current = cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal;
13440
- var _temp13 = _catch(function () {
13492
+ var _temp12 = _catch(function () {
13441
13493
  return Promise.resolve(autoApplyCoupon({
13442
13494
  apiEndPoint: apiEndPoint,
13443
13495
  token: token,
13444
13496
  subTotal: cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal
13445
13497
  })).then(function () {
13446
- function _temp12(_fetchCartData) {
13498
+ function _temp11(_fetchCartData) {
13447
13499
  _fetchCartData;
13448
13500
  return Promise.resolve(getCartDiscountList({
13449
13501
  apiEndPoint: apiEndPoint,
@@ -13459,15 +13511,15 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13459
13511
  });
13460
13512
  });
13461
13513
  }
13462
- return fetchCartData ? Promise.resolve(fetchCartData()).then(_temp12) : _temp12(fetchCartData);
13514
+ return fetchCartData ? Promise.resolve(fetchCartData()).then(_temp11) : _temp11(fetchCartData);
13463
13515
  });
13464
13516
  }, function () {
13465
13517
  window.location.replace("/cart");
13466
13518
  });
13467
- if (_temp13 && _temp13.then) return _temp13.then(function () {});
13519
+ if (_temp12 && _temp12.then) return _temp12.then(function () {});
13468
13520
  }
13469
13521
  }();
13470
- return Promise.resolve(_temp14 && _temp14.then ? _temp14.then(function () {
13522
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {
13471
13523
  return couponDiscountTotal;
13472
13524
  }) : couponDiscountTotal);
13473
13525
  } catch (e) {
@@ -13516,21 +13568,21 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13516
13568
  };
13517
13569
  var onLoginCustomer = function onLoginCustomer(data) {
13518
13570
  try {
13519
- var _temp16 = function _temp16() {
13571
+ var _temp15 = function _temp15() {
13520
13572
  setLoginLoading(false);
13521
13573
  };
13522
13574
  setLoginLoading(true);
13523
- var _temp15 = _catch(function () {
13575
+ var _temp14 = _catch(function () {
13524
13576
  return Promise.resolve(handleLogin(data)).then(function () {});
13525
13577
  }, function () {});
13526
- return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15));
13578
+ return Promise.resolve(_temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14));
13527
13579
  } catch (e) {
13528
13580
  return Promise.reject(e);
13529
13581
  }
13530
13582
  };
13531
13583
  var addStoreAddress = function addStoreAddress(data) {
13532
13584
  try {
13533
- var _temp18 = _catch(function () {
13585
+ var _temp17 = _catch(function () {
13534
13586
  var _customer$customerDto2;
13535
13587
  return Promise.resolve(createStoreAddress({
13536
13588
  apiEndPoint: apiEndPoint,
@@ -13538,7 +13590,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13538
13590
  data: data,
13539
13591
  customerId: customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id
13540
13592
  })).then(function (result) {
13541
- var _temp17 = function () {
13593
+ var _temp16 = function () {
13542
13594
  if (result) {
13543
13595
  return Promise.resolve(getCustomer({
13544
13596
  apiEndPoint: apiEndPoint,
@@ -13548,10 +13600,10 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13548
13600
  });
13549
13601
  }
13550
13602
  }();
13551
- if (_temp17 && _temp17.then) return _temp17.then(function () {});
13603
+ if (_temp16 && _temp16.then) return _temp16.then(function () {});
13552
13604
  });
13553
13605
  }, function () {});
13554
- return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(function () {}) : void 0);
13606
+ return Promise.resolve(_temp17 && _temp17.then ? _temp17.then(function () {}) : void 0);
13555
13607
  } catch (e) {
13556
13608
  return Promise.reject(e);
13557
13609
  }
@@ -13569,9 +13621,10 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13569
13621
  var setBilling = function setBilling(data) {
13570
13622
  setBillingAddressId(data);
13571
13623
  };
13572
- var setShipping = function setShipping(shippingAddressId, shippingMethod) {
13624
+ var setShipping = function setShipping(shippingAddressId, shippingMethod, selectedAddress) {
13573
13625
  setShippingAddressId(shippingAddressId);
13574
13626
  setShippingMethod(shippingMethod);
13627
+ setSelectedAddress(selectedAddress);
13575
13628
  };
13576
13629
  var setPaymentDetails = function setPaymentDetails(storeCr, paymentMethod, cr) {
13577
13630
  var _customer$customerDto3;
@@ -13632,7 +13685,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13632
13685
  };
13633
13686
  var onPlaceOrder = function onPlaceOrder(note, transactionId) {
13634
13687
  try {
13635
- var _temp20 = function _temp20() {
13688
+ var _temp19 = function _temp19() {
13636
13689
  setSubmitting(function (prev) {
13637
13690
  return _extends({}, prev, {
13638
13691
  loading: false
@@ -13644,7 +13697,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13644
13697
  loading: true
13645
13698
  });
13646
13699
  });
13647
- var _temp19 = _catch(function () {
13700
+ var _temp18 = _catch(function () {
13648
13701
  var authorizeCustomerCardData = {
13649
13702
  authorizeDotNetCustomerProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerProfileId,
13650
13703
  authorizeDotNetCustomerPaymentProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerPaymentProfileId
@@ -13731,7 +13784,7 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13731
13784
  }
13732
13785
  return Promise.resolve(createSalesOrder(salesOrderDtoBody)).then(function () {});
13733
13786
  }, function () {});
13734
- return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
13787
+ return Promise.resolve(_temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18));
13735
13788
  } catch (e) {
13736
13789
  return Promise.reject(e);
13737
13790
  }
@@ -13874,6 +13927,8 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13874
13927
  states: states,
13875
13928
  countries: countries,
13876
13929
  setShipping: setShipping,
13930
+ refetchDeliveryOptions: refetchDeliveryOptions,
13931
+ deliveryOptionsLoading: deliveryOptionsLoading,
13877
13932
  showShipping: showShipping,
13878
13933
  storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto7 = customer.customerDto) === null || _customer$customerDto7 === void 0 ? void 0 : _customer$customerDto7.storeCredit,
13879
13934
  discountCoupons: discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.discountCouponsData,