@pelcro/react-pelcro-js 3.0.0-beta.1 → 3.0.0-beta.12
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 +1382 -522
- package/dist/index.esm.js +1374 -523
- 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,17 @@ 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";
|
|
3673
|
+
var zeroTotalInvoice$1 = "You can't view an invoice of 0$";
|
|
3664
3674
|
var messages_en = {
|
|
3665
3675
|
youAreSafe: youAreSafe$1,
|
|
3666
3676
|
cancel: cancel$1,
|
|
3667
3677
|
giftSent: giftSent$1,
|
|
3668
3678
|
successfully: successfully$1,
|
|
3669
3679
|
entitlement: entitlement$1,
|
|
3670
|
-
recaptcha: recaptcha$1
|
|
3680
|
+
recaptcha: recaptcha$1,
|
|
3681
|
+
invalidInvoice: invalidInvoice$1,
|
|
3682
|
+
zeroTotalInvoice: zeroTotalInvoice$1
|
|
3671
3683
|
};
|
|
3672
3684
|
|
|
3673
3685
|
var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
|
|
@@ -3676,16 +3688,20 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
|
|
|
3676
3688
|
var successfully = "avec succès.";
|
|
3677
3689
|
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
3690
|
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.";
|
|
3691
|
+
var invalidInvoice = "Invalid invoice ID, please contact support";
|
|
3692
|
+
var zeroTotalInvoice = "You can't view an invoice of 0$";
|
|
3679
3693
|
var messages_fr = {
|
|
3680
3694
|
youAreSafe: youAreSafe,
|
|
3681
3695
|
cancel: cancel,
|
|
3682
3696
|
giftSent: giftSent,
|
|
3683
3697
|
successfully: successfully,
|
|
3684
3698
|
entitlement: entitlement,
|
|
3685
|
-
recaptcha: recaptcha
|
|
3699
|
+
recaptcha: recaptcha,
|
|
3700
|
+
invalidInvoice: invalidInvoice,
|
|
3701
|
+
zeroTotalInvoice: zeroTotalInvoice
|
|
3686
3702
|
};
|
|
3687
3703
|
|
|
3688
|
-
var labels$
|
|
3704
|
+
var labels$j = {
|
|
3689
3705
|
email: "Enter email",
|
|
3690
3706
|
password: "Enter password",
|
|
3691
3707
|
required: "required",
|
|
@@ -3712,12 +3728,12 @@ var errors$5 = {
|
|
|
3712
3728
|
"": ""
|
|
3713
3729
|
};
|
|
3714
3730
|
var login_en = {
|
|
3715
|
-
labels: labels$
|
|
3731
|
+
labels: labels$j,
|
|
3716
3732
|
messages: messages$j,
|
|
3717
3733
|
errors: errors$5
|
|
3718
3734
|
};
|
|
3719
3735
|
|
|
3720
|
-
var labels$
|
|
3736
|
+
var labels$i = {
|
|
3721
3737
|
email: "Entrez votre adresse courriel",
|
|
3722
3738
|
password: "Entrez votre mot de passe",
|
|
3723
3739
|
required: "Champs obligatoires",
|
|
@@ -3744,14 +3760,14 @@ var errors$4 = {
|
|
|
3744
3760
|
"": ""
|
|
3745
3761
|
};
|
|
3746
3762
|
var login_fr = {
|
|
3747
|
-
labels: labels$
|
|
3763
|
+
labels: labels$i,
|
|
3748
3764
|
messages: messages$i,
|
|
3749
3765
|
errors: errors$4
|
|
3750
3766
|
};
|
|
3751
3767
|
|
|
3752
|
-
var title$
|
|
3768
|
+
var title$d = "Create an account";
|
|
3753
3769
|
var subtitle$5 = "Enter your email and password below";
|
|
3754
|
-
var labels$
|
|
3770
|
+
var labels$h = {
|
|
3755
3771
|
signUpFacebook: "Sign up with Facebook",
|
|
3756
3772
|
signUpGoogle: "Sign up with Google",
|
|
3757
3773
|
signUpEmail: "Sign up with Email",
|
|
@@ -3796,7 +3812,7 @@ var gift$1 = {
|
|
|
3796
3812
|
lastName: "Last name",
|
|
3797
3813
|
email: "Email",
|
|
3798
3814
|
startDate: "Gift date",
|
|
3799
|
-
giftMessage: "Gift message (
|
|
3815
|
+
giftMessage: "Gift message ({{count}} characters remaining)",
|
|
3800
3816
|
required: "required",
|
|
3801
3817
|
firstNamePlaceholder: "First name",
|
|
3802
3818
|
lastNamePlaceholder: "Last name",
|
|
@@ -3835,18 +3851,18 @@ var redeem$1 = {
|
|
|
3835
3851
|
}
|
|
3836
3852
|
};
|
|
3837
3853
|
var register_en = {
|
|
3838
|
-
title: title$
|
|
3854
|
+
title: title$d,
|
|
3839
3855
|
subtitle: subtitle$5,
|
|
3840
|
-
labels: labels$
|
|
3856
|
+
labels: labels$h,
|
|
3841
3857
|
messages: messages$h,
|
|
3842
3858
|
errors: errors$3,
|
|
3843
3859
|
gift: gift$1,
|
|
3844
3860
|
redeem: redeem$1
|
|
3845
3861
|
};
|
|
3846
3862
|
|
|
3847
|
-
var title$
|
|
3863
|
+
var title$c = "Créer un compte";
|
|
3848
3864
|
var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3849
|
-
var labels$
|
|
3865
|
+
var labels$g = {
|
|
3850
3866
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3851
3867
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
3852
3868
|
signUpEmail: "Inscrivez-vous avec votre courriel",
|
|
@@ -3892,7 +3908,7 @@ var gift = {
|
|
|
3892
3908
|
lastName: "Nom de famille",
|
|
3893
3909
|
email: "Adresse courriel",
|
|
3894
3910
|
startDate: "Date de début",
|
|
3895
|
-
giftMessage: "Message du cadeau (
|
|
3911
|
+
giftMessage: "Message du cadeau ({{count}} caractères restants)",
|
|
3896
3912
|
required: "Champs obligatoires",
|
|
3897
3913
|
firstNamePlaceholder: "Prénom",
|
|
3898
3914
|
lastNamePlaceholder: "Nom de famille",
|
|
@@ -3931,16 +3947,16 @@ var redeem = {
|
|
|
3931
3947
|
}
|
|
3932
3948
|
};
|
|
3933
3949
|
var register_fr = {
|
|
3934
|
-
title: title$
|
|
3950
|
+
title: title$c,
|
|
3935
3951
|
subtitle: subtitle$4,
|
|
3936
|
-
labels: labels$
|
|
3952
|
+
labels: labels$g,
|
|
3937
3953
|
messages: messages$g,
|
|
3938
3954
|
errors: errors$2,
|
|
3939
3955
|
gift: gift,
|
|
3940
3956
|
redeem: redeem
|
|
3941
3957
|
};
|
|
3942
3958
|
|
|
3943
|
-
var labels$
|
|
3959
|
+
var labels$f = {
|
|
3944
3960
|
title: "Want to update your profile?",
|
|
3945
3961
|
subtitle: "Enter your information below to update your profile",
|
|
3946
3962
|
email: "Email",
|
|
@@ -3962,11 +3978,11 @@ var messages$f = {
|
|
|
3962
3978
|
pictureUpdated: "Your profile picture was updated successfully."
|
|
3963
3979
|
};
|
|
3964
3980
|
var userEdit_en = {
|
|
3965
|
-
labels: labels$
|
|
3981
|
+
labels: labels$f,
|
|
3966
3982
|
messages: messages$f
|
|
3967
3983
|
};
|
|
3968
3984
|
|
|
3969
|
-
var labels$
|
|
3985
|
+
var labels$e = {
|
|
3970
3986
|
title: "Voulez-vous mettre à jour votre profil ?",
|
|
3971
3987
|
subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
|
|
3972
3988
|
email: "Address courriel",
|
|
@@ -3988,14 +4004,14 @@ var messages$e = {
|
|
|
3988
4004
|
pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
|
|
3989
4005
|
};
|
|
3990
4006
|
var userEdit_fr = {
|
|
3991
|
-
labels: labels$
|
|
4007
|
+
labels: labels$e,
|
|
3992
4008
|
messages: messages$e
|
|
3993
4009
|
};
|
|
3994
4010
|
|
|
3995
|
-
var title$
|
|
4011
|
+
var title$b = "Enter your shipping address";
|
|
3996
4012
|
var selectAddressTitle$1 = "Please select an address";
|
|
3997
4013
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3998
|
-
var labels$
|
|
4014
|
+
var labels$d = {
|
|
3999
4015
|
address: "Address",
|
|
4000
4016
|
code: "Postal Code/Zip",
|
|
4001
4017
|
city: "City",
|
|
@@ -4005,7 +4021,7 @@ var labels$b = {
|
|
|
4005
4021
|
lastName: "Last name",
|
|
4006
4022
|
required: "required"
|
|
4007
4023
|
};
|
|
4008
|
-
var buttons$
|
|
4024
|
+
var buttons$7 = {
|
|
4009
4025
|
submit: "Submit",
|
|
4010
4026
|
selectAddress: "Select address",
|
|
4011
4027
|
addAddress: "Add new address"
|
|
@@ -4015,18 +4031,18 @@ var messages$d = {
|
|
|
4015
4031
|
subRedeemed: "Your subscription has been redeemed."
|
|
4016
4032
|
};
|
|
4017
4033
|
var address_en = {
|
|
4018
|
-
title: title$
|
|
4034
|
+
title: title$b,
|
|
4019
4035
|
selectAddressTitle: selectAddressTitle$1,
|
|
4020
4036
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
4021
|
-
labels: labels$
|
|
4022
|
-
buttons: buttons$
|
|
4037
|
+
labels: labels$d,
|
|
4038
|
+
buttons: buttons$7,
|
|
4023
4039
|
messages: messages$d
|
|
4024
4040
|
};
|
|
4025
4041
|
|
|
4026
|
-
var title$
|
|
4042
|
+
var title$a = "Entrez votre adresse de livraison";
|
|
4027
4043
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
4028
4044
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
4029
|
-
var labels$
|
|
4045
|
+
var labels$c = {
|
|
4030
4046
|
address: "Adresse",
|
|
4031
4047
|
code: "Code postal / Zip",
|
|
4032
4048
|
city: "Ville",
|
|
@@ -4036,7 +4052,7 @@ var labels$a = {
|
|
|
4036
4052
|
lastName: "Nom de famille",
|
|
4037
4053
|
required: "Champs obligatoires"
|
|
4038
4054
|
};
|
|
4039
|
-
var buttons$
|
|
4055
|
+
var buttons$6 = {
|
|
4040
4056
|
submit: "Valider",
|
|
4041
4057
|
selectAddress: "Choisir cette adresse",
|
|
4042
4058
|
addAddress: "Ajouter une nouvelle adresse"
|
|
@@ -4046,15 +4062,15 @@ var messages$c = {
|
|
|
4046
4062
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4047
4063
|
};
|
|
4048
4064
|
var address_fr = {
|
|
4049
|
-
title: title$
|
|
4065
|
+
title: title$a,
|
|
4050
4066
|
selectAddressTitle: selectAddressTitle,
|
|
4051
4067
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4052
|
-
labels: labels$
|
|
4053
|
-
buttons: buttons$
|
|
4068
|
+
labels: labels$c,
|
|
4069
|
+
buttons: buttons$6,
|
|
4054
4070
|
messages: messages$c
|
|
4055
4071
|
};
|
|
4056
4072
|
|
|
4057
|
-
var title$
|
|
4073
|
+
var title$9 = "Reset your password";
|
|
4058
4074
|
var subtitle$3 = "Enter a new password below";
|
|
4059
4075
|
var email$3 = "Email";
|
|
4060
4076
|
var password$3 = "Password";
|
|
@@ -4063,7 +4079,7 @@ var submit$5 = "Submit";
|
|
|
4063
4079
|
var required$5 = "Required";
|
|
4064
4080
|
var passwordUpdated$1 = "Password has been updated, please login with the new password";
|
|
4065
4081
|
var passwordReset_en = {
|
|
4066
|
-
title: title$
|
|
4082
|
+
title: title$9,
|
|
4067
4083
|
subtitle: subtitle$3,
|
|
4068
4084
|
email: email$3,
|
|
4069
4085
|
password: password$3,
|
|
@@ -4073,7 +4089,7 @@ var passwordReset_en = {
|
|
|
4073
4089
|
passwordUpdated: passwordUpdated$1
|
|
4074
4090
|
};
|
|
4075
4091
|
|
|
4076
|
-
var title$
|
|
4092
|
+
var title$8 = "Réinitialiser votre mot de passe";
|
|
4077
4093
|
var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
|
|
4078
4094
|
var email$2 = "Adresse courriel";
|
|
4079
4095
|
var password$2 = "Mot de passe";
|
|
@@ -4082,7 +4098,7 @@ var submit$4 = "Soumettre";
|
|
|
4082
4098
|
var required$4 = "Champs obligatoires";
|
|
4083
4099
|
var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
|
|
4084
4100
|
var passwordReset_fr = {
|
|
4085
|
-
title: title$
|
|
4101
|
+
title: title$8,
|
|
4086
4102
|
subtitle: subtitle$2,
|
|
4087
4103
|
email: email$2,
|
|
4088
4104
|
password: password$2,
|
|
@@ -4092,7 +4108,7 @@ var passwordReset_fr = {
|
|
|
4092
4108
|
passwordUpdated: passwordUpdated
|
|
4093
4109
|
};
|
|
4094
4110
|
|
|
4095
|
-
var title$
|
|
4111
|
+
var title$7 = "Forgot your password?";
|
|
4096
4112
|
var email$1 = "Email";
|
|
4097
4113
|
var password$1 = "Password";
|
|
4098
4114
|
var submit$3 = "Submit";
|
|
@@ -4103,7 +4119,7 @@ var messages$b = {
|
|
|
4103
4119
|
loginHere: "login here."
|
|
4104
4120
|
};
|
|
4105
4121
|
var passwordForgot_en = {
|
|
4106
|
-
title: title$
|
|
4122
|
+
title: title$7,
|
|
4107
4123
|
email: email$1,
|
|
4108
4124
|
password: password$1,
|
|
4109
4125
|
submit: submit$3,
|
|
@@ -4112,7 +4128,7 @@ var passwordForgot_en = {
|
|
|
4112
4128
|
messages: messages$b
|
|
4113
4129
|
};
|
|
4114
4130
|
|
|
4115
|
-
var title$
|
|
4131
|
+
var title$6 = "Mot de passe oublié ?";
|
|
4116
4132
|
var email = "Courriel";
|
|
4117
4133
|
var password = "Mot de passe";
|
|
4118
4134
|
var submit$2 = "Soumettre";
|
|
@@ -4123,7 +4139,7 @@ var messages$a = {
|
|
|
4123
4139
|
loginHere: "Connectez-vous ici"
|
|
4124
4140
|
};
|
|
4125
4141
|
var passwordForgot_fr = {
|
|
4126
|
-
title: title$
|
|
4142
|
+
title: title$6,
|
|
4127
4143
|
email: email,
|
|
4128
4144
|
password: password,
|
|
4129
4145
|
submit: submit$2,
|
|
@@ -4132,7 +4148,7 @@ var passwordForgot_fr = {
|
|
|
4132
4148
|
messages: messages$a
|
|
4133
4149
|
};
|
|
4134
4150
|
|
|
4135
|
-
var title$
|
|
4151
|
+
var title$5 = "Change your password";
|
|
4136
4152
|
var currentPassword$1 = "Current password";
|
|
4137
4153
|
var newPassword$1 = "New password";
|
|
4138
4154
|
var confirmNewPassword$1 = "Confirm new password";
|
|
@@ -4142,7 +4158,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
|
|
|
4142
4158
|
var passwordsNotMatching$1 = "Passwords don't match";
|
|
4143
4159
|
var weakPassword$1 = "Your password must contain at least 6 characters";
|
|
4144
4160
|
var passwordChange_en = {
|
|
4145
|
-
title: title$
|
|
4161
|
+
title: title$5,
|
|
4146
4162
|
currentPassword: currentPassword$1,
|
|
4147
4163
|
newPassword: newPassword$1,
|
|
4148
4164
|
confirmNewPassword: confirmNewPassword$1,
|
|
@@ -4153,7 +4169,7 @@ var passwordChange_en = {
|
|
|
4153
4169
|
weakPassword: weakPassword$1
|
|
4154
4170
|
};
|
|
4155
4171
|
|
|
4156
|
-
var title$
|
|
4172
|
+
var title$4 = "Changez votre mot de passe";
|
|
4157
4173
|
var currentPassword = "Mot de passe actuel";
|
|
4158
4174
|
var newPassword = "Nouveau mot de passe";
|
|
4159
4175
|
var confirmNewPassword = "Confirmer le nouveau mot de passe";
|
|
@@ -4163,7 +4179,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
|
|
|
4163
4179
|
var passwordsNotMatching = "Les mots de passe ne correspondent pas";
|
|
4164
4180
|
var weakPassword = "Votre mot de passe doit contenir au moins 6";
|
|
4165
4181
|
var passwordChange_fr = {
|
|
4166
|
-
title: title$
|
|
4182
|
+
title: title$4,
|
|
4167
4183
|
currentPassword: currentPassword,
|
|
4168
4184
|
newPassword: newPassword,
|
|
4169
4185
|
confirmNewPassword: confirmNewPassword,
|
|
@@ -4174,7 +4190,7 @@ var passwordChange_fr = {
|
|
|
4174
4190
|
weakPassword: weakPassword
|
|
4175
4191
|
};
|
|
4176
4192
|
|
|
4177
|
-
var title$
|
|
4193
|
+
var title$3 = "Votre panier";
|
|
4178
4194
|
var subtitle$1 = "Terminez votre achat ci-dessous";
|
|
4179
4195
|
var name$1 = "Produit";
|
|
4180
4196
|
var quantity$1 = "Quantité";
|
|
@@ -4186,7 +4202,7 @@ var confirm$3 = "Passer à la caisse";
|
|
|
4186
4202
|
var empty$1 = "Votre panier est vide.";
|
|
4187
4203
|
var removeAll$1 = "Vider";
|
|
4188
4204
|
var cart_fr = {
|
|
4189
|
-
title: title$
|
|
4205
|
+
title: title$3,
|
|
4190
4206
|
subtitle: subtitle$1,
|
|
4191
4207
|
name: name$1,
|
|
4192
4208
|
quantity: quantity$1,
|
|
@@ -4199,7 +4215,7 @@ var cart_fr = {
|
|
|
4199
4215
|
removeAll: removeAll$1
|
|
4200
4216
|
};
|
|
4201
4217
|
|
|
4202
|
-
var title = "Your shopping cart";
|
|
4218
|
+
var title$2 = "Your shopping cart";
|
|
4203
4219
|
var subtitle = "Comple your purchase below";
|
|
4204
4220
|
var name = "Name";
|
|
4205
4221
|
var quantity = "Quantity";
|
|
@@ -4211,7 +4227,7 @@ var confirm$2 = "Checkout";
|
|
|
4211
4227
|
var empty = "Your cart is empty.";
|
|
4212
4228
|
var removeAll = "Remove all";
|
|
4213
4229
|
var cart_en = {
|
|
4214
|
-
title: title,
|
|
4230
|
+
title: title$2,
|
|
4215
4231
|
subtitle: subtitle,
|
|
4216
4232
|
name: name,
|
|
4217
4233
|
quantity: quantity,
|
|
@@ -4224,7 +4240,7 @@ var cart_en = {
|
|
|
4224
4240
|
removeAll: removeAll
|
|
4225
4241
|
};
|
|
4226
4242
|
|
|
4227
|
-
var buttons$
|
|
4243
|
+
var buttons$5 = {
|
|
4228
4244
|
select: "Select",
|
|
4229
4245
|
added: "Added to cart",
|
|
4230
4246
|
purchase: "Purchase",
|
|
@@ -4239,17 +4255,17 @@ var messages$9 = {
|
|
|
4239
4255
|
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
4256
|
currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
|
|
4241
4257
|
};
|
|
4242
|
-
var labels$
|
|
4258
|
+
var labels$b = {
|
|
4243
4259
|
summary: "Order summary",
|
|
4244
4260
|
total: "total"
|
|
4245
4261
|
};
|
|
4246
4262
|
var shop_en = {
|
|
4247
|
-
buttons: buttons$
|
|
4263
|
+
buttons: buttons$5,
|
|
4248
4264
|
messages: messages$9,
|
|
4249
|
-
labels: labels$
|
|
4265
|
+
labels: labels$b
|
|
4250
4266
|
};
|
|
4251
4267
|
|
|
4252
|
-
var buttons$
|
|
4268
|
+
var buttons$4 = {
|
|
4253
4269
|
select: "Choisir",
|
|
4254
4270
|
added: "Ajouté au panier",
|
|
4255
4271
|
purchase: "Acheter",
|
|
@@ -4264,17 +4280,17 @@ var messages$8 = {
|
|
|
4264
4280
|
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
4281
|
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
4282
|
};
|
|
4267
|
-
var labels$
|
|
4283
|
+
var labels$a = {
|
|
4268
4284
|
summary: "récapitulatif de commande",
|
|
4269
4285
|
total: "total"
|
|
4270
4286
|
};
|
|
4271
4287
|
var shop_fr = {
|
|
4272
|
-
buttons: buttons$
|
|
4288
|
+
buttons: buttons$4,
|
|
4273
4289
|
messages: messages$8,
|
|
4274
|
-
labels: labels$
|
|
4290
|
+
labels: labels$a
|
|
4275
4291
|
};
|
|
4276
4292
|
|
|
4277
|
-
var labels$
|
|
4293
|
+
var labels$9 = {
|
|
4278
4294
|
cardNumber: "Numéro de carte",
|
|
4279
4295
|
securityCode: "Code de sécurité",
|
|
4280
4296
|
submit: "Soumettre",
|
|
@@ -4309,12 +4325,12 @@ var errors$1 = {
|
|
|
4309
4325
|
"": ""
|
|
4310
4326
|
};
|
|
4311
4327
|
var payment_fr = {
|
|
4312
|
-
labels: labels$
|
|
4328
|
+
labels: labels$9,
|
|
4313
4329
|
messages: messages$7,
|
|
4314
4330
|
errors: errors$1
|
|
4315
4331
|
};
|
|
4316
4332
|
|
|
4317
|
-
var labels$
|
|
4333
|
+
var labels$8 = {
|
|
4318
4334
|
cardNumber: "Card number",
|
|
4319
4335
|
securityCode: "Security Code",
|
|
4320
4336
|
submit: "Submit",
|
|
@@ -4349,12 +4365,12 @@ var errors = {
|
|
|
4349
4365
|
"": ""
|
|
4350
4366
|
};
|
|
4351
4367
|
var payment_en = {
|
|
4352
|
-
labels: labels$
|
|
4368
|
+
labels: labels$8,
|
|
4353
4369
|
messages: messages$6,
|
|
4354
4370
|
errors: errors
|
|
4355
4371
|
};
|
|
4356
4372
|
|
|
4357
|
-
var labels$
|
|
4373
|
+
var labels$7 = {
|
|
4358
4374
|
menu: "Pelcro Menu",
|
|
4359
4375
|
name: "Name",
|
|
4360
4376
|
email: "Email",
|
|
@@ -4379,6 +4395,16 @@ var labels$5 = {
|
|
|
4379
4395
|
purchases: "Purchases",
|
|
4380
4396
|
subscriptions: "Subscriptions",
|
|
4381
4397
|
donations: "Donations",
|
|
4398
|
+
invoices: "Invoices",
|
|
4399
|
+
details: "Details",
|
|
4400
|
+
view: "View",
|
|
4401
|
+
paid: "Paid",
|
|
4402
|
+
open: "Open",
|
|
4403
|
+
draft: "Draft",
|
|
4404
|
+
scheduled: "Scheduled",
|
|
4405
|
+
uncollectible: "Uncollectible",
|
|
4406
|
+
"void": "Void",
|
|
4407
|
+
pastDue: "Past due",
|
|
4382
4408
|
updatePaymentSource: "Update",
|
|
4383
4409
|
profile: "Profile",
|
|
4384
4410
|
updateProfile: "Edit profile",
|
|
@@ -4431,11 +4457,11 @@ var messages$5 = {
|
|
|
4431
4457
|
}
|
|
4432
4458
|
};
|
|
4433
4459
|
var dashboard_en = {
|
|
4434
|
-
labels: labels$
|
|
4460
|
+
labels: labels$7,
|
|
4435
4461
|
messages: messages$5
|
|
4436
4462
|
};
|
|
4437
4463
|
|
|
4438
|
-
var labels$
|
|
4464
|
+
var labels$6 = {
|
|
4439
4465
|
menu: "Menu Pelcro",
|
|
4440
4466
|
name: "Nom",
|
|
4441
4467
|
email: "Courriel",
|
|
@@ -4460,6 +4486,16 @@ var labels$4 = {
|
|
|
4460
4486
|
purchases: "Achats",
|
|
4461
4487
|
subscriptions: "Abonnements",
|
|
4462
4488
|
donations: "Des dons",
|
|
4489
|
+
invoices: "Invoices",
|
|
4490
|
+
details: "Details",
|
|
4491
|
+
view: "View",
|
|
4492
|
+
paid: "Paid",
|
|
4493
|
+
open: "open",
|
|
4494
|
+
draft: "Draft",
|
|
4495
|
+
scheduled: "Scheduled",
|
|
4496
|
+
uncollectible: "Uncollectible",
|
|
4497
|
+
"void": "Void",
|
|
4498
|
+
pastDue: "Past due",
|
|
4463
4499
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4464
4500
|
profile: "Profil",
|
|
4465
4501
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4512,7 +4548,7 @@ var messages$4 = {
|
|
|
4512
4548
|
}
|
|
4513
4549
|
};
|
|
4514
4550
|
var dashboard_fr = {
|
|
4515
|
-
labels: labels$
|
|
4551
|
+
labels: labels$6,
|
|
4516
4552
|
messages: messages$4
|
|
4517
4553
|
};
|
|
4518
4554
|
|
|
@@ -4521,7 +4557,7 @@ var messages$3 = {
|
|
|
4521
4557
|
loginHere: "Login here",
|
|
4522
4558
|
checkbox: "Check this box to gift this subscription"
|
|
4523
4559
|
};
|
|
4524
|
-
var labels$
|
|
4560
|
+
var labels$5 = {
|
|
4525
4561
|
plan: {
|
|
4526
4562
|
title: "Subscribe to a plan",
|
|
4527
4563
|
subtitle: "Select one of the plans below and click on next."
|
|
@@ -4538,15 +4574,15 @@ var labels$3 = {
|
|
|
4538
4574
|
or: "Or take a look at some of our other options below"
|
|
4539
4575
|
}
|
|
4540
4576
|
};
|
|
4541
|
-
var buttons$
|
|
4577
|
+
var buttons$3 = {
|
|
4542
4578
|
next: "Next",
|
|
4543
4579
|
select: "Select",
|
|
4544
4580
|
back: "Back"
|
|
4545
4581
|
};
|
|
4546
4582
|
var select_en = {
|
|
4547
4583
|
messages: messages$3,
|
|
4548
|
-
labels: labels$
|
|
4549
|
-
buttons: buttons$
|
|
4584
|
+
labels: labels$5,
|
|
4585
|
+
buttons: buttons$3
|
|
4550
4586
|
};
|
|
4551
4587
|
|
|
4552
4588
|
var messages$2 = {
|
|
@@ -4554,7 +4590,7 @@ var messages$2 = {
|
|
|
4554
4590
|
loginHere: "Connectez-vous ici",
|
|
4555
4591
|
checkbox: "Cochez cette case pour offrir cet abonnement"
|
|
4556
4592
|
};
|
|
4557
|
-
var labels$
|
|
4593
|
+
var labels$4 = {
|
|
4558
4594
|
plan: {
|
|
4559
4595
|
title: "Abonnez-vous à un plan",
|
|
4560
4596
|
subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
|
|
@@ -4571,15 +4607,15 @@ var labels$2 = {
|
|
|
4571
4607
|
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4572
4608
|
}
|
|
4573
4609
|
};
|
|
4574
|
-
var buttons = {
|
|
4610
|
+
var buttons$2 = {
|
|
4575
4611
|
next: "Prochain",
|
|
4576
4612
|
select: "Choisir",
|
|
4577
4613
|
back: "Retour"
|
|
4578
4614
|
};
|
|
4579
4615
|
var select_fr = {
|
|
4580
4616
|
messages: messages$2,
|
|
4581
|
-
labels: labels$
|
|
4582
|
-
buttons: buttons
|
|
4617
|
+
labels: labels$4,
|
|
4618
|
+
buttons: buttons$2
|
|
4583
4619
|
};
|
|
4584
4620
|
|
|
4585
4621
|
var confirm$1 = {
|
|
@@ -4602,7 +4638,7 @@ var notification_fr = {
|
|
|
4602
4638
|
confirm: confirm
|
|
4603
4639
|
};
|
|
4604
4640
|
|
|
4605
|
-
var labels$
|
|
4641
|
+
var labels$3 = {
|
|
4606
4642
|
title: "Verify your email",
|
|
4607
4643
|
instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
|
|
4608
4644
|
resend: "Resend email"
|
|
@@ -4612,24 +4648,60 @@ var messages$1 = {
|
|
|
4612
4648
|
success: "Email verified successfully!"
|
|
4613
4649
|
};
|
|
4614
4650
|
var verifyEmail_en = {
|
|
4615
|
-
labels: labels$
|
|
4651
|
+
labels: labels$3,
|
|
4616
4652
|
messages: messages$1
|
|
4617
4653
|
};
|
|
4618
4654
|
|
|
4619
|
-
var labels = {
|
|
4620
|
-
title: "
|
|
4621
|
-
instructions: "
|
|
4622
|
-
resend: "
|
|
4655
|
+
var labels$2 = {
|
|
4656
|
+
title: "Confirmez votre courriel",
|
|
4657
|
+
instructions: "Confirmez votre courriel.\nVeuillez cliquer sur le lien de vérification, qui vous a été envoyé à:",
|
|
4658
|
+
resend: "Renvoyer le courriel"
|
|
4623
4659
|
};
|
|
4624
4660
|
var messages = {
|
|
4625
4661
|
resent: "Renvoyé avec succès",
|
|
4626
|
-
success: "
|
|
4662
|
+
success: "Adresse courriel vérifiée avec succès"
|
|
4627
4663
|
};
|
|
4628
4664
|
var verifyEmail_fr = {
|
|
4629
|
-
labels: labels,
|
|
4665
|
+
labels: labels$2,
|
|
4630
4666
|
messages: messages
|
|
4631
4667
|
};
|
|
4632
4668
|
|
|
4669
|
+
var title$1 = "Invoice details";
|
|
4670
|
+
var labels$1 = {
|
|
4671
|
+
summary: "Summary",
|
|
4672
|
+
total: "Total",
|
|
4673
|
+
amountPaid: "Amount paid",
|
|
4674
|
+
amountDue: "Amount due",
|
|
4675
|
+
creationDate: "Created on:"
|
|
4676
|
+
};
|
|
4677
|
+
var buttons$1 = {
|
|
4678
|
+
download: "Download",
|
|
4679
|
+
pay: "Pay now"
|
|
4680
|
+
};
|
|
4681
|
+
var invoiceDetails_en = {
|
|
4682
|
+
title: title$1,
|
|
4683
|
+
labels: labels$1,
|
|
4684
|
+
buttons: buttons$1
|
|
4685
|
+
};
|
|
4686
|
+
|
|
4687
|
+
var title = "Invoice details";
|
|
4688
|
+
var labels = {
|
|
4689
|
+
summary: "Summary",
|
|
4690
|
+
total: "Total",
|
|
4691
|
+
amountPaid: "Amount paid",
|
|
4692
|
+
amountDue: "Amount due",
|
|
4693
|
+
creationDate: "Created on:"
|
|
4694
|
+
};
|
|
4695
|
+
var buttons = {
|
|
4696
|
+
download: "Download",
|
|
4697
|
+
pay: "Pay now"
|
|
4698
|
+
};
|
|
4699
|
+
var invoiceDetails_fr = {
|
|
4700
|
+
title: title,
|
|
4701
|
+
labels: labels,
|
|
4702
|
+
buttons: buttons
|
|
4703
|
+
};
|
|
4704
|
+
|
|
4633
4705
|
function create$1(createState) {
|
|
4634
4706
|
let state;
|
|
4635
4707
|
const listeners = new Set();
|
|
@@ -5979,7 +6051,7 @@ class PelcroActions {
|
|
|
5979
6051
|
view,
|
|
5980
6052
|
cartItems,
|
|
5981
6053
|
...otherStateFields
|
|
5982
|
-
} = initialState$
|
|
6054
|
+
} = initialState$i;
|
|
5983
6055
|
this.set(otherStateFields);
|
|
5984
6056
|
});
|
|
5985
6057
|
|
|
@@ -6023,10 +6095,11 @@ class PelcroActions {
|
|
|
6023
6095
|
resetView,
|
|
6024
6096
|
switchToCheckoutForm,
|
|
6025
6097
|
product,
|
|
6026
|
-
order
|
|
6098
|
+
order,
|
|
6099
|
+
invoice
|
|
6027
6100
|
} = this.get();
|
|
6028
6101
|
|
|
6029
|
-
if (product || order) {
|
|
6102
|
+
if (product || order || invoice) {
|
|
6030
6103
|
// direct user to stripe checkout form when there are no existing cards
|
|
6031
6104
|
if (!userHasPaymentMethod()) {
|
|
6032
6105
|
return switchToCheckoutForm();
|
|
@@ -6043,7 +6116,8 @@ class PelcroActions {
|
|
|
6043
6116
|
switchView,
|
|
6044
6117
|
product,
|
|
6045
6118
|
subscriptionIdToRenew,
|
|
6046
|
-
order
|
|
6119
|
+
order,
|
|
6120
|
+
invoice
|
|
6047
6121
|
} = this.get();
|
|
6048
6122
|
|
|
6049
6123
|
if (product && subscriptionIdToRenew) {
|
|
@@ -6057,6 +6131,10 @@ class PelcroActions {
|
|
|
6057
6131
|
if (order) {
|
|
6058
6132
|
return switchView("order-create");
|
|
6059
6133
|
}
|
|
6134
|
+
|
|
6135
|
+
if (invoice) {
|
|
6136
|
+
return switchView("invoice-payment");
|
|
6137
|
+
}
|
|
6060
6138
|
});
|
|
6061
6139
|
|
|
6062
6140
|
_defineProperty$3(this, "switchToAddressView", () => {
|
|
@@ -6087,6 +6165,23 @@ class PelcroActions {
|
|
|
6087
6165
|
});
|
|
6088
6166
|
});
|
|
6089
6167
|
|
|
6168
|
+
_defineProperty$3(this, "setInvoice", id => {
|
|
6169
|
+
var _window$Pelcro$invoic;
|
|
6170
|
+
|
|
6171
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
6172
|
+
const invoice = invoices.find(inv => String(inv.id) === String(id));
|
|
6173
|
+
|
|
6174
|
+
if (!invoice) {
|
|
6175
|
+
console.error("invalid invoice id");
|
|
6176
|
+
return false;
|
|
6177
|
+
}
|
|
6178
|
+
|
|
6179
|
+
this.set({
|
|
6180
|
+
invoice
|
|
6181
|
+
});
|
|
6182
|
+
return true;
|
|
6183
|
+
});
|
|
6184
|
+
|
|
6090
6185
|
_defineProperty$3(this, "logout", () => {
|
|
6091
6186
|
var _ReactGA$event;
|
|
6092
6187
|
|
|
@@ -6275,7 +6370,7 @@ class PelcroCallbacks {
|
|
|
6275
6370
|
|
|
6276
6371
|
}
|
|
6277
6372
|
|
|
6278
|
-
const initialState$
|
|
6373
|
+
const initialState$i = {
|
|
6279
6374
|
// View
|
|
6280
6375
|
view: null,
|
|
6281
6376
|
// Plans
|
|
@@ -6290,6 +6385,8 @@ const initialState$h = {
|
|
|
6290
6385
|
cartItems: [],
|
|
6291
6386
|
order: null,
|
|
6292
6387
|
// null | SKU[] | SKU,
|
|
6388
|
+
// invoices
|
|
6389
|
+
invoice: null,
|
|
6293
6390
|
// User
|
|
6294
6391
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
6295
6392
|
selectedPaymentMethodId: null,
|
|
@@ -6303,7 +6400,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6303
6400
|
return {
|
|
6304
6401
|
// Store setter
|
|
6305
6402
|
set,
|
|
6306
|
-
...initialState$
|
|
6403
|
+
...initialState$i,
|
|
6307
6404
|
// State actions
|
|
6308
6405
|
...actions,
|
|
6309
6406
|
// Callbacks
|
|
@@ -6454,7 +6551,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
6454
6551
|
*/
|
|
6455
6552
|
|
|
6456
6553
|
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()) {
|
|
6554
|
+
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
6555
|
return true;
|
|
6459
6556
|
}
|
|
6460
6557
|
|
|
@@ -6681,7 +6778,8 @@ const resources = {
|
|
|
6681
6778
|
payment: payment_en,
|
|
6682
6779
|
dashboard: dashboard_en,
|
|
6683
6780
|
select: select_en,
|
|
6684
|
-
notification: notification_en
|
|
6781
|
+
notification: notification_en,
|
|
6782
|
+
invoiceDetails: invoiceDetails_en
|
|
6685
6783
|
},
|
|
6686
6784
|
fr: {
|
|
6687
6785
|
common: common_fr,
|
|
@@ -6704,7 +6802,8 @@ const resources = {
|
|
|
6704
6802
|
payment: payment_fr,
|
|
6705
6803
|
dashboard: dashboard_fr,
|
|
6706
6804
|
select: select_fr,
|
|
6707
|
-
notification: notification_fr
|
|
6805
|
+
notification: notification_fr,
|
|
6806
|
+
invoiceDetails: invoiceDetails_fr
|
|
6708
6807
|
}
|
|
6709
6808
|
}; // set UI language to the page language or default to the language in site settings
|
|
6710
6809
|
|
|
@@ -6995,8 +7094,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6995
7094
|
|
|
6996
7095
|
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
7096
|
|
|
6998
|
-
function _extends$
|
|
6999
|
-
_extends$
|
|
7097
|
+
function _extends$z() {
|
|
7098
|
+
_extends$z = Object.assign || function (target) {
|
|
7000
7099
|
for (var i = 1; i < arguments.length; i++) {
|
|
7001
7100
|
var source = arguments[i];
|
|
7002
7101
|
|
|
@@ -7010,7 +7109,7 @@ function _extends$y() {
|
|
|
7010
7109
|
return target;
|
|
7011
7110
|
};
|
|
7012
7111
|
|
|
7013
|
-
return _extends$
|
|
7112
|
+
return _extends$z.apply(this, arguments);
|
|
7014
7113
|
}
|
|
7015
7114
|
|
|
7016
7115
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7100,7 +7199,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7100
7199
|
var reducer = function reducer(state, action) {
|
|
7101
7200
|
switch (action.type) {
|
|
7102
7201
|
case ActionType.ADD_TOAST:
|
|
7103
|
-
return _extends$
|
|
7202
|
+
return _extends$z({}, state, {
|
|
7104
7203
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7105
7204
|
});
|
|
7106
7205
|
|
|
@@ -7110,9 +7209,9 @@ var reducer = function reducer(state, action) {
|
|
|
7110
7209
|
clearFromRemoveQueue(action.toast.id);
|
|
7111
7210
|
}
|
|
7112
7211
|
|
|
7113
|
-
return _extends$
|
|
7212
|
+
return _extends$z({}, state, {
|
|
7114
7213
|
toasts: state.toasts.map(function (t) {
|
|
7115
|
-
return t.id === action.toast.id ? _extends$
|
|
7214
|
+
return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
|
|
7116
7215
|
})
|
|
7117
7216
|
});
|
|
7118
7217
|
|
|
@@ -7139,9 +7238,9 @@ var reducer = function reducer(state, action) {
|
|
|
7139
7238
|
});
|
|
7140
7239
|
}
|
|
7141
7240
|
|
|
7142
|
-
return _extends$
|
|
7241
|
+
return _extends$z({}, state, {
|
|
7143
7242
|
toasts: state.toasts.map(function (t) {
|
|
7144
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7243
|
+
return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
|
|
7145
7244
|
visible: false
|
|
7146
7245
|
}) : t;
|
|
7147
7246
|
})
|
|
@@ -7149,28 +7248,28 @@ var reducer = function reducer(state, action) {
|
|
|
7149
7248
|
|
|
7150
7249
|
case ActionType.REMOVE_TOAST:
|
|
7151
7250
|
if (action.toastId === undefined) {
|
|
7152
|
-
return _extends$
|
|
7251
|
+
return _extends$z({}, state, {
|
|
7153
7252
|
toasts: []
|
|
7154
7253
|
});
|
|
7155
7254
|
}
|
|
7156
7255
|
|
|
7157
|
-
return _extends$
|
|
7256
|
+
return _extends$z({}, state, {
|
|
7158
7257
|
toasts: state.toasts.filter(function (t) {
|
|
7159
7258
|
return t.id !== action.toastId;
|
|
7160
7259
|
})
|
|
7161
7260
|
});
|
|
7162
7261
|
|
|
7163
7262
|
case ActionType.START_PAUSE:
|
|
7164
|
-
return _extends$
|
|
7263
|
+
return _extends$z({}, state, {
|
|
7165
7264
|
pausedAt: action.time
|
|
7166
7265
|
});
|
|
7167
7266
|
|
|
7168
7267
|
case ActionType.END_PAUSE:
|
|
7169
7268
|
var diff = action.time - (state.pausedAt || 0);
|
|
7170
|
-
return _extends$
|
|
7269
|
+
return _extends$z({}, state, {
|
|
7171
7270
|
pausedAt: undefined,
|
|
7172
7271
|
toasts: state.toasts.map(function (t) {
|
|
7173
|
-
return _extends$
|
|
7272
|
+
return _extends$z({}, t, {
|
|
7174
7273
|
pauseDuration: t.pauseDuration + diff
|
|
7175
7274
|
});
|
|
7176
7275
|
})
|
|
@@ -7217,12 +7316,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7217
7316
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7218
7317
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7219
7318
|
|
|
7220
|
-
return _extends$
|
|
7319
|
+
return _extends$z({}, toastOptions, toastOptions[t.type], t, {
|
|
7221
7320
|
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$
|
|
7321
|
+
style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7223
7322
|
});
|
|
7224
7323
|
});
|
|
7225
|
-
return _extends$
|
|
7324
|
+
return _extends$z({}, state, {
|
|
7226
7325
|
toasts: mergedToasts
|
|
7227
7326
|
});
|
|
7228
7327
|
};
|
|
@@ -7232,7 +7331,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7232
7331
|
type = 'blank';
|
|
7233
7332
|
}
|
|
7234
7333
|
|
|
7235
|
-
return _extends$
|
|
7334
|
+
return _extends$z({
|
|
7236
7335
|
createdAt: Date.now(),
|
|
7237
7336
|
visible: true,
|
|
7238
7337
|
type: type,
|
|
@@ -7282,14 +7381,14 @@ toast.remove = function (toastId) {
|
|
|
7282
7381
|
};
|
|
7283
7382
|
|
|
7284
7383
|
toast.promise = function (promise, msgs, opts) {
|
|
7285
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7384
|
+
var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
|
|
7286
7385
|
promise.then(function (p) {
|
|
7287
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7386
|
+
toast.success(resolveValue(msgs.success, p), _extends$z({
|
|
7288
7387
|
id: id
|
|
7289
7388
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7290
7389
|
return p;
|
|
7291
7390
|
})["catch"](function (e) {
|
|
7292
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7391
|
+
toast.error(resolveValue(msgs.error, e), _extends$z({
|
|
7293
7392
|
id: id
|
|
7294
7393
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7295
7394
|
});
|
|
@@ -7628,7 +7727,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7628
7727
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7629
7728
|
return React.createElement(ToastBarBase, {
|
|
7630
7729
|
className: toast.className,
|
|
7631
|
-
style: _extends$
|
|
7730
|
+
style: _extends$z({}, animationStyle, style, toast.style)
|
|
7632
7731
|
}, typeof children === 'function' ? children({
|
|
7633
7732
|
icon: icon,
|
|
7634
7733
|
message: message
|
|
@@ -7658,7 +7757,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7658
7757
|
} : position.includes('right') ? {
|
|
7659
7758
|
justifyContent: 'flex-end'
|
|
7660
7759
|
} : {};
|
|
7661
|
-
return _extends$
|
|
7760
|
+
return _extends$z({
|
|
7662
7761
|
left: 0,
|
|
7663
7762
|
right: 0,
|
|
7664
7763
|
display: 'flex',
|
|
@@ -7685,7 +7784,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7685
7784
|
handlers = _useToaster.handlers;
|
|
7686
7785
|
|
|
7687
7786
|
return React.createElement("div", {
|
|
7688
|
-
style: _extends$
|
|
7787
|
+
style: _extends$z({
|
|
7689
7788
|
position: 'fixed',
|
|
7690
7789
|
zIndex: 9999,
|
|
7691
7790
|
top: DEFAULT_OFFSET,
|
|
@@ -7720,82 +7819,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7720
7819
|
}));
|
|
7721
7820
|
};
|
|
7722
7821
|
|
|
7723
|
-
var _path$
|
|
7822
|
+
var _path$w;
|
|
7724
7823
|
|
|
7725
|
-
function _extends$
|
|
7824
|
+
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
7825
|
|
|
7727
7826
|
function SvgCheckSolid(props) {
|
|
7728
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7827
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
7729
7828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7730
7829
|
className: "h-5 w-5",
|
|
7731
7830
|
viewBox: "0 0 20 20",
|
|
7732
7831
|
fill: "currentColor"
|
|
7733
|
-
}, props), _path$
|
|
7832
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7734
7833
|
fillRule: "evenodd",
|
|
7735
7834
|
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
7835
|
clipRule: "evenodd"
|
|
7737
7836
|
})));
|
|
7738
7837
|
}
|
|
7739
7838
|
|
|
7740
|
-
var _path$
|
|
7839
|
+
var _path$v;
|
|
7741
7840
|
|
|
7742
|
-
function _extends$
|
|
7841
|
+
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
7842
|
|
|
7744
7843
|
function SvgXIcon(props) {
|
|
7745
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7844
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
7746
7845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7747
7846
|
viewBox: "0 0 20 20",
|
|
7748
7847
|
fill: "currentColor"
|
|
7749
|
-
}, props), _path$
|
|
7848
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7750
7849
|
fill: "evenodd",
|
|
7751
7850
|
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
7851
|
clipRule: "evenodd"
|
|
7753
7852
|
})));
|
|
7754
7853
|
}
|
|
7755
7854
|
|
|
7756
|
-
var _path$
|
|
7855
|
+
var _path$u;
|
|
7757
7856
|
|
|
7758
|
-
function _extends$
|
|
7857
|
+
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
7858
|
|
|
7760
7859
|
function SvgXIconSolid(props) {
|
|
7761
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7860
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
7762
7861
|
className: "plc-w-4 plc-h-4",
|
|
7763
7862
|
fill: "currentColor",
|
|
7764
7863
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7765
7864
|
viewBox: "0 0 100 100"
|
|
7766
|
-
}, props), _path$
|
|
7865
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7767
7866
|
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
7867
|
})));
|
|
7769
7868
|
}
|
|
7770
7869
|
|
|
7771
|
-
var _path$
|
|
7870
|
+
var _path$t;
|
|
7772
7871
|
|
|
7773
|
-
function _extends$
|
|
7872
|
+
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
7873
|
|
|
7775
7874
|
function SvgExclamation(props) {
|
|
7776
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7875
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
7777
7876
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7778
7877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7779
7878
|
viewBox: "0 0 20 20",
|
|
7780
7879
|
fill: "currentColor"
|
|
7781
|
-
}, props), _path$
|
|
7880
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7782
7881
|
fillRule: "evenodd",
|
|
7783
7882
|
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
7883
|
clipRule: "evenodd"
|
|
7785
7884
|
})));
|
|
7786
7885
|
}
|
|
7787
7886
|
|
|
7788
|
-
var _path$
|
|
7887
|
+
var _path$s, _path2$4;
|
|
7789
7888
|
|
|
7790
|
-
function _extends$
|
|
7889
|
+
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
7890
|
|
|
7792
7891
|
function SvgSpinner(props) {
|
|
7793
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7892
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
7794
7893
|
className: "plc-animate-spin",
|
|
7795
7894
|
viewBox: "0 0 24 24",
|
|
7796
7895
|
fill: "currentColor",
|
|
7797
7896
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7798
|
-
}, props), _path$
|
|
7897
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7799
7898
|
opacity: 0.2,
|
|
7800
7899
|
fill: "evenodd",
|
|
7801
7900
|
clipRule: "evenodd",
|
|
@@ -8530,6 +8629,7 @@ var pure_1 = pure.loadStripe;
|
|
|
8530
8629
|
* @param {Object} error Error object
|
|
8531
8630
|
* @return {string}
|
|
8532
8631
|
*/
|
|
8632
|
+
|
|
8533
8633
|
const getErrorMessages = error => {
|
|
8534
8634
|
var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
|
|
8535
8635
|
|
|
@@ -8584,6 +8684,20 @@ const debounce = (func, waitTime) => {
|
|
|
8584
8684
|
timeout = setTimeout(later, waitTime);
|
|
8585
8685
|
};
|
|
8586
8686
|
};
|
|
8687
|
+
function getSiteCardProcessor() {
|
|
8688
|
+
var _window$Pelcro$site$r;
|
|
8689
|
+
|
|
8690
|
+
const {
|
|
8691
|
+
view
|
|
8692
|
+
} = usePelcro.getStore();
|
|
8693
|
+
const temp_ONLY_USE_VANTIV_WITH_SUBSCRIPTION_CREATE = view === "subscription-create";
|
|
8694
|
+
|
|
8695
|
+
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) {
|
|
8696
|
+
return "vantiv";
|
|
8697
|
+
}
|
|
8698
|
+
|
|
8699
|
+
return "stripe";
|
|
8700
|
+
}
|
|
8587
8701
|
|
|
8588
8702
|
/**
|
|
8589
8703
|
* @typedef {Object} OptionsType
|
|
@@ -8664,13 +8778,26 @@ const loadPaymentSDKs = () => {
|
|
|
8664
8778
|
if (!window.Stripe) {
|
|
8665
8779
|
pure_1(window.Pelcro.environment.stripe);
|
|
8666
8780
|
}
|
|
8667
|
-
}); // Load PayPal
|
|
8781
|
+
}); // Load PayPal SDKs
|
|
8668
8782
|
|
|
8669
8783
|
const supportsPaypal = Boolean(window.Pelcro.site.read().braintree_tokenization);
|
|
8670
8784
|
|
|
8671
8785
|
if (supportsPaypal) {
|
|
8672
8786
|
window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/client.min.js", "braintree-sdk");
|
|
8673
8787
|
window.Pelcro.helpers.loadSDK("https://js.braintreegateway.com/web/3.69.0/js/paypal-checkout.min.js", "braintree-paypal-sdk");
|
|
8788
|
+
} // Load Vantiv SDKs
|
|
8789
|
+
|
|
8790
|
+
|
|
8791
|
+
const supportsVantiv = Boolean(window.Pelcro.site.read().vantiv_pay_page_id);
|
|
8792
|
+
|
|
8793
|
+
if (supportsVantiv) {
|
|
8794
|
+
if (!window.jQuery) {
|
|
8795
|
+
window.Pelcro.helpers.loadSDK("https://code.jquery.com/jquery-3.6.0.slim.min.js", "vantiv-jquery-sdk");
|
|
8796
|
+
}
|
|
8797
|
+
|
|
8798
|
+
if (!window.EprotectIframeClient) {
|
|
8799
|
+
window.Pelcro.helpers.loadSDK("https://request.eprotect.vantivprelive.com/eProtect/js/eProtect-iframe-client.min.js", "vantiv-eprotect-sdk");
|
|
8800
|
+
}
|
|
8674
8801
|
}
|
|
8675
8802
|
};
|
|
8676
8803
|
const loadAuth0SDK = () => {
|
|
@@ -8829,6 +8956,10 @@ const initViewFromURL = () => {
|
|
|
8829
8956
|
return verifyEmailTokenFromUrl();
|
|
8830
8957
|
}
|
|
8831
8958
|
|
|
8959
|
+
if (view === "invoice-details") {
|
|
8960
|
+
return showInvoiceDetailsFromUrl();
|
|
8961
|
+
}
|
|
8962
|
+
|
|
8832
8963
|
switchView(view);
|
|
8833
8964
|
});
|
|
8834
8965
|
}
|
|
@@ -9005,6 +9136,43 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
9005
9136
|
});
|
|
9006
9137
|
};
|
|
9007
9138
|
|
|
9139
|
+
const showInvoiceDetailsFromUrl = () => {
|
|
9140
|
+
const {
|
|
9141
|
+
isAuthenticated,
|
|
9142
|
+
setInvoice,
|
|
9143
|
+
whenSiteReady,
|
|
9144
|
+
switchView
|
|
9145
|
+
} = usePelcro.getStore();
|
|
9146
|
+
whenSiteReady(() => {
|
|
9147
|
+
if (!isAuthenticated()) {
|
|
9148
|
+
return switchView("login");
|
|
9149
|
+
}
|
|
9150
|
+
|
|
9151
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9152
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9153
|
+
|
|
9154
|
+
if (!wasSetSuccessfully) {
|
|
9155
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9156
|
+
returnObjects: true
|
|
9157
|
+
});
|
|
9158
|
+
return notify.error(errorMessage);
|
|
9159
|
+
}
|
|
9160
|
+
|
|
9161
|
+
const {
|
|
9162
|
+
invoice
|
|
9163
|
+
} = usePelcro.getStore();
|
|
9164
|
+
|
|
9165
|
+
if (invoice.total === 0) {
|
|
9166
|
+
const errorMessage = i18next.t("messages:zeroTotalInvoice", {
|
|
9167
|
+
returnObjects: true
|
|
9168
|
+
});
|
|
9169
|
+
return notify.error(errorMessage);
|
|
9170
|
+
}
|
|
9171
|
+
|
|
9172
|
+
return switchView("invoice-details");
|
|
9173
|
+
});
|
|
9174
|
+
};
|
|
9175
|
+
|
|
9008
9176
|
const defaultOptions = {
|
|
9009
9177
|
loadPaymentSDKs: true,
|
|
9010
9178
|
loadAuth0SDK: true,
|
|
@@ -9344,7 +9512,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9344
9512
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9345
9513
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9346
9514
|
|
|
9347
|
-
const initialState$
|
|
9515
|
+
const initialState$h = {
|
|
9348
9516
|
email: "",
|
|
9349
9517
|
password: "",
|
|
9350
9518
|
emailError: null,
|
|
@@ -9355,10 +9523,10 @@ const initialState$g = {
|
|
|
9355
9523
|
content: ""
|
|
9356
9524
|
}
|
|
9357
9525
|
};
|
|
9358
|
-
const store$
|
|
9526
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
9359
9527
|
const {
|
|
9360
|
-
Provider: Provider$
|
|
9361
|
-
} = store$
|
|
9528
|
+
Provider: Provider$h
|
|
9529
|
+
} = store$h;
|
|
9362
9530
|
|
|
9363
9531
|
const LoginContainer = ({
|
|
9364
9532
|
style,
|
|
@@ -9465,7 +9633,7 @@ const LoginContainer = ({
|
|
|
9465
9633
|
});
|
|
9466
9634
|
|
|
9467
9635
|
case RESET_LOGIN_FORM:
|
|
9468
|
-
return initialState$
|
|
9636
|
+
return initialState$h;
|
|
9469
9637
|
|
|
9470
9638
|
case DISABLE_LOGIN_BUTTON:
|
|
9471
9639
|
return lib_7({ ...state,
|
|
@@ -9483,12 +9651,12 @@ const LoginContainer = ({
|
|
|
9483
9651
|
default:
|
|
9484
9652
|
return state;
|
|
9485
9653
|
}
|
|
9486
|
-
}, initialState$
|
|
9654
|
+
}, initialState$h);
|
|
9487
9655
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9488
9656
|
style: { ...style
|
|
9489
9657
|
},
|
|
9490
9658
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9491
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
9659
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
9492
9660
|
value: {
|
|
9493
9661
|
state,
|
|
9494
9662
|
dispatch
|
|
@@ -9496,12 +9664,12 @@ const LoginContainer = ({
|
|
|
9496
9664
|
}, children.length ? children.map((child, i) => {
|
|
9497
9665
|
if (child) {
|
|
9498
9666
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9499
|
-
store: store$
|
|
9667
|
+
store: store$h,
|
|
9500
9668
|
key: i
|
|
9501
9669
|
});
|
|
9502
9670
|
}
|
|
9503
9671
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
9504
|
-
store: store$
|
|
9672
|
+
store: store$h
|
|
9505
9673
|
})));
|
|
9506
9674
|
};
|
|
9507
9675
|
|
|
@@ -9746,7 +9914,7 @@ const LoginButton = ({
|
|
|
9746
9914
|
buttonDisabled
|
|
9747
9915
|
},
|
|
9748
9916
|
dispatch
|
|
9749
|
-
} = React.useContext(store$
|
|
9917
|
+
} = React.useContext(store$h);
|
|
9750
9918
|
const {
|
|
9751
9919
|
t
|
|
9752
9920
|
} = useTranslation("login");
|
|
@@ -9767,23 +9935,23 @@ const LoginButton = ({
|
|
|
9767
9935
|
};
|
|
9768
9936
|
|
|
9769
9937
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
9770
|
-
store: store$
|
|
9938
|
+
store: store$h
|
|
9771
9939
|
}, props));
|
|
9772
9940
|
|
|
9773
9941
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
9774
|
-
store: store$
|
|
9942
|
+
store: store$h
|
|
9775
9943
|
}, props));
|
|
9776
9944
|
|
|
9777
|
-
var _path$
|
|
9945
|
+
var _path$r;
|
|
9778
9946
|
|
|
9779
|
-
function _extends$
|
|
9947
|
+
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
9948
|
|
|
9781
9949
|
function SvgCheck(props) {
|
|
9782
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9950
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
9783
9951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9784
9952
|
fill: "currentColor",
|
|
9785
9953
|
viewBox: "0 0 20 20"
|
|
9786
|
-
}, props), _path$
|
|
9954
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9787
9955
|
fillRule: "evenodd",
|
|
9788
9956
|
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
9957
|
clipRule: "evenodd"
|
|
@@ -9848,7 +10016,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9848
10016
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9849
10017
|
facebookLoginRenderProps.FacebookLogin;
|
|
9850
10018
|
|
|
9851
|
-
const initialState$
|
|
10019
|
+
const initialState$g = {
|
|
9852
10020
|
email: "",
|
|
9853
10021
|
password: "",
|
|
9854
10022
|
emailError: null,
|
|
@@ -9865,10 +10033,10 @@ const initialState$f = {
|
|
|
9865
10033
|
content: ""
|
|
9866
10034
|
}
|
|
9867
10035
|
};
|
|
9868
|
-
const store$
|
|
10036
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
9869
10037
|
const {
|
|
9870
|
-
Provider: Provider$
|
|
9871
|
-
} = store$
|
|
10038
|
+
Provider: Provider$g
|
|
10039
|
+
} = store$g;
|
|
9872
10040
|
|
|
9873
10041
|
const RegisterContainer = ({
|
|
9874
10042
|
style,
|
|
@@ -10051,7 +10219,7 @@ const RegisterContainer = ({
|
|
|
10051
10219
|
});
|
|
10052
10220
|
|
|
10053
10221
|
case RESET_LOGIN_FORM:
|
|
10054
|
-
return initialState$
|
|
10222
|
+
return initialState$g;
|
|
10055
10223
|
|
|
10056
10224
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10057
10225
|
return lib_7({ ...state,
|
|
@@ -10069,12 +10237,12 @@ const RegisterContainer = ({
|
|
|
10069
10237
|
default:
|
|
10070
10238
|
return state;
|
|
10071
10239
|
}
|
|
10072
|
-
}, initialState$
|
|
10240
|
+
}, initialState$g);
|
|
10073
10241
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10074
10242
|
style: { ...style
|
|
10075
10243
|
},
|
|
10076
10244
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10077
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
10245
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
10078
10246
|
value: {
|
|
10079
10247
|
state,
|
|
10080
10248
|
dispatch
|
|
@@ -10082,12 +10250,12 @@ const RegisterContainer = ({
|
|
|
10082
10250
|
}, children.length ? children.map((child, i) => {
|
|
10083
10251
|
if (child) {
|
|
10084
10252
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
10085
|
-
store: store$
|
|
10253
|
+
store: store$g,
|
|
10086
10254
|
key: i
|
|
10087
10255
|
});
|
|
10088
10256
|
}
|
|
10089
10257
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
10090
|
-
store: store$
|
|
10258
|
+
store: store$g
|
|
10091
10259
|
})));
|
|
10092
10260
|
};
|
|
10093
10261
|
/**
|
|
@@ -10102,15 +10270,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10102
10270
|
return hasSecuritySdkLoaded;
|
|
10103
10271
|
}
|
|
10104
10272
|
|
|
10105
|
-
var _path$
|
|
10273
|
+
var _path$q;
|
|
10106
10274
|
|
|
10107
|
-
function _extends$
|
|
10275
|
+
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
10276
|
|
|
10109
10277
|
function SvgFacebookLogo(props) {
|
|
10110
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10278
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
10111
10279
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10112
10280
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10113
|
-
}, props), _path$
|
|
10281
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10114
10282
|
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
10283
|
fill: "#3c5a9a"
|
|
10116
10284
|
})));
|
|
@@ -10127,10 +10295,10 @@ const FacebookLoginButton = ({
|
|
|
10127
10295
|
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
10296
|
const {
|
|
10129
10297
|
dispatch: loginDispatch
|
|
10130
|
-
} = React.useContext(store$
|
|
10298
|
+
} = React.useContext(store$h);
|
|
10131
10299
|
const {
|
|
10132
10300
|
dispatch: registerDispatch
|
|
10133
|
-
} = React.useContext(store$
|
|
10301
|
+
} = React.useContext(store$g);
|
|
10134
10302
|
|
|
10135
10303
|
const onSuccess = facebookUser => {
|
|
10136
10304
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10183,15 +10351,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10183
10351
|
unwrapExports(googleLogin);
|
|
10184
10352
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10185
10353
|
|
|
10186
|
-
var _path$
|
|
10354
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10187
10355
|
|
|
10188
|
-
function _extends$
|
|
10356
|
+
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
10357
|
|
|
10190
10358
|
function SvgGoogleLogo(props) {
|
|
10191
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10359
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
10192
10360
|
viewBox: "0 0 24 24",
|
|
10193
10361
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10194
|
-
}, props), _path$
|
|
10362
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10195
10363
|
fill: "#4285F4",
|
|
10196
10364
|
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
10365
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10217,10 +10385,10 @@ const GoogleLoginButton = ({
|
|
|
10217
10385
|
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
10386
|
const {
|
|
10219
10387
|
dispatch: loginDispatch
|
|
10220
|
-
} = React.useContext(store$
|
|
10388
|
+
} = React.useContext(store$h);
|
|
10221
10389
|
const {
|
|
10222
10390
|
dispatch: registerDispatch
|
|
10223
|
-
} = React.useContext(store$
|
|
10391
|
+
} = React.useContext(store$g);
|
|
10224
10392
|
|
|
10225
10393
|
const onSuccess = response => {
|
|
10226
10394
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10268,15 +10436,15 @@ const GoogleLoginButton = ({
|
|
|
10268
10436
|
}) : null;
|
|
10269
10437
|
};
|
|
10270
10438
|
|
|
10271
|
-
var _path$
|
|
10439
|
+
var _path$o;
|
|
10272
10440
|
|
|
10273
|
-
function _extends$
|
|
10441
|
+
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
10442
|
|
|
10275
10443
|
function SvgAuth0Logo(props) {
|
|
10276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10444
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10277
10445
|
viewBox: "0 0 256 285",
|
|
10278
10446
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10279
|
-
}, props), _path$
|
|
10447
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10280
10448
|
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
10449
|
})));
|
|
10282
10450
|
}
|
|
@@ -10288,26 +10456,43 @@ const Auth0LoginButton = ({
|
|
|
10288
10456
|
iconClassName = ""
|
|
10289
10457
|
}) => {
|
|
10290
10458
|
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
10459
|
+
const auth0Script = document.querySelector("#auth0-sdk");
|
|
10460
|
+
const [auth0Loaded, setAuth0Loaded] = React.useState(Boolean(window.auth0));
|
|
10461
|
+
React__default['default'].useEffect(() => {
|
|
10462
|
+
function handleScriptLoaded() {
|
|
10463
|
+
setAuth0Loaded(true);
|
|
10464
|
+
}
|
|
10465
|
+
|
|
10466
|
+
if (auth0Enabled && !auth0Loaded) {
|
|
10467
|
+
auth0Script.addEventListener("load", handleScriptLoaded);
|
|
10468
|
+
}
|
|
10469
|
+
|
|
10470
|
+
return () => {
|
|
10471
|
+
var _auth0Script$removeEv;
|
|
10472
|
+
|
|
10473
|
+
auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
|
|
10474
|
+
};
|
|
10475
|
+
}, [auth0Script, auth0Enabled, auth0Loaded]);
|
|
10291
10476
|
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
10292
10477
|
React__default['default'].useEffect(() => {
|
|
10293
|
-
if (auth0Enabled &&
|
|
10478
|
+
if (auth0Enabled && auth0Loaded && auth0InstanceRef.current === null) {
|
|
10294
10479
|
auth0InstanceRef.current = new window.auth0.WebAuth({
|
|
10295
10480
|
domain: window.Pelcro.site.read().auth0_base_url,
|
|
10296
10481
|
clientID: window.Pelcro.site.read().auth0_client_id
|
|
10297
10482
|
});
|
|
10298
10483
|
}
|
|
10299
|
-
}, [auth0Enabled,
|
|
10484
|
+
}, [auth0Enabled, auth0Loaded]);
|
|
10300
10485
|
const {
|
|
10301
10486
|
dispatch: loginDispatch
|
|
10302
|
-
} = React.useContext(store$
|
|
10487
|
+
} = React.useContext(store$h);
|
|
10303
10488
|
const {
|
|
10304
10489
|
dispatch: registerDispatch
|
|
10305
|
-
} = React.useContext(store$
|
|
10490
|
+
} = React.useContext(store$g);
|
|
10306
10491
|
|
|
10307
10492
|
function handleClick() {
|
|
10308
10493
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
10309
10494
|
|
|
10310
|
-
if (!
|
|
10495
|
+
if (!auth0Loaded) {
|
|
10311
10496
|
return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10312
10497
|
}
|
|
10313
10498
|
|
|
@@ -10435,15 +10620,15 @@ function LoginView(props) {
|
|
|
10435
10620
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10436
10621
|
}
|
|
10437
10622
|
|
|
10438
|
-
var _path$
|
|
10623
|
+
var _path$n, _path2$2, _path3;
|
|
10439
10624
|
|
|
10440
|
-
function _extends$
|
|
10625
|
+
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
10626
|
|
|
10442
10627
|
function SvgPelcroAuthorship(props) {
|
|
10443
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10628
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10444
10629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10445
10630
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10446
|
-
}, props), _path$
|
|
10631
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10447
10632
|
fill: "none",
|
|
10448
10633
|
stroke: "#4a4a4a",
|
|
10449
10634
|
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 +10775,11 @@ function LoginModal({
|
|
|
10590
10775
|
LoginModal.viewId = "login";
|
|
10591
10776
|
|
|
10592
10777
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
10593
|
-
store: store$
|
|
10778
|
+
store: store$g
|
|
10594
10779
|
}, props));
|
|
10595
10780
|
|
|
10596
10781
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
10597
|
-
store: store$
|
|
10782
|
+
store: store$g
|
|
10598
10783
|
}, props));
|
|
10599
10784
|
|
|
10600
10785
|
const RegisterButton = ({
|
|
@@ -10614,7 +10799,7 @@ const RegisterButton = ({
|
|
|
10614
10799
|
buttonDisabled
|
|
10615
10800
|
},
|
|
10616
10801
|
dispatch
|
|
10617
|
-
} = React.useContext(store$
|
|
10802
|
+
} = React.useContext(store$g);
|
|
10618
10803
|
const {
|
|
10619
10804
|
t
|
|
10620
10805
|
} = useTranslation("register");
|
|
@@ -10752,7 +10937,7 @@ function FirstName({
|
|
|
10752
10937
|
}
|
|
10753
10938
|
|
|
10754
10939
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
10755
|
-
store: store$
|
|
10940
|
+
store: store$g
|
|
10756
10941
|
}, props));
|
|
10757
10942
|
|
|
10758
10943
|
function LastName({
|
|
@@ -10783,7 +10968,7 @@ function LastName({
|
|
|
10783
10968
|
}
|
|
10784
10969
|
|
|
10785
10970
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
10786
|
-
store: store$
|
|
10971
|
+
store: store$g
|
|
10787
10972
|
}, props));
|
|
10788
10973
|
|
|
10789
10974
|
/**
|
|
@@ -10907,7 +11092,7 @@ function TextInput({
|
|
|
10907
11092
|
|
|
10908
11093
|
const RegisterTextInput = props => {
|
|
10909
11094
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
10910
|
-
store: store$
|
|
11095
|
+
store: store$g
|
|
10911
11096
|
}));
|
|
10912
11097
|
};
|
|
10913
11098
|
|
|
@@ -12576,7 +12761,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12576
12761
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12577
12762
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12578
12763
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12579
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12764
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12765
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12580
12766
|
};
|
|
12581
12767
|
|
|
12582
12768
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12586,7 +12772,7 @@ var _generateUserError = /*#__PURE__*/new WeakMap();
|
|
|
12586
12772
|
class Subscription {
|
|
12587
12773
|
/**
|
|
12588
12774
|
* Subscription service constructor
|
|
12589
|
-
* @param {(StripeGateway|
|
|
12775
|
+
* @param {(StripeGateway|PaypalGateway|VantivGateway)} paymentGateway
|
|
12590
12776
|
*/
|
|
12591
12777
|
constructor(paymentGateway) {
|
|
12592
12778
|
_defineProperty$3(this, "execute", (options, callback) => {
|
|
@@ -12607,7 +12793,7 @@ class Subscription {
|
|
|
12607
12793
|
_isPaymentGatewayInvalid.set(this, {
|
|
12608
12794
|
writable: true,
|
|
12609
12795
|
value: gateway => {
|
|
12610
|
-
return gateway && !(gateway instanceof StripeGateway
|
|
12796
|
+
return gateway && !(gateway instanceof StripeGateway || gateway instanceof PaypalGateway || gateway instanceof VantivGateway);
|
|
12611
12797
|
}
|
|
12612
12798
|
});
|
|
12613
12799
|
|
|
@@ -12638,6 +12824,8 @@ class Subscription {
|
|
|
12638
12824
|
* @property {number} [subscriptionIdToRenew]
|
|
12639
12825
|
* @property {number} [quantity]
|
|
12640
12826
|
* @property {string} addressId
|
|
12827
|
+
* @property {number} invoiceId
|
|
12828
|
+
* @property {boolean} isExistingSource
|
|
12641
12829
|
*/
|
|
12642
12830
|
|
|
12643
12831
|
/**
|
|
@@ -12658,7 +12846,8 @@ class Subscription {
|
|
|
12658
12846
|
}
|
|
12659
12847
|
const PAYMENT_GATEWAYS_ENUM = {
|
|
12660
12848
|
stripe: "stripe",
|
|
12661
|
-
paypal: "braintree"
|
|
12849
|
+
paypal: "braintree",
|
|
12850
|
+
vantiv: "vantiv"
|
|
12662
12851
|
};
|
|
12663
12852
|
/**
|
|
12664
12853
|
* Subscription Strategies
|
|
@@ -12678,6 +12867,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12678
12867
|
|
|
12679
12868
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12680
12869
|
|
|
12870
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12871
|
+
|
|
12681
12872
|
class StripeGateway {
|
|
12682
12873
|
constructor() {
|
|
12683
12874
|
_paymentGateway.set(this, {
|
|
@@ -12701,6 +12892,9 @@ class StripeGateway {
|
|
|
12701
12892
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12702
12893
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12703
12894
|
|
|
12895
|
+
case types.PAY_INVOICE:
|
|
12896
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12897
|
+
|
|
12704
12898
|
default:
|
|
12705
12899
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12706
12900
|
}
|
|
@@ -12809,6 +13003,27 @@ class StripeGateway {
|
|
|
12809
13003
|
});
|
|
12810
13004
|
}
|
|
12811
13005
|
});
|
|
13006
|
+
|
|
13007
|
+
_payInvoice.set(this, {
|
|
13008
|
+
writable: true,
|
|
13009
|
+
value: (options, callback) => {
|
|
13010
|
+
const {
|
|
13011
|
+
token,
|
|
13012
|
+
invoiceId
|
|
13013
|
+
} = options;
|
|
13014
|
+
const params = options.isExistingSource ? {
|
|
13015
|
+
source_id: token,
|
|
13016
|
+
invoice_id: invoiceId
|
|
13017
|
+
} : {
|
|
13018
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
13019
|
+
gateway_token: token,
|
|
13020
|
+
invoice_id: invoiceId
|
|
13021
|
+
};
|
|
13022
|
+
window.Pelcro.invoice.pay(params, (err, res) => {
|
|
13023
|
+
callback(err, res);
|
|
13024
|
+
});
|
|
13025
|
+
}
|
|
13026
|
+
});
|
|
12812
13027
|
}
|
|
12813
13028
|
|
|
12814
13029
|
}
|
|
@@ -12822,7 +13037,9 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12822
13037
|
|
|
12823
13038
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12824
13039
|
|
|
12825
|
-
|
|
13040
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
13041
|
+
|
|
13042
|
+
class PaypalGateway {
|
|
12826
13043
|
constructor() {
|
|
12827
13044
|
_paymentGateway2.set(this, {
|
|
12828
13045
|
writable: true,
|
|
@@ -12839,6 +13056,9 @@ class PaypalGateWay {
|
|
|
12839
13056
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12840
13057
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12841
13058
|
|
|
13059
|
+
case types.PAY_INVOICE:
|
|
13060
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
13061
|
+
|
|
12842
13062
|
default:
|
|
12843
13063
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12844
13064
|
}
|
|
@@ -12899,6 +13119,74 @@ class PaypalGateWay {
|
|
|
12899
13119
|
});
|
|
12900
13120
|
}
|
|
12901
13121
|
});
|
|
13122
|
+
|
|
13123
|
+
_payInvoice2.set(this, {
|
|
13124
|
+
writable: true,
|
|
13125
|
+
value: (options, callback) => {
|
|
13126
|
+
const {
|
|
13127
|
+
token,
|
|
13128
|
+
invoiceId
|
|
13129
|
+
} = options;
|
|
13130
|
+
window.Pelcro.invoice.pay({
|
|
13131
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13132
|
+
gateway_token: token,
|
|
13133
|
+
invoice_id: invoiceId
|
|
13134
|
+
}, (err, res) => {
|
|
13135
|
+
callback(err, res);
|
|
13136
|
+
});
|
|
13137
|
+
}
|
|
13138
|
+
});
|
|
13139
|
+
}
|
|
13140
|
+
|
|
13141
|
+
}
|
|
13142
|
+
|
|
13143
|
+
var _paymentGateway3 = /*#__PURE__*/new WeakMap();
|
|
13144
|
+
|
|
13145
|
+
var _createSubscription3 = /*#__PURE__*/new WeakMap();
|
|
13146
|
+
|
|
13147
|
+
class VantivGateway {
|
|
13148
|
+
constructor() {
|
|
13149
|
+
_paymentGateway3.set(this, {
|
|
13150
|
+
writable: true,
|
|
13151
|
+
value: PAYMENT_GATEWAYS_ENUM["vantiv"]
|
|
13152
|
+
});
|
|
13153
|
+
|
|
13154
|
+
_defineProperty$3(this, "execute", (options, callback) => {
|
|
13155
|
+
const types = SUBSCRIPTION_TYPES;
|
|
13156
|
+
|
|
13157
|
+
switch (options.type) {
|
|
13158
|
+
case types.CREATE_SUBSCRIPTION:
|
|
13159
|
+
return _classPrivateFieldGet(this, _createSubscription3).call(this, options, callback);
|
|
13160
|
+
|
|
13161
|
+
default:
|
|
13162
|
+
console.error("Unsupported subscriptiion method: vantiv Gateway");
|
|
13163
|
+
}
|
|
13164
|
+
});
|
|
13165
|
+
|
|
13166
|
+
_createSubscription3.set(this, {
|
|
13167
|
+
writable: true,
|
|
13168
|
+
value: (options, callback) => {
|
|
13169
|
+
const {
|
|
13170
|
+
token,
|
|
13171
|
+
plan,
|
|
13172
|
+
couponCode,
|
|
13173
|
+
product,
|
|
13174
|
+
quantity = 1,
|
|
13175
|
+
addressId
|
|
13176
|
+
} = options;
|
|
13177
|
+
window.Pelcro.subscription.create({
|
|
13178
|
+
quantity,
|
|
13179
|
+
gateway_token: token,
|
|
13180
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway3),
|
|
13181
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
13182
|
+
plan_id: plan.id,
|
|
13183
|
+
coupon_code: couponCode,
|
|
13184
|
+
address_id: product.address_required ? addressId : null
|
|
13185
|
+
}, (err, res) => {
|
|
13186
|
+
callback(err, res);
|
|
13187
|
+
});
|
|
13188
|
+
}
|
|
13189
|
+
});
|
|
12902
13190
|
}
|
|
12903
13191
|
|
|
12904
13192
|
}
|
|
@@ -12923,7 +13211,7 @@ class PaypalGateWay {
|
|
|
12923
13211
|
|
|
12924
13212
|
/** @type {PaymentStateType} */
|
|
12925
13213
|
|
|
12926
|
-
const initialState$
|
|
13214
|
+
const initialState$f = {
|
|
12927
13215
|
disableSubmit: false,
|
|
12928
13216
|
isLoading: false,
|
|
12929
13217
|
disableCouponButton: false,
|
|
@@ -12942,10 +13230,10 @@ const initialState$e = {
|
|
|
12942
13230
|
content: ""
|
|
12943
13231
|
}
|
|
12944
13232
|
};
|
|
12945
|
-
const store$
|
|
13233
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
12946
13234
|
const {
|
|
12947
|
-
Provider: Provider$
|
|
12948
|
-
} = store$
|
|
13235
|
+
Provider: Provider$f
|
|
13236
|
+
} = store$f;
|
|
12949
13237
|
|
|
12950
13238
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12951
13239
|
style,
|
|
@@ -12958,7 +13246,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12958
13246
|
onFailure = () => {},
|
|
12959
13247
|
...props
|
|
12960
13248
|
}) => {
|
|
12961
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13249
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12962
13250
|
|
|
12963
13251
|
const {
|
|
12964
13252
|
t
|
|
@@ -12975,6 +13263,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12975
13263
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12976
13264
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12977
13265
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13266
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12978
13267
|
React.useEffect(() => {
|
|
12979
13268
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12980
13269
|
dispatch({
|
|
@@ -12989,6 +13278,78 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12989
13278
|
updateTotalAmountWithTax();
|
|
12990
13279
|
}, []);
|
|
12991
13280
|
|
|
13281
|
+
function submitVantivPayment() {
|
|
13282
|
+
if (!vantivInstanceRef.current) {
|
|
13283
|
+
return console.error("Vantiv sdk script wasn't loaded, you need to load vantiv sdk before rendering the vantiv payment flow");
|
|
13284
|
+
}
|
|
13285
|
+
|
|
13286
|
+
const orderId = `pelcro-${new Date().getTime()}`; // calls handleVantivPayment
|
|
13287
|
+
|
|
13288
|
+
vantivInstanceRef.current.getPaypageRegistrationId({
|
|
13289
|
+
id: orderId,
|
|
13290
|
+
orderId: orderId
|
|
13291
|
+
});
|
|
13292
|
+
}
|
|
13293
|
+
|
|
13294
|
+
function handleVantivPayment(paymentRequest) {
|
|
13295
|
+
const SUCCESS_STATUS = "870";
|
|
13296
|
+
|
|
13297
|
+
if (paymentRequest.response !== SUCCESS_STATUS) {
|
|
13298
|
+
return handlePaymentError({
|
|
13299
|
+
error: new Error(paymentRequest.message)
|
|
13300
|
+
});
|
|
13301
|
+
}
|
|
13302
|
+
|
|
13303
|
+
const subscription = new Subscription(new VantivGateway());
|
|
13304
|
+
const {
|
|
13305
|
+
couponCode
|
|
13306
|
+
} = state;
|
|
13307
|
+
return subscription.execute({
|
|
13308
|
+
type: SUBSCRIPTION_TYPES.CREATE_SUBSCRIPTION,
|
|
13309
|
+
token: paymentRequest,
|
|
13310
|
+
quantity: plan.quantity,
|
|
13311
|
+
plan,
|
|
13312
|
+
couponCode,
|
|
13313
|
+
product,
|
|
13314
|
+
addressId: selectedAddressId
|
|
13315
|
+
}, (err, res) => {
|
|
13316
|
+
if (err) {
|
|
13317
|
+
return handlePaymentError(err);
|
|
13318
|
+
}
|
|
13319
|
+
|
|
13320
|
+
onSuccess(res);
|
|
13321
|
+
});
|
|
13322
|
+
}
|
|
13323
|
+
|
|
13324
|
+
const vantivInstanceRef = React__default['default'].useRef(null);
|
|
13325
|
+
React.useEffect(() => {
|
|
13326
|
+
const cardProcessor = getSiteCardProcessor();
|
|
13327
|
+
|
|
13328
|
+
if (cardProcessor === "vantiv") {
|
|
13329
|
+
var _window$Pelcro$site$r;
|
|
13330
|
+
|
|
13331
|
+
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;
|
|
13332
|
+
vantivInstanceRef.current = new window.EprotectIframeClient({
|
|
13333
|
+
paypageId: payPageId,
|
|
13334
|
+
reportGroup: payPageId,
|
|
13335
|
+
style: "pelcro",
|
|
13336
|
+
height: "245",
|
|
13337
|
+
timeout: 50000,
|
|
13338
|
+
div: "eProtectiframe",
|
|
13339
|
+
callback: handleVantivPayment,
|
|
13340
|
+
showCvv: true,
|
|
13341
|
+
numYears: 8,
|
|
13342
|
+
placeholderText: {
|
|
13343
|
+
cvv: "CVV",
|
|
13344
|
+
accountNumber: "1234 1234 1234 1234"
|
|
13345
|
+
},
|
|
13346
|
+
enhancedUxFeatures: {
|
|
13347
|
+
inlineFieldValidations: true
|
|
13348
|
+
}
|
|
13349
|
+
});
|
|
13350
|
+
}
|
|
13351
|
+
}, []);
|
|
13352
|
+
|
|
12992
13353
|
const initPaymentRequest = (state, dispatch) => {
|
|
12993
13354
|
try {
|
|
12994
13355
|
const paymentRequest = stripe.paymentRequest({
|
|
@@ -13059,9 +13420,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13059
13420
|
|
|
13060
13421
|
|
|
13061
13422
|
const updateTotalAmountWithTax = () => {
|
|
13062
|
-
var _window$Pelcro$site$
|
|
13423
|
+
var _window$Pelcro$site$r2;
|
|
13063
13424
|
|
|
13064
|
-
const taxesEnabled = (_window$Pelcro$site$
|
|
13425
|
+
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
13426
|
|
|
13066
13427
|
if (taxesEnabled && type === "createPayment") {
|
|
13067
13428
|
dispatch({
|
|
@@ -13411,7 +13772,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13411
13772
|
|
|
13412
13773
|
|
|
13413
13774
|
const handlePaypalSubscription = (state, paypalNonce) => {
|
|
13414
|
-
const subscription = new Subscription(new
|
|
13775
|
+
const subscription = new Subscription(new PaypalGateway());
|
|
13415
13776
|
const {
|
|
13416
13777
|
couponCode
|
|
13417
13778
|
} = state;
|
|
@@ -13543,6 +13904,38 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13543
13904
|
});
|
|
13544
13905
|
};
|
|
13545
13906
|
|
|
13907
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13908
|
+
const subscription = new Subscription(gatewayService);
|
|
13909
|
+
return subscription.execute({
|
|
13910
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13911
|
+
token: gatewayToken,
|
|
13912
|
+
isExistingSource: Boolean(selectedPaymentMethodId),
|
|
13913
|
+
invoiceId: invoice.id
|
|
13914
|
+
}, (err, res) => {
|
|
13915
|
+
dispatch({
|
|
13916
|
+
type: DISABLE_SUBMIT,
|
|
13917
|
+
payload: false
|
|
13918
|
+
});
|
|
13919
|
+
dispatch({
|
|
13920
|
+
type: LOADING,
|
|
13921
|
+
payload: false
|
|
13922
|
+
});
|
|
13923
|
+
|
|
13924
|
+
if (err) {
|
|
13925
|
+
onFailure(err);
|
|
13926
|
+
return dispatch({
|
|
13927
|
+
type: SHOW_ALERT,
|
|
13928
|
+
payload: {
|
|
13929
|
+
type: "error",
|
|
13930
|
+
content: getErrorMessages(err)
|
|
13931
|
+
}
|
|
13932
|
+
});
|
|
13933
|
+
}
|
|
13934
|
+
|
|
13935
|
+
onSuccess(res);
|
|
13936
|
+
});
|
|
13937
|
+
};
|
|
13938
|
+
|
|
13546
13939
|
const updatePaymentSource = (state, dispatch) => {
|
|
13547
13940
|
return stripe.createSource({
|
|
13548
13941
|
type: "card"
|
|
@@ -13617,13 +14010,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13617
14010
|
source,
|
|
13618
14011
|
error
|
|
13619
14012
|
}) => {
|
|
13620
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
14013
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13621
14014
|
|
|
13622
14015
|
if (error) {
|
|
13623
14016
|
return handlePaymentError(error);
|
|
13624
14017
|
}
|
|
13625
14018
|
|
|
13626
14019
|
const getOrderItemsTotal = () => {
|
|
14020
|
+
if (!order) {
|
|
14021
|
+
return null;
|
|
14022
|
+
}
|
|
14023
|
+
|
|
13627
14024
|
const isQuickPurchase = !Array.isArray(order);
|
|
13628
14025
|
|
|
13629
14026
|
if (isQuickPurchase) {
|
|
@@ -13639,7 +14036,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13639
14036
|
}, 0);
|
|
13640
14037
|
};
|
|
13641
14038
|
|
|
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();
|
|
14039
|
+
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
14040
|
|
|
13644
14041
|
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
14042
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13670,9 +14067,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13670
14067
|
|
|
13671
14068
|
|
|
13672
14069
|
const resolveTaxCalculation = () => {
|
|
13673
|
-
var _window$Pelcro$site$
|
|
14070
|
+
var _window$Pelcro$site$r3;
|
|
13674
14071
|
|
|
13675
|
-
|
|
14072
|
+
if (type === "invoicePayment") {
|
|
14073
|
+
return new Promise(resolve => resolve());
|
|
14074
|
+
}
|
|
14075
|
+
|
|
14076
|
+
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
14077
|
return new Promise((resolve, reject) => {
|
|
13677
14078
|
// resolve early if taxes isn't enabled
|
|
13678
14079
|
if (!taxesEnabled) {
|
|
@@ -13745,10 +14146,14 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13745
14146
|
subscribe(stripeSource, state, dispatch);
|
|
13746
14147
|
} else if (stripeSource && type === "orderCreate") {
|
|
13747
14148
|
purchase(stripeSource, state, dispatch);
|
|
14149
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
14150
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13748
14151
|
}
|
|
13749
14152
|
};
|
|
13750
14153
|
|
|
13751
14154
|
const handlePaymentError = error => {
|
|
14155
|
+
var _getErrorMessages;
|
|
14156
|
+
|
|
13752
14157
|
if (error.type === "validation_error" && // Subscription creation & renewal
|
|
13753
14158
|
type === "createPayment") {
|
|
13754
14159
|
var _state$couponObject;
|
|
@@ -13767,7 +14172,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13767
14172
|
type: SHOW_ALERT,
|
|
13768
14173
|
payload: {
|
|
13769
14174
|
type: "error",
|
|
13770
|
-
content: error === null || error === void 0 ? void 0 : error.message
|
|
14175
|
+
content: (_getErrorMessages = getErrorMessages(error)) !== null && _getErrorMessages !== void 0 ? _getErrorMessages : error === null || error === void 0 ? void 0 : error.message
|
|
13771
14176
|
}
|
|
13772
14177
|
});
|
|
13773
14178
|
dispatch({
|
|
@@ -13871,14 +14276,24 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13871
14276
|
}
|
|
13872
14277
|
|
|
13873
14278
|
if (type === "updatePaymentSource") {
|
|
13874
|
-
updatePaymentSource(state, dispatch);
|
|
13875
|
-
} else {
|
|
13876
|
-
submitPayment(state);
|
|
14279
|
+
return updatePaymentSource(state, dispatch);
|
|
13877
14280
|
}
|
|
14281
|
+
|
|
14282
|
+
if (getSiteCardProcessor() === "vantiv") {
|
|
14283
|
+
return submitVantivPayment();
|
|
14284
|
+
}
|
|
14285
|
+
|
|
14286
|
+
submitPayment(state);
|
|
13878
14287
|
});
|
|
13879
14288
|
|
|
13880
14289
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13881
|
-
return lib_5(state, () =>
|
|
14290
|
+
return lib_5(state, (state, dispatch) => {
|
|
14291
|
+
if (type === "invoicePayment") {
|
|
14292
|
+
payInvoice(new PaypalGateway(), action.payload, dispatch);
|
|
14293
|
+
} else {
|
|
14294
|
+
handlePaypalSubscription(state, action.payload);
|
|
14295
|
+
}
|
|
14296
|
+
});
|
|
13882
14297
|
|
|
13883
14298
|
case SET_UPDATED_PRICE:
|
|
13884
14299
|
return lib_7({ ...state,
|
|
@@ -13936,21 +14351,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13936
14351
|
default:
|
|
13937
14352
|
return state;
|
|
13938
14353
|
}
|
|
13939
|
-
}, initialState$
|
|
14354
|
+
}, initialState$f);
|
|
13940
14355
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13941
14356
|
style: { ...style
|
|
13942
14357
|
},
|
|
13943
14358
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13944
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
14359
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
13945
14360
|
value: {
|
|
13946
14361
|
state,
|
|
13947
14362
|
dispatch
|
|
13948
14363
|
}
|
|
13949
14364
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13950
|
-
store: store$
|
|
14365
|
+
store: store$f,
|
|
13951
14366
|
key: i
|
|
13952
14367
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13953
|
-
store: store$
|
|
14368
|
+
store: store$f
|
|
13954
14369
|
})));
|
|
13955
14370
|
};
|
|
13956
14371
|
|
|
@@ -13972,7 +14387,7 @@ const PaymentMethodContainer = props => {
|
|
|
13972
14387
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13973
14388
|
locale: getPageOrDefaultLanguage()
|
|
13974
14389
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
13975
|
-
store: store$
|
|
14390
|
+
store: store$f
|
|
13976
14391
|
}, props))));
|
|
13977
14392
|
}
|
|
13978
14393
|
|
|
@@ -14025,7 +14440,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14025
14440
|
currentPlan,
|
|
14026
14441
|
updatedPrice
|
|
14027
14442
|
}
|
|
14028
|
-
} = React.useContext(store$
|
|
14443
|
+
} = React.useContext(store$f);
|
|
14029
14444
|
|
|
14030
14445
|
const updatePaymentRequest = () => {
|
|
14031
14446
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14057,19 +14472,35 @@ const CheckoutForm = () => {
|
|
|
14057
14472
|
const {
|
|
14058
14473
|
selectedPaymentMethodId
|
|
14059
14474
|
} = usePelcro();
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
}
|
|
14071
|
-
|
|
14072
|
-
|
|
14475
|
+
const cardProcessor = getSiteCardProcessor();
|
|
14476
|
+
|
|
14477
|
+
if (selectedPaymentMethodId) {
|
|
14478
|
+
return null;
|
|
14479
|
+
}
|
|
14480
|
+
|
|
14481
|
+
if (cardProcessor === "vantiv") {
|
|
14482
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14483
|
+
id: "eProtectiframe"
|
|
14484
|
+
});
|
|
14485
|
+
}
|
|
14486
|
+
|
|
14487
|
+
if (cardProcessor === "stripe") {
|
|
14488
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
|
|
14489
|
+
autoFocus: true
|
|
14490
|
+
}), /*#__PURE__*/React__default['default'].createElement("img", {
|
|
14491
|
+
alt: "credit_cards",
|
|
14492
|
+
className: "plc-w-auto plc-h-4 plc-mt-2",
|
|
14493
|
+
src: "https://js.pelcro.com/ui/plugin/main/images/credit_cards.png"
|
|
14494
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14495
|
+
className: "plc-flex plc-items-end plc-justify-between plc-my-2"
|
|
14496
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14497
|
+
className: "plc-w-6/12 plc-pr-4"
|
|
14498
|
+
}, /*#__PURE__*/React__default['default'].createElement(PelcroCardExpiry, null)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14499
|
+
className: "plc-w-6/12 plc-pl-4"
|
|
14500
|
+
}, /*#__PURE__*/React__default['default'].createElement(PelcroCardCVC, null))));
|
|
14501
|
+
}
|
|
14502
|
+
|
|
14503
|
+
return null;
|
|
14073
14504
|
};
|
|
14074
14505
|
|
|
14075
14506
|
const DiscountedPrice = props => {
|
|
@@ -14085,7 +14516,7 @@ const DiscountedPrice = props => {
|
|
|
14085
14516
|
taxAmount,
|
|
14086
14517
|
percentOff
|
|
14087
14518
|
}
|
|
14088
|
-
} = React.useContext(store$
|
|
14519
|
+
} = React.useContext(store$f);
|
|
14089
14520
|
const {
|
|
14090
14521
|
order,
|
|
14091
14522
|
plan
|
|
@@ -14135,7 +14566,7 @@ const SubmitPaymentMethod = ({
|
|
|
14135
14566
|
isLoading,
|
|
14136
14567
|
updatedPrice
|
|
14137
14568
|
}
|
|
14138
|
-
} = React.useContext(store$
|
|
14569
|
+
} = React.useContext(store$f);
|
|
14139
14570
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14140
14571
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14141
14572
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14156,17 +14587,17 @@ const SubmitPaymentMethod = ({
|
|
|
14156
14587
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14157
14588
|
};
|
|
14158
14589
|
|
|
14159
|
-
var _path$
|
|
14590
|
+
var _path$m;
|
|
14160
14591
|
|
|
14161
|
-
function _extends$
|
|
14592
|
+
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
14593
|
|
|
14163
14594
|
function SvgArrowLeft(props) {
|
|
14164
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14595
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
14165
14596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14166
14597
|
fill: "none",
|
|
14167
14598
|
viewBox: "0 0 24 24",
|
|
14168
14599
|
stroke: "currentColor"
|
|
14169
|
-
}, props), _path$
|
|
14600
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14170
14601
|
strokeLinecap: "round",
|
|
14171
14602
|
strokeLinejoin: "round",
|
|
14172
14603
|
strokeWidth: 2,
|
|
@@ -14185,7 +14616,7 @@ const ApplyCouponButton = ({
|
|
|
14185
14616
|
disableCouponButton
|
|
14186
14617
|
},
|
|
14187
14618
|
dispatch
|
|
14188
|
-
} = React.useContext(store$
|
|
14619
|
+
} = React.useContext(store$f);
|
|
14189
14620
|
const {
|
|
14190
14621
|
t
|
|
14191
14622
|
} = useTranslation("checkoutForm");
|
|
@@ -14219,7 +14650,7 @@ const CouponCodeField = props => {
|
|
|
14219
14650
|
couponCode,
|
|
14220
14651
|
couponError
|
|
14221
14652
|
}
|
|
14222
|
-
} = React.useContext(store$
|
|
14653
|
+
} = React.useContext(store$f);
|
|
14223
14654
|
|
|
14224
14655
|
const onCouponCodeChange = e => {
|
|
14225
14656
|
dispatch({
|
|
@@ -14248,17 +14679,17 @@ const CouponCodeField = props => {
|
|
|
14248
14679
|
}, props));
|
|
14249
14680
|
};
|
|
14250
14681
|
|
|
14251
|
-
var _path$
|
|
14682
|
+
var _path$l;
|
|
14252
14683
|
|
|
14253
|
-
function _extends$
|
|
14684
|
+
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
14685
|
|
|
14255
14686
|
function SvgTicket(props) {
|
|
14256
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14687
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
14257
14688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14258
14689
|
fill: "none",
|
|
14259
14690
|
viewBox: "0 0 24 24",
|
|
14260
14691
|
stroke: "currentColor"
|
|
14261
|
-
}, props), _path$
|
|
14692
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14262
14693
|
strokeLinecap: "round",
|
|
14263
14694
|
strokeLinejoin: "round",
|
|
14264
14695
|
strokeWidth: 2,
|
|
@@ -14275,7 +14706,7 @@ const CouponCode = ({
|
|
|
14275
14706
|
state: {
|
|
14276
14707
|
enableCouponField
|
|
14277
14708
|
}
|
|
14278
|
-
} = React.useContext(store$
|
|
14709
|
+
} = React.useContext(store$f);
|
|
14279
14710
|
const {
|
|
14280
14711
|
t
|
|
14281
14712
|
} = useTranslation("checkoutForm");
|
|
@@ -14532,17 +14963,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14532
14963
|
const {
|
|
14533
14964
|
dispatch,
|
|
14534
14965
|
state
|
|
14535
|
-
} = React.useContext(store$
|
|
14966
|
+
} = React.useContext(store$f);
|
|
14536
14967
|
const {
|
|
14537
14968
|
product,
|
|
14538
14969
|
plan,
|
|
14970
|
+
invoice,
|
|
14539
14971
|
selectedAddressId
|
|
14540
14972
|
} = usePelcro();
|
|
14541
14973
|
React.useEffect(() => {
|
|
14542
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14974
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14543
14975
|
|
|
14544
14976
|
// 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 :
|
|
14977
|
+
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
14978
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14547
14979
|
|
|
14548
14980
|
const initializePaypal = async () => {
|
|
@@ -14551,7 +14983,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14551
14983
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14552
14984
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14553
14985
|
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,
|
|
14986
|
+
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
14987
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14556
14988
|
displayName: props.merchantDisplayName,
|
|
14557
14989
|
locale: props.locale,
|
|
@@ -14561,9 +14993,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14561
14993
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14562
14994
|
|
|
14563
14995
|
paypalCheckoutInstance.createPayment({
|
|
14564
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14996
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14565
14997
|
amount: updatedPrice,
|
|
14566
|
-
address: selectedAddress,
|
|
14998
|
+
address: invoice ? null : selectedAddress,
|
|
14567
14999
|
onButtonClick: () => {
|
|
14568
15000
|
dispatch({
|
|
14569
15001
|
type: DISABLE_SUBMIT,
|
|
@@ -14617,16 +15049,16 @@ const BankRedirection = () => {
|
|
|
14617
15049
|
}));
|
|
14618
15050
|
};
|
|
14619
15051
|
|
|
14620
|
-
var _path$
|
|
15052
|
+
var _path$k;
|
|
14621
15053
|
|
|
14622
|
-
function _extends$
|
|
15054
|
+
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
15055
|
|
|
14624
15056
|
function SvgLock(props) {
|
|
14625
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15057
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
14626
15058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14627
15059
|
viewBox: "0 0 20 20",
|
|
14628
15060
|
fill: "currentColor"
|
|
14629
|
-
}, props), _path$
|
|
15061
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14630
15062
|
fillRule: "evenodd",
|
|
14631
15063
|
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
15064
|
clipRule: "evenodd"
|
|
@@ -14643,7 +15075,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14643
15075
|
state: {
|
|
14644
15076
|
isLoading
|
|
14645
15077
|
}
|
|
14646
|
-
} = React.useContext(store$
|
|
15078
|
+
} = React.useContext(store$f);
|
|
14647
15079
|
const {
|
|
14648
15080
|
switchView,
|
|
14649
15081
|
selectedPaymentMethodId
|
|
@@ -14685,7 +15117,7 @@ const TaxAmount = () => {
|
|
|
14685
15117
|
state: {
|
|
14686
15118
|
taxAmount
|
|
14687
15119
|
}
|
|
14688
|
-
} = React.useContext(store$
|
|
15120
|
+
} = React.useContext(store$f);
|
|
14689
15121
|
const {
|
|
14690
15122
|
plan
|
|
14691
15123
|
} = usePelcro();
|
|
@@ -14718,9 +15150,10 @@ function PaymentMethodView({
|
|
|
14718
15150
|
const {
|
|
14719
15151
|
t
|
|
14720
15152
|
} = useTranslation("checkoutForm");
|
|
15153
|
+
const cardProcessor = getSiteCardProcessor();
|
|
14721
15154
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14722
15155
|
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", {
|
|
15156
|
+
}, cardProcessor === "stripe" && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14724
15157
|
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
15158
|
}, /*#__PURE__*/React__default['default'].createElement(SvgLock, {
|
|
14726
15159
|
className: "plc-w-5 plc-h-5 plc-mr-1"
|
|
@@ -14848,12 +15281,12 @@ function SubscriptionRenewModal({
|
|
|
14848
15281
|
}
|
|
14849
15282
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14850
15283
|
|
|
14851
|
-
var _path$
|
|
15284
|
+
var _path$j;
|
|
14852
15285
|
|
|
14853
|
-
function _extends$
|
|
15286
|
+
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
15287
|
|
|
14855
15288
|
function SvgGift(props) {
|
|
14856
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15289
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14857
15290
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14858
15291
|
fill: "none",
|
|
14859
15292
|
stroke: "currentColor",
|
|
@@ -14862,7 +15295,7 @@ function SvgGift(props) {
|
|
|
14862
15295
|
strokeWidth: 2,
|
|
14863
15296
|
viewBox: "0 0 24 24",
|
|
14864
15297
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14865
|
-
}, props), _path$
|
|
15298
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14866
15299
|
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
15300
|
})));
|
|
14868
15301
|
}
|
|
@@ -14900,10 +15333,13 @@ const getCurrentFlow = () => {
|
|
|
14900
15333
|
const {
|
|
14901
15334
|
product,
|
|
14902
15335
|
giftRecipient,
|
|
14903
|
-
giftCode
|
|
15336
|
+
giftCode,
|
|
15337
|
+
invoice
|
|
14904
15338
|
} = usePelcro.getStore();
|
|
14905
15339
|
|
|
14906
|
-
if (
|
|
15340
|
+
if (invoice) {
|
|
15341
|
+
return "invoicePayment";
|
|
15342
|
+
} else if (giftRecipient) {
|
|
14907
15343
|
return "giftCreate";
|
|
14908
15344
|
} else if (giftCode) {
|
|
14909
15345
|
return "giftRedeem";
|
|
@@ -14940,6 +15376,13 @@ const getSuccessContent = i18n => {
|
|
|
14940
15376
|
}),
|
|
14941
15377
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14942
15378
|
successContent: i18n("messages.giftRedeem.content")
|
|
15379
|
+
},
|
|
15380
|
+
invoicePayment: {
|
|
15381
|
+
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
15382
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15383
|
+
}),
|
|
15384
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15385
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14943
15386
|
}
|
|
14944
15387
|
};
|
|
14945
15388
|
return wordingDictionary[flow];
|
|
@@ -15193,7 +15636,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
15193
15636
|
|
|
15194
15637
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15195
15638
|
|
|
15196
|
-
const initialState$
|
|
15639
|
+
const initialState$e = {
|
|
15197
15640
|
didSubToNewslettersBefore: false,
|
|
15198
15641
|
newsletters: [],
|
|
15199
15642
|
isListLoading: true,
|
|
@@ -15203,10 +15646,10 @@ const initialState$d = {
|
|
|
15203
15646
|
content: ""
|
|
15204
15647
|
}
|
|
15205
15648
|
};
|
|
15206
|
-
const store$
|
|
15649
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
15207
15650
|
const {
|
|
15208
|
-
Provider: Provider$
|
|
15209
|
-
} = store$
|
|
15651
|
+
Provider: Provider$e
|
|
15652
|
+
} = store$e;
|
|
15210
15653
|
|
|
15211
15654
|
const NewsletterUpdateContainer = ({
|
|
15212
15655
|
style,
|
|
@@ -15319,7 +15762,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15319
15762
|
default:
|
|
15320
15763
|
return state;
|
|
15321
15764
|
}
|
|
15322
|
-
}, initialState$
|
|
15765
|
+
}, initialState$e);
|
|
15323
15766
|
React.useEffect(() => {
|
|
15324
15767
|
const getUserNewsletters = () => {
|
|
15325
15768
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15363,7 +15806,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15363
15806
|
style: { ...style
|
|
15364
15807
|
},
|
|
15365
15808
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15366
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
15809
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
15367
15810
|
value: {
|
|
15368
15811
|
state,
|
|
15369
15812
|
dispatch
|
|
@@ -15371,12 +15814,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15371
15814
|
}, children.length ? children.map((child, i) => {
|
|
15372
15815
|
if (child) {
|
|
15373
15816
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15374
|
-
store: store$
|
|
15817
|
+
store: store$e,
|
|
15375
15818
|
key: i
|
|
15376
15819
|
});
|
|
15377
15820
|
}
|
|
15378
15821
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15379
|
-
store: store$
|
|
15822
|
+
store: store$e
|
|
15380
15823
|
})));
|
|
15381
15824
|
};
|
|
15382
15825
|
|
|
@@ -15391,7 +15834,7 @@ const NewsletterUpdateButton = ({
|
|
|
15391
15834
|
isSubmitting,
|
|
15392
15835
|
isListLoading
|
|
15393
15836
|
}
|
|
15394
|
-
} = React.useContext(store$
|
|
15837
|
+
} = React.useContext(store$e);
|
|
15395
15838
|
const {
|
|
15396
15839
|
t
|
|
15397
15840
|
} = useTranslation("newsletter");
|
|
@@ -15421,7 +15864,7 @@ const NewsletterUpdateList = () => {
|
|
|
15421
15864
|
newsletters,
|
|
15422
15865
|
isListLoading
|
|
15423
15866
|
}
|
|
15424
|
-
} = React.useContext(store$
|
|
15867
|
+
} = React.useContext(store$e);
|
|
15425
15868
|
|
|
15426
15869
|
if (isListLoading) {
|
|
15427
15870
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
@@ -15625,7 +16068,7 @@ function SubscriptionCreateModal({
|
|
|
15625
16068
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15626
16069
|
|
|
15627
16070
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15628
|
-
const initialState$
|
|
16071
|
+
const initialState$d = {
|
|
15629
16072
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15630
16073
|
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
16074
|
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 +16081,10 @@ const initialState$c = {
|
|
|
15638
16081
|
content: ""
|
|
15639
16082
|
}
|
|
15640
16083
|
};
|
|
15641
|
-
const store$
|
|
16084
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
15642
16085
|
const {
|
|
15643
|
-
Provider: Provider$
|
|
15644
|
-
} = store$
|
|
16086
|
+
Provider: Provider$d
|
|
16087
|
+
} = store$d;
|
|
15645
16088
|
|
|
15646
16089
|
const UserUpdateContainer = ({
|
|
15647
16090
|
style,
|
|
@@ -15773,27 +16216,27 @@ const UserUpdateContainer = ({
|
|
|
15773
16216
|
default:
|
|
15774
16217
|
return state;
|
|
15775
16218
|
}
|
|
15776
|
-
}, initialState$
|
|
16219
|
+
}, initialState$d);
|
|
15777
16220
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15778
16221
|
style: { ...style
|
|
15779
16222
|
},
|
|
15780
16223
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15781
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16224
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
15782
16225
|
value: {
|
|
15783
16226
|
state,
|
|
15784
16227
|
dispatch
|
|
15785
16228
|
}
|
|
15786
16229
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15787
|
-
store: store$
|
|
16230
|
+
store: store$d,
|
|
15788
16231
|
key: i
|
|
15789
16232
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15790
|
-
store: store$
|
|
16233
|
+
store: store$d
|
|
15791
16234
|
})));
|
|
15792
16235
|
};
|
|
15793
16236
|
|
|
15794
16237
|
const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
15795
16238
|
disabled: true,
|
|
15796
|
-
store: store$
|
|
16239
|
+
store: store$d
|
|
15797
16240
|
}, props));
|
|
15798
16241
|
|
|
15799
16242
|
const UserUpdateButton = ({
|
|
@@ -15806,7 +16249,7 @@ const UserUpdateButton = ({
|
|
|
15806
16249
|
buttonDisabled
|
|
15807
16250
|
},
|
|
15808
16251
|
dispatch
|
|
15809
|
-
} = React.useContext(store$
|
|
16252
|
+
} = React.useContext(store$d);
|
|
15810
16253
|
const {
|
|
15811
16254
|
t
|
|
15812
16255
|
} = useTranslation("userEdit");
|
|
@@ -15823,11 +16266,11 @@ const UserUpdateButton = ({
|
|
|
15823
16266
|
};
|
|
15824
16267
|
|
|
15825
16268
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
15826
|
-
store: store$
|
|
16269
|
+
store: store$d
|
|
15827
16270
|
}, props));
|
|
15828
16271
|
|
|
15829
16272
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
15830
|
-
store: store$
|
|
16273
|
+
store: store$d
|
|
15831
16274
|
}, props));
|
|
15832
16275
|
|
|
15833
16276
|
function Phone({
|
|
@@ -15856,22 +16299,22 @@ function Phone({
|
|
|
15856
16299
|
}
|
|
15857
16300
|
|
|
15858
16301
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
15859
|
-
store: store$
|
|
16302
|
+
store: store$d
|
|
15860
16303
|
}, props));
|
|
15861
16304
|
|
|
15862
16305
|
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
16306
|
|
|
15864
|
-
var _path$
|
|
16307
|
+
var _path$i;
|
|
15865
16308
|
|
|
15866
|
-
function _extends$
|
|
16309
|
+
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
16310
|
|
|
15868
16311
|
function SvgEdit(props) {
|
|
15869
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16312
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
15870
16313
|
className: "plc-w-6 plc-h-6",
|
|
15871
16314
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15872
16315
|
viewBox: "0 0 20 20",
|
|
15873
16316
|
fill: "currentColor"
|
|
15874
|
-
}, props), _path$
|
|
16317
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15875
16318
|
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
16319
|
})));
|
|
15877
16320
|
}
|
|
@@ -16003,16 +16446,16 @@ function DisplayName({
|
|
|
16003
16446
|
}
|
|
16004
16447
|
|
|
16005
16448
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
16006
|
-
store: store$
|
|
16449
|
+
store: store$d
|
|
16007
16450
|
}, props));
|
|
16008
16451
|
|
|
16009
16452
|
const UserUpdateTextInput = props => {
|
|
16010
16453
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16011
|
-
store: store$
|
|
16454
|
+
store: store$d
|
|
16012
16455
|
}));
|
|
16013
16456
|
};
|
|
16014
16457
|
|
|
16015
|
-
const initialState$
|
|
16458
|
+
const initialState$c = {
|
|
16016
16459
|
isSubmitting: false,
|
|
16017
16460
|
firstName: "",
|
|
16018
16461
|
firstNameError: "",
|
|
@@ -16037,10 +16480,10 @@ const initialState$b = {
|
|
|
16037
16480
|
content: ""
|
|
16038
16481
|
}
|
|
16039
16482
|
};
|
|
16040
|
-
const store$
|
|
16483
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
16041
16484
|
const {
|
|
16042
|
-
Provider: Provider$
|
|
16043
|
-
} = store$
|
|
16485
|
+
Provider: Provider$c
|
|
16486
|
+
} = store$c;
|
|
16044
16487
|
|
|
16045
16488
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16046
16489
|
|
|
@@ -16247,7 +16690,7 @@ const AddressCreateContainer = ({
|
|
|
16247
16690
|
default:
|
|
16248
16691
|
return state;
|
|
16249
16692
|
}
|
|
16250
|
-
}, initialState$
|
|
16693
|
+
}, initialState$c);
|
|
16251
16694
|
React.useEffect(() => {
|
|
16252
16695
|
const getStates = () => {
|
|
16253
16696
|
dispatch({
|
|
@@ -16279,16 +16722,16 @@ const AddressCreateContainer = ({
|
|
|
16279
16722
|
style: { ...style
|
|
16280
16723
|
},
|
|
16281
16724
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16282
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16725
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
16283
16726
|
value: {
|
|
16284
16727
|
state,
|
|
16285
16728
|
dispatch
|
|
16286
16729
|
}
|
|
16287
16730
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
16288
|
-
store: store$
|
|
16731
|
+
store: store$c,
|
|
16289
16732
|
key: i
|
|
16290
16733
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
16291
|
-
store: store$
|
|
16734
|
+
store: store$c
|
|
16292
16735
|
})));
|
|
16293
16736
|
};
|
|
16294
16737
|
|
|
@@ -16299,7 +16742,7 @@ function AddressCreateFirstName(props) {
|
|
|
16299
16742
|
firstName,
|
|
16300
16743
|
firstNameError
|
|
16301
16744
|
}
|
|
16302
|
-
} = React.useContext(store$
|
|
16745
|
+
} = React.useContext(store$c);
|
|
16303
16746
|
|
|
16304
16747
|
const handleBlur = () => {
|
|
16305
16748
|
return dispatch({
|
|
@@ -16342,7 +16785,7 @@ function AddressCreateLastName(props) {
|
|
|
16342
16785
|
lastName,
|
|
16343
16786
|
lastNameError
|
|
16344
16787
|
}
|
|
16345
|
-
} = React.useContext(store$
|
|
16788
|
+
} = React.useContext(store$c);
|
|
16346
16789
|
|
|
16347
16790
|
const handleBlur = () => {
|
|
16348
16791
|
return dispatch({
|
|
@@ -16385,7 +16828,7 @@ function AddressCreateLine1(props) {
|
|
|
16385
16828
|
line1,
|
|
16386
16829
|
line1Error
|
|
16387
16830
|
}
|
|
16388
|
-
} = React.useContext(store$
|
|
16831
|
+
} = React.useContext(store$c);
|
|
16389
16832
|
|
|
16390
16833
|
const handleBlur = () => {
|
|
16391
16834
|
return dispatch({
|
|
@@ -16428,7 +16871,7 @@ function AddressCreateCity(props) {
|
|
|
16428
16871
|
city,
|
|
16429
16872
|
cityError
|
|
16430
16873
|
}
|
|
16431
|
-
} = React.useContext(store$
|
|
16874
|
+
} = React.useContext(store$c);
|
|
16432
16875
|
|
|
16433
16876
|
const handleBlur = () => {
|
|
16434
16877
|
return dispatch({
|
|
@@ -16471,7 +16914,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16471
16914
|
postalCode,
|
|
16472
16915
|
postalCodeError
|
|
16473
16916
|
}
|
|
16474
|
-
} = React.useContext(store$
|
|
16917
|
+
} = React.useContext(store$c);
|
|
16475
16918
|
|
|
16476
16919
|
const handleBlur = () => {
|
|
16477
16920
|
return dispatch({
|
|
@@ -16517,7 +16960,7 @@ const AddressCreateSubmit = ({
|
|
|
16517
16960
|
state: {
|
|
16518
16961
|
isSubmitting
|
|
16519
16962
|
}
|
|
16520
|
-
} = React.useContext(store$
|
|
16963
|
+
} = React.useContext(store$c);
|
|
16521
16964
|
const {
|
|
16522
16965
|
t
|
|
16523
16966
|
} = useTranslation("address");
|
|
@@ -16628,7 +17071,7 @@ function CountrySelect({
|
|
|
16628
17071
|
}
|
|
16629
17072
|
|
|
16630
17073
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
16631
|
-
store: store$
|
|
17074
|
+
store: store$c
|
|
16632
17075
|
}, props));
|
|
16633
17076
|
|
|
16634
17077
|
function StateSelect({
|
|
@@ -16716,7 +17159,7 @@ function StateSelect({
|
|
|
16716
17159
|
}
|
|
16717
17160
|
|
|
16718
17161
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
16719
|
-
store: store$
|
|
17162
|
+
store: store$c
|
|
16720
17163
|
}, props));
|
|
16721
17164
|
|
|
16722
17165
|
const AddressCreateView = props => {
|
|
@@ -16821,18 +17264,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16821
17264
|
|
|
16822
17265
|
const AddressCreateTextInput = props => {
|
|
16823
17266
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16824
|
-
store: store$
|
|
17267
|
+
store: store$c
|
|
16825
17268
|
}));
|
|
16826
17269
|
};
|
|
16827
17270
|
|
|
16828
17271
|
const AddressCreateLine2 = props => {
|
|
16829
17272
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
16830
17273
|
fieldName: "line2",
|
|
16831
|
-
store: store$
|
|
17274
|
+
store: store$c
|
|
16832
17275
|
}, props));
|
|
16833
17276
|
};
|
|
16834
17277
|
|
|
16835
|
-
const initialState$
|
|
17278
|
+
const initialState$b = {
|
|
16836
17279
|
isSubmitting: false,
|
|
16837
17280
|
firstName: "",
|
|
16838
17281
|
firstNameError: "",
|
|
@@ -16857,10 +17300,10 @@ const initialState$a = {
|
|
|
16857
17300
|
content: ""
|
|
16858
17301
|
}
|
|
16859
17302
|
};
|
|
16860
|
-
const store$
|
|
17303
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
16861
17304
|
const {
|
|
16862
|
-
Provider: Provider$
|
|
16863
|
-
} = store$
|
|
17305
|
+
Provider: Provider$b
|
|
17306
|
+
} = store$b;
|
|
16864
17307
|
|
|
16865
17308
|
const AddressUpdateContainer = ({
|
|
16866
17309
|
style,
|
|
@@ -16912,7 +17355,7 @@ const AddressUpdateContainer = ({
|
|
|
16912
17355
|
const thisAddress = addresses[address];
|
|
16913
17356
|
|
|
16914
17357
|
if (+thisAddress.id === +addressId) {
|
|
16915
|
-
const newState = { ...initialState$
|
|
17358
|
+
const newState = { ...initialState$b,
|
|
16916
17359
|
firstName: thisAddress.first_name,
|
|
16917
17360
|
lastName: thisAddress.last_name,
|
|
16918
17361
|
line1: thisAddress.line1,
|
|
@@ -17045,7 +17488,7 @@ const AddressUpdateContainer = ({
|
|
|
17045
17488
|
default:
|
|
17046
17489
|
return state;
|
|
17047
17490
|
}
|
|
17048
|
-
}, initialState$
|
|
17491
|
+
}, initialState$b);
|
|
17049
17492
|
React.useEffect(() => {
|
|
17050
17493
|
const getStates = () => {
|
|
17051
17494
|
dispatch({
|
|
@@ -17077,21 +17520,21 @@ const AddressUpdateContainer = ({
|
|
|
17077
17520
|
style: { ...style
|
|
17078
17521
|
},
|
|
17079
17522
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17080
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17523
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
17081
17524
|
value: {
|
|
17082
17525
|
state,
|
|
17083
17526
|
dispatch
|
|
17084
17527
|
}
|
|
17085
17528
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17086
|
-
store: store$
|
|
17529
|
+
store: store$b,
|
|
17087
17530
|
key: i
|
|
17088
17531
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17089
|
-
store: store$
|
|
17532
|
+
store: store$b
|
|
17090
17533
|
})));
|
|
17091
17534
|
};
|
|
17092
17535
|
|
|
17093
17536
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
17094
|
-
store: store$
|
|
17537
|
+
store: store$b
|
|
17095
17538
|
}, props));
|
|
17096
17539
|
|
|
17097
17540
|
function AddressUpdateFirstName(props) {
|
|
@@ -17101,7 +17544,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17101
17544
|
firstName,
|
|
17102
17545
|
firstNameError
|
|
17103
17546
|
}
|
|
17104
|
-
} = React.useContext(store$
|
|
17547
|
+
} = React.useContext(store$b);
|
|
17105
17548
|
|
|
17106
17549
|
const handleBlur = () => {
|
|
17107
17550
|
return dispatch({
|
|
@@ -17144,7 +17587,7 @@ function AddressUpdateLastName(props) {
|
|
|
17144
17587
|
lastName,
|
|
17145
17588
|
lastNameError
|
|
17146
17589
|
}
|
|
17147
|
-
} = React.useContext(store$
|
|
17590
|
+
} = React.useContext(store$b);
|
|
17148
17591
|
|
|
17149
17592
|
const handleBlur = () => {
|
|
17150
17593
|
return dispatch({
|
|
@@ -17187,7 +17630,7 @@ function AddressUpdateLine1(props) {
|
|
|
17187
17630
|
line1,
|
|
17188
17631
|
line1Error
|
|
17189
17632
|
}
|
|
17190
|
-
} = React.useContext(store$
|
|
17633
|
+
} = React.useContext(store$b);
|
|
17191
17634
|
|
|
17192
17635
|
const handleBlur = () => {
|
|
17193
17636
|
return dispatch({
|
|
@@ -17227,7 +17670,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17227
17670
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
17228
17671
|
fieldName: "line2"
|
|
17229
17672
|
}, props, {
|
|
17230
|
-
store: store$
|
|
17673
|
+
store: store$b
|
|
17231
17674
|
}));
|
|
17232
17675
|
};
|
|
17233
17676
|
|
|
@@ -17238,7 +17681,7 @@ function AddressUpdateCity(props) {
|
|
|
17238
17681
|
city,
|
|
17239
17682
|
cityError
|
|
17240
17683
|
}
|
|
17241
|
-
} = React.useContext(store$
|
|
17684
|
+
} = React.useContext(store$b);
|
|
17242
17685
|
|
|
17243
17686
|
const handleBlur = () => {
|
|
17244
17687
|
return dispatch({
|
|
@@ -17281,7 +17724,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17281
17724
|
postalCode,
|
|
17282
17725
|
postalCodeError
|
|
17283
17726
|
}
|
|
17284
|
-
} = React.useContext(store$
|
|
17727
|
+
} = React.useContext(store$b);
|
|
17285
17728
|
|
|
17286
17729
|
const handleBlur = () => {
|
|
17287
17730
|
return dispatch({
|
|
@@ -17327,7 +17770,7 @@ const AddressUpdateSubmit = ({
|
|
|
17327
17770
|
state: {
|
|
17328
17771
|
isSubmitting
|
|
17329
17772
|
}
|
|
17330
|
-
} = React.useContext(store$
|
|
17773
|
+
} = React.useContext(store$b);
|
|
17331
17774
|
const {
|
|
17332
17775
|
t
|
|
17333
17776
|
} = useTranslation("address");
|
|
@@ -17343,7 +17786,7 @@ const AddressUpdateSubmit = ({
|
|
|
17343
17786
|
};
|
|
17344
17787
|
|
|
17345
17788
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
17346
|
-
store: store$
|
|
17789
|
+
store: store$b
|
|
17347
17790
|
}, props));
|
|
17348
17791
|
|
|
17349
17792
|
const AddressUpdateView = props => {
|
|
@@ -17426,7 +17869,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17426
17869
|
|
|
17427
17870
|
const AddressUpdateTextInput = props => {
|
|
17428
17871
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
17429
|
-
store: store$
|
|
17872
|
+
store: store$b
|
|
17430
17873
|
}));
|
|
17431
17874
|
};
|
|
17432
17875
|
|
|
@@ -17509,7 +17952,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17509
17952
|
};
|
|
17510
17953
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17511
17954
|
|
|
17512
|
-
const initialState$
|
|
17955
|
+
const initialState$a = {
|
|
17513
17956
|
email: "",
|
|
17514
17957
|
password: "",
|
|
17515
17958
|
passwordError: null,
|
|
@@ -17522,10 +17965,10 @@ const initialState$9 = {
|
|
|
17522
17965
|
content: ""
|
|
17523
17966
|
}
|
|
17524
17967
|
};
|
|
17525
|
-
const store$
|
|
17968
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
17526
17969
|
const {
|
|
17527
|
-
Provider: Provider$
|
|
17528
|
-
} = store$
|
|
17970
|
+
Provider: Provider$a
|
|
17971
|
+
} = store$a;
|
|
17529
17972
|
|
|
17530
17973
|
const PasswordResetContainer = ({
|
|
17531
17974
|
style,
|
|
@@ -17582,7 +18025,7 @@ const PasswordResetContainer = ({
|
|
|
17582
18025
|
type: SET_EMAIL,
|
|
17583
18026
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17584
18027
|
});
|
|
17585
|
-
initialState$
|
|
18028
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17586
18029
|
dispatch({
|
|
17587
18030
|
type: SET_TOKEN,
|
|
17588
18031
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17642,26 +18085,26 @@ const PasswordResetContainer = ({
|
|
|
17642
18085
|
default:
|
|
17643
18086
|
return state;
|
|
17644
18087
|
}
|
|
17645
|
-
}, initialState$
|
|
18088
|
+
}, initialState$a);
|
|
17646
18089
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17647
18090
|
style: { ...style
|
|
17648
18091
|
},
|
|
17649
18092
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17650
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18093
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
17651
18094
|
value: {
|
|
17652
18095
|
state,
|
|
17653
18096
|
dispatch
|
|
17654
18097
|
}
|
|
17655
18098
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17656
|
-
store: store$
|
|
18099
|
+
store: store$a,
|
|
17657
18100
|
key: i
|
|
17658
18101
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17659
|
-
store: store$
|
|
18102
|
+
store: store$a
|
|
17660
18103
|
})));
|
|
17661
18104
|
};
|
|
17662
18105
|
|
|
17663
18106
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
17664
|
-
store: store$
|
|
18107
|
+
store: store$a
|
|
17665
18108
|
}, props));
|
|
17666
18109
|
|
|
17667
18110
|
const PasswordResetButton = ({
|
|
@@ -17674,7 +18117,7 @@ const PasswordResetButton = ({
|
|
|
17674
18117
|
buttonDisabled
|
|
17675
18118
|
},
|
|
17676
18119
|
dispatch
|
|
17677
|
-
} = React.useContext(store$
|
|
18120
|
+
} = React.useContext(store$a);
|
|
17678
18121
|
const {
|
|
17679
18122
|
t
|
|
17680
18123
|
} = useTranslation("passwordReset");
|
|
@@ -17691,14 +18134,14 @@ const PasswordResetButton = ({
|
|
|
17691
18134
|
};
|
|
17692
18135
|
|
|
17693
18136
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17694
|
-
store: store$
|
|
18137
|
+
store: store$a
|
|
17695
18138
|
}, props, {
|
|
17696
18139
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17697
18140
|
disabled: true
|
|
17698
18141
|
}));
|
|
17699
18142
|
|
|
17700
18143
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
17701
|
-
store: store$
|
|
18144
|
+
store: store$a
|
|
17702
18145
|
}, props));
|
|
17703
18146
|
|
|
17704
18147
|
const PasswordResetView = props => {
|
|
@@ -17750,7 +18193,7 @@ const PasswordResetModal = ({
|
|
|
17750
18193
|
};
|
|
17751
18194
|
PasswordResetModal.viewId = "password-reset";
|
|
17752
18195
|
|
|
17753
|
-
const initialState$
|
|
18196
|
+
const initialState$9 = {
|
|
17754
18197
|
email: "",
|
|
17755
18198
|
emailError: null,
|
|
17756
18199
|
buttonDisabled: false,
|
|
@@ -17759,10 +18202,10 @@ const initialState$8 = {
|
|
|
17759
18202
|
content: ""
|
|
17760
18203
|
}
|
|
17761
18204
|
};
|
|
17762
|
-
const store$
|
|
18205
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
17763
18206
|
const {
|
|
17764
|
-
Provider: Provider$
|
|
17765
|
-
} = store$
|
|
18207
|
+
Provider: Provider$9
|
|
18208
|
+
} = store$9;
|
|
17766
18209
|
|
|
17767
18210
|
const PasswordForgotContainer = ({
|
|
17768
18211
|
style,
|
|
@@ -17840,21 +18283,21 @@ const PasswordForgotContainer = ({
|
|
|
17840
18283
|
default:
|
|
17841
18284
|
return state;
|
|
17842
18285
|
}
|
|
17843
|
-
}, initialState$
|
|
18286
|
+
}, initialState$9);
|
|
17844
18287
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17845
18288
|
style: { ...style
|
|
17846
18289
|
},
|
|
17847
18290
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17848
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18291
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
17849
18292
|
value: {
|
|
17850
18293
|
state,
|
|
17851
18294
|
dispatch
|
|
17852
18295
|
}
|
|
17853
18296
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17854
|
-
store: store$
|
|
18297
|
+
store: store$9,
|
|
17855
18298
|
key: i
|
|
17856
18299
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17857
|
-
store: store$
|
|
18300
|
+
store: store$9
|
|
17858
18301
|
})));
|
|
17859
18302
|
};
|
|
17860
18303
|
|
|
@@ -17870,7 +18313,7 @@ const PasswordForgotButton = ({
|
|
|
17870
18313
|
emailError
|
|
17871
18314
|
},
|
|
17872
18315
|
dispatch
|
|
17873
|
-
} = React.useContext(store$
|
|
18316
|
+
} = React.useContext(store$9);
|
|
17874
18317
|
const {
|
|
17875
18318
|
t
|
|
17876
18319
|
} = useTranslation("passwordForgot");
|
|
@@ -17891,7 +18334,7 @@ const PasswordForgotButton = ({
|
|
|
17891
18334
|
};
|
|
17892
18335
|
|
|
17893
18336
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17894
|
-
store: store$
|
|
18337
|
+
store: store$9
|
|
17895
18338
|
}, props));
|
|
17896
18339
|
|
|
17897
18340
|
const PasswordForgotView = props => {
|
|
@@ -17941,7 +18384,7 @@ const PasswordForgotModal = ({
|
|
|
17941
18384
|
};
|
|
17942
18385
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17943
18386
|
|
|
17944
|
-
const initialState$
|
|
18387
|
+
const initialState$8 = {
|
|
17945
18388
|
currentPassword: "",
|
|
17946
18389
|
newPassword: "",
|
|
17947
18390
|
confirmNewPassword: "",
|
|
@@ -17955,10 +18398,10 @@ const initialState$7 = {
|
|
|
17955
18398
|
content: ""
|
|
17956
18399
|
}
|
|
17957
18400
|
};
|
|
17958
|
-
const store$
|
|
18401
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
17959
18402
|
const {
|
|
17960
|
-
Provider: Provider$
|
|
17961
|
-
} = store$
|
|
18403
|
+
Provider: Provider$8
|
|
18404
|
+
} = store$8;
|
|
17962
18405
|
const PasswordChangeContainer = ({
|
|
17963
18406
|
style,
|
|
17964
18407
|
className = "",
|
|
@@ -18110,21 +18553,21 @@ const PasswordChangeContainer = ({
|
|
|
18110
18553
|
default:
|
|
18111
18554
|
return state;
|
|
18112
18555
|
}
|
|
18113
|
-
}, initialState$
|
|
18556
|
+
}, initialState$8);
|
|
18114
18557
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18115
18558
|
style: { ...style
|
|
18116
18559
|
},
|
|
18117
18560
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18118
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18561
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
18119
18562
|
value: {
|
|
18120
18563
|
state,
|
|
18121
18564
|
dispatch
|
|
18122
18565
|
}
|
|
18123
18566
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18124
|
-
store: store$
|
|
18567
|
+
store: store$8,
|
|
18125
18568
|
key: i
|
|
18126
18569
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18127
|
-
store: store$
|
|
18570
|
+
store: store$8
|
|
18128
18571
|
})));
|
|
18129
18572
|
};
|
|
18130
18573
|
|
|
@@ -18135,7 +18578,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18135
18578
|
currentPassword,
|
|
18136
18579
|
currentPasswordError
|
|
18137
18580
|
}
|
|
18138
|
-
} = React.useContext(store$
|
|
18581
|
+
} = React.useContext(store$8);
|
|
18139
18582
|
const handleBlur = React.useCallback(() => {
|
|
18140
18583
|
return dispatch({
|
|
18141
18584
|
type: VALIDATE_PASSWORD
|
|
@@ -18169,7 +18612,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18169
18612
|
newPassword,
|
|
18170
18613
|
newPasswordError
|
|
18171
18614
|
}
|
|
18172
|
-
} = React.useContext(store$
|
|
18615
|
+
} = React.useContext(store$8);
|
|
18173
18616
|
const handleBlur = React.useCallback(() => {
|
|
18174
18617
|
return dispatch({
|
|
18175
18618
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18203,7 +18646,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18203
18646
|
confirmNewPassword,
|
|
18204
18647
|
confirmNewPasswordError
|
|
18205
18648
|
}
|
|
18206
|
-
} = React.useContext(store$
|
|
18649
|
+
} = React.useContext(store$8);
|
|
18207
18650
|
const handleBlur = React.useCallback(() => {
|
|
18208
18651
|
return dispatch({
|
|
18209
18652
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18244,7 +18687,7 @@ const PasswordChangeButton = ({
|
|
|
18244
18687
|
confirmNewPasswordError
|
|
18245
18688
|
},
|
|
18246
18689
|
dispatch
|
|
18247
|
-
} = React.useContext(store$
|
|
18690
|
+
} = React.useContext(store$8);
|
|
18248
18691
|
const {
|
|
18249
18692
|
t
|
|
18250
18693
|
} = useTranslation("passwordChange");
|
|
@@ -18310,17 +18753,17 @@ const PasswordChangeModal = ({
|
|
|
18310
18753
|
};
|
|
18311
18754
|
PasswordChangeModal.viewId = "password-change";
|
|
18312
18755
|
|
|
18313
|
-
const initialState$
|
|
18756
|
+
const initialState$7 = {
|
|
18314
18757
|
buttonDisabled: false,
|
|
18315
18758
|
alert: {
|
|
18316
18759
|
type: "error",
|
|
18317
18760
|
content: ""
|
|
18318
18761
|
}
|
|
18319
18762
|
};
|
|
18320
|
-
const store$
|
|
18763
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
18321
18764
|
const {
|
|
18322
|
-
Provider: Provider$
|
|
18323
|
-
} = store$
|
|
18765
|
+
Provider: Provider$7
|
|
18766
|
+
} = store$7;
|
|
18324
18767
|
|
|
18325
18768
|
const CartContainer = ({
|
|
18326
18769
|
style,
|
|
@@ -18411,21 +18854,21 @@ const CartContainer = ({
|
|
|
18411
18854
|
default:
|
|
18412
18855
|
return state;
|
|
18413
18856
|
}
|
|
18414
|
-
}, initialState$
|
|
18857
|
+
}, initialState$7);
|
|
18415
18858
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18416
18859
|
style: { ...style
|
|
18417
18860
|
},
|
|
18418
18861
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18419
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18862
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
18420
18863
|
value: {
|
|
18421
18864
|
state,
|
|
18422
18865
|
dispatch
|
|
18423
18866
|
}
|
|
18424
18867
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18425
|
-
store: store$
|
|
18868
|
+
store: store$7,
|
|
18426
18869
|
key: i
|
|
18427
18870
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18428
|
-
store: store$
|
|
18871
|
+
store: store$7
|
|
18429
18872
|
})));
|
|
18430
18873
|
};
|
|
18431
18874
|
|
|
@@ -18462,7 +18905,7 @@ const CartSubmit = ({
|
|
|
18462
18905
|
buttonDisabled
|
|
18463
18906
|
},
|
|
18464
18907
|
dispatch
|
|
18465
|
-
} = React.useContext(store$
|
|
18908
|
+
} = React.useContext(store$7);
|
|
18466
18909
|
const {
|
|
18467
18910
|
t
|
|
18468
18911
|
} = useTranslation("cart");
|
|
@@ -18493,7 +18936,7 @@ const CartTotalPrice = () => {
|
|
|
18493
18936
|
state: {
|
|
18494
18937
|
alert
|
|
18495
18938
|
}
|
|
18496
|
-
} = React.useContext(store$
|
|
18939
|
+
} = React.useContext(store$7);
|
|
18497
18940
|
const {
|
|
18498
18941
|
cartItems
|
|
18499
18942
|
} = usePelcro();
|
|
@@ -18806,7 +19249,7 @@ const OrderConfirmModal = props => {
|
|
|
18806
19249
|
};
|
|
18807
19250
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18808
19251
|
|
|
18809
|
-
const initialState$
|
|
19252
|
+
const initialState$6 = {
|
|
18810
19253
|
email: "",
|
|
18811
19254
|
firstName: "",
|
|
18812
19255
|
lastName: "",
|
|
@@ -18818,10 +19261,10 @@ const initialState$5 = {
|
|
|
18818
19261
|
content: ""
|
|
18819
19262
|
}
|
|
18820
19263
|
};
|
|
18821
|
-
const store$
|
|
19264
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
18822
19265
|
const {
|
|
18823
|
-
Provider: Provider$
|
|
18824
|
-
} = store$
|
|
19266
|
+
Provider: Provider$6
|
|
19267
|
+
} = store$6;
|
|
18825
19268
|
|
|
18826
19269
|
const GiftCreateContainer = ({
|
|
18827
19270
|
style,
|
|
@@ -18925,21 +19368,21 @@ const GiftCreateContainer = ({
|
|
|
18925
19368
|
default:
|
|
18926
19369
|
return state;
|
|
18927
19370
|
}
|
|
18928
|
-
}, initialState$
|
|
19371
|
+
}, initialState$6);
|
|
18929
19372
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18930
19373
|
style: { ...style
|
|
18931
19374
|
},
|
|
18932
19375
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18933
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19376
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
18934
19377
|
value: {
|
|
18935
19378
|
state,
|
|
18936
19379
|
dispatch
|
|
18937
19380
|
}
|
|
18938
19381
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18939
|
-
store: store$
|
|
19382
|
+
store: store$6,
|
|
18940
19383
|
key: i
|
|
18941
19384
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18942
|
-
store: store$
|
|
19385
|
+
store: store$6
|
|
18943
19386
|
})));
|
|
18944
19387
|
};
|
|
18945
19388
|
|
|
@@ -18953,7 +19396,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18953
19396
|
state: {
|
|
18954
19397
|
disableSubmit
|
|
18955
19398
|
}
|
|
18956
|
-
} = React.useContext(store$
|
|
19399
|
+
} = React.useContext(store$6);
|
|
18957
19400
|
const {
|
|
18958
19401
|
t
|
|
18959
19402
|
} = useTranslation("register");
|
|
@@ -18970,29 +19413,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18970
19413
|
|
|
18971
19414
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
18972
19415
|
initWithUserEmail: false,
|
|
18973
|
-
store: store$
|
|
19416
|
+
store: store$6
|
|
18974
19417
|
}, props));
|
|
18975
19418
|
|
|
18976
19419
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
18977
|
-
store: store$
|
|
19420
|
+
store: store$6
|
|
18978
19421
|
}, props));
|
|
18979
19422
|
|
|
18980
19423
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
18981
|
-
store: store$
|
|
19424
|
+
store: store$6
|
|
18982
19425
|
}, props));
|
|
18983
19426
|
|
|
18984
|
-
var _path$
|
|
19427
|
+
var _path$h;
|
|
18985
19428
|
|
|
18986
|
-
function _extends$
|
|
19429
|
+
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
19430
|
|
|
18988
19431
|
function SvgInfoCircle(props) {
|
|
18989
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
19432
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
18990
19433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18991
19434
|
className: "plc-w-5 plc-h-5",
|
|
18992
19435
|
fill: "none",
|
|
18993
19436
|
viewBox: "0 0 24 24",
|
|
18994
19437
|
stroke: "currentColor"
|
|
18995
|
-
}, props), _path$
|
|
19438
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
18996
19439
|
strokeLinecap: "round",
|
|
18997
19440
|
strokeLinejoin: "round",
|
|
18998
19441
|
strokeWidth: 2,
|
|
@@ -19063,7 +19506,7 @@ const GiftCreateStartDate = props => {
|
|
|
19063
19506
|
const {
|
|
19064
19507
|
dispatch,
|
|
19065
19508
|
state
|
|
19066
|
-
} = React.useContext(store$
|
|
19509
|
+
} = React.useContext(store$6);
|
|
19067
19510
|
|
|
19068
19511
|
const handleInputChange = value => {
|
|
19069
19512
|
dispatch({
|
|
@@ -19128,13 +19571,17 @@ function TextArea({
|
|
|
19128
19571
|
*/
|
|
19129
19572
|
|
|
19130
19573
|
function GiftCreateMessage(props) {
|
|
19574
|
+
var _ref, _state$giftMessage;
|
|
19575
|
+
|
|
19131
19576
|
const {
|
|
19132
19577
|
t
|
|
19133
19578
|
} = useTranslation("register");
|
|
19134
19579
|
const {
|
|
19135
19580
|
dispatch,
|
|
19136
19581
|
state
|
|
19137
|
-
} = React.useContext(store$
|
|
19582
|
+
} = React.useContext(store$6);
|
|
19583
|
+
const MAX_CHARS_COUNT = 200;
|
|
19584
|
+
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
19138
19585
|
|
|
19139
19586
|
const handleInputChange = value => {
|
|
19140
19587
|
dispatch({
|
|
@@ -19152,6 +19599,9 @@ function GiftCreateMessage(props) {
|
|
|
19152
19599
|
value: state.giftMessage,
|
|
19153
19600
|
maxLength: "200",
|
|
19154
19601
|
rows: 3,
|
|
19602
|
+
label: t("gift.labels.giftMessage", {
|
|
19603
|
+
count: remainingCharsCount
|
|
19604
|
+
}),
|
|
19155
19605
|
tooltipText: t("gift.messages.giftMessageInfo")
|
|
19156
19606
|
}, props));
|
|
19157
19607
|
}
|
|
@@ -19201,8 +19651,7 @@ const GiftCreateView = props => {
|
|
|
19201
19651
|
}, /*#__PURE__*/React__default['default'].createElement(GiftCreateMessage, {
|
|
19202
19652
|
autoComplete: "gift-message",
|
|
19203
19653
|
id: "pelcro-input-gift-message",
|
|
19204
|
-
errorId: "pelcro-input-gift-message-error"
|
|
19205
|
-
label: t("gift.labels.giftMessage")
|
|
19654
|
+
errorId: "pelcro-input-gift-message-error"
|
|
19206
19655
|
})), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
19207
19656
|
className: "plc-text-gray-900 pelcro-footnote"
|
|
19208
19657
|
}, "* ", t("gift.labels.required")), /*#__PURE__*/React__default['default'].createElement(GiftCreateSubmitButton, {
|
|
@@ -19254,7 +19703,7 @@ const GiftCreateModal = ({
|
|
|
19254
19703
|
};
|
|
19255
19704
|
GiftCreateModal.viewId = "gift-create";
|
|
19256
19705
|
|
|
19257
|
-
const initialState$
|
|
19706
|
+
const initialState$5 = {
|
|
19258
19707
|
giftCode: "",
|
|
19259
19708
|
buttonDisabled: true,
|
|
19260
19709
|
alert: {
|
|
@@ -19262,10 +19711,10 @@ const initialState$4 = {
|
|
|
19262
19711
|
content: ""
|
|
19263
19712
|
}
|
|
19264
19713
|
};
|
|
19265
|
-
const store$
|
|
19714
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
19266
19715
|
const {
|
|
19267
|
-
Provider: Provider$
|
|
19268
|
-
} = store$
|
|
19716
|
+
Provider: Provider$5
|
|
19717
|
+
} = store$5;
|
|
19269
19718
|
|
|
19270
19719
|
const GiftRedeemContainer = ({
|
|
19271
19720
|
style,
|
|
@@ -19330,21 +19779,21 @@ const GiftRedeemContainer = ({
|
|
|
19330
19779
|
default:
|
|
19331
19780
|
return state;
|
|
19332
19781
|
}
|
|
19333
|
-
}, initialState$
|
|
19782
|
+
}, initialState$5);
|
|
19334
19783
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19335
19784
|
style: { ...style
|
|
19336
19785
|
},
|
|
19337
19786
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19338
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19787
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
19339
19788
|
value: {
|
|
19340
19789
|
state,
|
|
19341
19790
|
dispatch
|
|
19342
19791
|
}
|
|
19343
19792
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19344
|
-
store: store$
|
|
19793
|
+
store: store$5,
|
|
19345
19794
|
key: i
|
|
19346
19795
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19347
|
-
store: store$
|
|
19796
|
+
store: store$5
|
|
19348
19797
|
})));
|
|
19349
19798
|
};
|
|
19350
19799
|
|
|
@@ -19381,7 +19830,7 @@ function GiftCode({
|
|
|
19381
19830
|
}
|
|
19382
19831
|
|
|
19383
19832
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
19384
|
-
store: store$
|
|
19833
|
+
store: store$5
|
|
19385
19834
|
}, props));
|
|
19386
19835
|
|
|
19387
19836
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19394,7 +19843,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19394
19843
|
state: {
|
|
19395
19844
|
disableSubmit
|
|
19396
19845
|
}
|
|
19397
|
-
} = React.useContext(store$
|
|
19846
|
+
} = React.useContext(store$5);
|
|
19398
19847
|
const {
|
|
19399
19848
|
t
|
|
19400
19849
|
} = useTranslation("register");
|
|
@@ -19487,7 +19936,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19487
19936
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19488
19937
|
};
|
|
19489
19938
|
|
|
19490
|
-
const initialState$
|
|
19939
|
+
const initialState$4 = {
|
|
19491
19940
|
addresses: [],
|
|
19492
19941
|
selectedAddressId: null,
|
|
19493
19942
|
isSubmitting: false,
|
|
@@ -19496,10 +19945,10 @@ const initialState$3 = {
|
|
|
19496
19945
|
content: ""
|
|
19497
19946
|
}
|
|
19498
19947
|
};
|
|
19499
|
-
const store$
|
|
19948
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
19500
19949
|
const {
|
|
19501
|
-
Provider: Provider$
|
|
19502
|
-
} = store$
|
|
19950
|
+
Provider: Provider$4
|
|
19951
|
+
} = store$4;
|
|
19503
19952
|
|
|
19504
19953
|
const AddressSelectContainer = ({
|
|
19505
19954
|
style,
|
|
@@ -19594,7 +20043,7 @@ const AddressSelectContainer = ({
|
|
|
19594
20043
|
default:
|
|
19595
20044
|
return state;
|
|
19596
20045
|
}
|
|
19597
|
-
}, initialState$
|
|
20046
|
+
}, initialState$4);
|
|
19598
20047
|
React.useEffect(() => {
|
|
19599
20048
|
var _window$Pelcro$user$r;
|
|
19600
20049
|
|
|
@@ -19607,16 +20056,16 @@ const AddressSelectContainer = ({
|
|
|
19607
20056
|
style: { ...style
|
|
19608
20057
|
},
|
|
19609
20058
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19610
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20059
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
19611
20060
|
value: {
|
|
19612
20061
|
state,
|
|
19613
20062
|
dispatch
|
|
19614
20063
|
}
|
|
19615
20064
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19616
|
-
store: store$
|
|
20065
|
+
store: store$4,
|
|
19617
20066
|
key: i
|
|
19618
20067
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19619
|
-
store: store$
|
|
20068
|
+
store: store$4
|
|
19620
20069
|
})));
|
|
19621
20070
|
};
|
|
19622
20071
|
|
|
@@ -19627,7 +20076,7 @@ const AddressSelectList = () => {
|
|
|
19627
20076
|
addresses,
|
|
19628
20077
|
selectedAddressId
|
|
19629
20078
|
}
|
|
19630
|
-
} = React.useContext(store$
|
|
20079
|
+
} = React.useContext(store$4);
|
|
19631
20080
|
|
|
19632
20081
|
const handleAddressSelect = event => {
|
|
19633
20082
|
dispatch({
|
|
@@ -19671,7 +20120,7 @@ const AddressSelectSubmit = ({
|
|
|
19671
20120
|
selectedAddressId,
|
|
19672
20121
|
isSubmitting
|
|
19673
20122
|
}
|
|
19674
|
-
} = React.useContext(store$
|
|
20123
|
+
} = React.useContext(store$4);
|
|
19675
20124
|
const {
|
|
19676
20125
|
t
|
|
19677
20126
|
} = useTranslation("address");
|
|
@@ -19759,10 +20208,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19759
20208
|
|
|
19760
20209
|
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
20210
|
const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
|
|
20211
|
+
|
|
20212
|
+
if (defaultPaymentMethod.status !== "chargeable") {
|
|
20213
|
+
return paymentMethodsWithoutDefault;
|
|
20214
|
+
}
|
|
20215
|
+
|
|
19762
20216
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19763
20217
|
};
|
|
19764
20218
|
|
|
19765
|
-
const initialState$
|
|
20219
|
+
const initialState$3 = {
|
|
19766
20220
|
paymentMethods: [],
|
|
19767
20221
|
selectedPaymentMethodId: null,
|
|
19768
20222
|
isSubmitting: false,
|
|
@@ -19771,10 +20225,10 @@ const initialState$2 = {
|
|
|
19771
20225
|
content: ""
|
|
19772
20226
|
}
|
|
19773
20227
|
};
|
|
19774
|
-
const store$
|
|
20228
|
+
const store$3 = /*#__PURE__*/React.createContext(initialState$3);
|
|
19775
20229
|
const {
|
|
19776
|
-
Provider: Provider$
|
|
19777
|
-
} = store$
|
|
20230
|
+
Provider: Provider$3
|
|
20231
|
+
} = store$3;
|
|
19778
20232
|
|
|
19779
20233
|
const PaymentMethodSelectContainer = ({
|
|
19780
20234
|
style,
|
|
@@ -19819,7 +20273,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19819
20273
|
default:
|
|
19820
20274
|
return state;
|
|
19821
20275
|
}
|
|
19822
|
-
}, initialState$
|
|
20276
|
+
}, initialState$3);
|
|
19823
20277
|
React.useEffect(() => {
|
|
19824
20278
|
var _window$Pelcro$user$r4;
|
|
19825
20279
|
|
|
@@ -19832,16 +20286,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19832
20286
|
style: { ...style
|
|
19833
20287
|
},
|
|
19834
20288
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19835
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20289
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
|
|
19836
20290
|
value: {
|
|
19837
20291
|
state,
|
|
19838
20292
|
dispatch
|
|
19839
20293
|
}
|
|
19840
20294
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19841
|
-
store: store$
|
|
20295
|
+
store: store$3,
|
|
19842
20296
|
key: i
|
|
19843
20297
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19844
|
-
store: store$
|
|
20298
|
+
store: store$3
|
|
19845
20299
|
})));
|
|
19846
20300
|
};
|
|
19847
20301
|
|
|
@@ -19855,7 +20309,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19855
20309
|
paymentMethods,
|
|
19856
20310
|
selectedPaymentMethodId
|
|
19857
20311
|
}
|
|
19858
|
-
} = React.useContext(store$
|
|
20312
|
+
} = React.useContext(store$3);
|
|
19859
20313
|
|
|
19860
20314
|
const handlePaymentMethodSelect = event => {
|
|
19861
20315
|
dispatch({
|
|
@@ -19905,7 +20359,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19905
20359
|
selectedPaymentMethodId,
|
|
19906
20360
|
isSubmitting
|
|
19907
20361
|
}
|
|
19908
|
-
} = React.useContext(store$
|
|
20362
|
+
} = React.useContext(store$3);
|
|
19909
20363
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19910
20364
|
onClick: () => {
|
|
19911
20365
|
dispatch({
|
|
@@ -19979,8 +20433,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19979
20433
|
};
|
|
19980
20434
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19981
20435
|
|
|
19982
|
-
function _extends$
|
|
19983
|
-
_extends$
|
|
20436
|
+
function _extends$i() {
|
|
20437
|
+
_extends$i = Object.assign || function (target) {
|
|
19984
20438
|
for (var i = 1; i < arguments.length; i++) {
|
|
19985
20439
|
var source = arguments[i];
|
|
19986
20440
|
|
|
@@ -19994,7 +20448,7 @@ function _extends$h() {
|
|
|
19994
20448
|
return target;
|
|
19995
20449
|
};
|
|
19996
20450
|
|
|
19997
|
-
return _extends$
|
|
20451
|
+
return _extends$i.apply(this, arguments);
|
|
19998
20452
|
}
|
|
19999
20453
|
|
|
20000
20454
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20178,7 +20632,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20178
20632
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20179
20633
|
return null;
|
|
20180
20634
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20181
|
-
return _render(_extends$
|
|
20635
|
+
return _render(_extends$i({}, _rest, {
|
|
20182
20636
|
hidden: true,
|
|
20183
20637
|
style: {
|
|
20184
20638
|
display: 'none'
|
|
@@ -20706,7 +21160,7 @@ function TransitionChild(props) {
|
|
|
20706
21160
|
var passthroughProps = rest;
|
|
20707
21161
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20708
21162
|
value: nesting
|
|
20709
|
-
}, render(_extends$
|
|
21163
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20710
21164
|
}
|
|
20711
21165
|
|
|
20712
21166
|
function Transition(props) {
|
|
@@ -20750,7 +21204,7 @@ function Transition(props) {
|
|
|
20750
21204
|
value: nestingBag
|
|
20751
21205
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20752
21206
|
value: transitionBag
|
|
20753
|
-
}, render(_extends$
|
|
21207
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20754
21208
|
as: React.Fragment,
|
|
20755
21209
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20756
21210
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20877,12 +21331,12 @@ var ActionTypes;
|
|
|
20877
21331
|
})(ActionTypes || (ActionTypes = {}));
|
|
20878
21332
|
|
|
20879
21333
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20880
|
-
return _extends$
|
|
21334
|
+
return _extends$i({}, state, {
|
|
20881
21335
|
activeItemIndex: null,
|
|
20882
21336
|
menuState: MenuStates.Closed
|
|
20883
21337
|
});
|
|
20884
21338
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20885
|
-
return _extends$
|
|
21339
|
+
return _extends$i({}, state, {
|
|
20886
21340
|
menuState: MenuStates.Open
|
|
20887
21341
|
});
|
|
20888
21342
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20901,7 +21355,7 @@ var ActionTypes;
|
|
|
20901
21355
|
}
|
|
20902
21356
|
});
|
|
20903
21357
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20904
|
-
return _extends$
|
|
21358
|
+
return _extends$i({}, state, {
|
|
20905
21359
|
searchQuery: '',
|
|
20906
21360
|
activeItemIndex: activeItemIndex
|
|
20907
21361
|
});
|
|
@@ -20912,19 +21366,19 @@ var ActionTypes;
|
|
|
20912
21366
|
|
|
20913
21367
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20914
21368
|
});
|
|
20915
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21369
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20916
21370
|
searchQuery: searchQuery
|
|
20917
21371
|
});
|
|
20918
|
-
return _extends$
|
|
21372
|
+
return _extends$i({}, state, {
|
|
20919
21373
|
searchQuery: searchQuery,
|
|
20920
21374
|
activeItemIndex: match
|
|
20921
21375
|
});
|
|
20922
21376
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20923
|
-
return _extends$
|
|
21377
|
+
return _extends$i({}, state, {
|
|
20924
21378
|
searchQuery: ''
|
|
20925
21379
|
});
|
|
20926
21380
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20927
|
-
return _extends$
|
|
21381
|
+
return _extends$i({}, state, {
|
|
20928
21382
|
items: [].concat(state.items, [{
|
|
20929
21383
|
id: action.id,
|
|
20930
21384
|
dataRef: action.dataRef
|
|
@@ -20937,7 +21391,7 @@ var ActionTypes;
|
|
|
20937
21391
|
return a.id === action.id;
|
|
20938
21392
|
});
|
|
20939
21393
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20940
|
-
return _extends$
|
|
21394
|
+
return _extends$i({}, state, {
|
|
20941
21395
|
items: nextItems,
|
|
20942
21396
|
activeItemIndex: function () {
|
|
20943
21397
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20976,19 +21430,19 @@ var ActionTypes$1;
|
|
|
20976
21430
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20977
21431
|
if (state.disabled) return state;
|
|
20978
21432
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20979
|
-
return _extends$
|
|
21433
|
+
return _extends$i({}, state, {
|
|
20980
21434
|
activeOptionIndex: null,
|
|
20981
21435
|
listboxState: ListboxStates.Closed
|
|
20982
21436
|
});
|
|
20983
21437
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20984
21438
|
if (state.disabled) return state;
|
|
20985
21439
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20986
|
-
return _extends$
|
|
21440
|
+
return _extends$i({}, state, {
|
|
20987
21441
|
listboxState: ListboxStates.Open
|
|
20988
21442
|
});
|
|
20989
21443
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20990
21444
|
if (state.disabled === action.disabled) return state;
|
|
20991
|
-
return _extends$
|
|
21445
|
+
return _extends$i({}, state, {
|
|
20992
21446
|
disabled: action.disabled
|
|
20993
21447
|
});
|
|
20994
21448
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21009,7 +21463,7 @@ var ActionTypes$1;
|
|
|
21009
21463
|
}
|
|
21010
21464
|
});
|
|
21011
21465
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21012
|
-
return _extends$
|
|
21466
|
+
return _extends$i({}, state, {
|
|
21013
21467
|
searchQuery: '',
|
|
21014
21468
|
activeOptionIndex: activeOptionIndex
|
|
21015
21469
|
});
|
|
@@ -21022,10 +21476,10 @@ var ActionTypes$1;
|
|
|
21022
21476
|
|
|
21023
21477
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21024
21478
|
});
|
|
21025
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21479
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21026
21480
|
searchQuery: searchQuery
|
|
21027
21481
|
});
|
|
21028
|
-
return _extends$
|
|
21482
|
+
return _extends$i({}, state, {
|
|
21029
21483
|
searchQuery: searchQuery,
|
|
21030
21484
|
activeOptionIndex: match
|
|
21031
21485
|
});
|
|
@@ -21033,11 +21487,11 @@ var ActionTypes$1;
|
|
|
21033
21487
|
if (state.disabled) return state;
|
|
21034
21488
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21035
21489
|
if (state.searchQuery === '') return state;
|
|
21036
|
-
return _extends$
|
|
21490
|
+
return _extends$i({}, state, {
|
|
21037
21491
|
searchQuery: ''
|
|
21038
21492
|
});
|
|
21039
21493
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21040
|
-
return _extends$
|
|
21494
|
+
return _extends$i({}, state, {
|
|
21041
21495
|
options: [].concat(state.options, [{
|
|
21042
21496
|
id: action.id,
|
|
21043
21497
|
dataRef: action.dataRef
|
|
@@ -21050,7 +21504,7 @@ var ActionTypes$1;
|
|
|
21050
21504
|
return a.id === action.id;
|
|
21051
21505
|
});
|
|
21052
21506
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21053
|
-
return _extends$
|
|
21507
|
+
return _extends$i({}, state, {
|
|
21054
21508
|
options: nextOptions,
|
|
21055
21509
|
activeOptionIndex: function () {
|
|
21056
21510
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21111,18 +21565,18 @@ const getPaymentCardIcon = name => {
|
|
|
21111
21565
|
}));
|
|
21112
21566
|
};
|
|
21113
21567
|
|
|
21114
|
-
var _path$
|
|
21568
|
+
var _path$g;
|
|
21115
21569
|
|
|
21116
|
-
function _extends$
|
|
21570
|
+
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
21571
|
|
|
21118
21572
|
function SvgChevronRight(props) {
|
|
21119
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21573
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
21120
21574
|
className: "plc-w-6 plc-h-6",
|
|
21121
21575
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21122
21576
|
fill: "none",
|
|
21123
21577
|
viewBox: "0 0 24 24",
|
|
21124
21578
|
stroke: "currentColor"
|
|
21125
|
-
}, props), _path$
|
|
21579
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21126
21580
|
strokeLinecap: "round",
|
|
21127
21581
|
strokeLinejoin: "round",
|
|
21128
21582
|
strokeWidth: 2,
|
|
@@ -21338,18 +21792,18 @@ const SavedItems = ({
|
|
|
21338
21792
|
});
|
|
21339
21793
|
};
|
|
21340
21794
|
|
|
21341
|
-
var _path$
|
|
21795
|
+
var _path$f;
|
|
21342
21796
|
|
|
21343
|
-
function _extends$
|
|
21797
|
+
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
21798
|
|
|
21345
21799
|
function SvgRefresh(props) {
|
|
21346
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21800
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
21347
21801
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21348
21802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21349
21803
|
fill: "none",
|
|
21350
21804
|
viewBox: "0 0 24 24",
|
|
21351
21805
|
stroke: "currentColor"
|
|
21352
|
-
}, props), _path$
|
|
21806
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21353
21807
|
strokeLinecap: "round",
|
|
21354
21808
|
strokeLinejoin: "round",
|
|
21355
21809
|
strokeWidth: 2,
|
|
@@ -21357,35 +21811,35 @@ function SvgRefresh(props) {
|
|
|
21357
21811
|
})));
|
|
21358
21812
|
}
|
|
21359
21813
|
|
|
21360
|
-
var _path$
|
|
21814
|
+
var _path$e;
|
|
21361
21815
|
|
|
21362
|
-
function _extends$
|
|
21816
|
+
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
21817
|
|
|
21364
21818
|
function SvgCalendar(props) {
|
|
21365
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21819
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
21366
21820
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21367
21821
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21368
21822
|
viewBox: "0 0 20 20",
|
|
21369
21823
|
fill: "currentColor"
|
|
21370
|
-
}, props), _path$
|
|
21824
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21371
21825
|
fillRule: "evenodd",
|
|
21372
21826
|
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
21827
|
clipRule: "evenodd"
|
|
21374
21828
|
})));
|
|
21375
21829
|
}
|
|
21376
21830
|
|
|
21377
|
-
var _path$
|
|
21831
|
+
var _path$d;
|
|
21378
21832
|
|
|
21379
|
-
function _extends$
|
|
21833
|
+
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
21834
|
|
|
21381
21835
|
function SvgPlus(props) {
|
|
21382
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21836
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21383
21837
|
className: "plc-w-5 plc-h-5",
|
|
21384
21838
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21385
21839
|
fill: "none",
|
|
21386
21840
|
viewBox: "0 0 24 24",
|
|
21387
21841
|
stroke: "currentColor"
|
|
21388
|
-
}, props), _path$
|
|
21842
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21389
21843
|
strokeLinecap: "round",
|
|
21390
21844
|
strokeLinejoin: "round",
|
|
21391
21845
|
strokeWidth: 2,
|
|
@@ -21393,17 +21847,17 @@ function SvgPlus(props) {
|
|
|
21393
21847
|
})));
|
|
21394
21848
|
}
|
|
21395
21849
|
|
|
21396
|
-
var _path$
|
|
21850
|
+
var _path$c;
|
|
21397
21851
|
|
|
21398
|
-
function _extends$
|
|
21852
|
+
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
21853
|
|
|
21400
21854
|
function SvgCheckMark(props) {
|
|
21401
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21855
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21402
21856
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21403
21857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21404
21858
|
viewBox: "0 0 20 20",
|
|
21405
21859
|
fill: "currentColor"
|
|
21406
|
-
}, props), _path$
|
|
21860
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21407
21861
|
fillRule: "evenodd",
|
|
21408
21862
|
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
21863
|
clipRule: "evenodd"
|
|
@@ -21698,13 +22152,31 @@ Accordion.item = function AccordionItem({
|
|
|
21698
22152
|
}, content)) : null;
|
|
21699
22153
|
};
|
|
21700
22154
|
|
|
22155
|
+
var _path$b;
|
|
22156
|
+
|
|
22157
|
+
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); }
|
|
22158
|
+
|
|
22159
|
+
function SvgExit(props) {
|
|
22160
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
22161
|
+
className: "plc-w-6 plc-h-6",
|
|
22162
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22163
|
+
fill: "none",
|
|
22164
|
+
viewBox: "0 0 24 24",
|
|
22165
|
+
stroke: "currentColor"
|
|
22166
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22167
|
+
strokeLinecap: "round",
|
|
22168
|
+
strokeLinejoin: "round",
|
|
22169
|
+
strokeWidth: 2,
|
|
22170
|
+
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"
|
|
22171
|
+
})));
|
|
22172
|
+
}
|
|
22173
|
+
|
|
21701
22174
|
var _path$a;
|
|
21702
22175
|
|
|
21703
22176
|
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
22177
|
|
|
21705
|
-
function
|
|
22178
|
+
function SvgUser(props) {
|
|
21706
22179
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21707
|
-
className: "plc-w-6 plc-h-6",
|
|
21708
22180
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21709
22181
|
fill: "none",
|
|
21710
22182
|
viewBox: "0 0 24 24",
|
|
@@ -21713,7 +22185,7 @@ function SvgExit(props) {
|
|
|
21713
22185
|
strokeLinecap: "round",
|
|
21714
22186
|
strokeLinejoin: "round",
|
|
21715
22187
|
strokeWidth: 2,
|
|
21716
|
-
d: "
|
|
22188
|
+
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
22189
|
})));
|
|
21718
22190
|
}
|
|
21719
22191
|
|
|
@@ -21721,9 +22193,10 @@ var _path$9;
|
|
|
21721
22193
|
|
|
21722
22194
|
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
22195
|
|
|
21724
|
-
function
|
|
22196
|
+
function SvgNewsletter(props) {
|
|
21725
22197
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21726
22198
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22199
|
+
className: "plc-h-5 plc-w-5",
|
|
21727
22200
|
fill: "none",
|
|
21728
22201
|
viewBox: "0 0 24 24",
|
|
21729
22202
|
stroke: "currentColor"
|
|
@@ -21731,7 +22204,7 @@ function SvgUser(props) {
|
|
|
21731
22204
|
strokeLinecap: "round",
|
|
21732
22205
|
strokeLinejoin: "round",
|
|
21733
22206
|
strokeWidth: 2,
|
|
21734
|
-
d: "
|
|
22207
|
+
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
22208
|
})));
|
|
21736
22209
|
}
|
|
21737
22210
|
|
|
@@ -21739,10 +22212,10 @@ var _path$8;
|
|
|
21739
22212
|
|
|
21740
22213
|
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
22214
|
|
|
21742
|
-
function
|
|
22215
|
+
function SvgDocument(props) {
|
|
21743
22216
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21744
22217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21745
|
-
className: "plc-h-
|
|
22218
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21746
22219
|
fill: "none",
|
|
21747
22220
|
viewBox: "0 0 24 24",
|
|
21748
22221
|
stroke: "currentColor"
|
|
@@ -21750,7 +22223,7 @@ function SvgNewsletter(props) {
|
|
|
21750
22223
|
strokeLinecap: "round",
|
|
21751
22224
|
strokeLinejoin: "round",
|
|
21752
22225
|
strokeWidth: 2,
|
|
21753
|
-
d: "
|
|
22226
|
+
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
22227
|
})));
|
|
21755
22228
|
}
|
|
21756
22229
|
|
|
@@ -21918,9 +22391,11 @@ const DonationsMenu = () => {
|
|
|
21918
22391
|
};
|
|
21919
22392
|
|
|
21920
22393
|
function getDonationSubs() {
|
|
21921
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22394
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
21922
22395
|
|
|
21923
|
-
|
|
22396
|
+
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 : [];
|
|
22397
|
+
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 : [];
|
|
22398
|
+
return [...donations, ...canceledDonations];
|
|
21924
22399
|
}
|
|
21925
22400
|
|
|
21926
22401
|
function formatStartDate(date) {
|
|
@@ -21928,6 +22403,138 @@ function formatStartDate(date) {
|
|
|
21928
22403
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21929
22404
|
}
|
|
21930
22405
|
|
|
22406
|
+
const InvoicesMenu = props => {
|
|
22407
|
+
const {
|
|
22408
|
+
t
|
|
22409
|
+
} = useTranslation("dashboard");
|
|
22410
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
22411
|
+
className: "plc-w-full plc-table-fixed"
|
|
22412
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
22413
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22414
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22415
|
+
className: "plc-w-4/12 "
|
|
22416
|
+
}, t("labels.details")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22417
|
+
className: "plc-w-4/12 "
|
|
22418
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22419
|
+
className: "plc-w-3/12 "
|
|
22420
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22421
|
+
className: "plc-h-4"
|
|
22422
|
+
}), /*#__PURE__*/React__default['default'].createElement(InvoicesItems, props)));
|
|
22423
|
+
};
|
|
22424
|
+
|
|
22425
|
+
const InvoicesItems = () => {
|
|
22426
|
+
var _window$Pelcro$invoic, _window$Pelcro$invoic2;
|
|
22427
|
+
|
|
22428
|
+
const {
|
|
22429
|
+
t
|
|
22430
|
+
} = useTranslation("dashboard");
|
|
22431
|
+
const {
|
|
22432
|
+
setInvoice,
|
|
22433
|
+
switchView
|
|
22434
|
+
} = usePelcro();
|
|
22435
|
+
const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22436
|
+
|
|
22437
|
+
const showInvoiceDetails = event => {
|
|
22438
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22439
|
+
switchView("invoice-details");
|
|
22440
|
+
}
|
|
22441
|
+
};
|
|
22442
|
+
|
|
22443
|
+
if (invoices.length === 0) return null;
|
|
22444
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22445
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22446
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22447
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22448
|
+
key: invoice.id,
|
|
22449
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22450
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22451
|
+
className: "plc-truncate"
|
|
22452
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22453
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22454
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22455
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22456
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22457
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22458
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22459
|
+
className: "plc-py-2"
|
|
22460
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22461
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22462
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
22463
|
+
variant: "ghost",
|
|
22464
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22465
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, {
|
|
22466
|
+
className: "plc-w-4 plc-h-4"
|
|
22467
|
+
}),
|
|
22468
|
+
onClick: showInvoiceDetails,
|
|
22469
|
+
"data-id": invoice.id
|
|
22470
|
+
}, t("labels.view"))));
|
|
22471
|
+
});
|
|
22472
|
+
};
|
|
22473
|
+
|
|
22474
|
+
function getInvoiceStatus(invoice) {
|
|
22475
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22476
|
+
returnObjects: true
|
|
22477
|
+
});
|
|
22478
|
+
|
|
22479
|
+
switch (invoice.status) {
|
|
22480
|
+
case "paid":
|
|
22481
|
+
return {
|
|
22482
|
+
textColor: "plc-text-green-700",
|
|
22483
|
+
bgColor: "plc-bg-green-100",
|
|
22484
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null),
|
|
22485
|
+
title: translations.paid
|
|
22486
|
+
};
|
|
22487
|
+
|
|
22488
|
+
case "past_due":
|
|
22489
|
+
return {
|
|
22490
|
+
textColor: "plc-text-orange-700",
|
|
22491
|
+
bgColor: "plc-bg-orange-100",
|
|
22492
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22493
|
+
title: translations.pastDue
|
|
22494
|
+
};
|
|
22495
|
+
|
|
22496
|
+
case "open":
|
|
22497
|
+
return {
|
|
22498
|
+
textColor: "plc-text-yellow-700",
|
|
22499
|
+
bgColor: "plc-bg-yellow-100",
|
|
22500
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22501
|
+
title: translations.open
|
|
22502
|
+
};
|
|
22503
|
+
|
|
22504
|
+
case "draft":
|
|
22505
|
+
return {
|
|
22506
|
+
textColor: "plc-text-blue-700",
|
|
22507
|
+
bgColor: "plc-bg-blue-100",
|
|
22508
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
22509
|
+
title: translations.draft
|
|
22510
|
+
};
|
|
22511
|
+
|
|
22512
|
+
case "scheduled":
|
|
22513
|
+
return {
|
|
22514
|
+
textColor: "plc-text-blue-700",
|
|
22515
|
+
bgColor: "plc-bg-blue-100",
|
|
22516
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCalendar, null),
|
|
22517
|
+
title: translations.scheduled
|
|
22518
|
+
};
|
|
22519
|
+
|
|
22520
|
+
case "uncollectible":
|
|
22521
|
+
return {
|
|
22522
|
+
textColor: "plc-text-red-700",
|
|
22523
|
+
bgColor: "plc-bg-red-100",
|
|
22524
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22525
|
+
title: translations.uncollectible
|
|
22526
|
+
};
|
|
22527
|
+
|
|
22528
|
+
case "void":
|
|
22529
|
+
return {
|
|
22530
|
+
textColor: "plc-text-gray-700",
|
|
22531
|
+
bgColor: "plc-bg-gray-100",
|
|
22532
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22533
|
+
title: translations.void
|
|
22534
|
+
};
|
|
22535
|
+
}
|
|
22536
|
+
}
|
|
22537
|
+
|
|
21931
22538
|
const SUB_MENUS = {
|
|
21932
22539
|
PROFILE: "profile",
|
|
21933
22540
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21936,6 +22543,7 @@ const SUB_MENUS = {
|
|
|
21936
22543
|
ADDRESSES: "addresses",
|
|
21937
22544
|
GIFTS: "gifts",
|
|
21938
22545
|
ORDERS: "orders",
|
|
22546
|
+
INVOICES: "invoices",
|
|
21939
22547
|
SAVED_ITEMS: "saved-items"
|
|
21940
22548
|
};
|
|
21941
22549
|
/**
|
|
@@ -22478,6 +23086,12 @@ class Dashboard extends React.Component {
|
|
|
22478
23086
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
|
|
22479
23087
|
title: this.locale("labels.orders.label"),
|
|
22480
23088
|
content: /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null)
|
|
23089
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
23090
|
+
show: hasInvoices(),
|
|
23091
|
+
name: SUB_MENUS.INVOICES,
|
|
23092
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
|
|
23093
|
+
title: this.locale("labels.invoices"),
|
|
23094
|
+
content: /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null)
|
|
22481
23095
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22482
23096
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22483
23097
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -22493,11 +23107,19 @@ class Dashboard extends React.Component {
|
|
|
22493
23107
|
|
|
22494
23108
|
}
|
|
22495
23109
|
|
|
23110
|
+
function hasInvoices() {
|
|
23111
|
+
var _window$Pelcro$invoic, _window$Pelcro$invoic2;
|
|
23112
|
+
|
|
23113
|
+
const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
23114
|
+
return invoices.length > 0;
|
|
23115
|
+
}
|
|
23116
|
+
|
|
22496
23117
|
function hasDonationSubs() {
|
|
22497
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
23118
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
22498
23119
|
|
|
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
|
-
|
|
23120
|
+
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 : [];
|
|
23121
|
+
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 : [];
|
|
23122
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22501
23123
|
}
|
|
22502
23124
|
|
|
22503
23125
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
@@ -22527,7 +23149,7 @@ const DashboardOpenButton = () => {
|
|
|
22527
23149
|
};
|
|
22528
23150
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22529
23151
|
|
|
22530
|
-
const initialState$
|
|
23152
|
+
const initialState$2 = {
|
|
22531
23153
|
imageSrc: null,
|
|
22532
23154
|
crop: {
|
|
22533
23155
|
x: 0,
|
|
@@ -22541,10 +23163,10 @@ const initialState$1 = {
|
|
|
22541
23163
|
content: ""
|
|
22542
23164
|
}
|
|
22543
23165
|
};
|
|
22544
|
-
const store$
|
|
23166
|
+
const store$2 = /*#__PURE__*/React.createContext(initialState$2);
|
|
22545
23167
|
const {
|
|
22546
|
-
Provider: Provider$
|
|
22547
|
-
} = store$
|
|
23168
|
+
Provider: Provider$2
|
|
23169
|
+
} = store$2;
|
|
22548
23170
|
|
|
22549
23171
|
const ProfilePicChangeContainer = ({
|
|
22550
23172
|
style,
|
|
@@ -22678,21 +23300,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22678
23300
|
default:
|
|
22679
23301
|
return state;
|
|
22680
23302
|
}
|
|
22681
|
-
}, initialState$
|
|
23303
|
+
}, initialState$2);
|
|
22682
23304
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22683
23305
|
style: { ...style
|
|
22684
23306
|
},
|
|
22685
23307
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22686
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23308
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
|
|
22687
23309
|
value: {
|
|
22688
23310
|
state,
|
|
22689
23311
|
dispatch
|
|
22690
23312
|
}
|
|
22691
23313
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22692
|
-
store: store$
|
|
23314
|
+
store: store$2,
|
|
22693
23315
|
key: i
|
|
22694
23316
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22695
|
-
store: store$
|
|
23317
|
+
store: store$2
|
|
22696
23318
|
})));
|
|
22697
23319
|
};
|
|
22698
23320
|
/**
|
|
@@ -22754,7 +23376,7 @@ const ProfilePicChangeButton = ({
|
|
|
22754
23376
|
isSubmitting
|
|
22755
23377
|
},
|
|
22756
23378
|
dispatch
|
|
22757
|
-
} = React.useContext(store$
|
|
23379
|
+
} = React.useContext(store$2);
|
|
22758
23380
|
const {
|
|
22759
23381
|
t
|
|
22760
23382
|
} = useTranslation("userEdit");
|
|
@@ -24122,7 +24744,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24122
24744
|
zoom
|
|
24123
24745
|
},
|
|
24124
24746
|
dispatch
|
|
24125
|
-
} = React.useContext(store$
|
|
24747
|
+
} = React.useContext(store$2);
|
|
24126
24748
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24127
24749
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24128
24750
|
}, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
|
|
@@ -24164,7 +24786,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24164
24786
|
zoom
|
|
24165
24787
|
},
|
|
24166
24788
|
dispatch
|
|
24167
|
-
} = React.useContext(store$
|
|
24789
|
+
} = React.useContext(store$2);
|
|
24168
24790
|
const {
|
|
24169
24791
|
t
|
|
24170
24792
|
} = useTranslation("userEdit");
|
|
@@ -24216,7 +24838,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24216
24838
|
state: {
|
|
24217
24839
|
isSubmitting
|
|
24218
24840
|
}
|
|
24219
|
-
} = React.useContext(store$
|
|
24841
|
+
} = React.useContext(store$2);
|
|
24220
24842
|
const {
|
|
24221
24843
|
t
|
|
24222
24844
|
} = useTranslation("userEdit");
|
|
@@ -24258,7 +24880,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24258
24880
|
state: {
|
|
24259
24881
|
isSubmitting
|
|
24260
24882
|
}
|
|
24261
|
-
} = React.useContext(store$
|
|
24883
|
+
} = React.useContext(store$2);
|
|
24262
24884
|
const {
|
|
24263
24885
|
t
|
|
24264
24886
|
} = useTranslation("userEdit");
|
|
@@ -24281,7 +24903,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24281
24903
|
state: {
|
|
24282
24904
|
imageSrc
|
|
24283
24905
|
}
|
|
24284
|
-
} = React.useContext(store$
|
|
24906
|
+
} = React.useContext(store$2);
|
|
24285
24907
|
const {
|
|
24286
24908
|
t
|
|
24287
24909
|
} = useTranslation("userEdit");
|
|
@@ -24343,17 +24965,17 @@ function ProfilePicChangeModal({
|
|
|
24343
24965
|
}
|
|
24344
24966
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24345
24967
|
|
|
24346
|
-
const initialState = {
|
|
24968
|
+
const initialState$1 = {
|
|
24347
24969
|
isSubmitting: false,
|
|
24348
24970
|
alert: {
|
|
24349
24971
|
type: "error",
|
|
24350
24972
|
content: ""
|
|
24351
24973
|
}
|
|
24352
24974
|
};
|
|
24353
|
-
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24975
|
+
const store$1 = /*#__PURE__*/React.createContext(initialState$1);
|
|
24354
24976
|
const {
|
|
24355
|
-
Provider
|
|
24356
|
-
} = store;
|
|
24977
|
+
Provider: Provider$1
|
|
24978
|
+
} = store$1;
|
|
24357
24979
|
|
|
24358
24980
|
const EmailVerifyContainer = ({
|
|
24359
24981
|
style,
|
|
@@ -24416,21 +25038,21 @@ const EmailVerifyContainer = ({
|
|
|
24416
25038
|
default:
|
|
24417
25039
|
return state;
|
|
24418
25040
|
}
|
|
24419
|
-
}, initialState);
|
|
25041
|
+
}, initialState$1);
|
|
24420
25042
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24421
25043
|
style: { ...style
|
|
24422
25044
|
},
|
|
24423
25045
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24424
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25046
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
|
|
24425
25047
|
value: {
|
|
24426
25048
|
state,
|
|
24427
25049
|
dispatch
|
|
24428
25050
|
}
|
|
24429
25051
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24430
|
-
store,
|
|
25052
|
+
store: store$1,
|
|
24431
25053
|
key: i
|
|
24432
25054
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24433
|
-
store
|
|
25055
|
+
store: store$1
|
|
24434
25056
|
})));
|
|
24435
25057
|
};
|
|
24436
25058
|
|
|
@@ -24444,7 +25066,7 @@ const EmailVerifyResendButton = ({
|
|
|
24444
25066
|
state: {
|
|
24445
25067
|
isSubmitting
|
|
24446
25068
|
}
|
|
24447
|
-
} = React.useContext(store);
|
|
25069
|
+
} = React.useContext(store$1);
|
|
24448
25070
|
const {
|
|
24449
25071
|
t
|
|
24450
25072
|
} = useTranslation("verifyEmail");
|
|
@@ -24519,6 +25141,235 @@ const EmailVerifyModal = ({
|
|
|
24519
25141
|
};
|
|
24520
25142
|
EmailVerifyModal.viewId = "email-verify";
|
|
24521
25143
|
|
|
25144
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
25145
|
+
type: "invoicePayment",
|
|
25146
|
+
className: "pelcro-invoice-payment-container"
|
|
25147
|
+
}, props));
|
|
25148
|
+
|
|
25149
|
+
const InvoicePaymentView = props => {
|
|
25150
|
+
const {
|
|
25151
|
+
t
|
|
25152
|
+
} = useTranslation("payment");
|
|
25153
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25154
|
+
id: "pelcro-invoice-payment-view"
|
|
25155
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25156
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25157
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25158
|
+
action: "javascript:void(0);",
|
|
25159
|
+
className: "plc-mt-2 pelcro-form"
|
|
25160
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
|
|
25161
|
+
type: "invoicePayment",
|
|
25162
|
+
showCoupon: false,
|
|
25163
|
+
showExternalPaymentMethods: true
|
|
25164
|
+
}, props))));
|
|
25165
|
+
};
|
|
25166
|
+
|
|
25167
|
+
const InvoicePaymentModal = ({
|
|
25168
|
+
onDisplay,
|
|
25169
|
+
onClose,
|
|
25170
|
+
...otherProps
|
|
25171
|
+
}) => {
|
|
25172
|
+
const {
|
|
25173
|
+
switchView
|
|
25174
|
+
} = usePelcro();
|
|
25175
|
+
|
|
25176
|
+
const onSuccess = () => {
|
|
25177
|
+
var _otherProps$onSuccess;
|
|
25178
|
+
|
|
25179
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25180
|
+
return switchView("subscription-success");
|
|
25181
|
+
};
|
|
25182
|
+
|
|
25183
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25184
|
+
id: "pelcro-invoice-payment-modal",
|
|
25185
|
+
onDisplay: onDisplay,
|
|
25186
|
+
onClose: onClose
|
|
25187
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
25188
|
+
onSuccess: onSuccess
|
|
25189
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25190
|
+
};
|
|
25191
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
25192
|
+
|
|
25193
|
+
const invoicePaymentSubmitButton = props => {
|
|
25194
|
+
return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
|
|
25195
|
+
};
|
|
25196
|
+
|
|
25197
|
+
const initialState = {};
|
|
25198
|
+
const store = /*#__PURE__*/React.createContext(initialState);
|
|
25199
|
+
const {
|
|
25200
|
+
Provider
|
|
25201
|
+
} = store;
|
|
25202
|
+
|
|
25203
|
+
const InvoiceDetailsContainer = ({
|
|
25204
|
+
style,
|
|
25205
|
+
className = "",
|
|
25206
|
+
onSuccess = () => {},
|
|
25207
|
+
children,
|
|
25208
|
+
...props
|
|
25209
|
+
}) => {
|
|
25210
|
+
const onPayButtonClick = () => {
|
|
25211
|
+
return onSuccess();
|
|
25212
|
+
};
|
|
25213
|
+
|
|
25214
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
25215
|
+
switch (action.type) {
|
|
25216
|
+
case HANDLE_SUBMIT:
|
|
25217
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
25218
|
+
|
|
25219
|
+
default:
|
|
25220
|
+
return state;
|
|
25221
|
+
}
|
|
25222
|
+
}, initialState);
|
|
25223
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25224
|
+
style: { ...style
|
|
25225
|
+
},
|
|
25226
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25227
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25228
|
+
value: {
|
|
25229
|
+
state,
|
|
25230
|
+
dispatch
|
|
25231
|
+
}
|
|
25232
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25233
|
+
store,
|
|
25234
|
+
key: i
|
|
25235
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25236
|
+
store
|
|
25237
|
+
})));
|
|
25238
|
+
};
|
|
25239
|
+
|
|
25240
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25241
|
+
name,
|
|
25242
|
+
url,
|
|
25243
|
+
className,
|
|
25244
|
+
...otherProps
|
|
25245
|
+
}) => {
|
|
25246
|
+
const {
|
|
25247
|
+
t
|
|
25248
|
+
} = useTranslation("invoiceDetails");
|
|
25249
|
+
const {
|
|
25250
|
+
invoice
|
|
25251
|
+
} = usePelcro();
|
|
25252
|
+
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
25253
|
+
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}`,
|
|
25254
|
+
id: "pelcro-download-invoice-link",
|
|
25255
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25256
|
+
target: "_blank",
|
|
25257
|
+
rel: "noopener noreferrer"
|
|
25258
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25259
|
+
};
|
|
25260
|
+
|
|
25261
|
+
const InvoiceDetailsPayButton = ({
|
|
25262
|
+
name,
|
|
25263
|
+
onClick,
|
|
25264
|
+
...otherProps
|
|
25265
|
+
}) => {
|
|
25266
|
+
const {
|
|
25267
|
+
dispatch
|
|
25268
|
+
} = React.useContext(store);
|
|
25269
|
+
const {
|
|
25270
|
+
t
|
|
25271
|
+
} = useTranslation("invoiceDetails");
|
|
25272
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
25273
|
+
onClick: () => {
|
|
25274
|
+
dispatch({
|
|
25275
|
+
type: HANDLE_SUBMIT
|
|
25276
|
+
});
|
|
25277
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25278
|
+
}
|
|
25279
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25280
|
+
};
|
|
25281
|
+
|
|
25282
|
+
const InvoiceDetailsView = props => {
|
|
25283
|
+
const {
|
|
25284
|
+
t
|
|
25285
|
+
} = useTranslation("invoiceDetails");
|
|
25286
|
+
const {
|
|
25287
|
+
invoice
|
|
25288
|
+
} = usePelcro();
|
|
25289
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25290
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25291
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25292
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25293
|
+
id: "pelcro-invoice-details-view"
|
|
25294
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25295
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25296
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25297
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25298
|
+
}, t("title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25299
|
+
action: "javascript:void(0);",
|
|
25300
|
+
className: "plc-mt-2 pelcro-form"
|
|
25301
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25302
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25303
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25304
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25305
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25306
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25307
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25308
|
+
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-between pelcro-invoice-plan-wrapper"
|
|
25309
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25310
|
+
className: "plc-break-words pelcro-invoice-plan-name"
|
|
25311
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25312
|
+
className: "plc-text-center pelcro-invoice-summary-price"
|
|
25313
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25314
|
+
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"
|
|
25315
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25316
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25317
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25318
|
+
className: "pelcro-invoice-total-text"
|
|
25319
|
+
}, t("labels.total")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25320
|
+
className: "pelcro-invoice-total-text"
|
|
25321
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25322
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25323
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25324
|
+
className: "plc-flex plc-flex-col"
|
|
25325
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25326
|
+
className: "pelcro-invoice-total"
|
|
25327
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25328
|
+
className: "pelcro-invoice-total"
|
|
25329
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25330
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25331
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25332
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25333
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsDownloadButton, {
|
|
25334
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25335
|
+
className: "plc-w-full plc-text-center"
|
|
25336
|
+
}), showPayButton && /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsPayButton, {
|
|
25337
|
+
role: "submit",
|
|
25338
|
+
className: "plc-ml-4 plc-w-full",
|
|
25339
|
+
id: "pelcro-submit"
|
|
25340
|
+
})))));
|
|
25341
|
+
};
|
|
25342
|
+
|
|
25343
|
+
function canPayInvoice(invoice) {
|
|
25344
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25345
|
+
}
|
|
25346
|
+
|
|
25347
|
+
const InvoiceDetailsModal = ({
|
|
25348
|
+
onDisplay,
|
|
25349
|
+
onClose,
|
|
25350
|
+
...otherProps
|
|
25351
|
+
}) => {
|
|
25352
|
+
const {
|
|
25353
|
+
switchToPaymentView
|
|
25354
|
+
} = usePelcro();
|
|
25355
|
+
|
|
25356
|
+
const onSuccess = () => {
|
|
25357
|
+
var _otherProps$onSuccess;
|
|
25358
|
+
|
|
25359
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25360
|
+
switchToPaymentView();
|
|
25361
|
+
};
|
|
25362
|
+
|
|
25363
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25364
|
+
onDisplay: onDisplay,
|
|
25365
|
+
onClose: onClose,
|
|
25366
|
+
id: "pelcro-invoice-details-modal"
|
|
25367
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25368
|
+
onSuccess: onSuccess
|
|
25369
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25370
|
+
};
|
|
25371
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25372
|
+
|
|
24522
25373
|
exports.AddressCreateCity = AddressCreateCity;
|
|
24523
25374
|
exports.AddressCreateContainer = AddressCreateContainer;
|
|
24524
25375
|
exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
|
|
@@ -24594,6 +25445,14 @@ exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
|
|
|
24594
25445
|
exports.GiftRedeemView = GiftRedeemView;
|
|
24595
25446
|
exports.GoogleLoginButton = GoogleLoginButton;
|
|
24596
25447
|
exports.Input = Input;
|
|
25448
|
+
exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
|
|
25449
|
+
exports.InvoiceDetailsDownloadButton = InvoiceDetailsDownloadButton;
|
|
25450
|
+
exports.InvoiceDetailsModal = InvoiceDetailsModal;
|
|
25451
|
+
exports.InvoiceDetailsPayButton = InvoiceDetailsPayButton;
|
|
25452
|
+
exports.InvoiceDetailsView = InvoiceDetailsView;
|
|
25453
|
+
exports.InvoicePaymentContainer = InvoicePaymentContainer;
|
|
25454
|
+
exports.InvoicePaymentModal = InvoicePaymentModal;
|
|
25455
|
+
exports.InvoicePaymentView = InvoicePaymentView;
|
|
24597
25456
|
exports.Link = Link;
|
|
24598
25457
|
exports.LoginButton = LoginButton;
|
|
24599
25458
|
exports.LoginContainer = LoginContainer;
|
|
@@ -24709,6 +25568,7 @@ exports.authenticatedButtons = authenticatedButtons;
|
|
|
24709
25568
|
exports.i18n = i18next;
|
|
24710
25569
|
exports.initButtons = init$1;
|
|
24711
25570
|
exports.initContentEntitlement = init;
|
|
25571
|
+
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
24712
25572
|
exports.notify = notify;
|
|
24713
25573
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
24714
25574
|
exports.usePelcro = usePelcro;
|