tf-checkout-react 1.6.6-beta.32 → 1.6.6-beta.33

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.
@@ -13,5 +13,5 @@ export interface ISimpleAddonContainerProps {
13
13
  export interface ObjectLiteral {
14
14
  [key: string]: any;
15
15
  }
16
- export declare const SimpleAddonsContainer: ({ classNamePrefix, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, descriptionTrigger, addOnDataWithCustomFields, configs, eventId, onAddOnSelect, handleConfirm, }: ISimpleAddonContainerProps) => JSX.Element | null;
16
+ export declare const SimpleAddonsContainer: ({ classNamePrefix, onGetAddonsPageInfoSuccess, onGetAddonsPageInfoError, descriptionTrigger, addOnDataWithCustomFields, configs, eventId, onAddOnSelect, handleConfirm, }: ISimpleAddonContainerProps) => JSX.Element;
17
17
  export default SimpleAddonsContainer;
@@ -4282,7 +4282,7 @@ var SimpleAddonsContainer = function SimpleAddonsContainer(_ref) {
4282
4282
  onAddOnSelect = _ref$onAddOnSelect === void 0 ? _identity : _ref$onAddOnSelect,
4283
4283
  _ref$handleConfirm = _ref.handleConfirm,
4284
4284
  handleConfirm = _ref$handleConfirm === void 0 ? _identity : _ref$handleConfirm;
4285
- var _useState = React.useState([]),
4285
+ var _useState = React.useState(null),
4286
4286
  addons = _useState[0],
4287
4287
  setAddons = _useState[1];
4288
4288
  var _useState2 = React.useState({}),
@@ -4423,16 +4423,13 @@ var SimpleAddonsContainer = function SimpleAddonsContainer(_ref) {
4423
4423
  }
4424
4424
  return addOnsData;
4425
4425
  }, [addons, addOnDataWithCustomFields]);
4426
- if (loading) {
4426
+ if (loading || !addons) {
4427
4427
  return React__default.createElement("div", {
4428
4428
  className: classNamePrefix + "_loader"
4429
4429
  }, React__default.createElement(material.CircularProgress, {
4430
4430
  size: 50
4431
4431
  }));
4432
4432
  }
4433
- if ((addons == null ? void 0 : addons.length) === 0) {
4434
- return null;
4435
- }
4436
4433
  return React__default.createElement("div", {
4437
4434
  className: classNamePrefix + "_container"
4438
4435
  }, React__default.createElement("div", {
@@ -6918,18 +6915,21 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
6918
6915
  var stripePublishableKey = (reviewData == null ? void 0 : (_reviewData$payment_m = reviewData.payment_method) == null ? void 0 : _reviewData$payment_m.stripe_publishable_key) || (checkoutUpdateData == null ? void 0 : (_checkoutUpdateData$a = checkoutUpdateData.additional_payment_information) == null ? void 0 : (_checkoutUpdateData$a2 = _checkoutUpdateData$a.basic_config) == null ? void 0 : _checkoutUpdateData$a2.apiKey);
6919
6916
  var stripeAccountId = (reviewData == null ? void 0 : (_reviewData$payment_m2 = reviewData.payment_method) == null ? void 0 : _reviewData$payment_m2.stripe_connected_account) || (checkoutUpdateData == null ? void 0 : (_checkoutUpdateData$a3 = checkoutUpdateData.additional_payment_information) == null ? void 0 : (_checkoutUpdateData$a4 = _checkoutUpdateData$a3.basic_config) == null ? void 0 : _checkoutUpdateData$a4.accountId);
6920
6917
  var addOnsIncludedOnInvitation = additionalConfigs.resale && additionalConfigs.resaleWithAddons;
6918
+ if (loading || cardLoading || isCountriesLoading || isConfigLoading || !eventId) {
6919
+ return React__default.createElement(Backdrop, {
6920
+ sx: {
6921
+ color: '#fff',
6922
+ backgroundColor: '#000000bd',
6923
+ zIndex: 1205
6924
+ },
6925
+ open: true
6926
+ }, React__default.createElement(material.CircularProgress, {
6927
+ color: "inherit"
6928
+ }));
6929
+ }
6921
6930
  return React__default.createElement(styles.ThemeProvider, {
6922
6931
  theme: themeMui
6923
- }, (loading || cardLoading || isCountriesLoading || isConfigLoading) && React__default.createElement(Backdrop, {
6924
- sx: {
6925
- color: '#fff',
6926
- backgroundColor: '#000000bd',
6927
- zIndex: 1205
6928
- },
6929
- open: true
6930
- }, React__default.createElement(material.CircularProgress, {
6931
- color: "inherit"
6932
- })), !!expirationTime && enableTimer && React__default.createElement(TimerWidget$1, {
6932
+ }, !!expirationTime && enableTimer && React__default.createElement(TimerWidget$1, {
6933
6933
  expires_at: expirationTime,
6934
6934
  onCountdownFinish: onCountdownFinish,
6935
6935
  container: isSinglePageCheckout ? 'body' : ''
@@ -7232,7 +7232,7 @@ var BillingInfoContainer = /*#__PURE__*/React__default.memo(function (_ref4) {
7232
7232
  shouldFetchCountries: shouldFetchCountries
7233
7233
  }), React__default.createElement("div", {
7234
7234
  className: "billing-info-container " + theme
7235
- }, React__default.createElement(SnackbarAlert, {
7235
+ }, !!error && React__default.createElement(SnackbarAlert, {
7236
7236
  type: "error",
7237
7237
  isOpen: !!error,
7238
7238
  message: error || '',