@pelcro/react-pelcro-js 4.0.0-alpha.33 → 4.0.0-alpha.34

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.cjs.js CHANGED
@@ -8272,7 +8272,7 @@ class PelcroActions {
8272
8272
  view,
8273
8273
  cartItems,
8274
8274
  ...otherStateFields
8275
- } = initialState$n;
8275
+ } = initialState$o;
8276
8276
  this.set(otherStateFields);
8277
8277
  });
8278
8278
 
@@ -8678,7 +8678,7 @@ class PelcroCallbacks {
8678
8678
 
8679
8679
  }
8680
8680
 
8681
- const initialState$n = {
8681
+ const initialState$o = {
8682
8682
  // View
8683
8683
  view: null,
8684
8684
  // Plans
@@ -8713,7 +8713,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
8713
8713
  return {
8714
8714
  // Store setter
8715
8715
  set,
8716
- ...initialState$n,
8716
+ ...initialState$o,
8717
8717
  // State actions
8718
8718
  ...actions,
8719
8719
  // Callbacks
@@ -12134,9 +12134,18 @@ const HANDLE_INVITE_MEMBERS = "HANDLE_INVITE_MEMBERS";
12134
12134
  const HANDLE_REMOVE_MEMBER = "HANDLE_REMOVE_MEMBER";
12135
12135
  const UPDATE_INVITE_BUTTON = "UPDATE_INVITE_BUTTON";
12136
12136
  const UPDATE_MEMBERS = "UPDATE_MEMBERS";
12137
- const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
12137
+ const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID"; //Dashboard
12138
12138
 
12139
- const initialState$m = {
12139
+ const SET_IS_OPEN = "SET_IS_OPEN";
12140
+ const SET_ADDRESSES = "SET_ADDRESSES";
12141
+ const CLOSE_DASHBOARD = "CLOSE_DASHBOARD";
12142
+ const SET_ACTIVE_DASHBOARD_LINK = "SET_ACTIVE_DASHBOARD_LINK";
12143
+ const SET_DISABLESUBMIT = "SET_DISABLESUBMIT";
12144
+ const CANCEL_SUBSCRIPTION = "CANCEL_SUBSCRIPTION";
12145
+ const UNSUSPEND_SUBSCRIPTION = "UNSUSPEND_SUBSCRIPTION";
12146
+ const REACTIVATE_SUBSCRIPTION = "REACTIVATE_SUBSCRIPTION"; //========
12147
+
12148
+ const initialState$n = {
12140
12149
  email: "",
12141
12150
  username: "",
12142
12151
  password: "",
@@ -12149,10 +12158,10 @@ const initialState$m = {
12149
12158
  content: ""
12150
12159
  }
12151
12160
  };
12152
- const store$m = /*#__PURE__*/React.createContext(initialState$m);
12161
+ const store$n = /*#__PURE__*/React.createContext(initialState$n);
12153
12162
  const {
12154
- Provider: Provider$m
12155
- } = store$m;
12163
+ Provider: Provider$n
12164
+ } = store$n;
12156
12165
 
12157
12166
  const LoginContainer = ({
12158
12167
  style,
@@ -12276,7 +12285,7 @@ const LoginContainer = ({
12276
12285
  });
12277
12286
 
12278
12287
  case RESET_LOGIN_FORM:
12279
- return initialState$m;
12288
+ return initialState$n;
12280
12289
 
12281
12290
  case DISABLE_LOGIN_BUTTON:
12282
12291
  return lib_7({ ...state,
@@ -12294,12 +12303,12 @@ const LoginContainer = ({
12294
12303
  default:
12295
12304
  return state;
12296
12305
  }
12297
- }, initialState$m);
12306
+ }, initialState$n);
12298
12307
  return /*#__PURE__*/React__default['default'].createElement("div", {
12299
12308
  style: { ...style
12300
12309
  },
12301
12310
  className: `pelcro-container pelcro-login-container ${className}`
12302
- }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
12311
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$n, {
12303
12312
  value: {
12304
12313
  state,
12305
12314
  dispatch
@@ -12307,12 +12316,12 @@ const LoginContainer = ({
12307
12316
  }, children.length ? children.map((child, i) => {
12308
12317
  if (child) {
12309
12318
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
12310
- store: store$m,
12319
+ store: store$n,
12311
12320
  key: i
12312
12321
  });
12313
12322
  }
12314
12323
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
12315
- store: store$m
12324
+ store: store$n
12316
12325
  })));
12317
12326
  };
12318
12327
 
@@ -12620,7 +12629,7 @@ const LoginButton = ({
12620
12629
  buttonDisabled
12621
12630
  },
12622
12631
  dispatch
12623
- } = React.useContext(store$m);
12632
+ } = React.useContext(store$n);
12624
12633
  const {
12625
12634
  t
12626
12635
  } = useTranslation("login");
@@ -12679,15 +12688,15 @@ const LoginRequestLoginToken = ({
12679
12688
  };
12680
12689
 
12681
12690
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
12682
- store: store$m
12691
+ store: store$n
12683
12692
  }, props));
12684
12693
 
12685
12694
  const LoginUsername = props => /*#__PURE__*/React__default['default'].createElement(UserNameInput, Object.assign({
12686
- store: store$m
12695
+ store: store$n
12687
12696
  }, props));
12688
12697
 
12689
12698
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
12690
- store: store$m
12699
+ store: store$n
12691
12700
  }, props));
12692
12701
 
12693
12702
  var _path$t;
@@ -12764,7 +12773,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
12764
12773
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
12765
12774
  facebookLoginRenderProps.FacebookLogin;
12766
12775
 
12767
- const initialState$l = {
12776
+ const initialState$m = {
12768
12777
  email: "",
12769
12778
  password: "",
12770
12779
  emailError: null,
@@ -12781,10 +12790,10 @@ const initialState$l = {
12781
12790
  content: ""
12782
12791
  }
12783
12792
  };
12784
- const store$l = /*#__PURE__*/React.createContext(initialState$l);
12793
+ const store$m = /*#__PURE__*/React.createContext(initialState$m);
12785
12794
  const {
12786
- Provider: Provider$l
12787
- } = store$l;
12795
+ Provider: Provider$m
12796
+ } = store$m;
12788
12797
 
12789
12798
  const RegisterContainer = ({
12790
12799
  style,
@@ -12975,7 +12984,7 @@ const RegisterContainer = ({
12975
12984
  });
12976
12985
 
12977
12986
  case RESET_LOGIN_FORM:
12978
- return initialState$l;
12987
+ return initialState$m;
12979
12988
 
12980
12989
  case DISABLE_REGISTRATION_BUTTON:
12981
12990
  return lib_7({ ...state,
@@ -12993,12 +13002,12 @@ const RegisterContainer = ({
12993
13002
  default:
12994
13003
  return state;
12995
13004
  }
12996
- }, initialState$l);
13005
+ }, initialState$m);
12997
13006
  return /*#__PURE__*/React__default['default'].createElement("div", {
12998
13007
  style: { ...style
12999
13008
  },
13000
13009
  className: `pelcro-container pelcro-register-container ${className}`
13001
- }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
13010
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
13002
13011
  value: {
13003
13012
  state,
13004
13013
  dispatch
@@ -13006,12 +13015,12 @@ const RegisterContainer = ({
13006
13015
  }, children.length ? children.map((child, i) => {
13007
13016
  if (child) {
13008
13017
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
13009
- store: store$l,
13018
+ store: store$m,
13010
13019
  key: i
13011
13020
  });
13012
13021
  }
13013
13022
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13014
- store: store$l
13023
+ store: store$m
13015
13024
  })));
13016
13025
  };
13017
13026
  /**
@@ -13051,10 +13060,10 @@ const FacebookLoginButton = ({
13051
13060
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
13052
13061
  const {
13053
13062
  dispatch: loginDispatch
13054
- } = React.useContext(store$m);
13063
+ } = React.useContext(store$n);
13055
13064
  const {
13056
13065
  dispatch: registerDispatch
13057
- } = React.useContext(store$l);
13066
+ } = React.useContext(store$m);
13058
13067
 
13059
13068
  const onSuccess = facebookUser => {
13060
13069
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -13220,10 +13229,10 @@ const GoogleLoginButton = ({
13220
13229
  const googleClientId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
13221
13230
  const {
13222
13231
  dispatch: loginDispatch
13223
- } = React.useContext(store$m);
13232
+ } = React.useContext(store$n);
13224
13233
  const {
13225
13234
  dispatch: registerDispatch
13226
- } = React.useContext(store$l);
13235
+ } = React.useContext(store$m);
13227
13236
  React.useEffect(() => {
13228
13237
  gapi.load("client:auth2", () => {
13229
13238
  gapi.auth2.init({
@@ -13327,10 +13336,10 @@ const Auth0LoginButton = ({
13327
13336
  }, [auth0Enabled, auth0Loaded]);
13328
13337
  const {
13329
13338
  dispatch: loginDispatch
13330
- } = React.useContext(store$m);
13339
+ } = React.useContext(store$n);
13331
13340
  const {
13332
13341
  dispatch: registerDispatch
13333
- } = React.useContext(store$l);
13342
+ } = React.useContext(store$m);
13334
13343
 
13335
13344
  function handleClick() {
13336
13345
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -13705,11 +13714,11 @@ function LoginModal({
13705
13714
  LoginModal.viewId = "login";
13706
13715
 
13707
13716
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
13708
- store: store$l
13717
+ store: store$m
13709
13718
  }, props));
13710
13719
 
13711
13720
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
13712
- store: store$l
13721
+ store: store$m
13713
13722
  }, props));
13714
13723
 
13715
13724
  const RegisterButton = ({
@@ -13729,7 +13738,7 @@ const RegisterButton = ({
13729
13738
  buttonDisabled
13730
13739
  },
13731
13740
  dispatch
13732
- } = React.useContext(store$l);
13741
+ } = React.useContext(store$m);
13733
13742
  const {
13734
13743
  t
13735
13744
  } = useTranslation("register");
@@ -13867,7 +13876,7 @@ function FirstName({
13867
13876
  }
13868
13877
 
13869
13878
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
13870
- store: store$l
13879
+ store: store$m
13871
13880
  }, props));
13872
13881
 
13873
13882
  function LastName({
@@ -13898,7 +13907,7 @@ function LastName({
13898
13907
  }
13899
13908
 
13900
13909
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
13901
- store: store$l
13910
+ store: store$m
13902
13911
  }, props));
13903
13912
 
13904
13913
  /**
@@ -14021,7 +14030,7 @@ function TextInput({
14021
14030
 
14022
14031
  const RegisterTextInput = props => {
14023
14032
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
14024
- store: store$l
14033
+ store: store$m
14025
14034
  }));
14026
14035
  };
14027
14036
 
@@ -21489,7 +21498,7 @@ class TapGateway {
21489
21498
 
21490
21499
  /** @type {PaymentStateType} */
21491
21500
 
21492
- const initialState$k = {
21501
+ const initialState$l = {
21493
21502
  disableSubmit: false,
21494
21503
  isLoading: false,
21495
21504
  disableCouponButton: false,
@@ -21514,10 +21523,10 @@ const initialState$k = {
21514
21523
  content: ""
21515
21524
  }
21516
21525
  };
21517
- const store$k = /*#__PURE__*/React.createContext(initialState$k);
21526
+ const store$l = /*#__PURE__*/React.createContext(initialState$l);
21518
21527
  const {
21519
- Provider: Provider$k
21520
- } = store$k;
21528
+ Provider: Provider$l
21529
+ } = store$l;
21521
21530
 
21522
21531
  const PaymentMethodContainerWithoutStripe = ({
21523
21532
  style,
@@ -23200,21 +23209,21 @@ const PaymentMethodContainerWithoutStripe = ({
23200
23209
  default:
23201
23210
  return state;
23202
23211
  }
23203
- }, initialState$k);
23212
+ }, initialState$l);
23204
23213
  return /*#__PURE__*/React__default['default'].createElement("div", {
23205
23214
  style: { ...style
23206
23215
  },
23207
23216
  className: `pelcro-container pelcro-payment-container ${className}`
23208
- }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
23217
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
23209
23218
  value: {
23210
23219
  state,
23211
23220
  dispatch
23212
23221
  }
23213
23222
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23214
- store: store$k,
23223
+ store: store$l,
23215
23224
  key: i
23216
23225
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23217
- store: store$k
23226
+ store: store$l
23218
23227
  })));
23219
23228
  };
23220
23229
 
@@ -23242,11 +23251,11 @@ const PaymentMethodContainer = props => {
23242
23251
  stripeAccount: window.Pelcro.site.read().account_id,
23243
23252
  locale: getPageOrDefaultLanguage()
23244
23253
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
23245
- store: store$k
23254
+ store: store$l
23246
23255
  }, props))));
23247
23256
  } else {
23248
23257
  return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainerWithoutStripe, Object.assign({
23249
- store: store$k
23258
+ store: store$l
23250
23259
  }, props));
23251
23260
  }
23252
23261
  };
@@ -23297,7 +23306,7 @@ const PelcroPaymentRequestButton = props => {
23297
23306
  currentPlan,
23298
23307
  updatedPrice
23299
23308
  }
23300
- } = React.useContext(store$k);
23309
+ } = React.useContext(store$l);
23301
23310
 
23302
23311
  const updatePaymentRequest = () => {
23303
23312
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -23379,7 +23388,7 @@ const DiscountedPrice = props => {
23379
23388
  taxAmount,
23380
23389
  percentOff
23381
23390
  }
23382
- } = React.useContext(store$k);
23391
+ } = React.useContext(store$l);
23383
23392
  const {
23384
23393
  order,
23385
23394
  plan
@@ -23429,7 +23438,7 @@ const SubmitPaymentMethod = ({
23429
23438
  isLoading,
23430
23439
  updatedPrice
23431
23440
  }
23432
- } = React.useContext(store$k);
23441
+ } = React.useContext(store$l);
23433
23442
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
23434
23443
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
23435
23444
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -23461,7 +23470,7 @@ const ApplyCouponButton = ({
23461
23470
  disableCouponButton
23462
23471
  },
23463
23472
  dispatch
23464
- } = React.useContext(store$k);
23473
+ } = React.useContext(store$l);
23465
23474
  const {
23466
23475
  t
23467
23476
  } = useTranslation("checkoutForm");
@@ -23495,7 +23504,7 @@ const CouponCodeField = props => {
23495
23504
  couponCode,
23496
23505
  couponError
23497
23506
  }
23498
- } = React.useContext(store$k);
23507
+ } = React.useContext(store$l);
23499
23508
 
23500
23509
  const onCouponCodeChange = e => {
23501
23510
  dispatch({
@@ -23551,7 +23560,7 @@ const CouponCode = ({
23551
23560
  state: {
23552
23561
  enableCouponField
23553
23562
  }
23554
- } = React.useContext(store$k);
23563
+ } = React.useContext(store$l);
23555
23564
  const {
23556
23565
  t
23557
23566
  } = useTranslation("checkoutForm");
@@ -23808,7 +23817,7 @@ const PaypalSubscribeButton = props => {
23808
23817
  const {
23809
23818
  dispatch,
23810
23819
  state
23811
- } = React.useContext(store$k);
23820
+ } = React.useContext(store$l);
23812
23821
  const {
23813
23822
  product,
23814
23823
  plan,
@@ -23941,7 +23950,7 @@ const SelectedPaymentMethod = () => {
23941
23950
  state: {
23942
23951
  isLoading
23943
23952
  }
23944
- } = React.useContext(store$k);
23953
+ } = React.useContext(store$l);
23945
23954
  const {
23946
23955
  switchView,
23947
23956
  selectedPaymentMethodId
@@ -23983,7 +23992,7 @@ const TaxAmount = () => {
23983
23992
  state: {
23984
23993
  taxAmount
23985
23994
  }
23986
- } = React.useContext(store$k);
23995
+ } = React.useContext(store$l);
23987
23996
  const {
23988
23997
  plan
23989
23998
  } = usePelcro();
@@ -24002,11 +24011,11 @@ const TaxAmount = () => {
24002
24011
  };
24003
24012
 
24004
24013
  const IncludeFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
24005
- store: store$k
24014
+ store: store$l
24006
24015
  }, props));
24007
24016
 
24008
24017
  const IncludeLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
24009
- store: store$k
24018
+ store: store$l
24010
24019
  }, props));
24011
24020
 
24012
24021
  function Phone({
@@ -24035,7 +24044,7 @@ function Phone({
24035
24044
  }
24036
24045
 
24037
24046
  const IncludePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
24038
- store: store$k
24047
+ store: store$l
24039
24048
  }, props));
24040
24049
 
24041
24050
  const SubscriptionCreateFreePlanButton = ({
@@ -24048,7 +24057,7 @@ const SubscriptionCreateFreePlanButton = ({
24048
24057
  disableSubmit
24049
24058
  },
24050
24059
  dispatch
24051
- } = React.useContext(store$k);
24060
+ } = React.useContext(store$l);
24052
24061
  const {
24053
24062
  t
24054
24063
  } = useTranslation("common");
@@ -24264,13 +24273,13 @@ function SubscriptionRenewModal({
24264
24273
  }
24265
24274
  SubscriptionRenewModal.viewId = "subscription-renew";
24266
24275
 
24267
- const initialState$j = {
24276
+ const initialState$k = {
24268
24277
  cancelationReason: ""
24269
24278
  };
24270
- const store$j = /*#__PURE__*/React.createContext(initialState$j);
24279
+ const store$k = /*#__PURE__*/React.createContext(initialState$k);
24271
24280
  const {
24272
- Provider: Provider$j
24273
- } = store$j;
24281
+ Provider: Provider$k
24282
+ } = store$k;
24274
24283
 
24275
24284
  const SubscriptionCancelContainer = ({
24276
24285
  style,
@@ -24291,21 +24300,21 @@ const SubscriptionCancelContainer = ({
24291
24300
  default:
24292
24301
  return state;
24293
24302
  }
24294
- }, initialState$j);
24303
+ }, initialState$k);
24295
24304
  return /*#__PURE__*/React__default['default'].createElement("div", {
24296
24305
  style: { ...style
24297
24306
  },
24298
24307
  className: `pelcro-container pelcro-subscription-cancel-container ${className}`
24299
- }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
24308
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
24300
24309
  value: {
24301
24310
  state,
24302
24311
  dispatch
24303
24312
  }
24304
24313
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24305
- store: store$j,
24314
+ store: store$k,
24306
24315
  key: i
24307
24316
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24308
- store: store$j
24317
+ store: store$k
24309
24318
  })));
24310
24319
  };
24311
24320
 
@@ -24390,7 +24399,7 @@ const SubscriptionCancelReason = props => {
24390
24399
  const {
24391
24400
  dispatch,
24392
24401
  state
24393
- } = React.useContext(store$j);
24402
+ } = React.useContext(store$k);
24394
24403
 
24395
24404
  const handleOnTextAreaBlur = e => {
24396
24405
  dispatch({
@@ -24438,7 +24447,7 @@ const SubscriptionCancelNowButton = ({
24438
24447
  cancelationReason
24439
24448
  },
24440
24449
  dispatch
24441
- } = React.useContext(store$j);
24450
+ } = React.useContext(store$k);
24442
24451
  const {
24443
24452
  t
24444
24453
  } = useTranslation("subscriptionCancel");
@@ -24510,7 +24519,7 @@ const SubscriptionCancelLaterButton = ({
24510
24519
  cancelationReason
24511
24520
  },
24512
24521
  dispatch
24513
- } = React.useContext(store$j);
24522
+ } = React.useContext(store$k);
24514
24523
  const {
24515
24524
  t
24516
24525
  } = useTranslation("subscriptionCancel");
@@ -24621,14 +24630,14 @@ const SubscriptionCancelModal = ({
24621
24630
  };
24622
24631
  SubscriptionCancelModal.viewId = "subscription-cancel";
24623
24632
 
24624
- const initialState$i = {
24633
+ const initialState$j = {
24625
24634
  suspendDate: null,
24626
24635
  buttonDisabled: false
24627
24636
  };
24628
- const store$i = /*#__PURE__*/React.createContext(initialState$i);
24637
+ const store$j = /*#__PURE__*/React.createContext(initialState$j);
24629
24638
  const {
24630
- Provider: Provider$i
24631
- } = store$i;
24639
+ Provider: Provider$j
24640
+ } = store$j;
24632
24641
 
24633
24642
  const SubscriptionSuspendContainer = ({
24634
24643
  style,
@@ -24654,21 +24663,21 @@ const SubscriptionSuspendContainer = ({
24654
24663
  default:
24655
24664
  return state;
24656
24665
  }
24657
- }, initialState$i);
24666
+ }, initialState$j);
24658
24667
  return /*#__PURE__*/React__default['default'].createElement("div", {
24659
24668
  style: { ...style
24660
24669
  },
24661
24670
  className: `pelcro-container pelcro-subscription-suspend-container ${className}`
24662
- }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
24671
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
24663
24672
  value: {
24664
24673
  state,
24665
24674
  dispatch
24666
24675
  }
24667
24676
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24668
- store: store$i,
24677
+ store: store$j,
24669
24678
  key: i
24670
24679
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24671
- store: store$i
24680
+ store: store$j
24672
24681
  })));
24673
24682
  };
24674
24683
 
@@ -24717,7 +24726,7 @@ const SubscriptionSuspendDate = props => {
24717
24726
  const {
24718
24727
  dispatch,
24719
24728
  state
24720
- } = React.useContext(store$i);
24729
+ } = React.useContext(store$j);
24721
24730
 
24722
24731
  const handleInputChange = value => {
24723
24732
  if (value) {
@@ -24759,7 +24768,7 @@ const SubscriptionSuspendButton = ({
24759
24768
  buttonDisabled
24760
24769
  },
24761
24770
  dispatch
24762
- } = React.useContext(store$i);
24771
+ } = React.useContext(store$j);
24763
24772
  const {
24764
24773
  t
24765
24774
  } = useTranslation("subscriptionSuspend");
@@ -25229,7 +25238,7 @@ class DefaultNewsLetter extends React.Component {
25229
25238
 
25230
25239
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
25231
25240
 
25232
- const initialState$h = {
25241
+ const initialState$i = {
25233
25242
  didSubToNewslettersBefore: false,
25234
25243
  newsletters: [],
25235
25244
  isListLoading: true,
@@ -25239,10 +25248,10 @@ const initialState$h = {
25239
25248
  content: ""
25240
25249
  }
25241
25250
  };
25242
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
25251
+ const store$i = /*#__PURE__*/React.createContext(initialState$i);
25243
25252
  const {
25244
- Provider: Provider$h
25245
- } = store$h;
25253
+ Provider: Provider$i
25254
+ } = store$i;
25246
25255
 
25247
25256
  const NewsletterUpdateContainer = ({
25248
25257
  style,
@@ -25355,7 +25364,7 @@ const NewsletterUpdateContainer = ({
25355
25364
  default:
25356
25365
  return state;
25357
25366
  }
25358
- }, initialState$h);
25367
+ }, initialState$i);
25359
25368
  React.useEffect(() => {
25360
25369
  const getUserNewsletters = () => {
25361
25370
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -25399,7 +25408,7 @@ const NewsletterUpdateContainer = ({
25399
25408
  style: { ...style
25400
25409
  },
25401
25410
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
25402
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
25411
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
25403
25412
  value: {
25404
25413
  state,
25405
25414
  dispatch
@@ -25407,12 +25416,12 @@ const NewsletterUpdateContainer = ({
25407
25416
  }, children.length ? children.map((child, i) => {
25408
25417
  if (child) {
25409
25418
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
25410
- store: store$h,
25419
+ store: store$i,
25411
25420
  key: i
25412
25421
  });
25413
25422
  }
25414
25423
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25415
- store: store$h
25424
+ store: store$i
25416
25425
  })));
25417
25426
  };
25418
25427
 
@@ -25427,7 +25436,7 @@ const NewsletterUpdateButton = ({
25427
25436
  isSubmitting,
25428
25437
  isListLoading
25429
25438
  }
25430
- } = React.useContext(store$h);
25439
+ } = React.useContext(store$i);
25431
25440
  const {
25432
25441
  t
25433
25442
  } = useTranslation("newsletter");
@@ -25457,7 +25466,7 @@ const NewsletterUpdateList = () => {
25457
25466
  newsletters,
25458
25467
  isListLoading
25459
25468
  }
25460
- } = React.useContext(store$h);
25469
+ } = React.useContext(store$i);
25461
25470
 
25462
25471
  if (isListLoading) {
25463
25472
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -25670,7 +25679,7 @@ function SubscriptionCreateModal({
25670
25679
  }
25671
25680
  SubscriptionCreateModal.viewId = "subscription-create";
25672
25681
 
25673
- const initialState$g = {
25682
+ const initialState$h = {
25674
25683
  emails: "",
25675
25684
  emailsError: null,
25676
25685
  buttonDisabled: false,
@@ -25682,10 +25691,10 @@ const initialState$g = {
25682
25691
  content: ""
25683
25692
  }
25684
25693
  };
25685
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
25694
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
25686
25695
  const {
25687
- Provider: Provider$g
25688
- } = store$g;
25696
+ Provider: Provider$h
25697
+ } = store$h;
25689
25698
 
25690
25699
  const SubscriptionManageMembersContainer = ({
25691
25700
  style,
@@ -25857,7 +25866,7 @@ const SubscriptionManageMembersContainer = ({
25857
25866
  default:
25858
25867
  return state;
25859
25868
  }
25860
- }, initialState$g);
25869
+ }, initialState$h);
25861
25870
  React.useEffect(() => {
25862
25871
  dispatch({
25863
25872
  type: HANDLE_LIST_MEMBERS
@@ -25867,7 +25876,7 @@ const SubscriptionManageMembersContainer = ({
25867
25876
  style: { ...style
25868
25877
  },
25869
25878
  className: `pelcro-container pelcro-manage-members-container ${className}`
25870
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
25879
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
25871
25880
  value: {
25872
25881
  state,
25873
25882
  dispatch
@@ -25875,12 +25884,12 @@ const SubscriptionManageMembersContainer = ({
25875
25884
  }, children.length ? children.map((child, i) => {
25876
25885
  if (child) {
25877
25886
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
25878
- store: store$g,
25887
+ store: store$h,
25879
25888
  key: i
25880
25889
  });
25881
25890
  }
25882
25891
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25883
- store: store$g
25892
+ store: store$h
25884
25893
  })));
25885
25894
  };
25886
25895
 
@@ -25896,7 +25905,7 @@ const SubscriptionManageMembersButton = ({
25896
25905
  buttonDisabled
25897
25906
  },
25898
25907
  dispatch
25899
- } = React.useContext(store$g);
25908
+ } = React.useContext(store$h);
25900
25909
  const {
25901
25910
  t
25902
25911
  } = useTranslation("subscriptionManageMembers");
@@ -25926,7 +25935,7 @@ function SubscriptionManageMembersEmails(props) {
25926
25935
  emails: stateEmails,
25927
25936
  emailsError
25928
25937
  }
25929
- } = React.useContext(store$g);
25938
+ } = React.useContext(store$h);
25930
25939
  const [emails, setEmails] = React.useState(stateEmails);
25931
25940
  const [finishedTyping, setFinishedTyping] = React.useState(false);
25932
25941
  const handleInputChange = React.useCallback(value => {
@@ -25985,7 +25994,7 @@ function SubscriptionManageMembersList(props) {
25985
25994
  removeMemberId,
25986
25995
  loading
25987
25996
  }
25988
- } = React.useContext(store$g);
25997
+ } = React.useContext(store$h);
25989
25998
  const getMemberStatus = React.useCallback(sub => {
25990
25999
  if (sub.status === "pending") {
25991
26000
  return {
@@ -26148,11 +26157,11 @@ function SubscriptionManageMembersModal({
26148
26157
  }
26149
26158
  SubscriptionManageMembersModal.viewId = "manage-members";
26150
26159
 
26151
- var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
26152
- const initialState$f = {
26153
- email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
26160
+ var _window$Pelcro$user$r$1, _window$Pelcro$user$r2$1, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
26161
+ const initialState$g = {
26162
+ email: (_window$Pelcro$user$r$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r$1 === void 0 ? void 0 : _window$Pelcro$user$r$1.email,
26154
26163
  emailError: null,
26155
- firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
26164
+ firstName: (_window$Pelcro$user$r2$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2$1 === void 0 ? void 0 : _window$Pelcro$user$r2$1.first_name,
26156
26165
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
26157
26166
  lastNameError: null,
26158
26167
  username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
@@ -26166,10 +26175,10 @@ const initialState$f = {
26166
26175
  content: ""
26167
26176
  }
26168
26177
  };
26169
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
26178
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
26170
26179
  const {
26171
- Provider: Provider$f
26172
- } = store$f;
26180
+ Provider: Provider$g
26181
+ } = store$g;
26173
26182
 
26174
26183
  const UserUpdateContainer = ({
26175
26184
  style,
@@ -26336,12 +26345,12 @@ const UserUpdateContainer = ({
26336
26345
  default:
26337
26346
  return state;
26338
26347
  }
26339
- }, initialState$f);
26348
+ }, initialState$g);
26340
26349
  return /*#__PURE__*/React__default['default'].createElement("div", {
26341
26350
  style: { ...style
26342
26351
  },
26343
26352
  className: `pelcro-container pelcro-user-update-container ${className}`
26344
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
26353
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
26345
26354
  value: {
26346
26355
  state,
26347
26356
  dispatch
@@ -26349,12 +26358,12 @@ const UserUpdateContainer = ({
26349
26358
  }, children.length ? children.map((child, i) => {
26350
26359
  if (child) {
26351
26360
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
26352
- store: store$f,
26361
+ store: store$g,
26353
26362
  key: i
26354
26363
  });
26355
26364
  }
26356
26365
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
26357
- store: store$f
26366
+ store: store$g
26358
26367
  })));
26359
26368
  };
26360
26369
 
@@ -26380,7 +26389,7 @@ const UserUpdateEmail = props => {
26380
26389
  email,
26381
26390
  emailError
26382
26391
  }
26383
- } = React.useContext(store$f);
26392
+ } = React.useContext(store$g);
26384
26393
  const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
26385
26394
  const {
26386
26395
  t
@@ -26406,7 +26415,7 @@ const UserUpdateEmail = props => {
26406
26415
  className: "plc-flex plc-items-start plc-relative"
26407
26416
  }, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
26408
26417
  disabled: !enableEmailEdit,
26409
- store: store$f,
26418
+ store: store$g,
26410
26419
  label: t("labels.email"),
26411
26420
  enableEmailEdit: enableEmailEdit
26412
26421
  }, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
@@ -26431,7 +26440,7 @@ const UserUpdateButton = ({
26431
26440
  emailError
26432
26441
  },
26433
26442
  dispatch
26434
- } = React.useContext(store$f);
26443
+ } = React.useContext(store$g);
26435
26444
  const {
26436
26445
  t
26437
26446
  } = useTranslation("userEdit");
@@ -26522,19 +26531,19 @@ function UpdateUserNameInput({
26522
26531
  }
26523
26532
 
26524
26533
  const UserUpdateUsername = props => /*#__PURE__*/React__default['default'].createElement(UpdateUserNameInput, Object.assign({
26525
- store: store$f
26534
+ store: store$g
26526
26535
  }, props));
26527
26536
 
26528
26537
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
26529
- store: store$f
26538
+ store: store$g
26530
26539
  }, props));
26531
26540
 
26532
26541
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
26533
- store: store$f
26542
+ store: store$g
26534
26543
  }, props));
26535
26544
 
26536
26545
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
26537
- store: store$f
26546
+ store: store$g
26538
26547
  }, props));
26539
26548
 
26540
26549
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
@@ -26621,7 +26630,7 @@ function Tin({
26621
26630
  }
26622
26631
 
26623
26632
  const UserUpdateTin = props => /*#__PURE__*/React__default['default'].createElement(Tin, Object.assign({
26624
- store: store$f
26633
+ store: store$g
26625
26634
  }, props));
26626
26635
 
26627
26636
  function DisplayName({
@@ -26652,7 +26661,7 @@ function DisplayName({
26652
26661
  }
26653
26662
 
26654
26663
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
26655
- store: store$f
26664
+ store: store$g
26656
26665
  }, props));
26657
26666
 
26658
26667
  const UserUpdateView = props => {
@@ -26747,11 +26756,11 @@ UserUpdateModal.viewId = "user-edit";
26747
26756
 
26748
26757
  const UserUpdateTextInput = props => {
26749
26758
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
26750
- store: store$f
26759
+ store: store$g
26751
26760
  }));
26752
26761
  };
26753
26762
 
26754
- const initialState$e = {
26763
+ const initialState$f = {
26755
26764
  isSubmitting: false,
26756
26765
  firstName: "",
26757
26766
  firstNameError: "",
@@ -26777,10 +26786,10 @@ const initialState$e = {
26777
26786
  content: ""
26778
26787
  }
26779
26788
  };
26780
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
26789
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
26781
26790
  const {
26782
- Provider: Provider$e
26783
- } = store$e;
26791
+ Provider: Provider$f
26792
+ } = store$f;
26784
26793
 
26785
26794
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
26786
26795
 
@@ -27027,7 +27036,7 @@ const AddressCreateContainer = ({
27027
27036
  default:
27028
27037
  return state;
27029
27038
  }
27030
- }, initialState$e);
27039
+ }, initialState$f);
27031
27040
  React.useEffect(() => {
27032
27041
  const getStates = () => {
27033
27042
  dispatch({
@@ -27059,16 +27068,16 @@ const AddressCreateContainer = ({
27059
27068
  style: { ...style
27060
27069
  },
27061
27070
  className: `pelcro-container pelcro-address-create-container ${className}`
27062
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
27071
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
27063
27072
  value: {
27064
27073
  state,
27065
27074
  dispatch
27066
27075
  }
27067
27076
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27068
- store: store$e,
27077
+ store: store$f,
27069
27078
  key: i
27070
27079
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27071
- store: store$e
27080
+ store: store$f
27072
27081
  })));
27073
27082
  };
27074
27083
 
@@ -27079,7 +27088,7 @@ function AddressCreateFirstName(props) {
27079
27088
  firstName,
27080
27089
  firstNameError
27081
27090
  }
27082
- } = React.useContext(store$e);
27091
+ } = React.useContext(store$f);
27083
27092
 
27084
27093
  const handleInputChange = value => {
27085
27094
  dispatch({
@@ -27115,7 +27124,7 @@ function AddressCreateLastName(props) {
27115
27124
  lastName,
27116
27125
  lastNameError
27117
27126
  }
27118
- } = React.useContext(store$e);
27127
+ } = React.useContext(store$f);
27119
27128
 
27120
27129
  const handleInputChange = value => {
27121
27130
  dispatch({
@@ -27150,7 +27159,7 @@ function AddressCreateLine1(props) {
27150
27159
  line1,
27151
27160
  line1Error
27152
27161
  }
27153
- } = React.useContext(store$e);
27162
+ } = React.useContext(store$f);
27154
27163
 
27155
27164
  const handleBlur = () => {
27156
27165
  return dispatch({
@@ -27193,7 +27202,7 @@ function AddressCreateCity(props) {
27193
27202
  city,
27194
27203
  cityError
27195
27204
  }
27196
- } = React.useContext(store$e);
27205
+ } = React.useContext(store$f);
27197
27206
 
27198
27207
  const handleInputChange = value => {
27199
27208
  dispatch({
@@ -27228,7 +27237,7 @@ function AddressCreatePostalCode(props) {
27228
27237
  postalCode,
27229
27238
  postalCodeError
27230
27239
  }
27231
- } = React.useContext(store$e);
27240
+ } = React.useContext(store$f);
27232
27241
 
27233
27242
  const handleInputChange = value => {
27234
27243
  dispatch({
@@ -27266,7 +27275,7 @@ const AddressCreateSubmit = ({
27266
27275
  state: {
27267
27276
  isSubmitting
27268
27277
  }
27269
- } = React.useContext(store$e);
27278
+ } = React.useContext(store$f);
27270
27279
  const {
27271
27280
  t
27272
27281
  } = useTranslation("address");
@@ -27379,7 +27388,7 @@ function CountrySelect({
27379
27388
  }
27380
27389
 
27381
27390
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
27382
- store: store$e
27391
+ store: store$f
27383
27392
  }, props));
27384
27393
 
27385
27394
  function StateSelect({
@@ -27468,14 +27477,14 @@ function StateSelect({
27468
27477
  }
27469
27478
 
27470
27479
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
27471
- store: store$e
27480
+ store: store$f
27472
27481
  }, props));
27473
27482
 
27474
27483
  const AddressCreateSetDefault = props => {
27475
27484
  const {
27476
27485
  dispatch,
27477
27486
  state
27478
- } = React.useContext(store$e);
27487
+ } = React.useContext(store$f);
27479
27488
 
27480
27489
  const handleCheckboxChange = e => {
27481
27490
  dispatch({
@@ -27610,18 +27619,18 @@ AddressCreateModal.viewId = "address-create";
27610
27619
 
27611
27620
  const AddressCreateTextInput = props => {
27612
27621
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
27613
- store: store$e
27622
+ store: store$f
27614
27623
  }));
27615
27624
  };
27616
27625
 
27617
27626
  const AddressCreateLine2 = props => {
27618
27627
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
27619
27628
  fieldName: "line2",
27620
- store: store$e
27629
+ store: store$f
27621
27630
  }, props));
27622
27631
  };
27623
27632
 
27624
- const initialState$d = {
27633
+ const initialState$e = {
27625
27634
  isSubmitting: false,
27626
27635
  firstName: "",
27627
27636
  firstNameError: "",
@@ -27647,10 +27656,10 @@ const initialState$d = {
27647
27656
  content: ""
27648
27657
  }
27649
27658
  };
27650
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
27659
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
27651
27660
  const {
27652
- Provider: Provider$d
27653
- } = store$d;
27661
+ Provider: Provider$e
27662
+ } = store$e;
27654
27663
 
27655
27664
  const AddressUpdateContainer = ({
27656
27665
  style,
@@ -27702,7 +27711,7 @@ const AddressUpdateContainer = ({
27702
27711
  const thisAddress = addresses[address];
27703
27712
 
27704
27713
  if (+thisAddress.id === +addressId) {
27705
- const newState = { ...initialState$d,
27714
+ const newState = { ...initialState$e,
27706
27715
  firstName: thisAddress.first_name,
27707
27716
  lastName: thisAddress.last_name,
27708
27717
  line1: thisAddress.line1,
@@ -27843,7 +27852,7 @@ const AddressUpdateContainer = ({
27843
27852
  default:
27844
27853
  return state;
27845
27854
  }
27846
- }, initialState$d);
27855
+ }, initialState$e);
27847
27856
  React.useEffect(() => {
27848
27857
  const getStates = () => {
27849
27858
  dispatch({
@@ -27875,21 +27884,21 @@ const AddressUpdateContainer = ({
27875
27884
  style: { ...style
27876
27885
  },
27877
27886
  className: `pelcro-container pelcro-address-update-container ${className}`
27878
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
27887
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
27879
27888
  value: {
27880
27889
  state,
27881
27890
  dispatch
27882
27891
  }
27883
27892
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27884
- store: store$d,
27893
+ store: store$e,
27885
27894
  key: i
27886
27895
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27887
- store: store$d
27896
+ store: store$e
27888
27897
  })));
27889
27898
  };
27890
27899
 
27891
27900
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
27892
- store: store$d
27901
+ store: store$e
27893
27902
  }, props));
27894
27903
 
27895
27904
  function AddressUpdateFirstName(props) {
@@ -27899,7 +27908,7 @@ function AddressUpdateFirstName(props) {
27899
27908
  firstName,
27900
27909
  firstNameError
27901
27910
  }
27902
- } = React.useContext(store$d);
27911
+ } = React.useContext(store$e);
27903
27912
 
27904
27913
  const handleBlur = () => {
27905
27914
  return dispatch({
@@ -27942,7 +27951,7 @@ function AddressUpdateLastName(props) {
27942
27951
  lastName,
27943
27952
  lastNameError
27944
27953
  }
27945
- } = React.useContext(store$d);
27954
+ } = React.useContext(store$e);
27946
27955
 
27947
27956
  const handleBlur = () => {
27948
27957
  return dispatch({
@@ -27985,7 +27994,7 @@ function AddressUpdateLine1(props) {
27985
27994
  line1,
27986
27995
  line1Error
27987
27996
  }
27988
- } = React.useContext(store$d);
27997
+ } = React.useContext(store$e);
27989
27998
 
27990
27999
  const handleBlur = () => {
27991
28000
  return dispatch({
@@ -28025,7 +28034,7 @@ const AddressUpdateLine2 = props => {
28025
28034
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
28026
28035
  fieldName: "line2"
28027
28036
  }, props, {
28028
- store: store$d
28037
+ store: store$e
28029
28038
  }));
28030
28039
  };
28031
28040
 
@@ -28036,7 +28045,7 @@ function AddressUpdateCity(props) {
28036
28045
  city,
28037
28046
  cityError
28038
28047
  }
28039
- } = React.useContext(store$d);
28048
+ } = React.useContext(store$e);
28040
28049
 
28041
28050
  const handleBlur = () => {
28042
28051
  return dispatch({
@@ -28079,7 +28088,7 @@ function AddressUpdatePostalCode(props) {
28079
28088
  postalCode,
28080
28089
  postalCodeError
28081
28090
  }
28082
- } = React.useContext(store$d);
28091
+ } = React.useContext(store$e);
28083
28092
 
28084
28093
  const handleBlur = () => {
28085
28094
  return dispatch({
@@ -28125,7 +28134,7 @@ const AddressUpdateSubmit = ({
28125
28134
  state: {
28126
28135
  isSubmitting
28127
28136
  }
28128
- } = React.useContext(store$d);
28137
+ } = React.useContext(store$e);
28129
28138
  const {
28130
28139
  t
28131
28140
  } = useTranslation("address");
@@ -28141,7 +28150,7 @@ const AddressUpdateSubmit = ({
28141
28150
  };
28142
28151
 
28143
28152
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
28144
- store: store$d
28153
+ store: store$e
28145
28154
  }, props));
28146
28155
 
28147
28156
  function AddressUpdateSetDefault(props) {
@@ -28150,7 +28159,7 @@ function AddressUpdateSetDefault(props) {
28150
28159
  state: {
28151
28160
  isDefault
28152
28161
  }
28153
- } = React.useContext(store$d);
28162
+ } = React.useContext(store$e);
28154
28163
 
28155
28164
  const handleCheckboxChange = e => {
28156
28165
  dispatch({
@@ -28258,7 +28267,7 @@ AddressUpdateModal.viewId = "address-edit";
28258
28267
 
28259
28268
  const AddressUpdateTextInput = props => {
28260
28269
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
28261
- store: store$d
28270
+ store: store$e
28262
28271
  }));
28263
28272
  };
28264
28273
 
@@ -28340,7 +28349,7 @@ const PaymentMethodUpdateModal = props => {
28340
28349
  };
28341
28350
  PaymentMethodUpdateModal.viewId = "payment-method-update";
28342
28351
 
28343
- const initialState$c = {
28352
+ const initialState$d = {
28344
28353
  email: "",
28345
28354
  password: "",
28346
28355
  passwordError: null,
@@ -28353,10 +28362,10 @@ const initialState$c = {
28353
28362
  content: ""
28354
28363
  }
28355
28364
  };
28356
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
28365
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
28357
28366
  const {
28358
- Provider: Provider$c
28359
- } = store$c;
28367
+ Provider: Provider$d
28368
+ } = store$d;
28360
28369
 
28361
28370
  const PasswordResetContainer = ({
28362
28371
  style,
@@ -28413,7 +28422,7 @@ const PasswordResetContainer = ({
28413
28422
  type: SET_EMAIL,
28414
28423
  payload: window.Pelcro.helpers.getURLParameter("email")
28415
28424
  });
28416
- initialState$c.email = window.Pelcro.helpers.getURLParameter("email");
28425
+ initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
28417
28426
  dispatch({
28418
28427
  type: SET_TOKEN,
28419
28428
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -28473,26 +28482,26 @@ const PasswordResetContainer = ({
28473
28482
  default:
28474
28483
  return state;
28475
28484
  }
28476
- }, initialState$c);
28485
+ }, initialState$d);
28477
28486
  return /*#__PURE__*/React__default['default'].createElement("div", {
28478
28487
  style: { ...style
28479
28488
  },
28480
28489
  className: `pelcro-container pelcro-password-reset-container ${className}`
28481
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
28490
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
28482
28491
  value: {
28483
28492
  state,
28484
28493
  dispatch
28485
28494
  }
28486
28495
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28487
- store: store$c,
28496
+ store: store$d,
28488
28497
  key: i
28489
28498
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28490
- store: store$c
28499
+ store: store$d
28491
28500
  })));
28492
28501
  };
28493
28502
 
28494
28503
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
28495
- store: store$c
28504
+ store: store$d
28496
28505
  }, props));
28497
28506
 
28498
28507
  const PasswordResetButton = ({
@@ -28505,7 +28514,7 @@ const PasswordResetButton = ({
28505
28514
  buttonDisabled
28506
28515
  },
28507
28516
  dispatch
28508
- } = React.useContext(store$c);
28517
+ } = React.useContext(store$d);
28509
28518
  const {
28510
28519
  t
28511
28520
  } = useTranslation("passwordReset");
@@ -28522,14 +28531,14 @@ const PasswordResetButton = ({
28522
28531
  };
28523
28532
 
28524
28533
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28525
- store: store$c
28534
+ store: store$d
28526
28535
  }, props, {
28527
28536
  value: window.Pelcro.helpers.getURLParameter("email"),
28528
28537
  disabled: true
28529
28538
  }));
28530
28539
 
28531
28540
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
28532
- store: store$c
28541
+ store: store$d
28533
28542
  }, props));
28534
28543
 
28535
28544
  const PasswordResetView = props => {
@@ -28584,7 +28593,7 @@ const PasswordResetModal = ({
28584
28593
  };
28585
28594
  PasswordResetModal.viewId = "password-reset";
28586
28595
 
28587
- const initialState$b = {
28596
+ const initialState$c = {
28588
28597
  email: "",
28589
28598
  emailError: null,
28590
28599
  buttonDisabled: false,
@@ -28593,10 +28602,10 @@ const initialState$b = {
28593
28602
  content: ""
28594
28603
  }
28595
28604
  };
28596
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
28605
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
28597
28606
  const {
28598
- Provider: Provider$b
28599
- } = store$b;
28607
+ Provider: Provider$c
28608
+ } = store$c;
28600
28609
 
28601
28610
  const PasswordForgotContainer = ({
28602
28611
  style,
@@ -28674,21 +28683,21 @@ const PasswordForgotContainer = ({
28674
28683
  default:
28675
28684
  return state;
28676
28685
  }
28677
- }, initialState$b);
28686
+ }, initialState$c);
28678
28687
  return /*#__PURE__*/React__default['default'].createElement("div", {
28679
28688
  style: { ...style
28680
28689
  },
28681
28690
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28682
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
28691
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
28683
28692
  value: {
28684
28693
  state,
28685
28694
  dispatch
28686
28695
  }
28687
28696
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28688
- store: store$b,
28697
+ store: store$c,
28689
28698
  key: i
28690
28699
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28691
- store: store$b
28700
+ store: store$c
28692
28701
  })));
28693
28702
  };
28694
28703
 
@@ -28704,7 +28713,7 @@ const PasswordForgotButton = ({
28704
28713
  emailError
28705
28714
  },
28706
28715
  dispatch
28707
- } = React.useContext(store$b);
28716
+ } = React.useContext(store$c);
28708
28717
  const {
28709
28718
  t
28710
28719
  } = useTranslation("passwordForgot");
@@ -28725,7 +28734,7 @@ const PasswordForgotButton = ({
28725
28734
  };
28726
28735
 
28727
28736
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28728
- store: store$b
28737
+ store: store$c
28729
28738
  }, props));
28730
28739
 
28731
28740
  const PasswordForgotView = props => {
@@ -28779,7 +28788,7 @@ const PasswordForgotModal = ({
28779
28788
  };
28780
28789
  PasswordForgotModal.viewId = "password-forgot";
28781
28790
 
28782
- const initialState$a = {
28791
+ const initialState$b = {
28783
28792
  email: "",
28784
28793
  emailError: null,
28785
28794
  buttonDisabled: false,
@@ -28788,10 +28797,10 @@ const initialState$a = {
28788
28797
  content: ""
28789
28798
  }
28790
28799
  };
28791
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
28800
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
28792
28801
  const {
28793
- Provider: Provider$a
28794
- } = store$a;
28802
+ Provider: Provider$b
28803
+ } = store$b;
28795
28804
 
28796
28805
  const PasswordlessRequestContainer = ({
28797
28806
  style,
@@ -28869,21 +28878,21 @@ const PasswordlessRequestContainer = ({
28869
28878
  default:
28870
28879
  return state;
28871
28880
  }
28872
- }, initialState$a);
28881
+ }, initialState$b);
28873
28882
  return /*#__PURE__*/React__default['default'].createElement("div", {
28874
28883
  style: { ...style
28875
28884
  },
28876
28885
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28877
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
28886
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
28878
28887
  value: {
28879
28888
  state,
28880
28889
  dispatch
28881
28890
  }
28882
28891
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28883
- store: store$a,
28892
+ store: store$b,
28884
28893
  key: i
28885
28894
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28886
- store: store$a
28895
+ store: store$b
28887
28896
  })));
28888
28897
  };
28889
28898
 
@@ -28899,7 +28908,7 @@ const PasswordlessRequestViewButton = ({
28899
28908
  emailError
28900
28909
  },
28901
28910
  dispatch
28902
- } = React.useContext(store$a);
28911
+ } = React.useContext(store$b);
28903
28912
  const {
28904
28913
  t
28905
28914
  } = useTranslation("passwordlessRequest");
@@ -28920,7 +28929,7 @@ const PasswordlessRequestViewButton = ({
28920
28929
  };
28921
28930
 
28922
28931
  const PasswordlessRequestEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28923
- store: store$a
28932
+ store: store$b
28924
28933
  }, props));
28925
28934
 
28926
28935
  const PasswordlessRequestView = props => {
@@ -28964,7 +28973,7 @@ const PasswordlessRequestModal = ({
28964
28973
  };
28965
28974
  PasswordlessRequestModal.viewId = "passwordless-request";
28966
28975
 
28967
- const initialState$9 = {
28976
+ const initialState$a = {
28968
28977
  currentPassword: "",
28969
28978
  newPassword: "",
28970
28979
  confirmNewPassword: "",
@@ -28978,10 +28987,10 @@ const initialState$9 = {
28978
28987
  content: ""
28979
28988
  }
28980
28989
  };
28981
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
28990
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
28982
28991
  const {
28983
- Provider: Provider$9
28984
- } = store$9;
28992
+ Provider: Provider$a
28993
+ } = store$a;
28985
28994
  const PasswordChangeContainer = ({
28986
28995
  style,
28987
28996
  className = "",
@@ -29133,21 +29142,21 @@ const PasswordChangeContainer = ({
29133
29142
  default:
29134
29143
  return state;
29135
29144
  }
29136
- }, initialState$9);
29145
+ }, initialState$a);
29137
29146
  return /*#__PURE__*/React__default['default'].createElement("div", {
29138
29147
  style: { ...style
29139
29148
  },
29140
29149
  className: `pelcro-container pelcro-password-change-container ${className}`
29141
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
29150
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
29142
29151
  value: {
29143
29152
  state,
29144
29153
  dispatch
29145
29154
  }
29146
29155
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29147
- store: store$9,
29156
+ store: store$a,
29148
29157
  key: i
29149
29158
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
29150
- store: store$9
29159
+ store: store$a
29151
29160
  })));
29152
29161
  };
29153
29162
 
@@ -29158,7 +29167,7 @@ function PasswordChangeCurrentPassword(props) {
29158
29167
  currentPassword,
29159
29168
  currentPasswordError
29160
29169
  }
29161
- } = React.useContext(store$9);
29170
+ } = React.useContext(store$a);
29162
29171
  const handleBlur = React.useCallback(() => {
29163
29172
  return dispatch({
29164
29173
  type: VALIDATE_PASSWORD
@@ -29192,7 +29201,7 @@ function PasswordChangeNewPassword(props) {
29192
29201
  newPassword,
29193
29202
  newPasswordError
29194
29203
  }
29195
- } = React.useContext(store$9);
29204
+ } = React.useContext(store$a);
29196
29205
  const handleBlur = React.useCallback(() => {
29197
29206
  return dispatch({
29198
29207
  type: VALIDATE_NEW_PASSWORD
@@ -29226,7 +29235,7 @@ function PasswordChangeConfirmNewPassword(props) {
29226
29235
  confirmNewPassword,
29227
29236
  confirmNewPasswordError
29228
29237
  }
29229
- } = React.useContext(store$9);
29238
+ } = React.useContext(store$a);
29230
29239
  const handleBlur = React.useCallback(() => {
29231
29240
  return dispatch({
29232
29241
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -29267,7 +29276,7 @@ const PasswordChangeButton = ({
29267
29276
  confirmNewPasswordError
29268
29277
  },
29269
29278
  dispatch
29270
- } = React.useContext(store$9);
29279
+ } = React.useContext(store$a);
29271
29280
  const {
29272
29281
  t
29273
29282
  } = useTranslation("passwordChange");
@@ -29336,17 +29345,17 @@ const PasswordChangeModal = ({
29336
29345
  };
29337
29346
  PasswordChangeModal.viewId = "password-change";
29338
29347
 
29339
- const initialState$8 = {
29348
+ const initialState$9 = {
29340
29349
  buttonDisabled: false,
29341
29350
  alert: {
29342
29351
  type: "error",
29343
29352
  content: ""
29344
29353
  }
29345
29354
  };
29346
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
29355
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
29347
29356
  const {
29348
- Provider: Provider$8
29349
- } = store$8;
29357
+ Provider: Provider$9
29358
+ } = store$9;
29350
29359
 
29351
29360
  const CartContainer = ({
29352
29361
  style,
@@ -29437,21 +29446,21 @@ const CartContainer = ({
29437
29446
  default:
29438
29447
  return state;
29439
29448
  }
29440
- }, initialState$8);
29449
+ }, initialState$9);
29441
29450
  return /*#__PURE__*/React__default['default'].createElement("div", {
29442
29451
  style: { ...style
29443
29452
  },
29444
29453
  className: `pelcro-container pelcro-cart-container ${className}`
29445
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
29454
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
29446
29455
  value: {
29447
29456
  state,
29448
29457
  dispatch
29449
29458
  }
29450
29459
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29451
- store: store$8,
29460
+ store: store$9,
29452
29461
  key: i
29453
29462
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
29454
- store: store$8
29463
+ store: store$9
29455
29464
  })));
29456
29465
  };
29457
29466
 
@@ -29490,7 +29499,7 @@ const CartSubmit = ({
29490
29499
  buttonDisabled
29491
29500
  },
29492
29501
  dispatch
29493
- } = React.useContext(store$8);
29502
+ } = React.useContext(store$9);
29494
29503
  const {
29495
29504
  t
29496
29505
  } = useTranslation("cart");
@@ -29524,7 +29533,7 @@ const CartTotalPrice = () => {
29524
29533
  state: {
29525
29534
  alert
29526
29535
  }
29527
- } = React.useContext(store$8);
29536
+ } = React.useContext(store$9);
29528
29537
  const {
29529
29538
  cartItems
29530
29539
  } = usePelcro();
@@ -29848,7 +29857,7 @@ const OrderConfirmModal = props => {
29848
29857
  };
29849
29858
  OrderConfirmModal.viewId = "order-confirm";
29850
29859
 
29851
- const initialState$7 = {
29860
+ const initialState$8 = {
29852
29861
  email: "",
29853
29862
  firstName: "",
29854
29863
  lastName: "",
@@ -29860,10 +29869,10 @@ const initialState$7 = {
29860
29869
  content: ""
29861
29870
  }
29862
29871
  };
29863
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
29872
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
29864
29873
  const {
29865
- Provider: Provider$7
29866
- } = store$7;
29874
+ Provider: Provider$8
29875
+ } = store$8;
29867
29876
 
29868
29877
  const GiftCreateContainer = ({
29869
29878
  style,
@@ -29967,21 +29976,21 @@ const GiftCreateContainer = ({
29967
29976
  default:
29968
29977
  return state;
29969
29978
  }
29970
- }, initialState$7);
29979
+ }, initialState$8);
29971
29980
  return /*#__PURE__*/React__default['default'].createElement("div", {
29972
29981
  style: { ...style
29973
29982
  },
29974
29983
  className: `pelcro-container pelcro-gift-create-container ${className}`
29975
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
29984
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
29976
29985
  value: {
29977
29986
  state,
29978
29987
  dispatch
29979
29988
  }
29980
29989
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29981
- store: store$7,
29990
+ store: store$8,
29982
29991
  key: i
29983
29992
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
29984
- store: store$7
29993
+ store: store$8
29985
29994
  })));
29986
29995
  };
29987
29996
 
@@ -29995,7 +30004,7 @@ const GiftCreateSubmitButton = ({
29995
30004
  state: {
29996
30005
  disableSubmit
29997
30006
  }
29998
- } = React.useContext(store$7);
30007
+ } = React.useContext(store$8);
29999
30008
  const {
30000
30009
  t
30001
30010
  } = useTranslation("register");
@@ -30012,15 +30021,15 @@ const GiftCreateSubmitButton = ({
30012
30021
 
30013
30022
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
30014
30023
  initWithUserEmail: false,
30015
- store: store$7
30024
+ store: store$8
30016
30025
  }, props));
30017
30026
 
30018
30027
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
30019
- store: store$7
30028
+ store: store$8
30020
30029
  }, props));
30021
30030
 
30022
30031
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
30023
- store: store$7
30032
+ store: store$8
30024
30033
  }, props));
30025
30034
 
30026
30035
  const nowDate = new Date();
@@ -30035,7 +30044,7 @@ const GiftCreateStartDate = props => {
30035
30044
  const {
30036
30045
  dispatch,
30037
30046
  state
30038
- } = React.useContext(store$7);
30047
+ } = React.useContext(store$8);
30039
30048
 
30040
30049
  const handleInputChange = value => {
30041
30050
  dispatch({
@@ -30070,7 +30079,7 @@ function GiftCreateMessage(props) {
30070
30079
  const {
30071
30080
  dispatch,
30072
30081
  state
30073
- } = React.useContext(store$7);
30082
+ } = React.useContext(store$8);
30074
30083
  const MAX_CHARS_COUNT = 200;
30075
30084
  const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
30076
30085
 
@@ -30200,7 +30209,7 @@ const GiftCreateModal = ({
30200
30209
  };
30201
30210
  GiftCreateModal.viewId = "gift-create";
30202
30211
 
30203
- const initialState$6 = {
30212
+ const initialState$7 = {
30204
30213
  isSubmitting: false,
30205
30214
  giftCode: "",
30206
30215
  buttonDisabled: true,
@@ -30209,10 +30218,10 @@ const initialState$6 = {
30209
30218
  content: ""
30210
30219
  }
30211
30220
  };
30212
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
30221
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
30213
30222
  const {
30214
- Provider: Provider$6
30215
- } = store$6;
30223
+ Provider: Provider$7
30224
+ } = store$7;
30216
30225
 
30217
30226
  const GiftRedeemContainer = ({
30218
30227
  style,
@@ -30326,21 +30335,21 @@ const GiftRedeemContainer = ({
30326
30335
  default:
30327
30336
  return state;
30328
30337
  }
30329
- }, initialState$6);
30338
+ }, initialState$7);
30330
30339
  return /*#__PURE__*/React__default['default'].createElement("div", {
30331
30340
  style: { ...style
30332
30341
  },
30333
30342
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
30334
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
30343
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
30335
30344
  value: {
30336
30345
  state,
30337
30346
  dispatch
30338
30347
  }
30339
30348
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30340
- store: store$6,
30349
+ store: store$7,
30341
30350
  key: i
30342
30351
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30343
- store: store$6
30352
+ store: store$7
30344
30353
  })));
30345
30354
  };
30346
30355
 
@@ -30377,7 +30386,7 @@ function GiftCode({
30377
30386
  }
30378
30387
 
30379
30388
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
30380
- store: store$6
30389
+ store: store$7
30381
30390
  }, props));
30382
30391
 
30383
30392
  const GiftRedeemSubmitButton = ({
@@ -30391,7 +30400,7 @@ const GiftRedeemSubmitButton = ({
30391
30400
  disableSubmit,
30392
30401
  isSubmitting
30393
30402
  }
30394
- } = React.useContext(store$6);
30403
+ } = React.useContext(store$7);
30395
30404
  const {
30396
30405
  t
30397
30406
  } = useTranslation("register");
@@ -30486,7 +30495,7 @@ const moveDefaultAddressToStart = addresses => {
30486
30495
  return [defaultAddress, ...addressesWithoutDefault];
30487
30496
  };
30488
30497
 
30489
- const initialState$5 = {
30498
+ const initialState$6 = {
30490
30499
  addresses: [],
30491
30500
  selectedAddressId: null,
30492
30501
  isSubmitting: false,
@@ -30495,10 +30504,10 @@ const initialState$5 = {
30495
30504
  content: ""
30496
30505
  }
30497
30506
  };
30498
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
30507
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
30499
30508
  const {
30500
- Provider: Provider$5
30501
- } = store$5;
30509
+ Provider: Provider$6
30510
+ } = store$6;
30502
30511
 
30503
30512
  const AddressSelectContainer = ({
30504
30513
  style,
@@ -30635,7 +30644,7 @@ const AddressSelectContainer = ({
30635
30644
  default:
30636
30645
  return state;
30637
30646
  }
30638
- }, initialState$5);
30647
+ }, initialState$6);
30639
30648
  React.useEffect(() => {
30640
30649
  var _window$Pelcro$user$r;
30641
30650
 
@@ -30648,16 +30657,16 @@ const AddressSelectContainer = ({
30648
30657
  style: { ...style
30649
30658
  },
30650
30659
  className: `pelcro-container pelcro-address-select-container ${className}`
30651
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
30660
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
30652
30661
  value: {
30653
30662
  state,
30654
30663
  dispatch
30655
30664
  }
30656
30665
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30657
- store: store$5,
30666
+ store: store$6,
30658
30667
  key: i
30659
30668
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30660
- store: store$5
30669
+ store: store$6
30661
30670
  })));
30662
30671
  };
30663
30672
 
@@ -30668,7 +30677,7 @@ const AddressSelectList = () => {
30668
30677
  addresses,
30669
30678
  selectedAddressId
30670
30679
  }
30671
- } = React.useContext(store$5);
30680
+ } = React.useContext(store$6);
30672
30681
 
30673
30682
  const handleAddressSelect = event => {
30674
30683
  dispatch({
@@ -30712,7 +30721,7 @@ const AddressSelectSubmit = ({
30712
30721
  selectedAddressId,
30713
30722
  isSubmitting
30714
30723
  }
30715
- } = React.useContext(store$5);
30724
+ } = React.useContext(store$6);
30716
30725
  const {
30717
30726
  t
30718
30727
  } = useTranslation("address");
@@ -30822,7 +30831,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
30822
30831
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
30823
30832
  };
30824
30833
 
30825
- const initialState$4 = {
30834
+ const initialState$5 = {
30826
30835
  paymentMethods: [],
30827
30836
  selectedPaymentMethodId: null,
30828
30837
  isSubmitting: false,
@@ -30831,10 +30840,10 @@ const initialState$4 = {
30831
30840
  content: ""
30832
30841
  }
30833
30842
  };
30834
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
30843
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
30835
30844
  const {
30836
- Provider: Provider$4
30837
- } = store$4;
30845
+ Provider: Provider$5
30846
+ } = store$5;
30838
30847
 
30839
30848
  const PaymentMethodSelectContainer = ({
30840
30849
  style,
@@ -30893,7 +30902,7 @@ const PaymentMethodSelectContainer = ({
30893
30902
  default:
30894
30903
  return state;
30895
30904
  }
30896
- }, initialState$4);
30905
+ }, initialState$5);
30897
30906
  React.useEffect(() => {
30898
30907
  var _window$Pelcro$user$r3;
30899
30908
 
@@ -30906,16 +30915,16 @@ const PaymentMethodSelectContainer = ({
30906
30915
  style: { ...style
30907
30916
  },
30908
30917
  className: `pelcro-container pelcro-payment-select-container ${className}`
30909
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
30918
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
30910
30919
  value: {
30911
30920
  state,
30912
30921
  dispatch
30913
30922
  }
30914
30923
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30915
- store: store$4,
30924
+ store: store$5,
30916
30925
  key: i
30917
30926
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30918
- store: store$4
30927
+ store: store$5
30919
30928
  })));
30920
30929
  };
30921
30930
 
@@ -30929,7 +30938,7 @@ const PaymentMethodSelectList = () => {
30929
30938
  paymentMethods,
30930
30939
  selectedPaymentMethodId
30931
30940
  }
30932
- } = React.useContext(store$4);
30941
+ } = React.useContext(store$5);
30933
30942
 
30934
30943
  const handlePaymentMethodSelect = event => {
30935
30944
  dispatch({
@@ -30979,7 +30988,7 @@ const PaymentMethodSelectSubmit = ({
30979
30988
  selectedPaymentMethodId,
30980
30989
  isSubmitting
30981
30990
  }
30982
- } = React.useContext(store$4);
30991
+ } = React.useContext(store$5);
30983
30992
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
30984
30993
  onClick: () => {
30985
30994
  dispatch({
@@ -31065,23 +31074,234 @@ const PaymentMethodSelectModal = ({
31065
31074
  };
31066
31075
  PaymentMethodSelectModal.viewId = "payment-method-select";
31067
31076
 
31068
- function _extends$h() {
31069
- _extends$h = Object.assign || function (target) {
31070
- for (var i = 1; i < arguments.length; i++) {
31071
- var source = arguments[i];
31077
+ var _window$Pelcro$user$r, _window$Pelcro$user$r2;
31078
+ const initialState$4 = {
31079
+ isOpen: false,
31080
+ activeDashboardLink: null,
31081
+ subscriptions: window.Pelcro.subscription.list(),
31082
+ giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
31083
+ disableSubmit: false,
31084
+ addresses: []
31085
+ };
31086
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
31087
+ const {
31088
+ Provider: Provider$4
31089
+ } = store$4;
31072
31090
 
31073
- for (var key in source) {
31074
- if (Object.prototype.hasOwnProperty.call(source, key)) {
31075
- target[key] = source[key];
31076
- }
31077
- }
31078
- }
31091
+ const DashboardContainer = ({
31092
+ onClose,
31093
+ style,
31094
+ className = "",
31095
+ children,
31096
+ ...props
31097
+ }) => {
31098
+ const {
31099
+ t
31100
+ } = useTranslation("dashboard");
31101
+ React.useEffect(() => {
31102
+ var _ReactGA$event;
31079
31103
 
31080
- return target;
31081
- };
31104
+ dispatch({
31105
+ type: SET_IS_OPEN,
31106
+ payload: true
31107
+ });
31108
+ window.Pelcro.insight.track("Modal Displayed", {
31109
+ name: "dashboard"
31110
+ });
31111
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
31112
+ category: "VIEWS",
31113
+ action: "Dashboard Modal Viewed",
31114
+ nonInteraction: true
31115
+ });
31116
+ const {
31117
+ addresses
31118
+ } = window.Pelcro.user.read();
31119
+ if (addresses) dispatch({
31120
+ type: SET_ADDRESSES,
31121
+ payload: addresses
31122
+ });
31123
+ return () => {};
31124
+ }, []);
31125
+ /**
31126
+ *
31127
+ * @param {*} payload
31128
+ * @param {*} dispatch
31129
+ */
31082
31130
 
31083
- return _extends$h.apply(this, arguments);
31084
- }
31131
+ const cancelSubscription = ({
31132
+ subscription_id,
31133
+ onSuccess,
31134
+ onFailure
31135
+ }, dispatch) => {
31136
+ window.Pelcro.subscription.cancel({
31137
+ auth_token: window.Pelcro.user.read().auth_token,
31138
+ subscription_id: subscription_id
31139
+ }, (err, res) => {
31140
+ var _ReactGA$event2;
31141
+
31142
+ dispatch({
31143
+ type: SET_DISABLESUBMIT,
31144
+ payload: false
31145
+ });
31146
+
31147
+ if (err) {
31148
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31149
+ }
31150
+
31151
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
31152
+ category: "ACTIONS",
31153
+ action: "Canceled",
31154
+ nonInteraction: true
31155
+ });
31156
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31157
+ });
31158
+ };
31159
+ /**
31160
+ *
31161
+ * @param {*} payload
31162
+ * @param {*} dispatch
31163
+ */
31164
+
31165
+
31166
+ const unSuspendSubscription = ({
31167
+ subscription_id,
31168
+ onSuccess,
31169
+ onFailure
31170
+ }, dispatch) => {
31171
+ window.Pelcro.subscription.update({
31172
+ auth_token: window.Pelcro.user.read().auth_token,
31173
+ subscription_id: subscription_id,
31174
+ suspend: 0
31175
+ }, (err, res) => {
31176
+ var _ReactGA$event3;
31177
+
31178
+ dispatch({
31179
+ type: SET_DISABLESUBMIT,
31180
+ payload: false
31181
+ });
31182
+
31183
+ if (err) {
31184
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31185
+ }
31186
+
31187
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
31188
+ category: "ACTIONS",
31189
+ action: "UnSuspended",
31190
+ nonInteraction: true
31191
+ });
31192
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31193
+ });
31194
+ };
31195
+ /**
31196
+ *
31197
+ * @param {*} payload
31198
+ * @param {*} dispatch
31199
+ */
31200
+
31201
+
31202
+ const reactivateSubscription = ({
31203
+ subscription_id,
31204
+ onSuccess,
31205
+ onFailure
31206
+ }, dispatch) => {
31207
+ window.Pelcro.subscription.reactivate({
31208
+ auth_token: window.Pelcro.user.read().auth_token,
31209
+ subscription_id: subscription_id
31210
+ }, (err, res) => {
31211
+ dispatch({
31212
+ type: SET_DISABLESUBMIT,
31213
+ payload: false
31214
+ });
31215
+ onClose();
31216
+
31217
+ if (err) {
31218
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31219
+ return notify.error(t("messages.subReactivation.error"));
31220
+ }
31221
+
31222
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31223
+ return notify.success(t("messages.subReactivation.success"));
31224
+ });
31225
+ };
31226
+
31227
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
31228
+ switch (action.type) {
31229
+ case SET_IS_OPEN:
31230
+ return lib_7({ ...state,
31231
+ isOpen: action.payload
31232
+ });
31233
+
31234
+ case CLOSE_DASHBOARD:
31235
+ return lib_7({ ...state,
31236
+ isOpen: false,
31237
+ activeDashboardLink: null
31238
+ });
31239
+
31240
+ case SET_ACTIVE_DASHBOARD_LINK:
31241
+ return lib_7({ ...state,
31242
+ activeDashboardLink: action.payload
31243
+ });
31244
+
31245
+ case SET_DISABLESUBMIT:
31246
+ {
31247
+ return lib_7({ ...state,
31248
+ disableSubmit: action.payload
31249
+ });
31250
+ }
31251
+
31252
+ case CANCEL_SUBSCRIPTION:
31253
+ return lib_5({ ...state,
31254
+ disableSubmit: true
31255
+ }, (state, dispatch) => cancelSubscription(action.payload, dispatch));
31256
+
31257
+ case UNSUSPEND_SUBSCRIPTION:
31258
+ return lib_5({ ...state,
31259
+ disableSubmit: true
31260
+ }, (state, dispatch) => unSuspendSubscription(action.payload, dispatch));
31261
+
31262
+ case REACTIVATE_SUBSCRIPTION:
31263
+ return lib_5({ ...state,
31264
+ disableSubmit: true
31265
+ }, (state, dispatch) => reactivateSubscription(action.payload, dispatch));
31266
+
31267
+ default:
31268
+ return state;
31269
+ }
31270
+ }, initialState$4);
31271
+ return /*#__PURE__*/React__default['default'].createElement("div", {
31272
+ style: { ...style
31273
+ },
31274
+ className: `pelcro-container pelcro-dashboard-container ${className}`
31275
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
31276
+ value: {
31277
+ state,
31278
+ dispatch
31279
+ }
31280
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
31281
+ store: store$4,
31282
+ key: i
31283
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
31284
+ store: store$4
31285
+ })));
31286
+ };
31287
+
31288
+ function _extends$h() {
31289
+ _extends$h = Object.assign || function (target) {
31290
+ for (var i = 1; i < arguments.length; i++) {
31291
+ var source = arguments[i];
31292
+
31293
+ for (var key in source) {
31294
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
31295
+ target[key] = source[key];
31296
+ }
31297
+ }
31298
+ }
31299
+
31300
+ return target;
31301
+ };
31302
+
31303
+ return _extends$h.apply(this, arguments);
31304
+ }
31085
31305
 
31086
31306
  function _objectWithoutPropertiesLoose(source, excluded) {
31087
31307
  if (source == null) return {};
@@ -32594,6 +32814,14 @@ const SubscriptionsMenu = props => {
32594
32814
  const {
32595
32815
  t
32596
32816
  } = useTranslation("dashboard");
32817
+ const {
32818
+ switchView
32819
+ } = usePelcro();
32820
+
32821
+ const displayRedeem = () => {
32822
+ return switchView("gift-redeem");
32823
+ };
32824
+
32597
32825
  return /*#__PURE__*/React__default['default'].createElement(Card, {
32598
32826
  id: "pelcro-dashboard-subscriptions-menu",
32599
32827
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -32632,22 +32860,23 @@ const SubscriptionsMenu = props => {
32632
32860
  className: "plc-w-4 plc-h-4 plc-mr-1"
32633
32861
  }),
32634
32862
  className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase plc-rounded-none hover:plc-bg-gray-100",
32635
- onClick: props.displayRedeem
32863
+ onClick: displayRedeem
32636
32864
  }, t("labels.redeemGift")))))));
32637
32865
  };
32638
32866
  const SubscriptionsItems = ({
32639
32867
  onClose,
32640
- cancelSubscription,
32641
- unSuspendSubscription,
32642
- reactivateSubscription,
32643
32868
  setProductAndPlan,
32644
32869
  setSubscriptionIdToRenew,
32645
- setView,
32646
32870
  getSubscriptionStatus,
32647
- disableSubmit,
32648
32871
  activeMenu,
32649
32872
  toggleActiveMenu
32650
32873
  }) => {
32874
+ const {
32875
+ state: {
32876
+ disableSubmit
32877
+ },
32878
+ dispatch
32879
+ } = React.useContext(store$4);
32651
32880
  const {
32652
32881
  t
32653
32882
  } = useTranslation("dashboard");
@@ -32679,7 +32908,14 @@ const SubscriptionsItems = ({
32679
32908
  switchView(null);
32680
32909
  onClose === null || onClose === void 0 ? void 0 : onClose();
32681
32910
  notify.confirm((onSuccess, onFailure) => {
32682
- cancelSubscription(sub.id, onSuccess, onFailure);
32911
+ dispatch({
32912
+ type: CANCEL_SUBSCRIPTION,
32913
+ payload: {
32914
+ subscription_id: sub.id,
32915
+ onSuccess,
32916
+ onFailure
32917
+ }
32918
+ });
32683
32919
  }, {
32684
32920
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
32685
32921
  loadingMessage: t("messages.subCancellation.loading"),
@@ -32696,7 +32932,12 @@ const SubscriptionsItems = ({
32696
32932
  return switchView("email-verify");
32697
32933
  }
32698
32934
 
32699
- reactivateSubscription(sub.id);
32935
+ dispatch({
32936
+ type: REACTIVATE_SUBSCRIPTION,
32937
+ payload: {
32938
+ subscription_id: sub.id
32939
+ }
32940
+ });
32700
32941
  }; // Renew click
32701
32942
 
32702
32943
 
@@ -32707,7 +32948,7 @@ const SubscriptionsItems = ({
32707
32948
  const plan = window.Pelcro.plan.getById(plan_id);
32708
32949
  setProductAndPlan(product, plan);
32709
32950
  setSubscriptionIdToRenew(sub.id);
32710
- setView("plan-select");
32951
+ switchView("plan-select");
32711
32952
  }; // Manage members click
32712
32953
 
32713
32954
 
@@ -32716,7 +32957,7 @@ const SubscriptionsItems = ({
32716
32957
  set({
32717
32958
  subscriptionToManageMembers
32718
32959
  });
32719
- setView("manage-members");
32960
+ switchView("manage-members");
32720
32961
  }; // Suspend click
32721
32962
 
32722
32963
 
@@ -32726,7 +32967,7 @@ const SubscriptionsItems = ({
32726
32967
  }
32727
32968
 
32728
32969
  setSubscriptionToSuspend(sub.id);
32729
- return setView("subscription-suspend");
32970
+ return switchView("subscription-suspend");
32730
32971
  }; // UnSuspend click
32731
32972
 
32732
32973
 
@@ -32737,7 +32978,14 @@ const SubscriptionsItems = ({
32737
32978
 
32738
32979
  onClose === null || onClose === void 0 ? void 0 : onClose();
32739
32980
  notify.confirm((onSuccess, onFailure) => {
32740
- unSuspendSubscription(sub.id, onSuccess, onFailure);
32981
+ dispatch({
32982
+ type: UNSUSPEND_SUBSCRIPTION,
32983
+ payload: {
32984
+ subscription_id: sub.id,
32985
+ onSuccess,
32986
+ onFailure
32987
+ }
32988
+ });
32741
32989
  }, {
32742
32990
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
32743
32991
  loadingMessage: t("messages.subUnSuspend.loading"),
@@ -33068,9 +33316,6 @@ const OrderItems = ({
33068
33316
  };
33069
33317
 
33070
33318
  const DonationsMenu = ({
33071
- reactivateSubscription,
33072
- disableSubmit,
33073
- cancelSubscription,
33074
33319
  getSubscriptionStatus,
33075
33320
  onClose
33076
33321
  }) => {
@@ -33081,6 +33326,12 @@ const DonationsMenu = ({
33081
33326
  switchView,
33082
33327
  setSubscriptionToCancel
33083
33328
  } = usePelcro();
33329
+ const {
33330
+ state: {
33331
+ disableSubmit
33332
+ },
33333
+ dispatch
33334
+ } = React.useContext(store$4);
33084
33335
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
33085
33336
  // Cancel button click handlers
33086
33337
  const onCancelClick = () => {
@@ -33098,7 +33349,14 @@ const DonationsMenu = ({
33098
33349
  switchView(null);
33099
33350
  onClose === null || onClose === void 0 ? void 0 : onClose();
33100
33351
  notify.confirm((onSuccess, onFailure) => {
33101
- cancelSubscription(sub.id, onSuccess, onFailure);
33352
+ dispatch({
33353
+ type: CANCEL_SUBSCRIPTION,
33354
+ payload: {
33355
+ subscription_id: sub.id,
33356
+ onSuccess,
33357
+ onFailure
33358
+ }
33359
+ });
33102
33360
  }, {
33103
33361
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
33104
33362
  loadingMessage: t("messages.subCancellation.loading"),
@@ -33115,7 +33373,12 @@ const DonationsMenu = ({
33115
33373
  return switchView("email-verify");
33116
33374
  }
33117
33375
 
33118
- reactivateSubscription(sub.id);
33376
+ dispatch({
33377
+ type: REACTIVATE_SUBSCRIPTION,
33378
+ payload: {
33379
+ subscription_id: sub.id
33380
+ }
33381
+ });
33119
33382
  };
33120
33383
 
33121
33384
  return /*#__PURE__*/React__default['default'].createElement("tr", {
@@ -33482,8 +33745,16 @@ const GiftsMenu = props => {
33482
33745
  const {
33483
33746
  t
33484
33747
  } = useTranslation("dashboard");
33748
+ const {
33749
+ switchView,
33750
+ set
33751
+ } = usePelcro();
33485
33752
  const giftRecipients = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
33486
33753
 
33754
+ const setIsRenewingGift = isRenewingGift => set({
33755
+ isRenewingGift
33756
+ });
33757
+
33487
33758
  const renderGiftRecipients = ({
33488
33759
  disableSubmit
33489
33760
  }) => {
@@ -33500,8 +33771,8 @@ const GiftsMenu = props => {
33500
33771
  const plan = window.Pelcro.plan.getById(planId);
33501
33772
  props === null || props === void 0 ? void 0 : props.setProductAndPlan(product, plan);
33502
33773
  props === null || props === void 0 ? void 0 : props.setSubscriptionIdToRenew(recipient.id);
33503
- props === null || props === void 0 ? void 0 : props.setIsRenewingGift(true);
33504
- props === null || props === void 0 ? void 0 : props.setView("plan-select");
33774
+ setIsRenewingGift(true);
33775
+ switchView("plan-select");
33505
33776
  };
33506
33777
 
33507
33778
  return /*#__PURE__*/React__default['default'].createElement("tr", {
@@ -33570,11 +33841,28 @@ const AddressesMenu = props => {
33570
33841
  const {
33571
33842
  t
33572
33843
  } = useTranslation("dashboard");
33844
+ const {
33845
+ switchView,
33846
+ set
33847
+ } = usePelcro();
33573
33848
  const [requestStates, setRequestStates] = React.useState({
33574
33849
  loading: false,
33575
33850
  success: false,
33576
33851
  failed: false
33577
33852
  });
33853
+
33854
+ const displayAddressCreate = () => {
33855
+ return switchView("address-create");
33856
+ };
33857
+
33858
+ const displayAddressEdit = e => {
33859
+ const address = e.currentTarget.dataset.key;
33860
+ set({
33861
+ addressIdToEdit: address
33862
+ });
33863
+ return switchView("address-edit");
33864
+ };
33865
+
33578
33866
  return /*#__PURE__*/React__default['default'].createElement(Card, {
33579
33867
  id: "pelcro-dashboard-addresses-menu",
33580
33868
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -33583,10 +33871,10 @@ const AddressesMenu = props => {
33583
33871
  }, /*#__PURE__*/React__default['default'].createElement(AddressesItems, {
33584
33872
  requestStates: requestStates,
33585
33873
  setRequestStates: setRequestStates,
33586
- displayAddressEdit: props === null || props === void 0 ? void 0 : props.displayAddressEdit
33874
+ displayAddressEdit: displayAddressEdit
33587
33875
  }), /*#__PURE__*/React__default['default'].createElement(AddNew, {
33588
33876
  title: t("labels.addAddress"),
33589
- onClick: () => props === null || props === void 0 ? void 0 : props.displayAddressCreate()
33877
+ onClick: displayAddressCreate
33590
33878
  }));
33591
33879
  };
33592
33880
 
@@ -33683,22 +33971,54 @@ const getPaymentCardIcon = name => {
33683
33971
  d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
33684
33972
  }));
33685
33973
  };
33974
+ const hasInvoices = () => {
33975
+ var _window$Pelcro$invoic, _window$Pelcro$invoic2;
33976
+
33977
+ const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
33978
+ return invoices.length > 0;
33979
+ };
33980
+ const showNewsletters = () => {
33981
+ var _ref, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro$uiSett2;
33982
+
33983
+ const showNewslettersUiSettings = (_ref = ((_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : (_window$Pelcro$uiSett2 = _window$Pelcro$uiSett.newsletters) === null || _window$Pelcro$uiSett2 === void 0 ? void 0 : _window$Pelcro$uiSett2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
33984
+ return showNewslettersUiSettings;
33985
+ };
33986
+ const hasDonationSubs = () => {
33987
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
33988
+
33989
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
33990
+ const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
33991
+ return donations.length > 0 || canceledDonations.length > 0;
33992
+ };
33993
+ const hasActiveMemberships = () => {
33994
+ var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
33995
+
33996
+ return (_window$Pelcro$user$r3 = (_window$Pelcro$user$r4 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : false;
33997
+ };
33686
33998
 
33687
33999
  const PaymentCardsMenu = props => {
33688
34000
  const {
33689
34001
  t
33690
34002
  } = useTranslation("dashboard");
34003
+ const {
34004
+ switchView
34005
+ } = usePelcro();
33691
34006
  const source = window.Pelcro.user.read().source;
34007
+
34008
+ const displaySourceCreate = () => {
34009
+ return switchView("payment-method-update");
34010
+ };
34011
+
33692
34012
  return /*#__PURE__*/React__default['default'].createElement(Card, {
33693
34013
  id: "pelcro-dashboard-payment-menu",
33694
34014
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
33695
34015
  title: t("labels.paymentSource")
33696
34016
  }, source ? /*#__PURE__*/React__default['default'].createElement(PaymentCardsItems, {
33697
- displaySourceCreate: props === null || props === void 0 ? void 0 : props.displaySourceCreate,
34017
+ displaySourceCreate: displaySourceCreate,
33698
34018
  source: source
33699
34019
  }) : /*#__PURE__*/React__default['default'].createElement(AddNew, {
33700
34020
  title: t("labels.addCard"),
33701
- onClick: () => props === null || props === void 0 ? void 0 : props.displaySourceCreate()
34021
+ onClick: displaySourceCreate
33702
34022
  }));
33703
34023
  };
33704
34024
 
@@ -35331,625 +35651,399 @@ const SUB_MENUS = {
35331
35651
  LOGOUT: "logout",
35332
35652
  SAVED_ITEMS: "saved-items"
35333
35653
  };
35334
- /**
35335
- *
35336
- */
35337
-
35338
- function DashboardWithHook(props) {
35339
- React__default['default'].useEffect(() => {
35340
- var _props$onDisplay;
35654
+ const DashboardContent = props => {
35655
+ var _window$Pelcro$user$r, _window$Pelcro, _window$Pelcro$uiSett;
35341
35656
 
35342
- (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
35343
- }, []);
35657
+ const {
35658
+ state: {
35659
+ isOpen,
35660
+ activeDashboardLink,
35661
+ disableSubmit
35662
+ },
35663
+ dispatch
35664
+ } = React.useContext(store$4);
35344
35665
  const {
35345
35666
  switchView,
35346
- resetView,
35347
- logout,
35348
- set
35667
+ set,
35668
+ logout
35349
35669
  } = usePelcro();
35350
- return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
35351
- setAddress: addressIdToEdit => set({
35352
- addressIdToEdit
35353
- }),
35354
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
35355
- subscriptionIdToRenew
35356
- }),
35357
- setIsRenewingGift: isRenewingGift => set({
35358
- isRenewingGift
35359
- }),
35360
- onClose: () => {
35361
- var _props$onClose;
35670
+ const {
35671
+ t
35672
+ } = useTranslation("dashboard");
35673
+ const menuRef = React.useRef(null);
35674
+ const user = window.Pelcro.user.read();
35675
+ const userHasName = user.first_name || user.last_name;
35676
+ const profilePicture = (_window$Pelcro$user$r = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : userSolidIcon;
35677
+ const newsletters = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.newsletters;
35678
+ Array.isArray(newsletters) && newsletters.length > 0;
35362
35679
 
35363
- (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
35364
- resetView();
35365
- },
35366
- logout: logout,
35367
- setView: switchView,
35368
- setProductAndPlan: (product, plan, isGift) => set({
35369
- product,
35370
- plan,
35371
- isGift
35372
- })
35373
- });
35374
- }
35375
- DashboardWithHook.viewId = "dashboard";
35680
+ const initializeHideMenuHandler = () => {
35681
+ document.addEventListener("click", hideMenuIfClickedOutside);
35682
+ };
35376
35683
 
35377
- class Dashboard extends React.Component {
35378
- constructor(props) {
35379
- var _window$Pelcro$user$r, _window$Pelcro$user$r2;
35684
+ const hideMenuIfClickedOutside = event => {
35685
+ const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35686
+ const didClickOutsideMenu = isOpen && menuRef.current && !menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35380
35687
 
35381
- super(props);
35688
+ if (didClickOutsideMenu) {
35689
+ dispatch({
35690
+ type: CLOSE_DASHBOARD
35691
+ });
35692
+ }
35693
+ };
35382
35694
 
35383
- _defineProperty$3(this, "componentDidMount", () => {
35384
- var _ReactGA$event;
35695
+ const setActiveDashboardLink = submenuName => {
35696
+ dispatch({
35697
+ type: SET_ACTIVE_DASHBOARD_LINK,
35698
+ payload: submenuName !== null && submenuName !== void 0 ? submenuName : null
35699
+ });
35700
+ };
35385
35701
 
35386
- this.setState({
35387
- isOpen: true
35388
- });
35389
- window.Pelcro.insight.track("Modal Displayed", {
35390
- name: "dashboard"
35391
- });
35392
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
35393
- category: "VIEWS",
35394
- action: "Dashboard Modal Viewed",
35395
- nonInteraction: true
35396
- });
35397
- const {
35398
- addresses
35399
- } = window.Pelcro.user.read();
35400
- if (addresses) this.setState({
35401
- addresses: addresses
35402
- });
35403
- });
35404
-
35405
- _defineProperty$3(this, "componentWillUnmount", () => {
35406
- document.removeEventListener("click", this.hideMenuIfClickedOutside);
35407
- });
35408
-
35409
- _defineProperty$3(this, "initializeHideMenuHandler", () => {
35410
- document.addEventListener("click", this.hideMenuIfClickedOutside);
35411
- });
35412
-
35413
- _defineProperty$3(this, "hideMenuIfClickedOutside", event => {
35414
- const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35415
- const didClickOutsideMenu = this.state.isOpen && this.menuRef.current && !this.menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35416
-
35417
- if (didClickOutsideMenu) {
35418
- this.setState({
35419
- isOpen: false,
35420
- activeDashboardLink: null
35421
- });
35422
- }
35423
- });
35424
-
35425
- _defineProperty$3(this, "setActiveDashboardLink", submenuName => {
35426
- this.setState({
35427
- activeDashboardLink: submenuName !== null && submenuName !== void 0 ? submenuName : null
35428
- });
35429
- });
35430
-
35431
- _defineProperty$3(this, "cancelSubscription", (subscription_id, onSuccess, onFailure) => {
35432
- // disable the Login button to prevent repeated clicks
35433
- window.Pelcro.subscription.cancel({
35434
- auth_token: window.Pelcro.user.read().auth_token,
35435
- subscription_id: subscription_id
35436
- }, (err, res) => {
35437
- var _ReactGA$event2;
35438
-
35439
- if (err) {
35440
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35441
- }
35442
-
35443
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
35444
- category: "ACTIONS",
35445
- action: "Canceled",
35446
- nonInteraction: true
35447
- });
35448
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35449
- });
35450
- });
35451
-
35452
- _defineProperty$3(this, "unSuspendSubscription", (subscription_id, onSuccess, onFailure) => {
35453
- window.Pelcro.subscription.update({
35454
- auth_token: window.Pelcro.user.read().auth_token,
35455
- subscription_id: subscription_id,
35456
- suspend: 0
35457
- }, (err, res) => {
35458
- var _ReactGA$event3;
35459
-
35460
- if (err) {
35461
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35462
- }
35463
-
35464
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
35465
- category: "ACTIONS",
35466
- action: "UnSuspended",
35467
- nonInteraction: true
35468
- });
35469
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35470
- });
35471
- });
35472
-
35473
- _defineProperty$3(this, "displayRedeem", () => {
35474
- return this.props.setView("gift-redeem");
35475
- });
35476
-
35477
- _defineProperty$3(this, "displaySourceCreate", () => {
35478
- return this.props.setView("payment-method-update");
35479
- });
35480
-
35481
- _defineProperty$3(this, "displayUserEdit", () => {
35482
- return this.props.setView("user-edit");
35483
- });
35484
-
35485
- _defineProperty$3(this, "displayChangePassword", () => {
35486
- return this.props.setView("password-change");
35487
- });
35488
-
35489
- _defineProperty$3(this, "displayNewsletterUpdate", () => {
35490
- return this.props.setView("newsletter-update");
35491
- });
35492
-
35493
- _defineProperty$3(this, "displayQRCode", () => {
35494
- return this.props.setView("qrcode");
35495
- });
35702
+ const displayProfilePicChange = () => {
35703
+ return switchView("profile-picture");
35704
+ };
35496
35705
 
35497
- _defineProperty$3(this, "displayProductSelect", ({
35706
+ const setProductAndPlan = (product, plan, isGift) => {
35707
+ set({
35708
+ product,
35709
+ plan,
35498
35710
  isGift
35499
- }) => {
35500
- if (isGift) {
35501
- this.props.setProductAndPlan(null, null, true);
35502
- }
35503
-
35504
- return this.props.setView("plan-select");
35505
- });
35506
-
35507
- _defineProperty$3(this, "displayAddressCreate", () => {
35508
- return this.props.setView("address-create");
35509
35711
  });
35712
+ };
35510
35713
 
35511
- _defineProperty$3(this, "displayAddressEdit", e => {
35512
- const address = e.currentTarget.dataset.key;
35513
- this.props.setAddress(address);
35514
- return this.props.setView("address-edit");
35515
- });
35714
+ const displayProductSelect = ({
35715
+ isGift
35716
+ }) => {
35717
+ if (isGift) {
35718
+ setProductAndPlan(null, null, true);
35719
+ }
35516
35720
 
35517
- _defineProperty$3(this, "displayProfilePicChange", () => {
35518
- return this.props.setView("profile-picture");
35519
- });
35721
+ return switchView("plan-select");
35722
+ };
35520
35723
 
35521
- _defineProperty$3(this, "getSubscriptionStatusText", subscription => {
35522
- if (subscription.status === "canceled") {
35523
- const cancelDate = new Date(subscription.canceled_at);
35524
- const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35525
- return `${this.locale("labels.canceledOn")} ${formattedCancelDate}`;
35526
- }
35724
+ const getSubscriptionStatusText = subscription => {
35725
+ if (subscription.status === "canceled") {
35726
+ const cancelDate = new Date(subscription.canceled_at);
35727
+ const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35728
+ return `${t("labels.canceledOn")} ${formattedCancelDate}`;
35729
+ }
35527
35730
 
35528
- if (subscription.status === "incomplete") {
35529
- return `${this.locale("labels.status.incomplete")}`;
35530
- }
35731
+ if (subscription.status === "incomplete") {
35732
+ return `${t("labels.status.incomplete")}`;
35733
+ }
35531
35734
 
35532
- if (subscription.status === "extended") {
35533
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35534
- const expiryDate = new Date(Number(`${subscription.end_date}000`));
35535
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35536
- return `${this.locale("labels.until")} ${formattedExpiryDate}`;
35537
- }
35735
+ if (subscription.status === "extended") {
35736
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35737
+ const expiryDate = new Date(Number(`${subscription.end_date}000`));
35738
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35739
+ return `${t("labels.until")} ${formattedExpiryDate}`;
35740
+ }
35538
35741
 
35539
- if (subscription.cancel_at_period_end) {
35540
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35541
- const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35542
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35543
- return `${this.locale("labels.expiresOn")} ${formattedExpiryDate}`;
35544
- }
35742
+ if (subscription.cancel_at_period_end) {
35743
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35744
+ const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35745
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35746
+ return `${t("labels.expiresOn")} ${formattedExpiryDate}`;
35747
+ }
35545
35748
 
35546
- const renewDate = new Date(Number(`${subscription.renews_at}000`));
35547
- const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35548
- return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
35549
- });
35749
+ const renewDate = new Date(Number(`${subscription.renews_at}000`));
35750
+ const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35751
+ return `${t("labels.renewsOn")} ${formattedRenewDate}`;
35752
+ };
35550
35753
 
35551
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
35552
- // disable the Login button to prevent repeated clicks
35553
- this.setState({
35554
- disableSubmit: true
35555
- });
35556
- window.Pelcro.subscription.reactivate({
35557
- auth_token: window.Pelcro.user.read().auth_token,
35558
- subscription_id: subscription_id
35559
- }, (err, res) => {
35560
- this.setState({
35561
- disableSubmit: false
35562
- });
35563
- this.props.onClose();
35754
+ const getSubscriptionStatus = sub => {
35755
+ const isSubscriptionEndingSoon = sub => {
35756
+ const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35757
+ const endingAt = new Date(sub.expires_at * 1000).getTime();
35758
+ return weekFromNow > endingAt && sub.cancel_at_period_end;
35759
+ };
35564
35760
 
35565
- if (err) {
35566
- return notify.error(this.locale("messages.subReactivation.error"));
35567
- }
35761
+ const isSubscriptionInTrial = sub => {
35762
+ if (!sub.trial_end) {
35763
+ return;
35764
+ }
35568
35765
 
35569
- return notify.success(this.locale("messages.subReactivation.success"));
35570
- });
35571
- });
35766
+ const now = new Date().getTime();
35767
+ const trialEndDate = new Date(sub.trial_end).getTime();
35768
+ return now < trialEndDate;
35769
+ };
35572
35770
 
35573
- _defineProperty$3(this, "getSubscriptionStatus", sub => {
35574
- const isSubscriptionEndingSoon = sub => {
35575
- const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35576
- const endingAt = new Date(sub.expires_at * 1000).getTime();
35577
- return weekFromNow > endingAt && sub.cancel_at_period_end;
35771
+ if (isSubscriptionEndingSoon(sub)) {
35772
+ return {
35773
+ title: t("labels.status.endingSoon"),
35774
+ content: getSubscriptionStatusText(sub),
35775
+ textColor: "plc-text-orange-700",
35776
+ bgColor: "plc-bg-orange-100",
35777
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35578
35778
  };
35779
+ }
35579
35780
 
35580
- const isSubscriptionInTrial = sub => {
35581
- if (!sub.trial_end) {
35582
- return;
35583
- }
35584
-
35585
- const now = new Date().getTime();
35586
- const trialEndDate = new Date(sub.trial_end).getTime();
35587
- return now < trialEndDate;
35781
+ if (isSubscriptionInTrial(sub)) {
35782
+ return {
35783
+ title: t("labels.status.inTrial"),
35784
+ content: getSubscriptionStatusText(sub),
35785
+ textColor: "plc-text-yellow-700",
35786
+ bgColor: "plc-bg-yellow-100",
35787
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35588
35788
  };
35789
+ }
35589
35790
 
35590
- if (isSubscriptionEndingSoon(sub)) {
35591
- return {
35592
- title: this.locale("labels.status.endingSoon"),
35593
- content: this.getSubscriptionStatusText(sub),
35594
- textColor: "plc-text-orange-700",
35595
- bgColor: "plc-bg-orange-100",
35596
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35597
- };
35598
- }
35599
-
35600
- if (isSubscriptionInTrial(sub)) {
35601
- return {
35602
- title: this.locale("labels.status.inTrial"),
35603
- content: this.getSubscriptionStatusText(sub),
35604
- textColor: "plc-text-yellow-700",
35605
- bgColor: "plc-bg-yellow-100",
35606
- icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35607
- };
35608
- }
35609
-
35610
- if (sub.status === "incomplete") {
35611
- return {
35612
- title: this.locale("labels.status.incomplete"),
35613
- content: this.getSubscriptionStatusText(sub),
35614
- textColor: "plc-text-orange-700",
35615
- bgColor: "plc-bg-orange-100",
35616
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35617
- };
35618
- }
35619
-
35620
- if (sub.status === "canceled") {
35621
- return {
35622
- title: this.locale("labels.status.canceled"),
35623
- content: this.getSubscriptionStatusText(sub),
35624
- textColor: "plc-text-red-700",
35625
- bgColor: "plc-bg-red-100",
35626
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35627
- };
35628
- }
35791
+ if (sub.status === "incomplete") {
35792
+ return {
35793
+ title: t("labels.status.incomplete"),
35794
+ content: getSubscriptionStatusText(sub),
35795
+ textColor: "plc-text-orange-700",
35796
+ bgColor: "plc-bg-orange-100",
35797
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35798
+ };
35799
+ }
35629
35800
 
35801
+ if (sub.status === "canceled") {
35630
35802
  return {
35631
- title: this.locale("labels.status.active"),
35632
- content: this.getSubscriptionStatusText(sub),
35633
- textColor: "plc-text-green-700",
35634
- bgColor: "plc-bg-green-100",
35635
- icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35803
+ title: t("labels.status.canceled"),
35804
+ content: getSubscriptionStatusText(sub),
35805
+ textColor: "plc-text-red-700",
35806
+ bgColor: "plc-bg-red-100",
35807
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35636
35808
  };
35637
- });
35809
+ }
35638
35810
 
35639
- _defineProperty$3(this, "renderAddresses", () => {
35640
- const addresses = this.state.addresses && this.state.addresses.map((address, index) => {
35641
- return /*#__PURE__*/React__default['default'].createElement("tr", {
35642
- key: "dashboard-address-" + address.id
35643
- }, /*#__PURE__*/React__default['default'].createElement("td", {
35644
- className: "plc-pr-2 plc-text-gray-400 plc-truncate"
35645
- }, /*#__PURE__*/React__default['default'].createElement("span", {
35646
- className: "plc-font-semibold plc-text-gray-600"
35647
- }, address.city ? `${address.city},` : null, " ", address.country), " ", /*#__PURE__*/React__default['default'].createElement("span", {
35648
- title: address.line1
35649
- }, address.line1), /*#__PURE__*/React__default['default'].createElement("div", {
35650
- className: "plc-flex plc-mb-2 plc-mt-1"
35651
- }, /*#__PURE__*/React__default['default'].createElement("span", {
35652
- className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
35653
- }, address.type === "shipping" ? this.locale("labels.shipping") : this.locale("labels.billing")), address.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
35654
- className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
35655
- }, this.locale("labels.default")))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
35656
- variant: "icon",
35657
- className: "plc-text-gray-500",
35658
- icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
35659
- id: "pelcro-button-update-address-" + index,
35660
- "data-key": address.id,
35661
- onClick: this.displayAddressEdit
35662
- })));
35663
- });
35664
- return /*#__PURE__*/React__default['default'].createElement("table", {
35665
- className: "plc-w-full plc-table-fixed"
35666
- }, /*#__PURE__*/React__default['default'].createElement("thead", {
35667
- className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
35668
- }, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
35669
- className: "plc-w-10/12"
35670
- }, this.locale("labels.address")), /*#__PURE__*/React__default['default'].createElement("th", {
35671
- className: "plc-w-2/12"
35672
- }, this.locale("labels.edit")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
35673
- className: "plc-h-4"
35674
- }), addresses, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
35675
- colSpan: "2",
35676
- className: "plc-p-1"
35677
- }, /*#__PURE__*/React__default['default'].createElement(Button, {
35678
- variant: "ghost",
35679
- icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
35680
- className: "plc-w-4 plc-mr-1"
35681
- }),
35682
- className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100",
35683
- onClick: this.displayAddressCreate
35684
- }, this.locale("labels.addAddress"))))));
35811
+ return {
35812
+ title: t("labels.status.active"),
35813
+ content: getSubscriptionStatusText(sub),
35814
+ textColor: "plc-text-green-700",
35815
+ bgColor: "plc-bg-green-100",
35816
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35817
+ };
35818
+ };
35819
+
35820
+ const setSubscriptionIdToRenew = subscriptionIdToRenew => {
35821
+ set({
35822
+ subscriptionIdToRenew
35685
35823
  });
35824
+ };
35686
35825
 
35687
- _defineProperty$3(this, "closeDashboard", () => {
35688
- this.setState({
35689
- isOpen: false,
35690
- activeDashboardLink: null
35691
- });
35826
+ const closeDashboard = () => {
35827
+ dispatch({
35828
+ type: CLOSE_DASHBOARD
35692
35829
  });
35830
+ };
35693
35831
 
35694
- this.state = {
35695
- isOpen: false,
35696
- activeDashboardLink: null,
35697
- subscriptions: window.Pelcro.subscription.list(),
35698
- giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
35699
- disableSubmit: false,
35700
- addresses: []
35832
+ React.useEffect(() => {
35833
+ return () => {
35834
+ document.removeEventListener("click", hideMenuIfClickedOutside);
35701
35835
  };
35702
- this.site = window.Pelcro.site.read();
35703
- this.locale = this.props.t;
35704
- this.user = window.Pelcro.user.read();
35705
- this.menuRef = /*#__PURE__*/React__default['default'].createRef();
35706
- }
35707
-
35708
- render() {
35709
- var _window$Pelcro$user$r3, _window$Pelcro, _window$Pelcro$uiSett;
35710
-
35711
- const {
35712
- isOpen
35713
- } = this.state;
35714
- const userHasName = this.user.first_name || this.user.last_name;
35715
- const profilePicture = (_window$Pelcro$user$r3 = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : userSolidIcon;
35716
- const newsletters = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.newsletters;
35717
- Array.isArray(newsletters) && newsletters.length > 0;
35718
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Transition, {
35719
- className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35720
- show: isOpen,
35721
- enter: "plc-transform plc-transition plc-duration-500",
35722
- enterFrom: "plc--translate-x-full",
35723
- enterTo: "plc-translate-x-0",
35724
- afterEnter: this.initializeHideMenuHandler,
35725
- leave: "plc-transform plc-transition plc-duration-500",
35726
- leaveFrom: "plc-translate-x-0",
35727
- leaveTo: "plc--translate-x-full",
35728
- afterLeave: this.props.onClose
35729
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35730
- id: "pelcro-view-dashboard",
35731
- ref: this.menuRef
35732
- }, /*#__PURE__*/React__default['default'].createElement("header", {
35733
- className: "plc-bg-gray-200 plc-flex plc-py-5"
35734
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35735
- className: "plc-flex plc-items-center"
35736
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35737
- className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35738
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35739
- className: "plc-relative plc-flex-shrink-0"
35740
- }, /*#__PURE__*/React__default['default'].createElement("img", {
35741
- className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35742
- src: profilePicture,
35743
- alt: "profile picture",
35744
- onClick: this.displayProfilePicChange
35745
- }))), /*#__PURE__*/React__default['default'].createElement("div", {
35746
- className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35747
- }, userHasName && /*#__PURE__*/React__default['default'].createElement("p", {
35748
- className: "plc-font-bold plc-break-all"
35749
- }, this.user.first_name, " ", this.user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
35750
- className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35751
- }, this.user.email)), /*#__PURE__*/React__default['default'].createElement("div", {
35752
- className: "lg:plc-hidden"
35753
- }, /*#__PURE__*/React__default['default'].createElement(Button, {
35754
- variant: "ghost",
35755
- type: "button",
35756
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35757
- onClick: this.closeDashboard
35758
- }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35759
- className: "plc-fill-current"
35760
- }))))), /*#__PURE__*/React__default['default'].createElement("section", {
35761
- className: "plc-mt-6 plc-shadow-sm"
35762
- }, /*#__PURE__*/React__default['default'].createElement("header", {
35763
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35764
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35765
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35766
- }, this.locale("labels.mySettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35767
- name: SUB_MENUS.PROFILE,
35768
- icon: /*#__PURE__*/React__default['default'].createElement(SvgUser, {
35769
- className: "plc-w-6 plc-h-6 plc-mr-2"
35770
- }),
35771
- title: this.locale("labels.profile"),
35772
- setActiveDashboardLink: this.setActiveDashboardLink,
35773
- activeDashboardLink: this.state.activeDashboardLink
35774
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35775
- name: SUB_MENUS.QRCODE,
35776
- icon: /*#__PURE__*/React__default['default'].createElement(SvgQrcode, {
35777
- className: "plc-w-6 plc-h-6 plc-mr-2"
35778
- }),
35779
- title: this.locale("labels.myQRCode"),
35780
- setActiveDashboardLink: this.setActiveDashboardLink,
35781
- activeDashboardLink: this.state.activeDashboardLink
35782
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35783
- name: SUB_MENUS.PASSWORDCHANGE,
35784
- icon: /*#__PURE__*/React__default['default'].createElement(SvgKey, {
35785
- className: "plc-w-6 plc-h-6 plc-mr-2"
35786
- }),
35787
- title: this.locale("labels.changePassword"),
35788
- setActiveDashboardLink: this.setActiveDashboardLink,
35789
- activeDashboardLink: this.state.activeDashboardLink
35790
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35791
- name: SUB_MENUS.SAVED_ITEMS,
35792
- icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
35793
- title: this.locale("labels.savedItems.label"),
35794
- setActiveDashboardLink: this.setActiveDashboardLink,
35795
- activeDashboardLink: this.state.activeDashboardLink
35796
- }), /*#__PURE__*/React__default['default'].createElement("header", {
35797
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35798
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35799
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35800
- }, this.locale("labels.accountSettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35801
- name: SUB_MENUS.PAYMENT_CARDS,
35802
- icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
35803
- title: this.locale("labels.paymentSource"),
35804
- setActiveDashboardLink: this.setActiveDashboardLink,
35805
- activeDashboardLink: this.state.activeDashboardLink
35806
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35807
- name: SUB_MENUS.ADDRESSES,
35808
- icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
35809
- title: this.locale("labels.addresses"),
35810
- setActiveDashboardLink: this.setActiveDashboardLink,
35811
- activeDashboardLink: this.state.activeDashboardLink
35812
- }), /*#__PURE__*/React__default['default'].createElement("header", {
35813
- className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35814
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35815
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35816
- }, this.locale("labels.purchases"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35817
- name: SUB_MENUS.SUBSCRIPTIONS,
35818
- icon: /*#__PURE__*/React__default['default'].createElement(SvgSubscription, {
35819
- className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35820
- }),
35821
- title: this.locale("labels.subscriptions"),
35822
- setActiveDashboardLink: this.setActiveDashboardLink,
35823
- activeDashboardLink: this.state.activeDashboardLink
35824
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35825
- show: showNewsletters(),
35826
- name: SUB_MENUS.NEWSLETTERS,
35827
- icon: /*#__PURE__*/React__default['default'].createElement(SvgNewsletter, {
35828
- className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35829
- }),
35830
- title: this.locale("labels.Newsletters"),
35831
- setActiveDashboardLink: this.setActiveDashboardLink,
35832
- activeDashboardLink: this.state.activeDashboardLink
35833
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35834
- show: hasActiveMemberships(),
35835
- name: SUB_MENUS.MEMBERSHIPS,
35836
- icon: /*#__PURE__*/React__default['default'].createElement(SvgMemberships, {
35837
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35838
- }),
35839
- title: this.locale("labels.memberships"),
35840
- setActiveDashboardLink: this.setActiveDashboardLink,
35841
- activeDashboardLink: this.state.activeDashboardLink
35842
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35843
- show: hasDonationSubs(),
35844
- name: SUB_MENUS.DONATIONS,
35845
- icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
35846
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35847
- }),
35848
- title: this.locale("labels.donations"),
35849
- setActiveDashboardLink: this.setActiveDashboardLink,
35850
- activeDashboardLink: this.state.activeDashboardLink
35851
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35852
- name: SUB_MENUS.GIFTS,
35853
- icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
35854
- title: this.locale("labels.gifts"),
35855
- setActiveDashboardLink: this.setActiveDashboardLink,
35856
- activeDashboardLink: this.state.activeDashboardLink
35857
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35858
- show: window.Pelcro.site.read().ecommerce_enabled,
35859
- name: SUB_MENUS.ORDERS,
35860
- icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
35861
- title: this.locale("labels.orders.label"),
35862
- setActiveDashboardLink: this.setActiveDashboardLink,
35863
- activeDashboardLink: this.state.activeDashboardLink
35864
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35865
- show: hasInvoices(),
35866
- name: SUB_MENUS.INVOICES,
35867
- icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
35868
- title: this.locale("labels.invoices"),
35869
- setActiveDashboardLink: this.setActiveDashboardLink,
35870
- activeDashboardLink: this.state.activeDashboardLink
35871
- })), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35872
- name: SUB_MENUS.LOGOUT,
35873
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExit, null),
35874
- title: this.locale("labels.logout"),
35875
- setActiveDashboardLink: this.setActiveDashboardLink,
35876
- activeDashboardLink: this.state.activeDashboardLink
35877
- }))), this.state.activeDashboardLink && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
35878
- id: "pelcro-view-dashboard-submenus",
35879
- className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35880
- }, this.state.activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), this.state.activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), this.state.activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default['default'].createElement(PasswordChangeMenu, null), this.state.activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), this.state.activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, {
35881
- displaySourceCreate: this.displaySourceCreate
35882
- }), this.state.activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default['default'].createElement(AddressesMenu, {
35883
- displayAddressCreate: this.displayAddressCreate,
35884
- displayAddressEdit: this.displayAddressEdit
35885
- }), this.state.activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default['default'].createElement(SubscriptionsMenu // getSubscriptionStatus={this.getSubscriptionStatus}
35886
- , {
35887
- displayProductSelect: this.displayProductSelect,
35888
- displayRedeem: this.displayRedeem,
35889
- cancelSubscription: this.cancelSubscription,
35890
- unSuspendSubscription: this.unSuspendSubscription,
35891
- reactivateSubscription: this.reactivateSubscription,
35892
- setProductAndPlan: this.props.setProductAndPlan,
35893
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35894
- setView: this.props.setView,
35895
- getSubscriptionStatus: this.getSubscriptionStatus,
35896
- disableSubmit: this.state.disableSubmit
35897
- }), this.state.activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default['default'].createElement(MembershipsMenu, {
35898
- getSubscriptionStatus: this.getSubscriptionStatus
35899
- }), this.state.activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default['default'].createElement(NewslettersMenu, null), this.state.activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default['default'].createElement(DonationsMenu, {
35900
- cancelSubscription: this.cancelSubscription,
35901
- reactivateSubscription: this.reactivateSubscription,
35902
- disableSubmit: this.state.disableSubmit,
35903
- getSubscriptionStatus: this.getSubscriptionStatus
35904
- }), this.state.activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default['default'].createElement(GiftsMenu, {
35905
- getSubscriptionStatus: this.getSubscriptionStatus,
35906
- displayProductSelect: this.displayProductSelect,
35907
- setProductAndPlan: this.props.setProductAndPlan,
35908
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35909
- setIsRenewingGift: this.props.setIsRenewingGift,
35910
- setView: this.props.setView,
35911
- disableSubmit: this.state.disableSubmit
35912
- }), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default['default'].createElement(Button, {
35913
- variant: "ghost",
35914
- type: "button",
35915
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
35916
- onClick: this.closeDashboard
35917
- }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35918
- className: "plc-fill-current"
35919
- }))));
35920
- }
35921
-
35922
- }
35923
-
35924
- function hasInvoices() {
35925
- var _window$Pelcro$invoic, _window$Pelcro$invoic2;
35926
-
35927
- const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
35928
- return invoices.length > 0;
35929
- }
35930
-
35931
- function showNewsletters() {
35932
- var _ref, _window$Pelcro2, _window$Pelcro2$uiSet, _window$Pelcro2$uiSet2;
35933
-
35934
- const showNewslettersUiSettings = (_ref = ((_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : (_window$Pelcro2$uiSet2 = _window$Pelcro2$uiSet.newsletters) === null || _window$Pelcro2$uiSet2 === void 0 ? void 0 : _window$Pelcro2$uiSet2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
35935
- return showNewslettersUiSettings;
35936
- }
35836
+ }, []);
35837
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Transition, {
35838
+ className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35839
+ show: isOpen,
35840
+ enter: "plc-transform plc-transition plc-duration-500",
35841
+ enterFrom: "plc--translate-x-full",
35842
+ enterTo: "plc-translate-x-0",
35843
+ afterEnter: initializeHideMenuHandler,
35844
+ leave: "plc-transform plc-transition plc-duration-500",
35845
+ leaveFrom: "plc-translate-x-0",
35846
+ leaveTo: "plc--translate-x-full",
35847
+ afterLeave: props === null || props === void 0 ? void 0 : props.onClose
35848
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35849
+ id: "pelcro-view-dashboard",
35850
+ ref: menuRef
35851
+ }, /*#__PURE__*/React__default['default'].createElement("header", {
35852
+ className: "plc-bg-gray-200 plc-flex plc-py-5"
35853
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35854
+ className: "plc-flex plc-items-center"
35855
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35856
+ className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35857
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35858
+ className: "plc-relative plc-flex-shrink-0"
35859
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
35860
+ className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35861
+ src: profilePicture,
35862
+ alt: "profile picture",
35863
+ onClick: displayProfilePicChange
35864
+ }))), /*#__PURE__*/React__default['default'].createElement("div", {
35865
+ className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35866
+ }, userHasName && /*#__PURE__*/React__default['default'].createElement("p", {
35867
+ className: "plc-font-bold plc-break-all"
35868
+ }, user.first_name, " ", user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
35869
+ className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35870
+ }, user.email)), /*#__PURE__*/React__default['default'].createElement("div", {
35871
+ className: "lg:plc-hidden"
35872
+ }, /*#__PURE__*/React__default['default'].createElement(Button, {
35873
+ variant: "ghost",
35874
+ type: "button",
35875
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35876
+ onClick: closeDashboard
35877
+ }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35878
+ className: "plc-fill-current"
35879
+ }))))), /*#__PURE__*/React__default['default'].createElement("section", {
35880
+ className: "plc-mt-6 plc-shadow-sm"
35881
+ }, /*#__PURE__*/React__default['default'].createElement("header", {
35882
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35883
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35884
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35885
+ }, t("labels.mySettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35886
+ name: SUB_MENUS.PROFILE,
35887
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgUser, {
35888
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35889
+ }),
35890
+ title: t("labels.profile"),
35891
+ setActiveDashboardLink: setActiveDashboardLink,
35892
+ activeDashboardLink: activeDashboardLink
35893
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35894
+ name: SUB_MENUS.QRCODE,
35895
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgQrcode, {
35896
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35897
+ }),
35898
+ title: "My QR code",
35899
+ setActiveDashboardLink: setActiveDashboardLink,
35900
+ activeDashboardLink: activeDashboardLink
35901
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35902
+ name: SUB_MENUS.PASSWORDCHANGE,
35903
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgKey, {
35904
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35905
+ }),
35906
+ title: t("labels.changePassword"),
35907
+ setActiveDashboardLink: setActiveDashboardLink,
35908
+ activeDashboardLink: activeDashboardLink
35909
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35910
+ name: SUB_MENUS.SAVED_ITEMS,
35911
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
35912
+ title: t("labels.savedItems.label"),
35913
+ setActiveDashboardLink: setActiveDashboardLink,
35914
+ activeDashboardLink: activeDashboardLink
35915
+ }), /*#__PURE__*/React__default['default'].createElement("header", {
35916
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35917
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35918
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35919
+ }, t("labels.accountSettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35920
+ name: SUB_MENUS.PAYMENT_CARDS,
35921
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
35922
+ title: t("labels.paymentSource"),
35923
+ setActiveDashboardLink: setActiveDashboardLink,
35924
+ activeDashboardLink: activeDashboardLink
35925
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35926
+ name: SUB_MENUS.ADDRESSES,
35927
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
35928
+ title: t("labels.addresses"),
35929
+ setActiveDashboardLink: setActiveDashboardLink,
35930
+ activeDashboardLink: activeDashboardLink
35931
+ }), /*#__PURE__*/React__default['default'].createElement("header", {
35932
+ className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35933
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35934
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35935
+ }, t("labels.purchases"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35936
+ name: SUB_MENUS.SUBSCRIPTIONS,
35937
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgSubscription, {
35938
+ className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35939
+ }),
35940
+ title: t("labels.subscriptions"),
35941
+ setActiveDashboardLink: setActiveDashboardLink,
35942
+ activeDashboardLink: activeDashboardLink
35943
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35944
+ show: showNewsletters(),
35945
+ name: SUB_MENUS.NEWSLETTERS,
35946
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgNewsletter, {
35947
+ className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35948
+ }),
35949
+ title: t("labels.Newsletters"),
35950
+ setActiveDashboardLink: setActiveDashboardLink,
35951
+ activeDashboardLink: activeDashboardLink
35952
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35953
+ show: hasActiveMemberships(),
35954
+ name: SUB_MENUS.MEMBERSHIPS,
35955
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgMemberships, {
35956
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35957
+ }),
35958
+ title: t("labels.memberships"),
35959
+ setActiveDashboardLink: setActiveDashboardLink,
35960
+ activeDashboardLink: activeDashboardLink
35961
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35962
+ show: hasDonationSubs(),
35963
+ name: SUB_MENUS.DONATIONS,
35964
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
35965
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35966
+ }),
35967
+ title: t("labels.donations"),
35968
+ setActiveDashboardLink: setActiveDashboardLink,
35969
+ activeDashboardLink: activeDashboardLink
35970
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35971
+ name: SUB_MENUS.GIFTS,
35972
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
35973
+ title: t("labels.gifts"),
35974
+ setActiveDashboardLink: setActiveDashboardLink,
35975
+ activeDashboardLink: activeDashboardLink
35976
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35977
+ show: window.Pelcro.site.read().ecommerce_enabled,
35978
+ name: SUB_MENUS.ORDERS,
35979
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
35980
+ title: t("labels.orders.label"),
35981
+ setActiveDashboardLink: setActiveDashboardLink,
35982
+ activeDashboardLink: activeDashboardLink
35983
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35984
+ show: hasInvoices(),
35985
+ name: SUB_MENUS.INVOICES,
35986
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
35987
+ title: t("labels.invoices"),
35988
+ setActiveDashboardLink: setActiveDashboardLink,
35989
+ activeDashboardLink: activeDashboardLink
35990
+ })), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35991
+ name: SUB_MENUS.LOGOUT,
35992
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExit, null),
35993
+ title: t("labels.logout"),
35994
+ setActiveDashboardLink: setActiveDashboardLink,
35995
+ activeDashboardLink: activeDashboardLink
35996
+ }))), activeDashboardLink && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
35997
+ id: "pelcro-view-dashboard-submenus",
35998
+ className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35999
+ }, activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default['default'].createElement(PasswordChangeMenu, null), activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, null), activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default['default'].createElement(AddressesMenu, null), activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default['default'].createElement(SubscriptionsMenu, {
36000
+ displayProductSelect: displayProductSelect,
36001
+ setProductAndPlan: setProductAndPlan,
36002
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
36003
+ getSubscriptionStatus: getSubscriptionStatus
36004
+ }), activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default['default'].createElement(MembershipsMenu, {
36005
+ getSubscriptionStatus: getSubscriptionStatus
36006
+ }), activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default['default'].createElement(NewslettersMenu, null), activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default['default'].createElement(DonationsMenu, {
36007
+ getSubscriptionStatus: getSubscriptionStatus
36008
+ }), activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default['default'].createElement(GiftsMenu, {
36009
+ getSubscriptionStatus: getSubscriptionStatus,
36010
+ displayProductSelect: displayProductSelect,
36011
+ setProductAndPlan: setProductAndPlan,
36012
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
36013
+ disableSubmit: disableSubmit
36014
+ }), activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null), activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null), activeDashboardLink === SUB_MENUS.LOGOUT && logout(), /*#__PURE__*/React__default['default'].createElement(Button, {
36015
+ variant: "ghost",
36016
+ type: "button",
36017
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
36018
+ onClick: closeDashboard
36019
+ }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
36020
+ className: "plc-fill-current"
36021
+ }))));
36022
+ };
35937
36023
 
35938
- function hasDonationSubs() {
35939
- var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
36024
+ /**
36025
+ *
36026
+ */
35940
36027
 
35941
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
35942
- const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
35943
- return donations.length > 0 || canceledDonations.length > 0;
35944
- }
36028
+ function Dashboard(props) {
36029
+ React__default['default'].useEffect(() => {
36030
+ var _props$onDisplay;
35945
36031
 
35946
- function hasActiveMemberships() {
35947
- var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
36032
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
36033
+ }, []);
36034
+ const {
36035
+ resetView
36036
+ } = usePelcro();
36037
+ return /*#__PURE__*/React__default['default'].createElement(DashboardContainer, props, /*#__PURE__*/React__default['default'].createElement(DashboardContent, Object.assign({
36038
+ onClose: () => {
36039
+ var _props$onClose;
35948
36040
 
35949
- return (_window$Pelcro$user$r6 = (_window$Pelcro$user$r7 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
36041
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
36042
+ resetView();
36043
+ }
36044
+ }, props)));
35950
36045
  }
35951
-
35952
- const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
36046
+ Dashboard.viewId = "dashboard";
35953
36047
 
35954
36048
  // The button in the lower left that shows the dashboard.
35955
36049
  const DashboardOpenButton = () => {
@@ -38406,6 +38500,7 @@ const QrCodeModal = ({
38406
38500
  };
38407
38501
  QrCodeModal.viewId = "qrcode";
38408
38502
 
38503
+ exports.AddNew = AddNew;
38409
38504
  exports.AddressCreateCity = AddressCreateCity;
38410
38505
  exports.AddressCreateContainer = AddressCreateContainer;
38411
38506
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -38439,6 +38534,7 @@ exports.AddressUpdateStateSelect = AddressUpdateStateSelect;
38439
38534
  exports.AddressUpdateSubmit = AddressUpdateSubmit;
38440
38535
  exports.AddressUpdateTextInput = AddressUpdateTextInput;
38441
38536
  exports.AddressUpdateView = AddressUpdateView;
38537
+ exports.AddressesMenu = AddressesMenu;
38442
38538
  exports.Alert = AlertWithContext;
38443
38539
  exports.AlertElement = Alert;
38444
38540
  exports.ApplyCouponButton = ApplyCouponButton;
@@ -38446,6 +38542,7 @@ exports.Auth0LoginButton = Auth0LoginButton;
38446
38542
  exports.Badge = Badge;
38447
38543
  exports.BankRedirection = BankRedirection;
38448
38544
  exports.Button = Button;
38545
+ exports.Card = Card;
38449
38546
  exports.CartContainer = CartContainer;
38450
38547
  exports.CartModal = CartModal;
38451
38548
  exports.CartRemoveItemButton = CartRemoveItemButton;
@@ -38457,10 +38554,14 @@ exports.CheckoutForm = CheckoutForm;
38457
38554
  exports.ConfirmPassword = ConfirmPassword;
38458
38555
  exports.CouponCode = CouponCode;
38459
38556
  exports.CouponCodeField = CouponCodeField;
38460
- exports.Dashboard = DashboardWithHook;
38557
+ exports.Dashboard = Dashboard;
38558
+ exports.DashboardContainer = DashboardContainer;
38559
+ exports.DashboardContent = DashboardContent;
38560
+ exports.DashboardLink = DashboardLink;
38461
38561
  exports.DashboardOpenButton = DashboardOpenButton;
38462
38562
  exports.DatePicker = DatePicker;
38463
38563
  exports.DiscountedPrice = DiscountedPrice;
38564
+ exports.DonationsMenu = DonationsMenu;
38464
38565
  exports.Email = Email;
38465
38566
  exports.EmailVerifyContainer = EmailVerifyContainer;
38466
38567
  exports.EmailVerifyModal = EmailVerifyModal;
@@ -38481,6 +38582,7 @@ exports.GiftRedeemContainer = GiftRedeemContainer;
38481
38582
  exports.GiftRedeemModal = GiftRedeemModal;
38482
38583
  exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
38483
38584
  exports.GiftRedeemView = GiftRedeemView;
38585
+ exports.GiftsMenu = GiftsMenu;
38484
38586
  exports.GoogleLoginButton = GoogleLoginButton;
38485
38587
  exports.Input = Input;
38486
38588
  exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
@@ -38491,6 +38593,7 @@ exports.InvoiceDetailsView = InvoiceDetailsView;
38491
38593
  exports.InvoicePaymentContainer = InvoicePaymentContainer;
38492
38594
  exports.InvoicePaymentModal = InvoicePaymentModal;
38493
38595
  exports.InvoicePaymentView = InvoicePaymentView;
38596
+ exports.InvoicesMenu = InvoicesMenu;
38494
38597
  exports.Link = Link;
38495
38598
  exports.LoginButton = LoginButton;
38496
38599
  exports.LoginContainer = LoginContainer;
@@ -38501,6 +38604,7 @@ exports.LoginRequestLoginToken = LoginRequestLoginToken;
38501
38604
  exports.LoginUsername = LoginUsername;
38502
38605
  exports.LoginView = LoginView;
38503
38606
  exports.Logout = Logout;
38607
+ exports.MembershipsMenu = MembershipsMenu;
38504
38608
  exports.MeterModal = MeterModal;
38505
38609
  exports.MeterView = MeterView;
38506
38610
  exports.Modal = Modal;
@@ -38513,17 +38617,20 @@ exports.NewsletterUpdateContainer = NewsletterUpdateContainer;
38513
38617
  exports.NewsletterUpdateList = NewsletterUpdateList;
38514
38618
  exports.NewsletterUpdateModal = NewsletterUpdateModal;
38515
38619
  exports.NewsletterUpdateView = NewsletterUpdateView;
38620
+ exports.NewslettersMenu = NewslettersMenu;
38516
38621
  exports.Notification = Notification;
38517
38622
  exports.OrderConfirmModal = OrderConfirmModal;
38518
38623
  exports.OrderCreateContainer = OrderCreateContainer;
38519
38624
  exports.OrderCreateModal = OrderCreateModal;
38520
38625
  exports.OrderCreateSubmitButton = OrderCreateSubmitButton;
38521
38626
  exports.OrderCreateView = OrderCreateView;
38627
+ exports.OrderItems = OrderItems;
38522
38628
  exports.Password = Password;
38523
38629
  exports.PasswordChangeButton = PasswordChangeButton;
38524
38630
  exports.PasswordChangeConfirmNewPassword = PasswordChangeConfirmNewPassword;
38525
38631
  exports.PasswordChangeContainer = PasswordChangeContainer;
38526
38632
  exports.PasswordChangeCurrentPassword = PasswordChangeCurrentPassword;
38633
+ exports.PasswordChangeMenu = PasswordChangeMenu;
38527
38634
  exports.PasswordChangeModal = PasswordChangeModal;
38528
38635
  exports.PasswordChangeNewPassword = PasswordChangeNewPassword;
38529
38636
  exports.PasswordChangeView = PasswordChangeView;
@@ -38544,6 +38651,7 @@ exports.PasswordlessRequestEmail = PasswordlessRequestEmail;
38544
38651
  exports.PasswordlessRequestModal = PasswordlessRequestModal;
38545
38652
  exports.PasswordlessRequestView = PasswordlessRequestView;
38546
38653
  exports.PasswordlessRequestViewButton = PasswordlessRequestViewButton;
38654
+ exports.PaymentCardsMenu = PaymentCardsMenu;
38547
38655
  exports.PaymentCreateContainer = PaymentCreateContainer;
38548
38656
  exports.PaymentCreateView = PaymentCreateView;
38549
38657
  exports.PaymentMethodContainer = PaymentMethodContainer;
@@ -38564,6 +38672,7 @@ exports.PelcroCardExpiry = PelcroCardExpiry;
38564
38672
  exports.PelcroCardNumber = PelcroCardNumber;
38565
38673
  exports.PelcroModalController = PelcroModalController;
38566
38674
  exports.PelcroPaymentRequestButton = PelcroPaymentRequestButton;
38675
+ exports.ProfileMenu = ProfileMenu;
38567
38676
  exports.ProfilePicChangeButton = ProfilePicChangeButton;
38568
38677
  exports.ProfilePicChangeContainer = ProfilePicChangeContainer;
38569
38678
  exports.ProfilePicChangeCropper = ProfilePicChangeCropper;
@@ -38572,6 +38681,7 @@ exports.ProfilePicChangeRemoveButton = ProfilePicChangeRemoveButton;
38572
38681
  exports.ProfilePicChangeSelectButton = ProfilePicChangeSelectButton;
38573
38682
  exports.ProfilePicChangeView = ProfilePicChangeView;
38574
38683
  exports.ProfilePicChangeZoom = ProfilePicChangeZoom;
38684
+ exports.QRCodeMenu = QRCodeMenu;
38575
38685
  exports.QrCodeModal = QrCodeModal;
38576
38686
  exports.QrCodeView = QrCodeView;
38577
38687
  exports.Radio = Radio;
@@ -38585,6 +38695,7 @@ exports.RegisterLastName = RegisterLastName;
38585
38695
  exports.RegisterModal = RegisterModal;
38586
38696
  exports.RegisterPassword = RegisterPassword;
38587
38697
  exports.RegisterView = RegisterView;
38698
+ exports.SavedItems = SavedItems;
38588
38699
  exports.Select = Select;
38589
38700
  exports.SelectModal = SelectModalWithHook;
38590
38701
  exports.SelectedPaymentMethod = SelectedPaymentMethod;
@@ -38609,6 +38720,7 @@ exports.SubscriptionRenewView = SubscriptionRenewView;
38609
38720
  exports.SubscriptionSuspendContainer = SubscriptionSuspendContainer;
38610
38721
  exports.SubscriptionSuspendModal = SubscriptionSuspendModal;
38611
38722
  exports.SubscriptionSuspendView = SubscriptionSuspendView;
38723
+ exports.SubscriptionsItems = SubscriptionsItems;
38612
38724
  exports.TaxAmount = TaxAmount;
38613
38725
  exports.TextArea = TextArea;
38614
38726
  exports.Tooltip = Tooltip;