tf-checkout-react 1.3.29 → 1.3.30

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.
@@ -1824,6 +1824,8 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
1824
1824
  setErrors = _ref$form.setErrors,
1825
1825
  _ref$disableDropdown = _ref.disableDropdown,
1826
1826
  disableDropdown = _ref$disableDropdown === void 0 ? true : _ref$disableDropdown,
1827
+ _ref$defaultCountry = _ref.defaultCountry,
1828
+ defaultCountry = _ref$defaultCountry === void 0 ? 'us' : _ref$defaultCountry,
1827
1829
  _ref$fill = _ref.fill,
1828
1830
  fill = _ref$fill === void 0 ? false : _ref$fill,
1829
1831
  setPhoneValidationIsLoading = _ref.setPhoneValidationIsLoading;
@@ -1913,7 +1915,7 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
1913
1915
  }
1914
1916
  },
1915
1917
  variant: "outlined",
1916
- defaultCountry: "us",
1918
+ defaultCountry: defaultCountry,
1917
1919
  disableDropdown: disableDropdown,
1918
1920
  label: label,
1919
1921
  error: !!error && (isTouched || fill),
@@ -3453,12 +3455,12 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
3453
3455
  expires_at: expirationTime,
3454
3456
  onCountdownFinish: onCountdownFinish
3455
3457
  }), React.createElement(Formik, {
3456
- initialValues: getInitialValues(dataWithUniqueIds, _extends({}, initialValues, {
3458
+ initialValues: getInitialValues(dataWithUniqueIds, _extends({
3457
3459
  country: _get(userData, 'country', '') || '1',
3458
3460
  state: _get(userData, 'state', '') || '1',
3459
3461
  brand_opt_in: optedInFieldValue,
3460
3462
  ttf_opt_in: ttfOptIn
3461
- }), userValues),
3463
+ }, initialValues), userValues),
3462
3464
  enableReinitialize: false,
3463
3465
  onSubmit: function () {
3464
3466
  var _onSubmit = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(values, formikHelpers) {
@@ -3754,7 +3756,8 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
3754
3756
  component: element.type === 'checkbox' ? CheckboxField : element.type === 'select' ? SelectField : element.type === 'phone' ? PhoneNumberField : element.type === 'date' ? DatePickerField : CustomField,
3755
3757
  selectOptions: element.name === 'country' ? countries : element.name === 'state' ? states : [],
3756
3758
  theme: theme,
3757
- disableDropdown: element.disableDropdown
3759
+ disableDropdown: element.disableDropdown,
3760
+ defaultCountry: element.defaultCountry
3758
3761
  })));
3759
3762
  })));
3760
3763
  }));
@@ -3789,7 +3792,8 @@ var BillingInfoContainer = /*#__PURE__*/React.memo(function (_ref4) {
3789
3792
  return props.errors[element.name + "-" + index];
3790
3793
  }),
3791
3794
  disableDropdown: element.disableDropdown,
3792
- setPhoneValidationIsLoading: setPhoneValidationIsLoading
3795
+ setPhoneValidationIsLoading: setPhoneValidationIsLoading,
3796
+ defaultCountry: element.defaultCountry
3793
3797
  }));
3794
3798
  })));
3795
3799
  }));