@pelcro/react-pelcro-js 3.26.0-beta.28 → 3.26.0-beta.29
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 +402 -77
- package/dist/index.esm.js +400 -78
- package/dist/pelcro.css +17 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3324,17 +3324,23 @@ var select$6 = {
|
|
|
3324
3324
|
changePaymentMethod: "Change"
|
|
3325
3325
|
}
|
|
3326
3326
|
};
|
|
3327
|
+
var create$5 = {
|
|
3328
|
+
title: "Add a new payment method",
|
|
3329
|
+
subtitle: "Enter the fields below to add your credit card information"
|
|
3330
|
+
};
|
|
3327
3331
|
var paymentMethod_en = {
|
|
3328
3332
|
update: update$3,
|
|
3329
3333
|
select: select$6,
|
|
3330
3334
|
"delete": {
|
|
3331
|
-
title: "
|
|
3332
|
-
subtitle: "
|
|
3335
|
+
title: "Delete payment method",
|
|
3336
|
+
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
3337
|
options: {
|
|
3334
3338
|
select: "Select an existing payment method",
|
|
3335
3339
|
add: "Add a new payment method"
|
|
3336
|
-
}
|
|
3337
|
-
|
|
3340
|
+
},
|
|
3341
|
+
paymentMethodReplaced: "Payment Method Successfully Deleted and Replaced"
|
|
3342
|
+
},
|
|
3343
|
+
create: create$5
|
|
3338
3344
|
};
|
|
3339
3345
|
|
|
3340
3346
|
var title$z = "Enter your email to subscribe to our newsletter";
|
|
@@ -4270,9 +4276,23 @@ var select$4 = {
|
|
|
4270
4276
|
changePaymentMethod: "Modifier"
|
|
4271
4277
|
}
|
|
4272
4278
|
};
|
|
4279
|
+
var create$4 = {
|
|
4280
|
+
title: "Ajouter un nouveau mode de paiement",
|
|
4281
|
+
subtitle: "Saisissez les champs ci-dessous pour ajouter les informations relatives à votre carte de crédit"
|
|
4282
|
+
};
|
|
4273
4283
|
var paymentMethod_fr = {
|
|
4274
4284
|
update: update$2,
|
|
4275
|
-
select: select$4
|
|
4285
|
+
select: select$4,
|
|
4286
|
+
"delete": {
|
|
4287
|
+
title: "Supprimer un mode de paiement",
|
|
4288
|
+
subtitle: "Ce mode de paiement peut être associé à des abonnements actifs ou servir de mode de paiement par défaut. Veuillez choisir parmi les options disponibles ci-dessous pour le remplacement.",
|
|
4289
|
+
options: {
|
|
4290
|
+
select: "Sélectionner un mode de paiement existant",
|
|
4291
|
+
add: "Ajouter un nouveau mode de paiement"
|
|
4292
|
+
},
|
|
4293
|
+
paymentMethodReplaced: "Méthode de paiement supprimée et remplacée avec succès"
|
|
4294
|
+
},
|
|
4295
|
+
create: create$4
|
|
4276
4296
|
};
|
|
4277
4297
|
|
|
4278
4298
|
var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
@@ -4375,6 +4395,7 @@ var labels$P = {
|
|
|
4375
4395
|
lastName: "Nom de famille",
|
|
4376
4396
|
phone: "Téléphoner",
|
|
4377
4397
|
freeItems: "Articles gratuits",
|
|
4398
|
+
isDefault: "Défini comme valeur par défaut",
|
|
4378
4399
|
order: "Commande",
|
|
4379
4400
|
amount: "Montant",
|
|
4380
4401
|
email: "Courriel",
|
|
@@ -5197,9 +5218,23 @@ var select$2 = {
|
|
|
5197
5218
|
changePaymentMethod: "변경"
|
|
5198
5219
|
}
|
|
5199
5220
|
};
|
|
5221
|
+
var create$3 = {
|
|
5222
|
+
title: "새 결제 방법 추가",
|
|
5223
|
+
subtitle: "신용카드 정보를 추가하려면 아래 입력란을 입력하세요."
|
|
5224
|
+
};
|
|
5200
5225
|
var paymentMethod_ko = {
|
|
5201
5226
|
update: update$1,
|
|
5202
|
-
select: select$2
|
|
5227
|
+
select: select$2,
|
|
5228
|
+
"delete": {
|
|
5229
|
+
title: "결제 방법 삭제",
|
|
5230
|
+
subtitle: "이 결제 방법은 활성 구독과 연결되거나 기본 결제 방법으로 사용될 수 있습니다. 아래에서 사용 가능한 옵션 중에서 선택하여 대체하세요.",
|
|
5231
|
+
options: {
|
|
5232
|
+
select: "기존 결제 방법 선택",
|
|
5233
|
+
add: "새 결제 방법 추가"
|
|
5234
|
+
},
|
|
5235
|
+
paymentMethodReplaced: "결제 방법 삭제 및 교체 성공"
|
|
5236
|
+
},
|
|
5237
|
+
create: create$3
|
|
5203
5238
|
};
|
|
5204
5239
|
|
|
5205
5240
|
var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
|
|
@@ -5305,7 +5340,8 @@ var labels$x = {
|
|
|
5305
5340
|
order: "주문",
|
|
5306
5341
|
amount: "금액",
|
|
5307
5342
|
email: "이메일",
|
|
5308
|
-
password: "비밀번호"
|
|
5343
|
+
password: "비밀번호",
|
|
5344
|
+
isDefault: "기본값으로 설정"
|
|
5309
5345
|
};
|
|
5310
5346
|
var checkoutForm_ko = {
|
|
5311
5347
|
messages: messages$y,
|
|
@@ -6229,9 +6265,23 @@ var select = {
|
|
|
6229
6265
|
changePaymentMethod: "Cambiar"
|
|
6230
6266
|
}
|
|
6231
6267
|
};
|
|
6268
|
+
var create$2 = {
|
|
6269
|
+
title: "Añadir un nuevo método de pago",
|
|
6270
|
+
subtitle: "Introduzca los campos siguientes para añadir los datos de su tarjeta de crédito"
|
|
6271
|
+
};
|
|
6232
6272
|
var paymentMethod_es = {
|
|
6233
6273
|
update: update,
|
|
6234
|
-
select: select
|
|
6274
|
+
select: select,
|
|
6275
|
+
"delete": {
|
|
6276
|
+
title: "Eliminar método de pago",
|
|
6277
|
+
subtitle: "Este método de pago podría estar asociado a suscripciones activas o servir como método de pago predeterminado. Elija entre las opciones disponibles a continuación para sustituirlo.",
|
|
6278
|
+
options: {
|
|
6279
|
+
select: "Seleccione un método de pago existente",
|
|
6280
|
+
add: "Añadir un nuevo método de pago"
|
|
6281
|
+
},
|
|
6282
|
+
paymentMethodReplaced: "Método de pago eliminado y sustituido correctamente"
|
|
6283
|
+
},
|
|
6284
|
+
create: create$2
|
|
6235
6285
|
};
|
|
6236
6286
|
|
|
6237
6287
|
var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
|
|
@@ -6337,7 +6387,8 @@ var labels$f = {
|
|
|
6337
6387
|
order: "Pida",
|
|
6338
6388
|
amount: "Importe",
|
|
6339
6389
|
email: "Correo",
|
|
6340
|
-
password: "Contraseña"
|
|
6390
|
+
password: "Contraseña",
|
|
6391
|
+
isDefault: "Fijar por defecto"
|
|
6341
6392
|
};
|
|
6342
6393
|
var checkoutForm_es = {
|
|
6343
6394
|
messages: messages$f,
|
|
@@ -9377,6 +9428,9 @@ const initialState$o = {
|
|
|
9377
9428
|
couponCode: null,
|
|
9378
9429
|
// memberships
|
|
9379
9430
|
selectedMembership: null,
|
|
9431
|
+
// paymentMethods
|
|
9432
|
+
paymentMethodToDelete: null,
|
|
9433
|
+
paymentMethodToEdit: null,
|
|
9380
9434
|
// User
|
|
9381
9435
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
9382
9436
|
selectedPaymentMethodId: null,
|
|
@@ -12812,6 +12866,7 @@ const SET_CONFIRM_PASSWORD = "SET_CONFIRM_PASSWORD";
|
|
|
12812
12866
|
const CONFIRM_PASSWORD_USED = "CONFIRM_PASSWORD_USED";
|
|
12813
12867
|
const DISABLE_SUBMIT = "DISABLE_SUBMIT";
|
|
12814
12868
|
const LOADING = "LOADING";
|
|
12869
|
+
const SKELETON_LOADER = "SKELETON_LOADER";
|
|
12815
12870
|
const SUBMIT_PAYMENT = "SUBMIT_PAYMENT";
|
|
12816
12871
|
const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
12817
12872
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
@@ -18262,7 +18317,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18262
18317
|
purchase(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18263
18318
|
} else if (type === "invoicePayment") {
|
|
18264
18319
|
payInvoice(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18265
|
-
} else if (type === "updatePaymentSource") {
|
|
18320
|
+
} else if (type === "createPaymentSource" || type === "updatePaymentSource") {
|
|
18266
18321
|
createNewCybersourceCard();
|
|
18267
18322
|
}
|
|
18268
18323
|
function createNewCybersourceCard() {
|
|
@@ -18592,7 +18647,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18592
18647
|
purchase(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18593
18648
|
} else if (type === "invoicePayment") {
|
|
18594
18649
|
payInvoice(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18595
|
-
} else if (type === "updatePaymentSource") {
|
|
18650
|
+
} else if (type === "createPaymentSource" || type === "updatePaymentSource") {
|
|
18596
18651
|
createNewTapCard();
|
|
18597
18652
|
}
|
|
18598
18653
|
function createNewTapCard() {
|
|
@@ -18803,12 +18858,10 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18803
18858
|
purchase(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18804
18859
|
} else if (type === "invoicePayment") {
|
|
18805
18860
|
payInvoice(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18861
|
+
} else if (type === "createPaymentSource") {
|
|
18862
|
+
createNewVantivCard();
|
|
18806
18863
|
} else if (type === "updatePaymentSource") {
|
|
18807
|
-
|
|
18808
|
-
updateVantivCard();
|
|
18809
|
-
} else {
|
|
18810
|
-
createNewVantivCard();
|
|
18811
|
-
}
|
|
18864
|
+
updateVantivCard();
|
|
18812
18865
|
} else if (type === "deletePaymentSource") {
|
|
18813
18866
|
replaceVantivCard();
|
|
18814
18867
|
}
|
|
@@ -18878,15 +18931,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18878
18931
|
payment_method_id: paymentMethodId
|
|
18879
18932
|
}, (err, res) => {
|
|
18880
18933
|
if (err) {
|
|
18881
|
-
|
|
18934
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
18935
|
+
return dispatch({
|
|
18936
|
+
type: SHOW_ALERT,
|
|
18937
|
+
payload: {
|
|
18938
|
+
type: "error",
|
|
18939
|
+
content: getErrorMessages(err)
|
|
18940
|
+
}
|
|
18941
|
+
});
|
|
18882
18942
|
}
|
|
18883
|
-
dispatch({
|
|
18884
|
-
type: SHOW_ALERT,
|
|
18885
|
-
payload: {
|
|
18886
|
-
type: "success",
|
|
18887
|
-
content: t("messages.sourceUpdated")
|
|
18888
|
-
}
|
|
18889
|
-
});
|
|
18890
18943
|
onSuccess(res);
|
|
18891
18944
|
});
|
|
18892
18945
|
});
|
|
@@ -19777,7 +19830,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19777
19830
|
}
|
|
19778
19831
|
});
|
|
19779
19832
|
};
|
|
19780
|
-
const
|
|
19833
|
+
const createPaymentSource = (state, dispatch) => {
|
|
19781
19834
|
return stripe.createSource({
|
|
19782
19835
|
type: "card"
|
|
19783
19836
|
}).then(_ref8 => {
|
|
@@ -19831,6 +19884,120 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19831
19884
|
});
|
|
19832
19885
|
});
|
|
19833
19886
|
};
|
|
19887
|
+
const updatePaymentSource = (state, dispatch) => {
|
|
19888
|
+
const {
|
|
19889
|
+
isDefault,
|
|
19890
|
+
month,
|
|
19891
|
+
year
|
|
19892
|
+
} = state;
|
|
19893
|
+
const {
|
|
19894
|
+
id: paymentMethodId
|
|
19895
|
+
} = paymentMethodToEdit;
|
|
19896
|
+
window.Pelcro.paymentMethods.update({
|
|
19897
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
19898
|
+
payment_method_id: paymentMethodId,
|
|
19899
|
+
gateway: "stripe",
|
|
19900
|
+
exp_month: month,
|
|
19901
|
+
exp_year: year,
|
|
19902
|
+
is_default: isDefault
|
|
19903
|
+
}, (err, res) => {
|
|
19904
|
+
dispatch({
|
|
19905
|
+
type: DISABLE_SUBMIT,
|
|
19906
|
+
payload: false
|
|
19907
|
+
});
|
|
19908
|
+
dispatch({
|
|
19909
|
+
type: LOADING,
|
|
19910
|
+
payload: false
|
|
19911
|
+
});
|
|
19912
|
+
if (err) {
|
|
19913
|
+
onFailure(err);
|
|
19914
|
+
return dispatch({
|
|
19915
|
+
type: SHOW_ALERT,
|
|
19916
|
+
payload: {
|
|
19917
|
+
type: "error",
|
|
19918
|
+
content: getErrorMessages(err)
|
|
19919
|
+
}
|
|
19920
|
+
});
|
|
19921
|
+
}
|
|
19922
|
+
dispatch({
|
|
19923
|
+
type: SHOW_ALERT,
|
|
19924
|
+
payload: {
|
|
19925
|
+
type: "success",
|
|
19926
|
+
content: t("messages.sourceUpdated")
|
|
19927
|
+
}
|
|
19928
|
+
});
|
|
19929
|
+
onSuccess(res);
|
|
19930
|
+
});
|
|
19931
|
+
};
|
|
19932
|
+
const replacePaymentSource = (state, dispatch) => {
|
|
19933
|
+
const {
|
|
19934
|
+
id: paymentMethodId
|
|
19935
|
+
} = paymentMethodToDelete;
|
|
19936
|
+
return stripe.createSource({
|
|
19937
|
+
type: "card"
|
|
19938
|
+
}).then(_ref9 => {
|
|
19939
|
+
var _source$card3;
|
|
19940
|
+
let {
|
|
19941
|
+
source,
|
|
19942
|
+
error
|
|
19943
|
+
} = _ref9;
|
|
19944
|
+
if (error) {
|
|
19945
|
+
return handlePaymentError(error);
|
|
19946
|
+
}
|
|
19947
|
+
|
|
19948
|
+
// We don't support source creation for 3D secure yet
|
|
19949
|
+
if ((source === null || source === void 0 ? void 0 : (_source$card3 = source.card) === null || _source$card3 === void 0 ? void 0 : _source$card3.three_d_secure) === "required") {
|
|
19950
|
+
return handlePaymentError({
|
|
19951
|
+
error: {
|
|
19952
|
+
message: t("messages.cardAuthNotSupported")
|
|
19953
|
+
}
|
|
19954
|
+
});
|
|
19955
|
+
}
|
|
19956
|
+
window.Pelcro.paymentMethods.create({
|
|
19957
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
19958
|
+
token: source.id
|
|
19959
|
+
}, (err, res) => {
|
|
19960
|
+
if (err) {
|
|
19961
|
+
onFailure(err);
|
|
19962
|
+
return dispatch({
|
|
19963
|
+
type: SHOW_ALERT,
|
|
19964
|
+
payload: {
|
|
19965
|
+
type: "error",
|
|
19966
|
+
content: getErrorMessages(err)
|
|
19967
|
+
}
|
|
19968
|
+
});
|
|
19969
|
+
}
|
|
19970
|
+
if (res) {
|
|
19971
|
+
setTimeout(() => {
|
|
19972
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
19973
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
19974
|
+
payment_method_id: paymentMethodId
|
|
19975
|
+
}, (err, res) => {
|
|
19976
|
+
dispatch({
|
|
19977
|
+
type: DISABLE_SUBMIT,
|
|
19978
|
+
payload: false
|
|
19979
|
+
});
|
|
19980
|
+
dispatch({
|
|
19981
|
+
type: LOADING,
|
|
19982
|
+
payload: false
|
|
19983
|
+
});
|
|
19984
|
+
if (err) {
|
|
19985
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
19986
|
+
return dispatch({
|
|
19987
|
+
type: SHOW_ALERT,
|
|
19988
|
+
payload: {
|
|
19989
|
+
type: "error",
|
|
19990
|
+
content: getErrorMessages(err)
|
|
19991
|
+
}
|
|
19992
|
+
});
|
|
19993
|
+
}
|
|
19994
|
+
onSuccess(res);
|
|
19995
|
+
});
|
|
19996
|
+
}, 1000);
|
|
19997
|
+
}
|
|
19998
|
+
});
|
|
19999
|
+
});
|
|
20000
|
+
};
|
|
19834
20001
|
const updatePaymentRequest = state => {
|
|
19835
20002
|
var _state$paymentRequest;
|
|
19836
20003
|
state === null || state === void 0 ? void 0 : (_state$paymentRequest = state.paymentRequest) === null || _state$paymentRequest === void 0 ? void 0 : _state$paymentRequest.update({
|
|
@@ -19910,12 +20077,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19910
20077
|
}
|
|
19911
20078
|
stripe.createSource({
|
|
19912
20079
|
type: "card"
|
|
19913
|
-
}).then(
|
|
19914
|
-
var
|
|
20080
|
+
}).then(_ref10 => {
|
|
20081
|
+
var _ref11, _ref12, _state$updatedPrice;
|
|
19915
20082
|
let {
|
|
19916
20083
|
source,
|
|
19917
20084
|
error
|
|
19918
|
-
} =
|
|
20085
|
+
} = _ref10;
|
|
19919
20086
|
if (error) {
|
|
19920
20087
|
return handlePaymentError(error);
|
|
19921
20088
|
}
|
|
@@ -19934,7 +20101,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19934
20101
|
return total + item.price * item.quantity;
|
|
19935
20102
|
}, 0);
|
|
19936
20103
|
};
|
|
19937
|
-
(
|
|
20104
|
+
(_ref11 = (_ref12 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref12 !== void 0 ? _ref12 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref11 !== void 0 ? _ref11 : getOrderItemsTotal();
|
|
19938
20105
|
return handlePayment(source);
|
|
19939
20106
|
}).catch(error => {
|
|
19940
20107
|
return handlePaymentError(error);
|
|
@@ -20178,9 +20345,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20178
20345
|
});
|
|
20179
20346
|
}
|
|
20180
20347
|
}
|
|
20348
|
+
if (type === "createPaymentSource") {
|
|
20349
|
+
return createPaymentSource(state, dispatch);
|
|
20350
|
+
}
|
|
20181
20351
|
if (type === "updatePaymentSource") {
|
|
20182
20352
|
return updatePaymentSource(state, dispatch);
|
|
20183
20353
|
}
|
|
20354
|
+
if (type === "deletePaymentSource") {
|
|
20355
|
+
return replacePaymentSource(state, dispatch);
|
|
20356
|
+
}
|
|
20184
20357
|
if (!isAuthenticated() && plan.type === "donation") {
|
|
20185
20358
|
return sendRegisterRequest(state, () => submitPayment(state));
|
|
20186
20359
|
} else {
|
|
@@ -20568,7 +20741,10 @@ const PelcroPaymentRequestButton = props => {
|
|
|
20568
20741
|
}
|
|
20569
20742
|
return null;
|
|
20570
20743
|
};
|
|
20571
|
-
const CheckoutForm =
|
|
20744
|
+
const CheckoutForm = _ref => {
|
|
20745
|
+
let {
|
|
20746
|
+
type
|
|
20747
|
+
} = _ref;
|
|
20572
20748
|
const {
|
|
20573
20749
|
selectedPaymentMethodId
|
|
20574
20750
|
} = usePelcro();
|
|
@@ -20605,6 +20781,21 @@ const CheckoutForm = () => {
|
|
|
20605
20781
|
}))));
|
|
20606
20782
|
}
|
|
20607
20783
|
if (cardProcessor === "stripe") {
|
|
20784
|
+
if (type === "updatePaymentSource") {
|
|
20785
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
20786
|
+
className: "plc-flex plc-items-end plc-justify-between plc-my-2"
|
|
20787
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
20788
|
+
className: "plc-w-6/12 plc-pr-4"
|
|
20789
|
+
}, /*#__PURE__*/React__default.createElement(MonthSelect, {
|
|
20790
|
+
store: store$l,
|
|
20791
|
+
placeholder: "Exp Month *"
|
|
20792
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
20793
|
+
className: "plc-w-6/12"
|
|
20794
|
+
}, /*#__PURE__*/React__default.createElement(YearSelect, {
|
|
20795
|
+
store: store$l,
|
|
20796
|
+
placeholder: "Exp Year *"
|
|
20797
|
+
})));
|
|
20798
|
+
}
|
|
20608
20799
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(PelcroCardNumber, {
|
|
20609
20800
|
autoFocus: true
|
|
20610
20801
|
}), /*#__PURE__*/React__default.createElement("img", {
|
|
@@ -21799,7 +21990,9 @@ function PaymentMethodView(_ref) {
|
|
|
21799
21990
|
label: t("labels.email"),
|
|
21800
21991
|
required: true,
|
|
21801
21992
|
autoFocus: true
|
|
21802
|
-
})), /*#__PURE__*/React__default.createElement(CheckoutForm,
|
|
21993
|
+
})), /*#__PURE__*/React__default.createElement(CheckoutForm, {
|
|
21994
|
+
type: type
|
|
21995
|
+
}), showCoupon && /*#__PURE__*/React__default.createElement("div", {
|
|
21803
21996
|
className: "plc-mb-2"
|
|
21804
21997
|
}, /*#__PURE__*/React__default.createElement(CouponCode, null), /*#__PURE__*/React__default.createElement(DiscountedPrice, null)), /*#__PURE__*/React__default.createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default.createElement(PaymentMethodUpdateSetDefault, {
|
|
21805
21998
|
id: "pelcro-input-is-default",
|
|
@@ -28518,7 +28711,10 @@ const initialState$4 = {
|
|
|
28518
28711
|
paymentMethods: [],
|
|
28519
28712
|
selectedPaymentMethodId: null,
|
|
28520
28713
|
isSubmitting: false,
|
|
28521
|
-
deleteOption: "
|
|
28714
|
+
deleteOption: "",
|
|
28715
|
+
disableSubmit: false,
|
|
28716
|
+
isLoading: false,
|
|
28717
|
+
skeletonLoader: true,
|
|
28522
28718
|
alert: {
|
|
28523
28719
|
type: "error",
|
|
28524
28720
|
content: ""
|
|
@@ -28551,28 +28747,32 @@ const PaymentMethodDeleteContainer = _ref => {
|
|
|
28551
28747
|
type: SET_PAYMENT_METHODS,
|
|
28552
28748
|
payload: res.data
|
|
28553
28749
|
});
|
|
28554
|
-
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28560
|
-
|
|
28561
|
-
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28750
|
+
dispatch({
|
|
28751
|
+
type: SKELETON_LOADER,
|
|
28752
|
+
payload: false
|
|
28753
|
+
});
|
|
28754
|
+
if (res.data.length !== 1) {
|
|
28755
|
+
dispatch({
|
|
28756
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28757
|
+
payload: "select"
|
|
28758
|
+
});
|
|
28759
|
+
} else {
|
|
28760
|
+
dispatch({
|
|
28761
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28762
|
+
payload: "add"
|
|
28763
|
+
});
|
|
28764
|
+
}
|
|
28565
28765
|
}
|
|
28566
28766
|
});
|
|
28567
|
-
}, []);
|
|
28767
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
28768
|
+
|
|
28568
28769
|
const setDefaultPaymentMethod = () => {
|
|
28569
28770
|
const {
|
|
28570
28771
|
selectedPaymentMethodId: paymentMethodId
|
|
28571
28772
|
} = state;
|
|
28572
|
-
window.Pelcro.paymentMethods.
|
|
28773
|
+
window.Pelcro.paymentMethods.setDefaultPaymentMethod({
|
|
28573
28774
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
28574
|
-
payment_method_id: paymentMethodId
|
|
28575
|
-
is_default: true
|
|
28775
|
+
payment_method_id: paymentMethodId
|
|
28576
28776
|
}, (err, res) => {
|
|
28577
28777
|
if (err) {
|
|
28578
28778
|
onFailure(err);
|
|
@@ -28584,7 +28784,9 @@ const PaymentMethodDeleteContainer = _ref => {
|
|
|
28584
28784
|
}
|
|
28585
28785
|
});
|
|
28586
28786
|
}
|
|
28587
|
-
|
|
28787
|
+
setTimeout(() => {
|
|
28788
|
+
deletePaymentMethod();
|
|
28789
|
+
}, 1000);
|
|
28588
28790
|
});
|
|
28589
28791
|
};
|
|
28590
28792
|
const deletePaymentMethod = () => {
|
|
@@ -28596,14 +28798,22 @@ const PaymentMethodDeleteContainer = _ref => {
|
|
|
28596
28798
|
payment_method_id: paymentMethodId
|
|
28597
28799
|
}, (err, res) => {
|
|
28598
28800
|
if (err) {
|
|
28599
|
-
|
|
28801
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
28802
|
+
return dispatch({
|
|
28803
|
+
type: SHOW_ALERT,
|
|
28804
|
+
payload: {
|
|
28805
|
+
type: "error",
|
|
28806
|
+
content: getErrorMessages(err)
|
|
28807
|
+
}
|
|
28808
|
+
});
|
|
28600
28809
|
}
|
|
28601
28810
|
dispatch({
|
|
28602
|
-
type:
|
|
28603
|
-
payload:
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
|
|
28811
|
+
type: DISABLE_SUBMIT,
|
|
28812
|
+
payload: false
|
|
28813
|
+
});
|
|
28814
|
+
dispatch({
|
|
28815
|
+
type: LOADING,
|
|
28816
|
+
payload: false
|
|
28607
28817
|
});
|
|
28608
28818
|
onSuccess(res);
|
|
28609
28819
|
});
|
|
@@ -28618,7 +28828,8 @@ const PaymentMethodDeleteContainer = _ref => {
|
|
|
28618
28828
|
case HANDLE_SUBMIT:
|
|
28619
28829
|
return lib_5({
|
|
28620
28830
|
...state,
|
|
28621
|
-
|
|
28831
|
+
disableSubmit: true,
|
|
28832
|
+
isLoading: true
|
|
28622
28833
|
}, (state, dispatch) => setDefaultPaymentMethod());
|
|
28623
28834
|
case SET_DELETE_PAYMENT_METHOD_OPTION:
|
|
28624
28835
|
return lib_7({
|
|
@@ -28630,6 +28841,26 @@ const PaymentMethodDeleteContainer = _ref => {
|
|
|
28630
28841
|
...state,
|
|
28631
28842
|
paymentMethods: action.payload
|
|
28632
28843
|
});
|
|
28844
|
+
case SHOW_ALERT:
|
|
28845
|
+
return lib_7({
|
|
28846
|
+
...state,
|
|
28847
|
+
alert: action.payload
|
|
28848
|
+
});
|
|
28849
|
+
case DISABLE_SUBMIT:
|
|
28850
|
+
return lib_7({
|
|
28851
|
+
...state,
|
|
28852
|
+
disableSubmit: action.payload
|
|
28853
|
+
});
|
|
28854
|
+
case LOADING:
|
|
28855
|
+
return lib_7({
|
|
28856
|
+
...state,
|
|
28857
|
+
isLoading: action.payload
|
|
28858
|
+
});
|
|
28859
|
+
case SKELETON_LOADER:
|
|
28860
|
+
return lib_7({
|
|
28861
|
+
...state,
|
|
28862
|
+
skeletonLoader: action.payload
|
|
28863
|
+
});
|
|
28633
28864
|
default:
|
|
28634
28865
|
return state;
|
|
28635
28866
|
}
|
|
@@ -28664,8 +28895,8 @@ const PaymentMethodDeleteSubmit = _ref => {
|
|
|
28664
28895
|
const {
|
|
28665
28896
|
dispatch,
|
|
28666
28897
|
state: {
|
|
28667
|
-
|
|
28668
|
-
|
|
28898
|
+
isLoading,
|
|
28899
|
+
isDisabled
|
|
28669
28900
|
}
|
|
28670
28901
|
} = useContext(store$4);
|
|
28671
28902
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
@@ -28675,8 +28906,8 @@ const PaymentMethodDeleteSubmit = _ref => {
|
|
|
28675
28906
|
});
|
|
28676
28907
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
28677
28908
|
},
|
|
28678
|
-
disabled:
|
|
28679
|
-
isLoading:
|
|
28909
|
+
disabled: isDisabled,
|
|
28910
|
+
isLoading: isLoading,
|
|
28680
28911
|
className: "plc-w-full"
|
|
28681
28912
|
}, otherProps), name !== null && name !== void 0 ? name : t("select.buttons.selectPaymentMethod"));
|
|
28682
28913
|
};
|
|
@@ -28690,7 +28921,8 @@ const PaymentMethodDeleteList = props => {
|
|
|
28690
28921
|
state: {
|
|
28691
28922
|
deleteOption,
|
|
28692
28923
|
selectedPaymentMethodId,
|
|
28693
|
-
paymentMethods
|
|
28924
|
+
paymentMethods,
|
|
28925
|
+
skeletonLoader
|
|
28694
28926
|
}
|
|
28695
28927
|
} = useContext(store$4);
|
|
28696
28928
|
const {
|
|
@@ -28702,8 +28934,10 @@ const PaymentMethodDeleteList = props => {
|
|
|
28702
28934
|
payload: event.target.value
|
|
28703
28935
|
});
|
|
28704
28936
|
};
|
|
28705
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null,
|
|
28706
|
-
className: "plc-
|
|
28937
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
|
|
28938
|
+
className: "plc-w-full plc-h-40 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
|
|
28939
|
+
}) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethods && deleteOption === "select" && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
28940
|
+
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"
|
|
28707
28941
|
}, paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => {
|
|
28708
28942
|
var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4;
|
|
28709
28943
|
const isSelected = selectedPaymentMethodId === String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
@@ -28722,10 +28956,12 @@ const PaymentMethodDeleteList = props => {
|
|
|
28722
28956
|
className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
|
|
28723
28957
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
28724
28958
|
className: "plc-font-semibold"
|
|
28725
|
-
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ", (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.last4), /*#__PURE__*/React__default.createElement("p", {
|
|
28959
|
+
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022", " ", (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.last4), /*#__PURE__*/React__default.createElement("p", {
|
|
28726
28960
|
className: "plc-text-sm plc-text-gray-500"
|
|
28727
28961
|
}, t("select.expires"), " ", (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.exp_month, "/", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_year))));
|
|
28728
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
28962
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
28963
|
+
className: "plc-px-3"
|
|
28964
|
+
}, /*#__PURE__*/React__default.createElement(PaymentMethodDeleteSubmit, null))), deleteOption === "add" && /*#__PURE__*/React__default.createElement(PaymentMethodView, {
|
|
28729
28965
|
type: "deletePaymentSource",
|
|
28730
28966
|
showCoupon: false,
|
|
28731
28967
|
showExternalPaymentMethods: false,
|
|
@@ -28734,14 +28970,15 @@ const PaymentMethodDeleteList = props => {
|
|
|
28734
28970
|
onFailure: props.onFailure,
|
|
28735
28971
|
onSuccess: props.onSuccess,
|
|
28736
28972
|
setAsDefault: true
|
|
28737
|
-
}));
|
|
28973
|
+
})));
|
|
28738
28974
|
};
|
|
28739
28975
|
|
|
28740
28976
|
const PaymentMethodDeleteOptions = _ref => {
|
|
28741
28977
|
const {
|
|
28742
28978
|
state: {
|
|
28743
28979
|
deleteOption,
|
|
28744
|
-
paymentMethods
|
|
28980
|
+
paymentMethods,
|
|
28981
|
+
skeletonLoader
|
|
28745
28982
|
},
|
|
28746
28983
|
dispatch
|
|
28747
28984
|
} = useContext(store$4);
|
|
@@ -28756,27 +28993,53 @@ const PaymentMethodDeleteOptions = _ref => {
|
|
|
28756
28993
|
};
|
|
28757
28994
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28758
28995
|
className: "plc-text-left plc-mr-auto plc-mb-6"
|
|
28996
|
+
}, skeletonLoader ? /*#__PURE__*/React__default.createElement("div", {
|
|
28997
|
+
className: "plc-flex plc-flex-col plc-space-y-3"
|
|
28759
28998
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
28999
|
+
className: "plc-animate-puls"
|
|
29000
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
29001
|
+
className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
|
|
29002
|
+
})), /*#__PURE__*/React__default.createElement(Radio, {
|
|
29003
|
+
className: "plc-animate-pulse"
|
|
29004
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
29005
|
+
className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
|
|
29006
|
+
}))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, paymentMethods && paymentMethods.length !== 1 && /*#__PURE__*/React__default.createElement(Radio, {
|
|
29007
|
+
onChange: handleOptionSelect,
|
|
29008
|
+
checked: deleteOption === "select",
|
|
29009
|
+
value: "select"
|
|
29010
|
+
}, t("delete.options.select")), /*#__PURE__*/React__default.createElement(Radio, {
|
|
28760
29011
|
onChange: handleOptionSelect,
|
|
28761
29012
|
checked: deleteOption === "add",
|
|
28762
29013
|
value: "add"
|
|
28763
|
-
}, t("delete.options.add")));
|
|
29014
|
+
}, t("delete.options.add"))));
|
|
28764
29015
|
};
|
|
28765
29016
|
|
|
28766
|
-
function PaymentMethodDeleteView() {
|
|
29017
|
+
function PaymentMethodDeleteView(props) {
|
|
28767
29018
|
const [t] = useTranslation("paymentMethod");
|
|
28768
29019
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28769
29020
|
id: "pelcro-payment-method-delete-view"
|
|
28770
29021
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
28771
|
-
className: "plc-mb-
|
|
29022
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
28772
29023
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
28773
|
-
className: "plc-text-2xl plc-font-semibold"
|
|
28774
|
-
}, t("delete.title")), /*#__PURE__*/React__default.createElement("p",
|
|
29024
|
+
className: "plc-text-2xl plc-font-semibold plc-mb-2"
|
|
29025
|
+
}, t("delete.title")), /*#__PURE__*/React__default.createElement("p", {
|
|
29026
|
+
className: ""
|
|
29027
|
+
}, t("delete.subtitle"))), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, {
|
|
29028
|
+
className: "plc-mb-2"
|
|
29029
|
+
}), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteOptions, null), /*#__PURE__*/React__default.createElement(PaymentMethodDeleteList, {
|
|
29030
|
+
onSuccess: props.onSuccess
|
|
29031
|
+
})));
|
|
28775
29032
|
}
|
|
28776
29033
|
|
|
28777
29034
|
const PaymentMethodDeleteModal = props => {
|
|
28778
29035
|
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
29036
|
+
const {
|
|
29037
|
+
t
|
|
29038
|
+
} = useTranslation("paymentMethod");
|
|
28779
29039
|
const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_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.enableReactGA4;
|
|
29040
|
+
const {
|
|
29041
|
+
resetView
|
|
29042
|
+
} = usePelcro();
|
|
28780
29043
|
const onSuccess = res => {
|
|
28781
29044
|
var _props$onSuccess;
|
|
28782
29045
|
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
@@ -28792,6 +29055,8 @@ const PaymentMethodDeleteModal = props => {
|
|
|
28792
29055
|
nonInteraction: true
|
|
28793
29056
|
});
|
|
28794
29057
|
}
|
|
29058
|
+
notify.success(t("delete.paymentMethodReplaced"));
|
|
29059
|
+
resetView();
|
|
28795
29060
|
};
|
|
28796
29061
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
28797
29062
|
id: "pelcro-payment-method-delete-modal",
|
|
@@ -28803,6 +29068,64 @@ const PaymentMethodDeleteModal = props => {
|
|
|
28803
29068
|
};
|
|
28804
29069
|
PaymentMethodDeleteModal.viewId = "payment-method-delete";
|
|
28805
29070
|
|
|
29071
|
+
const PaymentMethodCreateContainer = props => {
|
|
29072
|
+
return /*#__PURE__*/React__default.createElement(PaymentMethodContainer, Object.assign({
|
|
29073
|
+
type: "createPaymentSource",
|
|
29074
|
+
className: "pelcro-payment-create-container"
|
|
29075
|
+
}, props));
|
|
29076
|
+
};
|
|
29077
|
+
|
|
29078
|
+
/**
|
|
29079
|
+
*
|
|
29080
|
+
*/
|
|
29081
|
+
function PaymentMethodCreateView(props) {
|
|
29082
|
+
const [t] = useTranslation("paymentMethod");
|
|
29083
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
29084
|
+
id: "pelcro-payment-method-create-view"
|
|
29085
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
29086
|
+
className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
29087
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
29088
|
+
className: "plc-text-2xl plc-font-semibold "
|
|
29089
|
+
}, t("create.title")), /*#__PURE__*/React__default.createElement("p", null, t("create.subtitle"))), /*#__PURE__*/React__default.createElement(PaymentMethodView, {
|
|
29090
|
+
type: "createPaymentSource",
|
|
29091
|
+
showCoupon: false,
|
|
29092
|
+
showExternalPaymentMethods: false,
|
|
29093
|
+
showApplePayButton: false,
|
|
29094
|
+
onDisplay: props.onDisplay,
|
|
29095
|
+
onFailure: props.onFailure,
|
|
29096
|
+
onSuccess: props.onSuccess
|
|
29097
|
+
}));
|
|
29098
|
+
}
|
|
29099
|
+
|
|
29100
|
+
const PaymentMethodCreateModal = props => {
|
|
29101
|
+
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
29102
|
+
const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_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.enableReactGA4;
|
|
29103
|
+
const onSuccess = res => {
|
|
29104
|
+
var _props$onSuccess;
|
|
29105
|
+
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
29106
|
+
if (enableReactGA4) {
|
|
29107
|
+
ReactGA4.event("Created payment card", {
|
|
29108
|
+
nonInteraction: true
|
|
29109
|
+
});
|
|
29110
|
+
} else {
|
|
29111
|
+
var _ReactGA$event;
|
|
29112
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
29113
|
+
category: "ACTIONS",
|
|
29114
|
+
action: "Created payment card",
|
|
29115
|
+
nonInteraction: true
|
|
29116
|
+
});
|
|
29117
|
+
}
|
|
29118
|
+
};
|
|
29119
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
29120
|
+
id: "pelcro-payment-method-create-modal",
|
|
29121
|
+
onDisplay: props.onDisplay,
|
|
29122
|
+
onClose: props.onClose
|
|
29123
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(PaymentMethodCreateView, Object.assign({}, props, {
|
|
29124
|
+
onSuccess: onSuccess
|
|
29125
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
29126
|
+
};
|
|
29127
|
+
PaymentMethodCreateModal.viewId = "payment-method-create";
|
|
29128
|
+
|
|
28806
29129
|
function _extends$i() {
|
|
28807
29130
|
_extends$i = Object.assign || function (target) {
|
|
28808
29131
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -31271,16 +31594,15 @@ class Dashboard extends Component {
|
|
|
31271
31594
|
} else {
|
|
31272
31595
|
this.props.setPaymentMethodToDelete(source.id);
|
|
31273
31596
|
return this.props.setView("payment-method-delete");
|
|
31274
|
-
// this.props.onClose();
|
|
31275
|
-
// notify.warning(
|
|
31276
|
-
// this.locale("messages.paymentMethodDeletion.nonDeletable")
|
|
31277
|
-
// );
|
|
31278
31597
|
}
|
|
31279
31598
|
});
|
|
31280
31599
|
_defineProperty$3(this, "displayRedeem", () => {
|
|
31281
31600
|
return this.props.setView("gift-redeem");
|
|
31282
31601
|
});
|
|
31283
|
-
_defineProperty$3(this, "displaySourceCreate",
|
|
31602
|
+
_defineProperty$3(this, "displaySourceCreate", () => {
|
|
31603
|
+
return this.props.setView("payment-method-create");
|
|
31604
|
+
});
|
|
31605
|
+
_defineProperty$3(this, "displaySourceEdit", e => {
|
|
31284
31606
|
const source = e.currentTarget.dataset.key;
|
|
31285
31607
|
this.props.setPaymentMethodToEdit(source);
|
|
31286
31608
|
return this.props.setView("payment-method-update");
|
|
@@ -31560,7 +31882,7 @@ class Dashboard extends Component {
|
|
|
31560
31882
|
className: "plc-text-white",
|
|
31561
31883
|
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
31562
31884
|
"data-key": source.id,
|
|
31563
|
-
onClick: this.
|
|
31885
|
+
onClick: this.displaySourceEdit,
|
|
31564
31886
|
disabled: this.state.disableSubmit
|
|
31565
31887
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
31566
31888
|
id: "pelcro-button-delete-source-" + index,
|
|
@@ -35631,4 +35953,4 @@ const QrCodeModal = _ref => {
|
|
|
35631
35953
|
};
|
|
35632
35954
|
QrCodeModal.viewId = "qrcode";
|
|
35633
35955
|
|
|
35634
|
-
export { 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, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, DonationModalWithHook as DonationModal, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, 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, PaymentMethodDeleteContainer, PaymentMethodDeleteList, PaymentMethodDeleteModal, PaymentMethodDeleteOptions, PaymentMethodDeleteSubmit, PaymentMethodDeleteView, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateSetDefault, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, 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, 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 };
|
|
35956
|
+
export { 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, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, DonationModalWithHook as DonationModal, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, 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, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, 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, 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 };
|