@pelcro/react-pelcro-js 3.0.0-beta.1 → 3.0.0-beta.10
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 +1354 -518
- package/dist/index.esm.js +1346 -519
- package/dist/pelcro.css +48 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3246,7 +3246,7 @@ var validation$1 = {
|
|
|
3246
3246
|
enterEmail: "Un courriel est requis.",
|
|
3247
3247
|
enterPassword: "Mot de passe requis."
|
|
3248
3248
|
};
|
|
3249
|
-
var buttons$
|
|
3249
|
+
var buttons$9 = {
|
|
3250
3250
|
account: "Accès abonné(e)s",
|
|
3251
3251
|
login: "Se connecter"
|
|
3252
3252
|
};
|
|
@@ -3323,7 +3323,7 @@ var confirm$5 = {
|
|
|
3323
3323
|
};
|
|
3324
3324
|
var common_fr = {
|
|
3325
3325
|
validation: validation$1,
|
|
3326
|
-
buttons: buttons$
|
|
3326
|
+
buttons: buttons$9,
|
|
3327
3327
|
dashboard: dashboard$1,
|
|
3328
3328
|
select: select$3,
|
|
3329
3329
|
confirm: confirm$5
|
|
@@ -3334,7 +3334,7 @@ var validation = {
|
|
|
3334
3334
|
enterEmail: "Email address is required.",
|
|
3335
3335
|
enterPassword: "Password is required."
|
|
3336
3336
|
};
|
|
3337
|
-
var buttons$
|
|
3337
|
+
var buttons$8 = {
|
|
3338
3338
|
account: "My account",
|
|
3339
3339
|
login: "Login"
|
|
3340
3340
|
};
|
|
@@ -3411,7 +3411,7 @@ var confirm$4 = {
|
|
|
3411
3411
|
};
|
|
3412
3412
|
var common_en = {
|
|
3413
3413
|
validation: validation,
|
|
3414
|
-
buttons: buttons$
|
|
3414
|
+
buttons: buttons$8,
|
|
3415
3415
|
dashboard: dashboard,
|
|
3416
3416
|
select: select$2,
|
|
3417
3417
|
confirm: confirm$4
|
|
@@ -3461,10 +3461,10 @@ var paymentMethod_fr = {
|
|
|
3461
3461
|
select: select
|
|
3462
3462
|
};
|
|
3463
3463
|
|
|
3464
|
-
var title$
|
|
3464
|
+
var title$f = "Enter your email to subscribe to our newsletter";
|
|
3465
3465
|
var updateTitle$1 = "Update newsletter selections";
|
|
3466
3466
|
var subtitle$7 = "We may use your email for other marketing communication";
|
|
3467
|
-
var labels$
|
|
3467
|
+
var labels$p = {
|
|
3468
3468
|
submit: "Submit",
|
|
3469
3469
|
firstName: "First name",
|
|
3470
3470
|
lastName: "Last name",
|
|
@@ -3480,17 +3480,17 @@ var messages$r = {
|
|
|
3480
3480
|
here: "here"
|
|
3481
3481
|
};
|
|
3482
3482
|
var newsletter_en = {
|
|
3483
|
-
title: title$
|
|
3483
|
+
title: title$f,
|
|
3484
3484
|
updateTitle: updateTitle$1,
|
|
3485
3485
|
subtitle: subtitle$7,
|
|
3486
|
-
labels: labels$
|
|
3486
|
+
labels: labels$p,
|
|
3487
3487
|
messages: messages$r
|
|
3488
3488
|
};
|
|
3489
3489
|
|
|
3490
|
-
var title$
|
|
3490
|
+
var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
3491
3491
|
var updateTitle = "Mettre à jour son choix d'infolettres";
|
|
3492
3492
|
var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
|
|
3493
|
-
var labels$
|
|
3493
|
+
var labels$o = {
|
|
3494
3494
|
submit: "Lire l’article !",
|
|
3495
3495
|
firstName: "Prénom",
|
|
3496
3496
|
lastName: "Nom de famille",
|
|
@@ -3506,14 +3506,14 @@ var messages$q = {
|
|
|
3506
3506
|
here: "ici"
|
|
3507
3507
|
};
|
|
3508
3508
|
var newsletter_fr = {
|
|
3509
|
-
title: title$
|
|
3509
|
+
title: title$e,
|
|
3510
3510
|
updateTitle: updateTitle,
|
|
3511
3511
|
subtitle: subtitle$6,
|
|
3512
|
-
labels: labels$
|
|
3512
|
+
labels: labels$o,
|
|
3513
3513
|
messages: messages$q
|
|
3514
3514
|
};
|
|
3515
3515
|
|
|
3516
|
-
var labels$
|
|
3516
|
+
var labels$n = {
|
|
3517
3517
|
"continue": "Continue to content"
|
|
3518
3518
|
};
|
|
3519
3519
|
var messages$p = {
|
|
@@ -3532,18 +3532,22 @@ var messages$p = {
|
|
|
3532
3532
|
giftRedeem: {
|
|
3533
3533
|
title: "Congratulations",
|
|
3534
3534
|
content: "You have successfully redeemed your gift subscription. Enjoy!"
|
|
3535
|
+
},
|
|
3536
|
+
invoicePayment: {
|
|
3537
|
+
title: "Invoice paid successfully",
|
|
3538
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3535
3539
|
}
|
|
3536
3540
|
};
|
|
3537
3541
|
var errors$9 = {
|
|
3538
3542
|
"": ""
|
|
3539
3543
|
};
|
|
3540
3544
|
var success_en = {
|
|
3541
|
-
labels: labels$
|
|
3545
|
+
labels: labels$n,
|
|
3542
3546
|
messages: messages$p,
|
|
3543
3547
|
errors: errors$9
|
|
3544
3548
|
};
|
|
3545
3549
|
|
|
3546
|
-
var labels$
|
|
3550
|
+
var labels$m = {
|
|
3547
3551
|
"continue": "Abonnement réussi !"
|
|
3548
3552
|
};
|
|
3549
3553
|
var messages$o = {
|
|
@@ -3562,13 +3566,17 @@ var messages$o = {
|
|
|
3562
3566
|
giftRedeem: {
|
|
3563
3567
|
title: "Félicitations",
|
|
3564
3568
|
content: "Vous avez validé votre abonnement cadeau. Profitez-en!"
|
|
3569
|
+
},
|
|
3570
|
+
invoicePayment: {
|
|
3571
|
+
title: "Invoice paid successfully",
|
|
3572
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3565
3573
|
}
|
|
3566
3574
|
};
|
|
3567
3575
|
var errors$8 = {
|
|
3568
3576
|
"": ""
|
|
3569
3577
|
};
|
|
3570
3578
|
var success_fr = {
|
|
3571
|
-
labels: labels$
|
|
3579
|
+
labels: labels$m,
|
|
3572
3580
|
messages: messages$o,
|
|
3573
3581
|
errors: errors$8
|
|
3574
3582
|
};
|
|
@@ -3605,7 +3613,7 @@ var messages$l = {
|
|
|
3605
3613
|
youAreSafe: "You're safe - PCI compliant 128 SSL by",
|
|
3606
3614
|
bankRedirection: "Please hold, redirecting you to your bank."
|
|
3607
3615
|
};
|
|
3608
|
-
var labels$
|
|
3616
|
+
var labels$l = {
|
|
3609
3617
|
card: "Enter card number",
|
|
3610
3618
|
date: "Expiration date",
|
|
3611
3619
|
CVC: "CVC",
|
|
@@ -3625,14 +3633,14 @@ var labels$j = {
|
|
|
3625
3633
|
};
|
|
3626
3634
|
var checkoutForm_en = {
|
|
3627
3635
|
messages: messages$l,
|
|
3628
|
-
labels: labels$
|
|
3636
|
+
labels: labels$l
|
|
3629
3637
|
};
|
|
3630
3638
|
|
|
3631
3639
|
var messages$k = {
|
|
3632
3640
|
youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
|
|
3633
3641
|
bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
|
|
3634
3642
|
};
|
|
3635
|
-
var labels$
|
|
3643
|
+
var labels$k = {
|
|
3636
3644
|
card: "Entrez le numéro de carte",
|
|
3637
3645
|
date: "Date d’expiration",
|
|
3638
3646
|
CVC: "CVC",
|
|
@@ -3652,7 +3660,7 @@ var labels$i = {
|
|
|
3652
3660
|
};
|
|
3653
3661
|
var checkoutForm_fr = {
|
|
3654
3662
|
messages: messages$k,
|
|
3655
|
-
labels: labels$
|
|
3663
|
+
labels: labels$k
|
|
3656
3664
|
};
|
|
3657
3665
|
|
|
3658
3666
|
var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
|
|
@@ -3661,13 +3669,15 @@ var giftSent$1 = "Subscription gift has been sent to";
|
|
|
3661
3669
|
var successfully$1 = "successfully";
|
|
3662
3670
|
var entitlement$1 = "Some of the content on this page is available with one or more of our plans. <1>Subscribe</1> now to get full page access.";
|
|
3663
3671
|
var recaptcha$1 = "This site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <3>Terms of Service</3> apply.";
|
|
3672
|
+
var invalidInvoice$1 = "Invalid invoice ID, please contact support";
|
|
3664
3673
|
var messages_en = {
|
|
3665
3674
|
youAreSafe: youAreSafe$1,
|
|
3666
3675
|
cancel: cancel$1,
|
|
3667
3676
|
giftSent: giftSent$1,
|
|
3668
3677
|
successfully: successfully$1,
|
|
3669
3678
|
entitlement: entitlement$1,
|
|
3670
|
-
recaptcha: recaptcha$1
|
|
3679
|
+
recaptcha: recaptcha$1,
|
|
3680
|
+
invalidInvoice: invalidInvoice$1
|
|
3671
3681
|
};
|
|
3672
3682
|
|
|
3673
3683
|
var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
|
|
@@ -3676,16 +3686,18 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
|
|
|
3676
3686
|
var successfully = "avec succès.";
|
|
3677
3687
|
var entitlement = "Une partie du contenu de cette page est disponible sous un ou plusieurs de nos plans. <1>Abonnez-vous</1> à l'un de nos plans disponibles pour accéder à plus de contenu";
|
|
3678
3688
|
var recaptcha = "Ce site est protégé par reCAPTCHA - les <1>règles de confidentialité</1> Google ainsi que les <3>conditions d'utilisation</3> s'appliquent.";
|
|
3689
|
+
var invalidInvoice = "Invalid invoice ID, please contact support";
|
|
3679
3690
|
var messages_fr = {
|
|
3680
3691
|
youAreSafe: youAreSafe,
|
|
3681
3692
|
cancel: cancel,
|
|
3682
3693
|
giftSent: giftSent,
|
|
3683
3694
|
successfully: successfully,
|
|
3684
3695
|
entitlement: entitlement,
|
|
3685
|
-
recaptcha: recaptcha
|
|
3696
|
+
recaptcha: recaptcha,
|
|
3697
|
+
invalidInvoice: invalidInvoice
|
|
3686
3698
|
};
|
|
3687
3699
|
|
|
3688
|
-
var labels$
|
|
3700
|
+
var labels$j = {
|
|
3689
3701
|
email: "Enter email",
|
|
3690
3702
|
password: "Enter password",
|
|
3691
3703
|
required: "required",
|
|
@@ -3712,12 +3724,12 @@ var errors$5 = {
|
|
|
3712
3724
|
"": ""
|
|
3713
3725
|
};
|
|
3714
3726
|
var login_en = {
|
|
3715
|
-
labels: labels$
|
|
3727
|
+
labels: labels$j,
|
|
3716
3728
|
messages: messages$j,
|
|
3717
3729
|
errors: errors$5
|
|
3718
3730
|
};
|
|
3719
3731
|
|
|
3720
|
-
var labels$
|
|
3732
|
+
var labels$i = {
|
|
3721
3733
|
email: "Entrez votre adresse courriel",
|
|
3722
3734
|
password: "Entrez votre mot de passe",
|
|
3723
3735
|
required: "Champs obligatoires",
|
|
@@ -3744,14 +3756,14 @@ var errors$4 = {
|
|
|
3744
3756
|
"": ""
|
|
3745
3757
|
};
|
|
3746
3758
|
var login_fr = {
|
|
3747
|
-
labels: labels$
|
|
3759
|
+
labels: labels$i,
|
|
3748
3760
|
messages: messages$i,
|
|
3749
3761
|
errors: errors$4
|
|
3750
3762
|
};
|
|
3751
3763
|
|
|
3752
|
-
var title$
|
|
3764
|
+
var title$d = "Create an account";
|
|
3753
3765
|
var subtitle$5 = "Enter your email and password below";
|
|
3754
|
-
var labels$
|
|
3766
|
+
var labels$h = {
|
|
3755
3767
|
signUpFacebook: "Sign up with Facebook",
|
|
3756
3768
|
signUpGoogle: "Sign up with Google",
|
|
3757
3769
|
signUpEmail: "Sign up with Email",
|
|
@@ -3835,18 +3847,18 @@ var redeem$1 = {
|
|
|
3835
3847
|
}
|
|
3836
3848
|
};
|
|
3837
3849
|
var register_en = {
|
|
3838
|
-
title: title$
|
|
3850
|
+
title: title$d,
|
|
3839
3851
|
subtitle: subtitle$5,
|
|
3840
|
-
labels: labels$
|
|
3852
|
+
labels: labels$h,
|
|
3841
3853
|
messages: messages$h,
|
|
3842
3854
|
errors: errors$3,
|
|
3843
3855
|
gift: gift$1,
|
|
3844
3856
|
redeem: redeem$1
|
|
3845
3857
|
};
|
|
3846
3858
|
|
|
3847
|
-
var title$
|
|
3859
|
+
var title$c = "Créer un compte";
|
|
3848
3860
|
var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3849
|
-
var labels$
|
|
3861
|
+
var labels$g = {
|
|
3850
3862
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3851
3863
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
3852
3864
|
signUpEmail: "Inscrivez-vous avec votre courriel",
|
|
@@ -3931,16 +3943,16 @@ var redeem = {
|
|
|
3931
3943
|
}
|
|
3932
3944
|
};
|
|
3933
3945
|
var register_fr = {
|
|
3934
|
-
title: title$
|
|
3946
|
+
title: title$c,
|
|
3935
3947
|
subtitle: subtitle$4,
|
|
3936
|
-
labels: labels$
|
|
3948
|
+
labels: labels$g,
|
|
3937
3949
|
messages: messages$g,
|
|
3938
3950
|
errors: errors$2,
|
|
3939
3951
|
gift: gift,
|
|
3940
3952
|
redeem: redeem
|
|
3941
3953
|
};
|
|
3942
3954
|
|
|
3943
|
-
var labels$
|
|
3955
|
+
var labels$f = {
|
|
3944
3956
|
title: "Want to update your profile?",
|
|
3945
3957
|
subtitle: "Enter your information below to update your profile",
|
|
3946
3958
|
email: "Email",
|
|
@@ -3962,11 +3974,11 @@ var messages$f = {
|
|
|
3962
3974
|
pictureUpdated: "Your profile picture was updated successfully."
|
|
3963
3975
|
};
|
|
3964
3976
|
var userEdit_en = {
|
|
3965
|
-
labels: labels$
|
|
3977
|
+
labels: labels$f,
|
|
3966
3978
|
messages: messages$f
|
|
3967
3979
|
};
|
|
3968
3980
|
|
|
3969
|
-
var labels$
|
|
3981
|
+
var labels$e = {
|
|
3970
3982
|
title: "Voulez-vous mettre à jour votre profil ?",
|
|
3971
3983
|
subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
|
|
3972
3984
|
email: "Address courriel",
|
|
@@ -3988,14 +4000,14 @@ var messages$e = {
|
|
|
3988
4000
|
pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
|
|
3989
4001
|
};
|
|
3990
4002
|
var userEdit_fr = {
|
|
3991
|
-
labels: labels$
|
|
4003
|
+
labels: labels$e,
|
|
3992
4004
|
messages: messages$e
|
|
3993
4005
|
};
|
|
3994
4006
|
|
|
3995
|
-
var title$
|
|
4007
|
+
var title$b = "Enter your shipping address";
|
|
3996
4008
|
var selectAddressTitle$1 = "Please select an address";
|
|
3997
4009
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3998
|
-
var labels$
|
|
4010
|
+
var labels$d = {
|
|
3999
4011
|
address: "Address",
|
|
4000
4012
|
code: "Postal Code/Zip",
|
|
4001
4013
|
city: "City",
|
|
@@ -4005,7 +4017,7 @@ var labels$b = {
|
|
|
4005
4017
|
lastName: "Last name",
|
|
4006
4018
|
required: "required"
|
|
4007
4019
|
};
|
|
4008
|
-
var buttons$
|
|
4020
|
+
var buttons$7 = {
|
|
4009
4021
|
submit: "Submit",
|
|
4010
4022
|
selectAddress: "Select address",
|
|
4011
4023
|
addAddress: "Add new address"
|
|
@@ -4015,18 +4027,18 @@ var messages$d = {
|
|
|
4015
4027
|
subRedeemed: "Your subscription has been redeemed."
|
|
4016
4028
|
};
|
|
4017
4029
|
var address_en = {
|
|
4018
|
-
title: title$
|
|
4030
|
+
title: title$b,
|
|
4019
4031
|
selectAddressTitle: selectAddressTitle$1,
|
|
4020
4032
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
4021
|
-
labels: labels$
|
|
4022
|
-
buttons: buttons$
|
|
4033
|
+
labels: labels$d,
|
|
4034
|
+
buttons: buttons$7,
|
|
4023
4035
|
messages: messages$d
|
|
4024
4036
|
};
|
|
4025
4037
|
|
|
4026
|
-
var title$
|
|
4038
|
+
var title$a = "Entrez votre adresse de livraison";
|
|
4027
4039
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
4028
4040
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
4029
|
-
var labels$
|
|
4041
|
+
var labels$c = {
|
|
4030
4042
|
address: "Adresse",
|
|
4031
4043
|
code: "Code postal / Zip",
|
|
4032
4044
|
city: "Ville",
|
|
@@ -4036,7 +4048,7 @@ var labels$a = {
|
|
|
4036
4048
|
lastName: "Nom de famille",
|
|
4037
4049
|
required: "Champs obligatoires"
|
|
4038
4050
|
};
|
|
4039
|
-
var buttons$
|
|
4051
|
+
var buttons$6 = {
|
|
4040
4052
|
submit: "Valider",
|
|
4041
4053
|
selectAddress: "Choisir cette adresse",
|
|
4042
4054
|
addAddress: "Ajouter une nouvelle adresse"
|
|
@@ -4046,15 +4058,15 @@ var messages$c = {
|
|
|
4046
4058
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4047
4059
|
};
|
|
4048
4060
|
var address_fr = {
|
|
4049
|
-
title: title$
|
|
4061
|
+
title: title$a,
|
|
4050
4062
|
selectAddressTitle: selectAddressTitle,
|
|
4051
4063
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4052
|
-
labels: labels$
|
|
4053
|
-
buttons: buttons$
|
|
4064
|
+
labels: labels$c,
|
|
4065
|
+
buttons: buttons$6,
|
|
4054
4066
|
messages: messages$c
|
|
4055
4067
|
};
|
|
4056
4068
|
|
|
4057
|
-
var title$
|
|
4069
|
+
var title$9 = "Reset your password";
|
|
4058
4070
|
var subtitle$3 = "Enter a new password below";
|
|
4059
4071
|
var email$3 = "Email";
|
|
4060
4072
|
var password$3 = "Password";
|
|
@@ -4063,7 +4075,7 @@ var submit$5 = "Submit";
|
|
|
4063
4075
|
var required$5 = "Required";
|
|
4064
4076
|
var passwordUpdated$1 = "Password has been updated, please login with the new password";
|
|
4065
4077
|
var passwordReset_en = {
|
|
4066
|
-
title: title$
|
|
4078
|
+
title: title$9,
|
|
4067
4079
|
subtitle: subtitle$3,
|
|
4068
4080
|
email: email$3,
|
|
4069
4081
|
password: password$3,
|
|
@@ -4073,7 +4085,7 @@ var passwordReset_en = {
|
|
|
4073
4085
|
passwordUpdated: passwordUpdated$1
|
|
4074
4086
|
};
|
|
4075
4087
|
|
|
4076
|
-
var title$
|
|
4088
|
+
var title$8 = "Réinitialiser votre mot de passe";
|
|
4077
4089
|
var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
|
|
4078
4090
|
var email$2 = "Adresse courriel";
|
|
4079
4091
|
var password$2 = "Mot de passe";
|
|
@@ -4082,7 +4094,7 @@ var submit$4 = "Soumettre";
|
|
|
4082
4094
|
var required$4 = "Champs obligatoires";
|
|
4083
4095
|
var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
|
|
4084
4096
|
var passwordReset_fr = {
|
|
4085
|
-
title: title$
|
|
4097
|
+
title: title$8,
|
|
4086
4098
|
subtitle: subtitle$2,
|
|
4087
4099
|
email: email$2,
|
|
4088
4100
|
password: password$2,
|
|
@@ -4092,7 +4104,7 @@ var passwordReset_fr = {
|
|
|
4092
4104
|
passwordUpdated: passwordUpdated
|
|
4093
4105
|
};
|
|
4094
4106
|
|
|
4095
|
-
var title$
|
|
4107
|
+
var title$7 = "Forgot your password?";
|
|
4096
4108
|
var email$1 = "Email";
|
|
4097
4109
|
var password$1 = "Password";
|
|
4098
4110
|
var submit$3 = "Submit";
|
|
@@ -4103,7 +4115,7 @@ var messages$b = {
|
|
|
4103
4115
|
loginHere: "login here."
|
|
4104
4116
|
};
|
|
4105
4117
|
var passwordForgot_en = {
|
|
4106
|
-
title: title$
|
|
4118
|
+
title: title$7,
|
|
4107
4119
|
email: email$1,
|
|
4108
4120
|
password: password$1,
|
|
4109
4121
|
submit: submit$3,
|
|
@@ -4112,7 +4124,7 @@ var passwordForgot_en = {
|
|
|
4112
4124
|
messages: messages$b
|
|
4113
4125
|
};
|
|
4114
4126
|
|
|
4115
|
-
var title$
|
|
4127
|
+
var title$6 = "Mot de passe oublié ?";
|
|
4116
4128
|
var email = "Courriel";
|
|
4117
4129
|
var password = "Mot de passe";
|
|
4118
4130
|
var submit$2 = "Soumettre";
|
|
@@ -4123,7 +4135,7 @@ var messages$a = {
|
|
|
4123
4135
|
loginHere: "Connectez-vous ici"
|
|
4124
4136
|
};
|
|
4125
4137
|
var passwordForgot_fr = {
|
|
4126
|
-
title: title$
|
|
4138
|
+
title: title$6,
|
|
4127
4139
|
email: email,
|
|
4128
4140
|
password: password,
|
|
4129
4141
|
submit: submit$2,
|
|
@@ -4132,7 +4144,7 @@ var passwordForgot_fr = {
|
|
|
4132
4144
|
messages: messages$a
|
|
4133
4145
|
};
|
|
4134
4146
|
|
|
4135
|
-
var title$
|
|
4147
|
+
var title$5 = "Change your password";
|
|
4136
4148
|
var currentPassword$1 = "Current password";
|
|
4137
4149
|
var newPassword$1 = "New password";
|
|
4138
4150
|
var confirmNewPassword$1 = "Confirm new password";
|
|
@@ -4142,7 +4154,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
|
|
|
4142
4154
|
var passwordsNotMatching$1 = "Passwords don't match";
|
|
4143
4155
|
var weakPassword$1 = "Your password must contain at least 6 characters";
|
|
4144
4156
|
var passwordChange_en = {
|
|
4145
|
-
title: title$
|
|
4157
|
+
title: title$5,
|
|
4146
4158
|
currentPassword: currentPassword$1,
|
|
4147
4159
|
newPassword: newPassword$1,
|
|
4148
4160
|
confirmNewPassword: confirmNewPassword$1,
|
|
@@ -4153,7 +4165,7 @@ var passwordChange_en = {
|
|
|
4153
4165
|
weakPassword: weakPassword$1
|
|
4154
4166
|
};
|
|
4155
4167
|
|
|
4156
|
-
var title$
|
|
4168
|
+
var title$4 = "Changez votre mot de passe";
|
|
4157
4169
|
var currentPassword = "Mot de passe actuel";
|
|
4158
4170
|
var newPassword = "Nouveau mot de passe";
|
|
4159
4171
|
var confirmNewPassword = "Confirmer le nouveau mot de passe";
|
|
@@ -4163,7 +4175,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
|
|
|
4163
4175
|
var passwordsNotMatching = "Les mots de passe ne correspondent pas";
|
|
4164
4176
|
var weakPassword = "Votre mot de passe doit contenir au moins 6";
|
|
4165
4177
|
var passwordChange_fr = {
|
|
4166
|
-
title: title$
|
|
4178
|
+
title: title$4,
|
|
4167
4179
|
currentPassword: currentPassword,
|
|
4168
4180
|
newPassword: newPassword,
|
|
4169
4181
|
confirmNewPassword: confirmNewPassword,
|
|
@@ -4174,7 +4186,7 @@ var passwordChange_fr = {
|
|
|
4174
4186
|
weakPassword: weakPassword
|
|
4175
4187
|
};
|
|
4176
4188
|
|
|
4177
|
-
var title$
|
|
4189
|
+
var title$3 = "Votre panier";
|
|
4178
4190
|
var subtitle$1 = "Terminez votre achat ci-dessous";
|
|
4179
4191
|
var name$1 = "Produit";
|
|
4180
4192
|
var quantity$1 = "Quantité";
|
|
@@ -4186,7 +4198,7 @@ var confirm$3 = "Passer à la caisse";
|
|
|
4186
4198
|
var empty$1 = "Votre panier est vide.";
|
|
4187
4199
|
var removeAll$1 = "Vider";
|
|
4188
4200
|
var cart_fr = {
|
|
4189
|
-
title: title$
|
|
4201
|
+
title: title$3,
|
|
4190
4202
|
subtitle: subtitle$1,
|
|
4191
4203
|
name: name$1,
|
|
4192
4204
|
quantity: quantity$1,
|
|
@@ -4199,7 +4211,7 @@ var cart_fr = {
|
|
|
4199
4211
|
removeAll: removeAll$1
|
|
4200
4212
|
};
|
|
4201
4213
|
|
|
4202
|
-
var title = "Your shopping cart";
|
|
4214
|
+
var title$2 = "Your shopping cart";
|
|
4203
4215
|
var subtitle = "Comple your purchase below";
|
|
4204
4216
|
var name = "Name";
|
|
4205
4217
|
var quantity = "Quantity";
|
|
@@ -4211,7 +4223,7 @@ var confirm$2 = "Checkout";
|
|
|
4211
4223
|
var empty = "Your cart is empty.";
|
|
4212
4224
|
var removeAll = "Remove all";
|
|
4213
4225
|
var cart_en = {
|
|
4214
|
-
title: title,
|
|
4226
|
+
title: title$2,
|
|
4215
4227
|
subtitle: subtitle,
|
|
4216
4228
|
name: name,
|
|
4217
4229
|
quantity: quantity,
|
|
@@ -4224,7 +4236,7 @@ var cart_en = {
|
|
|
4224
4236
|
removeAll: removeAll
|
|
4225
4237
|
};
|
|
4226
4238
|
|
|
4227
|
-
var buttons$
|
|
4239
|
+
var buttons$5 = {
|
|
4228
4240
|
select: "Select",
|
|
4229
4241
|
added: "Added to cart",
|
|
4230
4242
|
purchase: "Purchase",
|
|
@@ -4239,17 +4251,17 @@ var messages$9 = {
|
|
|
4239
4251
|
multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
|
|
4240
4252
|
currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
|
|
4241
4253
|
};
|
|
4242
|
-
var labels$
|
|
4254
|
+
var labels$b = {
|
|
4243
4255
|
summary: "Order summary",
|
|
4244
4256
|
total: "total"
|
|
4245
4257
|
};
|
|
4246
4258
|
var shop_en = {
|
|
4247
|
-
buttons: buttons$
|
|
4259
|
+
buttons: buttons$5,
|
|
4248
4260
|
messages: messages$9,
|
|
4249
|
-
labels: labels$
|
|
4261
|
+
labels: labels$b
|
|
4250
4262
|
};
|
|
4251
4263
|
|
|
4252
|
-
var buttons$
|
|
4264
|
+
var buttons$4 = {
|
|
4253
4265
|
select: "Choisir",
|
|
4254
4266
|
added: "Ajouté au panier",
|
|
4255
4267
|
purchase: "Acheter",
|
|
@@ -4264,17 +4276,17 @@ var messages$8 = {
|
|
|
4264
4276
|
multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
|
|
4265
4277
|
currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
|
|
4266
4278
|
};
|
|
4267
|
-
var labels$
|
|
4279
|
+
var labels$a = {
|
|
4268
4280
|
summary: "récapitulatif de commande",
|
|
4269
4281
|
total: "total"
|
|
4270
4282
|
};
|
|
4271
4283
|
var shop_fr = {
|
|
4272
|
-
buttons: buttons$
|
|
4284
|
+
buttons: buttons$4,
|
|
4273
4285
|
messages: messages$8,
|
|
4274
|
-
labels: labels$
|
|
4286
|
+
labels: labels$a
|
|
4275
4287
|
};
|
|
4276
4288
|
|
|
4277
|
-
var labels$
|
|
4289
|
+
var labels$9 = {
|
|
4278
4290
|
cardNumber: "Numéro de carte",
|
|
4279
4291
|
securityCode: "Code de sécurité",
|
|
4280
4292
|
submit: "Soumettre",
|
|
@@ -4309,12 +4321,12 @@ var errors$1 = {
|
|
|
4309
4321
|
"": ""
|
|
4310
4322
|
};
|
|
4311
4323
|
var payment_fr = {
|
|
4312
|
-
labels: labels$
|
|
4324
|
+
labels: labels$9,
|
|
4313
4325
|
messages: messages$7,
|
|
4314
4326
|
errors: errors$1
|
|
4315
4327
|
};
|
|
4316
4328
|
|
|
4317
|
-
var labels$
|
|
4329
|
+
var labels$8 = {
|
|
4318
4330
|
cardNumber: "Card number",
|
|
4319
4331
|
securityCode: "Security Code",
|
|
4320
4332
|
submit: "Submit",
|
|
@@ -4349,12 +4361,12 @@ var errors = {
|
|
|
4349
4361
|
"": ""
|
|
4350
4362
|
};
|
|
4351
4363
|
var payment_en = {
|
|
4352
|
-
labels: labels$
|
|
4364
|
+
labels: labels$8,
|
|
4353
4365
|
messages: messages$6,
|
|
4354
4366
|
errors: errors
|
|
4355
4367
|
};
|
|
4356
4368
|
|
|
4357
|
-
var labels$
|
|
4369
|
+
var labels$7 = {
|
|
4358
4370
|
menu: "Pelcro Menu",
|
|
4359
4371
|
name: "Name",
|
|
4360
4372
|
email: "Email",
|
|
@@ -4379,6 +4391,16 @@ var labels$5 = {
|
|
|
4379
4391
|
purchases: "Purchases",
|
|
4380
4392
|
subscriptions: "Subscriptions",
|
|
4381
4393
|
donations: "Donations",
|
|
4394
|
+
invoices: "Invoices",
|
|
4395
|
+
details: "Details",
|
|
4396
|
+
view: "View",
|
|
4397
|
+
paid: "Paid",
|
|
4398
|
+
open: "Open",
|
|
4399
|
+
draft: "Draft",
|
|
4400
|
+
scheduled: "Scheduled",
|
|
4401
|
+
uncollectible: "Uncollectible",
|
|
4402
|
+
"void": "Void",
|
|
4403
|
+
pastDue: "Past due",
|
|
4382
4404
|
updatePaymentSource: "Update",
|
|
4383
4405
|
profile: "Profile",
|
|
4384
4406
|
updateProfile: "Edit profile",
|
|
@@ -4431,11 +4453,11 @@ var messages$5 = {
|
|
|
4431
4453
|
}
|
|
4432
4454
|
};
|
|
4433
4455
|
var dashboard_en = {
|
|
4434
|
-
labels: labels$
|
|
4456
|
+
labels: labels$7,
|
|
4435
4457
|
messages: messages$5
|
|
4436
4458
|
};
|
|
4437
4459
|
|
|
4438
|
-
var labels$
|
|
4460
|
+
var labels$6 = {
|
|
4439
4461
|
menu: "Menu Pelcro",
|
|
4440
4462
|
name: "Nom",
|
|
4441
4463
|
email: "Courriel",
|
|
@@ -4460,6 +4482,16 @@ var labels$4 = {
|
|
|
4460
4482
|
purchases: "Achats",
|
|
4461
4483
|
subscriptions: "Abonnements",
|
|
4462
4484
|
donations: "Des dons",
|
|
4485
|
+
invoices: "Invoices",
|
|
4486
|
+
details: "Details",
|
|
4487
|
+
view: "View",
|
|
4488
|
+
paid: "Paid",
|
|
4489
|
+
open: "open",
|
|
4490
|
+
draft: "Draft",
|
|
4491
|
+
scheduled: "Scheduled",
|
|
4492
|
+
uncollectible: "Uncollectible",
|
|
4493
|
+
"void": "Void",
|
|
4494
|
+
pastDue: "Past due",
|
|
4463
4495
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4464
4496
|
profile: "Profil",
|
|
4465
4497
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4512,7 +4544,7 @@ var messages$4 = {
|
|
|
4512
4544
|
}
|
|
4513
4545
|
};
|
|
4514
4546
|
var dashboard_fr = {
|
|
4515
|
-
labels: labels$
|
|
4547
|
+
labels: labels$6,
|
|
4516
4548
|
messages: messages$4
|
|
4517
4549
|
};
|
|
4518
4550
|
|
|
@@ -4521,7 +4553,7 @@ var messages$3 = {
|
|
|
4521
4553
|
loginHere: "Login here",
|
|
4522
4554
|
checkbox: "Check this box to gift this subscription"
|
|
4523
4555
|
};
|
|
4524
|
-
var labels$
|
|
4556
|
+
var labels$5 = {
|
|
4525
4557
|
plan: {
|
|
4526
4558
|
title: "Subscribe to a plan",
|
|
4527
4559
|
subtitle: "Select one of the plans below and click on next."
|
|
@@ -4538,15 +4570,15 @@ var labels$3 = {
|
|
|
4538
4570
|
or: "Or take a look at some of our other options below"
|
|
4539
4571
|
}
|
|
4540
4572
|
};
|
|
4541
|
-
var buttons$
|
|
4573
|
+
var buttons$3 = {
|
|
4542
4574
|
next: "Next",
|
|
4543
4575
|
select: "Select",
|
|
4544
4576
|
back: "Back"
|
|
4545
4577
|
};
|
|
4546
4578
|
var select_en = {
|
|
4547
4579
|
messages: messages$3,
|
|
4548
|
-
labels: labels$
|
|
4549
|
-
buttons: buttons$
|
|
4580
|
+
labels: labels$5,
|
|
4581
|
+
buttons: buttons$3
|
|
4550
4582
|
};
|
|
4551
4583
|
|
|
4552
4584
|
var messages$2 = {
|
|
@@ -4554,7 +4586,7 @@ var messages$2 = {
|
|
|
4554
4586
|
loginHere: "Connectez-vous ici",
|
|
4555
4587
|
checkbox: "Cochez cette case pour offrir cet abonnement"
|
|
4556
4588
|
};
|
|
4557
|
-
var labels$
|
|
4589
|
+
var labels$4 = {
|
|
4558
4590
|
plan: {
|
|
4559
4591
|
title: "Abonnez-vous à un plan",
|
|
4560
4592
|
subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
|
|
@@ -4571,15 +4603,15 @@ var labels$2 = {
|
|
|
4571
4603
|
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4572
4604
|
}
|
|
4573
4605
|
};
|
|
4574
|
-
var buttons = {
|
|
4606
|
+
var buttons$2 = {
|
|
4575
4607
|
next: "Prochain",
|
|
4576
4608
|
select: "Choisir",
|
|
4577
4609
|
back: "Retour"
|
|
4578
4610
|
};
|
|
4579
4611
|
var select_fr = {
|
|
4580
4612
|
messages: messages$2,
|
|
4581
|
-
labels: labels$
|
|
4582
|
-
buttons: buttons
|
|
4613
|
+
labels: labels$4,
|
|
4614
|
+
buttons: buttons$2
|
|
4583
4615
|
};
|
|
4584
4616
|
|
|
4585
4617
|
var confirm$1 = {
|
|
@@ -4602,7 +4634,7 @@ var notification_fr = {
|
|
|
4602
4634
|
confirm: confirm
|
|
4603
4635
|
};
|
|
4604
4636
|
|
|
4605
|
-
var labels$
|
|
4637
|
+
var labels$3 = {
|
|
4606
4638
|
title: "Verify your email",
|
|
4607
4639
|
instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
|
|
4608
4640
|
resend: "Resend email"
|
|
@@ -4612,24 +4644,60 @@ var messages$1 = {
|
|
|
4612
4644
|
success: "Email verified successfully!"
|
|
4613
4645
|
};
|
|
4614
4646
|
var verifyEmail_en = {
|
|
4615
|
-
labels: labels$
|
|
4647
|
+
labels: labels$3,
|
|
4616
4648
|
messages: messages$1
|
|
4617
4649
|
};
|
|
4618
4650
|
|
|
4619
|
-
var labels = {
|
|
4620
|
-
title: "
|
|
4621
|
-
instructions: "
|
|
4622
|
-
resend: "
|
|
4651
|
+
var labels$2 = {
|
|
4652
|
+
title: "Confirmez votre courriel",
|
|
4653
|
+
instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
|
|
4654
|
+
resend: "Renvoyer le courriel"
|
|
4623
4655
|
};
|
|
4624
4656
|
var messages = {
|
|
4625
4657
|
resent: "Renvoyé avec succès",
|
|
4626
|
-
success: "
|
|
4658
|
+
success: "Adresse courriel vérifiée avec succès"
|
|
4627
4659
|
};
|
|
4628
4660
|
var verifyEmail_fr = {
|
|
4629
|
-
labels: labels,
|
|
4661
|
+
labels: labels$2,
|
|
4630
4662
|
messages: messages
|
|
4631
4663
|
};
|
|
4632
4664
|
|
|
4665
|
+
var title$1 = "Invoice details";
|
|
4666
|
+
var labels$1 = {
|
|
4667
|
+
summary: "Summary",
|
|
4668
|
+
total: "Total",
|
|
4669
|
+
amountPaid: "Amount paid",
|
|
4670
|
+
amountDue: "Amount due",
|
|
4671
|
+
creationDate: "Created on:"
|
|
4672
|
+
};
|
|
4673
|
+
var buttons$1 = {
|
|
4674
|
+
download: "Download",
|
|
4675
|
+
pay: "Pay now"
|
|
4676
|
+
};
|
|
4677
|
+
var invoiceDetails_en = {
|
|
4678
|
+
title: title$1,
|
|
4679
|
+
labels: labels$1,
|
|
4680
|
+
buttons: buttons$1
|
|
4681
|
+
};
|
|
4682
|
+
|
|
4683
|
+
var title = "Invoice details";
|
|
4684
|
+
var labels = {
|
|
4685
|
+
summary: "Summary",
|
|
4686
|
+
total: "Total",
|
|
4687
|
+
amountPaid: "Amount paid",
|
|
4688
|
+
amountDue: "Amount due",
|
|
4689
|
+
creationDate: "Created on:"
|
|
4690
|
+
};
|
|
4691
|
+
var buttons = {
|
|
4692
|
+
download: "Download",
|
|
4693
|
+
pay: "Pay now"
|
|
4694
|
+
};
|
|
4695
|
+
var invoiceDetails_fr = {
|
|
4696
|
+
title: title,
|
|
4697
|
+
labels: labels,
|
|
4698
|
+
buttons: buttons
|
|
4699
|
+
};
|
|
4700
|
+
|
|
4633
4701
|
function create$1(createState) {
|
|
4634
4702
|
let state;
|
|
4635
4703
|
const listeners = new Set();
|
|
@@ -5979,7 +6047,7 @@ class PelcroActions {
|
|
|
5979
6047
|
view,
|
|
5980
6048
|
cartItems,
|
|
5981
6049
|
...otherStateFields
|
|
5982
|
-
} = initialState$
|
|
6050
|
+
} = initialState$i;
|
|
5983
6051
|
this.set(otherStateFields);
|
|
5984
6052
|
});
|
|
5985
6053
|
|
|
@@ -6023,10 +6091,11 @@ class PelcroActions {
|
|
|
6023
6091
|
resetView,
|
|
6024
6092
|
switchToCheckoutForm,
|
|
6025
6093
|
product,
|
|
6026
|
-
order
|
|
6094
|
+
order,
|
|
6095
|
+
invoice
|
|
6027
6096
|
} = this.get();
|
|
6028
6097
|
|
|
6029
|
-
if (product || order) {
|
|
6098
|
+
if (product || order || invoice) {
|
|
6030
6099
|
// direct user to stripe checkout form when there are no existing cards
|
|
6031
6100
|
if (!userHasPaymentMethod()) {
|
|
6032
6101
|
return switchToCheckoutForm();
|
|
@@ -6043,7 +6112,8 @@ class PelcroActions {
|
|
|
6043
6112
|
switchView,
|
|
6044
6113
|
product,
|
|
6045
6114
|
subscriptionIdToRenew,
|
|
6046
|
-
order
|
|
6115
|
+
order,
|
|
6116
|
+
invoice
|
|
6047
6117
|
} = this.get();
|
|
6048
6118
|
|
|
6049
6119
|
if (product && subscriptionIdToRenew) {
|
|
@@ -6057,6 +6127,10 @@ class PelcroActions {
|
|
|
6057
6127
|
if (order) {
|
|
6058
6128
|
return switchView("order-create");
|
|
6059
6129
|
}
|
|
6130
|
+
|
|
6131
|
+
if (invoice) {
|
|
6132
|
+
return switchView("invoice-payment");
|
|
6133
|
+
}
|
|
6060
6134
|
});
|
|
6061
6135
|
|
|
6062
6136
|
_defineProperty$3(this, "switchToAddressView", () => {
|
|
@@ -6087,6 +6161,23 @@ class PelcroActions {
|
|
|
6087
6161
|
});
|
|
6088
6162
|
});
|
|
6089
6163
|
|
|
6164
|
+
_defineProperty$3(this, "setInvoice", id => {
|
|
6165
|
+
var _window$Pelcro$invoic;
|
|
6166
|
+
|
|
6167
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
6168
|
+
const invoice = invoices.find(inv => String(inv.id) === String(id));
|
|
6169
|
+
|
|
6170
|
+
if (!invoice) {
|
|
6171
|
+
console.error("invalid invoice id");
|
|
6172
|
+
return false;
|
|
6173
|
+
}
|
|
6174
|
+
|
|
6175
|
+
this.set({
|
|
6176
|
+
invoice
|
|
6177
|
+
});
|
|
6178
|
+
return true;
|
|
6179
|
+
});
|
|
6180
|
+
|
|
6090
6181
|
_defineProperty$3(this, "logout", () => {
|
|
6091
6182
|
var _ReactGA$event;
|
|
6092
6183
|
|
|
@@ -6275,7 +6366,7 @@ class PelcroCallbacks {
|
|
|
6275
6366
|
|
|
6276
6367
|
}
|
|
6277
6368
|
|
|
6278
|
-
const initialState$
|
|
6369
|
+
const initialState$i = {
|
|
6279
6370
|
// View
|
|
6280
6371
|
view: null,
|
|
6281
6372
|
// Plans
|
|
@@ -6290,6 +6381,8 @@ const initialState$h = {
|
|
|
6290
6381
|
cartItems: [],
|
|
6291
6382
|
order: null,
|
|
6292
6383
|
// null | SKU[] | SKU,
|
|
6384
|
+
// invoices
|
|
6385
|
+
invoice: null,
|
|
6293
6386
|
// User
|
|
6294
6387
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
6295
6388
|
selectedPaymentMethodId: null,
|
|
@@ -6303,7 +6396,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6303
6396
|
return {
|
|
6304
6397
|
// Store setter
|
|
6305
6398
|
set,
|
|
6306
|
-
...initialState$
|
|
6399
|
+
...initialState$i,
|
|
6307
6400
|
// State actions
|
|
6308
6401
|
...actions,
|
|
6309
6402
|
// Callbacks
|
|
@@ -6454,7 +6547,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
6454
6547
|
*/
|
|
6455
6548
|
|
|
6456
6549
|
const isValidViewFromURL = viewID => {
|
|
6457
|
-
if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
|
|
6550
|
+
if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify", "invoice-details"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
|
|
6458
6551
|
return true;
|
|
6459
6552
|
}
|
|
6460
6553
|
|
|
@@ -6681,7 +6774,8 @@ const resources = {
|
|
|
6681
6774
|
payment: payment_en,
|
|
6682
6775
|
dashboard: dashboard_en,
|
|
6683
6776
|
select: select_en,
|
|
6684
|
-
notification: notification_en
|
|
6777
|
+
notification: notification_en,
|
|
6778
|
+
invoiceDetails: invoiceDetails_en
|
|
6685
6779
|
},
|
|
6686
6780
|
fr: {
|
|
6687
6781
|
common: common_fr,
|
|
@@ -6704,7 +6798,8 @@ const resources = {
|
|
|
6704
6798
|
payment: payment_fr,
|
|
6705
6799
|
dashboard: dashboard_fr,
|
|
6706
6800
|
select: select_fr,
|
|
6707
|
-
notification: notification_fr
|
|
6801
|
+
notification: notification_fr,
|
|
6802
|
+
invoiceDetails: invoiceDetails_fr
|
|
6708
6803
|
}
|
|
6709
6804
|
}; // set UI language to the page language or default to the language in site settings
|
|
6710
6805
|
|
|
@@ -6995,8 +7090,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6995
7090
|
|
|
6996
7091
|
let e={data:""},t=t=>"undefined"!=typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
|
|
6997
7092
|
|
|
6998
|
-
function _extends$
|
|
6999
|
-
_extends$
|
|
7093
|
+
function _extends$z() {
|
|
7094
|
+
_extends$z = Object.assign || function (target) {
|
|
7000
7095
|
for (var i = 1; i < arguments.length; i++) {
|
|
7001
7096
|
var source = arguments[i];
|
|
7002
7097
|
|
|
@@ -7010,7 +7105,7 @@ function _extends$y() {
|
|
|
7010
7105
|
return target;
|
|
7011
7106
|
};
|
|
7012
7107
|
|
|
7013
|
-
return _extends$
|
|
7108
|
+
return _extends$z.apply(this, arguments);
|
|
7014
7109
|
}
|
|
7015
7110
|
|
|
7016
7111
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7100,7 +7195,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7100
7195
|
var reducer = function reducer(state, action) {
|
|
7101
7196
|
switch (action.type) {
|
|
7102
7197
|
case ActionType.ADD_TOAST:
|
|
7103
|
-
return _extends$
|
|
7198
|
+
return _extends$z({}, state, {
|
|
7104
7199
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7105
7200
|
});
|
|
7106
7201
|
|
|
@@ -7110,9 +7205,9 @@ var reducer = function reducer(state, action) {
|
|
|
7110
7205
|
clearFromRemoveQueue(action.toast.id);
|
|
7111
7206
|
}
|
|
7112
7207
|
|
|
7113
|
-
return _extends$
|
|
7208
|
+
return _extends$z({}, state, {
|
|
7114
7209
|
toasts: state.toasts.map(function (t) {
|
|
7115
|
-
return t.id === action.toast.id ? _extends$
|
|
7210
|
+
return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
|
|
7116
7211
|
})
|
|
7117
7212
|
});
|
|
7118
7213
|
|
|
@@ -7139,9 +7234,9 @@ var reducer = function reducer(state, action) {
|
|
|
7139
7234
|
});
|
|
7140
7235
|
}
|
|
7141
7236
|
|
|
7142
|
-
return _extends$
|
|
7237
|
+
return _extends$z({}, state, {
|
|
7143
7238
|
toasts: state.toasts.map(function (t) {
|
|
7144
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7239
|
+
return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
|
|
7145
7240
|
visible: false
|
|
7146
7241
|
}) : t;
|
|
7147
7242
|
})
|
|
@@ -7149,28 +7244,28 @@ var reducer = function reducer(state, action) {
|
|
|
7149
7244
|
|
|
7150
7245
|
case ActionType.REMOVE_TOAST:
|
|
7151
7246
|
if (action.toastId === undefined) {
|
|
7152
|
-
return _extends$
|
|
7247
|
+
return _extends$z({}, state, {
|
|
7153
7248
|
toasts: []
|
|
7154
7249
|
});
|
|
7155
7250
|
}
|
|
7156
7251
|
|
|
7157
|
-
return _extends$
|
|
7252
|
+
return _extends$z({}, state, {
|
|
7158
7253
|
toasts: state.toasts.filter(function (t) {
|
|
7159
7254
|
return t.id !== action.toastId;
|
|
7160
7255
|
})
|
|
7161
7256
|
});
|
|
7162
7257
|
|
|
7163
7258
|
case ActionType.START_PAUSE:
|
|
7164
|
-
return _extends$
|
|
7259
|
+
return _extends$z({}, state, {
|
|
7165
7260
|
pausedAt: action.time
|
|
7166
7261
|
});
|
|
7167
7262
|
|
|
7168
7263
|
case ActionType.END_PAUSE:
|
|
7169
7264
|
var diff = action.time - (state.pausedAt || 0);
|
|
7170
|
-
return _extends$
|
|
7265
|
+
return _extends$z({}, state, {
|
|
7171
7266
|
pausedAt: undefined,
|
|
7172
7267
|
toasts: state.toasts.map(function (t) {
|
|
7173
|
-
return _extends$
|
|
7268
|
+
return _extends$z({}, t, {
|
|
7174
7269
|
pauseDuration: t.pauseDuration + diff
|
|
7175
7270
|
});
|
|
7176
7271
|
})
|
|
@@ -7217,12 +7312,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7217
7312
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7218
7313
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7219
7314
|
|
|
7220
|
-
return _extends$
|
|
7315
|
+
return _extends$z({}, toastOptions, toastOptions[t.type], t, {
|
|
7221
7316
|
duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
|
|
7222
|
-
style: _extends$
|
|
7317
|
+
style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7223
7318
|
});
|
|
7224
7319
|
});
|
|
7225
|
-
return _extends$
|
|
7320
|
+
return _extends$z({}, state, {
|
|
7226
7321
|
toasts: mergedToasts
|
|
7227
7322
|
});
|
|
7228
7323
|
};
|
|
@@ -7232,7 +7327,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7232
7327
|
type = 'blank';
|
|
7233
7328
|
}
|
|
7234
7329
|
|
|
7235
|
-
return _extends$
|
|
7330
|
+
return _extends$z({
|
|
7236
7331
|
createdAt: Date.now(),
|
|
7237
7332
|
visible: true,
|
|
7238
7333
|
type: type,
|
|
@@ -7282,14 +7377,14 @@ toast.remove = function (toastId) {
|
|
|
7282
7377
|
};
|
|
7283
7378
|
|
|
7284
7379
|
toast.promise = function (promise, msgs, opts) {
|
|
7285
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7380
|
+
var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
|
|
7286
7381
|
promise.then(function (p) {
|
|
7287
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7382
|
+
toast.success(resolveValue(msgs.success, p), _extends$z({
|
|
7288
7383
|
id: id
|
|
7289
7384
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7290
7385
|
return p;
|
|
7291
7386
|
})["catch"](function (e) {
|
|
7292
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7387
|
+
toast.error(resolveValue(msgs.error, e), _extends$z({
|
|
7293
7388
|
id: id
|
|
7294
7389
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7295
7390
|
});
|
|
@@ -7628,7 +7723,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7628
7723
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7629
7724
|
return React.createElement(ToastBarBase, {
|
|
7630
7725
|
className: toast.className,
|
|
7631
|
-
style: _extends$
|
|
7726
|
+
style: _extends$z({}, animationStyle, style, toast.style)
|
|
7632
7727
|
}, typeof children === 'function' ? children({
|
|
7633
7728
|
icon: icon,
|
|
7634
7729
|
message: message
|
|
@@ -7658,7 +7753,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7658
7753
|
} : position.includes('right') ? {
|
|
7659
7754
|
justifyContent: 'flex-end'
|
|
7660
7755
|
} : {};
|
|
7661
|
-
return _extends$
|
|
7756
|
+
return _extends$z({
|
|
7662
7757
|
left: 0,
|
|
7663
7758
|
right: 0,
|
|
7664
7759
|
display: 'flex',
|
|
@@ -7685,7 +7780,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7685
7780
|
handlers = _useToaster.handlers;
|
|
7686
7781
|
|
|
7687
7782
|
return React.createElement("div", {
|
|
7688
|
-
style: _extends$
|
|
7783
|
+
style: _extends$z({
|
|
7689
7784
|
position: 'fixed',
|
|
7690
7785
|
zIndex: 9999,
|
|
7691
7786
|
top: DEFAULT_OFFSET,
|
|
@@ -7720,82 +7815,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7720
7815
|
}));
|
|
7721
7816
|
};
|
|
7722
7817
|
|
|
7723
|
-
var _path$
|
|
7818
|
+
var _path$w;
|
|
7724
7819
|
|
|
7725
|
-
function _extends$
|
|
7820
|
+
function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
7726
7821
|
|
|
7727
7822
|
function SvgCheckSolid(props) {
|
|
7728
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7823
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
7729
7824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7730
7825
|
className: "h-5 w-5",
|
|
7731
7826
|
viewBox: "0 0 20 20",
|
|
7732
7827
|
fill: "currentColor"
|
|
7733
|
-
}, props), _path$
|
|
7828
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7734
7829
|
fillRule: "evenodd",
|
|
7735
7830
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
7736
7831
|
clipRule: "evenodd"
|
|
7737
7832
|
})));
|
|
7738
7833
|
}
|
|
7739
7834
|
|
|
7740
|
-
var _path$
|
|
7835
|
+
var _path$v;
|
|
7741
7836
|
|
|
7742
|
-
function _extends$
|
|
7837
|
+
function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
7743
7838
|
|
|
7744
7839
|
function SvgXIcon(props) {
|
|
7745
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7840
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
7746
7841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7747
7842
|
viewBox: "0 0 20 20",
|
|
7748
7843
|
fill: "currentColor"
|
|
7749
|
-
}, props), _path$
|
|
7844
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7750
7845
|
fill: "evenodd",
|
|
7751
7846
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
7752
7847
|
clipRule: "evenodd"
|
|
7753
7848
|
})));
|
|
7754
7849
|
}
|
|
7755
7850
|
|
|
7756
|
-
var _path$
|
|
7851
|
+
var _path$u;
|
|
7757
7852
|
|
|
7758
|
-
function _extends$
|
|
7853
|
+
function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
7759
7854
|
|
|
7760
7855
|
function SvgXIconSolid(props) {
|
|
7761
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7856
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
7762
7857
|
className: "plc-w-4 plc-h-4",
|
|
7763
7858
|
fill: "currentColor",
|
|
7764
7859
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7765
7860
|
viewBox: "0 0 100 100"
|
|
7766
|
-
}, props), _path$
|
|
7861
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7767
7862
|
d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
|
|
7768
7863
|
})));
|
|
7769
7864
|
}
|
|
7770
7865
|
|
|
7771
|
-
var _path$
|
|
7866
|
+
var _path$t;
|
|
7772
7867
|
|
|
7773
|
-
function _extends$
|
|
7868
|
+
function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
7774
7869
|
|
|
7775
7870
|
function SvgExclamation(props) {
|
|
7776
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7871
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
7777
7872
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7778
7873
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7779
7874
|
viewBox: "0 0 20 20",
|
|
7780
7875
|
fill: "currentColor"
|
|
7781
|
-
}, props), _path$
|
|
7876
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7782
7877
|
fillRule: "evenodd",
|
|
7783
7878
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
7784
7879
|
clipRule: "evenodd"
|
|
7785
7880
|
})));
|
|
7786
7881
|
}
|
|
7787
7882
|
|
|
7788
|
-
var _path$
|
|
7883
|
+
var _path$s, _path2$4;
|
|
7789
7884
|
|
|
7790
|
-
function _extends$
|
|
7885
|
+
function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
7791
7886
|
|
|
7792
7887
|
function SvgSpinner(props) {
|
|
7793
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7888
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
7794
7889
|
className: "plc-animate-spin",
|
|
7795
7890
|
viewBox: "0 0 24 24",
|
|
7796
7891
|
fill: "currentColor",
|
|
7797
7892
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7798
|
-
}, props), _path$
|
|
7893
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7799
7894
|
opacity: 0.2,
|
|
7800
7895
|
fill: "evenodd",
|
|
7801
7896
|
clipRule: "evenodd",
|
|
@@ -8530,6 +8625,7 @@ var pure_1 = pure.loadStripe;
|
|
|
8530
8625
|
* @param {Object} error Error object
|
|
8531
8626
|
* @return {string}
|
|
8532
8627
|
*/
|
|
8628
|
+
|
|
8533
8629
|
const getErrorMessages = error => {
|
|
8534
8630
|
var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
|
|
8535
8631
|
|
|
@@ -8584,6 +8680,20 @@ const debounce = (func, waitTime) => {
|
|
|
8584
8680
|
timeout = setTimeout(later, waitTime);
|
|
8585
8681
|
};
|
|
8586
8682
|
};
|
|
8683
|
+
function getSiteCardProcessor() {
|
|
8684
|
+
var _window$Pelcro$site$r;
|
|
8685
|
+
|
|
8686
|
+
const {
|
|
8687
|
+
view
|
|
8688
|
+
} = usePelcro.getStore();
|
|
8689
|
+
const temp_ONLY_USE_VANTIV_WITH_SUBSCRIPTION_CREATE = view === "subscription-create";
|
|
8690
|
+
|
|
8691
|
+
if (temp_ONLY_USE_VANTIV_WITH_SUBSCRIPTION_CREATE && (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.vantiv_pay_page_id) {
|
|
8692
|
+
return "vantiv";
|
|
8693
|
+
}
|
|
8694
|
+
|
|
8695
|
+
return "stripe";
|
|
8696
|
+
}
|
|
8587
8697
|
|
|
8588
8698
|
/**
|
|
8589
8699
|
* @typedef {Object} OptionsType
|
|
@@ -8664,13 +8774,26 @@ const loadPaymentSDKs = () => {
|
|
|
8664
8774
|
if (!window.Stripe) {
|
|
8665
8775
|
pure_1(window.Pelcro.environment.stripe);
|
|
8666
8776
|
}
|
|
8667
|
-
}); // Load PayPal
|
|
8777
|
+
}); // Load PayPal SDKs
|
|
8668
8778
|
|
|
8669
8779
|
const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
|
|
8670
8780
|
|
|
8671
8781
|
if (supportsPaypal) {
|
|
8672
8782
|
window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/client.min.js", "braintree-sdk");
|
|
8673
8783
|
window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/paypal-checkout.min.js", "braintree-paypal-sdk");
|
|
8784
|
+
} // Load Vantiv SDKs
|
|
8785
|
+
|
|
8786
|
+
|
|
8787
|
+
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_pay_page_id);
|
|
8788
|
+
|
|
8789
|
+
if (supportsVantiv) {
|
|
8790
|
+
if (!window.jQuery) {
|
|
8791
|
+
window.Pelcro.helpers.loadSDK("https://code.jquery.com/jquery-3.6.0.slim.min.js", "vantiv-jquery-sdk");
|
|
8792
|
+
}
|
|
8793
|
+
|
|
8794
|
+
if (!window.EprotectIframeClient) {
|
|
8795
|
+
window.Pelcro.helpers.loadSDK("https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js", "vantiv-eprotect-sdk");
|
|
8796
|
+
}
|
|
8674
8797
|
}
|
|
8675
8798
|
};
|
|
8676
8799
|
const loadAuth0SDK = () => {
|
|
@@ -8829,6 +8952,10 @@ const initViewFromURL = () => {
|
|
|
8829
8952
|
return verifyEmailTokenFromUrl();
|
|
8830
8953
|
}
|
|
8831
8954
|
|
|
8955
|
+
if (view === "invoice-details") {
|
|
8956
|
+
return showInvoiceDetailsFromUrl();
|
|
8957
|
+
}
|
|
8958
|
+
|
|
8832
8959
|
switchView(view);
|
|
8833
8960
|
});
|
|
8834
8961
|
}
|
|
@@ -9005,6 +9132,32 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
9005
9132
|
});
|
|
9006
9133
|
};
|
|
9007
9134
|
|
|
9135
|
+
const showInvoiceDetailsFromUrl = () => {
|
|
9136
|
+
const {
|
|
9137
|
+
isAuthenticated,
|
|
9138
|
+
setInvoice,
|
|
9139
|
+
whenSiteReady,
|
|
9140
|
+
switchView
|
|
9141
|
+
} = usePelcro.getStore();
|
|
9142
|
+
whenSiteReady(() => {
|
|
9143
|
+
if (!isAuthenticated()) {
|
|
9144
|
+
return switchView("login");
|
|
9145
|
+
}
|
|
9146
|
+
|
|
9147
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9148
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9149
|
+
|
|
9150
|
+
if (!wasSetSuccessfully) {
|
|
9151
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9152
|
+
returnObjects: true
|
|
9153
|
+
});
|
|
9154
|
+
return notify.error(errorMessage);
|
|
9155
|
+
}
|
|
9156
|
+
|
|
9157
|
+
return switchView("invoice-details");
|
|
9158
|
+
});
|
|
9159
|
+
};
|
|
9160
|
+
|
|
9008
9161
|
const defaultOptions = {
|
|
9009
9162
|
loadPaymentSDKs: true,
|
|
9010
9163
|
loadAuth0SDK: true,
|
|
@@ -9344,7 +9497,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9344
9497
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9345
9498
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9346
9499
|
|
|
9347
|
-
const initialState$
|
|
9500
|
+
const initialState$h = {
|
|
9348
9501
|
email: "",
|
|
9349
9502
|
password: "",
|
|
9350
9503
|
emailError: null,
|
|
@@ -9355,10 +9508,10 @@ const initialState$g = {
|
|
|
9355
9508
|
content: ""
|
|
9356
9509
|
}
|
|
9357
9510
|
};
|
|
9358
|
-
const store$
|
|
9511
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
9359
9512
|
const {
|
|
9360
|
-
Provider: Provider$
|
|
9361
|
-
} = store$
|
|
9513
|
+
Provider: Provider$h
|
|
9514
|
+
} = store$h;
|
|
9362
9515
|
|
|
9363
9516
|
const LoginContainer = ({
|
|
9364
9517
|
style,
|
|
@@ -9465,7 +9618,7 @@ const LoginContainer = ({
|
|
|
9465
9618
|
});
|
|
9466
9619
|
|
|
9467
9620
|
case RESET_LOGIN_FORM:
|
|
9468
|
-
return initialState$
|
|
9621
|
+
return initialState$h;
|
|
9469
9622
|
|
|
9470
9623
|
case DISABLE_LOGIN_BUTTON:
|
|
9471
9624
|
return lib_7({ ...state,
|
|
@@ -9483,12 +9636,12 @@ const LoginContainer = ({
|
|
|
9483
9636
|
default:
|
|
9484
9637
|
return state;
|
|
9485
9638
|
}
|
|
9486
|
-
}, initialState$
|
|
9639
|
+
}, initialState$h);
|
|
9487
9640
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9488
9641
|
style: { ...style
|
|
9489
9642
|
},
|
|
9490
9643
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9491
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
9644
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
9492
9645
|
value: {
|
|
9493
9646
|
state,
|
|
9494
9647
|
dispatch
|
|
@@ -9496,12 +9649,12 @@ const LoginContainer = ({
|
|
|
9496
9649
|
}, children.length ? children.map((child, i) => {
|
|
9497
9650
|
if (child) {
|
|
9498
9651
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9499
|
-
store: store$
|
|
9652
|
+
store: store$h,
|
|
9500
9653
|
key: i
|
|
9501
9654
|
});
|
|
9502
9655
|
}
|
|
9503
9656
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
9504
|
-
store: store$
|
|
9657
|
+
store: store$h
|
|
9505
9658
|
})));
|
|
9506
9659
|
};
|
|
9507
9660
|
|
|
@@ -9746,7 +9899,7 @@ const LoginButton = ({
|
|
|
9746
9899
|
buttonDisabled
|
|
9747
9900
|
},
|
|
9748
9901
|
dispatch
|
|
9749
|
-
} = React.useContext(store$
|
|
9902
|
+
} = React.useContext(store$h);
|
|
9750
9903
|
const {
|
|
9751
9904
|
t
|
|
9752
9905
|
} = useTranslation("login");
|
|
@@ -9767,23 +9920,23 @@ const LoginButton = ({
|
|
|
9767
9920
|
};
|
|
9768
9921
|
|
|
9769
9922
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
9770
|
-
store: store$
|
|
9923
|
+
store: store$h
|
|
9771
9924
|
}, props));
|
|
9772
9925
|
|
|
9773
9926
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
9774
|
-
store: store$
|
|
9927
|
+
store: store$h
|
|
9775
9928
|
}, props));
|
|
9776
9929
|
|
|
9777
|
-
var _path$
|
|
9930
|
+
var _path$r;
|
|
9778
9931
|
|
|
9779
|
-
function _extends$
|
|
9932
|
+
function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
9780
9933
|
|
|
9781
9934
|
function SvgCheck(props) {
|
|
9782
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9935
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
9783
9936
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9784
9937
|
fill: "currentColor",
|
|
9785
9938
|
viewBox: "0 0 20 20"
|
|
9786
|
-
}, props), _path$
|
|
9939
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9787
9940
|
fillRule: "evenodd",
|
|
9788
9941
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
9789
9942
|
clipRule: "evenodd"
|
|
@@ -9848,7 +10001,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9848
10001
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9849
10002
|
facebookLoginRenderProps.FacebookLogin;
|
|
9850
10003
|
|
|
9851
|
-
const initialState$
|
|
10004
|
+
const initialState$g = {
|
|
9852
10005
|
email: "",
|
|
9853
10006
|
password: "",
|
|
9854
10007
|
emailError: null,
|
|
@@ -9865,10 +10018,10 @@ const initialState$f = {
|
|
|
9865
10018
|
content: ""
|
|
9866
10019
|
}
|
|
9867
10020
|
};
|
|
9868
|
-
const store$
|
|
10021
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
9869
10022
|
const {
|
|
9870
|
-
Provider: Provider$
|
|
9871
|
-
} = store$
|
|
10023
|
+
Provider: Provider$g
|
|
10024
|
+
} = store$g;
|
|
9872
10025
|
|
|
9873
10026
|
const RegisterContainer = ({
|
|
9874
10027
|
style,
|
|
@@ -10051,7 +10204,7 @@ const RegisterContainer = ({
|
|
|
10051
10204
|
});
|
|
10052
10205
|
|
|
10053
10206
|
case RESET_LOGIN_FORM:
|
|
10054
|
-
return initialState$
|
|
10207
|
+
return initialState$g;
|
|
10055
10208
|
|
|
10056
10209
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10057
10210
|
return lib_7({ ...state,
|
|
@@ -10069,12 +10222,12 @@ const RegisterContainer = ({
|
|
|
10069
10222
|
default:
|
|
10070
10223
|
return state;
|
|
10071
10224
|
}
|
|
10072
|
-
}, initialState$
|
|
10225
|
+
}, initialState$g);
|
|
10073
10226
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10074
10227
|
style: { ...style
|
|
10075
10228
|
},
|
|
10076
10229
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10077
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
10230
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
10078
10231
|
value: {
|
|
10079
10232
|
state,
|
|
10080
10233
|
dispatch
|
|
@@ -10082,12 +10235,12 @@ const RegisterContainer = ({
|
|
|
10082
10235
|
}, children.length ? children.map((child, i) => {
|
|
10083
10236
|
if (child) {
|
|
10084
10237
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
10085
|
-
store: store$
|
|
10238
|
+
store: store$g,
|
|
10086
10239
|
key: i
|
|
10087
10240
|
});
|
|
10088
10241
|
}
|
|
10089
10242
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
10090
|
-
store: store$
|
|
10243
|
+
store: store$g
|
|
10091
10244
|
})));
|
|
10092
10245
|
};
|
|
10093
10246
|
/**
|
|
@@ -10102,15 +10255,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10102
10255
|
return hasSecuritySdkLoaded;
|
|
10103
10256
|
}
|
|
10104
10257
|
|
|
10105
|
-
var _path$
|
|
10258
|
+
var _path$q;
|
|
10106
10259
|
|
|
10107
|
-
function _extends$
|
|
10260
|
+
function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
10108
10261
|
|
|
10109
10262
|
function SvgFacebookLogo(props) {
|
|
10110
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10263
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
10111
10264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10112
10265
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10113
|
-
}, props), _path$
|
|
10266
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10114
10267
|
d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
|
|
10115
10268
|
fill: "#3c5a9a"
|
|
10116
10269
|
})));
|
|
@@ -10127,10 +10280,10 @@ const FacebookLoginButton = ({
|
|
|
10127
10280
|
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;
|
|
10128
10281
|
const {
|
|
10129
10282
|
dispatch: loginDispatch
|
|
10130
|
-
} = React.useContext(store$
|
|
10283
|
+
} = React.useContext(store$h);
|
|
10131
10284
|
const {
|
|
10132
10285
|
dispatch: registerDispatch
|
|
10133
|
-
} = React.useContext(store$
|
|
10286
|
+
} = React.useContext(store$g);
|
|
10134
10287
|
|
|
10135
10288
|
const onSuccess = facebookUser => {
|
|
10136
10289
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10183,15 +10336,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10183
10336
|
unwrapExports(googleLogin);
|
|
10184
10337
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10185
10338
|
|
|
10186
|
-
var _path$
|
|
10339
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10187
10340
|
|
|
10188
|
-
function _extends$
|
|
10341
|
+
function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
10189
10342
|
|
|
10190
10343
|
function SvgGoogleLogo(props) {
|
|
10191
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10344
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
10192
10345
|
viewBox: "0 0 24 24",
|
|
10193
10346
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10194
|
-
}, props), _path$
|
|
10347
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10195
10348
|
fill: "#4285F4",
|
|
10196
10349
|
d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
|
|
10197
10350
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10217,10 +10370,10 @@ const GoogleLoginButton = ({
|
|
|
10217
10370
|
const googleLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
|
|
10218
10371
|
const {
|
|
10219
10372
|
dispatch: loginDispatch
|
|
10220
|
-
} = React.useContext(store$
|
|
10373
|
+
} = React.useContext(store$h);
|
|
10221
10374
|
const {
|
|
10222
10375
|
dispatch: registerDispatch
|
|
10223
|
-
} = React.useContext(store$
|
|
10376
|
+
} = React.useContext(store$g);
|
|
10224
10377
|
|
|
10225
10378
|
const onSuccess = response => {
|
|
10226
10379
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10268,15 +10421,15 @@ const GoogleLoginButton = ({
|
|
|
10268
10421
|
}) : null;
|
|
10269
10422
|
};
|
|
10270
10423
|
|
|
10271
|
-
var _path$
|
|
10424
|
+
var _path$o;
|
|
10272
10425
|
|
|
10273
|
-
function _extends$
|
|
10426
|
+
function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
10274
10427
|
|
|
10275
10428
|
function SvgAuth0Logo(props) {
|
|
10276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10429
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10277
10430
|
viewBox: "0 0 256 285",
|
|
10278
10431
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10279
|
-
}, props), _path$
|
|
10432
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10280
10433
|
d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
|
|
10281
10434
|
})));
|
|
10282
10435
|
}
|
|
@@ -10288,26 +10441,43 @@ const Auth0LoginButton = ({
|
|
|
10288
10441
|
iconClassName = ""
|
|
10289
10442
|
}) => {
|
|
10290
10443
|
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
10444
|
+
const auth0Script = document.querySelector("#auth0-sdk");
|
|
10445
|
+
const [auth0Loaded, setAuth0Loaded] = React.useState(Boolean(window.auth0));
|
|
10446
|
+
React__default['default'].useEffect(() => {
|
|
10447
|
+
function handleScriptLoaded() {
|
|
10448
|
+
setAuth0Loaded(true);
|
|
10449
|
+
}
|
|
10450
|
+
|
|
10451
|
+
if (auth0Enabled && !auth0Loaded) {
|
|
10452
|
+
auth0Script.addEventListener("load", handleScriptLoaded);
|
|
10453
|
+
}
|
|
10454
|
+
|
|
10455
|
+
return () => {
|
|
10456
|
+
var _auth0Script$removeEv;
|
|
10457
|
+
|
|
10458
|
+
auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
|
|
10459
|
+
};
|
|
10460
|
+
}, [auth0Script, auth0Enabled, auth0Loaded]);
|
|
10291
10461
|
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
10292
10462
|
React__default['default'].useEffect(() => {
|
|
10293
|
-
if (auth0Enabled &&
|
|
10463
|
+
if (auth0Enabled && auth0Loaded && auth0InstanceRef.current === null) {
|
|
10294
10464
|
auth0InstanceRef.current = new window.auth0.WebAuth({
|
|
10295
10465
|
domain: window.Pelcro.site.read().auth0_base_url,
|
|
10296
10466
|
clientID: window.Pelcro.site.read().auth0_client_id
|
|
10297
10467
|
});
|
|
10298
10468
|
}
|
|
10299
|
-
}, [auth0Enabled,
|
|
10469
|
+
}, [auth0Enabled, auth0Loaded]);
|
|
10300
10470
|
const {
|
|
10301
10471
|
dispatch: loginDispatch
|
|
10302
|
-
} = React.useContext(store$
|
|
10472
|
+
} = React.useContext(store$h);
|
|
10303
10473
|
const {
|
|
10304
10474
|
dispatch: registerDispatch
|
|
10305
|
-
} = React.useContext(store$
|
|
10475
|
+
} = React.useContext(store$g);
|
|
10306
10476
|
|
|
10307
10477
|
function handleClick() {
|
|
10308
10478
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
10309
10479
|
|
|
10310
|
-
if (!
|
|
10480
|
+
if (!auth0Loaded) {
|
|
10311
10481
|
return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10312
10482
|
}
|
|
10313
10483
|
|
|
@@ -10435,15 +10605,15 @@ function LoginView(props) {
|
|
|
10435
10605
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10436
10606
|
}
|
|
10437
10607
|
|
|
10438
|
-
var _path$
|
|
10608
|
+
var _path$n, _path2$2, _path3;
|
|
10439
10609
|
|
|
10440
|
-
function _extends$
|
|
10610
|
+
function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
10441
10611
|
|
|
10442
10612
|
function SvgPelcroAuthorship(props) {
|
|
10443
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10613
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10444
10614
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10445
10615
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10446
|
-
}, props), _path$
|
|
10616
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10447
10617
|
fill: "none",
|
|
10448
10618
|
stroke: "#4a4a4a",
|
|
10449
10619
|
d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
|
|
@@ -10590,11 +10760,11 @@ function LoginModal({
|
|
|
10590
10760
|
LoginModal.viewId = "login";
|
|
10591
10761
|
|
|
10592
10762
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
10593
|
-
store: store$
|
|
10763
|
+
store: store$g
|
|
10594
10764
|
}, props));
|
|
10595
10765
|
|
|
10596
10766
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
10597
|
-
store: store$
|
|
10767
|
+
store: store$g
|
|
10598
10768
|
}, props));
|
|
10599
10769
|
|
|
10600
10770
|
const RegisterButton = ({
|
|
@@ -10614,7 +10784,7 @@ const RegisterButton = ({
|
|
|
10614
10784
|
buttonDisabled
|
|
10615
10785
|
},
|
|
10616
10786
|
dispatch
|
|
10617
|
-
} = React.useContext(store$
|
|
10787
|
+
} = React.useContext(store$g);
|
|
10618
10788
|
const {
|
|
10619
10789
|
t
|
|
10620
10790
|
} = useTranslation("register");
|
|
@@ -10752,7 +10922,7 @@ function FirstName({
|
|
|
10752
10922
|
}
|
|
10753
10923
|
|
|
10754
10924
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
10755
|
-
store: store$
|
|
10925
|
+
store: store$g
|
|
10756
10926
|
}, props));
|
|
10757
10927
|
|
|
10758
10928
|
function LastName({
|
|
@@ -10783,7 +10953,7 @@ function LastName({
|
|
|
10783
10953
|
}
|
|
10784
10954
|
|
|
10785
10955
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
10786
|
-
store: store$
|
|
10956
|
+
store: store$g
|
|
10787
10957
|
}, props));
|
|
10788
10958
|
|
|
10789
10959
|
/**
|
|
@@ -10907,7 +11077,7 @@ function TextInput({
|
|
|
10907
11077
|
|
|
10908
11078
|
const RegisterTextInput = props => {
|
|
10909
11079
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
10910
|
-
store: store$
|
|
11080
|
+
store: store$g
|
|
10911
11081
|
}));
|
|
10912
11082
|
};
|
|
10913
11083
|
|
|
@@ -12576,7 +12746,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12576
12746
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12577
12747
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12578
12748
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12579
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12749
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12750
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12580
12751
|
};
|
|
12581
12752
|
|
|
12582
12753
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12586,7 +12757,7 @@ var _generateUserError = /*#__PURE__*/new WeakMap();
|
|
|
12586
12757
|
class Subscription {
|
|
12587
12758
|
/**
|
|
12588
12759
|
* Subscription service constructor
|
|
12589
|
-
* @param {(StripeGateway|
|
|
12760
|
+
* @param {(StripeGateway|PaypalGateway|VantivGateway)} paymentGateway
|
|
12590
12761
|
*/
|
|
12591
12762
|
constructor(paymentGateway) {
|
|
12592
12763
|
_defineProperty$3(this, "execute", (options, callback) => {
|
|
@@ -12607,7 +12778,7 @@ class Subscription {
|
|
|
12607
12778
|
_isPaymentGatewayInvalid.set(this, {
|
|
12608
12779
|
writable: true,
|
|
12609
12780
|
value: gateway => {
|
|
12610
|
-
return gateway && !(gateway instanceof StripeGateway
|
|
12781
|
+
return gateway && !(gateway instanceof StripeGateway || gateway instanceof PaypalGateway || gateway instanceof VantivGateway);
|
|
12611
12782
|
}
|
|
12612
12783
|
});
|
|
12613
12784
|
|
|
@@ -12638,6 +12809,7 @@ class Subscription {
|
|
|
12638
12809
|
* @property {number} [subscriptionIdToRenew]
|
|
12639
12810
|
* @property {number} [quantity]
|
|
12640
12811
|
* @property {string} addressId
|
|
12812
|
+
* @property {number} invoiceId
|
|
12641
12813
|
*/
|
|
12642
12814
|
|
|
12643
12815
|
/**
|
|
@@ -12658,7 +12830,8 @@ class Subscription {
|
|
|
12658
12830
|
}
|
|
12659
12831
|
const PAYMENT_GATEWAYS_ENUM = {
|
|
12660
12832
|
stripe: "stripe",
|
|
12661
|
-
paypal: "braintree"
|
|
12833
|
+
paypal: "braintree",
|
|
12834
|
+
vantiv: "vantiv"
|
|
12662
12835
|
};
|
|
12663
12836
|
/**
|
|
12664
12837
|
* Subscription Strategies
|
|
@@ -12678,6 +12851,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12678
12851
|
|
|
12679
12852
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12680
12853
|
|
|
12854
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12855
|
+
|
|
12681
12856
|
class StripeGateway {
|
|
12682
12857
|
constructor() {
|
|
12683
12858
|
_paymentGateway.set(this, {
|
|
@@ -12701,6 +12876,9 @@ class StripeGateway {
|
|
|
12701
12876
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12702
12877
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12703
12878
|
|
|
12879
|
+
case types.PAY_INVOICE:
|
|
12880
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12881
|
+
|
|
12704
12882
|
default:
|
|
12705
12883
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12706
12884
|
}
|
|
@@ -12809,6 +12987,23 @@ class StripeGateway {
|
|
|
12809
12987
|
});
|
|
12810
12988
|
}
|
|
12811
12989
|
});
|
|
12990
|
+
|
|
12991
|
+
_payInvoice.set(this, {
|
|
12992
|
+
writable: true,
|
|
12993
|
+
value: (options, callback) => {
|
|
12994
|
+
const {
|
|
12995
|
+
token,
|
|
12996
|
+
invoiceId
|
|
12997
|
+
} = options;
|
|
12998
|
+
window.Pelcro.invoice.pay({
|
|
12999
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
13000
|
+
gateway_token: token,
|
|
13001
|
+
invoice_id: invoiceId
|
|
13002
|
+
}, (err, res) => {
|
|
13003
|
+
callback(err, res);
|
|
13004
|
+
});
|
|
13005
|
+
}
|
|
13006
|
+
});
|
|
12812
13007
|
}
|
|
12813
13008
|
|
|
12814
13009
|
}
|
|
@@ -12822,7 +13017,9 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12822
13017
|
|
|
12823
13018
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12824
13019
|
|
|
12825
|
-
|
|
13020
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
13021
|
+
|
|
13022
|
+
class PaypalGateway {
|
|
12826
13023
|
constructor() {
|
|
12827
13024
|
_paymentGateway2.set(this, {
|
|
12828
13025
|
writable: true,
|
|
@@ -12839,6 +13036,9 @@ class PaypalGateWay {
|
|
|
12839
13036
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12840
13037
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12841
13038
|
|
|
13039
|
+
case types.PAY_INVOICE:
|
|
13040
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
13041
|
+
|
|
12842
13042
|
default:
|
|
12843
13043
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12844
13044
|
}
|
|
@@ -12899,6 +13099,74 @@ class PaypalGateWay {
|
|
|
12899
13099
|
});
|
|
12900
13100
|
}
|
|
12901
13101
|
});
|
|
13102
|
+
|
|
13103
|
+
_payInvoice2.set(this, {
|
|
13104
|
+
writable: true,
|
|
13105
|
+
value: (options, callback) => {
|
|
13106
|
+
const {
|
|
13107
|
+
token,
|
|
13108
|
+
invoiceId
|
|
13109
|
+
} = options;
|
|
13110
|
+
window.Pelcro.invoice.pay({
|
|
13111
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13112
|
+
gateway_token: token,
|
|
13113
|
+
invoice_id: invoiceId
|
|
13114
|
+
}, (err, res) => {
|
|
13115
|
+
callback(err, res);
|
|
13116
|
+
});
|
|
13117
|
+
}
|
|
13118
|
+
});
|
|
13119
|
+
}
|
|
13120
|
+
|
|
13121
|
+
}
|
|
13122
|
+
|
|
13123
|
+
var _paymentGateway3 = /*#__PURE__*/new WeakMap();
|
|
13124
|
+
|
|
13125
|
+
var _createSubscription3 = /*#__PURE__*/new WeakMap();
|
|
13126
|
+
|
|
13127
|
+
class VantivGateway {
|
|
13128
|
+
constructor() {
|
|
13129
|
+
_paymentGateway3.set(this, {
|
|
13130
|
+
writable: true,
|
|
13131
|
+
value: PAYMENT_GATEWAYS_ENUM["vantiv"]
|
|
13132
|
+
});
|
|
13133
|
+
|
|
13134
|
+
_defineProperty$3(this, "execute", (options, callback) => {
|
|
13135
|
+
const types = SUBSCRIPTION_TYPES;
|
|
13136
|
+
|
|
13137
|
+
switch (options.type) {
|
|
13138
|
+
case types.CREATE_SUBSCRIPTION:
|
|
13139
|
+
return _classPrivateFieldGet(this, _createSubscription3).call(this, options, callback);
|
|
13140
|
+
|
|
13141
|
+
default:
|
|
13142
|
+
console.error("Unsupported subscriptiion method: vantiv Gateway");
|
|
13143
|
+
}
|
|
13144
|
+
});
|
|
13145
|
+
|
|
13146
|
+
_createSubscription3.set(this, {
|
|
13147
|
+
writable: true,
|
|
13148
|
+
value: (options, callback) => {
|
|
13149
|
+
const {
|
|
13150
|
+
token,
|
|
13151
|
+
plan,
|
|
13152
|
+
couponCode,
|
|
13153
|
+
product,
|
|
13154
|
+
quantity = 1,
|
|
13155
|
+
addressId
|
|
13156
|
+
} = options;
|
|
13157
|
+
window.Pelcro.subscription.create({
|
|
13158
|
+
quantity,
|
|
13159
|
+
gateway_token: token,
|
|
13160
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway3),
|
|
13161
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
13162
|
+
plan_id: plan.id,
|
|
13163
|
+
coupon_code: couponCode,
|
|
13164
|
+
address_id: product.address_required ? addressId : null
|
|
13165
|
+
}, (err, res) => {
|
|
13166
|
+
callback(err, res);
|
|
13167
|
+
});
|
|
13168
|
+
}
|
|
13169
|
+
});
|
|
12902
13170
|
}
|
|
12903
13171
|
|
|
12904
13172
|
}
|
|
@@ -12923,7 +13191,7 @@ class PaypalGateWay {
|
|
|
12923
13191
|
|
|
12924
13192
|
/** @type {PaymentStateType} */
|
|
12925
13193
|
|
|
12926
|
-
const initialState$
|
|
13194
|
+
const initialState$f = {
|
|
12927
13195
|
disableSubmit: false,
|
|
12928
13196
|
isLoading: false,
|
|
12929
13197
|
disableCouponButton: false,
|
|
@@ -12942,10 +13210,10 @@ const initialState$e = {
|
|
|
12942
13210
|
content: ""
|
|
12943
13211
|
}
|
|
12944
13212
|
};
|
|
12945
|
-
const store$
|
|
13213
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
12946
13214
|
const {
|
|
12947
|
-
Provider: Provider$
|
|
12948
|
-
} = store$
|
|
13215
|
+
Provider: Provider$f
|
|
13216
|
+
} = store$f;
|
|
12949
13217
|
|
|
12950
13218
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12951
13219
|
style,
|
|
@@ -12958,7 +13226,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12958
13226
|
onFailure = () => {},
|
|
12959
13227
|
...props
|
|
12960
13228
|
}) => {
|
|
12961
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13229
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12962
13230
|
|
|
12963
13231
|
const {
|
|
12964
13232
|
t
|
|
@@ -12975,6 +13243,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12975
13243
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12976
13244
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12977
13245
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13246
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12978
13247
|
React.useEffect(() => {
|
|
12979
13248
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12980
13249
|
dispatch({
|
|
@@ -12989,6 +13258,78 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12989
13258
|
updateTotalAmountWithTax();
|
|
12990
13259
|
}, []);
|
|
12991
13260
|
|
|
13261
|
+
function submitVantivPayment() {
|
|
13262
|
+
if (!vantivInstanceRef.current) {
|
|
13263
|
+
return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
|
|
13264
|
+
}
|
|
13265
|
+
|
|
13266
|
+
const orderId = `pelcro-${new Date().getTime()}`; // calls handleVantivPayment
|
|
13267
|
+
|
|
13268
|
+
vantivInstanceRef.current.getPaypageRegistrationId({
|
|
13269
|
+
id: orderId,
|
|
13270
|
+
orderId: orderId
|
|
13271
|
+
});
|
|
13272
|
+
}
|
|
13273
|
+
|
|
13274
|
+
function handleVantivPayment(paymentRequest) {
|
|
13275
|
+
const SUCCESS_STATUS = "870";
|
|
13276
|
+
|
|
13277
|
+
if (paymentRequest.response !== SUCCESS_STATUS) {
|
|
13278
|
+
return handlePaymentError({
|
|
13279
|
+
error: new Error(paymentRequest.message)
|
|
13280
|
+
});
|
|
13281
|
+
}
|
|
13282
|
+
|
|
13283
|
+
const subscription = new Subscription(new VantivGateway());
|
|
13284
|
+
const {
|
|
13285
|
+
couponCode
|
|
13286
|
+
} = state;
|
|
13287
|
+
return subscription.execute({
|
|
13288
|
+
type: SUBSCRIPTION_TYPES.CREATE_SUBSCRIPTION,
|
|
13289
|
+
token: paymentRequest,
|
|
13290
|
+
quantity: plan.quantity,
|
|
13291
|
+
plan,
|
|
13292
|
+
couponCode,
|
|
13293
|
+
product,
|
|
13294
|
+
addressId: selectedAddressId
|
|
13295
|
+
}, (err, res) => {
|
|
13296
|
+
if (err) {
|
|
13297
|
+
return handlePaymentError(err);
|
|
13298
|
+
}
|
|
13299
|
+
|
|
13300
|
+
onSuccess(res);
|
|
13301
|
+
});
|
|
13302
|
+
}
|
|
13303
|
+
|
|
13304
|
+
const vantivInstanceRef = React__default['default'].useRef(null);
|
|
13305
|
+
React.useEffect(() => {
|
|
13306
|
+
const cardProcessor = getSiteCardProcessor();
|
|
13307
|
+
|
|
13308
|
+
if (cardProcessor === "vantiv") {
|
|
13309
|
+
var _window$Pelcro$site$r;
|
|
13310
|
+
|
|
13311
|
+
const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_pay_page_id;
|
|
13312
|
+
vantivInstanceRef.current = new window.EprotectIframeClient({
|
|
13313
|
+
paypageId: payPageId,
|
|
13314
|
+
reportGroup: payPageId,
|
|
13315
|
+
style: "pelcro",
|
|
13316
|
+
height: "245",
|
|
13317
|
+
timeout: 50000,
|
|
13318
|
+
div: "eProtectiframe",
|
|
13319
|
+
callback: handleVantivPayment,
|
|
13320
|
+
showCvv: true,
|
|
13321
|
+
numYears: 8,
|
|
13322
|
+
placeholderText: {
|
|
13323
|
+
cvv: "CVV",
|
|
13324
|
+
accountNumber: "1234 1234 1234 1234"
|
|
13325
|
+
},
|
|
13326
|
+
enhancedUxFeatures: {
|
|
13327
|
+
inlineFieldValidations: true
|
|
13328
|
+
}
|
|
13329
|
+
});
|
|
13330
|
+
}
|
|
13331
|
+
}, []);
|
|
13332
|
+
|
|
12992
13333
|
const initPaymentRequest = (state, dispatch) => {
|
|
12993
13334
|
try {
|
|
12994
13335
|
const paymentRequest = stripe.paymentRequest({
|
|
@@ -13059,9 +13400,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13059
13400
|
|
|
13060
13401
|
|
|
13061
13402
|
const updateTotalAmountWithTax = () => {
|
|
13062
|
-
var _window$Pelcro$site$
|
|
13403
|
+
var _window$Pelcro$site$r2;
|
|
13063
13404
|
|
|
13064
|
-
const taxesEnabled = (_window$Pelcro$site$
|
|
13405
|
+
const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
|
|
13065
13406
|
|
|
13066
13407
|
if (taxesEnabled && type === "createPayment") {
|
|
13067
13408
|
dispatch({
|
|
@@ -13411,7 +13752,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13411
13752
|
|
|
13412
13753
|
|
|
13413
13754
|
const handlePaypalSubscription = (state, paypalNonce) => {
|
|
13414
|
-
const subscription = new Subscription(new
|
|
13755
|
+
const subscription = new Subscription(new PaypalGateway());
|
|
13415
13756
|
const {
|
|
13416
13757
|
couponCode
|
|
13417
13758
|
} = state;
|
|
@@ -13543,6 +13884,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13543
13884
|
});
|
|
13544
13885
|
};
|
|
13545
13886
|
|
|
13887
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13888
|
+
const subscription = new Subscription(gatewayService);
|
|
13889
|
+
return subscription.execute({
|
|
13890
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13891
|
+
token: gatewayToken,
|
|
13892
|
+
invoiceId: invoice.id
|
|
13893
|
+
}, (err, res) => {
|
|
13894
|
+
dispatch({
|
|
13895
|
+
type: DISABLE_SUBMIT,
|
|
13896
|
+
payload: false
|
|
13897
|
+
});
|
|
13898
|
+
dispatch({
|
|
13899
|
+
type: LOADING,
|
|
13900
|
+
payload: false
|
|
13901
|
+
});
|
|
13902
|
+
|
|
13903
|
+
if (err) {
|
|
13904
|
+
onFailure(err);
|
|
13905
|
+
return dispatch({
|
|
13906
|
+
type: SHOW_ALERT,
|
|
13907
|
+
payload: {
|
|
13908
|
+
type: "error",
|
|
13909
|
+
content: getErrorMessages(err)
|
|
13910
|
+
}
|
|
13911
|
+
});
|
|
13912
|
+
}
|
|
13913
|
+
|
|
13914
|
+
set({
|
|
13915
|
+
invoice: null
|
|
13916
|
+
});
|
|
13917
|
+
onSuccess(res);
|
|
13918
|
+
});
|
|
13919
|
+
};
|
|
13920
|
+
|
|
13546
13921
|
const updatePaymentSource = (state, dispatch) => {
|
|
13547
13922
|
return stripe.createSource({
|
|
13548
13923
|
type: "card"
|
|
@@ -13617,13 +13992,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13617
13992
|
source,
|
|
13618
13993
|
error
|
|
13619
13994
|
}) => {
|
|
13620
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13995
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13621
13996
|
|
|
13622
13997
|
if (error) {
|
|
13623
13998
|
return handlePaymentError(error);
|
|
13624
13999
|
}
|
|
13625
14000
|
|
|
13626
14001
|
const getOrderItemsTotal = () => {
|
|
14002
|
+
if (!order) {
|
|
14003
|
+
return null;
|
|
14004
|
+
}
|
|
14005
|
+
|
|
13627
14006
|
const isQuickPurchase = !Array.isArray(order);
|
|
13628
14007
|
|
|
13629
14008
|
if (isQuickPurchase) {
|
|
@@ -13639,7 +14018,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13639
14018
|
}, 0);
|
|
13640
14019
|
};
|
|
13641
14020
|
|
|
13642
|
-
const totalAmount = (_ref = (_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 && _ref !== void 0 ? _ref : getOrderItemsTotal();
|
|
14021
|
+
const totalAmount = (_ref = (_ref2 = (_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 && _ref2 !== void 0 ? _ref2 : invoice.amount_remaining) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
|
|
13643
14022
|
|
|
13644
14023
|
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" && totalAmount > 0) {
|
|
13645
14024
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13670,9 +14049,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13670
14049
|
|
|
13671
14050
|
|
|
13672
14051
|
const resolveTaxCalculation = () => {
|
|
13673
|
-
var _window$Pelcro$site$
|
|
14052
|
+
var _window$Pelcro$site$r3;
|
|
13674
14053
|
|
|
13675
|
-
|
|
14054
|
+
if (type === "invoicePayment") {
|
|
14055
|
+
return new Promise(resolve => resolve());
|
|
14056
|
+
}
|
|
14057
|
+
|
|
14058
|
+
const taxesEnabled = (_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.taxes_enabled;
|
|
13676
14059
|
return new Promise((resolve, reject) => {
|
|
13677
14060
|
// resolve early if taxes isn't enabled
|
|
13678
14061
|
if (!taxesEnabled) {
|
|
@@ -13745,10 +14128,14 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13745
14128
|
subscribe(stripeSource, state, dispatch);
|
|
13746
14129
|
} else if (stripeSource && type === "orderCreate") {
|
|
13747
14130
|
purchase(stripeSource, state, dispatch);
|
|
14131
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
14132
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13748
14133
|
}
|
|
13749
14134
|
};
|
|
13750
14135
|
|
|
13751
14136
|
const handlePaymentError = error => {
|
|
14137
|
+
var _getErrorMessages;
|
|
14138
|
+
|
|
13752
14139
|
if (error.type === "validation_error" && // Subscription creation & renewal
|
|
13753
14140
|
type === "createPayment") {
|
|
13754
14141
|
var _state$couponObject;
|
|
@@ -13767,7 +14154,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13767
14154
|
type: SHOW_ALERT,
|
|
13768
14155
|
payload: {
|
|
13769
14156
|
type: "error",
|
|
13770
|
-
content: error === null || error === void 0 ? void 0 : error.message
|
|
14157
|
+
content: (_getErrorMessages = getErrorMessages(error)) !== null && _getErrorMessages !== void 0 ? _getErrorMessages : error === null || error === void 0 ? void 0 : error.message
|
|
13771
14158
|
}
|
|
13772
14159
|
});
|
|
13773
14160
|
dispatch({
|
|
@@ -13871,14 +14258,24 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13871
14258
|
}
|
|
13872
14259
|
|
|
13873
14260
|
if (type === "updatePaymentSource") {
|
|
13874
|
-
updatePaymentSource(state, dispatch);
|
|
13875
|
-
} else {
|
|
13876
|
-
submitPayment(state);
|
|
14261
|
+
return updatePaymentSource(state, dispatch);
|
|
13877
14262
|
}
|
|
14263
|
+
|
|
14264
|
+
if (getSiteCardProcessor() === "vantiv") {
|
|
14265
|
+
return submitVantivPayment();
|
|
14266
|
+
}
|
|
14267
|
+
|
|
14268
|
+
submitPayment(state);
|
|
13878
14269
|
});
|
|
13879
14270
|
|
|
13880
14271
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13881
|
-
return lib_5(state, () =>
|
|
14272
|
+
return lib_5(state, (state, dispatch) => {
|
|
14273
|
+
if (type === "invoicePayment") {
|
|
14274
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14275
|
+
} else {
|
|
14276
|
+
handlePaypalSubscription(state, action.payload);
|
|
14277
|
+
}
|
|
14278
|
+
});
|
|
13882
14279
|
|
|
13883
14280
|
case SET_UPDATED_PRICE:
|
|
13884
14281
|
return lib_7({ ...state,
|
|
@@ -13936,21 +14333,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13936
14333
|
default:
|
|
13937
14334
|
return state;
|
|
13938
14335
|
}
|
|
13939
|
-
}, initialState$
|
|
14336
|
+
}, initialState$f);
|
|
13940
14337
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13941
14338
|
style: { ...style
|
|
13942
14339
|
},
|
|
13943
14340
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13944
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
14341
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
13945
14342
|
value: {
|
|
13946
14343
|
state,
|
|
13947
14344
|
dispatch
|
|
13948
14345
|
}
|
|
13949
14346
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13950
|
-
store: store$
|
|
14347
|
+
store: store$f,
|
|
13951
14348
|
key: i
|
|
13952
14349
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13953
|
-
store: store$
|
|
14350
|
+
store: store$f
|
|
13954
14351
|
})));
|
|
13955
14352
|
};
|
|
13956
14353
|
|
|
@@ -13972,7 +14369,7 @@ const PaymentMethodContainer = props => {
|
|
|
13972
14369
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13973
14370
|
locale: getPageOrDefaultLanguage()
|
|
13974
14371
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
13975
|
-
store: store$
|
|
14372
|
+
store: store$f
|
|
13976
14373
|
}, props))));
|
|
13977
14374
|
}
|
|
13978
14375
|
|
|
@@ -14025,7 +14422,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14025
14422
|
currentPlan,
|
|
14026
14423
|
updatedPrice
|
|
14027
14424
|
}
|
|
14028
|
-
} = React.useContext(store$
|
|
14425
|
+
} = React.useContext(store$f);
|
|
14029
14426
|
|
|
14030
14427
|
const updatePaymentRequest = () => {
|
|
14031
14428
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14057,19 +14454,35 @@ const CheckoutForm = () => {
|
|
|
14057
14454
|
const {
|
|
14058
14455
|
selectedPaymentMethodId
|
|
14059
14456
|
} = usePelcro();
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
}
|
|
14071
|
-
|
|
14072
|
-
|
|
14457
|
+
const cardProcessor = getSiteCardProcessor();
|
|
14458
|
+
|
|
14459
|
+
if (selectedPaymentMethodId) {
|
|
14460
|
+
return null;
|
|
14461
|
+
}
|
|
14462
|
+
|
|
14463
|
+
if (cardProcessor === "vantiv") {
|
|
14464
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14465
|
+
id: "eProtectiframe"
|
|
14466
|
+
});
|
|
14467
|
+
}
|
|
14468
|
+
|
|
14469
|
+
if (cardProcessor === "stripe") {
|
|
14470
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
|
|
14471
|
+
autoFocus: true
|
|
14472
|
+
}), /*#__PURE__*/React__default['default'].createElement("img", {
|
|
14473
|
+
alt: "credit_cards",
|
|
14474
|
+
className: "plc-w-auto plc-h-4 plc-mt-2",
|
|
14475
|
+
src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
|
|
14476
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14477
|
+
className: "plc-flex plc-items-end plc-justify-between plc-my-2"
|
|
14478
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14479
|
+
className: "plc-w-6/12 plc-pr-4"
|
|
14480
|
+
}, /*#__PURE__*/React__default['default'].createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14481
|
+
className: "plc-w-6/12 plc-pl-4"
|
|
14482
|
+
}, /*#__PURE__*/React__default['default'].createElement(PelcroCardCVC, null))));
|
|
14483
|
+
}
|
|
14484
|
+
|
|
14485
|
+
return null;
|
|
14073
14486
|
};
|
|
14074
14487
|
|
|
14075
14488
|
const DiscountedPrice = props => {
|
|
@@ -14085,7 +14498,7 @@ const DiscountedPrice = props => {
|
|
|
14085
14498
|
taxAmount,
|
|
14086
14499
|
percentOff
|
|
14087
14500
|
}
|
|
14088
|
-
} = React.useContext(store$
|
|
14501
|
+
} = React.useContext(store$f);
|
|
14089
14502
|
const {
|
|
14090
14503
|
order,
|
|
14091
14504
|
plan
|
|
@@ -14135,7 +14548,7 @@ const SubmitPaymentMethod = ({
|
|
|
14135
14548
|
isLoading,
|
|
14136
14549
|
updatedPrice
|
|
14137
14550
|
}
|
|
14138
|
-
} = React.useContext(store$
|
|
14551
|
+
} = React.useContext(store$f);
|
|
14139
14552
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14140
14553
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14141
14554
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14156,17 +14569,17 @@ const SubmitPaymentMethod = ({
|
|
|
14156
14569
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14157
14570
|
};
|
|
14158
14571
|
|
|
14159
|
-
var _path$
|
|
14572
|
+
var _path$m;
|
|
14160
14573
|
|
|
14161
|
-
function _extends$
|
|
14574
|
+
function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
14162
14575
|
|
|
14163
14576
|
function SvgArrowLeft(props) {
|
|
14164
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14577
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
14165
14578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14166
14579
|
fill: "none",
|
|
14167
14580
|
viewBox: "0 0 24 24",
|
|
14168
14581
|
stroke: "currentColor"
|
|
14169
|
-
}, props), _path$
|
|
14582
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14170
14583
|
strokeLinecap: "round",
|
|
14171
14584
|
strokeLinejoin: "round",
|
|
14172
14585
|
strokeWidth: 2,
|
|
@@ -14185,7 +14598,7 @@ const ApplyCouponButton = ({
|
|
|
14185
14598
|
disableCouponButton
|
|
14186
14599
|
},
|
|
14187
14600
|
dispatch
|
|
14188
|
-
} = React.useContext(store$
|
|
14601
|
+
} = React.useContext(store$f);
|
|
14189
14602
|
const {
|
|
14190
14603
|
t
|
|
14191
14604
|
} = useTranslation("checkoutForm");
|
|
@@ -14219,7 +14632,7 @@ const CouponCodeField = props => {
|
|
|
14219
14632
|
couponCode,
|
|
14220
14633
|
couponError
|
|
14221
14634
|
}
|
|
14222
|
-
} = React.useContext(store$
|
|
14635
|
+
} = React.useContext(store$f);
|
|
14223
14636
|
|
|
14224
14637
|
const onCouponCodeChange = e => {
|
|
14225
14638
|
dispatch({
|
|
@@ -14248,17 +14661,17 @@ const CouponCodeField = props => {
|
|
|
14248
14661
|
}, props));
|
|
14249
14662
|
};
|
|
14250
14663
|
|
|
14251
|
-
var _path$
|
|
14664
|
+
var _path$l;
|
|
14252
14665
|
|
|
14253
|
-
function _extends$
|
|
14666
|
+
function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
14254
14667
|
|
|
14255
14668
|
function SvgTicket(props) {
|
|
14256
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14669
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
14257
14670
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14258
14671
|
fill: "none",
|
|
14259
14672
|
viewBox: "0 0 24 24",
|
|
14260
14673
|
stroke: "currentColor"
|
|
14261
|
-
}, props), _path$
|
|
14674
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14262
14675
|
strokeLinecap: "round",
|
|
14263
14676
|
strokeLinejoin: "round",
|
|
14264
14677
|
strokeWidth: 2,
|
|
@@ -14275,7 +14688,7 @@ const CouponCode = ({
|
|
|
14275
14688
|
state: {
|
|
14276
14689
|
enableCouponField
|
|
14277
14690
|
}
|
|
14278
|
-
} = React.useContext(store$
|
|
14691
|
+
} = React.useContext(store$f);
|
|
14279
14692
|
const {
|
|
14280
14693
|
t
|
|
14281
14694
|
} = useTranslation("checkoutForm");
|
|
@@ -14532,17 +14945,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14532
14945
|
const {
|
|
14533
14946
|
dispatch,
|
|
14534
14947
|
state
|
|
14535
|
-
} = React.useContext(store$
|
|
14948
|
+
} = React.useContext(store$f);
|
|
14536
14949
|
const {
|
|
14537
14950
|
product,
|
|
14538
14951
|
plan,
|
|
14952
|
+
invoice,
|
|
14539
14953
|
selectedAddressId
|
|
14540
14954
|
} = usePelcro();
|
|
14541
14955
|
React.useEffect(() => {
|
|
14542
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14956
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14543
14957
|
|
|
14544
14958
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14545
|
-
const updatedPrice = (_ref = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref !== void 0 ? _ref :
|
|
14959
|
+
const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice.amount_remaining;
|
|
14546
14960
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14547
14961
|
|
|
14548
14962
|
const initializePaypal = async () => {
|
|
@@ -14551,7 +14965,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14551
14965
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14552
14966
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14553
14967
|
style: props.buttonStyle,
|
|
14554
|
-
enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product.address_required,
|
|
14968
|
+
enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product === null || product === void 0 ? void 0 : product.address_required,
|
|
14555
14969
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14556
14970
|
displayName: props.merchantDisplayName,
|
|
14557
14971
|
locale: props.locale,
|
|
@@ -14561,9 +14975,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14561
14975
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14562
14976
|
|
|
14563
14977
|
paypalCheckoutInstance.createPayment({
|
|
14564
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14978
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14565
14979
|
amount: updatedPrice,
|
|
14566
|
-
address: selectedAddress,
|
|
14980
|
+
address: invoice ? null : selectedAddress,
|
|
14567
14981
|
onButtonClick: () => {
|
|
14568
14982
|
dispatch({
|
|
14569
14983
|
type: DISABLE_SUBMIT,
|
|
@@ -14617,16 +15031,16 @@ const BankRedirection = () => {
|
|
|
14617
15031
|
}));
|
|
14618
15032
|
};
|
|
14619
15033
|
|
|
14620
|
-
var _path$
|
|
15034
|
+
var _path$k;
|
|
14621
15035
|
|
|
14622
|
-
function _extends$
|
|
15036
|
+
function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
14623
15037
|
|
|
14624
15038
|
function SvgLock(props) {
|
|
14625
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15039
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
14626
15040
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14627
15041
|
viewBox: "0 0 20 20",
|
|
14628
15042
|
fill: "currentColor"
|
|
14629
|
-
}, props), _path$
|
|
15043
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14630
15044
|
fillRule: "evenodd",
|
|
14631
15045
|
d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
|
|
14632
15046
|
clipRule: "evenodd"
|
|
@@ -14643,7 +15057,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14643
15057
|
state: {
|
|
14644
15058
|
isLoading
|
|
14645
15059
|
}
|
|
14646
|
-
} = React.useContext(store$
|
|
15060
|
+
} = React.useContext(store$f);
|
|
14647
15061
|
const {
|
|
14648
15062
|
switchView,
|
|
14649
15063
|
selectedPaymentMethodId
|
|
@@ -14685,7 +15099,7 @@ const TaxAmount = () => {
|
|
|
14685
15099
|
state: {
|
|
14686
15100
|
taxAmount
|
|
14687
15101
|
}
|
|
14688
|
-
} = React.useContext(store$
|
|
15102
|
+
} = React.useContext(store$f);
|
|
14689
15103
|
const {
|
|
14690
15104
|
plan
|
|
14691
15105
|
} = usePelcro();
|
|
@@ -14718,9 +15132,10 @@ function PaymentMethodView({
|
|
|
14718
15132
|
const {
|
|
14719
15133
|
t
|
|
14720
15134
|
} = useTranslation("checkoutForm");
|
|
15135
|
+
const cardProcessor = getSiteCardProcessor();
|
|
14721
15136
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14722
15137
|
className: "plc-flex plc-flex-col plc-items-center plc-mt-4 sm:plc-px-8 pelcro-payment-block"
|
|
14723
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15138
|
+
}, cardProcessor === "stripe" && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14724
15139
|
className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
|
|
14725
15140
|
}, /*#__PURE__*/React__default['default'].createElement(SvgLock, {
|
|
14726
15141
|
className: "plc-w-5 plc-h-5 plc-mr-1"
|
|
@@ -14848,12 +15263,12 @@ function SubscriptionRenewModal({
|
|
|
14848
15263
|
}
|
|
14849
15264
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14850
15265
|
|
|
14851
|
-
var _path$
|
|
15266
|
+
var _path$j;
|
|
14852
15267
|
|
|
14853
|
-
function _extends$
|
|
15268
|
+
function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
14854
15269
|
|
|
14855
15270
|
function SvgGift(props) {
|
|
14856
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15271
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14857
15272
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14858
15273
|
fill: "none",
|
|
14859
15274
|
stroke: "currentColor",
|
|
@@ -14862,7 +15277,7 @@ function SvgGift(props) {
|
|
|
14862
15277
|
strokeWidth: 2,
|
|
14863
15278
|
viewBox: "0 0 24 24",
|
|
14864
15279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14865
|
-
}, props), _path$
|
|
15280
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14866
15281
|
d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
|
|
14867
15282
|
})));
|
|
14868
15283
|
}
|
|
@@ -14900,10 +15315,13 @@ const getCurrentFlow = () => {
|
|
|
14900
15315
|
const {
|
|
14901
15316
|
product,
|
|
14902
15317
|
giftRecipient,
|
|
14903
|
-
giftCode
|
|
15318
|
+
giftCode,
|
|
15319
|
+
invoice
|
|
14904
15320
|
} = usePelcro.getStore();
|
|
14905
15321
|
|
|
14906
|
-
if (
|
|
15322
|
+
if (invoice) {
|
|
15323
|
+
return "invoicePayment";
|
|
15324
|
+
} else if (giftRecipient) {
|
|
14907
15325
|
return "giftCreate";
|
|
14908
15326
|
} else if (giftCode) {
|
|
14909
15327
|
return "giftRedeem";
|
|
@@ -14940,6 +15358,13 @@ const getSuccessContent = i18n => {
|
|
|
14940
15358
|
}),
|
|
14941
15359
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14942
15360
|
successContent: i18n("messages.giftRedeem.content")
|
|
15361
|
+
},
|
|
15362
|
+
invoicePayment: {
|
|
15363
|
+
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
15364
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15365
|
+
}),
|
|
15366
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15367
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14943
15368
|
}
|
|
14944
15369
|
};
|
|
14945
15370
|
return wordingDictionary[flow];
|
|
@@ -15193,7 +15618,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
15193
15618
|
|
|
15194
15619
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15195
15620
|
|
|
15196
|
-
const initialState$
|
|
15621
|
+
const initialState$e = {
|
|
15197
15622
|
didSubToNewslettersBefore: false,
|
|
15198
15623
|
newsletters: [],
|
|
15199
15624
|
isListLoading: true,
|
|
@@ -15203,10 +15628,10 @@ const initialState$d = {
|
|
|
15203
15628
|
content: ""
|
|
15204
15629
|
}
|
|
15205
15630
|
};
|
|
15206
|
-
const store$
|
|
15631
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
15207
15632
|
const {
|
|
15208
|
-
Provider: Provider$
|
|
15209
|
-
} = store$
|
|
15633
|
+
Provider: Provider$e
|
|
15634
|
+
} = store$e;
|
|
15210
15635
|
|
|
15211
15636
|
const NewsletterUpdateContainer = ({
|
|
15212
15637
|
style,
|
|
@@ -15319,7 +15744,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15319
15744
|
default:
|
|
15320
15745
|
return state;
|
|
15321
15746
|
}
|
|
15322
|
-
}, initialState$
|
|
15747
|
+
}, initialState$e);
|
|
15323
15748
|
React.useEffect(() => {
|
|
15324
15749
|
const getUserNewsletters = () => {
|
|
15325
15750
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15363,7 +15788,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15363
15788
|
style: { ...style
|
|
15364
15789
|
},
|
|
15365
15790
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15366
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
15791
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
15367
15792
|
value: {
|
|
15368
15793
|
state,
|
|
15369
15794
|
dispatch
|
|
@@ -15371,12 +15796,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15371
15796
|
}, children.length ? children.map((child, i) => {
|
|
15372
15797
|
if (child) {
|
|
15373
15798
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15374
|
-
store: store$
|
|
15799
|
+
store: store$e,
|
|
15375
15800
|
key: i
|
|
15376
15801
|
});
|
|
15377
15802
|
}
|
|
15378
15803
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15379
|
-
store: store$
|
|
15804
|
+
store: store$e
|
|
15380
15805
|
})));
|
|
15381
15806
|
};
|
|
15382
15807
|
|
|
@@ -15391,7 +15816,7 @@ const NewsletterUpdateButton = ({
|
|
|
15391
15816
|
isSubmitting,
|
|
15392
15817
|
isListLoading
|
|
15393
15818
|
}
|
|
15394
|
-
} = React.useContext(store$
|
|
15819
|
+
} = React.useContext(store$e);
|
|
15395
15820
|
const {
|
|
15396
15821
|
t
|
|
15397
15822
|
} = useTranslation("newsletter");
|
|
@@ -15421,7 +15846,7 @@ const NewsletterUpdateList = () => {
|
|
|
15421
15846
|
newsletters,
|
|
15422
15847
|
isListLoading
|
|
15423
15848
|
}
|
|
15424
|
-
} = React.useContext(store$
|
|
15849
|
+
} = React.useContext(store$e);
|
|
15425
15850
|
|
|
15426
15851
|
if (isListLoading) {
|
|
15427
15852
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
@@ -15625,7 +16050,7 @@ function SubscriptionCreateModal({
|
|
|
15625
16050
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15626
16051
|
|
|
15627
16052
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15628
|
-
const initialState$
|
|
16053
|
+
const initialState$d = {
|
|
15629
16054
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15630
16055
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15631
16056
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15638,10 +16063,10 @@ const initialState$c = {
|
|
|
15638
16063
|
content: ""
|
|
15639
16064
|
}
|
|
15640
16065
|
};
|
|
15641
|
-
const store$
|
|
16066
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
15642
16067
|
const {
|
|
15643
|
-
Provider: Provider$
|
|
15644
|
-
} = store$
|
|
16068
|
+
Provider: Provider$d
|
|
16069
|
+
} = store$d;
|
|
15645
16070
|
|
|
15646
16071
|
const UserUpdateContainer = ({
|
|
15647
16072
|
style,
|
|
@@ -15773,27 +16198,27 @@ const UserUpdateContainer = ({
|
|
|
15773
16198
|
default:
|
|
15774
16199
|
return state;
|
|
15775
16200
|
}
|
|
15776
|
-
}, initialState$
|
|
16201
|
+
}, initialState$d);
|
|
15777
16202
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15778
16203
|
style: { ...style
|
|
15779
16204
|
},
|
|
15780
16205
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15781
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16206
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
15782
16207
|
value: {
|
|
15783
16208
|
state,
|
|
15784
16209
|
dispatch
|
|
15785
16210
|
}
|
|
15786
16211
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15787
|
-
store: store$
|
|
16212
|
+
store: store$d,
|
|
15788
16213
|
key: i
|
|
15789
16214
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15790
|
-
store: store$
|
|
16215
|
+
store: store$d
|
|
15791
16216
|
})));
|
|
15792
16217
|
};
|
|
15793
16218
|
|
|
15794
16219
|
const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
15795
16220
|
disabled: true,
|
|
15796
|
-
store: store$
|
|
16221
|
+
store: store$d
|
|
15797
16222
|
}, props));
|
|
15798
16223
|
|
|
15799
16224
|
const UserUpdateButton = ({
|
|
@@ -15806,7 +16231,7 @@ const UserUpdateButton = ({
|
|
|
15806
16231
|
buttonDisabled
|
|
15807
16232
|
},
|
|
15808
16233
|
dispatch
|
|
15809
|
-
} = React.useContext(store$
|
|
16234
|
+
} = React.useContext(store$d);
|
|
15810
16235
|
const {
|
|
15811
16236
|
t
|
|
15812
16237
|
} = useTranslation("userEdit");
|
|
@@ -15823,11 +16248,11 @@ const UserUpdateButton = ({
|
|
|
15823
16248
|
};
|
|
15824
16249
|
|
|
15825
16250
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
15826
|
-
store: store$
|
|
16251
|
+
store: store$d
|
|
15827
16252
|
}, props));
|
|
15828
16253
|
|
|
15829
16254
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
15830
|
-
store: store$
|
|
16255
|
+
store: store$d
|
|
15831
16256
|
}, props));
|
|
15832
16257
|
|
|
15833
16258
|
function Phone({
|
|
@@ -15856,22 +16281,22 @@ function Phone({
|
|
|
15856
16281
|
}
|
|
15857
16282
|
|
|
15858
16283
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
15859
|
-
store: store$
|
|
16284
|
+
store: store$d
|
|
15860
16285
|
}, props));
|
|
15861
16286
|
|
|
15862
16287
|
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";
|
|
15863
16288
|
|
|
15864
|
-
var _path$
|
|
16289
|
+
var _path$i;
|
|
15865
16290
|
|
|
15866
|
-
function _extends$
|
|
16291
|
+
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
15867
16292
|
|
|
15868
16293
|
function SvgEdit(props) {
|
|
15869
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16294
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
15870
16295
|
className: "plc-w-6 plc-h-6",
|
|
15871
16296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15872
16297
|
viewBox: "0 0 20 20",
|
|
15873
16298
|
fill: "currentColor"
|
|
15874
|
-
}, props), _path$
|
|
16299
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15875
16300
|
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
15876
16301
|
})));
|
|
15877
16302
|
}
|
|
@@ -16003,16 +16428,16 @@ function DisplayName({
|
|
|
16003
16428
|
}
|
|
16004
16429
|
|
|
16005
16430
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
16006
|
-
store: store$
|
|
16431
|
+
store: store$d
|
|
16007
16432
|
}, props));
|
|
16008
16433
|
|
|
16009
16434
|
const UserUpdateTextInput = props => {
|
|
16010
16435
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16011
|
-
store: store$
|
|
16436
|
+
store: store$d
|
|
16012
16437
|
}));
|
|
16013
16438
|
};
|
|
16014
16439
|
|
|
16015
|
-
const initialState$
|
|
16440
|
+
const initialState$c = {
|
|
16016
16441
|
isSubmitting: false,
|
|
16017
16442
|
firstName: "",
|
|
16018
16443
|
firstNameError: "",
|
|
@@ -16037,10 +16462,10 @@ const initialState$b = {
|
|
|
16037
16462
|
content: ""
|
|
16038
16463
|
}
|
|
16039
16464
|
};
|
|
16040
|
-
const store$
|
|
16465
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
16041
16466
|
const {
|
|
16042
|
-
Provider: Provider$
|
|
16043
|
-
} = store$
|
|
16467
|
+
Provider: Provider$c
|
|
16468
|
+
} = store$c;
|
|
16044
16469
|
|
|
16045
16470
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16046
16471
|
|
|
@@ -16247,7 +16672,7 @@ const AddressCreateContainer = ({
|
|
|
16247
16672
|
default:
|
|
16248
16673
|
return state;
|
|
16249
16674
|
}
|
|
16250
|
-
}, initialState$
|
|
16675
|
+
}, initialState$c);
|
|
16251
16676
|
React.useEffect(() => {
|
|
16252
16677
|
const getStates = () => {
|
|
16253
16678
|
dispatch({
|
|
@@ -16279,16 +16704,16 @@ const AddressCreateContainer = ({
|
|
|
16279
16704
|
style: { ...style
|
|
16280
16705
|
},
|
|
16281
16706
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16282
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16707
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
16283
16708
|
value: {
|
|
16284
16709
|
state,
|
|
16285
16710
|
dispatch
|
|
16286
16711
|
}
|
|
16287
16712
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
16288
|
-
store: store$
|
|
16713
|
+
store: store$c,
|
|
16289
16714
|
key: i
|
|
16290
16715
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
16291
|
-
store: store$
|
|
16716
|
+
store: store$c
|
|
16292
16717
|
})));
|
|
16293
16718
|
};
|
|
16294
16719
|
|
|
@@ -16299,7 +16724,7 @@ function AddressCreateFirstName(props) {
|
|
|
16299
16724
|
firstName,
|
|
16300
16725
|
firstNameError
|
|
16301
16726
|
}
|
|
16302
|
-
} = React.useContext(store$
|
|
16727
|
+
} = React.useContext(store$c);
|
|
16303
16728
|
|
|
16304
16729
|
const handleBlur = () => {
|
|
16305
16730
|
return dispatch({
|
|
@@ -16342,7 +16767,7 @@ function AddressCreateLastName(props) {
|
|
|
16342
16767
|
lastName,
|
|
16343
16768
|
lastNameError
|
|
16344
16769
|
}
|
|
16345
|
-
} = React.useContext(store$
|
|
16770
|
+
} = React.useContext(store$c);
|
|
16346
16771
|
|
|
16347
16772
|
const handleBlur = () => {
|
|
16348
16773
|
return dispatch({
|
|
@@ -16385,7 +16810,7 @@ function AddressCreateLine1(props) {
|
|
|
16385
16810
|
line1,
|
|
16386
16811
|
line1Error
|
|
16387
16812
|
}
|
|
16388
|
-
} = React.useContext(store$
|
|
16813
|
+
} = React.useContext(store$c);
|
|
16389
16814
|
|
|
16390
16815
|
const handleBlur = () => {
|
|
16391
16816
|
return dispatch({
|
|
@@ -16428,7 +16853,7 @@ function AddressCreateCity(props) {
|
|
|
16428
16853
|
city,
|
|
16429
16854
|
cityError
|
|
16430
16855
|
}
|
|
16431
|
-
} = React.useContext(store$
|
|
16856
|
+
} = React.useContext(store$c);
|
|
16432
16857
|
|
|
16433
16858
|
const handleBlur = () => {
|
|
16434
16859
|
return dispatch({
|
|
@@ -16471,7 +16896,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16471
16896
|
postalCode,
|
|
16472
16897
|
postalCodeError
|
|
16473
16898
|
}
|
|
16474
|
-
} = React.useContext(store$
|
|
16899
|
+
} = React.useContext(store$c);
|
|
16475
16900
|
|
|
16476
16901
|
const handleBlur = () => {
|
|
16477
16902
|
return dispatch({
|
|
@@ -16517,7 +16942,7 @@ const AddressCreateSubmit = ({
|
|
|
16517
16942
|
state: {
|
|
16518
16943
|
isSubmitting
|
|
16519
16944
|
}
|
|
16520
|
-
} = React.useContext(store$
|
|
16945
|
+
} = React.useContext(store$c);
|
|
16521
16946
|
const {
|
|
16522
16947
|
t
|
|
16523
16948
|
} = useTranslation("address");
|
|
@@ -16628,7 +17053,7 @@ function CountrySelect({
|
|
|
16628
17053
|
}
|
|
16629
17054
|
|
|
16630
17055
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
16631
|
-
store: store$
|
|
17056
|
+
store: store$c
|
|
16632
17057
|
}, props));
|
|
16633
17058
|
|
|
16634
17059
|
function StateSelect({
|
|
@@ -16716,7 +17141,7 @@ function StateSelect({
|
|
|
16716
17141
|
}
|
|
16717
17142
|
|
|
16718
17143
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
16719
|
-
store: store$
|
|
17144
|
+
store: store$c
|
|
16720
17145
|
}, props));
|
|
16721
17146
|
|
|
16722
17147
|
const AddressCreateView = props => {
|
|
@@ -16821,18 +17246,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16821
17246
|
|
|
16822
17247
|
const AddressCreateTextInput = props => {
|
|
16823
17248
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16824
|
-
store: store$
|
|
17249
|
+
store: store$c
|
|
16825
17250
|
}));
|
|
16826
17251
|
};
|
|
16827
17252
|
|
|
16828
17253
|
const AddressCreateLine2 = props => {
|
|
16829
17254
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
16830
17255
|
fieldName: "line2",
|
|
16831
|
-
store: store$
|
|
17256
|
+
store: store$c
|
|
16832
17257
|
}, props));
|
|
16833
17258
|
};
|
|
16834
17259
|
|
|
16835
|
-
const initialState$
|
|
17260
|
+
const initialState$b = {
|
|
16836
17261
|
isSubmitting: false,
|
|
16837
17262
|
firstName: "",
|
|
16838
17263
|
firstNameError: "",
|
|
@@ -16857,10 +17282,10 @@ const initialState$a = {
|
|
|
16857
17282
|
content: ""
|
|
16858
17283
|
}
|
|
16859
17284
|
};
|
|
16860
|
-
const store$
|
|
17285
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
16861
17286
|
const {
|
|
16862
|
-
Provider: Provider$
|
|
16863
|
-
} = store$
|
|
17287
|
+
Provider: Provider$b
|
|
17288
|
+
} = store$b;
|
|
16864
17289
|
|
|
16865
17290
|
const AddressUpdateContainer = ({
|
|
16866
17291
|
style,
|
|
@@ -16912,7 +17337,7 @@ const AddressUpdateContainer = ({
|
|
|
16912
17337
|
const thisAddress = addresses[address];
|
|
16913
17338
|
|
|
16914
17339
|
if (+thisAddress.id === +addressId) {
|
|
16915
|
-
const newState = { ...initialState$
|
|
17340
|
+
const newState = { ...initialState$b,
|
|
16916
17341
|
firstName: thisAddress.first_name,
|
|
16917
17342
|
lastName: thisAddress.last_name,
|
|
16918
17343
|
line1: thisAddress.line1,
|
|
@@ -17045,7 +17470,7 @@ const AddressUpdateContainer = ({
|
|
|
17045
17470
|
default:
|
|
17046
17471
|
return state;
|
|
17047
17472
|
}
|
|
17048
|
-
}, initialState$
|
|
17473
|
+
}, initialState$b);
|
|
17049
17474
|
React.useEffect(() => {
|
|
17050
17475
|
const getStates = () => {
|
|
17051
17476
|
dispatch({
|
|
@@ -17077,21 +17502,21 @@ const AddressUpdateContainer = ({
|
|
|
17077
17502
|
style: { ...style
|
|
17078
17503
|
},
|
|
17079
17504
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17080
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17505
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
17081
17506
|
value: {
|
|
17082
17507
|
state,
|
|
17083
17508
|
dispatch
|
|
17084
17509
|
}
|
|
17085
17510
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17086
|
-
store: store$
|
|
17511
|
+
store: store$b,
|
|
17087
17512
|
key: i
|
|
17088
17513
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17089
|
-
store: store$
|
|
17514
|
+
store: store$b
|
|
17090
17515
|
})));
|
|
17091
17516
|
};
|
|
17092
17517
|
|
|
17093
17518
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
17094
|
-
store: store$
|
|
17519
|
+
store: store$b
|
|
17095
17520
|
}, props));
|
|
17096
17521
|
|
|
17097
17522
|
function AddressUpdateFirstName(props) {
|
|
@@ -17101,7 +17526,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17101
17526
|
firstName,
|
|
17102
17527
|
firstNameError
|
|
17103
17528
|
}
|
|
17104
|
-
} = React.useContext(store$
|
|
17529
|
+
} = React.useContext(store$b);
|
|
17105
17530
|
|
|
17106
17531
|
const handleBlur = () => {
|
|
17107
17532
|
return dispatch({
|
|
@@ -17144,7 +17569,7 @@ function AddressUpdateLastName(props) {
|
|
|
17144
17569
|
lastName,
|
|
17145
17570
|
lastNameError
|
|
17146
17571
|
}
|
|
17147
|
-
} = React.useContext(store$
|
|
17572
|
+
} = React.useContext(store$b);
|
|
17148
17573
|
|
|
17149
17574
|
const handleBlur = () => {
|
|
17150
17575
|
return dispatch({
|
|
@@ -17187,7 +17612,7 @@ function AddressUpdateLine1(props) {
|
|
|
17187
17612
|
line1,
|
|
17188
17613
|
line1Error
|
|
17189
17614
|
}
|
|
17190
|
-
} = React.useContext(store$
|
|
17615
|
+
} = React.useContext(store$b);
|
|
17191
17616
|
|
|
17192
17617
|
const handleBlur = () => {
|
|
17193
17618
|
return dispatch({
|
|
@@ -17227,7 +17652,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17227
17652
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
17228
17653
|
fieldName: "line2"
|
|
17229
17654
|
}, props, {
|
|
17230
|
-
store: store$
|
|
17655
|
+
store: store$b
|
|
17231
17656
|
}));
|
|
17232
17657
|
};
|
|
17233
17658
|
|
|
@@ -17238,7 +17663,7 @@ function AddressUpdateCity(props) {
|
|
|
17238
17663
|
city,
|
|
17239
17664
|
cityError
|
|
17240
17665
|
}
|
|
17241
|
-
} = React.useContext(store$
|
|
17666
|
+
} = React.useContext(store$b);
|
|
17242
17667
|
|
|
17243
17668
|
const handleBlur = () => {
|
|
17244
17669
|
return dispatch({
|
|
@@ -17281,7 +17706,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17281
17706
|
postalCode,
|
|
17282
17707
|
postalCodeError
|
|
17283
17708
|
}
|
|
17284
|
-
} = React.useContext(store$
|
|
17709
|
+
} = React.useContext(store$b);
|
|
17285
17710
|
|
|
17286
17711
|
const handleBlur = () => {
|
|
17287
17712
|
return dispatch({
|
|
@@ -17327,7 +17752,7 @@ const AddressUpdateSubmit = ({
|
|
|
17327
17752
|
state: {
|
|
17328
17753
|
isSubmitting
|
|
17329
17754
|
}
|
|
17330
|
-
} = React.useContext(store$
|
|
17755
|
+
} = React.useContext(store$b);
|
|
17331
17756
|
const {
|
|
17332
17757
|
t
|
|
17333
17758
|
} = useTranslation("address");
|
|
@@ -17343,7 +17768,7 @@ const AddressUpdateSubmit = ({
|
|
|
17343
17768
|
};
|
|
17344
17769
|
|
|
17345
17770
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
17346
|
-
store: store$
|
|
17771
|
+
store: store$b
|
|
17347
17772
|
}, props));
|
|
17348
17773
|
|
|
17349
17774
|
const AddressUpdateView = props => {
|
|
@@ -17426,7 +17851,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17426
17851
|
|
|
17427
17852
|
const AddressUpdateTextInput = props => {
|
|
17428
17853
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
17429
|
-
store: store$
|
|
17854
|
+
store: store$b
|
|
17430
17855
|
}));
|
|
17431
17856
|
};
|
|
17432
17857
|
|
|
@@ -17509,7 +17934,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17509
17934
|
};
|
|
17510
17935
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17511
17936
|
|
|
17512
|
-
const initialState$
|
|
17937
|
+
const initialState$a = {
|
|
17513
17938
|
email: "",
|
|
17514
17939
|
password: "",
|
|
17515
17940
|
passwordError: null,
|
|
@@ -17522,10 +17947,10 @@ const initialState$9 = {
|
|
|
17522
17947
|
content: ""
|
|
17523
17948
|
}
|
|
17524
17949
|
};
|
|
17525
|
-
const store$
|
|
17950
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
17526
17951
|
const {
|
|
17527
|
-
Provider: Provider$
|
|
17528
|
-
} = store$
|
|
17952
|
+
Provider: Provider$a
|
|
17953
|
+
} = store$a;
|
|
17529
17954
|
|
|
17530
17955
|
const PasswordResetContainer = ({
|
|
17531
17956
|
style,
|
|
@@ -17582,7 +18007,7 @@ const PasswordResetContainer = ({
|
|
|
17582
18007
|
type: SET_EMAIL,
|
|
17583
18008
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17584
18009
|
});
|
|
17585
|
-
initialState$
|
|
18010
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17586
18011
|
dispatch({
|
|
17587
18012
|
type: SET_TOKEN,
|
|
17588
18013
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17642,26 +18067,26 @@ const PasswordResetContainer = ({
|
|
|
17642
18067
|
default:
|
|
17643
18068
|
return state;
|
|
17644
18069
|
}
|
|
17645
|
-
}, initialState$
|
|
18070
|
+
}, initialState$a);
|
|
17646
18071
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17647
18072
|
style: { ...style
|
|
17648
18073
|
},
|
|
17649
18074
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17650
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18075
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
17651
18076
|
value: {
|
|
17652
18077
|
state,
|
|
17653
18078
|
dispatch
|
|
17654
18079
|
}
|
|
17655
18080
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17656
|
-
store: store$
|
|
18081
|
+
store: store$a,
|
|
17657
18082
|
key: i
|
|
17658
18083
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17659
|
-
store: store$
|
|
18084
|
+
store: store$a
|
|
17660
18085
|
})));
|
|
17661
18086
|
};
|
|
17662
18087
|
|
|
17663
18088
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
17664
|
-
store: store$
|
|
18089
|
+
store: store$a
|
|
17665
18090
|
}, props));
|
|
17666
18091
|
|
|
17667
18092
|
const PasswordResetButton = ({
|
|
@@ -17674,7 +18099,7 @@ const PasswordResetButton = ({
|
|
|
17674
18099
|
buttonDisabled
|
|
17675
18100
|
},
|
|
17676
18101
|
dispatch
|
|
17677
|
-
} = React.useContext(store$
|
|
18102
|
+
} = React.useContext(store$a);
|
|
17678
18103
|
const {
|
|
17679
18104
|
t
|
|
17680
18105
|
} = useTranslation("passwordReset");
|
|
@@ -17691,14 +18116,14 @@ const PasswordResetButton = ({
|
|
|
17691
18116
|
};
|
|
17692
18117
|
|
|
17693
18118
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17694
|
-
store: store$
|
|
18119
|
+
store: store$a
|
|
17695
18120
|
}, props, {
|
|
17696
18121
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17697
18122
|
disabled: true
|
|
17698
18123
|
}));
|
|
17699
18124
|
|
|
17700
18125
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
17701
|
-
store: store$
|
|
18126
|
+
store: store$a
|
|
17702
18127
|
}, props));
|
|
17703
18128
|
|
|
17704
18129
|
const PasswordResetView = props => {
|
|
@@ -17750,7 +18175,7 @@ const PasswordResetModal = ({
|
|
|
17750
18175
|
};
|
|
17751
18176
|
PasswordResetModal.viewId = "password-reset";
|
|
17752
18177
|
|
|
17753
|
-
const initialState$
|
|
18178
|
+
const initialState$9 = {
|
|
17754
18179
|
email: "",
|
|
17755
18180
|
emailError: null,
|
|
17756
18181
|
buttonDisabled: false,
|
|
@@ -17759,10 +18184,10 @@ const initialState$8 = {
|
|
|
17759
18184
|
content: ""
|
|
17760
18185
|
}
|
|
17761
18186
|
};
|
|
17762
|
-
const store$
|
|
18187
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
17763
18188
|
const {
|
|
17764
|
-
Provider: Provider$
|
|
17765
|
-
} = store$
|
|
18189
|
+
Provider: Provider$9
|
|
18190
|
+
} = store$9;
|
|
17766
18191
|
|
|
17767
18192
|
const PasswordForgotContainer = ({
|
|
17768
18193
|
style,
|
|
@@ -17840,21 +18265,21 @@ const PasswordForgotContainer = ({
|
|
|
17840
18265
|
default:
|
|
17841
18266
|
return state;
|
|
17842
18267
|
}
|
|
17843
|
-
}, initialState$
|
|
18268
|
+
}, initialState$9);
|
|
17844
18269
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17845
18270
|
style: { ...style
|
|
17846
18271
|
},
|
|
17847
18272
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17848
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18273
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
17849
18274
|
value: {
|
|
17850
18275
|
state,
|
|
17851
18276
|
dispatch
|
|
17852
18277
|
}
|
|
17853
18278
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17854
|
-
store: store$
|
|
18279
|
+
store: store$9,
|
|
17855
18280
|
key: i
|
|
17856
18281
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17857
|
-
store: store$
|
|
18282
|
+
store: store$9
|
|
17858
18283
|
})));
|
|
17859
18284
|
};
|
|
17860
18285
|
|
|
@@ -17870,7 +18295,7 @@ const PasswordForgotButton = ({
|
|
|
17870
18295
|
emailError
|
|
17871
18296
|
},
|
|
17872
18297
|
dispatch
|
|
17873
|
-
} = React.useContext(store$
|
|
18298
|
+
} = React.useContext(store$9);
|
|
17874
18299
|
const {
|
|
17875
18300
|
t
|
|
17876
18301
|
} = useTranslation("passwordForgot");
|
|
@@ -17891,7 +18316,7 @@ const PasswordForgotButton = ({
|
|
|
17891
18316
|
};
|
|
17892
18317
|
|
|
17893
18318
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17894
|
-
store: store$
|
|
18319
|
+
store: store$9
|
|
17895
18320
|
}, props));
|
|
17896
18321
|
|
|
17897
18322
|
const PasswordForgotView = props => {
|
|
@@ -17941,7 +18366,7 @@ const PasswordForgotModal = ({
|
|
|
17941
18366
|
};
|
|
17942
18367
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17943
18368
|
|
|
17944
|
-
const initialState$
|
|
18369
|
+
const initialState$8 = {
|
|
17945
18370
|
currentPassword: "",
|
|
17946
18371
|
newPassword: "",
|
|
17947
18372
|
confirmNewPassword: "",
|
|
@@ -17955,10 +18380,10 @@ const initialState$7 = {
|
|
|
17955
18380
|
content: ""
|
|
17956
18381
|
}
|
|
17957
18382
|
};
|
|
17958
|
-
const store$
|
|
18383
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
17959
18384
|
const {
|
|
17960
|
-
Provider: Provider$
|
|
17961
|
-
} = store$
|
|
18385
|
+
Provider: Provider$8
|
|
18386
|
+
} = store$8;
|
|
17962
18387
|
const PasswordChangeContainer = ({
|
|
17963
18388
|
style,
|
|
17964
18389
|
className = "",
|
|
@@ -18110,21 +18535,21 @@ const PasswordChangeContainer = ({
|
|
|
18110
18535
|
default:
|
|
18111
18536
|
return state;
|
|
18112
18537
|
}
|
|
18113
|
-
}, initialState$
|
|
18538
|
+
}, initialState$8);
|
|
18114
18539
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18115
18540
|
style: { ...style
|
|
18116
18541
|
},
|
|
18117
18542
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18118
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18543
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
18119
18544
|
value: {
|
|
18120
18545
|
state,
|
|
18121
18546
|
dispatch
|
|
18122
18547
|
}
|
|
18123
18548
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18124
|
-
store: store$
|
|
18549
|
+
store: store$8,
|
|
18125
18550
|
key: i
|
|
18126
18551
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18127
|
-
store: store$
|
|
18552
|
+
store: store$8
|
|
18128
18553
|
})));
|
|
18129
18554
|
};
|
|
18130
18555
|
|
|
@@ -18135,7 +18560,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18135
18560
|
currentPassword,
|
|
18136
18561
|
currentPasswordError
|
|
18137
18562
|
}
|
|
18138
|
-
} = React.useContext(store$
|
|
18563
|
+
} = React.useContext(store$8);
|
|
18139
18564
|
const handleBlur = React.useCallback(() => {
|
|
18140
18565
|
return dispatch({
|
|
18141
18566
|
type: VALIDATE_PASSWORD
|
|
@@ -18169,7 +18594,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18169
18594
|
newPassword,
|
|
18170
18595
|
newPasswordError
|
|
18171
18596
|
}
|
|
18172
|
-
} = React.useContext(store$
|
|
18597
|
+
} = React.useContext(store$8);
|
|
18173
18598
|
const handleBlur = React.useCallback(() => {
|
|
18174
18599
|
return dispatch({
|
|
18175
18600
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18203,7 +18628,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18203
18628
|
confirmNewPassword,
|
|
18204
18629
|
confirmNewPasswordError
|
|
18205
18630
|
}
|
|
18206
|
-
} = React.useContext(store$
|
|
18631
|
+
} = React.useContext(store$8);
|
|
18207
18632
|
const handleBlur = React.useCallback(() => {
|
|
18208
18633
|
return dispatch({
|
|
18209
18634
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18244,7 +18669,7 @@ const PasswordChangeButton = ({
|
|
|
18244
18669
|
confirmNewPasswordError
|
|
18245
18670
|
},
|
|
18246
18671
|
dispatch
|
|
18247
|
-
} = React.useContext(store$
|
|
18672
|
+
} = React.useContext(store$8);
|
|
18248
18673
|
const {
|
|
18249
18674
|
t
|
|
18250
18675
|
} = useTranslation("passwordChange");
|
|
@@ -18310,17 +18735,17 @@ const PasswordChangeModal = ({
|
|
|
18310
18735
|
};
|
|
18311
18736
|
PasswordChangeModal.viewId = "password-change";
|
|
18312
18737
|
|
|
18313
|
-
const initialState$
|
|
18738
|
+
const initialState$7 = {
|
|
18314
18739
|
buttonDisabled: false,
|
|
18315
18740
|
alert: {
|
|
18316
18741
|
type: "error",
|
|
18317
18742
|
content: ""
|
|
18318
18743
|
}
|
|
18319
18744
|
};
|
|
18320
|
-
const store$
|
|
18745
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
18321
18746
|
const {
|
|
18322
|
-
Provider: Provider$
|
|
18323
|
-
} = store$
|
|
18747
|
+
Provider: Provider$7
|
|
18748
|
+
} = store$7;
|
|
18324
18749
|
|
|
18325
18750
|
const CartContainer = ({
|
|
18326
18751
|
style,
|
|
@@ -18411,21 +18836,21 @@ const CartContainer = ({
|
|
|
18411
18836
|
default:
|
|
18412
18837
|
return state;
|
|
18413
18838
|
}
|
|
18414
|
-
}, initialState$
|
|
18839
|
+
}, initialState$7);
|
|
18415
18840
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18416
18841
|
style: { ...style
|
|
18417
18842
|
},
|
|
18418
18843
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18419
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18844
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
18420
18845
|
value: {
|
|
18421
18846
|
state,
|
|
18422
18847
|
dispatch
|
|
18423
18848
|
}
|
|
18424
18849
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18425
|
-
store: store$
|
|
18850
|
+
store: store$7,
|
|
18426
18851
|
key: i
|
|
18427
18852
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18428
|
-
store: store$
|
|
18853
|
+
store: store$7
|
|
18429
18854
|
})));
|
|
18430
18855
|
};
|
|
18431
18856
|
|
|
@@ -18462,7 +18887,7 @@ const CartSubmit = ({
|
|
|
18462
18887
|
buttonDisabled
|
|
18463
18888
|
},
|
|
18464
18889
|
dispatch
|
|
18465
|
-
} = React.useContext(store$
|
|
18890
|
+
} = React.useContext(store$7);
|
|
18466
18891
|
const {
|
|
18467
18892
|
t
|
|
18468
18893
|
} = useTranslation("cart");
|
|
@@ -18493,7 +18918,7 @@ const CartTotalPrice = () => {
|
|
|
18493
18918
|
state: {
|
|
18494
18919
|
alert
|
|
18495
18920
|
}
|
|
18496
|
-
} = React.useContext(store$
|
|
18921
|
+
} = React.useContext(store$7);
|
|
18497
18922
|
const {
|
|
18498
18923
|
cartItems
|
|
18499
18924
|
} = usePelcro();
|
|
@@ -18806,7 +19231,7 @@ const OrderConfirmModal = props => {
|
|
|
18806
19231
|
};
|
|
18807
19232
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18808
19233
|
|
|
18809
|
-
const initialState$
|
|
19234
|
+
const initialState$6 = {
|
|
18810
19235
|
email: "",
|
|
18811
19236
|
firstName: "",
|
|
18812
19237
|
lastName: "",
|
|
@@ -18818,10 +19243,10 @@ const initialState$5 = {
|
|
|
18818
19243
|
content: ""
|
|
18819
19244
|
}
|
|
18820
19245
|
};
|
|
18821
|
-
const store$
|
|
19246
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
18822
19247
|
const {
|
|
18823
|
-
Provider: Provider$
|
|
18824
|
-
} = store$
|
|
19248
|
+
Provider: Provider$6
|
|
19249
|
+
} = store$6;
|
|
18825
19250
|
|
|
18826
19251
|
const GiftCreateContainer = ({
|
|
18827
19252
|
style,
|
|
@@ -18925,21 +19350,21 @@ const GiftCreateContainer = ({
|
|
|
18925
19350
|
default:
|
|
18926
19351
|
return state;
|
|
18927
19352
|
}
|
|
18928
|
-
}, initialState$
|
|
19353
|
+
}, initialState$6);
|
|
18929
19354
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18930
19355
|
style: { ...style
|
|
18931
19356
|
},
|
|
18932
19357
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18933
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19358
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
18934
19359
|
value: {
|
|
18935
19360
|
state,
|
|
18936
19361
|
dispatch
|
|
18937
19362
|
}
|
|
18938
19363
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18939
|
-
store: store$
|
|
19364
|
+
store: store$6,
|
|
18940
19365
|
key: i
|
|
18941
19366
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18942
|
-
store: store$
|
|
19367
|
+
store: store$6
|
|
18943
19368
|
})));
|
|
18944
19369
|
};
|
|
18945
19370
|
|
|
@@ -18953,7 +19378,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18953
19378
|
state: {
|
|
18954
19379
|
disableSubmit
|
|
18955
19380
|
}
|
|
18956
|
-
} = React.useContext(store$
|
|
19381
|
+
} = React.useContext(store$6);
|
|
18957
19382
|
const {
|
|
18958
19383
|
t
|
|
18959
19384
|
} = useTranslation("register");
|
|
@@ -18970,29 +19395,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18970
19395
|
|
|
18971
19396
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
18972
19397
|
initWithUserEmail: false,
|
|
18973
|
-
store: store$
|
|
19398
|
+
store: store$6
|
|
18974
19399
|
}, props));
|
|
18975
19400
|
|
|
18976
19401
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
18977
|
-
store: store$
|
|
19402
|
+
store: store$6
|
|
18978
19403
|
}, props));
|
|
18979
19404
|
|
|
18980
19405
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
18981
|
-
store: store$
|
|
19406
|
+
store: store$6
|
|
18982
19407
|
}, props));
|
|
18983
19408
|
|
|
18984
|
-
var _path$
|
|
19409
|
+
var _path$h;
|
|
18985
19410
|
|
|
18986
|
-
function _extends$
|
|
19411
|
+
function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
18987
19412
|
|
|
18988
19413
|
function SvgInfoCircle(props) {
|
|
18989
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
19414
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
18990
19415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18991
19416
|
className: "plc-w-5 plc-h-5",
|
|
18992
19417
|
fill: "none",
|
|
18993
19418
|
viewBox: "0 0 24 24",
|
|
18994
19419
|
stroke: "currentColor"
|
|
18995
|
-
}, props), _path$
|
|
19420
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18996
19421
|
strokeLinecap: "round",
|
|
18997
19422
|
strokeLinejoin: "round",
|
|
18998
19423
|
strokeWidth: 2,
|
|
@@ -19063,7 +19488,7 @@ const GiftCreateStartDate = props => {
|
|
|
19063
19488
|
const {
|
|
19064
19489
|
dispatch,
|
|
19065
19490
|
state
|
|
19066
|
-
} = React.useContext(store$
|
|
19491
|
+
} = React.useContext(store$6);
|
|
19067
19492
|
|
|
19068
19493
|
const handleInputChange = value => {
|
|
19069
19494
|
dispatch({
|
|
@@ -19134,7 +19559,7 @@ function GiftCreateMessage(props) {
|
|
|
19134
19559
|
const {
|
|
19135
19560
|
dispatch,
|
|
19136
19561
|
state
|
|
19137
|
-
} = React.useContext(store$
|
|
19562
|
+
} = React.useContext(store$6);
|
|
19138
19563
|
|
|
19139
19564
|
const handleInputChange = value => {
|
|
19140
19565
|
dispatch({
|
|
@@ -19254,7 +19679,7 @@ const GiftCreateModal = ({
|
|
|
19254
19679
|
};
|
|
19255
19680
|
GiftCreateModal.viewId = "gift-create";
|
|
19256
19681
|
|
|
19257
|
-
const initialState$
|
|
19682
|
+
const initialState$5 = {
|
|
19258
19683
|
giftCode: "",
|
|
19259
19684
|
buttonDisabled: true,
|
|
19260
19685
|
alert: {
|
|
@@ -19262,10 +19687,10 @@ const initialState$4 = {
|
|
|
19262
19687
|
content: ""
|
|
19263
19688
|
}
|
|
19264
19689
|
};
|
|
19265
|
-
const store$
|
|
19690
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
19266
19691
|
const {
|
|
19267
|
-
Provider: Provider$
|
|
19268
|
-
} = store$
|
|
19692
|
+
Provider: Provider$5
|
|
19693
|
+
} = store$5;
|
|
19269
19694
|
|
|
19270
19695
|
const GiftRedeemContainer = ({
|
|
19271
19696
|
style,
|
|
@@ -19330,21 +19755,21 @@ const GiftRedeemContainer = ({
|
|
|
19330
19755
|
default:
|
|
19331
19756
|
return state;
|
|
19332
19757
|
}
|
|
19333
|
-
}, initialState$
|
|
19758
|
+
}, initialState$5);
|
|
19334
19759
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19335
19760
|
style: { ...style
|
|
19336
19761
|
},
|
|
19337
19762
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19338
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19763
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
19339
19764
|
value: {
|
|
19340
19765
|
state,
|
|
19341
19766
|
dispatch
|
|
19342
19767
|
}
|
|
19343
19768
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19344
|
-
store: store$
|
|
19769
|
+
store: store$5,
|
|
19345
19770
|
key: i
|
|
19346
19771
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19347
|
-
store: store$
|
|
19772
|
+
store: store$5
|
|
19348
19773
|
})));
|
|
19349
19774
|
};
|
|
19350
19775
|
|
|
@@ -19381,7 +19806,7 @@ function GiftCode({
|
|
|
19381
19806
|
}
|
|
19382
19807
|
|
|
19383
19808
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
19384
|
-
store: store$
|
|
19809
|
+
store: store$5
|
|
19385
19810
|
}, props));
|
|
19386
19811
|
|
|
19387
19812
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19394,7 +19819,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19394
19819
|
state: {
|
|
19395
19820
|
disableSubmit
|
|
19396
19821
|
}
|
|
19397
|
-
} = React.useContext(store$
|
|
19822
|
+
} = React.useContext(store$5);
|
|
19398
19823
|
const {
|
|
19399
19824
|
t
|
|
19400
19825
|
} = useTranslation("register");
|
|
@@ -19487,7 +19912,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19487
19912
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19488
19913
|
};
|
|
19489
19914
|
|
|
19490
|
-
const initialState$
|
|
19915
|
+
const initialState$4 = {
|
|
19491
19916
|
addresses: [],
|
|
19492
19917
|
selectedAddressId: null,
|
|
19493
19918
|
isSubmitting: false,
|
|
@@ -19496,10 +19921,10 @@ const initialState$3 = {
|
|
|
19496
19921
|
content: ""
|
|
19497
19922
|
}
|
|
19498
19923
|
};
|
|
19499
|
-
const store$
|
|
19924
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
19500
19925
|
const {
|
|
19501
|
-
Provider: Provider$
|
|
19502
|
-
} = store$
|
|
19926
|
+
Provider: Provider$4
|
|
19927
|
+
} = store$4;
|
|
19503
19928
|
|
|
19504
19929
|
const AddressSelectContainer = ({
|
|
19505
19930
|
style,
|
|
@@ -19594,7 +20019,7 @@ const AddressSelectContainer = ({
|
|
|
19594
20019
|
default:
|
|
19595
20020
|
return state;
|
|
19596
20021
|
}
|
|
19597
|
-
}, initialState$
|
|
20022
|
+
}, initialState$4);
|
|
19598
20023
|
React.useEffect(() => {
|
|
19599
20024
|
var _window$Pelcro$user$r;
|
|
19600
20025
|
|
|
@@ -19607,16 +20032,16 @@ const AddressSelectContainer = ({
|
|
|
19607
20032
|
style: { ...style
|
|
19608
20033
|
},
|
|
19609
20034
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19610
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20035
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
19611
20036
|
value: {
|
|
19612
20037
|
state,
|
|
19613
20038
|
dispatch
|
|
19614
20039
|
}
|
|
19615
20040
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19616
|
-
store: store$
|
|
20041
|
+
store: store$4,
|
|
19617
20042
|
key: i
|
|
19618
20043
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19619
|
-
store: store$
|
|
20044
|
+
store: store$4
|
|
19620
20045
|
})));
|
|
19621
20046
|
};
|
|
19622
20047
|
|
|
@@ -19627,7 +20052,7 @@ const AddressSelectList = () => {
|
|
|
19627
20052
|
addresses,
|
|
19628
20053
|
selectedAddressId
|
|
19629
20054
|
}
|
|
19630
|
-
} = React.useContext(store$
|
|
20055
|
+
} = React.useContext(store$4);
|
|
19631
20056
|
|
|
19632
20057
|
const handleAddressSelect = event => {
|
|
19633
20058
|
dispatch({
|
|
@@ -19671,7 +20096,7 @@ const AddressSelectSubmit = ({
|
|
|
19671
20096
|
selectedAddressId,
|
|
19672
20097
|
isSubmitting
|
|
19673
20098
|
}
|
|
19674
|
-
} = React.useContext(store$
|
|
20099
|
+
} = React.useContext(store$4);
|
|
19675
20100
|
const {
|
|
19676
20101
|
t
|
|
19677
20102
|
} = useTranslation("address");
|
|
@@ -19759,10 +20184,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19759
20184
|
|
|
19760
20185
|
const defaultPaymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.source;
|
|
19761
20186
|
const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
|
|
20187
|
+
|
|
20188
|
+
if (defaultPaymentMethod.status !== "chargeable") {
|
|
20189
|
+
return paymentMethodsWithoutDefault;
|
|
20190
|
+
}
|
|
20191
|
+
|
|
19762
20192
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19763
20193
|
};
|
|
19764
20194
|
|
|
19765
|
-
const initialState$
|
|
20195
|
+
const initialState$3 = {
|
|
19766
20196
|
paymentMethods: [],
|
|
19767
20197
|
selectedPaymentMethodId: null,
|
|
19768
20198
|
isSubmitting: false,
|
|
@@ -19771,10 +20201,10 @@ const initialState$2 = {
|
|
|
19771
20201
|
content: ""
|
|
19772
20202
|
}
|
|
19773
20203
|
};
|
|
19774
|
-
const store$
|
|
20204
|
+
const store$3 = /*#__PURE__*/React.createContext(initialState$3);
|
|
19775
20205
|
const {
|
|
19776
|
-
Provider: Provider$
|
|
19777
|
-
} = store$
|
|
20206
|
+
Provider: Provider$3
|
|
20207
|
+
} = store$3;
|
|
19778
20208
|
|
|
19779
20209
|
const PaymentMethodSelectContainer = ({
|
|
19780
20210
|
style,
|
|
@@ -19819,7 +20249,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19819
20249
|
default:
|
|
19820
20250
|
return state;
|
|
19821
20251
|
}
|
|
19822
|
-
}, initialState$
|
|
20252
|
+
}, initialState$3);
|
|
19823
20253
|
React.useEffect(() => {
|
|
19824
20254
|
var _window$Pelcro$user$r4;
|
|
19825
20255
|
|
|
@@ -19832,16 +20262,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19832
20262
|
style: { ...style
|
|
19833
20263
|
},
|
|
19834
20264
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19835
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20265
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
|
|
19836
20266
|
value: {
|
|
19837
20267
|
state,
|
|
19838
20268
|
dispatch
|
|
19839
20269
|
}
|
|
19840
20270
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19841
|
-
store: store$
|
|
20271
|
+
store: store$3,
|
|
19842
20272
|
key: i
|
|
19843
20273
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19844
|
-
store: store$
|
|
20274
|
+
store: store$3
|
|
19845
20275
|
})));
|
|
19846
20276
|
};
|
|
19847
20277
|
|
|
@@ -19855,7 +20285,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19855
20285
|
paymentMethods,
|
|
19856
20286
|
selectedPaymentMethodId
|
|
19857
20287
|
}
|
|
19858
|
-
} = React.useContext(store$
|
|
20288
|
+
} = React.useContext(store$3);
|
|
19859
20289
|
|
|
19860
20290
|
const handlePaymentMethodSelect = event => {
|
|
19861
20291
|
dispatch({
|
|
@@ -19905,7 +20335,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19905
20335
|
selectedPaymentMethodId,
|
|
19906
20336
|
isSubmitting
|
|
19907
20337
|
}
|
|
19908
|
-
} = React.useContext(store$
|
|
20338
|
+
} = React.useContext(store$3);
|
|
19909
20339
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19910
20340
|
onClick: () => {
|
|
19911
20341
|
dispatch({
|
|
@@ -19979,8 +20409,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19979
20409
|
};
|
|
19980
20410
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19981
20411
|
|
|
19982
|
-
function _extends$
|
|
19983
|
-
_extends$
|
|
20412
|
+
function _extends$i() {
|
|
20413
|
+
_extends$i = Object.assign || function (target) {
|
|
19984
20414
|
for (var i = 1; i < arguments.length; i++) {
|
|
19985
20415
|
var source = arguments[i];
|
|
19986
20416
|
|
|
@@ -19994,7 +20424,7 @@ function _extends$h() {
|
|
|
19994
20424
|
return target;
|
|
19995
20425
|
};
|
|
19996
20426
|
|
|
19997
|
-
return _extends$
|
|
20427
|
+
return _extends$i.apply(this, arguments);
|
|
19998
20428
|
}
|
|
19999
20429
|
|
|
20000
20430
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20178,7 +20608,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20178
20608
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20179
20609
|
return null;
|
|
20180
20610
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20181
|
-
return _render(_extends$
|
|
20611
|
+
return _render(_extends$i({}, _rest, {
|
|
20182
20612
|
hidden: true,
|
|
20183
20613
|
style: {
|
|
20184
20614
|
display: 'none'
|
|
@@ -20706,7 +21136,7 @@ function TransitionChild(props) {
|
|
|
20706
21136
|
var passthroughProps = rest;
|
|
20707
21137
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20708
21138
|
value: nesting
|
|
20709
|
-
}, render(_extends$
|
|
21139
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20710
21140
|
}
|
|
20711
21141
|
|
|
20712
21142
|
function Transition(props) {
|
|
@@ -20750,7 +21180,7 @@ function Transition(props) {
|
|
|
20750
21180
|
value: nestingBag
|
|
20751
21181
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20752
21182
|
value: transitionBag
|
|
20753
|
-
}, render(_extends$
|
|
21183
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20754
21184
|
as: React.Fragment,
|
|
20755
21185
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20756
21186
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20877,12 +21307,12 @@ var ActionTypes;
|
|
|
20877
21307
|
})(ActionTypes || (ActionTypes = {}));
|
|
20878
21308
|
|
|
20879
21309
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20880
|
-
return _extends$
|
|
21310
|
+
return _extends$i({}, state, {
|
|
20881
21311
|
activeItemIndex: null,
|
|
20882
21312
|
menuState: MenuStates.Closed
|
|
20883
21313
|
});
|
|
20884
21314
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20885
|
-
return _extends$
|
|
21315
|
+
return _extends$i({}, state, {
|
|
20886
21316
|
menuState: MenuStates.Open
|
|
20887
21317
|
});
|
|
20888
21318
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20901,7 +21331,7 @@ var ActionTypes;
|
|
|
20901
21331
|
}
|
|
20902
21332
|
});
|
|
20903
21333
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20904
|
-
return _extends$
|
|
21334
|
+
return _extends$i({}, state, {
|
|
20905
21335
|
searchQuery: '',
|
|
20906
21336
|
activeItemIndex: activeItemIndex
|
|
20907
21337
|
});
|
|
@@ -20912,19 +21342,19 @@ var ActionTypes;
|
|
|
20912
21342
|
|
|
20913
21343
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20914
21344
|
});
|
|
20915
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21345
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20916
21346
|
searchQuery: searchQuery
|
|
20917
21347
|
});
|
|
20918
|
-
return _extends$
|
|
21348
|
+
return _extends$i({}, state, {
|
|
20919
21349
|
searchQuery: searchQuery,
|
|
20920
21350
|
activeItemIndex: match
|
|
20921
21351
|
});
|
|
20922
21352
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20923
|
-
return _extends$
|
|
21353
|
+
return _extends$i({}, state, {
|
|
20924
21354
|
searchQuery: ''
|
|
20925
21355
|
});
|
|
20926
21356
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20927
|
-
return _extends$
|
|
21357
|
+
return _extends$i({}, state, {
|
|
20928
21358
|
items: [].concat(state.items, [{
|
|
20929
21359
|
id: action.id,
|
|
20930
21360
|
dataRef: action.dataRef
|
|
@@ -20937,7 +21367,7 @@ var ActionTypes;
|
|
|
20937
21367
|
return a.id === action.id;
|
|
20938
21368
|
});
|
|
20939
21369
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20940
|
-
return _extends$
|
|
21370
|
+
return _extends$i({}, state, {
|
|
20941
21371
|
items: nextItems,
|
|
20942
21372
|
activeItemIndex: function () {
|
|
20943
21373
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20976,19 +21406,19 @@ var ActionTypes$1;
|
|
|
20976
21406
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20977
21407
|
if (state.disabled) return state;
|
|
20978
21408
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20979
|
-
return _extends$
|
|
21409
|
+
return _extends$i({}, state, {
|
|
20980
21410
|
activeOptionIndex: null,
|
|
20981
21411
|
listboxState: ListboxStates.Closed
|
|
20982
21412
|
});
|
|
20983
21413
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20984
21414
|
if (state.disabled) return state;
|
|
20985
21415
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20986
|
-
return _extends$
|
|
21416
|
+
return _extends$i({}, state, {
|
|
20987
21417
|
listboxState: ListboxStates.Open
|
|
20988
21418
|
});
|
|
20989
21419
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20990
21420
|
if (state.disabled === action.disabled) return state;
|
|
20991
|
-
return _extends$
|
|
21421
|
+
return _extends$i({}, state, {
|
|
20992
21422
|
disabled: action.disabled
|
|
20993
21423
|
});
|
|
20994
21424
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21009,7 +21439,7 @@ var ActionTypes$1;
|
|
|
21009
21439
|
}
|
|
21010
21440
|
});
|
|
21011
21441
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21012
|
-
return _extends$
|
|
21442
|
+
return _extends$i({}, state, {
|
|
21013
21443
|
searchQuery: '',
|
|
21014
21444
|
activeOptionIndex: activeOptionIndex
|
|
21015
21445
|
});
|
|
@@ -21022,10 +21452,10 @@ var ActionTypes$1;
|
|
|
21022
21452
|
|
|
21023
21453
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21024
21454
|
});
|
|
21025
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21455
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21026
21456
|
searchQuery: searchQuery
|
|
21027
21457
|
});
|
|
21028
|
-
return _extends$
|
|
21458
|
+
return _extends$i({}, state, {
|
|
21029
21459
|
searchQuery: searchQuery,
|
|
21030
21460
|
activeOptionIndex: match
|
|
21031
21461
|
});
|
|
@@ -21033,11 +21463,11 @@ var ActionTypes$1;
|
|
|
21033
21463
|
if (state.disabled) return state;
|
|
21034
21464
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21035
21465
|
if (state.searchQuery === '') return state;
|
|
21036
|
-
return _extends$
|
|
21466
|
+
return _extends$i({}, state, {
|
|
21037
21467
|
searchQuery: ''
|
|
21038
21468
|
});
|
|
21039
21469
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21040
|
-
return _extends$
|
|
21470
|
+
return _extends$i({}, state, {
|
|
21041
21471
|
options: [].concat(state.options, [{
|
|
21042
21472
|
id: action.id,
|
|
21043
21473
|
dataRef: action.dataRef
|
|
@@ -21050,7 +21480,7 @@ var ActionTypes$1;
|
|
|
21050
21480
|
return a.id === action.id;
|
|
21051
21481
|
});
|
|
21052
21482
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21053
|
-
return _extends$
|
|
21483
|
+
return _extends$i({}, state, {
|
|
21054
21484
|
options: nextOptions,
|
|
21055
21485
|
activeOptionIndex: function () {
|
|
21056
21486
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21111,18 +21541,18 @@ const getPaymentCardIcon = name => {
|
|
|
21111
21541
|
}));
|
|
21112
21542
|
};
|
|
21113
21543
|
|
|
21114
|
-
var _path$
|
|
21544
|
+
var _path$g;
|
|
21115
21545
|
|
|
21116
|
-
function _extends$
|
|
21546
|
+
function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
21117
21547
|
|
|
21118
21548
|
function SvgChevronRight(props) {
|
|
21119
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21549
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
21120
21550
|
className: "plc-w-6 plc-h-6",
|
|
21121
21551
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21122
21552
|
fill: "none",
|
|
21123
21553
|
viewBox: "0 0 24 24",
|
|
21124
21554
|
stroke: "currentColor"
|
|
21125
|
-
}, props), _path$
|
|
21555
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21126
21556
|
strokeLinecap: "round",
|
|
21127
21557
|
strokeLinejoin: "round",
|
|
21128
21558
|
strokeWidth: 2,
|
|
@@ -21338,18 +21768,18 @@ const SavedItems = ({
|
|
|
21338
21768
|
});
|
|
21339
21769
|
};
|
|
21340
21770
|
|
|
21341
|
-
var _path$
|
|
21771
|
+
var _path$f;
|
|
21342
21772
|
|
|
21343
|
-
function _extends$
|
|
21773
|
+
function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
21344
21774
|
|
|
21345
21775
|
function SvgRefresh(props) {
|
|
21346
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21776
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
21347
21777
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21348
21778
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21349
21779
|
fill: "none",
|
|
21350
21780
|
viewBox: "0 0 24 24",
|
|
21351
21781
|
stroke: "currentColor"
|
|
21352
|
-
}, props), _path$
|
|
21782
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21353
21783
|
strokeLinecap: "round",
|
|
21354
21784
|
strokeLinejoin: "round",
|
|
21355
21785
|
strokeWidth: 2,
|
|
@@ -21357,35 +21787,35 @@ function SvgRefresh(props) {
|
|
|
21357
21787
|
})));
|
|
21358
21788
|
}
|
|
21359
21789
|
|
|
21360
|
-
var _path$
|
|
21790
|
+
var _path$e;
|
|
21361
21791
|
|
|
21362
|
-
function _extends$
|
|
21792
|
+
function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
21363
21793
|
|
|
21364
21794
|
function SvgCalendar(props) {
|
|
21365
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21795
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
21366
21796
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21367
21797
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21368
21798
|
viewBox: "0 0 20 20",
|
|
21369
21799
|
fill: "currentColor"
|
|
21370
|
-
}, props), _path$
|
|
21800
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21371
21801
|
fillRule: "evenodd",
|
|
21372
21802
|
d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
|
|
21373
21803
|
clipRule: "evenodd"
|
|
21374
21804
|
})));
|
|
21375
21805
|
}
|
|
21376
21806
|
|
|
21377
|
-
var _path$
|
|
21807
|
+
var _path$d;
|
|
21378
21808
|
|
|
21379
|
-
function _extends$
|
|
21809
|
+
function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
21380
21810
|
|
|
21381
21811
|
function SvgPlus(props) {
|
|
21382
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21812
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21383
21813
|
className: "plc-w-5 plc-h-5",
|
|
21384
21814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21385
21815
|
fill: "none",
|
|
21386
21816
|
viewBox: "0 0 24 24",
|
|
21387
21817
|
stroke: "currentColor"
|
|
21388
|
-
}, props), _path$
|
|
21818
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21389
21819
|
strokeLinecap: "round",
|
|
21390
21820
|
strokeLinejoin: "round",
|
|
21391
21821
|
strokeWidth: 2,
|
|
@@ -21393,17 +21823,17 @@ function SvgPlus(props) {
|
|
|
21393
21823
|
})));
|
|
21394
21824
|
}
|
|
21395
21825
|
|
|
21396
|
-
var _path$
|
|
21826
|
+
var _path$c;
|
|
21397
21827
|
|
|
21398
|
-
function _extends$
|
|
21828
|
+
function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
21399
21829
|
|
|
21400
21830
|
function SvgCheckMark(props) {
|
|
21401
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21831
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21402
21832
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21403
21833
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21404
21834
|
viewBox: "0 0 20 20",
|
|
21405
21835
|
fill: "currentColor"
|
|
21406
|
-
}, props), _path$
|
|
21836
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21407
21837
|
fillRule: "evenodd",
|
|
21408
21838
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
21409
21839
|
clipRule: "evenodd"
|
|
@@ -21698,13 +22128,31 @@ Accordion.item = function AccordionItem({
|
|
|
21698
22128
|
}, content)) : null;
|
|
21699
22129
|
};
|
|
21700
22130
|
|
|
22131
|
+
var _path$b;
|
|
22132
|
+
|
|
22133
|
+
function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
22134
|
+
|
|
22135
|
+
function SvgExit(props) {
|
|
22136
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
22137
|
+
className: "plc-w-6 plc-h-6",
|
|
22138
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22139
|
+
fill: "none",
|
|
22140
|
+
viewBox: "0 0 24 24",
|
|
22141
|
+
stroke: "currentColor"
|
|
22142
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22143
|
+
strokeLinecap: "round",
|
|
22144
|
+
strokeLinejoin: "round",
|
|
22145
|
+
strokeWidth: 2,
|
|
22146
|
+
d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
|
22147
|
+
})));
|
|
22148
|
+
}
|
|
22149
|
+
|
|
21701
22150
|
var _path$a;
|
|
21702
22151
|
|
|
21703
22152
|
function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
21704
22153
|
|
|
21705
|
-
function
|
|
22154
|
+
function SvgUser(props) {
|
|
21706
22155
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21707
|
-
className: "plc-w-6 plc-h-6",
|
|
21708
22156
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21709
22157
|
fill: "none",
|
|
21710
22158
|
viewBox: "0 0 24 24",
|
|
@@ -21713,7 +22161,7 @@ function SvgExit(props) {
|
|
|
21713
22161
|
strokeLinecap: "round",
|
|
21714
22162
|
strokeLinejoin: "round",
|
|
21715
22163
|
strokeWidth: 2,
|
|
21716
|
-
d: "
|
|
22164
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zm-4 7a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
21717
22165
|
})));
|
|
21718
22166
|
}
|
|
21719
22167
|
|
|
@@ -21721,9 +22169,10 @@ var _path$9;
|
|
|
21721
22169
|
|
|
21722
22170
|
function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
21723
22171
|
|
|
21724
|
-
function
|
|
22172
|
+
function SvgNewsletter(props) {
|
|
21725
22173
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21726
22174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22175
|
+
className: "plc-h-5 plc-w-5",
|
|
21727
22176
|
fill: "none",
|
|
21728
22177
|
viewBox: "0 0 24 24",
|
|
21729
22178
|
stroke: "currentColor"
|
|
@@ -21731,7 +22180,7 @@ function SvgUser(props) {
|
|
|
21731
22180
|
strokeLinecap: "round",
|
|
21732
22181
|
strokeLinejoin: "round",
|
|
21733
22182
|
strokeWidth: 2,
|
|
21734
|
-
d: "
|
|
22183
|
+
d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
|
|
21735
22184
|
})));
|
|
21736
22185
|
}
|
|
21737
22186
|
|
|
@@ -21739,10 +22188,10 @@ var _path$8;
|
|
|
21739
22188
|
|
|
21740
22189
|
function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
21741
22190
|
|
|
21742
|
-
function
|
|
22191
|
+
function SvgDocument(props) {
|
|
21743
22192
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21744
22193
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21745
|
-
className: "plc-h-
|
|
22194
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21746
22195
|
fill: "none",
|
|
21747
22196
|
viewBox: "0 0 24 24",
|
|
21748
22197
|
stroke: "currentColor"
|
|
@@ -21750,7 +22199,7 @@ function SvgNewsletter(props) {
|
|
|
21750
22199
|
strokeLinecap: "round",
|
|
21751
22200
|
strokeLinejoin: "round",
|
|
21752
22201
|
strokeWidth: 2,
|
|
21753
|
-
d: "
|
|
22202
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
21754
22203
|
})));
|
|
21755
22204
|
}
|
|
21756
22205
|
|
|
@@ -21918,9 +22367,11 @@ const DonationsMenu = () => {
|
|
|
21918
22367
|
};
|
|
21919
22368
|
|
|
21920
22369
|
function getDonationSubs() {
|
|
21921
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22370
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
21922
22371
|
|
|
21923
|
-
|
|
22372
|
+
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 : [];
|
|
22373
|
+
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 : [];
|
|
22374
|
+
return [...donations, ...canceledDonations];
|
|
21924
22375
|
}
|
|
21925
22376
|
|
|
21926
22377
|
function formatStartDate(date) {
|
|
@@ -21928,6 +22379,138 @@ function formatStartDate(date) {
|
|
|
21928
22379
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21929
22380
|
}
|
|
21930
22381
|
|
|
22382
|
+
const InvoicesMenu = props => {
|
|
22383
|
+
const {
|
|
22384
|
+
t
|
|
22385
|
+
} = useTranslation("dashboard");
|
|
22386
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
22387
|
+
className: "plc-w-full plc-table-fixed"
|
|
22388
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
22389
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22390
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22391
|
+
className: "plc-w-4/12 "
|
|
22392
|
+
}, t("labels.details")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22393
|
+
className: "plc-w-4/12 "
|
|
22394
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22395
|
+
className: "plc-w-3/12 "
|
|
22396
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22397
|
+
className: "plc-h-4"
|
|
22398
|
+
}), /*#__PURE__*/React__default['default'].createElement(InvoicesItems, props)));
|
|
22399
|
+
};
|
|
22400
|
+
|
|
22401
|
+
const InvoicesItems = () => {
|
|
22402
|
+
var _window$Pelcro$invoic;
|
|
22403
|
+
|
|
22404
|
+
const {
|
|
22405
|
+
t
|
|
22406
|
+
} = useTranslation("dashboard");
|
|
22407
|
+
const {
|
|
22408
|
+
setInvoice,
|
|
22409
|
+
switchView
|
|
22410
|
+
} = usePelcro();
|
|
22411
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22412
|
+
|
|
22413
|
+
const showInvoiceDetails = event => {
|
|
22414
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22415
|
+
switchView("invoice-details");
|
|
22416
|
+
}
|
|
22417
|
+
};
|
|
22418
|
+
|
|
22419
|
+
if (invoices.length === 0) return null;
|
|
22420
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22421
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22422
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22423
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22424
|
+
key: invoice.id,
|
|
22425
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22426
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22427
|
+
className: "plc-truncate"
|
|
22428
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22429
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22430
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22431
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22432
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22433
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22434
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22435
|
+
className: "plc-py-2"
|
|
22436
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22437
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22438
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
22439
|
+
variant: "ghost",
|
|
22440
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22441
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, {
|
|
22442
|
+
className: "plc-w-4 plc-h-4"
|
|
22443
|
+
}),
|
|
22444
|
+
onClick: showInvoiceDetails,
|
|
22445
|
+
"data-id": invoice.id
|
|
22446
|
+
}, t("labels.view"))));
|
|
22447
|
+
});
|
|
22448
|
+
};
|
|
22449
|
+
|
|
22450
|
+
function getInvoiceStatus(invoice) {
|
|
22451
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22452
|
+
returnObjects: true
|
|
22453
|
+
});
|
|
22454
|
+
|
|
22455
|
+
switch (invoice.status) {
|
|
22456
|
+
case "paid":
|
|
22457
|
+
return {
|
|
22458
|
+
textColor: "plc-text-green-700",
|
|
22459
|
+
bgColor: "plc-bg-green-100",
|
|
22460
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null),
|
|
22461
|
+
title: translations.paid
|
|
22462
|
+
};
|
|
22463
|
+
|
|
22464
|
+
case "past_due":
|
|
22465
|
+
return {
|
|
22466
|
+
textColor: "plc-text-orange-700",
|
|
22467
|
+
bgColor: "plc-bg-orange-100",
|
|
22468
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22469
|
+
title: translations.pastDue
|
|
22470
|
+
};
|
|
22471
|
+
|
|
22472
|
+
case "open":
|
|
22473
|
+
return {
|
|
22474
|
+
textColor: "plc-text-yellow-700",
|
|
22475
|
+
bgColor: "plc-bg-yellow-100",
|
|
22476
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22477
|
+
title: translations.open
|
|
22478
|
+
};
|
|
22479
|
+
|
|
22480
|
+
case "draft":
|
|
22481
|
+
return {
|
|
22482
|
+
textColor: "plc-text-blue-700",
|
|
22483
|
+
bgColor: "plc-bg-blue-100",
|
|
22484
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
22485
|
+
title: translations.draft
|
|
22486
|
+
};
|
|
22487
|
+
|
|
22488
|
+
case "scheduled":
|
|
22489
|
+
return {
|
|
22490
|
+
textColor: "plc-text-blue-700",
|
|
22491
|
+
bgColor: "plc-bg-blue-100",
|
|
22492
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCalendar, null),
|
|
22493
|
+
title: translations.scheduled
|
|
22494
|
+
};
|
|
22495
|
+
|
|
22496
|
+
case "uncollectible":
|
|
22497
|
+
return {
|
|
22498
|
+
textColor: "plc-text-red-700",
|
|
22499
|
+
bgColor: "plc-bg-red-100",
|
|
22500
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22501
|
+
title: translations.uncollectible
|
|
22502
|
+
};
|
|
22503
|
+
|
|
22504
|
+
case "void":
|
|
22505
|
+
return {
|
|
22506
|
+
textColor: "plc-text-gray-700",
|
|
22507
|
+
bgColor: "plc-bg-gray-100",
|
|
22508
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22509
|
+
title: translations.void
|
|
22510
|
+
};
|
|
22511
|
+
}
|
|
22512
|
+
}
|
|
22513
|
+
|
|
21931
22514
|
const SUB_MENUS = {
|
|
21932
22515
|
PROFILE: "profile",
|
|
21933
22516
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21936,6 +22519,7 @@ const SUB_MENUS = {
|
|
|
21936
22519
|
ADDRESSES: "addresses",
|
|
21937
22520
|
GIFTS: "gifts",
|
|
21938
22521
|
ORDERS: "orders",
|
|
22522
|
+
INVOICES: "invoices",
|
|
21939
22523
|
SAVED_ITEMS: "saved-items"
|
|
21940
22524
|
};
|
|
21941
22525
|
/**
|
|
@@ -22478,6 +23062,12 @@ class Dashboard extends React.Component {
|
|
|
22478
23062
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
|
|
22479
23063
|
title: this.locale("labels.orders.label"),
|
|
22480
23064
|
content: /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null)
|
|
23065
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
23066
|
+
show: hasInvoices(),
|
|
23067
|
+
name: SUB_MENUS.INVOICES,
|
|
23068
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
|
|
23069
|
+
title: this.locale("labels.invoices"),
|
|
23070
|
+
content: /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null)
|
|
22481
23071
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22482
23072
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22483
23073
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -22493,11 +23083,19 @@ class Dashboard extends React.Component {
|
|
|
22493
23083
|
|
|
22494
23084
|
}
|
|
22495
23085
|
|
|
23086
|
+
function hasInvoices() {
|
|
23087
|
+
var _window$Pelcro$invoic;
|
|
23088
|
+
|
|
23089
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
23090
|
+
return invoices.length > 0;
|
|
23091
|
+
}
|
|
23092
|
+
|
|
22496
23093
|
function hasDonationSubs() {
|
|
22497
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
23094
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
22498
23095
|
|
|
22499
|
-
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)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22500
|
-
|
|
23096
|
+
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 : [];
|
|
23097
|
+
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 : [];
|
|
23098
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22501
23099
|
}
|
|
22502
23100
|
|
|
22503
23101
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
@@ -22527,7 +23125,7 @@ const DashboardOpenButton = () => {
|
|
|
22527
23125
|
};
|
|
22528
23126
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22529
23127
|
|
|
22530
|
-
const initialState$
|
|
23128
|
+
const initialState$2 = {
|
|
22531
23129
|
imageSrc: null,
|
|
22532
23130
|
crop: {
|
|
22533
23131
|
x: 0,
|
|
@@ -22541,10 +23139,10 @@ const initialState$1 = {
|
|
|
22541
23139
|
content: ""
|
|
22542
23140
|
}
|
|
22543
23141
|
};
|
|
22544
|
-
const store$
|
|
23142
|
+
const store$2 = /*#__PURE__*/React.createContext(initialState$2);
|
|
22545
23143
|
const {
|
|
22546
|
-
Provider: Provider$
|
|
22547
|
-
} = store$
|
|
23144
|
+
Provider: Provider$2
|
|
23145
|
+
} = store$2;
|
|
22548
23146
|
|
|
22549
23147
|
const ProfilePicChangeContainer = ({
|
|
22550
23148
|
style,
|
|
@@ -22678,21 +23276,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22678
23276
|
default:
|
|
22679
23277
|
return state;
|
|
22680
23278
|
}
|
|
22681
|
-
}, initialState$
|
|
23279
|
+
}, initialState$2);
|
|
22682
23280
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22683
23281
|
style: { ...style
|
|
22684
23282
|
},
|
|
22685
23283
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22686
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23284
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
|
|
22687
23285
|
value: {
|
|
22688
23286
|
state,
|
|
22689
23287
|
dispatch
|
|
22690
23288
|
}
|
|
22691
23289
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22692
|
-
store: store$
|
|
23290
|
+
store: store$2,
|
|
22693
23291
|
key: i
|
|
22694
23292
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22695
|
-
store: store$
|
|
23293
|
+
store: store$2
|
|
22696
23294
|
})));
|
|
22697
23295
|
};
|
|
22698
23296
|
/**
|
|
@@ -22754,7 +23352,7 @@ const ProfilePicChangeButton = ({
|
|
|
22754
23352
|
isSubmitting
|
|
22755
23353
|
},
|
|
22756
23354
|
dispatch
|
|
22757
|
-
} = React.useContext(store$
|
|
23355
|
+
} = React.useContext(store$2);
|
|
22758
23356
|
const {
|
|
22759
23357
|
t
|
|
22760
23358
|
} = useTranslation("userEdit");
|
|
@@ -24122,7 +24720,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24122
24720
|
zoom
|
|
24123
24721
|
},
|
|
24124
24722
|
dispatch
|
|
24125
|
-
} = React.useContext(store$
|
|
24723
|
+
} = React.useContext(store$2);
|
|
24126
24724
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24127
24725
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24128
24726
|
}, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
|
|
@@ -24164,7 +24762,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24164
24762
|
zoom
|
|
24165
24763
|
},
|
|
24166
24764
|
dispatch
|
|
24167
|
-
} = React.useContext(store$
|
|
24765
|
+
} = React.useContext(store$2);
|
|
24168
24766
|
const {
|
|
24169
24767
|
t
|
|
24170
24768
|
} = useTranslation("userEdit");
|
|
@@ -24216,7 +24814,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24216
24814
|
state: {
|
|
24217
24815
|
isSubmitting
|
|
24218
24816
|
}
|
|
24219
|
-
} = React.useContext(store$
|
|
24817
|
+
} = React.useContext(store$2);
|
|
24220
24818
|
const {
|
|
24221
24819
|
t
|
|
24222
24820
|
} = useTranslation("userEdit");
|
|
@@ -24258,7 +24856,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24258
24856
|
state: {
|
|
24259
24857
|
isSubmitting
|
|
24260
24858
|
}
|
|
24261
|
-
} = React.useContext(store$
|
|
24859
|
+
} = React.useContext(store$2);
|
|
24262
24860
|
const {
|
|
24263
24861
|
t
|
|
24264
24862
|
} = useTranslation("userEdit");
|
|
@@ -24281,7 +24879,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24281
24879
|
state: {
|
|
24282
24880
|
imageSrc
|
|
24283
24881
|
}
|
|
24284
|
-
} = React.useContext(store$
|
|
24882
|
+
} = React.useContext(store$2);
|
|
24285
24883
|
const {
|
|
24286
24884
|
t
|
|
24287
24885
|
} = useTranslation("userEdit");
|
|
@@ -24343,17 +24941,17 @@ function ProfilePicChangeModal({
|
|
|
24343
24941
|
}
|
|
24344
24942
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24345
24943
|
|
|
24346
|
-
const initialState = {
|
|
24944
|
+
const initialState$1 = {
|
|
24347
24945
|
isSubmitting: false,
|
|
24348
24946
|
alert: {
|
|
24349
24947
|
type: "error",
|
|
24350
24948
|
content: ""
|
|
24351
24949
|
}
|
|
24352
24950
|
};
|
|
24353
|
-
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24951
|
+
const store$1 = /*#__PURE__*/React.createContext(initialState$1);
|
|
24354
24952
|
const {
|
|
24355
|
-
Provider
|
|
24356
|
-
} = store;
|
|
24953
|
+
Provider: Provider$1
|
|
24954
|
+
} = store$1;
|
|
24357
24955
|
|
|
24358
24956
|
const EmailVerifyContainer = ({
|
|
24359
24957
|
style,
|
|
@@ -24416,21 +25014,21 @@ const EmailVerifyContainer = ({
|
|
|
24416
25014
|
default:
|
|
24417
25015
|
return state;
|
|
24418
25016
|
}
|
|
24419
|
-
}, initialState);
|
|
25017
|
+
}, initialState$1);
|
|
24420
25018
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24421
25019
|
style: { ...style
|
|
24422
25020
|
},
|
|
24423
25021
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24424
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25022
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
|
|
24425
25023
|
value: {
|
|
24426
25024
|
state,
|
|
24427
25025
|
dispatch
|
|
24428
25026
|
}
|
|
24429
25027
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24430
|
-
store,
|
|
25028
|
+
store: store$1,
|
|
24431
25029
|
key: i
|
|
24432
25030
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24433
|
-
store
|
|
25031
|
+
store: store$1
|
|
24434
25032
|
})));
|
|
24435
25033
|
};
|
|
24436
25034
|
|
|
@@ -24444,7 +25042,7 @@ const EmailVerifyResendButton = ({
|
|
|
24444
25042
|
state: {
|
|
24445
25043
|
isSubmitting
|
|
24446
25044
|
}
|
|
24447
|
-
} = React.useContext(store);
|
|
25045
|
+
} = React.useContext(store$1);
|
|
24448
25046
|
const {
|
|
24449
25047
|
t
|
|
24450
25048
|
} = useTranslation("verifyEmail");
|
|
@@ -24519,6 +25117,235 @@ const EmailVerifyModal = ({
|
|
|
24519
25117
|
};
|
|
24520
25118
|
EmailVerifyModal.viewId = "email-verify";
|
|
24521
25119
|
|
|
25120
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
25121
|
+
type: "invoicePayment",
|
|
25122
|
+
className: "pelcro-invoice-payment-container"
|
|
25123
|
+
}, props));
|
|
25124
|
+
|
|
25125
|
+
const InvoicePaymentView = props => {
|
|
25126
|
+
const {
|
|
25127
|
+
t
|
|
25128
|
+
} = useTranslation("payment");
|
|
25129
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25130
|
+
id: "pelcro-invoice-payment-view"
|
|
25131
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25132
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25133
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25134
|
+
action: "javascript:void(0);",
|
|
25135
|
+
className: "plc-mt-2 pelcro-form"
|
|
25136
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
|
|
25137
|
+
type: "invoicePayment",
|
|
25138
|
+
showCoupon: false,
|
|
25139
|
+
showExternalPaymentMethods: true
|
|
25140
|
+
}, props))));
|
|
25141
|
+
};
|
|
25142
|
+
|
|
25143
|
+
const InvoicePaymentModal = ({
|
|
25144
|
+
onDisplay,
|
|
25145
|
+
onClose,
|
|
25146
|
+
...otherProps
|
|
25147
|
+
}) => {
|
|
25148
|
+
const {
|
|
25149
|
+
switchView
|
|
25150
|
+
} = usePelcro();
|
|
25151
|
+
|
|
25152
|
+
const onSuccess = () => {
|
|
25153
|
+
var _otherProps$onSuccess;
|
|
25154
|
+
|
|
25155
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25156
|
+
return switchView("subscription-success");
|
|
25157
|
+
};
|
|
25158
|
+
|
|
25159
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25160
|
+
id: "pelcro-invoice-payment-modal",
|
|
25161
|
+
onDisplay: onDisplay,
|
|
25162
|
+
onClose: onClose
|
|
25163
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
25164
|
+
onSuccess: onSuccess
|
|
25165
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25166
|
+
};
|
|
25167
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
25168
|
+
|
|
25169
|
+
const invoicePaymentSubmitButton = props => {
|
|
25170
|
+
return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
|
|
25171
|
+
};
|
|
25172
|
+
|
|
25173
|
+
const initialState = {};
|
|
25174
|
+
const store = /*#__PURE__*/React.createContext(initialState);
|
|
25175
|
+
const {
|
|
25176
|
+
Provider
|
|
25177
|
+
} = store;
|
|
25178
|
+
|
|
25179
|
+
const InvoiceDetailsContainer = ({
|
|
25180
|
+
style,
|
|
25181
|
+
className = "",
|
|
25182
|
+
onSuccess = () => {},
|
|
25183
|
+
children,
|
|
25184
|
+
...props
|
|
25185
|
+
}) => {
|
|
25186
|
+
const onPayButtonClick = () => {
|
|
25187
|
+
return onSuccess();
|
|
25188
|
+
};
|
|
25189
|
+
|
|
25190
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
25191
|
+
switch (action.type) {
|
|
25192
|
+
case HANDLE_SUBMIT:
|
|
25193
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
25194
|
+
|
|
25195
|
+
default:
|
|
25196
|
+
return state;
|
|
25197
|
+
}
|
|
25198
|
+
}, initialState);
|
|
25199
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25200
|
+
style: { ...style
|
|
25201
|
+
},
|
|
25202
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25203
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25204
|
+
value: {
|
|
25205
|
+
state,
|
|
25206
|
+
dispatch
|
|
25207
|
+
}
|
|
25208
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25209
|
+
store,
|
|
25210
|
+
key: i
|
|
25211
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25212
|
+
store
|
|
25213
|
+
})));
|
|
25214
|
+
};
|
|
25215
|
+
|
|
25216
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25217
|
+
name,
|
|
25218
|
+
url,
|
|
25219
|
+
className,
|
|
25220
|
+
...otherProps
|
|
25221
|
+
}) => {
|
|
25222
|
+
const {
|
|
25223
|
+
t
|
|
25224
|
+
} = useTranslation("invoiceDetails");
|
|
25225
|
+
const {
|
|
25226
|
+
invoice
|
|
25227
|
+
} = usePelcro();
|
|
25228
|
+
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
25229
|
+
className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
|
|
25230
|
+
id: "pelcro-download-invoice-link",
|
|
25231
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25232
|
+
target: "_blank",
|
|
25233
|
+
rel: "noopener noreferrer"
|
|
25234
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25235
|
+
};
|
|
25236
|
+
|
|
25237
|
+
const InvoiceDetailsPayButton = ({
|
|
25238
|
+
name,
|
|
25239
|
+
onClick,
|
|
25240
|
+
...otherProps
|
|
25241
|
+
}) => {
|
|
25242
|
+
const {
|
|
25243
|
+
dispatch
|
|
25244
|
+
} = React.useContext(store);
|
|
25245
|
+
const {
|
|
25246
|
+
t
|
|
25247
|
+
} = useTranslation("invoiceDetails");
|
|
25248
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
25249
|
+
onClick: () => {
|
|
25250
|
+
dispatch({
|
|
25251
|
+
type: HANDLE_SUBMIT
|
|
25252
|
+
});
|
|
25253
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25254
|
+
}
|
|
25255
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25256
|
+
};
|
|
25257
|
+
|
|
25258
|
+
const InvoiceDetailsView = props => {
|
|
25259
|
+
const {
|
|
25260
|
+
t
|
|
25261
|
+
} = useTranslation("invoiceDetails");
|
|
25262
|
+
const {
|
|
25263
|
+
invoice
|
|
25264
|
+
} = usePelcro();
|
|
25265
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25266
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25267
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25268
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25269
|
+
id: "pelcro-invoice-details-view"
|
|
25270
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25271
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25272
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25273
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25274
|
+
}, t("title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25275
|
+
action: "javascript:void(0);",
|
|
25276
|
+
className: "plc-mt-2 pelcro-form"
|
|
25277
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25278
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25279
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25280
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25281
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25282
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25283
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25284
|
+
className: "plc-flex plc-items-center plc-pt-2 plc-mt-2 plc-border-t plc-border-gray-400 plc-min-h-12 plc-justify-evenly pelcro-invoice-plan-wrapper"
|
|
25285
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25286
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25287
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25288
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25289
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25290
|
+
className: "plc-flex plc-justify-end plc-pt-2 plc-mt-2 plc-font-bold plc-border-t plc-border-gray-400 pelcro-invoice-total-wrapper"
|
|
25291
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25292
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25293
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25294
|
+
className: "pelcro-invoice-total-text"
|
|
25295
|
+
}, t("labels.total")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25296
|
+
className: "pelcro-invoice-total-text"
|
|
25297
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25298
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25299
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25300
|
+
className: "plc-flex plc-flex-col"
|
|
25301
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25302
|
+
className: "pelcro-invoice-total"
|
|
25303
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25304
|
+
className: "pelcro-invoice-total"
|
|
25305
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25306
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25307
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25308
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25309
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsDownloadButton, {
|
|
25310
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25311
|
+
className: "plc-w-full plc-text-center"
|
|
25312
|
+
}), showPayButton && /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsPayButton, {
|
|
25313
|
+
role: "submit",
|
|
25314
|
+
className: "plc-ml-4 plc-w-full",
|
|
25315
|
+
id: "pelcro-submit"
|
|
25316
|
+
})))));
|
|
25317
|
+
};
|
|
25318
|
+
|
|
25319
|
+
function canPayInvoice(invoice) {
|
|
25320
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25321
|
+
}
|
|
25322
|
+
|
|
25323
|
+
const InvoiceDetailsModal = ({
|
|
25324
|
+
onDisplay,
|
|
25325
|
+
onClose,
|
|
25326
|
+
...otherProps
|
|
25327
|
+
}) => {
|
|
25328
|
+
const {
|
|
25329
|
+
switchToPaymentView
|
|
25330
|
+
} = usePelcro();
|
|
25331
|
+
|
|
25332
|
+
const onSuccess = () => {
|
|
25333
|
+
var _otherProps$onSuccess;
|
|
25334
|
+
|
|
25335
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25336
|
+
switchToPaymentView();
|
|
25337
|
+
};
|
|
25338
|
+
|
|
25339
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25340
|
+
onDisplay: onDisplay,
|
|
25341
|
+
onClose: onClose,
|
|
25342
|
+
id: "pelcro-invoice-details-modal"
|
|
25343
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25344
|
+
onSuccess: onSuccess
|
|
25345
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25346
|
+
};
|
|
25347
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25348
|
+
|
|
24522
25349
|
exports.AddressCreateCity = AddressCreateCity;
|
|
24523
25350
|
exports.AddressCreateContainer = AddressCreateContainer;
|
|
24524
25351
|
exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
|
|
@@ -24594,6 +25421,14 @@ exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
|
|
|
24594
25421
|
exports.GiftRedeemView = GiftRedeemView;
|
|
24595
25422
|
exports.GoogleLoginButton = GoogleLoginButton;
|
|
24596
25423
|
exports.Input = Input;
|
|
25424
|
+
exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
|
|
25425
|
+
exports.InvoiceDetailsDownloadButton = InvoiceDetailsDownloadButton;
|
|
25426
|
+
exports.InvoiceDetailsModal = InvoiceDetailsModal;
|
|
25427
|
+
exports.InvoiceDetailsPayButton = InvoiceDetailsPayButton;
|
|
25428
|
+
exports.InvoiceDetailsView = InvoiceDetailsView;
|
|
25429
|
+
exports.InvoicePaymentContainer = InvoicePaymentContainer;
|
|
25430
|
+
exports.InvoicePaymentModal = InvoicePaymentModal;
|
|
25431
|
+
exports.InvoicePaymentView = InvoicePaymentView;
|
|
24597
25432
|
exports.Link = Link;
|
|
24598
25433
|
exports.LoginButton = LoginButton;
|
|
24599
25434
|
exports.LoginContainer = LoginContainer;
|
|
@@ -24709,6 +25544,7 @@ exports.authenticatedButtons = authenticatedButtons;
|
|
|
24709
25544
|
exports.i18n = i18next;
|
|
24710
25545
|
exports.initButtons = init$1;
|
|
24711
25546
|
exports.initContentEntitlement = init;
|
|
25547
|
+
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
24712
25548
|
exports.notify = notify;
|
|
24713
25549
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
24714
25550
|
exports.usePelcro = usePelcro;
|