@pelcro/react-pelcro-js 4.0.0-alpha.63 → 4.0.0-alpha.64

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.esm.js CHANGED
@@ -3330,12 +3330,19 @@ var paymentMethod_en = {
3330
3330
  select: select$6,
3331
3331
  "delete": {
3332
3332
  title: "Delete payment method",
3333
- subtitle: "This payment method could be associated with active subscriptions or serve as the default payment method. Please choose from the available options below for replacement.",
3333
+ subtitle: "Are you sure you want to delete the selected payment method?",
3334
+ details: "Payment method details",
3335
+ message: "This action is irreversible and will permanently remove the payment method from the system. Please ensure that there are no pending transactions or subscriptions associated with this payment method.",
3336
+ buttons: {
3337
+ "delete": "Delete payment method",
3338
+ back: "Go back"
3339
+ },
3334
3340
  options: {
3335
- select: "Select an existing payment method",
3341
+ select: "Select a payment method to be the default",
3336
3342
  add: "Add a new payment method"
3337
3343
  },
3338
- paymentMethodReplaced: "Payment Method Successfully Deleted and Replaced"
3344
+ paymentMethodReplaced: "Payment Method Successfully Deleted and Replaced",
3345
+ deletedSuccessfully: "Payment Method Successfully Deleted"
3339
3346
  },
3340
3347
  create: create$5
3341
3348
  };
@@ -9841,6 +9848,21 @@ function notifyBugsnag(callback, startOptions) {
9841
9848
 
9842
9849
  callback();
9843
9850
  }
9851
+ const refreshUser = () => {
9852
+ var _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro6$user$;
9853
+
9854
+ window.Pelcro.user.refresh({
9855
+ auth_token: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : (_window$Pelcro6$user$ = _window$Pelcro6$user.read()) === null || _window$Pelcro6$user$ === void 0 ? void 0 : _window$Pelcro6$user$.auth_token
9856
+ }, (err, res) => {
9857
+ if (err) {
9858
+ console.error(err);
9859
+ }
9860
+
9861
+ if (res) {
9862
+ return res.data;
9863
+ }
9864
+ });
9865
+ };
9844
9866
 
9845
9867
  const resources = {
9846
9868
  en: {
@@ -12827,8 +12849,8 @@ const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
12827
12849
  const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
12828
12850
  const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
12829
12851
  const SET_IS_DEFAULT_PAYMENT_METHOD = "SET_IS_DEFAULT_PAYMENT_METHOD";
12830
- const SET_DELETE_PAYMENT_METHOD_OPTION = "SET_DELETE_PAYMENT_METHOD_OPTION";
12831
12852
  const SET_PAYMENT_METHODS = "SET_PAYMENT_METHODS";
12853
+ const SHOW_PAYMENT_METHOD_SELECT = "SHOW_PAYMENT_METHOD_SELECT";
12832
12854
  const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
12833
12855
  const SET_EMAILS = "SET_EMAILS";
12834
12856
  const SET_EMAILS_ERROR = "SET_EMAILS_ERROR";
@@ -23227,6 +23249,7 @@ const PaymentMethodContainerWithoutStripe = ({
23227
23249
  content: t("messages.sourceCreated")
23228
23250
  }
23229
23251
  });
23252
+ refreshUser();
23230
23253
  onSuccess(res);
23231
23254
  });
23232
23255
  }
@@ -23285,6 +23308,7 @@ const PaymentMethodContainerWithoutStripe = ({
23285
23308
  });
23286
23309
  }
23287
23310
 
23311
+ refreshUser();
23288
23312
  onSuccess(res);
23289
23313
  });
23290
23314
  }, 2000);
@@ -23349,6 +23373,7 @@ const PaymentMethodContainerWithoutStripe = ({
23349
23373
  content: t("messages.sourceUpdated")
23350
23374
  }
23351
23375
  });
23376
+ refreshUser();
23352
23377
  onSuccess(res);
23353
23378
  });
23354
23379
  }
@@ -23755,6 +23780,7 @@ const PaymentMethodContainerWithoutStripe = ({
23755
23780
  type: LOADING,
23756
23781
  payload: false
23757
23782
  });
23783
+ refreshUser();
23758
23784
  onSuccess(res);
23759
23785
  return;
23760
23786
  }
@@ -23771,6 +23797,7 @@ const PaymentMethodContainerWithoutStripe = ({
23771
23797
  content: t("messages.sourceCreated")
23772
23798
  }
23773
23799
  });
23800
+ refreshUser();
23774
23801
  onSuccess(res);
23775
23802
  return;
23776
23803
  }
@@ -23791,6 +23818,7 @@ const PaymentMethodContainerWithoutStripe = ({
23791
23818
  content: t("messages.sourceUpdated")
23792
23819
  }
23793
23820
  });
23821
+ refreshUser();
23794
23822
  onSuccess(res);
23795
23823
  return;
23796
23824
  }
@@ -23821,6 +23849,7 @@ const PaymentMethodContainerWithoutStripe = ({
23821
23849
  });
23822
23850
  }
23823
23851
 
23852
+ refreshUser();
23824
23853
  onSuccess(res);
23825
23854
  });
23826
23855
  }, 2000);
@@ -24093,6 +24122,7 @@ const PaymentMethodContainerWithoutStripe = ({
24093
24122
  content: t("messages.sourceCreated")
24094
24123
  }
24095
24124
  });
24125
+ refreshUser();
24096
24126
  onSuccess(res);
24097
24127
  }
24098
24128
  });
@@ -24149,6 +24179,7 @@ const PaymentMethodContainerWithoutStripe = ({
24149
24179
  content: t("messages.sourceUpdated")
24150
24180
  }
24151
24181
  });
24182
+ refreshUser();
24152
24183
  onSuccess(res);
24153
24184
  }
24154
24185
  });
@@ -24224,6 +24255,7 @@ const PaymentMethodContainerWithoutStripe = ({
24224
24255
  });
24225
24256
  }
24226
24257
 
24258
+ refreshUser();
24227
24259
  onSuccess(res);
24228
24260
  });
24229
24261
  }, 2000);
@@ -33717,9 +33749,7 @@ const BillingAddressSelectModal = ({
33717
33749
  BillingAddressSelectModal.viewId = "billing-address-select";
33718
33750
 
33719
33751
  const moveDefaultPaymentMethodToStart = paymentMethods => {
33720
- var _window$Pelcro$user$r;
33721
-
33722
- const defaultPaymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.source;
33752
+ const defaultPaymentMethod = getDefaultPaymentMethod(paymentMethods);
33723
33753
  const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
33724
33754
 
33725
33755
  if (defaultPaymentMethod.status !== "chargeable") {
@@ -33729,9 +33759,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
33729
33759
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
33730
33760
  };
33731
33761
 
33762
+ const getDefaultPaymentMethod = paymentMethods => {
33763
+ const defaultPaymentMethod = paymentMethods.find(paymentMethod => paymentMethod.is_default);
33764
+ return defaultPaymentMethod;
33765
+ };
33766
+
33732
33767
  const initialState$6 = {
33733
33768
  paymentMethods: [],
33734
33769
  selectedPaymentMethodId: null,
33770
+ skeletonLoader: true,
33735
33771
  isSubmitting: false,
33736
33772
  alert: {
33737
33773
  type: "error",
@@ -33763,14 +33799,12 @@ const PaymentMethodSelectContainer = ({
33763
33799
  return onSuccess(selectedPaymentMethodId);
33764
33800
  };
33765
33801
 
33766
- const getInitialSelectedMethodId = () => {
33767
- var _window$Pelcro$user$r2;
33768
-
33802
+ const getInitialSelectedMethodId = paymentMethods => {
33769
33803
  if (selectedPaymentMethodIdFromStore) {
33770
33804
  return selectedPaymentMethodIdFromStore;
33771
33805
  }
33772
33806
 
33773
- const defaultMethod = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.source;
33807
+ const defaultMethod = getDefaultPaymentMethod(paymentMethods);
33774
33808
 
33775
33809
  if (defaultMethod && defaultMethod.status === "chargeable") {
33776
33810
  return String(defaultMethod.id);
@@ -33789,7 +33823,12 @@ const PaymentMethodSelectContainer = ({
33789
33823
  case LOAD_PAYMENT_METHODS:
33790
33824
  return lib_7({ ...state,
33791
33825
  paymentMethods: moveDefaultPaymentMethodToStart(action.payload),
33792
- selectedPaymentMethodId: getInitialSelectedMethodId()
33826
+ selectedPaymentMethodId: getInitialSelectedMethodId(action.payload)
33827
+ });
33828
+
33829
+ case SKELETON_LOADER:
33830
+ return lib_7({ ...state,
33831
+ skeletonLoader: action.payload
33793
33832
  });
33794
33833
 
33795
33834
  case HANDLE_SUBMIT:
@@ -33802,11 +33841,25 @@ const PaymentMethodSelectContainer = ({
33802
33841
  }
33803
33842
  }, initialState$6);
33804
33843
  useEffect(() => {
33805
- var _window$Pelcro$user$r3;
33844
+ window.Pelcro.paymentMethods.list({
33845
+ auth_token: window.Pelcro.user.read().auth_token
33846
+ }, (err, res) => {
33847
+ if (err) {
33848
+ return console.error(err);
33849
+ }
33806
33850
 
33807
- dispatch({
33808
- type: LOAD_PAYMENT_METHODS,
33809
- payload: (_window$Pelcro$user$r3 = window.Pelcro.user.read().sources) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : []
33851
+ if (res) {
33852
+ var _res$data;
33853
+
33854
+ dispatch({
33855
+ type: LOAD_PAYMENT_METHODS,
33856
+ payload: (_res$data = res.data) !== null && _res$data !== void 0 ? _res$data : []
33857
+ });
33858
+ dispatch({
33859
+ type: SKELETON_LOADER,
33860
+ payload: false
33861
+ });
33862
+ }
33810
33863
  });
33811
33864
  }, []);
33812
33865
  return /*#__PURE__*/React__default.createElement("div", {
@@ -33834,7 +33887,8 @@ const PaymentMethodSelectList = () => {
33834
33887
  dispatch,
33835
33888
  state: {
33836
33889
  paymentMethods,
33837
- selectedPaymentMethodId
33890
+ selectedPaymentMethodId,
33891
+ skeletonLoader
33838
33892
  }
33839
33893
  } = useContext(store$6);
33840
33894
 
@@ -33845,7 +33899,9 @@ const PaymentMethodSelectList = () => {
33845
33899
  });
33846
33900
  };
33847
33901
 
33848
- return /*#__PURE__*/React__default.createElement("div", {
33902
+ return /*#__PURE__*/React__default.createElement("div", null, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
33903
+ className: "plc-w-full plc-h-20 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
33904
+ }) : /*#__PURE__*/React__default.createElement("div", {
33849
33905
  className: "plc-px-3 plc-py-2 plc-space-y-4 plc-overflow-y-scroll plc-max-h-80 pelcro-payment-method-select-wrapper"
33850
33906
  }, paymentMethods.map(paymentMethod => {
33851
33907
  var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4, _paymentMethod$proper5;
@@ -33869,7 +33925,7 @@ const PaymentMethodSelectList = () => {
33869
33925
  }, (paymentMethod === null || paymentMethod === void 0 ? void 0 : (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.brand) === "bacs_debit" ? "••••" : "•••• •••• ••••", " ", paymentMethod === null || paymentMethod === void 0 ? void 0 : (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.last4), paymentMethod.properties.brand !== "bacs_debit" && /*#__PURE__*/React__default.createElement("p", {
33870
33926
  className: "plc-text-sm plc-text-gray-500"
33871
33927
  }, t("select.expires"), " ", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_month, "/", (_paymentMethod$proper5 = paymentMethod.properties) === null || _paymentMethod$proper5 === void 0 ? void 0 : _paymentMethod$proper5.exp_year))));
33872
- }));
33928
+ })));
33873
33929
  };
33874
33930
 
33875
33931
  const PaymentMethodSelectSubmit = ({
@@ -33979,10 +34035,10 @@ const initialState$5 = {
33979
34035
  paymentMethods: [],
33980
34036
  selectedPaymentMethodId: null,
33981
34037
  isSubmitting: false,
33982
- deleteOption: "",
33983
- disableSubmit: false,
34038
+ disableSubmit: true,
33984
34039
  isLoading: false,
33985
34040
  skeletonLoader: true,
34041
+ showPaymentMethodSelect: false,
33986
34042
  alert: {
33987
34043
  type: "error",
33988
34044
  content: ""
@@ -34021,20 +34077,20 @@ const PaymentMethodDeleteContainer = ({
34021
34077
  payload: false
34022
34078
  });
34023
34079
 
34024
- if (res.data.length !== 1) {
34080
+ if (res.data.length !== 1 && paymentMethodToDelete.is_default && paymentMethodToDelete.deletable) {
34025
34081
  dispatch({
34026
- type: SET_DELETE_PAYMENT_METHOD_OPTION,
34027
- payload: "select"
34028
- });
34029
- } else {
34030
- dispatch({
34031
- type: SET_DELETE_PAYMENT_METHOD_OPTION,
34032
- payload: "add"
34082
+ type: SHOW_PAYMENT_METHOD_SELECT,
34083
+ payload: true
34033
34084
  });
34034
34085
  }
34086
+
34087
+ dispatch({
34088
+ type: DISABLE_SUBMIT,
34089
+ payload: false
34090
+ });
34035
34091
  }
34036
34092
  });
34037
- }, []); // eslint-disable-line react-hooks/exhaustive-deps
34093
+ }, [paymentMethodToDelete]); // eslint-disable-line react-hooks/exhaustive-deps
34038
34094
 
34039
34095
  const setDefaultPaymentMethod = () => {
34040
34096
  const {
@@ -34046,6 +34102,15 @@ const PaymentMethodDeleteContainer = ({
34046
34102
  is_default: true
34047
34103
  }, (err, res) => {
34048
34104
  if (err) {
34105
+ dispatch({
34106
+ type: DISABLE_SUBMIT,
34107
+ payload: false
34108
+ });
34109
+ dispatch({
34110
+ type: LOADING,
34111
+ payload: false
34112
+ });
34113
+ console.log(err);
34049
34114
  onFailure(err);
34050
34115
  return dispatch({
34051
34116
  type: SHOW_ALERT,
@@ -34070,6 +34135,15 @@ const PaymentMethodDeleteContainer = ({
34070
34135
  auth_token: window.Pelcro.user.read().auth_token,
34071
34136
  payment_method_id: paymentMethodId
34072
34137
  }, (err, res) => {
34138
+ dispatch({
34139
+ type: DISABLE_SUBMIT,
34140
+ payload: false
34141
+ });
34142
+ dispatch({
34143
+ type: LOADING,
34144
+ payload: false
34145
+ });
34146
+
34073
34147
  if (err) {
34074
34148
  onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
34075
34149
  return dispatch({
@@ -34081,14 +34155,7 @@ const PaymentMethodDeleteContainer = ({
34081
34155
  });
34082
34156
  }
34083
34157
 
34084
- dispatch({
34085
- type: DISABLE_SUBMIT,
34086
- payload: false
34087
- });
34088
- dispatch({
34089
- type: LOADING,
34090
- payload: false
34091
- });
34158
+ refreshUser();
34092
34159
  onSuccess(res);
34093
34160
  });
34094
34161
  };
@@ -34104,11 +34171,12 @@ const PaymentMethodDeleteContainer = ({
34104
34171
  return lib_5({ ...state,
34105
34172
  disableSubmit: true,
34106
34173
  isLoading: true
34107
- }, (state, dispatch) => setDefaultPaymentMethod());
34108
-
34109
- case SET_DELETE_PAYMENT_METHOD_OPTION:
34110
- return lib_7({ ...state,
34111
- deleteOption: action.payload
34174
+ }, (state, dispatch) => {
34175
+ if (state.showPaymentMethodSelect) {
34176
+ setDefaultPaymentMethod();
34177
+ } else {
34178
+ deletePaymentMethod();
34179
+ }
34112
34180
  });
34113
34181
 
34114
34182
  case SET_PAYMENT_METHODS:
@@ -34136,6 +34204,11 @@ const PaymentMethodDeleteContainer = ({
34136
34204
  skeletonLoader: action.payload
34137
34205
  });
34138
34206
 
34207
+ case SHOW_PAYMENT_METHOD_SELECT:
34208
+ return lib_7({ ...state,
34209
+ showPaymentMethodSelect: action.payload
34210
+ });
34211
+
34139
34212
  default:
34140
34213
  return state;
34141
34214
  }
@@ -34157,34 +34230,6 @@ const PaymentMethodDeleteContainer = ({
34157
34230
  })));
34158
34231
  };
34159
34232
 
34160
- const PaymentMethodDeleteSubmit = ({
34161
- name,
34162
- onClick,
34163
- ...otherProps
34164
- }) => {
34165
- const {
34166
- t
34167
- } = useTranslation("paymentMethod");
34168
- const {
34169
- dispatch,
34170
- state: {
34171
- isLoading,
34172
- isDisabled
34173
- }
34174
- } = useContext(store$5);
34175
- return /*#__PURE__*/React__default.createElement(Button, Object.assign({
34176
- onClick: () => {
34177
- dispatch({
34178
- type: HANDLE_SUBMIT
34179
- });
34180
- onClick === null || onClick === void 0 ? void 0 : onClick();
34181
- },
34182
- disabled: isDisabled,
34183
- isLoading: isLoading,
34184
- className: "plc-w-full"
34185
- }, otherProps), name !== null && name !== void 0 ? name : t("select.buttons.selectPaymentMethod"));
34186
- };
34187
-
34188
34233
  const PaymentMethodDeleteList = props => {
34189
34234
  const {
34190
34235
  t
@@ -34192,16 +34237,28 @@ const PaymentMethodDeleteList = props => {
34192
34237
  const {
34193
34238
  dispatch,
34194
34239
  state: {
34195
- deleteOption,
34196
34240
  selectedPaymentMethodId,
34197
34241
  paymentMethods,
34198
- skeletonLoader
34242
+ skeletonLoader,
34243
+ showPaymentMethodSelect
34199
34244
  }
34200
34245
  } = useContext(store$5);
34201
34246
  const {
34202
34247
  paymentMethodToDelete
34203
34248
  } = usePelcro();
34204
34249
 
34250
+ const createPaymentMethodItems = () => {
34251
+ if (paymentMethods.length) {
34252
+ return paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => paymentMethod.properties.brand === "bacs_debit" ? /*#__PURE__*/React__default.createElement("option", {
34253
+ key: paymentMethod.id,
34254
+ value: paymentMethod.id
34255
+ }, "bacs - ", paymentMethod.properties.last4) : /*#__PURE__*/React__default.createElement("option", {
34256
+ key: paymentMethod.id,
34257
+ value: paymentMethod.id
34258
+ }, paymentMethod.properties.brand, " -", " ", paymentMethod.properties.last4, " -", " ", paymentMethod.properties.exp_month, " /", paymentMethod.properties.exp_year));
34259
+ }
34260
+ };
34261
+
34205
34262
  const handlePaymentMethodSelect = event => {
34206
34263
  dispatch({
34207
34264
  type: SELECT_PAYMENT_METHOD,
@@ -34209,102 +34266,124 @@ const PaymentMethodDeleteList = props => {
34209
34266
  });
34210
34267
  };
34211
34268
 
34212
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
34213
- className: "plc-w-full plc-h-40 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
34214
- }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethods && deleteOption === "select" && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
34215
- className: "plc-px-3 plc-py-2 plc-space-y-4 plc-overflow-y-scroll no-scrollbar plc-max-h-80 pelcro-payment-method-select-wrapper plc-mb-4"
34216
- }, paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => {
34217
- var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4, _paymentMethod$proper5;
34218
-
34219
- const isSelected = selectedPaymentMethodId === String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
34220
- return /*#__PURE__*/React__default.createElement("div", {
34221
- key: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
34222
- className: `plc-p-2 plc-pl-4 plc-shadow-md plc-text-gray-900 plc-rounded pelcro-payment-method-wrapper`
34223
- }, /*#__PURE__*/React__default.createElement(Radio, {
34224
- className: "plc-flex plc-items-center pelcro-select-payment-method-radio",
34225
- labelClassName: "plc-flex plc-items-center plc-space-x-2 plc-cursor-pointer plc-w-full",
34226
- id: `pelcro-payment-method-select-${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id}`,
34227
- name: "paymentMethod",
34228
- checked: isSelected,
34229
- value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
34230
- onChange: handlePaymentMethodSelect
34231
- }, getPaymentCardIcon((_paymentMethod$proper = paymentMethod.properties) === null || _paymentMethod$proper === void 0 ? void 0 : _paymentMethod$proper.brand), /*#__PURE__*/React__default.createElement("div", {
34232
- className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
34233
- }, /*#__PURE__*/React__default.createElement("p", {
34234
- className: "plc-font-semibold"
34235
- }, (paymentMethod === null || paymentMethod === void 0 ? void 0 : (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.brand) === "bacs_debit" ? "••••" : "•••• •••• ••••", " ", (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.last4), paymentMethod.properties.brand !== "bacs_debit" && /*#__PURE__*/React__default.createElement("p", {
34236
- className: "plc-text-sm plc-text-gray-500"
34237
- }, t("select.expires"), " ", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_month, "/", (_paymentMethod$proper5 = paymentMethod.properties) === null || _paymentMethod$proper5 === void 0 ? void 0 : _paymentMethod$proper5.exp_year))));
34238
- })), /*#__PURE__*/React__default.createElement("div", {
34239
- className: "plc-px-3"
34240
- }, /*#__PURE__*/React__default.createElement(PaymentMethodDeleteSubmit, null))), deleteOption === "add" && /*#__PURE__*/React__default.createElement(PaymentMethodView, {
34241
- type: "deletePaymentSource",
34242
- showCoupon: false,
34243
- showExternalPaymentMethods: false,
34244
- showApplePayButton: false,
34245
- onDisplay: props.onDisplay,
34246
- onFailure: props.onFailure,
34247
- onSuccess: props.onSuccess,
34248
- setAsDefault: true
34249
- })));
34269
+ if (showPaymentMethodSelect) {
34270
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
34271
+ className: "plc-w-full plc-h-8 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
34272
+ }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethods && /*#__PURE__*/React__default.createElement("div", {
34273
+ className: "plc-mt-4"
34274
+ }, /*#__PURE__*/React__default.createElement(Select, {
34275
+ label: t("delete.options.select"),
34276
+ name: "default-payment-method",
34277
+ onChange: handlePaymentMethodSelect,
34278
+ value: selectedPaymentMethodId
34279
+ }, /*#__PURE__*/React__default.createElement("option", {
34280
+ value: "",
34281
+ disabled: true,
34282
+ selected: true
34283
+ }), createPaymentMethodItems()))));
34284
+ } else {
34285
+ return null;
34286
+ }
34250
34287
  };
34251
34288
 
34252
- const PaymentMethodDeleteOptions = ({
34253
- subscription,
34254
- hasPhases,
34255
- onClick,
34256
- className
34257
- }) => {
34289
+ const PaymentMethodDetails = () => {
34290
+ var _paymentMethodToDelet, _paymentMethodToDelet2, _paymentMethodToDelet3, _paymentMethodToDelet4, _paymentMethodToDelet5;
34291
+
34258
34292
  const {
34259
34293
  state: {
34260
- deleteOption,
34261
- paymentMethods,
34262
34294
  skeletonLoader
34263
- },
34264
- dispatch
34295
+ }
34265
34296
  } = useContext(store$5);
34266
34297
  const {
34267
34298
  t
34268
34299
  } = useTranslation("paymentMethod");
34269
-
34270
- const handleOptionSelect = event => {
34271
- dispatch({
34272
- type: SET_DELETE_PAYMENT_METHOD_OPTION,
34273
- payload: event.target.value
34274
- });
34275
- };
34276
-
34300
+ const {
34301
+ paymentMethodToDelete
34302
+ } = usePelcro();
34277
34303
  return /*#__PURE__*/React__default.createElement("div", {
34278
34304
  className: "plc-text-left plc-mr-auto plc-mb-6"
34279
- }, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
34280
- className: "plc-flex plc-flex-col plc-space-y-3"
34281
- }, /*#__PURE__*/React__default.createElement(Radio, {
34282
- className: "plc-animate-puls"
34283
- }, /*#__PURE__*/React__default.createElement("div", {
34284
- className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
34285
- })), /*#__PURE__*/React__default.createElement(Radio, {
34286
- className: "plc-animate-pulse"
34305
+ }, /*#__PURE__*/React__default.createElement("h4", {
34306
+ className: "plc-mb-2"
34307
+ }, t("delete.details")), skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
34308
+ className: "plc-w-full plc-h-16 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
34309
+ }) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethodToDelete && /*#__PURE__*/React__default.createElement("div", {
34310
+ key: paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id,
34311
+ className: `plc-p-2 plc-pl-4 plc-shadow-md_dark plc-text-gray-900 plc-rounded pelcro-payment-method-wrapper`
34287
34312
  }, /*#__PURE__*/React__default.createElement("div", {
34288
- className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
34289
- }))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethods && paymentMethods.length !== 1 && /*#__PURE__*/React__default.createElement(Radio, {
34290
- onChange: handleOptionSelect,
34291
- checked: deleteOption === "select",
34292
- value: "select"
34293
- }, t("delete.options.select")), /*#__PURE__*/React__default.createElement(Radio, {
34294
- onChange: handleOptionSelect,
34295
- checked: deleteOption === "add",
34296
- value: "add"
34297
- }, t("delete.options.add"))));
34313
+ className: "plc-flex plc-items-center plc-space-x-2 plc-w-full pelcro-select-payment-method-radio",
34314
+ id: `pelcro-payment-method-select-${paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id}`,
34315
+ name: "paymentMethod"
34316
+ }, getPaymentCardIcon((_paymentMethodToDelet = paymentMethodToDelete.properties) === null || _paymentMethodToDelet === void 0 ? void 0 : _paymentMethodToDelet.brand), /*#__PURE__*/React__default.createElement("div", {
34317
+ className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
34318
+ }, /*#__PURE__*/React__default.createElement("p", {
34319
+ className: "plc-font-semibold"
34320
+ }, (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : (_paymentMethodToDelet2 = paymentMethodToDelete.properties) === null || _paymentMethodToDelet2 === void 0 ? void 0 : _paymentMethodToDelet2.brand) === "bacs_debit" ? "••••" : "•••• •••• ••••", " ", (_paymentMethodToDelet3 = paymentMethodToDelete.properties) === null || _paymentMethodToDelet3 === void 0 ? void 0 : _paymentMethodToDelet3.last4), paymentMethodToDelete.properties.brand !== "bacs_debit" && /*#__PURE__*/React__default.createElement("p", {
34321
+ className: "plc-text-sm plc-text-gray-500"
34322
+ }, t("select.expires"), " ", (_paymentMethodToDelet4 = paymentMethodToDelete.properties) === null || _paymentMethodToDelet4 === void 0 ? void 0 : _paymentMethodToDelet4.exp_month, "/", (_paymentMethodToDelet5 = paymentMethodToDelete.properties) === null || _paymentMethodToDelet5 === void 0 ? void 0 : _paymentMethodToDelet5.exp_year))))));
34323
+ };
34324
+
34325
+ const PaymentMethodDeleteSubmit = ({
34326
+ name,
34327
+ onClick,
34328
+ ...otherProps
34329
+ }) => {
34330
+ const {
34331
+ t
34332
+ } = useTranslation("paymentMethod");
34333
+ const {
34334
+ dispatch,
34335
+ state: {
34336
+ isLoading,
34337
+ disableSubmit,
34338
+ showPaymentMethodSelect,
34339
+ selectedPaymentMethodId
34340
+ }
34341
+ } = useContext(store$5);
34342
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
34343
+ onClick: () => {
34344
+ dispatch({
34345
+ type: HANDLE_SUBMIT
34346
+ });
34347
+ onClick === null || onClick === void 0 ? void 0 : onClick();
34348
+ },
34349
+ disabled: showPaymentMethodSelect ? !selectedPaymentMethodId : disableSubmit,
34350
+ isLoading: isLoading,
34351
+ className: "plc-w-full"
34352
+ }, otherProps), name !== null && name !== void 0 ? name : t("delete.buttons.delete"));
34353
+ };
34354
+
34355
+ const PaymentMethodDeleteBack = ({
34356
+ name,
34357
+ onClick,
34358
+ ...otherProps
34359
+ }) => {
34360
+ const {
34361
+ t
34362
+ } = useTranslation("paymentMethod");
34363
+ const {
34364
+ switchView
34365
+ } = usePelcro();
34366
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
34367
+ variant: "outline",
34368
+ onClick: () => {
34369
+ switchView("dashboard");
34370
+ onClick === null || onClick === void 0 ? void 0 : onClick();
34371
+ },
34372
+ className: "plc-w-full"
34373
+ }, otherProps), name !== null && name !== void 0 ? name : t("delete.buttons.back"));
34298
34374
  };
34299
34375
 
34300
34376
  function PaymentMethodDeleteView(props) {
34377
+ const {
34378
+ t
34379
+ } = useTranslation("paymentMethod");
34301
34380
  return /*#__PURE__*/React__default.createElement("div", {
34302
34381
  id: "pelcro-payment-method-delete-view"
34303
- }, /*#__PURE__*/React__default.createElement(PaymentMethodDeleteContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, {
34304
- className: "plc-mb-2"
34305
- }), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteOptions, null), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteList, {
34306
- onSuccess: props.onSuccess
34307
- })));
34382
+ }, /*#__PURE__*/React__default.createElement(PaymentMethodDeleteContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement(PaymentMethodDetails, null), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteList, null), /*#__PURE__*/React__default.createElement("p", {
34383
+ className: "plc-text-sm plc-text-justify"
34384
+ }, t("delete.message")), /*#__PURE__*/React__default.createElement("div", {
34385
+ className: "plc-space-x-0 plc-space-y-3 plc-w-full plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
34386
+ }, /*#__PURE__*/React__default.createElement(PaymentMethodDeleteSubmit, null), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteBack, null))));
34308
34387
  }
34309
34388
 
34310
34389
  const PaymentMethodDeleteModal = props => {
@@ -34337,7 +34416,7 @@ const PaymentMethodDeleteModal = props => {
34337
34416
  });
34338
34417
  }
34339
34418
 
34340
- notify.success(t("delete.paymentMethodReplaced"));
34419
+ notify.success(t("delete.deletedSuccessfully"));
34341
34420
  resetView();
34342
34421
  };
34343
34422
 
@@ -37187,38 +37266,9 @@ const PaymentCardsMenu = props => {
37187
37266
  return switchView("payment-method-update");
37188
37267
  };
37189
37268
 
37190
- const deletePaymentMethod = (paymentMethodId, onSuccess, onFailure) => {
37191
- // disable the Login button to prevent repeated clicks
37192
- window.Pelcro.paymentMethods.deletePaymentMethod({
37193
- auth_token: window.Pelcro.user.read().auth_token,
37194
- payment_method_id: paymentMethodId
37195
- }, (err, res) => {
37196
- if (err) {
37197
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
37198
- }
37199
-
37200
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
37201
- });
37202
- };
37203
-
37204
37269
  const onDeletePaymentMethodClick = source => {
37205
- const isDeletable = source === null || source === void 0 ? void 0 : source.deletable;
37206
-
37207
- if (isDeletable) {
37208
- notify.confirm((onSuccess, onFailure) => {
37209
- deletePaymentMethod(source.id, onSuccess, onFailure);
37210
- }, {
37211
- confirmMessage: t("messages.paymentMethodDeletion.isSureToDelete"),
37212
- loadingMessage: t("messages.paymentMethodDeletion.loading"),
37213
- successMessage: t("messages.paymentMethodDeletion.success"),
37214
- errorMessage: t("messages.paymentMethodDeletion.error")
37215
- }, {
37216
- closeButtonLabel: t("labels.subCancellation.goBack")
37217
- });
37218
- } else {
37219
- setPaymentMethodToDelete(source.id);
37220
- return switchView("payment-method-delete");
37221
- }
37270
+ setPaymentMethodToDelete(source.id);
37271
+ return switchView("payment-method-delete");
37222
37272
  };
37223
37273
 
37224
37274
  return /*#__PURE__*/React__default.createElement(Card, {
@@ -42294,4 +42344,4 @@ const QrCodeModal = ({
42294
42344
  };
42295
42345
  QrCodeModal.viewId = "qrcode";
42296
42346
 
42297
- export { AddNew, AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplePayButton, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, BillingAddressCreateModal, BillingAddressSelectModal, BillingAddressUpdateModal, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardAddresses, DashboardContainer, DashboardContent, DashboardDonations, DashboardGifts, DashboardHeading, DashboardInvoices, DashboardLink, DashboardMemberships, DashboardNewsletters, DashboardOpenButton, DashboardOrders, DashboardPasswordChange, DashboardPaymentCards, DashboardProfile, DashboardQRCode, DashboardSavedItems, DashboardSubscriptions, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodCreateContainer, PaymentMethodCreateModal, PaymentMethodCreateView, PaymentMethodDeleteContainer, PaymentMethodDeleteList, PaymentMethodDeleteModal, PaymentMethodDeleteOptions, PaymentMethodDeleteSubmit, PaymentMethodDeleteView, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateSetDefault, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedAddress, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
42347
+ export { AddNew, AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplePayButton, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, BillingAddressCreateModal, BillingAddressSelectModal, BillingAddressUpdateModal, Button, Card, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, Dashboard, DashboardAddresses, DashboardContainer, DashboardContent, DashboardDonations, DashboardGifts, DashboardHeading, DashboardInvoices, DashboardLink, DashboardMemberships, DashboardNewsletters, DashboardOpenButton, DashboardOrders, DashboardPasswordChange, DashboardPaymentCards, DashboardProfile, DashboardQRCode, DashboardSavedItems, DashboardSubscriptions, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, ModalHeader, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateFreeButton, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodCreateContainer, PaymentMethodCreateModal, PaymentMethodCreateView, PaymentMethodDeleteContainer, PaymentMethodDeleteList, PaymentMethodDeleteModal, PaymentMethodDeleteSubmit, PaymentMethodDeleteView, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateSetDefault, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedAddress, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };