@pelcro/react-pelcro-js 3.0.0-beta.3 → 3.0.0-beta.6
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 +1112 -483
- package/dist/index.esm.js +1104 -484
- package/dist/pelcro.css +48 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3246,7 +3246,7 @@ var validation$1 = {
|
|
|
3246
3246
|
enterEmail: "Un courriel est requis.",
|
|
3247
3247
|
enterPassword: "Mot de passe requis."
|
|
3248
3248
|
};
|
|
3249
|
-
var buttons$
|
|
3249
|
+
var buttons$9 = {
|
|
3250
3250
|
account: "Accès abonné(e)s",
|
|
3251
3251
|
login: "Se connecter"
|
|
3252
3252
|
};
|
|
@@ -3323,7 +3323,7 @@ var confirm$5 = {
|
|
|
3323
3323
|
};
|
|
3324
3324
|
var common_fr = {
|
|
3325
3325
|
validation: validation$1,
|
|
3326
|
-
buttons: buttons$
|
|
3326
|
+
buttons: buttons$9,
|
|
3327
3327
|
dashboard: dashboard$1,
|
|
3328
3328
|
select: select$3,
|
|
3329
3329
|
confirm: confirm$5
|
|
@@ -3334,7 +3334,7 @@ var validation = {
|
|
|
3334
3334
|
enterEmail: "Email address is required.",
|
|
3335
3335
|
enterPassword: "Password is required."
|
|
3336
3336
|
};
|
|
3337
|
-
var buttons$
|
|
3337
|
+
var buttons$8 = {
|
|
3338
3338
|
account: "My account",
|
|
3339
3339
|
login: "Login"
|
|
3340
3340
|
};
|
|
@@ -3411,7 +3411,7 @@ var confirm$4 = {
|
|
|
3411
3411
|
};
|
|
3412
3412
|
var common_en = {
|
|
3413
3413
|
validation: validation,
|
|
3414
|
-
buttons: buttons$
|
|
3414
|
+
buttons: buttons$8,
|
|
3415
3415
|
dashboard: dashboard,
|
|
3416
3416
|
select: select$2,
|
|
3417
3417
|
confirm: confirm$4
|
|
@@ -3461,10 +3461,10 @@ var paymentMethod_fr = {
|
|
|
3461
3461
|
select: select
|
|
3462
3462
|
};
|
|
3463
3463
|
|
|
3464
|
-
var title$
|
|
3464
|
+
var title$f = "Enter your email to subscribe to our newsletter";
|
|
3465
3465
|
var updateTitle$1 = "Update newsletter selections";
|
|
3466
3466
|
var subtitle$7 = "We may use your email for other marketing communication";
|
|
3467
|
-
var labels$
|
|
3467
|
+
var labels$p = {
|
|
3468
3468
|
submit: "Submit",
|
|
3469
3469
|
firstName: "First name",
|
|
3470
3470
|
lastName: "Last name",
|
|
@@ -3480,17 +3480,17 @@ var messages$r = {
|
|
|
3480
3480
|
here: "here"
|
|
3481
3481
|
};
|
|
3482
3482
|
var newsletter_en = {
|
|
3483
|
-
title: title$
|
|
3483
|
+
title: title$f,
|
|
3484
3484
|
updateTitle: updateTitle$1,
|
|
3485
3485
|
subtitle: subtitle$7,
|
|
3486
|
-
labels: labels$
|
|
3486
|
+
labels: labels$p,
|
|
3487
3487
|
messages: messages$r
|
|
3488
3488
|
};
|
|
3489
3489
|
|
|
3490
|
-
var title$
|
|
3490
|
+
var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
3491
3491
|
var updateTitle = "Mettre à jour son choix d'infolettres";
|
|
3492
3492
|
var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
|
|
3493
|
-
var labels$
|
|
3493
|
+
var labels$o = {
|
|
3494
3494
|
submit: "Lire l’article !",
|
|
3495
3495
|
firstName: "Prénom",
|
|
3496
3496
|
lastName: "Nom de famille",
|
|
@@ -3506,14 +3506,14 @@ var messages$q = {
|
|
|
3506
3506
|
here: "ici"
|
|
3507
3507
|
};
|
|
3508
3508
|
var newsletter_fr = {
|
|
3509
|
-
title: title$
|
|
3509
|
+
title: title$e,
|
|
3510
3510
|
updateTitle: updateTitle,
|
|
3511
3511
|
subtitle: subtitle$6,
|
|
3512
|
-
labels: labels$
|
|
3512
|
+
labels: labels$o,
|
|
3513
3513
|
messages: messages$q
|
|
3514
3514
|
};
|
|
3515
3515
|
|
|
3516
|
-
var labels$
|
|
3516
|
+
var labels$n = {
|
|
3517
3517
|
"continue": "Continue to content"
|
|
3518
3518
|
};
|
|
3519
3519
|
var messages$p = {
|
|
@@ -3532,18 +3532,22 @@ var messages$p = {
|
|
|
3532
3532
|
giftRedeem: {
|
|
3533
3533
|
title: "Congratulations",
|
|
3534
3534
|
content: "You have successfully redeemed your gift subscription. Enjoy!"
|
|
3535
|
+
},
|
|
3536
|
+
invoicePayment: {
|
|
3537
|
+
title: "Invoice paid successfully",
|
|
3538
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3535
3539
|
}
|
|
3536
3540
|
};
|
|
3537
3541
|
var errors$9 = {
|
|
3538
3542
|
"": ""
|
|
3539
3543
|
};
|
|
3540
3544
|
var success_en = {
|
|
3541
|
-
labels: labels$
|
|
3545
|
+
labels: labels$n,
|
|
3542
3546
|
messages: messages$p,
|
|
3543
3547
|
errors: errors$9
|
|
3544
3548
|
};
|
|
3545
3549
|
|
|
3546
|
-
var labels$
|
|
3550
|
+
var labels$m = {
|
|
3547
3551
|
"continue": "Abonnement réussi !"
|
|
3548
3552
|
};
|
|
3549
3553
|
var messages$o = {
|
|
@@ -3562,13 +3566,17 @@ var messages$o = {
|
|
|
3562
3566
|
giftRedeem: {
|
|
3563
3567
|
title: "Félicitations",
|
|
3564
3568
|
content: "Vous avez validé votre abonnement cadeau. Profitez-en!"
|
|
3569
|
+
},
|
|
3570
|
+
invoicePayment: {
|
|
3571
|
+
title: "Invoice paid successfully",
|
|
3572
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3565
3573
|
}
|
|
3566
3574
|
};
|
|
3567
3575
|
var errors$8 = {
|
|
3568
3576
|
"": ""
|
|
3569
3577
|
};
|
|
3570
3578
|
var success_fr = {
|
|
3571
|
-
labels: labels$
|
|
3579
|
+
labels: labels$m,
|
|
3572
3580
|
messages: messages$o,
|
|
3573
3581
|
errors: errors$8
|
|
3574
3582
|
};
|
|
@@ -3605,7 +3613,7 @@ var messages$l = {
|
|
|
3605
3613
|
youAreSafe: "You're safe - PCI compliant 128 SSL by",
|
|
3606
3614
|
bankRedirection: "Please hold, redirecting you to your bank."
|
|
3607
3615
|
};
|
|
3608
|
-
var labels$
|
|
3616
|
+
var labels$l = {
|
|
3609
3617
|
card: "Enter card number",
|
|
3610
3618
|
date: "Expiration date",
|
|
3611
3619
|
CVC: "CVC",
|
|
@@ -3625,14 +3633,14 @@ var labels$j = {
|
|
|
3625
3633
|
};
|
|
3626
3634
|
var checkoutForm_en = {
|
|
3627
3635
|
messages: messages$l,
|
|
3628
|
-
labels: labels$
|
|
3636
|
+
labels: labels$l
|
|
3629
3637
|
};
|
|
3630
3638
|
|
|
3631
3639
|
var messages$k = {
|
|
3632
3640
|
youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
|
|
3633
3641
|
bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
|
|
3634
3642
|
};
|
|
3635
|
-
var labels$
|
|
3643
|
+
var labels$k = {
|
|
3636
3644
|
card: "Entrez le numéro de carte",
|
|
3637
3645
|
date: "Date d’expiration",
|
|
3638
3646
|
CVC: "CVC",
|
|
@@ -3652,7 +3660,7 @@ var labels$i = {
|
|
|
3652
3660
|
};
|
|
3653
3661
|
var checkoutForm_fr = {
|
|
3654
3662
|
messages: messages$k,
|
|
3655
|
-
labels: labels$
|
|
3663
|
+
labels: labels$k
|
|
3656
3664
|
};
|
|
3657
3665
|
|
|
3658
3666
|
var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
|
|
@@ -3661,13 +3669,15 @@ var giftSent$1 = "Subscription gift has been sent to";
|
|
|
3661
3669
|
var successfully$1 = "successfully";
|
|
3662
3670
|
var entitlement$1 = "Some of the content on this page is available with one or more of our plans. <1>Subscribe</1> now to get full page access.";
|
|
3663
3671
|
var recaptcha$1 = "This site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <3>Terms of Service</3> apply.";
|
|
3672
|
+
var invalidInvoice$1 = "Invalid invoice ID, please contact support";
|
|
3664
3673
|
var messages_en = {
|
|
3665
3674
|
youAreSafe: youAreSafe$1,
|
|
3666
3675
|
cancel: cancel$1,
|
|
3667
3676
|
giftSent: giftSent$1,
|
|
3668
3677
|
successfully: successfully$1,
|
|
3669
3678
|
entitlement: entitlement$1,
|
|
3670
|
-
recaptcha: recaptcha$1
|
|
3679
|
+
recaptcha: recaptcha$1,
|
|
3680
|
+
invalidInvoice: invalidInvoice$1
|
|
3671
3681
|
};
|
|
3672
3682
|
|
|
3673
3683
|
var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
|
|
@@ -3676,16 +3686,18 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
|
|
|
3676
3686
|
var successfully = "avec succès.";
|
|
3677
3687
|
var entitlement = "Une partie du contenu de cette page est disponible sous un ou plusieurs de nos plans. <1>Abonnez-vous</1> à l'un de nos plans disponibles pour accéder à plus de contenu";
|
|
3678
3688
|
var recaptcha = "Ce site est protégé par reCAPTCHA - les <1>règles de confidentialité</1> Google ainsi que les <3>conditions d'utilisation</3> s'appliquent.";
|
|
3689
|
+
var invalidInvoice = "Invalid invoice ID, please contact support";
|
|
3679
3690
|
var messages_fr = {
|
|
3680
3691
|
youAreSafe: youAreSafe,
|
|
3681
3692
|
cancel: cancel,
|
|
3682
3693
|
giftSent: giftSent,
|
|
3683
3694
|
successfully: successfully,
|
|
3684
3695
|
entitlement: entitlement,
|
|
3685
|
-
recaptcha: recaptcha
|
|
3696
|
+
recaptcha: recaptcha,
|
|
3697
|
+
invalidInvoice: invalidInvoice
|
|
3686
3698
|
};
|
|
3687
3699
|
|
|
3688
|
-
var labels$
|
|
3700
|
+
var labels$j = {
|
|
3689
3701
|
email: "Enter email",
|
|
3690
3702
|
password: "Enter password",
|
|
3691
3703
|
required: "required",
|
|
@@ -3712,12 +3724,12 @@ var errors$5 = {
|
|
|
3712
3724
|
"": ""
|
|
3713
3725
|
};
|
|
3714
3726
|
var login_en = {
|
|
3715
|
-
labels: labels$
|
|
3727
|
+
labels: labels$j,
|
|
3716
3728
|
messages: messages$j,
|
|
3717
3729
|
errors: errors$5
|
|
3718
3730
|
};
|
|
3719
3731
|
|
|
3720
|
-
var labels$
|
|
3732
|
+
var labels$i = {
|
|
3721
3733
|
email: "Entrez votre adresse courriel",
|
|
3722
3734
|
password: "Entrez votre mot de passe",
|
|
3723
3735
|
required: "Champs obligatoires",
|
|
@@ -3744,14 +3756,14 @@ var errors$4 = {
|
|
|
3744
3756
|
"": ""
|
|
3745
3757
|
};
|
|
3746
3758
|
var login_fr = {
|
|
3747
|
-
labels: labels$
|
|
3759
|
+
labels: labels$i,
|
|
3748
3760
|
messages: messages$i,
|
|
3749
3761
|
errors: errors$4
|
|
3750
3762
|
};
|
|
3751
3763
|
|
|
3752
|
-
var title$
|
|
3764
|
+
var title$d = "Create an account";
|
|
3753
3765
|
var subtitle$5 = "Enter your email and password below";
|
|
3754
|
-
var labels$
|
|
3766
|
+
var labels$h = {
|
|
3755
3767
|
signUpFacebook: "Sign up with Facebook",
|
|
3756
3768
|
signUpGoogle: "Sign up with Google",
|
|
3757
3769
|
signUpEmail: "Sign up with Email",
|
|
@@ -3835,18 +3847,18 @@ var redeem$1 = {
|
|
|
3835
3847
|
}
|
|
3836
3848
|
};
|
|
3837
3849
|
var register_en = {
|
|
3838
|
-
title: title$
|
|
3850
|
+
title: title$d,
|
|
3839
3851
|
subtitle: subtitle$5,
|
|
3840
|
-
labels: labels$
|
|
3852
|
+
labels: labels$h,
|
|
3841
3853
|
messages: messages$h,
|
|
3842
3854
|
errors: errors$3,
|
|
3843
3855
|
gift: gift$1,
|
|
3844
3856
|
redeem: redeem$1
|
|
3845
3857
|
};
|
|
3846
3858
|
|
|
3847
|
-
var title$
|
|
3859
|
+
var title$c = "Créer un compte";
|
|
3848
3860
|
var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3849
|
-
var labels$
|
|
3861
|
+
var labels$g = {
|
|
3850
3862
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3851
3863
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
3852
3864
|
signUpEmail: "Inscrivez-vous avec votre courriel",
|
|
@@ -3931,16 +3943,16 @@ var redeem = {
|
|
|
3931
3943
|
}
|
|
3932
3944
|
};
|
|
3933
3945
|
var register_fr = {
|
|
3934
|
-
title: title$
|
|
3946
|
+
title: title$c,
|
|
3935
3947
|
subtitle: subtitle$4,
|
|
3936
|
-
labels: labels$
|
|
3948
|
+
labels: labels$g,
|
|
3937
3949
|
messages: messages$g,
|
|
3938
3950
|
errors: errors$2,
|
|
3939
3951
|
gift: gift,
|
|
3940
3952
|
redeem: redeem
|
|
3941
3953
|
};
|
|
3942
3954
|
|
|
3943
|
-
var labels$
|
|
3955
|
+
var labels$f = {
|
|
3944
3956
|
title: "Want to update your profile?",
|
|
3945
3957
|
subtitle: "Enter your information below to update your profile",
|
|
3946
3958
|
email: "Email",
|
|
@@ -3962,11 +3974,11 @@ var messages$f = {
|
|
|
3962
3974
|
pictureUpdated: "Your profile picture was updated successfully."
|
|
3963
3975
|
};
|
|
3964
3976
|
var userEdit_en = {
|
|
3965
|
-
labels: labels$
|
|
3977
|
+
labels: labels$f,
|
|
3966
3978
|
messages: messages$f
|
|
3967
3979
|
};
|
|
3968
3980
|
|
|
3969
|
-
var labels$
|
|
3981
|
+
var labels$e = {
|
|
3970
3982
|
title: "Voulez-vous mettre à jour votre profil ?",
|
|
3971
3983
|
subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
|
|
3972
3984
|
email: "Address courriel",
|
|
@@ -3988,14 +4000,14 @@ var messages$e = {
|
|
|
3988
4000
|
pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
|
|
3989
4001
|
};
|
|
3990
4002
|
var userEdit_fr = {
|
|
3991
|
-
labels: labels$
|
|
4003
|
+
labels: labels$e,
|
|
3992
4004
|
messages: messages$e
|
|
3993
4005
|
};
|
|
3994
4006
|
|
|
3995
|
-
var title$
|
|
4007
|
+
var title$b = "Enter your shipping address";
|
|
3996
4008
|
var selectAddressTitle$1 = "Please select an address";
|
|
3997
4009
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3998
|
-
var labels$
|
|
4010
|
+
var labels$d = {
|
|
3999
4011
|
address: "Address",
|
|
4000
4012
|
code: "Postal Code/Zip",
|
|
4001
4013
|
city: "City",
|
|
@@ -4005,7 +4017,7 @@ var labels$b = {
|
|
|
4005
4017
|
lastName: "Last name",
|
|
4006
4018
|
required: "required"
|
|
4007
4019
|
};
|
|
4008
|
-
var buttons$
|
|
4020
|
+
var buttons$7 = {
|
|
4009
4021
|
submit: "Submit",
|
|
4010
4022
|
selectAddress: "Select address",
|
|
4011
4023
|
addAddress: "Add new address"
|
|
@@ -4015,18 +4027,18 @@ var messages$d = {
|
|
|
4015
4027
|
subRedeemed: "Your subscription has been redeemed."
|
|
4016
4028
|
};
|
|
4017
4029
|
var address_en = {
|
|
4018
|
-
title: title$
|
|
4030
|
+
title: title$b,
|
|
4019
4031
|
selectAddressTitle: selectAddressTitle$1,
|
|
4020
4032
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
4021
|
-
labels: labels$
|
|
4022
|
-
buttons: buttons$
|
|
4033
|
+
labels: labels$d,
|
|
4034
|
+
buttons: buttons$7,
|
|
4023
4035
|
messages: messages$d
|
|
4024
4036
|
};
|
|
4025
4037
|
|
|
4026
|
-
var title$
|
|
4038
|
+
var title$a = "Entrez votre adresse de livraison";
|
|
4027
4039
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
4028
4040
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
4029
|
-
var labels$
|
|
4041
|
+
var labels$c = {
|
|
4030
4042
|
address: "Adresse",
|
|
4031
4043
|
code: "Code postal / Zip",
|
|
4032
4044
|
city: "Ville",
|
|
@@ -4036,7 +4048,7 @@ var labels$a = {
|
|
|
4036
4048
|
lastName: "Nom de famille",
|
|
4037
4049
|
required: "Champs obligatoires"
|
|
4038
4050
|
};
|
|
4039
|
-
var buttons$
|
|
4051
|
+
var buttons$6 = {
|
|
4040
4052
|
submit: "Valider",
|
|
4041
4053
|
selectAddress: "Choisir cette adresse",
|
|
4042
4054
|
addAddress: "Ajouter une nouvelle adresse"
|
|
@@ -4046,15 +4058,15 @@ var messages$c = {
|
|
|
4046
4058
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4047
4059
|
};
|
|
4048
4060
|
var address_fr = {
|
|
4049
|
-
title: title$
|
|
4061
|
+
title: title$a,
|
|
4050
4062
|
selectAddressTitle: selectAddressTitle,
|
|
4051
4063
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4052
|
-
labels: labels$
|
|
4053
|
-
buttons: buttons$
|
|
4064
|
+
labels: labels$c,
|
|
4065
|
+
buttons: buttons$6,
|
|
4054
4066
|
messages: messages$c
|
|
4055
4067
|
};
|
|
4056
4068
|
|
|
4057
|
-
var title$
|
|
4069
|
+
var title$9 = "Reset your password";
|
|
4058
4070
|
var subtitle$3 = "Enter a new password below";
|
|
4059
4071
|
var email$3 = "Email";
|
|
4060
4072
|
var password$3 = "Password";
|
|
@@ -4063,7 +4075,7 @@ var submit$5 = "Submit";
|
|
|
4063
4075
|
var required$5 = "Required";
|
|
4064
4076
|
var passwordUpdated$1 = "Password has been updated, please login with the new password";
|
|
4065
4077
|
var passwordReset_en = {
|
|
4066
|
-
title: title$
|
|
4078
|
+
title: title$9,
|
|
4067
4079
|
subtitle: subtitle$3,
|
|
4068
4080
|
email: email$3,
|
|
4069
4081
|
password: password$3,
|
|
@@ -4073,7 +4085,7 @@ var passwordReset_en = {
|
|
|
4073
4085
|
passwordUpdated: passwordUpdated$1
|
|
4074
4086
|
};
|
|
4075
4087
|
|
|
4076
|
-
var title$
|
|
4088
|
+
var title$8 = "Réinitialiser votre mot de passe";
|
|
4077
4089
|
var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
|
|
4078
4090
|
var email$2 = "Adresse courriel";
|
|
4079
4091
|
var password$2 = "Mot de passe";
|
|
@@ -4082,7 +4094,7 @@ var submit$4 = "Soumettre";
|
|
|
4082
4094
|
var required$4 = "Champs obligatoires";
|
|
4083
4095
|
var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
|
|
4084
4096
|
var passwordReset_fr = {
|
|
4085
|
-
title: title$
|
|
4097
|
+
title: title$8,
|
|
4086
4098
|
subtitle: subtitle$2,
|
|
4087
4099
|
email: email$2,
|
|
4088
4100
|
password: password$2,
|
|
@@ -4092,7 +4104,7 @@ var passwordReset_fr = {
|
|
|
4092
4104
|
passwordUpdated: passwordUpdated
|
|
4093
4105
|
};
|
|
4094
4106
|
|
|
4095
|
-
var title$
|
|
4107
|
+
var title$7 = "Forgot your password?";
|
|
4096
4108
|
var email$1 = "Email";
|
|
4097
4109
|
var password$1 = "Password";
|
|
4098
4110
|
var submit$3 = "Submit";
|
|
@@ -4103,7 +4115,7 @@ var messages$b = {
|
|
|
4103
4115
|
loginHere: "login here."
|
|
4104
4116
|
};
|
|
4105
4117
|
var passwordForgot_en = {
|
|
4106
|
-
title: title$
|
|
4118
|
+
title: title$7,
|
|
4107
4119
|
email: email$1,
|
|
4108
4120
|
password: password$1,
|
|
4109
4121
|
submit: submit$3,
|
|
@@ -4112,7 +4124,7 @@ var passwordForgot_en = {
|
|
|
4112
4124
|
messages: messages$b
|
|
4113
4125
|
};
|
|
4114
4126
|
|
|
4115
|
-
var title$
|
|
4127
|
+
var title$6 = "Mot de passe oublié ?";
|
|
4116
4128
|
var email = "Courriel";
|
|
4117
4129
|
var password = "Mot de passe";
|
|
4118
4130
|
var submit$2 = "Soumettre";
|
|
@@ -4123,7 +4135,7 @@ var messages$a = {
|
|
|
4123
4135
|
loginHere: "Connectez-vous ici"
|
|
4124
4136
|
};
|
|
4125
4137
|
var passwordForgot_fr = {
|
|
4126
|
-
title: title$
|
|
4138
|
+
title: title$6,
|
|
4127
4139
|
email: email,
|
|
4128
4140
|
password: password,
|
|
4129
4141
|
submit: submit$2,
|
|
@@ -4132,7 +4144,7 @@ var passwordForgot_fr = {
|
|
|
4132
4144
|
messages: messages$a
|
|
4133
4145
|
};
|
|
4134
4146
|
|
|
4135
|
-
var title$
|
|
4147
|
+
var title$5 = "Change your password";
|
|
4136
4148
|
var currentPassword$1 = "Current password";
|
|
4137
4149
|
var newPassword$1 = "New password";
|
|
4138
4150
|
var confirmNewPassword$1 = "Confirm new password";
|
|
@@ -4142,7 +4154,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
|
|
|
4142
4154
|
var passwordsNotMatching$1 = "Passwords don't match";
|
|
4143
4155
|
var weakPassword$1 = "Your password must contain at least 6 characters";
|
|
4144
4156
|
var passwordChange_en = {
|
|
4145
|
-
title: title$
|
|
4157
|
+
title: title$5,
|
|
4146
4158
|
currentPassword: currentPassword$1,
|
|
4147
4159
|
newPassword: newPassword$1,
|
|
4148
4160
|
confirmNewPassword: confirmNewPassword$1,
|
|
@@ -4153,7 +4165,7 @@ var passwordChange_en = {
|
|
|
4153
4165
|
weakPassword: weakPassword$1
|
|
4154
4166
|
};
|
|
4155
4167
|
|
|
4156
|
-
var title$
|
|
4168
|
+
var title$4 = "Changez votre mot de passe";
|
|
4157
4169
|
var currentPassword = "Mot de passe actuel";
|
|
4158
4170
|
var newPassword = "Nouveau mot de passe";
|
|
4159
4171
|
var confirmNewPassword = "Confirmer le nouveau mot de passe";
|
|
@@ -4163,7 +4175,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
|
|
|
4163
4175
|
var passwordsNotMatching = "Les mots de passe ne correspondent pas";
|
|
4164
4176
|
var weakPassword = "Votre mot de passe doit contenir au moins 6";
|
|
4165
4177
|
var passwordChange_fr = {
|
|
4166
|
-
title: title$
|
|
4178
|
+
title: title$4,
|
|
4167
4179
|
currentPassword: currentPassword,
|
|
4168
4180
|
newPassword: newPassword,
|
|
4169
4181
|
confirmNewPassword: confirmNewPassword,
|
|
@@ -4174,7 +4186,7 @@ var passwordChange_fr = {
|
|
|
4174
4186
|
weakPassword: weakPassword
|
|
4175
4187
|
};
|
|
4176
4188
|
|
|
4177
|
-
var title$
|
|
4189
|
+
var title$3 = "Votre panier";
|
|
4178
4190
|
var subtitle$1 = "Terminez votre achat ci-dessous";
|
|
4179
4191
|
var name$1 = "Produit";
|
|
4180
4192
|
var quantity$1 = "Quantité";
|
|
@@ -4186,7 +4198,7 @@ var confirm$3 = "Passer à la caisse";
|
|
|
4186
4198
|
var empty$1 = "Votre panier est vide.";
|
|
4187
4199
|
var removeAll$1 = "Vider";
|
|
4188
4200
|
var cart_fr = {
|
|
4189
|
-
title: title$
|
|
4201
|
+
title: title$3,
|
|
4190
4202
|
subtitle: subtitle$1,
|
|
4191
4203
|
name: name$1,
|
|
4192
4204
|
quantity: quantity$1,
|
|
@@ -4199,7 +4211,7 @@ var cart_fr = {
|
|
|
4199
4211
|
removeAll: removeAll$1
|
|
4200
4212
|
};
|
|
4201
4213
|
|
|
4202
|
-
var title = "Your shopping cart";
|
|
4214
|
+
var title$2 = "Your shopping cart";
|
|
4203
4215
|
var subtitle = "Comple your purchase below";
|
|
4204
4216
|
var name = "Name";
|
|
4205
4217
|
var quantity = "Quantity";
|
|
@@ -4211,7 +4223,7 @@ var confirm$2 = "Checkout";
|
|
|
4211
4223
|
var empty = "Your cart is empty.";
|
|
4212
4224
|
var removeAll = "Remove all";
|
|
4213
4225
|
var cart_en = {
|
|
4214
|
-
title: title,
|
|
4226
|
+
title: title$2,
|
|
4215
4227
|
subtitle: subtitle,
|
|
4216
4228
|
name: name,
|
|
4217
4229
|
quantity: quantity,
|
|
@@ -4224,7 +4236,7 @@ var cart_en = {
|
|
|
4224
4236
|
removeAll: removeAll
|
|
4225
4237
|
};
|
|
4226
4238
|
|
|
4227
|
-
var buttons$
|
|
4239
|
+
var buttons$5 = {
|
|
4228
4240
|
select: "Select",
|
|
4229
4241
|
added: "Added to cart",
|
|
4230
4242
|
purchase: "Purchase",
|
|
@@ -4239,17 +4251,17 @@ var messages$9 = {
|
|
|
4239
4251
|
multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
|
|
4240
4252
|
currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
|
|
4241
4253
|
};
|
|
4242
|
-
var labels$
|
|
4254
|
+
var labels$b = {
|
|
4243
4255
|
summary: "Order summary",
|
|
4244
4256
|
total: "total"
|
|
4245
4257
|
};
|
|
4246
4258
|
var shop_en = {
|
|
4247
|
-
buttons: buttons$
|
|
4259
|
+
buttons: buttons$5,
|
|
4248
4260
|
messages: messages$9,
|
|
4249
|
-
labels: labels$
|
|
4261
|
+
labels: labels$b
|
|
4250
4262
|
};
|
|
4251
4263
|
|
|
4252
|
-
var buttons$
|
|
4264
|
+
var buttons$4 = {
|
|
4253
4265
|
select: "Choisir",
|
|
4254
4266
|
added: "Ajouté au panier",
|
|
4255
4267
|
purchase: "Acheter",
|
|
@@ -4264,17 +4276,17 @@ var messages$8 = {
|
|
|
4264
4276
|
multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
|
|
4265
4277
|
currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
|
|
4266
4278
|
};
|
|
4267
|
-
var labels$
|
|
4279
|
+
var labels$a = {
|
|
4268
4280
|
summary: "récapitulatif de commande",
|
|
4269
4281
|
total: "total"
|
|
4270
4282
|
};
|
|
4271
4283
|
var shop_fr = {
|
|
4272
|
-
buttons: buttons$
|
|
4284
|
+
buttons: buttons$4,
|
|
4273
4285
|
messages: messages$8,
|
|
4274
|
-
labels: labels$
|
|
4286
|
+
labels: labels$a
|
|
4275
4287
|
};
|
|
4276
4288
|
|
|
4277
|
-
var labels$
|
|
4289
|
+
var labels$9 = {
|
|
4278
4290
|
cardNumber: "Numéro de carte",
|
|
4279
4291
|
securityCode: "Code de sécurité",
|
|
4280
4292
|
submit: "Soumettre",
|
|
@@ -4309,12 +4321,12 @@ var errors$1 = {
|
|
|
4309
4321
|
"": ""
|
|
4310
4322
|
};
|
|
4311
4323
|
var payment_fr = {
|
|
4312
|
-
labels: labels$
|
|
4324
|
+
labels: labels$9,
|
|
4313
4325
|
messages: messages$7,
|
|
4314
4326
|
errors: errors$1
|
|
4315
4327
|
};
|
|
4316
4328
|
|
|
4317
|
-
var labels$
|
|
4329
|
+
var labels$8 = {
|
|
4318
4330
|
cardNumber: "Card number",
|
|
4319
4331
|
securityCode: "Security Code",
|
|
4320
4332
|
submit: "Submit",
|
|
@@ -4349,12 +4361,12 @@ var errors = {
|
|
|
4349
4361
|
"": ""
|
|
4350
4362
|
};
|
|
4351
4363
|
var payment_en = {
|
|
4352
|
-
labels: labels$
|
|
4364
|
+
labels: labels$8,
|
|
4353
4365
|
messages: messages$6,
|
|
4354
4366
|
errors: errors
|
|
4355
4367
|
};
|
|
4356
4368
|
|
|
4357
|
-
var labels$
|
|
4369
|
+
var labels$7 = {
|
|
4358
4370
|
menu: "Pelcro Menu",
|
|
4359
4371
|
name: "Name",
|
|
4360
4372
|
email: "Email",
|
|
@@ -4379,6 +4391,15 @@ var labels$5 = {
|
|
|
4379
4391
|
purchases: "Purchases",
|
|
4380
4392
|
subscriptions: "Subscriptions",
|
|
4381
4393
|
donations: "Donations",
|
|
4394
|
+
invoices: "Invoices",
|
|
4395
|
+
details: "Details",
|
|
4396
|
+
view: "View",
|
|
4397
|
+
paid: "Paid",
|
|
4398
|
+
open: "Open",
|
|
4399
|
+
draft: "Draft",
|
|
4400
|
+
uncollectible: "Uncollectible",
|
|
4401
|
+
"void": "Void",
|
|
4402
|
+
pastDue: "Past due",
|
|
4382
4403
|
updatePaymentSource: "Update",
|
|
4383
4404
|
profile: "Profile",
|
|
4384
4405
|
updateProfile: "Edit profile",
|
|
@@ -4431,11 +4452,11 @@ var messages$5 = {
|
|
|
4431
4452
|
}
|
|
4432
4453
|
};
|
|
4433
4454
|
var dashboard_en = {
|
|
4434
|
-
labels: labels$
|
|
4455
|
+
labels: labels$7,
|
|
4435
4456
|
messages: messages$5
|
|
4436
4457
|
};
|
|
4437
4458
|
|
|
4438
|
-
var labels$
|
|
4459
|
+
var labels$6 = {
|
|
4439
4460
|
menu: "Menu Pelcro",
|
|
4440
4461
|
name: "Nom",
|
|
4441
4462
|
email: "Courriel",
|
|
@@ -4460,6 +4481,15 @@ var labels$4 = {
|
|
|
4460
4481
|
purchases: "Achats",
|
|
4461
4482
|
subscriptions: "Abonnements",
|
|
4462
4483
|
donations: "Des dons",
|
|
4484
|
+
invoices: "Invoices",
|
|
4485
|
+
details: "Details",
|
|
4486
|
+
view: "View",
|
|
4487
|
+
paid: "Paid",
|
|
4488
|
+
open: "open",
|
|
4489
|
+
draft: "Draft",
|
|
4490
|
+
uncollectible: "Uncollectible",
|
|
4491
|
+
"void": "Void",
|
|
4492
|
+
pastDue: "Past due",
|
|
4463
4493
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4464
4494
|
profile: "Profil",
|
|
4465
4495
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4512,7 +4542,7 @@ var messages$4 = {
|
|
|
4512
4542
|
}
|
|
4513
4543
|
};
|
|
4514
4544
|
var dashboard_fr = {
|
|
4515
|
-
labels: labels$
|
|
4545
|
+
labels: labels$6,
|
|
4516
4546
|
messages: messages$4
|
|
4517
4547
|
};
|
|
4518
4548
|
|
|
@@ -4521,7 +4551,7 @@ var messages$3 = {
|
|
|
4521
4551
|
loginHere: "Login here",
|
|
4522
4552
|
checkbox: "Check this box to gift this subscription"
|
|
4523
4553
|
};
|
|
4524
|
-
var labels$
|
|
4554
|
+
var labels$5 = {
|
|
4525
4555
|
plan: {
|
|
4526
4556
|
title: "Subscribe to a plan",
|
|
4527
4557
|
subtitle: "Select one of the plans below and click on next."
|
|
@@ -4538,15 +4568,15 @@ var labels$3 = {
|
|
|
4538
4568
|
or: "Or take a look at some of our other options below"
|
|
4539
4569
|
}
|
|
4540
4570
|
};
|
|
4541
|
-
var buttons$
|
|
4571
|
+
var buttons$3 = {
|
|
4542
4572
|
next: "Next",
|
|
4543
4573
|
select: "Select",
|
|
4544
4574
|
back: "Back"
|
|
4545
4575
|
};
|
|
4546
4576
|
var select_en = {
|
|
4547
4577
|
messages: messages$3,
|
|
4548
|
-
labels: labels$
|
|
4549
|
-
buttons: buttons$
|
|
4578
|
+
labels: labels$5,
|
|
4579
|
+
buttons: buttons$3
|
|
4550
4580
|
};
|
|
4551
4581
|
|
|
4552
4582
|
var messages$2 = {
|
|
@@ -4554,7 +4584,7 @@ var messages$2 = {
|
|
|
4554
4584
|
loginHere: "Connectez-vous ici",
|
|
4555
4585
|
checkbox: "Cochez cette case pour offrir cet abonnement"
|
|
4556
4586
|
};
|
|
4557
|
-
var labels$
|
|
4587
|
+
var labels$4 = {
|
|
4558
4588
|
plan: {
|
|
4559
4589
|
title: "Abonnez-vous à un plan",
|
|
4560
4590
|
subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
|
|
@@ -4571,15 +4601,15 @@ var labels$2 = {
|
|
|
4571
4601
|
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4572
4602
|
}
|
|
4573
4603
|
};
|
|
4574
|
-
var buttons = {
|
|
4604
|
+
var buttons$2 = {
|
|
4575
4605
|
next: "Prochain",
|
|
4576
4606
|
select: "Choisir",
|
|
4577
4607
|
back: "Retour"
|
|
4578
4608
|
};
|
|
4579
4609
|
var select_fr = {
|
|
4580
4610
|
messages: messages$2,
|
|
4581
|
-
labels: labels$
|
|
4582
|
-
buttons: buttons
|
|
4611
|
+
labels: labels$4,
|
|
4612
|
+
buttons: buttons$2
|
|
4583
4613
|
};
|
|
4584
4614
|
|
|
4585
4615
|
var confirm$1 = {
|
|
@@ -4602,7 +4632,7 @@ var notification_fr = {
|
|
|
4602
4632
|
confirm: confirm
|
|
4603
4633
|
};
|
|
4604
4634
|
|
|
4605
|
-
var labels$
|
|
4635
|
+
var labels$3 = {
|
|
4606
4636
|
title: "Verify your email",
|
|
4607
4637
|
instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
|
|
4608
4638
|
resend: "Resend email"
|
|
@@ -4612,11 +4642,11 @@ var messages$1 = {
|
|
|
4612
4642
|
success: "Email verified successfully!"
|
|
4613
4643
|
};
|
|
4614
4644
|
var verifyEmail_en = {
|
|
4615
|
-
labels: labels$
|
|
4645
|
+
labels: labels$3,
|
|
4616
4646
|
messages: messages$1
|
|
4617
4647
|
};
|
|
4618
4648
|
|
|
4619
|
-
var labels = {
|
|
4649
|
+
var labels$2 = {
|
|
4620
4650
|
title: "Vérifiez votre e-mail",
|
|
4621
4651
|
instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
|
|
4622
4652
|
resend: "Ré-envoyer l'email"
|
|
@@ -4626,10 +4656,46 @@ var messages = {
|
|
|
4626
4656
|
success: "Email vérifié avec succès!"
|
|
4627
4657
|
};
|
|
4628
4658
|
var verifyEmail_fr = {
|
|
4629
|
-
labels: labels,
|
|
4659
|
+
labels: labels$2,
|
|
4630
4660
|
messages: messages
|
|
4631
4661
|
};
|
|
4632
4662
|
|
|
4663
|
+
var title$1 = "Invoice details";
|
|
4664
|
+
var labels$1 = {
|
|
4665
|
+
summary: "Summary",
|
|
4666
|
+
total: "Total",
|
|
4667
|
+
amountPaid: "Amount paid",
|
|
4668
|
+
amountDue: "Amount due",
|
|
4669
|
+
creationDate: "Created on:"
|
|
4670
|
+
};
|
|
4671
|
+
var buttons$1 = {
|
|
4672
|
+
download: "Download",
|
|
4673
|
+
pay: "Pay now"
|
|
4674
|
+
};
|
|
4675
|
+
var invoiceDetails_en = {
|
|
4676
|
+
title: title$1,
|
|
4677
|
+
labels: labels$1,
|
|
4678
|
+
buttons: buttons$1
|
|
4679
|
+
};
|
|
4680
|
+
|
|
4681
|
+
var title = "Invoice details";
|
|
4682
|
+
var labels = {
|
|
4683
|
+
summary: "Summary",
|
|
4684
|
+
total: "Total",
|
|
4685
|
+
amountPaid: "Amount paid",
|
|
4686
|
+
amountDue: "Amount due",
|
|
4687
|
+
creationDate: "Created on:"
|
|
4688
|
+
};
|
|
4689
|
+
var buttons = {
|
|
4690
|
+
download: "Download",
|
|
4691
|
+
pay: "Pay now"
|
|
4692
|
+
};
|
|
4693
|
+
var invoiceDetails_fr = {
|
|
4694
|
+
title: title,
|
|
4695
|
+
labels: labels,
|
|
4696
|
+
buttons: buttons
|
|
4697
|
+
};
|
|
4698
|
+
|
|
4633
4699
|
function create$1(createState) {
|
|
4634
4700
|
let state;
|
|
4635
4701
|
const listeners = new Set();
|
|
@@ -5979,7 +6045,7 @@ class PelcroActions {
|
|
|
5979
6045
|
view,
|
|
5980
6046
|
cartItems,
|
|
5981
6047
|
...otherStateFields
|
|
5982
|
-
} = initialState$
|
|
6048
|
+
} = initialState$i;
|
|
5983
6049
|
this.set(otherStateFields);
|
|
5984
6050
|
});
|
|
5985
6051
|
|
|
@@ -6023,10 +6089,11 @@ class PelcroActions {
|
|
|
6023
6089
|
resetView,
|
|
6024
6090
|
switchToCheckoutForm,
|
|
6025
6091
|
product,
|
|
6026
|
-
order
|
|
6092
|
+
order,
|
|
6093
|
+
invoice
|
|
6027
6094
|
} = this.get();
|
|
6028
6095
|
|
|
6029
|
-
if (product || order) {
|
|
6096
|
+
if (product || order || invoice) {
|
|
6030
6097
|
// direct user to stripe checkout form when there are no existing cards
|
|
6031
6098
|
if (!userHasPaymentMethod()) {
|
|
6032
6099
|
return switchToCheckoutForm();
|
|
@@ -6043,7 +6110,8 @@ class PelcroActions {
|
|
|
6043
6110
|
switchView,
|
|
6044
6111
|
product,
|
|
6045
6112
|
subscriptionIdToRenew,
|
|
6046
|
-
order
|
|
6113
|
+
order,
|
|
6114
|
+
invoice
|
|
6047
6115
|
} = this.get();
|
|
6048
6116
|
|
|
6049
6117
|
if (product && subscriptionIdToRenew) {
|
|
@@ -6057,6 +6125,10 @@ class PelcroActions {
|
|
|
6057
6125
|
if (order) {
|
|
6058
6126
|
return switchView("order-create");
|
|
6059
6127
|
}
|
|
6128
|
+
|
|
6129
|
+
if (invoice) {
|
|
6130
|
+
return switchView("invoice-payment");
|
|
6131
|
+
}
|
|
6060
6132
|
});
|
|
6061
6133
|
|
|
6062
6134
|
_defineProperty$3(this, "switchToAddressView", () => {
|
|
@@ -6087,6 +6159,23 @@ class PelcroActions {
|
|
|
6087
6159
|
});
|
|
6088
6160
|
});
|
|
6089
6161
|
|
|
6162
|
+
_defineProperty$3(this, "setInvoice", id => {
|
|
6163
|
+
var _window$Pelcro$invoic;
|
|
6164
|
+
|
|
6165
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
6166
|
+
const invoice = invoices.find(inv => String(inv.id) === String(id));
|
|
6167
|
+
|
|
6168
|
+
if (!invoice) {
|
|
6169
|
+
console.error("invalid invoice id");
|
|
6170
|
+
return false;
|
|
6171
|
+
}
|
|
6172
|
+
|
|
6173
|
+
this.set({
|
|
6174
|
+
invoice
|
|
6175
|
+
});
|
|
6176
|
+
return true;
|
|
6177
|
+
});
|
|
6178
|
+
|
|
6090
6179
|
_defineProperty$3(this, "logout", () => {
|
|
6091
6180
|
var _ReactGA$event;
|
|
6092
6181
|
|
|
@@ -6275,7 +6364,7 @@ class PelcroCallbacks {
|
|
|
6275
6364
|
|
|
6276
6365
|
}
|
|
6277
6366
|
|
|
6278
|
-
const initialState$
|
|
6367
|
+
const initialState$i = {
|
|
6279
6368
|
// View
|
|
6280
6369
|
view: null,
|
|
6281
6370
|
// Plans
|
|
@@ -6290,6 +6379,8 @@ const initialState$h = {
|
|
|
6290
6379
|
cartItems: [],
|
|
6291
6380
|
order: null,
|
|
6292
6381
|
// null | SKU[] | SKU,
|
|
6382
|
+
// invoices
|
|
6383
|
+
invoice: null,
|
|
6293
6384
|
// User
|
|
6294
6385
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
6295
6386
|
selectedPaymentMethodId: null,
|
|
@@ -6303,7 +6394,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6303
6394
|
return {
|
|
6304
6395
|
// Store setter
|
|
6305
6396
|
set,
|
|
6306
|
-
...initialState$
|
|
6397
|
+
...initialState$i,
|
|
6307
6398
|
// State actions
|
|
6308
6399
|
...actions,
|
|
6309
6400
|
// Callbacks
|
|
@@ -6454,7 +6545,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
6454
6545
|
*/
|
|
6455
6546
|
|
|
6456
6547
|
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()) {
|
|
6548
|
+
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
6549
|
return true;
|
|
6459
6550
|
}
|
|
6460
6551
|
|
|
@@ -6681,7 +6772,8 @@ const resources = {
|
|
|
6681
6772
|
payment: payment_en,
|
|
6682
6773
|
dashboard: dashboard_en,
|
|
6683
6774
|
select: select_en,
|
|
6684
|
-
notification: notification_en
|
|
6775
|
+
notification: notification_en,
|
|
6776
|
+
invoiceDetails: invoiceDetails_en
|
|
6685
6777
|
},
|
|
6686
6778
|
fr: {
|
|
6687
6779
|
common: common_fr,
|
|
@@ -6704,7 +6796,8 @@ const resources = {
|
|
|
6704
6796
|
payment: payment_fr,
|
|
6705
6797
|
dashboard: dashboard_fr,
|
|
6706
6798
|
select: select_fr,
|
|
6707
|
-
notification: notification_fr
|
|
6799
|
+
notification: notification_fr,
|
|
6800
|
+
invoiceDetails: invoiceDetails_fr
|
|
6708
6801
|
}
|
|
6709
6802
|
}; // set UI language to the page language or default to the language in site settings
|
|
6710
6803
|
|
|
@@ -6995,8 +7088,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6995
7088
|
|
|
6996
7089
|
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
7090
|
|
|
6998
|
-
function _extends$
|
|
6999
|
-
_extends$
|
|
7091
|
+
function _extends$z() {
|
|
7092
|
+
_extends$z = Object.assign || function (target) {
|
|
7000
7093
|
for (var i = 1; i < arguments.length; i++) {
|
|
7001
7094
|
var source = arguments[i];
|
|
7002
7095
|
|
|
@@ -7010,7 +7103,7 @@ function _extends$y() {
|
|
|
7010
7103
|
return target;
|
|
7011
7104
|
};
|
|
7012
7105
|
|
|
7013
|
-
return _extends$
|
|
7106
|
+
return _extends$z.apply(this, arguments);
|
|
7014
7107
|
}
|
|
7015
7108
|
|
|
7016
7109
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7100,7 +7193,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7100
7193
|
var reducer = function reducer(state, action) {
|
|
7101
7194
|
switch (action.type) {
|
|
7102
7195
|
case ActionType.ADD_TOAST:
|
|
7103
|
-
return _extends$
|
|
7196
|
+
return _extends$z({}, state, {
|
|
7104
7197
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7105
7198
|
});
|
|
7106
7199
|
|
|
@@ -7110,9 +7203,9 @@ var reducer = function reducer(state, action) {
|
|
|
7110
7203
|
clearFromRemoveQueue(action.toast.id);
|
|
7111
7204
|
}
|
|
7112
7205
|
|
|
7113
|
-
return _extends$
|
|
7206
|
+
return _extends$z({}, state, {
|
|
7114
7207
|
toasts: state.toasts.map(function (t) {
|
|
7115
|
-
return t.id === action.toast.id ? _extends$
|
|
7208
|
+
return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
|
|
7116
7209
|
})
|
|
7117
7210
|
});
|
|
7118
7211
|
|
|
@@ -7139,9 +7232,9 @@ var reducer = function reducer(state, action) {
|
|
|
7139
7232
|
});
|
|
7140
7233
|
}
|
|
7141
7234
|
|
|
7142
|
-
return _extends$
|
|
7235
|
+
return _extends$z({}, state, {
|
|
7143
7236
|
toasts: state.toasts.map(function (t) {
|
|
7144
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7237
|
+
return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
|
|
7145
7238
|
visible: false
|
|
7146
7239
|
}) : t;
|
|
7147
7240
|
})
|
|
@@ -7149,28 +7242,28 @@ var reducer = function reducer(state, action) {
|
|
|
7149
7242
|
|
|
7150
7243
|
case ActionType.REMOVE_TOAST:
|
|
7151
7244
|
if (action.toastId === undefined) {
|
|
7152
|
-
return _extends$
|
|
7245
|
+
return _extends$z({}, state, {
|
|
7153
7246
|
toasts: []
|
|
7154
7247
|
});
|
|
7155
7248
|
}
|
|
7156
7249
|
|
|
7157
|
-
return _extends$
|
|
7250
|
+
return _extends$z({}, state, {
|
|
7158
7251
|
toasts: state.toasts.filter(function (t) {
|
|
7159
7252
|
return t.id !== action.toastId;
|
|
7160
7253
|
})
|
|
7161
7254
|
});
|
|
7162
7255
|
|
|
7163
7256
|
case ActionType.START_PAUSE:
|
|
7164
|
-
return _extends$
|
|
7257
|
+
return _extends$z({}, state, {
|
|
7165
7258
|
pausedAt: action.time
|
|
7166
7259
|
});
|
|
7167
7260
|
|
|
7168
7261
|
case ActionType.END_PAUSE:
|
|
7169
7262
|
var diff = action.time - (state.pausedAt || 0);
|
|
7170
|
-
return _extends$
|
|
7263
|
+
return _extends$z({}, state, {
|
|
7171
7264
|
pausedAt: undefined,
|
|
7172
7265
|
toasts: state.toasts.map(function (t) {
|
|
7173
|
-
return _extends$
|
|
7266
|
+
return _extends$z({}, t, {
|
|
7174
7267
|
pauseDuration: t.pauseDuration + diff
|
|
7175
7268
|
});
|
|
7176
7269
|
})
|
|
@@ -7217,12 +7310,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7217
7310
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7218
7311
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7219
7312
|
|
|
7220
|
-
return _extends$
|
|
7313
|
+
return _extends$z({}, toastOptions, toastOptions[t.type], t, {
|
|
7221
7314
|
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$
|
|
7315
|
+
style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7223
7316
|
});
|
|
7224
7317
|
});
|
|
7225
|
-
return _extends$
|
|
7318
|
+
return _extends$z({}, state, {
|
|
7226
7319
|
toasts: mergedToasts
|
|
7227
7320
|
});
|
|
7228
7321
|
};
|
|
@@ -7232,7 +7325,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7232
7325
|
type = 'blank';
|
|
7233
7326
|
}
|
|
7234
7327
|
|
|
7235
|
-
return _extends$
|
|
7328
|
+
return _extends$z({
|
|
7236
7329
|
createdAt: Date.now(),
|
|
7237
7330
|
visible: true,
|
|
7238
7331
|
type: type,
|
|
@@ -7282,14 +7375,14 @@ toast.remove = function (toastId) {
|
|
|
7282
7375
|
};
|
|
7283
7376
|
|
|
7284
7377
|
toast.promise = function (promise, msgs, opts) {
|
|
7285
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7378
|
+
var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
|
|
7286
7379
|
promise.then(function (p) {
|
|
7287
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7380
|
+
toast.success(resolveValue(msgs.success, p), _extends$z({
|
|
7288
7381
|
id: id
|
|
7289
7382
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7290
7383
|
return p;
|
|
7291
7384
|
})["catch"](function (e) {
|
|
7292
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7385
|
+
toast.error(resolveValue(msgs.error, e), _extends$z({
|
|
7293
7386
|
id: id
|
|
7294
7387
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7295
7388
|
});
|
|
@@ -7628,7 +7721,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7628
7721
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7629
7722
|
return React.createElement(ToastBarBase, {
|
|
7630
7723
|
className: toast.className,
|
|
7631
|
-
style: _extends$
|
|
7724
|
+
style: _extends$z({}, animationStyle, style, toast.style)
|
|
7632
7725
|
}, typeof children === 'function' ? children({
|
|
7633
7726
|
icon: icon,
|
|
7634
7727
|
message: message
|
|
@@ -7658,7 +7751,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7658
7751
|
} : position.includes('right') ? {
|
|
7659
7752
|
justifyContent: 'flex-end'
|
|
7660
7753
|
} : {};
|
|
7661
|
-
return _extends$
|
|
7754
|
+
return _extends$z({
|
|
7662
7755
|
left: 0,
|
|
7663
7756
|
right: 0,
|
|
7664
7757
|
display: 'flex',
|
|
@@ -7685,7 +7778,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7685
7778
|
handlers = _useToaster.handlers;
|
|
7686
7779
|
|
|
7687
7780
|
return React.createElement("div", {
|
|
7688
|
-
style: _extends$
|
|
7781
|
+
style: _extends$z({
|
|
7689
7782
|
position: 'fixed',
|
|
7690
7783
|
zIndex: 9999,
|
|
7691
7784
|
top: DEFAULT_OFFSET,
|
|
@@ -7720,82 +7813,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7720
7813
|
}));
|
|
7721
7814
|
};
|
|
7722
7815
|
|
|
7723
|
-
var _path$
|
|
7816
|
+
var _path$w;
|
|
7724
7817
|
|
|
7725
|
-
function _extends$
|
|
7818
|
+
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
7819
|
|
|
7727
7820
|
function SvgCheckSolid(props) {
|
|
7728
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7821
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
7729
7822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7730
7823
|
className: "h-5 w-5",
|
|
7731
7824
|
viewBox: "0 0 20 20",
|
|
7732
7825
|
fill: "currentColor"
|
|
7733
|
-
}, props), _path$
|
|
7826
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7734
7827
|
fillRule: "evenodd",
|
|
7735
7828
|
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
7829
|
clipRule: "evenodd"
|
|
7737
7830
|
})));
|
|
7738
7831
|
}
|
|
7739
7832
|
|
|
7740
|
-
var _path$
|
|
7833
|
+
var _path$v;
|
|
7741
7834
|
|
|
7742
|
-
function _extends$
|
|
7835
|
+
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
7836
|
|
|
7744
7837
|
function SvgXIcon(props) {
|
|
7745
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7838
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
7746
7839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7747
7840
|
viewBox: "0 0 20 20",
|
|
7748
7841
|
fill: "currentColor"
|
|
7749
|
-
}, props), _path$
|
|
7842
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7750
7843
|
fill: "evenodd",
|
|
7751
7844
|
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
7845
|
clipRule: "evenodd"
|
|
7753
7846
|
})));
|
|
7754
7847
|
}
|
|
7755
7848
|
|
|
7756
|
-
var _path$
|
|
7849
|
+
var _path$u;
|
|
7757
7850
|
|
|
7758
|
-
function _extends$
|
|
7851
|
+
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
7852
|
|
|
7760
7853
|
function SvgXIconSolid(props) {
|
|
7761
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7854
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
7762
7855
|
className: "plc-w-4 plc-h-4",
|
|
7763
7856
|
fill: "currentColor",
|
|
7764
7857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7765
7858
|
viewBox: "0 0 100 100"
|
|
7766
|
-
}, props), _path$
|
|
7859
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7767
7860
|
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
7861
|
})));
|
|
7769
7862
|
}
|
|
7770
7863
|
|
|
7771
|
-
var _path$
|
|
7864
|
+
var _path$t;
|
|
7772
7865
|
|
|
7773
|
-
function _extends$
|
|
7866
|
+
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
7867
|
|
|
7775
7868
|
function SvgExclamation(props) {
|
|
7776
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7869
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
7777
7870
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7778
7871
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7779
7872
|
viewBox: "0 0 20 20",
|
|
7780
7873
|
fill: "currentColor"
|
|
7781
|
-
}, props), _path$
|
|
7874
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7782
7875
|
fillRule: "evenodd",
|
|
7783
7876
|
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
7877
|
clipRule: "evenodd"
|
|
7785
7878
|
})));
|
|
7786
7879
|
}
|
|
7787
7880
|
|
|
7788
|
-
var _path$
|
|
7881
|
+
var _path$s, _path2$4;
|
|
7789
7882
|
|
|
7790
|
-
function _extends$
|
|
7883
|
+
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
7884
|
|
|
7792
7885
|
function SvgSpinner(props) {
|
|
7793
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
7886
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
7794
7887
|
className: "plc-animate-spin",
|
|
7795
7888
|
viewBox: "0 0 24 24",
|
|
7796
7889
|
fill: "currentColor",
|
|
7797
7890
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7798
|
-
}, props), _path$
|
|
7891
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
7799
7892
|
opacity: 0.2,
|
|
7800
7893
|
fill: "evenodd",
|
|
7801
7894
|
clipRule: "evenodd",
|
|
@@ -8829,6 +8922,10 @@ const initViewFromURL = () => {
|
|
|
8829
8922
|
return verifyEmailTokenFromUrl();
|
|
8830
8923
|
}
|
|
8831
8924
|
|
|
8925
|
+
if (view === "invoice-details") {
|
|
8926
|
+
return showInvoiceDetailsFromUrl();
|
|
8927
|
+
}
|
|
8928
|
+
|
|
8832
8929
|
switchView(view);
|
|
8833
8930
|
});
|
|
8834
8931
|
}
|
|
@@ -9005,6 +9102,32 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
9005
9102
|
});
|
|
9006
9103
|
};
|
|
9007
9104
|
|
|
9105
|
+
const showInvoiceDetailsFromUrl = () => {
|
|
9106
|
+
const {
|
|
9107
|
+
isAuthenticated,
|
|
9108
|
+
setInvoice,
|
|
9109
|
+
whenSiteReady,
|
|
9110
|
+
switchView
|
|
9111
|
+
} = usePelcro.getStore();
|
|
9112
|
+
whenSiteReady(() => {
|
|
9113
|
+
if (!isAuthenticated()) {
|
|
9114
|
+
return switchView("login");
|
|
9115
|
+
}
|
|
9116
|
+
|
|
9117
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9118
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9119
|
+
|
|
9120
|
+
if (!wasSetSuccessfully) {
|
|
9121
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9122
|
+
returnObjects: true
|
|
9123
|
+
});
|
|
9124
|
+
return notify.error(errorMessage);
|
|
9125
|
+
}
|
|
9126
|
+
|
|
9127
|
+
return switchView("invoice-details");
|
|
9128
|
+
});
|
|
9129
|
+
};
|
|
9130
|
+
|
|
9008
9131
|
const defaultOptions = {
|
|
9009
9132
|
loadPaymentSDKs: true,
|
|
9010
9133
|
loadAuth0SDK: true,
|
|
@@ -9344,7 +9467,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9344
9467
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9345
9468
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9346
9469
|
|
|
9347
|
-
const initialState$
|
|
9470
|
+
const initialState$h = {
|
|
9348
9471
|
email: "",
|
|
9349
9472
|
password: "",
|
|
9350
9473
|
emailError: null,
|
|
@@ -9355,10 +9478,10 @@ const initialState$g = {
|
|
|
9355
9478
|
content: ""
|
|
9356
9479
|
}
|
|
9357
9480
|
};
|
|
9358
|
-
const store$
|
|
9481
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
9359
9482
|
const {
|
|
9360
|
-
Provider: Provider$
|
|
9361
|
-
} = store$
|
|
9483
|
+
Provider: Provider$h
|
|
9484
|
+
} = store$h;
|
|
9362
9485
|
|
|
9363
9486
|
const LoginContainer = ({
|
|
9364
9487
|
style,
|
|
@@ -9465,7 +9588,7 @@ const LoginContainer = ({
|
|
|
9465
9588
|
});
|
|
9466
9589
|
|
|
9467
9590
|
case RESET_LOGIN_FORM:
|
|
9468
|
-
return initialState$
|
|
9591
|
+
return initialState$h;
|
|
9469
9592
|
|
|
9470
9593
|
case DISABLE_LOGIN_BUTTON:
|
|
9471
9594
|
return lib_7({ ...state,
|
|
@@ -9483,12 +9606,12 @@ const LoginContainer = ({
|
|
|
9483
9606
|
default:
|
|
9484
9607
|
return state;
|
|
9485
9608
|
}
|
|
9486
|
-
}, initialState$
|
|
9609
|
+
}, initialState$h);
|
|
9487
9610
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9488
9611
|
style: { ...style
|
|
9489
9612
|
},
|
|
9490
9613
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9491
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
9614
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
9492
9615
|
value: {
|
|
9493
9616
|
state,
|
|
9494
9617
|
dispatch
|
|
@@ -9496,12 +9619,12 @@ const LoginContainer = ({
|
|
|
9496
9619
|
}, children.length ? children.map((child, i) => {
|
|
9497
9620
|
if (child) {
|
|
9498
9621
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9499
|
-
store: store$
|
|
9622
|
+
store: store$h,
|
|
9500
9623
|
key: i
|
|
9501
9624
|
});
|
|
9502
9625
|
}
|
|
9503
9626
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
9504
|
-
store: store$
|
|
9627
|
+
store: store$h
|
|
9505
9628
|
})));
|
|
9506
9629
|
};
|
|
9507
9630
|
|
|
@@ -9746,7 +9869,7 @@ const LoginButton = ({
|
|
|
9746
9869
|
buttonDisabled
|
|
9747
9870
|
},
|
|
9748
9871
|
dispatch
|
|
9749
|
-
} = React.useContext(store$
|
|
9872
|
+
} = React.useContext(store$h);
|
|
9750
9873
|
const {
|
|
9751
9874
|
t
|
|
9752
9875
|
} = useTranslation("login");
|
|
@@ -9767,23 +9890,23 @@ const LoginButton = ({
|
|
|
9767
9890
|
};
|
|
9768
9891
|
|
|
9769
9892
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
9770
|
-
store: store$
|
|
9893
|
+
store: store$h
|
|
9771
9894
|
}, props));
|
|
9772
9895
|
|
|
9773
9896
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
9774
|
-
store: store$
|
|
9897
|
+
store: store$h
|
|
9775
9898
|
}, props));
|
|
9776
9899
|
|
|
9777
|
-
var _path$
|
|
9900
|
+
var _path$r;
|
|
9778
9901
|
|
|
9779
|
-
function _extends$
|
|
9902
|
+
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
9903
|
|
|
9781
9904
|
function SvgCheck(props) {
|
|
9782
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9905
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
9783
9906
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9784
9907
|
fill: "currentColor",
|
|
9785
9908
|
viewBox: "0 0 20 20"
|
|
9786
|
-
}, props), _path$
|
|
9909
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9787
9910
|
fillRule: "evenodd",
|
|
9788
9911
|
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
9912
|
clipRule: "evenodd"
|
|
@@ -9848,7 +9971,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9848
9971
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9849
9972
|
facebookLoginRenderProps.FacebookLogin;
|
|
9850
9973
|
|
|
9851
|
-
const initialState$
|
|
9974
|
+
const initialState$g = {
|
|
9852
9975
|
email: "",
|
|
9853
9976
|
password: "",
|
|
9854
9977
|
emailError: null,
|
|
@@ -9865,10 +9988,10 @@ const initialState$f = {
|
|
|
9865
9988
|
content: ""
|
|
9866
9989
|
}
|
|
9867
9990
|
};
|
|
9868
|
-
const store$
|
|
9991
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
9869
9992
|
const {
|
|
9870
|
-
Provider: Provider$
|
|
9871
|
-
} = store$
|
|
9993
|
+
Provider: Provider$g
|
|
9994
|
+
} = store$g;
|
|
9872
9995
|
|
|
9873
9996
|
const RegisterContainer = ({
|
|
9874
9997
|
style,
|
|
@@ -10051,7 +10174,7 @@ const RegisterContainer = ({
|
|
|
10051
10174
|
});
|
|
10052
10175
|
|
|
10053
10176
|
case RESET_LOGIN_FORM:
|
|
10054
|
-
return initialState$
|
|
10177
|
+
return initialState$g;
|
|
10055
10178
|
|
|
10056
10179
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10057
10180
|
return lib_7({ ...state,
|
|
@@ -10069,12 +10192,12 @@ const RegisterContainer = ({
|
|
|
10069
10192
|
default:
|
|
10070
10193
|
return state;
|
|
10071
10194
|
}
|
|
10072
|
-
}, initialState$
|
|
10195
|
+
}, initialState$g);
|
|
10073
10196
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10074
10197
|
style: { ...style
|
|
10075
10198
|
},
|
|
10076
10199
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10077
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
10200
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
10078
10201
|
value: {
|
|
10079
10202
|
state,
|
|
10080
10203
|
dispatch
|
|
@@ -10082,12 +10205,12 @@ const RegisterContainer = ({
|
|
|
10082
10205
|
}, children.length ? children.map((child, i) => {
|
|
10083
10206
|
if (child) {
|
|
10084
10207
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
10085
|
-
store: store$
|
|
10208
|
+
store: store$g,
|
|
10086
10209
|
key: i
|
|
10087
10210
|
});
|
|
10088
10211
|
}
|
|
10089
10212
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
10090
|
-
store: store$
|
|
10213
|
+
store: store$g
|
|
10091
10214
|
})));
|
|
10092
10215
|
};
|
|
10093
10216
|
/**
|
|
@@ -10102,15 +10225,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10102
10225
|
return hasSecuritySdkLoaded;
|
|
10103
10226
|
}
|
|
10104
10227
|
|
|
10105
|
-
var _path$
|
|
10228
|
+
var _path$q;
|
|
10106
10229
|
|
|
10107
|
-
function _extends$
|
|
10230
|
+
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
10231
|
|
|
10109
10232
|
function SvgFacebookLogo(props) {
|
|
10110
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10233
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
10111
10234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10112
10235
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10113
|
-
}, props), _path$
|
|
10236
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10114
10237
|
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
10238
|
fill: "#3c5a9a"
|
|
10116
10239
|
})));
|
|
@@ -10127,10 +10250,10 @@ const FacebookLoginButton = ({
|
|
|
10127
10250
|
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
10251
|
const {
|
|
10129
10252
|
dispatch: loginDispatch
|
|
10130
|
-
} = React.useContext(store$
|
|
10253
|
+
} = React.useContext(store$h);
|
|
10131
10254
|
const {
|
|
10132
10255
|
dispatch: registerDispatch
|
|
10133
|
-
} = React.useContext(store$
|
|
10256
|
+
} = React.useContext(store$g);
|
|
10134
10257
|
|
|
10135
10258
|
const onSuccess = facebookUser => {
|
|
10136
10259
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10183,15 +10306,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10183
10306
|
unwrapExports(googleLogin);
|
|
10184
10307
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10185
10308
|
|
|
10186
|
-
var _path$
|
|
10309
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10187
10310
|
|
|
10188
|
-
function _extends$
|
|
10311
|
+
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
10312
|
|
|
10190
10313
|
function SvgGoogleLogo(props) {
|
|
10191
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10314
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
10192
10315
|
viewBox: "0 0 24 24",
|
|
10193
10316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10194
|
-
}, props), _path$
|
|
10317
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10195
10318
|
fill: "#4285F4",
|
|
10196
10319
|
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
10320
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10217,10 +10340,10 @@ const GoogleLoginButton = ({
|
|
|
10217
10340
|
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
10341
|
const {
|
|
10219
10342
|
dispatch: loginDispatch
|
|
10220
|
-
} = React.useContext(store$
|
|
10343
|
+
} = React.useContext(store$h);
|
|
10221
10344
|
const {
|
|
10222
10345
|
dispatch: registerDispatch
|
|
10223
|
-
} = React.useContext(store$
|
|
10346
|
+
} = React.useContext(store$g);
|
|
10224
10347
|
|
|
10225
10348
|
const onSuccess = response => {
|
|
10226
10349
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10268,15 +10391,15 @@ const GoogleLoginButton = ({
|
|
|
10268
10391
|
}) : null;
|
|
10269
10392
|
};
|
|
10270
10393
|
|
|
10271
|
-
var _path$
|
|
10394
|
+
var _path$o;
|
|
10272
10395
|
|
|
10273
|
-
function _extends$
|
|
10396
|
+
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
10397
|
|
|
10275
10398
|
function SvgAuth0Logo(props) {
|
|
10276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10399
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10277
10400
|
viewBox: "0 0 256 285",
|
|
10278
10401
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10279
|
-
}, props), _path$
|
|
10402
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10280
10403
|
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
10404
|
})));
|
|
10282
10405
|
}
|
|
@@ -10316,10 +10439,10 @@ const Auth0LoginButton = ({
|
|
|
10316
10439
|
}, [auth0Enabled, auth0Loaded]);
|
|
10317
10440
|
const {
|
|
10318
10441
|
dispatch: loginDispatch
|
|
10319
|
-
} = React.useContext(store$
|
|
10442
|
+
} = React.useContext(store$h);
|
|
10320
10443
|
const {
|
|
10321
10444
|
dispatch: registerDispatch
|
|
10322
|
-
} = React.useContext(store$
|
|
10445
|
+
} = React.useContext(store$g);
|
|
10323
10446
|
|
|
10324
10447
|
function handleClick() {
|
|
10325
10448
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10452,15 +10575,15 @@ function LoginView(props) {
|
|
|
10452
10575
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10453
10576
|
}
|
|
10454
10577
|
|
|
10455
|
-
var _path$
|
|
10578
|
+
var _path$n, _path2$2, _path3;
|
|
10456
10579
|
|
|
10457
|
-
function _extends$
|
|
10580
|
+
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); }
|
|
10458
10581
|
|
|
10459
10582
|
function SvgPelcroAuthorship(props) {
|
|
10460
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10583
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10461
10584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10462
10585
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10463
|
-
}, props), _path$
|
|
10586
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10464
10587
|
fill: "none",
|
|
10465
10588
|
stroke: "#4a4a4a",
|
|
10466
10589
|
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"
|
|
@@ -10607,11 +10730,11 @@ function LoginModal({
|
|
|
10607
10730
|
LoginModal.viewId = "login";
|
|
10608
10731
|
|
|
10609
10732
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
10610
|
-
store: store$
|
|
10733
|
+
store: store$g
|
|
10611
10734
|
}, props));
|
|
10612
10735
|
|
|
10613
10736
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
10614
|
-
store: store$
|
|
10737
|
+
store: store$g
|
|
10615
10738
|
}, props));
|
|
10616
10739
|
|
|
10617
10740
|
const RegisterButton = ({
|
|
@@ -10631,7 +10754,7 @@ const RegisterButton = ({
|
|
|
10631
10754
|
buttonDisabled
|
|
10632
10755
|
},
|
|
10633
10756
|
dispatch
|
|
10634
|
-
} = React.useContext(store$
|
|
10757
|
+
} = React.useContext(store$g);
|
|
10635
10758
|
const {
|
|
10636
10759
|
t
|
|
10637
10760
|
} = useTranslation("register");
|
|
@@ -10769,7 +10892,7 @@ function FirstName({
|
|
|
10769
10892
|
}
|
|
10770
10893
|
|
|
10771
10894
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
10772
|
-
store: store$
|
|
10895
|
+
store: store$g
|
|
10773
10896
|
}, props));
|
|
10774
10897
|
|
|
10775
10898
|
function LastName({
|
|
@@ -10800,7 +10923,7 @@ function LastName({
|
|
|
10800
10923
|
}
|
|
10801
10924
|
|
|
10802
10925
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
10803
|
-
store: store$
|
|
10926
|
+
store: store$g
|
|
10804
10927
|
}, props));
|
|
10805
10928
|
|
|
10806
10929
|
/**
|
|
@@ -10924,7 +11047,7 @@ function TextInput({
|
|
|
10924
11047
|
|
|
10925
11048
|
const RegisterTextInput = props => {
|
|
10926
11049
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
10927
|
-
store: store$
|
|
11050
|
+
store: store$g
|
|
10928
11051
|
}));
|
|
10929
11052
|
};
|
|
10930
11053
|
|
|
@@ -12593,7 +12716,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12593
12716
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12594
12717
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12595
12718
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12596
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12719
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12720
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12597
12721
|
};
|
|
12598
12722
|
|
|
12599
12723
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12655,6 +12779,7 @@ class Subscription {
|
|
|
12655
12779
|
* @property {number} [subscriptionIdToRenew]
|
|
12656
12780
|
* @property {number} [quantity]
|
|
12657
12781
|
* @property {string} addressId
|
|
12782
|
+
* @property {number} invoiceId
|
|
12658
12783
|
*/
|
|
12659
12784
|
|
|
12660
12785
|
/**
|
|
@@ -12695,6 +12820,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12695
12820
|
|
|
12696
12821
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12697
12822
|
|
|
12823
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12824
|
+
|
|
12698
12825
|
class StripeGateway {
|
|
12699
12826
|
constructor() {
|
|
12700
12827
|
_paymentGateway.set(this, {
|
|
@@ -12718,6 +12845,9 @@ class StripeGateway {
|
|
|
12718
12845
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12719
12846
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12720
12847
|
|
|
12848
|
+
case types.PAY_INVOICE:
|
|
12849
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12850
|
+
|
|
12721
12851
|
default:
|
|
12722
12852
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12723
12853
|
}
|
|
@@ -12826,6 +12956,23 @@ class StripeGateway {
|
|
|
12826
12956
|
});
|
|
12827
12957
|
}
|
|
12828
12958
|
});
|
|
12959
|
+
|
|
12960
|
+
_payInvoice.set(this, {
|
|
12961
|
+
writable: true,
|
|
12962
|
+
value: (options, callback) => {
|
|
12963
|
+
const {
|
|
12964
|
+
token,
|
|
12965
|
+
invoiceId
|
|
12966
|
+
} = options;
|
|
12967
|
+
window.Pelcro.invoice.pay({
|
|
12968
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
12969
|
+
gateway_token: token,
|
|
12970
|
+
invoice_id: invoiceId
|
|
12971
|
+
}, (err, res) => {
|
|
12972
|
+
callback(err, res);
|
|
12973
|
+
});
|
|
12974
|
+
}
|
|
12975
|
+
});
|
|
12829
12976
|
}
|
|
12830
12977
|
|
|
12831
12978
|
}
|
|
@@ -12839,6 +12986,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12839
12986
|
|
|
12840
12987
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12841
12988
|
|
|
12989
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
12990
|
+
|
|
12842
12991
|
class PaypalGateWay {
|
|
12843
12992
|
constructor() {
|
|
12844
12993
|
_paymentGateway2.set(this, {
|
|
@@ -12856,6 +13005,9 @@ class PaypalGateWay {
|
|
|
12856
13005
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12857
13006
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12858
13007
|
|
|
13008
|
+
case types.PAY_INVOICE:
|
|
13009
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
13010
|
+
|
|
12859
13011
|
default:
|
|
12860
13012
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12861
13013
|
}
|
|
@@ -12916,6 +13068,23 @@ class PaypalGateWay {
|
|
|
12916
13068
|
});
|
|
12917
13069
|
}
|
|
12918
13070
|
});
|
|
13071
|
+
|
|
13072
|
+
_payInvoice2.set(this, {
|
|
13073
|
+
writable: true,
|
|
13074
|
+
value: (options, callback) => {
|
|
13075
|
+
const {
|
|
13076
|
+
token,
|
|
13077
|
+
invoiceId
|
|
13078
|
+
} = options;
|
|
13079
|
+
window.Pelcro.invoice.pay({
|
|
13080
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13081
|
+
gateway_token: token,
|
|
13082
|
+
invoice_id: invoiceId
|
|
13083
|
+
}, (err, res) => {
|
|
13084
|
+
callback(err, res);
|
|
13085
|
+
});
|
|
13086
|
+
}
|
|
13087
|
+
});
|
|
12919
13088
|
}
|
|
12920
13089
|
|
|
12921
13090
|
}
|
|
@@ -12940,7 +13109,7 @@ class PaypalGateWay {
|
|
|
12940
13109
|
|
|
12941
13110
|
/** @type {PaymentStateType} */
|
|
12942
13111
|
|
|
12943
|
-
const initialState$
|
|
13112
|
+
const initialState$f = {
|
|
12944
13113
|
disableSubmit: false,
|
|
12945
13114
|
isLoading: false,
|
|
12946
13115
|
disableCouponButton: false,
|
|
@@ -12959,10 +13128,10 @@ const initialState$e = {
|
|
|
12959
13128
|
content: ""
|
|
12960
13129
|
}
|
|
12961
13130
|
};
|
|
12962
|
-
const store$
|
|
13131
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
12963
13132
|
const {
|
|
12964
|
-
Provider: Provider$
|
|
12965
|
-
} = store$
|
|
13133
|
+
Provider: Provider$f
|
|
13134
|
+
} = store$f;
|
|
12966
13135
|
|
|
12967
13136
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12968
13137
|
style,
|
|
@@ -12975,7 +13144,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12975
13144
|
onFailure = () => {},
|
|
12976
13145
|
...props
|
|
12977
13146
|
}) => {
|
|
12978
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13147
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12979
13148
|
|
|
12980
13149
|
const {
|
|
12981
13150
|
t
|
|
@@ -12992,6 +13161,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12992
13161
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12993
13162
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12994
13163
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13164
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12995
13165
|
React.useEffect(() => {
|
|
12996
13166
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12997
13167
|
dispatch({
|
|
@@ -13560,6 +13730,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13560
13730
|
});
|
|
13561
13731
|
};
|
|
13562
13732
|
|
|
13733
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13734
|
+
const subscription = new Subscription(gatewayService);
|
|
13735
|
+
return subscription.execute({
|
|
13736
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13737
|
+
token: gatewayToken,
|
|
13738
|
+
invoiceId: invoice.id
|
|
13739
|
+
}, (err, res) => {
|
|
13740
|
+
dispatch({
|
|
13741
|
+
type: DISABLE_SUBMIT,
|
|
13742
|
+
payload: false
|
|
13743
|
+
});
|
|
13744
|
+
dispatch({
|
|
13745
|
+
type: LOADING,
|
|
13746
|
+
payload: false
|
|
13747
|
+
});
|
|
13748
|
+
|
|
13749
|
+
if (err) {
|
|
13750
|
+
onFailure(err);
|
|
13751
|
+
return dispatch({
|
|
13752
|
+
type: SHOW_ALERT,
|
|
13753
|
+
payload: {
|
|
13754
|
+
type: "error",
|
|
13755
|
+
content: getErrorMessages(err)
|
|
13756
|
+
}
|
|
13757
|
+
});
|
|
13758
|
+
}
|
|
13759
|
+
|
|
13760
|
+
set({
|
|
13761
|
+
invoice: null
|
|
13762
|
+
});
|
|
13763
|
+
onSuccess(res);
|
|
13764
|
+
});
|
|
13765
|
+
};
|
|
13766
|
+
|
|
13563
13767
|
const updatePaymentSource = (state, dispatch) => {
|
|
13564
13768
|
return stripe.createSource({
|
|
13565
13769
|
type: "card"
|
|
@@ -13634,13 +13838,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13634
13838
|
source,
|
|
13635
13839
|
error
|
|
13636
13840
|
}) => {
|
|
13637
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13841
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13638
13842
|
|
|
13639
13843
|
if (error) {
|
|
13640
13844
|
return handlePaymentError(error);
|
|
13641
13845
|
}
|
|
13642
13846
|
|
|
13643
13847
|
const getOrderItemsTotal = () => {
|
|
13848
|
+
if (!order) {
|
|
13849
|
+
return null;
|
|
13850
|
+
}
|
|
13851
|
+
|
|
13644
13852
|
const isQuickPurchase = !Array.isArray(order);
|
|
13645
13853
|
|
|
13646
13854
|
if (isQuickPurchase) {
|
|
@@ -13656,7 +13864,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13656
13864
|
}, 0);
|
|
13657
13865
|
};
|
|
13658
13866
|
|
|
13659
|
-
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();
|
|
13867
|
+
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();
|
|
13660
13868
|
|
|
13661
13869
|
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) {
|
|
13662
13870
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13689,6 +13897,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13689
13897
|
const resolveTaxCalculation = () => {
|
|
13690
13898
|
var _window$Pelcro$site$r2;
|
|
13691
13899
|
|
|
13900
|
+
if (type === "invoicePayment") {
|
|
13901
|
+
return new Promise(resolve => resolve());
|
|
13902
|
+
}
|
|
13903
|
+
|
|
13692
13904
|
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;
|
|
13693
13905
|
return new Promise((resolve, reject) => {
|
|
13694
13906
|
// resolve early if taxes isn't enabled
|
|
@@ -13762,6 +13974,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13762
13974
|
subscribe(stripeSource, state, dispatch);
|
|
13763
13975
|
} else if (stripeSource && type === "orderCreate") {
|
|
13764
13976
|
purchase(stripeSource, state, dispatch);
|
|
13977
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
13978
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13765
13979
|
}
|
|
13766
13980
|
};
|
|
13767
13981
|
|
|
@@ -13895,7 +14109,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13895
14109
|
});
|
|
13896
14110
|
|
|
13897
14111
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13898
|
-
return lib_5(state, () =>
|
|
14112
|
+
return lib_5(state, (state, dispatch) => {
|
|
14113
|
+
if (type === "invoicePayment") {
|
|
14114
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14115
|
+
} else {
|
|
14116
|
+
handlePaypalSubscription(state, action.payload);
|
|
14117
|
+
}
|
|
14118
|
+
});
|
|
13899
14119
|
|
|
13900
14120
|
case SET_UPDATED_PRICE:
|
|
13901
14121
|
return lib_7({ ...state,
|
|
@@ -13953,21 +14173,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13953
14173
|
default:
|
|
13954
14174
|
return state;
|
|
13955
14175
|
}
|
|
13956
|
-
}, initialState$
|
|
14176
|
+
}, initialState$f);
|
|
13957
14177
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13958
14178
|
style: { ...style
|
|
13959
14179
|
},
|
|
13960
14180
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13961
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
14181
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
13962
14182
|
value: {
|
|
13963
14183
|
state,
|
|
13964
14184
|
dispatch
|
|
13965
14185
|
}
|
|
13966
14186
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13967
|
-
store: store$
|
|
14187
|
+
store: store$f,
|
|
13968
14188
|
key: i
|
|
13969
14189
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13970
|
-
store: store$
|
|
14190
|
+
store: store$f
|
|
13971
14191
|
})));
|
|
13972
14192
|
};
|
|
13973
14193
|
|
|
@@ -13989,7 +14209,7 @@ const PaymentMethodContainer = props => {
|
|
|
13989
14209
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13990
14210
|
locale: getPageOrDefaultLanguage()
|
|
13991
14211
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
13992
|
-
store: store$
|
|
14212
|
+
store: store$f
|
|
13993
14213
|
}, props))));
|
|
13994
14214
|
}
|
|
13995
14215
|
|
|
@@ -14042,7 +14262,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14042
14262
|
currentPlan,
|
|
14043
14263
|
updatedPrice
|
|
14044
14264
|
}
|
|
14045
|
-
} = React.useContext(store$
|
|
14265
|
+
} = React.useContext(store$f);
|
|
14046
14266
|
|
|
14047
14267
|
const updatePaymentRequest = () => {
|
|
14048
14268
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14102,7 +14322,7 @@ const DiscountedPrice = props => {
|
|
|
14102
14322
|
taxAmount,
|
|
14103
14323
|
percentOff
|
|
14104
14324
|
}
|
|
14105
|
-
} = React.useContext(store$
|
|
14325
|
+
} = React.useContext(store$f);
|
|
14106
14326
|
const {
|
|
14107
14327
|
order,
|
|
14108
14328
|
plan
|
|
@@ -14152,7 +14372,7 @@ const SubmitPaymentMethod = ({
|
|
|
14152
14372
|
isLoading,
|
|
14153
14373
|
updatedPrice
|
|
14154
14374
|
}
|
|
14155
|
-
} = React.useContext(store$
|
|
14375
|
+
} = React.useContext(store$f);
|
|
14156
14376
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14157
14377
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14158
14378
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14173,17 +14393,17 @@ const SubmitPaymentMethod = ({
|
|
|
14173
14393
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14174
14394
|
};
|
|
14175
14395
|
|
|
14176
|
-
var _path$
|
|
14396
|
+
var _path$m;
|
|
14177
14397
|
|
|
14178
|
-
function _extends$
|
|
14398
|
+
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); }
|
|
14179
14399
|
|
|
14180
14400
|
function SvgArrowLeft(props) {
|
|
14181
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14401
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
14182
14402
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14183
14403
|
fill: "none",
|
|
14184
14404
|
viewBox: "0 0 24 24",
|
|
14185
14405
|
stroke: "currentColor"
|
|
14186
|
-
}, props), _path$
|
|
14406
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14187
14407
|
strokeLinecap: "round",
|
|
14188
14408
|
strokeLinejoin: "round",
|
|
14189
14409
|
strokeWidth: 2,
|
|
@@ -14202,7 +14422,7 @@ const ApplyCouponButton = ({
|
|
|
14202
14422
|
disableCouponButton
|
|
14203
14423
|
},
|
|
14204
14424
|
dispatch
|
|
14205
|
-
} = React.useContext(store$
|
|
14425
|
+
} = React.useContext(store$f);
|
|
14206
14426
|
const {
|
|
14207
14427
|
t
|
|
14208
14428
|
} = useTranslation("checkoutForm");
|
|
@@ -14236,7 +14456,7 @@ const CouponCodeField = props => {
|
|
|
14236
14456
|
couponCode,
|
|
14237
14457
|
couponError
|
|
14238
14458
|
}
|
|
14239
|
-
} = React.useContext(store$
|
|
14459
|
+
} = React.useContext(store$f);
|
|
14240
14460
|
|
|
14241
14461
|
const onCouponCodeChange = e => {
|
|
14242
14462
|
dispatch({
|
|
@@ -14265,17 +14485,17 @@ const CouponCodeField = props => {
|
|
|
14265
14485
|
}, props));
|
|
14266
14486
|
};
|
|
14267
14487
|
|
|
14268
|
-
var _path$
|
|
14488
|
+
var _path$l;
|
|
14269
14489
|
|
|
14270
|
-
function _extends$
|
|
14490
|
+
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); }
|
|
14271
14491
|
|
|
14272
14492
|
function SvgTicket(props) {
|
|
14273
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14493
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
14274
14494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14275
14495
|
fill: "none",
|
|
14276
14496
|
viewBox: "0 0 24 24",
|
|
14277
14497
|
stroke: "currentColor"
|
|
14278
|
-
}, props), _path$
|
|
14498
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14279
14499
|
strokeLinecap: "round",
|
|
14280
14500
|
strokeLinejoin: "round",
|
|
14281
14501
|
strokeWidth: 2,
|
|
@@ -14292,7 +14512,7 @@ const CouponCode = ({
|
|
|
14292
14512
|
state: {
|
|
14293
14513
|
enableCouponField
|
|
14294
14514
|
}
|
|
14295
|
-
} = React.useContext(store$
|
|
14515
|
+
} = React.useContext(store$f);
|
|
14296
14516
|
const {
|
|
14297
14517
|
t
|
|
14298
14518
|
} = useTranslation("checkoutForm");
|
|
@@ -14549,17 +14769,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14549
14769
|
const {
|
|
14550
14770
|
dispatch,
|
|
14551
14771
|
state
|
|
14552
|
-
} = React.useContext(store$
|
|
14772
|
+
} = React.useContext(store$f);
|
|
14553
14773
|
const {
|
|
14554
14774
|
product,
|
|
14555
14775
|
plan,
|
|
14776
|
+
invoice,
|
|
14556
14777
|
selectedAddressId
|
|
14557
14778
|
} = usePelcro();
|
|
14558
14779
|
React.useEffect(() => {
|
|
14559
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14780
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14560
14781
|
|
|
14561
14782
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14562
|
-
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 :
|
|
14783
|
+
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;
|
|
14563
14784
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14564
14785
|
|
|
14565
14786
|
const initializePaypal = async () => {
|
|
@@ -14568,7 +14789,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14568
14789
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14569
14790
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14570
14791
|
style: props.buttonStyle,
|
|
14571
|
-
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,
|
|
14792
|
+
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,
|
|
14572
14793
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14573
14794
|
displayName: props.merchantDisplayName,
|
|
14574
14795
|
locale: props.locale,
|
|
@@ -14578,9 +14799,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14578
14799
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14579
14800
|
|
|
14580
14801
|
paypalCheckoutInstance.createPayment({
|
|
14581
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14802
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14582
14803
|
amount: updatedPrice,
|
|
14583
|
-
address: selectedAddress,
|
|
14804
|
+
address: invoice ? null : selectedAddress,
|
|
14584
14805
|
onButtonClick: () => {
|
|
14585
14806
|
dispatch({
|
|
14586
14807
|
type: DISABLE_SUBMIT,
|
|
@@ -14634,16 +14855,16 @@ const BankRedirection = () => {
|
|
|
14634
14855
|
}));
|
|
14635
14856
|
};
|
|
14636
14857
|
|
|
14637
|
-
var _path$
|
|
14858
|
+
var _path$k;
|
|
14638
14859
|
|
|
14639
|
-
function _extends$
|
|
14860
|
+
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); }
|
|
14640
14861
|
|
|
14641
14862
|
function SvgLock(props) {
|
|
14642
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14863
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
14643
14864
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14644
14865
|
viewBox: "0 0 20 20",
|
|
14645
14866
|
fill: "currentColor"
|
|
14646
|
-
}, props), _path$
|
|
14867
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14647
14868
|
fillRule: "evenodd",
|
|
14648
14869
|
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",
|
|
14649
14870
|
clipRule: "evenodd"
|
|
@@ -14660,7 +14881,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14660
14881
|
state: {
|
|
14661
14882
|
isLoading
|
|
14662
14883
|
}
|
|
14663
|
-
} = React.useContext(store$
|
|
14884
|
+
} = React.useContext(store$f);
|
|
14664
14885
|
const {
|
|
14665
14886
|
switchView,
|
|
14666
14887
|
selectedPaymentMethodId
|
|
@@ -14702,7 +14923,7 @@ const TaxAmount = () => {
|
|
|
14702
14923
|
state: {
|
|
14703
14924
|
taxAmount
|
|
14704
14925
|
}
|
|
14705
|
-
} = React.useContext(store$
|
|
14926
|
+
} = React.useContext(store$f);
|
|
14706
14927
|
const {
|
|
14707
14928
|
plan
|
|
14708
14929
|
} = usePelcro();
|
|
@@ -14865,12 +15086,12 @@ function SubscriptionRenewModal({
|
|
|
14865
15086
|
}
|
|
14866
15087
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14867
15088
|
|
|
14868
|
-
var _path$
|
|
15089
|
+
var _path$j;
|
|
14869
15090
|
|
|
14870
|
-
function _extends$
|
|
15091
|
+
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); }
|
|
14871
15092
|
|
|
14872
15093
|
function SvgGift(props) {
|
|
14873
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15094
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14874
15095
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14875
15096
|
fill: "none",
|
|
14876
15097
|
stroke: "currentColor",
|
|
@@ -14879,7 +15100,7 @@ function SvgGift(props) {
|
|
|
14879
15100
|
strokeWidth: 2,
|
|
14880
15101
|
viewBox: "0 0 24 24",
|
|
14881
15102
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14882
|
-
}, props), _path$
|
|
15103
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14883
15104
|
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"
|
|
14884
15105
|
})));
|
|
14885
15106
|
}
|
|
@@ -14917,10 +15138,13 @@ const getCurrentFlow = () => {
|
|
|
14917
15138
|
const {
|
|
14918
15139
|
product,
|
|
14919
15140
|
giftRecipient,
|
|
14920
|
-
giftCode
|
|
15141
|
+
giftCode,
|
|
15142
|
+
invoice
|
|
14921
15143
|
} = usePelcro.getStore();
|
|
14922
15144
|
|
|
14923
|
-
if (
|
|
15145
|
+
if (invoice) {
|
|
15146
|
+
return "invoicePayment";
|
|
15147
|
+
} else if (giftRecipient) {
|
|
14924
15148
|
return "giftCreate";
|
|
14925
15149
|
} else if (giftCode) {
|
|
14926
15150
|
return "giftRedeem";
|
|
@@ -14957,6 +15181,13 @@ const getSuccessContent = i18n => {
|
|
|
14957
15181
|
}),
|
|
14958
15182
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14959
15183
|
successContent: i18n("messages.giftRedeem.content")
|
|
15184
|
+
},
|
|
15185
|
+
invoicePayment: {
|
|
15186
|
+
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
15187
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15188
|
+
}),
|
|
15189
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15190
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14960
15191
|
}
|
|
14961
15192
|
};
|
|
14962
15193
|
return wordingDictionary[flow];
|
|
@@ -15210,7 +15441,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
15210
15441
|
|
|
15211
15442
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15212
15443
|
|
|
15213
|
-
const initialState$
|
|
15444
|
+
const initialState$e = {
|
|
15214
15445
|
didSubToNewslettersBefore: false,
|
|
15215
15446
|
newsletters: [],
|
|
15216
15447
|
isListLoading: true,
|
|
@@ -15220,10 +15451,10 @@ const initialState$d = {
|
|
|
15220
15451
|
content: ""
|
|
15221
15452
|
}
|
|
15222
15453
|
};
|
|
15223
|
-
const store$
|
|
15454
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
15224
15455
|
const {
|
|
15225
|
-
Provider: Provider$
|
|
15226
|
-
} = store$
|
|
15456
|
+
Provider: Provider$e
|
|
15457
|
+
} = store$e;
|
|
15227
15458
|
|
|
15228
15459
|
const NewsletterUpdateContainer = ({
|
|
15229
15460
|
style,
|
|
@@ -15336,7 +15567,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15336
15567
|
default:
|
|
15337
15568
|
return state;
|
|
15338
15569
|
}
|
|
15339
|
-
}, initialState$
|
|
15570
|
+
}, initialState$e);
|
|
15340
15571
|
React.useEffect(() => {
|
|
15341
15572
|
const getUserNewsletters = () => {
|
|
15342
15573
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15380,7 +15611,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15380
15611
|
style: { ...style
|
|
15381
15612
|
},
|
|
15382
15613
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15383
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
15614
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
15384
15615
|
value: {
|
|
15385
15616
|
state,
|
|
15386
15617
|
dispatch
|
|
@@ -15388,12 +15619,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15388
15619
|
}, children.length ? children.map((child, i) => {
|
|
15389
15620
|
if (child) {
|
|
15390
15621
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15391
|
-
store: store$
|
|
15622
|
+
store: store$e,
|
|
15392
15623
|
key: i
|
|
15393
15624
|
});
|
|
15394
15625
|
}
|
|
15395
15626
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15396
|
-
store: store$
|
|
15627
|
+
store: store$e
|
|
15397
15628
|
})));
|
|
15398
15629
|
};
|
|
15399
15630
|
|
|
@@ -15408,7 +15639,7 @@ const NewsletterUpdateButton = ({
|
|
|
15408
15639
|
isSubmitting,
|
|
15409
15640
|
isListLoading
|
|
15410
15641
|
}
|
|
15411
|
-
} = React.useContext(store$
|
|
15642
|
+
} = React.useContext(store$e);
|
|
15412
15643
|
const {
|
|
15413
15644
|
t
|
|
15414
15645
|
} = useTranslation("newsletter");
|
|
@@ -15438,7 +15669,7 @@ const NewsletterUpdateList = () => {
|
|
|
15438
15669
|
newsletters,
|
|
15439
15670
|
isListLoading
|
|
15440
15671
|
}
|
|
15441
|
-
} = React.useContext(store$
|
|
15672
|
+
} = React.useContext(store$e);
|
|
15442
15673
|
|
|
15443
15674
|
if (isListLoading) {
|
|
15444
15675
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
@@ -15642,7 +15873,7 @@ function SubscriptionCreateModal({
|
|
|
15642
15873
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15643
15874
|
|
|
15644
15875
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15645
|
-
const initialState$
|
|
15876
|
+
const initialState$d = {
|
|
15646
15877
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15647
15878
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15648
15879
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15655,10 +15886,10 @@ const initialState$c = {
|
|
|
15655
15886
|
content: ""
|
|
15656
15887
|
}
|
|
15657
15888
|
};
|
|
15658
|
-
const store$
|
|
15889
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
15659
15890
|
const {
|
|
15660
|
-
Provider: Provider$
|
|
15661
|
-
} = store$
|
|
15891
|
+
Provider: Provider$d
|
|
15892
|
+
} = store$d;
|
|
15662
15893
|
|
|
15663
15894
|
const UserUpdateContainer = ({
|
|
15664
15895
|
style,
|
|
@@ -15790,27 +16021,27 @@ const UserUpdateContainer = ({
|
|
|
15790
16021
|
default:
|
|
15791
16022
|
return state;
|
|
15792
16023
|
}
|
|
15793
|
-
}, initialState$
|
|
16024
|
+
}, initialState$d);
|
|
15794
16025
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15795
16026
|
style: { ...style
|
|
15796
16027
|
},
|
|
15797
16028
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15798
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16029
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
15799
16030
|
value: {
|
|
15800
16031
|
state,
|
|
15801
16032
|
dispatch
|
|
15802
16033
|
}
|
|
15803
16034
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15804
|
-
store: store$
|
|
16035
|
+
store: store$d,
|
|
15805
16036
|
key: i
|
|
15806
16037
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15807
|
-
store: store$
|
|
16038
|
+
store: store$d
|
|
15808
16039
|
})));
|
|
15809
16040
|
};
|
|
15810
16041
|
|
|
15811
16042
|
const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
15812
16043
|
disabled: true,
|
|
15813
|
-
store: store$
|
|
16044
|
+
store: store$d
|
|
15814
16045
|
}, props));
|
|
15815
16046
|
|
|
15816
16047
|
const UserUpdateButton = ({
|
|
@@ -15823,7 +16054,7 @@ const UserUpdateButton = ({
|
|
|
15823
16054
|
buttonDisabled
|
|
15824
16055
|
},
|
|
15825
16056
|
dispatch
|
|
15826
|
-
} = React.useContext(store$
|
|
16057
|
+
} = React.useContext(store$d);
|
|
15827
16058
|
const {
|
|
15828
16059
|
t
|
|
15829
16060
|
} = useTranslation("userEdit");
|
|
@@ -15840,11 +16071,11 @@ const UserUpdateButton = ({
|
|
|
15840
16071
|
};
|
|
15841
16072
|
|
|
15842
16073
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
15843
|
-
store: store$
|
|
16074
|
+
store: store$d
|
|
15844
16075
|
}, props));
|
|
15845
16076
|
|
|
15846
16077
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
15847
|
-
store: store$
|
|
16078
|
+
store: store$d
|
|
15848
16079
|
}, props));
|
|
15849
16080
|
|
|
15850
16081
|
function Phone({
|
|
@@ -15873,22 +16104,22 @@ function Phone({
|
|
|
15873
16104
|
}
|
|
15874
16105
|
|
|
15875
16106
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
15876
|
-
store: store$
|
|
16107
|
+
store: store$d
|
|
15877
16108
|
}, props));
|
|
15878
16109
|
|
|
15879
16110
|
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";
|
|
15880
16111
|
|
|
15881
|
-
var _path$
|
|
16112
|
+
var _path$i;
|
|
15882
16113
|
|
|
15883
|
-
function _extends$
|
|
16114
|
+
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); }
|
|
15884
16115
|
|
|
15885
16116
|
function SvgEdit(props) {
|
|
15886
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16117
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
15887
16118
|
className: "plc-w-6 plc-h-6",
|
|
15888
16119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15889
16120
|
viewBox: "0 0 20 20",
|
|
15890
16121
|
fill: "currentColor"
|
|
15891
|
-
}, props), _path$
|
|
16122
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15892
16123
|
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"
|
|
15893
16124
|
})));
|
|
15894
16125
|
}
|
|
@@ -16020,16 +16251,16 @@ function DisplayName({
|
|
|
16020
16251
|
}
|
|
16021
16252
|
|
|
16022
16253
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
16023
|
-
store: store$
|
|
16254
|
+
store: store$d
|
|
16024
16255
|
}, props));
|
|
16025
16256
|
|
|
16026
16257
|
const UserUpdateTextInput = props => {
|
|
16027
16258
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16028
|
-
store: store$
|
|
16259
|
+
store: store$d
|
|
16029
16260
|
}));
|
|
16030
16261
|
};
|
|
16031
16262
|
|
|
16032
|
-
const initialState$
|
|
16263
|
+
const initialState$c = {
|
|
16033
16264
|
isSubmitting: false,
|
|
16034
16265
|
firstName: "",
|
|
16035
16266
|
firstNameError: "",
|
|
@@ -16054,10 +16285,10 @@ const initialState$b = {
|
|
|
16054
16285
|
content: ""
|
|
16055
16286
|
}
|
|
16056
16287
|
};
|
|
16057
|
-
const store$
|
|
16288
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
16058
16289
|
const {
|
|
16059
|
-
Provider: Provider$
|
|
16060
|
-
} = store$
|
|
16290
|
+
Provider: Provider$c
|
|
16291
|
+
} = store$c;
|
|
16061
16292
|
|
|
16062
16293
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16063
16294
|
|
|
@@ -16264,7 +16495,7 @@ const AddressCreateContainer = ({
|
|
|
16264
16495
|
default:
|
|
16265
16496
|
return state;
|
|
16266
16497
|
}
|
|
16267
|
-
}, initialState$
|
|
16498
|
+
}, initialState$c);
|
|
16268
16499
|
React.useEffect(() => {
|
|
16269
16500
|
const getStates = () => {
|
|
16270
16501
|
dispatch({
|
|
@@ -16296,16 +16527,16 @@ const AddressCreateContainer = ({
|
|
|
16296
16527
|
style: { ...style
|
|
16297
16528
|
},
|
|
16298
16529
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16299
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16530
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
16300
16531
|
value: {
|
|
16301
16532
|
state,
|
|
16302
16533
|
dispatch
|
|
16303
16534
|
}
|
|
16304
16535
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
16305
|
-
store: store$
|
|
16536
|
+
store: store$c,
|
|
16306
16537
|
key: i
|
|
16307
16538
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
16308
|
-
store: store$
|
|
16539
|
+
store: store$c
|
|
16309
16540
|
})));
|
|
16310
16541
|
};
|
|
16311
16542
|
|
|
@@ -16316,7 +16547,7 @@ function AddressCreateFirstName(props) {
|
|
|
16316
16547
|
firstName,
|
|
16317
16548
|
firstNameError
|
|
16318
16549
|
}
|
|
16319
|
-
} = React.useContext(store$
|
|
16550
|
+
} = React.useContext(store$c);
|
|
16320
16551
|
|
|
16321
16552
|
const handleBlur = () => {
|
|
16322
16553
|
return dispatch({
|
|
@@ -16359,7 +16590,7 @@ function AddressCreateLastName(props) {
|
|
|
16359
16590
|
lastName,
|
|
16360
16591
|
lastNameError
|
|
16361
16592
|
}
|
|
16362
|
-
} = React.useContext(store$
|
|
16593
|
+
} = React.useContext(store$c);
|
|
16363
16594
|
|
|
16364
16595
|
const handleBlur = () => {
|
|
16365
16596
|
return dispatch({
|
|
@@ -16402,7 +16633,7 @@ function AddressCreateLine1(props) {
|
|
|
16402
16633
|
line1,
|
|
16403
16634
|
line1Error
|
|
16404
16635
|
}
|
|
16405
|
-
} = React.useContext(store$
|
|
16636
|
+
} = React.useContext(store$c);
|
|
16406
16637
|
|
|
16407
16638
|
const handleBlur = () => {
|
|
16408
16639
|
return dispatch({
|
|
@@ -16445,7 +16676,7 @@ function AddressCreateCity(props) {
|
|
|
16445
16676
|
city,
|
|
16446
16677
|
cityError
|
|
16447
16678
|
}
|
|
16448
|
-
} = React.useContext(store$
|
|
16679
|
+
} = React.useContext(store$c);
|
|
16449
16680
|
|
|
16450
16681
|
const handleBlur = () => {
|
|
16451
16682
|
return dispatch({
|
|
@@ -16488,7 +16719,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16488
16719
|
postalCode,
|
|
16489
16720
|
postalCodeError
|
|
16490
16721
|
}
|
|
16491
|
-
} = React.useContext(store$
|
|
16722
|
+
} = React.useContext(store$c);
|
|
16492
16723
|
|
|
16493
16724
|
const handleBlur = () => {
|
|
16494
16725
|
return dispatch({
|
|
@@ -16534,7 +16765,7 @@ const AddressCreateSubmit = ({
|
|
|
16534
16765
|
state: {
|
|
16535
16766
|
isSubmitting
|
|
16536
16767
|
}
|
|
16537
|
-
} = React.useContext(store$
|
|
16768
|
+
} = React.useContext(store$c);
|
|
16538
16769
|
const {
|
|
16539
16770
|
t
|
|
16540
16771
|
} = useTranslation("address");
|
|
@@ -16645,7 +16876,7 @@ function CountrySelect({
|
|
|
16645
16876
|
}
|
|
16646
16877
|
|
|
16647
16878
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
16648
|
-
store: store$
|
|
16879
|
+
store: store$c
|
|
16649
16880
|
}, props));
|
|
16650
16881
|
|
|
16651
16882
|
function StateSelect({
|
|
@@ -16733,7 +16964,7 @@ function StateSelect({
|
|
|
16733
16964
|
}
|
|
16734
16965
|
|
|
16735
16966
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
16736
|
-
store: store$
|
|
16967
|
+
store: store$c
|
|
16737
16968
|
}, props));
|
|
16738
16969
|
|
|
16739
16970
|
const AddressCreateView = props => {
|
|
@@ -16838,18 +17069,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16838
17069
|
|
|
16839
17070
|
const AddressCreateTextInput = props => {
|
|
16840
17071
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16841
|
-
store: store$
|
|
17072
|
+
store: store$c
|
|
16842
17073
|
}));
|
|
16843
17074
|
};
|
|
16844
17075
|
|
|
16845
17076
|
const AddressCreateLine2 = props => {
|
|
16846
17077
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
16847
17078
|
fieldName: "line2",
|
|
16848
|
-
store: store$
|
|
17079
|
+
store: store$c
|
|
16849
17080
|
}, props));
|
|
16850
17081
|
};
|
|
16851
17082
|
|
|
16852
|
-
const initialState$
|
|
17083
|
+
const initialState$b = {
|
|
16853
17084
|
isSubmitting: false,
|
|
16854
17085
|
firstName: "",
|
|
16855
17086
|
firstNameError: "",
|
|
@@ -16874,10 +17105,10 @@ const initialState$a = {
|
|
|
16874
17105
|
content: ""
|
|
16875
17106
|
}
|
|
16876
17107
|
};
|
|
16877
|
-
const store$
|
|
17108
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
16878
17109
|
const {
|
|
16879
|
-
Provider: Provider$
|
|
16880
|
-
} = store$
|
|
17110
|
+
Provider: Provider$b
|
|
17111
|
+
} = store$b;
|
|
16881
17112
|
|
|
16882
17113
|
const AddressUpdateContainer = ({
|
|
16883
17114
|
style,
|
|
@@ -16929,7 +17160,7 @@ const AddressUpdateContainer = ({
|
|
|
16929
17160
|
const thisAddress = addresses[address];
|
|
16930
17161
|
|
|
16931
17162
|
if (+thisAddress.id === +addressId) {
|
|
16932
|
-
const newState = { ...initialState$
|
|
17163
|
+
const newState = { ...initialState$b,
|
|
16933
17164
|
firstName: thisAddress.first_name,
|
|
16934
17165
|
lastName: thisAddress.last_name,
|
|
16935
17166
|
line1: thisAddress.line1,
|
|
@@ -17062,7 +17293,7 @@ const AddressUpdateContainer = ({
|
|
|
17062
17293
|
default:
|
|
17063
17294
|
return state;
|
|
17064
17295
|
}
|
|
17065
|
-
}, initialState$
|
|
17296
|
+
}, initialState$b);
|
|
17066
17297
|
React.useEffect(() => {
|
|
17067
17298
|
const getStates = () => {
|
|
17068
17299
|
dispatch({
|
|
@@ -17094,21 +17325,21 @@ const AddressUpdateContainer = ({
|
|
|
17094
17325
|
style: { ...style
|
|
17095
17326
|
},
|
|
17096
17327
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17097
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17328
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
17098
17329
|
value: {
|
|
17099
17330
|
state,
|
|
17100
17331
|
dispatch
|
|
17101
17332
|
}
|
|
17102
17333
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17103
|
-
store: store$
|
|
17334
|
+
store: store$b,
|
|
17104
17335
|
key: i
|
|
17105
17336
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17106
|
-
store: store$
|
|
17337
|
+
store: store$b
|
|
17107
17338
|
})));
|
|
17108
17339
|
};
|
|
17109
17340
|
|
|
17110
17341
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
17111
|
-
store: store$
|
|
17342
|
+
store: store$b
|
|
17112
17343
|
}, props));
|
|
17113
17344
|
|
|
17114
17345
|
function AddressUpdateFirstName(props) {
|
|
@@ -17118,7 +17349,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17118
17349
|
firstName,
|
|
17119
17350
|
firstNameError
|
|
17120
17351
|
}
|
|
17121
|
-
} = React.useContext(store$
|
|
17352
|
+
} = React.useContext(store$b);
|
|
17122
17353
|
|
|
17123
17354
|
const handleBlur = () => {
|
|
17124
17355
|
return dispatch({
|
|
@@ -17161,7 +17392,7 @@ function AddressUpdateLastName(props) {
|
|
|
17161
17392
|
lastName,
|
|
17162
17393
|
lastNameError
|
|
17163
17394
|
}
|
|
17164
|
-
} = React.useContext(store$
|
|
17395
|
+
} = React.useContext(store$b);
|
|
17165
17396
|
|
|
17166
17397
|
const handleBlur = () => {
|
|
17167
17398
|
return dispatch({
|
|
@@ -17204,7 +17435,7 @@ function AddressUpdateLine1(props) {
|
|
|
17204
17435
|
line1,
|
|
17205
17436
|
line1Error
|
|
17206
17437
|
}
|
|
17207
|
-
} = React.useContext(store$
|
|
17438
|
+
} = React.useContext(store$b);
|
|
17208
17439
|
|
|
17209
17440
|
const handleBlur = () => {
|
|
17210
17441
|
return dispatch({
|
|
@@ -17244,7 +17475,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17244
17475
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
17245
17476
|
fieldName: "line2"
|
|
17246
17477
|
}, props, {
|
|
17247
|
-
store: store$
|
|
17478
|
+
store: store$b
|
|
17248
17479
|
}));
|
|
17249
17480
|
};
|
|
17250
17481
|
|
|
@@ -17255,7 +17486,7 @@ function AddressUpdateCity(props) {
|
|
|
17255
17486
|
city,
|
|
17256
17487
|
cityError
|
|
17257
17488
|
}
|
|
17258
|
-
} = React.useContext(store$
|
|
17489
|
+
} = React.useContext(store$b);
|
|
17259
17490
|
|
|
17260
17491
|
const handleBlur = () => {
|
|
17261
17492
|
return dispatch({
|
|
@@ -17298,7 +17529,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17298
17529
|
postalCode,
|
|
17299
17530
|
postalCodeError
|
|
17300
17531
|
}
|
|
17301
|
-
} = React.useContext(store$
|
|
17532
|
+
} = React.useContext(store$b);
|
|
17302
17533
|
|
|
17303
17534
|
const handleBlur = () => {
|
|
17304
17535
|
return dispatch({
|
|
@@ -17344,7 +17575,7 @@ const AddressUpdateSubmit = ({
|
|
|
17344
17575
|
state: {
|
|
17345
17576
|
isSubmitting
|
|
17346
17577
|
}
|
|
17347
|
-
} = React.useContext(store$
|
|
17578
|
+
} = React.useContext(store$b);
|
|
17348
17579
|
const {
|
|
17349
17580
|
t
|
|
17350
17581
|
} = useTranslation("address");
|
|
@@ -17360,7 +17591,7 @@ const AddressUpdateSubmit = ({
|
|
|
17360
17591
|
};
|
|
17361
17592
|
|
|
17362
17593
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
17363
|
-
store: store$
|
|
17594
|
+
store: store$b
|
|
17364
17595
|
}, props));
|
|
17365
17596
|
|
|
17366
17597
|
const AddressUpdateView = props => {
|
|
@@ -17443,7 +17674,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17443
17674
|
|
|
17444
17675
|
const AddressUpdateTextInput = props => {
|
|
17445
17676
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
17446
|
-
store: store$
|
|
17677
|
+
store: store$b
|
|
17447
17678
|
}));
|
|
17448
17679
|
};
|
|
17449
17680
|
|
|
@@ -17526,7 +17757,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17526
17757
|
};
|
|
17527
17758
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17528
17759
|
|
|
17529
|
-
const initialState$
|
|
17760
|
+
const initialState$a = {
|
|
17530
17761
|
email: "",
|
|
17531
17762
|
password: "",
|
|
17532
17763
|
passwordError: null,
|
|
@@ -17539,10 +17770,10 @@ const initialState$9 = {
|
|
|
17539
17770
|
content: ""
|
|
17540
17771
|
}
|
|
17541
17772
|
};
|
|
17542
|
-
const store$
|
|
17773
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
17543
17774
|
const {
|
|
17544
|
-
Provider: Provider$
|
|
17545
|
-
} = store$
|
|
17775
|
+
Provider: Provider$a
|
|
17776
|
+
} = store$a;
|
|
17546
17777
|
|
|
17547
17778
|
const PasswordResetContainer = ({
|
|
17548
17779
|
style,
|
|
@@ -17599,7 +17830,7 @@ const PasswordResetContainer = ({
|
|
|
17599
17830
|
type: SET_EMAIL,
|
|
17600
17831
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17601
17832
|
});
|
|
17602
|
-
initialState$
|
|
17833
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17603
17834
|
dispatch({
|
|
17604
17835
|
type: SET_TOKEN,
|
|
17605
17836
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17659,26 +17890,26 @@ const PasswordResetContainer = ({
|
|
|
17659
17890
|
default:
|
|
17660
17891
|
return state;
|
|
17661
17892
|
}
|
|
17662
|
-
}, initialState$
|
|
17893
|
+
}, initialState$a);
|
|
17663
17894
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17664
17895
|
style: { ...style
|
|
17665
17896
|
},
|
|
17666
17897
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17667
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17898
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
17668
17899
|
value: {
|
|
17669
17900
|
state,
|
|
17670
17901
|
dispatch
|
|
17671
17902
|
}
|
|
17672
17903
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17673
|
-
store: store$
|
|
17904
|
+
store: store$a,
|
|
17674
17905
|
key: i
|
|
17675
17906
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17676
|
-
store: store$
|
|
17907
|
+
store: store$a
|
|
17677
17908
|
})));
|
|
17678
17909
|
};
|
|
17679
17910
|
|
|
17680
17911
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
17681
|
-
store: store$
|
|
17912
|
+
store: store$a
|
|
17682
17913
|
}, props));
|
|
17683
17914
|
|
|
17684
17915
|
const PasswordResetButton = ({
|
|
@@ -17691,7 +17922,7 @@ const PasswordResetButton = ({
|
|
|
17691
17922
|
buttonDisabled
|
|
17692
17923
|
},
|
|
17693
17924
|
dispatch
|
|
17694
|
-
} = React.useContext(store$
|
|
17925
|
+
} = React.useContext(store$a);
|
|
17695
17926
|
const {
|
|
17696
17927
|
t
|
|
17697
17928
|
} = useTranslation("passwordReset");
|
|
@@ -17708,14 +17939,14 @@ const PasswordResetButton = ({
|
|
|
17708
17939
|
};
|
|
17709
17940
|
|
|
17710
17941
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17711
|
-
store: store$
|
|
17942
|
+
store: store$a
|
|
17712
17943
|
}, props, {
|
|
17713
17944
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17714
17945
|
disabled: true
|
|
17715
17946
|
}));
|
|
17716
17947
|
|
|
17717
17948
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
17718
|
-
store: store$
|
|
17949
|
+
store: store$a
|
|
17719
17950
|
}, props));
|
|
17720
17951
|
|
|
17721
17952
|
const PasswordResetView = props => {
|
|
@@ -17767,7 +17998,7 @@ const PasswordResetModal = ({
|
|
|
17767
17998
|
};
|
|
17768
17999
|
PasswordResetModal.viewId = "password-reset";
|
|
17769
18000
|
|
|
17770
|
-
const initialState$
|
|
18001
|
+
const initialState$9 = {
|
|
17771
18002
|
email: "",
|
|
17772
18003
|
emailError: null,
|
|
17773
18004
|
buttonDisabled: false,
|
|
@@ -17776,10 +18007,10 @@ const initialState$8 = {
|
|
|
17776
18007
|
content: ""
|
|
17777
18008
|
}
|
|
17778
18009
|
};
|
|
17779
|
-
const store$
|
|
18010
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
17780
18011
|
const {
|
|
17781
|
-
Provider: Provider$
|
|
17782
|
-
} = store$
|
|
18012
|
+
Provider: Provider$9
|
|
18013
|
+
} = store$9;
|
|
17783
18014
|
|
|
17784
18015
|
const PasswordForgotContainer = ({
|
|
17785
18016
|
style,
|
|
@@ -17857,21 +18088,21 @@ const PasswordForgotContainer = ({
|
|
|
17857
18088
|
default:
|
|
17858
18089
|
return state;
|
|
17859
18090
|
}
|
|
17860
|
-
}, initialState$
|
|
18091
|
+
}, initialState$9);
|
|
17861
18092
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17862
18093
|
style: { ...style
|
|
17863
18094
|
},
|
|
17864
18095
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17865
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18096
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
17866
18097
|
value: {
|
|
17867
18098
|
state,
|
|
17868
18099
|
dispatch
|
|
17869
18100
|
}
|
|
17870
18101
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17871
|
-
store: store$
|
|
18102
|
+
store: store$9,
|
|
17872
18103
|
key: i
|
|
17873
18104
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17874
|
-
store: store$
|
|
18105
|
+
store: store$9
|
|
17875
18106
|
})));
|
|
17876
18107
|
};
|
|
17877
18108
|
|
|
@@ -17887,7 +18118,7 @@ const PasswordForgotButton = ({
|
|
|
17887
18118
|
emailError
|
|
17888
18119
|
},
|
|
17889
18120
|
dispatch
|
|
17890
|
-
} = React.useContext(store$
|
|
18121
|
+
} = React.useContext(store$9);
|
|
17891
18122
|
const {
|
|
17892
18123
|
t
|
|
17893
18124
|
} = useTranslation("passwordForgot");
|
|
@@ -17908,7 +18139,7 @@ const PasswordForgotButton = ({
|
|
|
17908
18139
|
};
|
|
17909
18140
|
|
|
17910
18141
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17911
|
-
store: store$
|
|
18142
|
+
store: store$9
|
|
17912
18143
|
}, props));
|
|
17913
18144
|
|
|
17914
18145
|
const PasswordForgotView = props => {
|
|
@@ -17958,7 +18189,7 @@ const PasswordForgotModal = ({
|
|
|
17958
18189
|
};
|
|
17959
18190
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17960
18191
|
|
|
17961
|
-
const initialState$
|
|
18192
|
+
const initialState$8 = {
|
|
17962
18193
|
currentPassword: "",
|
|
17963
18194
|
newPassword: "",
|
|
17964
18195
|
confirmNewPassword: "",
|
|
@@ -17972,10 +18203,10 @@ const initialState$7 = {
|
|
|
17972
18203
|
content: ""
|
|
17973
18204
|
}
|
|
17974
18205
|
};
|
|
17975
|
-
const store$
|
|
18206
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
17976
18207
|
const {
|
|
17977
|
-
Provider: Provider$
|
|
17978
|
-
} = store$
|
|
18208
|
+
Provider: Provider$8
|
|
18209
|
+
} = store$8;
|
|
17979
18210
|
const PasswordChangeContainer = ({
|
|
17980
18211
|
style,
|
|
17981
18212
|
className = "",
|
|
@@ -18127,21 +18358,21 @@ const PasswordChangeContainer = ({
|
|
|
18127
18358
|
default:
|
|
18128
18359
|
return state;
|
|
18129
18360
|
}
|
|
18130
|
-
}, initialState$
|
|
18361
|
+
}, initialState$8);
|
|
18131
18362
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18132
18363
|
style: { ...style
|
|
18133
18364
|
},
|
|
18134
18365
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18135
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18366
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
18136
18367
|
value: {
|
|
18137
18368
|
state,
|
|
18138
18369
|
dispatch
|
|
18139
18370
|
}
|
|
18140
18371
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18141
|
-
store: store$
|
|
18372
|
+
store: store$8,
|
|
18142
18373
|
key: i
|
|
18143
18374
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18144
|
-
store: store$
|
|
18375
|
+
store: store$8
|
|
18145
18376
|
})));
|
|
18146
18377
|
};
|
|
18147
18378
|
|
|
@@ -18152,7 +18383,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18152
18383
|
currentPassword,
|
|
18153
18384
|
currentPasswordError
|
|
18154
18385
|
}
|
|
18155
|
-
} = React.useContext(store$
|
|
18386
|
+
} = React.useContext(store$8);
|
|
18156
18387
|
const handleBlur = React.useCallback(() => {
|
|
18157
18388
|
return dispatch({
|
|
18158
18389
|
type: VALIDATE_PASSWORD
|
|
@@ -18186,7 +18417,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18186
18417
|
newPassword,
|
|
18187
18418
|
newPasswordError
|
|
18188
18419
|
}
|
|
18189
|
-
} = React.useContext(store$
|
|
18420
|
+
} = React.useContext(store$8);
|
|
18190
18421
|
const handleBlur = React.useCallback(() => {
|
|
18191
18422
|
return dispatch({
|
|
18192
18423
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18220,7 +18451,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18220
18451
|
confirmNewPassword,
|
|
18221
18452
|
confirmNewPasswordError
|
|
18222
18453
|
}
|
|
18223
|
-
} = React.useContext(store$
|
|
18454
|
+
} = React.useContext(store$8);
|
|
18224
18455
|
const handleBlur = React.useCallback(() => {
|
|
18225
18456
|
return dispatch({
|
|
18226
18457
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18261,7 +18492,7 @@ const PasswordChangeButton = ({
|
|
|
18261
18492
|
confirmNewPasswordError
|
|
18262
18493
|
},
|
|
18263
18494
|
dispatch
|
|
18264
|
-
} = React.useContext(store$
|
|
18495
|
+
} = React.useContext(store$8);
|
|
18265
18496
|
const {
|
|
18266
18497
|
t
|
|
18267
18498
|
} = useTranslation("passwordChange");
|
|
@@ -18327,17 +18558,17 @@ const PasswordChangeModal = ({
|
|
|
18327
18558
|
};
|
|
18328
18559
|
PasswordChangeModal.viewId = "password-change";
|
|
18329
18560
|
|
|
18330
|
-
const initialState$
|
|
18561
|
+
const initialState$7 = {
|
|
18331
18562
|
buttonDisabled: false,
|
|
18332
18563
|
alert: {
|
|
18333
18564
|
type: "error",
|
|
18334
18565
|
content: ""
|
|
18335
18566
|
}
|
|
18336
18567
|
};
|
|
18337
|
-
const store$
|
|
18568
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
18338
18569
|
const {
|
|
18339
|
-
Provider: Provider$
|
|
18340
|
-
} = store$
|
|
18570
|
+
Provider: Provider$7
|
|
18571
|
+
} = store$7;
|
|
18341
18572
|
|
|
18342
18573
|
const CartContainer = ({
|
|
18343
18574
|
style,
|
|
@@ -18428,21 +18659,21 @@ const CartContainer = ({
|
|
|
18428
18659
|
default:
|
|
18429
18660
|
return state;
|
|
18430
18661
|
}
|
|
18431
|
-
}, initialState$
|
|
18662
|
+
}, initialState$7);
|
|
18432
18663
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18433
18664
|
style: { ...style
|
|
18434
18665
|
},
|
|
18435
18666
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18436
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18667
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
18437
18668
|
value: {
|
|
18438
18669
|
state,
|
|
18439
18670
|
dispatch
|
|
18440
18671
|
}
|
|
18441
18672
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18442
|
-
store: store$
|
|
18673
|
+
store: store$7,
|
|
18443
18674
|
key: i
|
|
18444
18675
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18445
|
-
store: store$
|
|
18676
|
+
store: store$7
|
|
18446
18677
|
})));
|
|
18447
18678
|
};
|
|
18448
18679
|
|
|
@@ -18479,7 +18710,7 @@ const CartSubmit = ({
|
|
|
18479
18710
|
buttonDisabled
|
|
18480
18711
|
},
|
|
18481
18712
|
dispatch
|
|
18482
|
-
} = React.useContext(store$
|
|
18713
|
+
} = React.useContext(store$7);
|
|
18483
18714
|
const {
|
|
18484
18715
|
t
|
|
18485
18716
|
} = useTranslation("cart");
|
|
@@ -18510,7 +18741,7 @@ const CartTotalPrice = () => {
|
|
|
18510
18741
|
state: {
|
|
18511
18742
|
alert
|
|
18512
18743
|
}
|
|
18513
|
-
} = React.useContext(store$
|
|
18744
|
+
} = React.useContext(store$7);
|
|
18514
18745
|
const {
|
|
18515
18746
|
cartItems
|
|
18516
18747
|
} = usePelcro();
|
|
@@ -18823,7 +19054,7 @@ const OrderConfirmModal = props => {
|
|
|
18823
19054
|
};
|
|
18824
19055
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18825
19056
|
|
|
18826
|
-
const initialState$
|
|
19057
|
+
const initialState$6 = {
|
|
18827
19058
|
email: "",
|
|
18828
19059
|
firstName: "",
|
|
18829
19060
|
lastName: "",
|
|
@@ -18835,10 +19066,10 @@ const initialState$5 = {
|
|
|
18835
19066
|
content: ""
|
|
18836
19067
|
}
|
|
18837
19068
|
};
|
|
18838
|
-
const store$
|
|
19069
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
18839
19070
|
const {
|
|
18840
|
-
Provider: Provider$
|
|
18841
|
-
} = store$
|
|
19071
|
+
Provider: Provider$6
|
|
19072
|
+
} = store$6;
|
|
18842
19073
|
|
|
18843
19074
|
const GiftCreateContainer = ({
|
|
18844
19075
|
style,
|
|
@@ -18942,21 +19173,21 @@ const GiftCreateContainer = ({
|
|
|
18942
19173
|
default:
|
|
18943
19174
|
return state;
|
|
18944
19175
|
}
|
|
18945
|
-
}, initialState$
|
|
19176
|
+
}, initialState$6);
|
|
18946
19177
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18947
19178
|
style: { ...style
|
|
18948
19179
|
},
|
|
18949
19180
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18950
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19181
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
18951
19182
|
value: {
|
|
18952
19183
|
state,
|
|
18953
19184
|
dispatch
|
|
18954
19185
|
}
|
|
18955
19186
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18956
|
-
store: store$
|
|
19187
|
+
store: store$6,
|
|
18957
19188
|
key: i
|
|
18958
19189
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18959
|
-
store: store$
|
|
19190
|
+
store: store$6
|
|
18960
19191
|
})));
|
|
18961
19192
|
};
|
|
18962
19193
|
|
|
@@ -18970,7 +19201,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18970
19201
|
state: {
|
|
18971
19202
|
disableSubmit
|
|
18972
19203
|
}
|
|
18973
|
-
} = React.useContext(store$
|
|
19204
|
+
} = React.useContext(store$6);
|
|
18974
19205
|
const {
|
|
18975
19206
|
t
|
|
18976
19207
|
} = useTranslation("register");
|
|
@@ -18987,29 +19218,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18987
19218
|
|
|
18988
19219
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
18989
19220
|
initWithUserEmail: false,
|
|
18990
|
-
store: store$
|
|
19221
|
+
store: store$6
|
|
18991
19222
|
}, props));
|
|
18992
19223
|
|
|
18993
19224
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
18994
|
-
store: store$
|
|
19225
|
+
store: store$6
|
|
18995
19226
|
}, props));
|
|
18996
19227
|
|
|
18997
19228
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
18998
|
-
store: store$
|
|
19229
|
+
store: store$6
|
|
18999
19230
|
}, props));
|
|
19000
19231
|
|
|
19001
|
-
var _path$
|
|
19232
|
+
var _path$h;
|
|
19002
19233
|
|
|
19003
|
-
function _extends$
|
|
19234
|
+
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); }
|
|
19004
19235
|
|
|
19005
19236
|
function SvgInfoCircle(props) {
|
|
19006
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
19237
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
19007
19238
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19008
19239
|
className: "plc-w-5 plc-h-5",
|
|
19009
19240
|
fill: "none",
|
|
19010
19241
|
viewBox: "0 0 24 24",
|
|
19011
19242
|
stroke: "currentColor"
|
|
19012
|
-
}, props), _path$
|
|
19243
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
19013
19244
|
strokeLinecap: "round",
|
|
19014
19245
|
strokeLinejoin: "round",
|
|
19015
19246
|
strokeWidth: 2,
|
|
@@ -19080,7 +19311,7 @@ const GiftCreateStartDate = props => {
|
|
|
19080
19311
|
const {
|
|
19081
19312
|
dispatch,
|
|
19082
19313
|
state
|
|
19083
|
-
} = React.useContext(store$
|
|
19314
|
+
} = React.useContext(store$6);
|
|
19084
19315
|
|
|
19085
19316
|
const handleInputChange = value => {
|
|
19086
19317
|
dispatch({
|
|
@@ -19151,7 +19382,7 @@ function GiftCreateMessage(props) {
|
|
|
19151
19382
|
const {
|
|
19152
19383
|
dispatch,
|
|
19153
19384
|
state
|
|
19154
|
-
} = React.useContext(store$
|
|
19385
|
+
} = React.useContext(store$6);
|
|
19155
19386
|
|
|
19156
19387
|
const handleInputChange = value => {
|
|
19157
19388
|
dispatch({
|
|
@@ -19271,7 +19502,7 @@ const GiftCreateModal = ({
|
|
|
19271
19502
|
};
|
|
19272
19503
|
GiftCreateModal.viewId = "gift-create";
|
|
19273
19504
|
|
|
19274
|
-
const initialState$
|
|
19505
|
+
const initialState$5 = {
|
|
19275
19506
|
giftCode: "",
|
|
19276
19507
|
buttonDisabled: true,
|
|
19277
19508
|
alert: {
|
|
@@ -19279,10 +19510,10 @@ const initialState$4 = {
|
|
|
19279
19510
|
content: ""
|
|
19280
19511
|
}
|
|
19281
19512
|
};
|
|
19282
|
-
const store$
|
|
19513
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
19283
19514
|
const {
|
|
19284
|
-
Provider: Provider$
|
|
19285
|
-
} = store$
|
|
19515
|
+
Provider: Provider$5
|
|
19516
|
+
} = store$5;
|
|
19286
19517
|
|
|
19287
19518
|
const GiftRedeemContainer = ({
|
|
19288
19519
|
style,
|
|
@@ -19347,21 +19578,21 @@ const GiftRedeemContainer = ({
|
|
|
19347
19578
|
default:
|
|
19348
19579
|
return state;
|
|
19349
19580
|
}
|
|
19350
|
-
}, initialState$
|
|
19581
|
+
}, initialState$5);
|
|
19351
19582
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19352
19583
|
style: { ...style
|
|
19353
19584
|
},
|
|
19354
19585
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19355
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19586
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
19356
19587
|
value: {
|
|
19357
19588
|
state,
|
|
19358
19589
|
dispatch
|
|
19359
19590
|
}
|
|
19360
19591
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19361
|
-
store: store$
|
|
19592
|
+
store: store$5,
|
|
19362
19593
|
key: i
|
|
19363
19594
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19364
|
-
store: store$
|
|
19595
|
+
store: store$5
|
|
19365
19596
|
})));
|
|
19366
19597
|
};
|
|
19367
19598
|
|
|
@@ -19398,7 +19629,7 @@ function GiftCode({
|
|
|
19398
19629
|
}
|
|
19399
19630
|
|
|
19400
19631
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
19401
|
-
store: store$
|
|
19632
|
+
store: store$5
|
|
19402
19633
|
}, props));
|
|
19403
19634
|
|
|
19404
19635
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19411,7 +19642,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19411
19642
|
state: {
|
|
19412
19643
|
disableSubmit
|
|
19413
19644
|
}
|
|
19414
|
-
} = React.useContext(store$
|
|
19645
|
+
} = React.useContext(store$5);
|
|
19415
19646
|
const {
|
|
19416
19647
|
t
|
|
19417
19648
|
} = useTranslation("register");
|
|
@@ -19504,7 +19735,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19504
19735
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19505
19736
|
};
|
|
19506
19737
|
|
|
19507
|
-
const initialState$
|
|
19738
|
+
const initialState$4 = {
|
|
19508
19739
|
addresses: [],
|
|
19509
19740
|
selectedAddressId: null,
|
|
19510
19741
|
isSubmitting: false,
|
|
@@ -19513,10 +19744,10 @@ const initialState$3 = {
|
|
|
19513
19744
|
content: ""
|
|
19514
19745
|
}
|
|
19515
19746
|
};
|
|
19516
|
-
const store$
|
|
19747
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
19517
19748
|
const {
|
|
19518
|
-
Provider: Provider$
|
|
19519
|
-
} = store$
|
|
19749
|
+
Provider: Provider$4
|
|
19750
|
+
} = store$4;
|
|
19520
19751
|
|
|
19521
19752
|
const AddressSelectContainer = ({
|
|
19522
19753
|
style,
|
|
@@ -19611,7 +19842,7 @@ const AddressSelectContainer = ({
|
|
|
19611
19842
|
default:
|
|
19612
19843
|
return state;
|
|
19613
19844
|
}
|
|
19614
|
-
}, initialState$
|
|
19845
|
+
}, initialState$4);
|
|
19615
19846
|
React.useEffect(() => {
|
|
19616
19847
|
var _window$Pelcro$user$r;
|
|
19617
19848
|
|
|
@@ -19624,16 +19855,16 @@ const AddressSelectContainer = ({
|
|
|
19624
19855
|
style: { ...style
|
|
19625
19856
|
},
|
|
19626
19857
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19627
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19858
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
19628
19859
|
value: {
|
|
19629
19860
|
state,
|
|
19630
19861
|
dispatch
|
|
19631
19862
|
}
|
|
19632
19863
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19633
|
-
store: store$
|
|
19864
|
+
store: store$4,
|
|
19634
19865
|
key: i
|
|
19635
19866
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19636
|
-
store: store$
|
|
19867
|
+
store: store$4
|
|
19637
19868
|
})));
|
|
19638
19869
|
};
|
|
19639
19870
|
|
|
@@ -19644,7 +19875,7 @@ const AddressSelectList = () => {
|
|
|
19644
19875
|
addresses,
|
|
19645
19876
|
selectedAddressId
|
|
19646
19877
|
}
|
|
19647
|
-
} = React.useContext(store$
|
|
19878
|
+
} = React.useContext(store$4);
|
|
19648
19879
|
|
|
19649
19880
|
const handleAddressSelect = event => {
|
|
19650
19881
|
dispatch({
|
|
@@ -19688,7 +19919,7 @@ const AddressSelectSubmit = ({
|
|
|
19688
19919
|
selectedAddressId,
|
|
19689
19920
|
isSubmitting
|
|
19690
19921
|
}
|
|
19691
|
-
} = React.useContext(store$
|
|
19922
|
+
} = React.useContext(store$4);
|
|
19692
19923
|
const {
|
|
19693
19924
|
t
|
|
19694
19925
|
} = useTranslation("address");
|
|
@@ -19784,7 +20015,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19784
20015
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19785
20016
|
};
|
|
19786
20017
|
|
|
19787
|
-
const initialState$
|
|
20018
|
+
const initialState$3 = {
|
|
19788
20019
|
paymentMethods: [],
|
|
19789
20020
|
selectedPaymentMethodId: null,
|
|
19790
20021
|
isSubmitting: false,
|
|
@@ -19793,10 +20024,10 @@ const initialState$2 = {
|
|
|
19793
20024
|
content: ""
|
|
19794
20025
|
}
|
|
19795
20026
|
};
|
|
19796
|
-
const store$
|
|
20027
|
+
const store$3 = /*#__PURE__*/React.createContext(initialState$3);
|
|
19797
20028
|
const {
|
|
19798
|
-
Provider: Provider$
|
|
19799
|
-
} = store$
|
|
20029
|
+
Provider: Provider$3
|
|
20030
|
+
} = store$3;
|
|
19800
20031
|
|
|
19801
20032
|
const PaymentMethodSelectContainer = ({
|
|
19802
20033
|
style,
|
|
@@ -19841,7 +20072,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19841
20072
|
default:
|
|
19842
20073
|
return state;
|
|
19843
20074
|
}
|
|
19844
|
-
}, initialState$
|
|
20075
|
+
}, initialState$3);
|
|
19845
20076
|
React.useEffect(() => {
|
|
19846
20077
|
var _window$Pelcro$user$r4;
|
|
19847
20078
|
|
|
@@ -19854,16 +20085,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19854
20085
|
style: { ...style
|
|
19855
20086
|
},
|
|
19856
20087
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19857
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20088
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
|
|
19858
20089
|
value: {
|
|
19859
20090
|
state,
|
|
19860
20091
|
dispatch
|
|
19861
20092
|
}
|
|
19862
20093
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19863
|
-
store: store$
|
|
20094
|
+
store: store$3,
|
|
19864
20095
|
key: i
|
|
19865
20096
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19866
|
-
store: store$
|
|
20097
|
+
store: store$3
|
|
19867
20098
|
})));
|
|
19868
20099
|
};
|
|
19869
20100
|
|
|
@@ -19877,7 +20108,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19877
20108
|
paymentMethods,
|
|
19878
20109
|
selectedPaymentMethodId
|
|
19879
20110
|
}
|
|
19880
|
-
} = React.useContext(store$
|
|
20111
|
+
} = React.useContext(store$3);
|
|
19881
20112
|
|
|
19882
20113
|
const handlePaymentMethodSelect = event => {
|
|
19883
20114
|
dispatch({
|
|
@@ -19927,7 +20158,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19927
20158
|
selectedPaymentMethodId,
|
|
19928
20159
|
isSubmitting
|
|
19929
20160
|
}
|
|
19930
|
-
} = React.useContext(store$
|
|
20161
|
+
} = React.useContext(store$3);
|
|
19931
20162
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19932
20163
|
onClick: () => {
|
|
19933
20164
|
dispatch({
|
|
@@ -20001,8 +20232,8 @@ const PaymentMethodSelectModal = ({
|
|
|
20001
20232
|
};
|
|
20002
20233
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
20003
20234
|
|
|
20004
|
-
function _extends$
|
|
20005
|
-
_extends$
|
|
20235
|
+
function _extends$i() {
|
|
20236
|
+
_extends$i = Object.assign || function (target) {
|
|
20006
20237
|
for (var i = 1; i < arguments.length; i++) {
|
|
20007
20238
|
var source = arguments[i];
|
|
20008
20239
|
|
|
@@ -20016,7 +20247,7 @@ function _extends$h() {
|
|
|
20016
20247
|
return target;
|
|
20017
20248
|
};
|
|
20018
20249
|
|
|
20019
|
-
return _extends$
|
|
20250
|
+
return _extends$i.apply(this, arguments);
|
|
20020
20251
|
}
|
|
20021
20252
|
|
|
20022
20253
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20200,7 +20431,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20200
20431
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20201
20432
|
return null;
|
|
20202
20433
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20203
|
-
return _render(_extends$
|
|
20434
|
+
return _render(_extends$i({}, _rest, {
|
|
20204
20435
|
hidden: true,
|
|
20205
20436
|
style: {
|
|
20206
20437
|
display: 'none'
|
|
@@ -20728,7 +20959,7 @@ function TransitionChild(props) {
|
|
|
20728
20959
|
var passthroughProps = rest;
|
|
20729
20960
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20730
20961
|
value: nesting
|
|
20731
|
-
}, render(_extends$
|
|
20962
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20732
20963
|
}
|
|
20733
20964
|
|
|
20734
20965
|
function Transition(props) {
|
|
@@ -20772,7 +21003,7 @@ function Transition(props) {
|
|
|
20772
21003
|
value: nestingBag
|
|
20773
21004
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20774
21005
|
value: transitionBag
|
|
20775
|
-
}, render(_extends$
|
|
21006
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20776
21007
|
as: React.Fragment,
|
|
20777
21008
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20778
21009
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20899,12 +21130,12 @@ var ActionTypes;
|
|
|
20899
21130
|
})(ActionTypes || (ActionTypes = {}));
|
|
20900
21131
|
|
|
20901
21132
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20902
|
-
return _extends$
|
|
21133
|
+
return _extends$i({}, state, {
|
|
20903
21134
|
activeItemIndex: null,
|
|
20904
21135
|
menuState: MenuStates.Closed
|
|
20905
21136
|
});
|
|
20906
21137
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20907
|
-
return _extends$
|
|
21138
|
+
return _extends$i({}, state, {
|
|
20908
21139
|
menuState: MenuStates.Open
|
|
20909
21140
|
});
|
|
20910
21141
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20923,7 +21154,7 @@ var ActionTypes;
|
|
|
20923
21154
|
}
|
|
20924
21155
|
});
|
|
20925
21156
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20926
|
-
return _extends$
|
|
21157
|
+
return _extends$i({}, state, {
|
|
20927
21158
|
searchQuery: '',
|
|
20928
21159
|
activeItemIndex: activeItemIndex
|
|
20929
21160
|
});
|
|
@@ -20934,19 +21165,19 @@ var ActionTypes;
|
|
|
20934
21165
|
|
|
20935
21166
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20936
21167
|
});
|
|
20937
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21168
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20938
21169
|
searchQuery: searchQuery
|
|
20939
21170
|
});
|
|
20940
|
-
return _extends$
|
|
21171
|
+
return _extends$i({}, state, {
|
|
20941
21172
|
searchQuery: searchQuery,
|
|
20942
21173
|
activeItemIndex: match
|
|
20943
21174
|
});
|
|
20944
21175
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20945
|
-
return _extends$
|
|
21176
|
+
return _extends$i({}, state, {
|
|
20946
21177
|
searchQuery: ''
|
|
20947
21178
|
});
|
|
20948
21179
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20949
|
-
return _extends$
|
|
21180
|
+
return _extends$i({}, state, {
|
|
20950
21181
|
items: [].concat(state.items, [{
|
|
20951
21182
|
id: action.id,
|
|
20952
21183
|
dataRef: action.dataRef
|
|
@@ -20959,7 +21190,7 @@ var ActionTypes;
|
|
|
20959
21190
|
return a.id === action.id;
|
|
20960
21191
|
});
|
|
20961
21192
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20962
|
-
return _extends$
|
|
21193
|
+
return _extends$i({}, state, {
|
|
20963
21194
|
items: nextItems,
|
|
20964
21195
|
activeItemIndex: function () {
|
|
20965
21196
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20998,19 +21229,19 @@ var ActionTypes$1;
|
|
|
20998
21229
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20999
21230
|
if (state.disabled) return state;
|
|
21000
21231
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21001
|
-
return _extends$
|
|
21232
|
+
return _extends$i({}, state, {
|
|
21002
21233
|
activeOptionIndex: null,
|
|
21003
21234
|
listboxState: ListboxStates.Closed
|
|
21004
21235
|
});
|
|
21005
21236
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
21006
21237
|
if (state.disabled) return state;
|
|
21007
21238
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
21008
|
-
return _extends$
|
|
21239
|
+
return _extends$i({}, state, {
|
|
21009
21240
|
listboxState: ListboxStates.Open
|
|
21010
21241
|
});
|
|
21011
21242
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
21012
21243
|
if (state.disabled === action.disabled) return state;
|
|
21013
|
-
return _extends$
|
|
21244
|
+
return _extends$i({}, state, {
|
|
21014
21245
|
disabled: action.disabled
|
|
21015
21246
|
});
|
|
21016
21247
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21031,7 +21262,7 @@ var ActionTypes$1;
|
|
|
21031
21262
|
}
|
|
21032
21263
|
});
|
|
21033
21264
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21034
|
-
return _extends$
|
|
21265
|
+
return _extends$i({}, state, {
|
|
21035
21266
|
searchQuery: '',
|
|
21036
21267
|
activeOptionIndex: activeOptionIndex
|
|
21037
21268
|
});
|
|
@@ -21044,10 +21275,10 @@ var ActionTypes$1;
|
|
|
21044
21275
|
|
|
21045
21276
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21046
21277
|
});
|
|
21047
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21278
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21048
21279
|
searchQuery: searchQuery
|
|
21049
21280
|
});
|
|
21050
|
-
return _extends$
|
|
21281
|
+
return _extends$i({}, state, {
|
|
21051
21282
|
searchQuery: searchQuery,
|
|
21052
21283
|
activeOptionIndex: match
|
|
21053
21284
|
});
|
|
@@ -21055,11 +21286,11 @@ var ActionTypes$1;
|
|
|
21055
21286
|
if (state.disabled) return state;
|
|
21056
21287
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21057
21288
|
if (state.searchQuery === '') return state;
|
|
21058
|
-
return _extends$
|
|
21289
|
+
return _extends$i({}, state, {
|
|
21059
21290
|
searchQuery: ''
|
|
21060
21291
|
});
|
|
21061
21292
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21062
|
-
return _extends$
|
|
21293
|
+
return _extends$i({}, state, {
|
|
21063
21294
|
options: [].concat(state.options, [{
|
|
21064
21295
|
id: action.id,
|
|
21065
21296
|
dataRef: action.dataRef
|
|
@@ -21072,7 +21303,7 @@ var ActionTypes$1;
|
|
|
21072
21303
|
return a.id === action.id;
|
|
21073
21304
|
});
|
|
21074
21305
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21075
|
-
return _extends$
|
|
21306
|
+
return _extends$i({}, state, {
|
|
21076
21307
|
options: nextOptions,
|
|
21077
21308
|
activeOptionIndex: function () {
|
|
21078
21309
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21133,18 +21364,18 @@ const getPaymentCardIcon = name => {
|
|
|
21133
21364
|
}));
|
|
21134
21365
|
};
|
|
21135
21366
|
|
|
21136
|
-
var _path$
|
|
21367
|
+
var _path$g;
|
|
21137
21368
|
|
|
21138
|
-
function _extends$
|
|
21369
|
+
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); }
|
|
21139
21370
|
|
|
21140
21371
|
function SvgChevronRight(props) {
|
|
21141
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21372
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
21142
21373
|
className: "plc-w-6 plc-h-6",
|
|
21143
21374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21144
21375
|
fill: "none",
|
|
21145
21376
|
viewBox: "0 0 24 24",
|
|
21146
21377
|
stroke: "currentColor"
|
|
21147
|
-
}, props), _path$
|
|
21378
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21148
21379
|
strokeLinecap: "round",
|
|
21149
21380
|
strokeLinejoin: "round",
|
|
21150
21381
|
strokeWidth: 2,
|
|
@@ -21360,18 +21591,18 @@ const SavedItems = ({
|
|
|
21360
21591
|
});
|
|
21361
21592
|
};
|
|
21362
21593
|
|
|
21363
|
-
var _path$
|
|
21594
|
+
var _path$f;
|
|
21364
21595
|
|
|
21365
|
-
function _extends$
|
|
21596
|
+
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); }
|
|
21366
21597
|
|
|
21367
21598
|
function SvgRefresh(props) {
|
|
21368
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21599
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
21369
21600
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21370
21601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21371
21602
|
fill: "none",
|
|
21372
21603
|
viewBox: "0 0 24 24",
|
|
21373
21604
|
stroke: "currentColor"
|
|
21374
|
-
}, props), _path$
|
|
21605
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21375
21606
|
strokeLinecap: "round",
|
|
21376
21607
|
strokeLinejoin: "round",
|
|
21377
21608
|
strokeWidth: 2,
|
|
@@ -21379,35 +21610,35 @@ function SvgRefresh(props) {
|
|
|
21379
21610
|
})));
|
|
21380
21611
|
}
|
|
21381
21612
|
|
|
21382
|
-
var _path$
|
|
21613
|
+
var _path$e;
|
|
21383
21614
|
|
|
21384
|
-
function _extends$
|
|
21615
|
+
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); }
|
|
21385
21616
|
|
|
21386
21617
|
function SvgCalendar(props) {
|
|
21387
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21618
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
21388
21619
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21389
21620
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21390
21621
|
viewBox: "0 0 20 20",
|
|
21391
21622
|
fill: "currentColor"
|
|
21392
|
-
}, props), _path$
|
|
21623
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21393
21624
|
fillRule: "evenodd",
|
|
21394
21625
|
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",
|
|
21395
21626
|
clipRule: "evenodd"
|
|
21396
21627
|
})));
|
|
21397
21628
|
}
|
|
21398
21629
|
|
|
21399
|
-
var _path$
|
|
21630
|
+
var _path$d;
|
|
21400
21631
|
|
|
21401
|
-
function _extends$
|
|
21632
|
+
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); }
|
|
21402
21633
|
|
|
21403
21634
|
function SvgPlus(props) {
|
|
21404
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21635
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21405
21636
|
className: "plc-w-5 plc-h-5",
|
|
21406
21637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21407
21638
|
fill: "none",
|
|
21408
21639
|
viewBox: "0 0 24 24",
|
|
21409
21640
|
stroke: "currentColor"
|
|
21410
|
-
}, props), _path$
|
|
21641
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21411
21642
|
strokeLinecap: "round",
|
|
21412
21643
|
strokeLinejoin: "round",
|
|
21413
21644
|
strokeWidth: 2,
|
|
@@ -21415,17 +21646,17 @@ function SvgPlus(props) {
|
|
|
21415
21646
|
})));
|
|
21416
21647
|
}
|
|
21417
21648
|
|
|
21418
|
-
var _path$
|
|
21649
|
+
var _path$c;
|
|
21419
21650
|
|
|
21420
|
-
function _extends$
|
|
21651
|
+
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); }
|
|
21421
21652
|
|
|
21422
21653
|
function SvgCheckMark(props) {
|
|
21423
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21654
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21424
21655
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21425
21656
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21426
21657
|
viewBox: "0 0 20 20",
|
|
21427
21658
|
fill: "currentColor"
|
|
21428
|
-
}, props), _path$
|
|
21659
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21429
21660
|
fillRule: "evenodd",
|
|
21430
21661
|
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",
|
|
21431
21662
|
clipRule: "evenodd"
|
|
@@ -21720,18 +21951,18 @@ Accordion.item = function AccordionItem({
|
|
|
21720
21951
|
}, content)) : null;
|
|
21721
21952
|
};
|
|
21722
21953
|
|
|
21723
|
-
var _path$
|
|
21954
|
+
var _path$b;
|
|
21724
21955
|
|
|
21725
|
-
function _extends$
|
|
21956
|
+
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); }
|
|
21726
21957
|
|
|
21727
21958
|
function SvgExit(props) {
|
|
21728
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21959
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
21729
21960
|
className: "plc-w-6 plc-h-6",
|
|
21730
21961
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21731
21962
|
fill: "none",
|
|
21732
21963
|
viewBox: "0 0 24 24",
|
|
21733
21964
|
stroke: "currentColor"
|
|
21734
|
-
}, props), _path$
|
|
21965
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21735
21966
|
strokeLinecap: "round",
|
|
21736
21967
|
strokeLinejoin: "round",
|
|
21737
21968
|
strokeWidth: 2,
|
|
@@ -21739,13 +21970,32 @@ function SvgExit(props) {
|
|
|
21739
21970
|
})));
|
|
21740
21971
|
}
|
|
21741
21972
|
|
|
21973
|
+
var _path$a;
|
|
21974
|
+
|
|
21975
|
+
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); }
|
|
21976
|
+
|
|
21977
|
+
function SvgUser(props) {
|
|
21978
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21979
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21980
|
+
fill: "none",
|
|
21981
|
+
viewBox: "0 0 24 24",
|
|
21982
|
+
stroke: "currentColor"
|
|
21983
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21984
|
+
strokeLinecap: "round",
|
|
21985
|
+
strokeLinejoin: "round",
|
|
21986
|
+
strokeWidth: 2,
|
|
21987
|
+
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"
|
|
21988
|
+
})));
|
|
21989
|
+
}
|
|
21990
|
+
|
|
21742
21991
|
var _path$9;
|
|
21743
21992
|
|
|
21744
21993
|
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); }
|
|
21745
21994
|
|
|
21746
|
-
function
|
|
21995
|
+
function SvgNewsletter(props) {
|
|
21747
21996
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21748
21997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21998
|
+
className: "plc-h-5 plc-w-5",
|
|
21749
21999
|
fill: "none",
|
|
21750
22000
|
viewBox: "0 0 24 24",
|
|
21751
22001
|
stroke: "currentColor"
|
|
@@ -21753,7 +22003,7 @@ function SvgUser(props) {
|
|
|
21753
22003
|
strokeLinecap: "round",
|
|
21754
22004
|
strokeLinejoin: "round",
|
|
21755
22005
|
strokeWidth: 2,
|
|
21756
|
-
d: "
|
|
22006
|
+
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"
|
|
21757
22007
|
})));
|
|
21758
22008
|
}
|
|
21759
22009
|
|
|
@@ -21761,10 +22011,10 @@ var _path$8;
|
|
|
21761
22011
|
|
|
21762
22012
|
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); }
|
|
21763
22013
|
|
|
21764
|
-
function
|
|
22014
|
+
function SvgDocument(props) {
|
|
21765
22015
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21766
22016
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21767
|
-
className: "plc-h-
|
|
22017
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21768
22018
|
fill: "none",
|
|
21769
22019
|
viewBox: "0 0 24 24",
|
|
21770
22020
|
stroke: "currentColor"
|
|
@@ -21772,7 +22022,7 @@ function SvgNewsletter(props) {
|
|
|
21772
22022
|
strokeLinecap: "round",
|
|
21773
22023
|
strokeLinejoin: "round",
|
|
21774
22024
|
strokeWidth: 2,
|
|
21775
|
-
d: "
|
|
22025
|
+
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"
|
|
21776
22026
|
})));
|
|
21777
22027
|
}
|
|
21778
22028
|
|
|
@@ -21940,9 +22190,11 @@ const DonationsMenu = () => {
|
|
|
21940
22190
|
};
|
|
21941
22191
|
|
|
21942
22192
|
function getDonationSubs() {
|
|
21943
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22193
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r;
|
|
21944
22194
|
|
|
21945
|
-
|
|
22195
|
+
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 : [];
|
|
22196
|
+
const canceledDonations = (_window$Pelcro$user$r = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22197
|
+
return [...donations, ...canceledDonations];
|
|
21946
22198
|
}
|
|
21947
22199
|
|
|
21948
22200
|
function formatStartDate(date) {
|
|
@@ -21950,6 +22202,130 @@ function formatStartDate(date) {
|
|
|
21950
22202
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21951
22203
|
}
|
|
21952
22204
|
|
|
22205
|
+
const InvoicesMenu = props => {
|
|
22206
|
+
const {
|
|
22207
|
+
t
|
|
22208
|
+
} = useTranslation("dashboard");
|
|
22209
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
22210
|
+
className: "plc-w-full plc-table-fixed"
|
|
22211
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
22212
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22213
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22214
|
+
className: "plc-w-4/12 "
|
|
22215
|
+
}, t("labels.details")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22216
|
+
className: "plc-w-4/12 "
|
|
22217
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22218
|
+
className: "plc-w-3/12 "
|
|
22219
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22220
|
+
className: "plc-h-4"
|
|
22221
|
+
}), /*#__PURE__*/React__default['default'].createElement(InvoicesItems, props)));
|
|
22222
|
+
};
|
|
22223
|
+
|
|
22224
|
+
const InvoicesItems = () => {
|
|
22225
|
+
var _window$Pelcro$invoic;
|
|
22226
|
+
|
|
22227
|
+
const {
|
|
22228
|
+
t
|
|
22229
|
+
} = useTranslation("dashboard");
|
|
22230
|
+
const {
|
|
22231
|
+
setInvoice,
|
|
22232
|
+
switchView
|
|
22233
|
+
} = usePelcro();
|
|
22234
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22235
|
+
|
|
22236
|
+
const showInvoiceDetails = event => {
|
|
22237
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22238
|
+
switchView("invoice-details");
|
|
22239
|
+
}
|
|
22240
|
+
};
|
|
22241
|
+
|
|
22242
|
+
if (invoices.length === 0) return null;
|
|
22243
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22244
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22245
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22246
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22247
|
+
key: invoice.id,
|
|
22248
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22249
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22250
|
+
className: "plc-truncate"
|
|
22251
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22252
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22253
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22254
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22255
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22256
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22257
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22258
|
+
className: "plc-py-2"
|
|
22259
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22260
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22261
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
22262
|
+
variant: "ghost",
|
|
22263
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22264
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, {
|
|
22265
|
+
className: "plc-w-4 plc-h-4"
|
|
22266
|
+
}),
|
|
22267
|
+
onClick: showInvoiceDetails,
|
|
22268
|
+
"data-id": invoice.id
|
|
22269
|
+
}, t("labels.view"))));
|
|
22270
|
+
});
|
|
22271
|
+
};
|
|
22272
|
+
|
|
22273
|
+
function getInvoiceStatus(invoice) {
|
|
22274
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22275
|
+
returnObjects: true
|
|
22276
|
+
});
|
|
22277
|
+
|
|
22278
|
+
switch (invoice.status) {
|
|
22279
|
+
case "paid":
|
|
22280
|
+
return {
|
|
22281
|
+
textColor: "plc-text-green-700",
|
|
22282
|
+
bgColor: "plc-bg-green-100",
|
|
22283
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null),
|
|
22284
|
+
title: translations.paid
|
|
22285
|
+
};
|
|
22286
|
+
|
|
22287
|
+
case "past_due":
|
|
22288
|
+
return {
|
|
22289
|
+
textColor: "plc-text-orange-700",
|
|
22290
|
+
bgColor: "plc-bg-orange-100",
|
|
22291
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22292
|
+
title: translations.pastDue
|
|
22293
|
+
};
|
|
22294
|
+
|
|
22295
|
+
case "open":
|
|
22296
|
+
return {
|
|
22297
|
+
textColor: "plc-text-yellow-700",
|
|
22298
|
+
bgColor: "plc-bg-yellow-100",
|
|
22299
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22300
|
+
title: translations.open
|
|
22301
|
+
};
|
|
22302
|
+
|
|
22303
|
+
case "draft":
|
|
22304
|
+
return {
|
|
22305
|
+
textColor: "plc-text-blue-700",
|
|
22306
|
+
bgColor: "plc-bg-blue-100",
|
|
22307
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
22308
|
+
title: translations.draft
|
|
22309
|
+
};
|
|
22310
|
+
|
|
22311
|
+
case "uncollectible":
|
|
22312
|
+
return {
|
|
22313
|
+
textColor: "plc-text-red-700",
|
|
22314
|
+
bgColor: "plc-bg-red-100",
|
|
22315
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22316
|
+
title: translations.uncollectible
|
|
22317
|
+
};
|
|
22318
|
+
|
|
22319
|
+
case "void":
|
|
22320
|
+
return {
|
|
22321
|
+
textColor: "plc-text-gray-700",
|
|
22322
|
+
bgColor: "plc-bg-gray-100",
|
|
22323
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22324
|
+
title: translations.void
|
|
22325
|
+
};
|
|
22326
|
+
}
|
|
22327
|
+
}
|
|
22328
|
+
|
|
21953
22329
|
const SUB_MENUS = {
|
|
21954
22330
|
PROFILE: "profile",
|
|
21955
22331
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21958,6 +22334,7 @@ const SUB_MENUS = {
|
|
|
21958
22334
|
ADDRESSES: "addresses",
|
|
21959
22335
|
GIFTS: "gifts",
|
|
21960
22336
|
ORDERS: "orders",
|
|
22337
|
+
INVOICES: "invoices",
|
|
21961
22338
|
SAVED_ITEMS: "saved-items"
|
|
21962
22339
|
};
|
|
21963
22340
|
/**
|
|
@@ -22500,6 +22877,12 @@ class Dashboard extends React.Component {
|
|
|
22500
22877
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
|
|
22501
22878
|
title: this.locale("labels.orders.label"),
|
|
22502
22879
|
content: /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null)
|
|
22880
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22881
|
+
show: hasInvoices(),
|
|
22882
|
+
name: SUB_MENUS.INVOICES,
|
|
22883
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
|
|
22884
|
+
title: this.locale("labels.invoices"),
|
|
22885
|
+
content: /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null)
|
|
22503
22886
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22504
22887
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22505
22888
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -22515,11 +22898,19 @@ class Dashboard extends React.Component {
|
|
|
22515
22898
|
|
|
22516
22899
|
}
|
|
22517
22900
|
|
|
22901
|
+
function hasInvoices() {
|
|
22902
|
+
var _window$Pelcro$invoic;
|
|
22903
|
+
|
|
22904
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22905
|
+
return invoices.length > 0;
|
|
22906
|
+
}
|
|
22907
|
+
|
|
22518
22908
|
function hasDonationSubs() {
|
|
22519
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22909
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4;
|
|
22520
22910
|
|
|
22521
22911
|
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 : [];
|
|
22522
|
-
|
|
22912
|
+
const canceledDonations = (_window$Pelcro$user$r4 = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22913
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22523
22914
|
}
|
|
22524
22915
|
|
|
22525
22916
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
@@ -22549,7 +22940,7 @@ const DashboardOpenButton = () => {
|
|
|
22549
22940
|
};
|
|
22550
22941
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22551
22942
|
|
|
22552
|
-
const initialState$
|
|
22943
|
+
const initialState$2 = {
|
|
22553
22944
|
imageSrc: null,
|
|
22554
22945
|
crop: {
|
|
22555
22946
|
x: 0,
|
|
@@ -22563,10 +22954,10 @@ const initialState$1 = {
|
|
|
22563
22954
|
content: ""
|
|
22564
22955
|
}
|
|
22565
22956
|
};
|
|
22566
|
-
const store$
|
|
22957
|
+
const store$2 = /*#__PURE__*/React.createContext(initialState$2);
|
|
22567
22958
|
const {
|
|
22568
|
-
Provider: Provider$
|
|
22569
|
-
} = store$
|
|
22959
|
+
Provider: Provider$2
|
|
22960
|
+
} = store$2;
|
|
22570
22961
|
|
|
22571
22962
|
const ProfilePicChangeContainer = ({
|
|
22572
22963
|
style,
|
|
@@ -22700,21 +23091,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22700
23091
|
default:
|
|
22701
23092
|
return state;
|
|
22702
23093
|
}
|
|
22703
|
-
}, initialState$
|
|
23094
|
+
}, initialState$2);
|
|
22704
23095
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22705
23096
|
style: { ...style
|
|
22706
23097
|
},
|
|
22707
23098
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22708
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23099
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
|
|
22709
23100
|
value: {
|
|
22710
23101
|
state,
|
|
22711
23102
|
dispatch
|
|
22712
23103
|
}
|
|
22713
23104
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22714
|
-
store: store$
|
|
23105
|
+
store: store$2,
|
|
22715
23106
|
key: i
|
|
22716
23107
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22717
|
-
store: store$
|
|
23108
|
+
store: store$2
|
|
22718
23109
|
})));
|
|
22719
23110
|
};
|
|
22720
23111
|
/**
|
|
@@ -22776,7 +23167,7 @@ const ProfilePicChangeButton = ({
|
|
|
22776
23167
|
isSubmitting
|
|
22777
23168
|
},
|
|
22778
23169
|
dispatch
|
|
22779
|
-
} = React.useContext(store$
|
|
23170
|
+
} = React.useContext(store$2);
|
|
22780
23171
|
const {
|
|
22781
23172
|
t
|
|
22782
23173
|
} = useTranslation("userEdit");
|
|
@@ -24144,7 +24535,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24144
24535
|
zoom
|
|
24145
24536
|
},
|
|
24146
24537
|
dispatch
|
|
24147
|
-
} = React.useContext(store$
|
|
24538
|
+
} = React.useContext(store$2);
|
|
24148
24539
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24149
24540
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24150
24541
|
}, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
|
|
@@ -24186,7 +24577,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24186
24577
|
zoom
|
|
24187
24578
|
},
|
|
24188
24579
|
dispatch
|
|
24189
|
-
} = React.useContext(store$
|
|
24580
|
+
} = React.useContext(store$2);
|
|
24190
24581
|
const {
|
|
24191
24582
|
t
|
|
24192
24583
|
} = useTranslation("userEdit");
|
|
@@ -24238,7 +24629,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24238
24629
|
state: {
|
|
24239
24630
|
isSubmitting
|
|
24240
24631
|
}
|
|
24241
|
-
} = React.useContext(store$
|
|
24632
|
+
} = React.useContext(store$2);
|
|
24242
24633
|
const {
|
|
24243
24634
|
t
|
|
24244
24635
|
} = useTranslation("userEdit");
|
|
@@ -24280,7 +24671,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24280
24671
|
state: {
|
|
24281
24672
|
isSubmitting
|
|
24282
24673
|
}
|
|
24283
|
-
} = React.useContext(store$
|
|
24674
|
+
} = React.useContext(store$2);
|
|
24284
24675
|
const {
|
|
24285
24676
|
t
|
|
24286
24677
|
} = useTranslation("userEdit");
|
|
@@ -24303,7 +24694,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24303
24694
|
state: {
|
|
24304
24695
|
imageSrc
|
|
24305
24696
|
}
|
|
24306
|
-
} = React.useContext(store$
|
|
24697
|
+
} = React.useContext(store$2);
|
|
24307
24698
|
const {
|
|
24308
24699
|
t
|
|
24309
24700
|
} = useTranslation("userEdit");
|
|
@@ -24365,17 +24756,17 @@ function ProfilePicChangeModal({
|
|
|
24365
24756
|
}
|
|
24366
24757
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24367
24758
|
|
|
24368
|
-
const initialState = {
|
|
24759
|
+
const initialState$1 = {
|
|
24369
24760
|
isSubmitting: false,
|
|
24370
24761
|
alert: {
|
|
24371
24762
|
type: "error",
|
|
24372
24763
|
content: ""
|
|
24373
24764
|
}
|
|
24374
24765
|
};
|
|
24375
|
-
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24766
|
+
const store$1 = /*#__PURE__*/React.createContext(initialState$1);
|
|
24376
24767
|
const {
|
|
24377
|
-
Provider
|
|
24378
|
-
} = store;
|
|
24768
|
+
Provider: Provider$1
|
|
24769
|
+
} = store$1;
|
|
24379
24770
|
|
|
24380
24771
|
const EmailVerifyContainer = ({
|
|
24381
24772
|
style,
|
|
@@ -24438,21 +24829,21 @@ const EmailVerifyContainer = ({
|
|
|
24438
24829
|
default:
|
|
24439
24830
|
return state;
|
|
24440
24831
|
}
|
|
24441
|
-
}, initialState);
|
|
24832
|
+
}, initialState$1);
|
|
24442
24833
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24443
24834
|
style: { ...style
|
|
24444
24835
|
},
|
|
24445
24836
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24446
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
24837
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
|
|
24447
24838
|
value: {
|
|
24448
24839
|
state,
|
|
24449
24840
|
dispatch
|
|
24450
24841
|
}
|
|
24451
24842
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24452
|
-
store,
|
|
24843
|
+
store: store$1,
|
|
24453
24844
|
key: i
|
|
24454
24845
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24455
|
-
store
|
|
24846
|
+
store: store$1
|
|
24456
24847
|
})));
|
|
24457
24848
|
};
|
|
24458
24849
|
|
|
@@ -24466,7 +24857,7 @@ const EmailVerifyResendButton = ({
|
|
|
24466
24857
|
state: {
|
|
24467
24858
|
isSubmitting
|
|
24468
24859
|
}
|
|
24469
|
-
} = React.useContext(store);
|
|
24860
|
+
} = React.useContext(store$1);
|
|
24470
24861
|
const {
|
|
24471
24862
|
t
|
|
24472
24863
|
} = useTranslation("verifyEmail");
|
|
@@ -24541,6 +24932,235 @@ const EmailVerifyModal = ({
|
|
|
24541
24932
|
};
|
|
24542
24933
|
EmailVerifyModal.viewId = "email-verify";
|
|
24543
24934
|
|
|
24935
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
24936
|
+
type: "invoicePayment",
|
|
24937
|
+
className: "pelcro-invoice-payment-container"
|
|
24938
|
+
}, props));
|
|
24939
|
+
|
|
24940
|
+
const InvoicePaymentView = props => {
|
|
24941
|
+
const {
|
|
24942
|
+
t
|
|
24943
|
+
} = useTranslation("payment");
|
|
24944
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24945
|
+
id: "pelcro-invoice-payment-view"
|
|
24946
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24947
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24948
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
24949
|
+
action: "javascript:void(0);",
|
|
24950
|
+
className: "plc-mt-2 pelcro-form"
|
|
24951
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
|
|
24952
|
+
type: "invoicePayment",
|
|
24953
|
+
showCoupon: false,
|
|
24954
|
+
showExternalPaymentMethods: true
|
|
24955
|
+
}, props))));
|
|
24956
|
+
};
|
|
24957
|
+
|
|
24958
|
+
const InvoicePaymentModal = ({
|
|
24959
|
+
onDisplay,
|
|
24960
|
+
onClose,
|
|
24961
|
+
...otherProps
|
|
24962
|
+
}) => {
|
|
24963
|
+
const {
|
|
24964
|
+
switchView
|
|
24965
|
+
} = usePelcro();
|
|
24966
|
+
|
|
24967
|
+
const onSuccess = () => {
|
|
24968
|
+
var _otherProps$onSuccess;
|
|
24969
|
+
|
|
24970
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
24971
|
+
return switchView("subscription-success");
|
|
24972
|
+
};
|
|
24973
|
+
|
|
24974
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
24975
|
+
id: "pelcro-invoice-payment-modal",
|
|
24976
|
+
onDisplay: onDisplay,
|
|
24977
|
+
onClose: onClose
|
|
24978
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
24979
|
+
onSuccess: onSuccess
|
|
24980
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
24981
|
+
};
|
|
24982
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
24983
|
+
|
|
24984
|
+
const invoicePaymentSubmitButton = props => {
|
|
24985
|
+
return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
|
|
24986
|
+
};
|
|
24987
|
+
|
|
24988
|
+
const initialState = {};
|
|
24989
|
+
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24990
|
+
const {
|
|
24991
|
+
Provider
|
|
24992
|
+
} = store;
|
|
24993
|
+
|
|
24994
|
+
const InvoiceDetailsContainer = ({
|
|
24995
|
+
style,
|
|
24996
|
+
className = "",
|
|
24997
|
+
onSuccess = () => {},
|
|
24998
|
+
children,
|
|
24999
|
+
...props
|
|
25000
|
+
}) => {
|
|
25001
|
+
const onPayButtonClick = () => {
|
|
25002
|
+
return onSuccess();
|
|
25003
|
+
};
|
|
25004
|
+
|
|
25005
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
25006
|
+
switch (action.type) {
|
|
25007
|
+
case HANDLE_SUBMIT:
|
|
25008
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
25009
|
+
|
|
25010
|
+
default:
|
|
25011
|
+
return state;
|
|
25012
|
+
}
|
|
25013
|
+
}, initialState);
|
|
25014
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25015
|
+
style: { ...style
|
|
25016
|
+
},
|
|
25017
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25018
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25019
|
+
value: {
|
|
25020
|
+
state,
|
|
25021
|
+
dispatch
|
|
25022
|
+
}
|
|
25023
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25024
|
+
store,
|
|
25025
|
+
key: i
|
|
25026
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25027
|
+
store
|
|
25028
|
+
})));
|
|
25029
|
+
};
|
|
25030
|
+
|
|
25031
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25032
|
+
name,
|
|
25033
|
+
url,
|
|
25034
|
+
className,
|
|
25035
|
+
...otherProps
|
|
25036
|
+
}) => {
|
|
25037
|
+
const {
|
|
25038
|
+
t
|
|
25039
|
+
} = useTranslation("invoiceDetails");
|
|
25040
|
+
const {
|
|
25041
|
+
invoice
|
|
25042
|
+
} = usePelcro();
|
|
25043
|
+
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
25044
|
+
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}`,
|
|
25045
|
+
id: "pelcro-download-invoice-link",
|
|
25046
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25047
|
+
target: "_blank",
|
|
25048
|
+
rel: "noopener noreferrer"
|
|
25049
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25050
|
+
};
|
|
25051
|
+
|
|
25052
|
+
const InvoiceDetailsPayButton = ({
|
|
25053
|
+
name,
|
|
25054
|
+
onClick,
|
|
25055
|
+
...otherProps
|
|
25056
|
+
}) => {
|
|
25057
|
+
const {
|
|
25058
|
+
dispatch
|
|
25059
|
+
} = React.useContext(store);
|
|
25060
|
+
const {
|
|
25061
|
+
t
|
|
25062
|
+
} = useTranslation("invoiceDetails");
|
|
25063
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
25064
|
+
onClick: () => {
|
|
25065
|
+
dispatch({
|
|
25066
|
+
type: HANDLE_SUBMIT
|
|
25067
|
+
});
|
|
25068
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25069
|
+
}
|
|
25070
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25071
|
+
};
|
|
25072
|
+
|
|
25073
|
+
const InvoiceDetailsView = props => {
|
|
25074
|
+
const {
|
|
25075
|
+
t
|
|
25076
|
+
} = useTranslation("invoiceDetails");
|
|
25077
|
+
const {
|
|
25078
|
+
invoice
|
|
25079
|
+
} = usePelcro();
|
|
25080
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25081
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25082
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25083
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25084
|
+
id: "pelcro-invoice-details-view"
|
|
25085
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25086
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25087
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25088
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25089
|
+
}, t("title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25090
|
+
action: "javascript:void(0);",
|
|
25091
|
+
className: "plc-mt-2 pelcro-form"
|
|
25092
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25093
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25094
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25095
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25096
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25097
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25098
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25099
|
+
className: "plc-flex plc-items-center plc-pt-2 plc-mt-2 plc-border-t plc-border-gray-400 plc-min-h-12 plc-justify-evenly pelcro-invoice-plan-wrapper"
|
|
25100
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25101
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25102
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25103
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25104
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25105
|
+
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"
|
|
25106
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25107
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25108
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25109
|
+
className: "pelcro-invoice-total-text"
|
|
25110
|
+
}, t("labels.total")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25111
|
+
className: "pelcro-invoice-total-text"
|
|
25112
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25113
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25114
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25115
|
+
className: "plc-flex plc-flex-col"
|
|
25116
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25117
|
+
className: "pelcro-invoice-total"
|
|
25118
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25119
|
+
className: "pelcro-invoice-total"
|
|
25120
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25121
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25122
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25123
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25124
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsDownloadButton, {
|
|
25125
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25126
|
+
className: "plc-w-full plc-text-center"
|
|
25127
|
+
}), showPayButton && /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsPayButton, {
|
|
25128
|
+
role: "submit",
|
|
25129
|
+
className: "plc-ml-4 plc-w-full",
|
|
25130
|
+
id: "pelcro-submit"
|
|
25131
|
+
})))));
|
|
25132
|
+
};
|
|
25133
|
+
|
|
25134
|
+
function canPayInvoice(invoice) {
|
|
25135
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25136
|
+
}
|
|
25137
|
+
|
|
25138
|
+
const InvoiceDetailsModal = ({
|
|
25139
|
+
onDisplay,
|
|
25140
|
+
onClose,
|
|
25141
|
+
...otherProps
|
|
25142
|
+
}) => {
|
|
25143
|
+
const {
|
|
25144
|
+
switchToPaymentView
|
|
25145
|
+
} = usePelcro();
|
|
25146
|
+
|
|
25147
|
+
const onSuccess = () => {
|
|
25148
|
+
var _otherProps$onSuccess;
|
|
25149
|
+
|
|
25150
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25151
|
+
switchToPaymentView();
|
|
25152
|
+
};
|
|
25153
|
+
|
|
25154
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25155
|
+
onDisplay: onDisplay,
|
|
25156
|
+
onClose: onClose,
|
|
25157
|
+
id: "pelcro-invoice-details-modal"
|
|
25158
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25159
|
+
onSuccess: onSuccess
|
|
25160
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25161
|
+
};
|
|
25162
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25163
|
+
|
|
24544
25164
|
exports.AddressCreateCity = AddressCreateCity;
|
|
24545
25165
|
exports.AddressCreateContainer = AddressCreateContainer;
|
|
24546
25166
|
exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
|
|
@@ -24616,6 +25236,14 @@ exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
|
|
|
24616
25236
|
exports.GiftRedeemView = GiftRedeemView;
|
|
24617
25237
|
exports.GoogleLoginButton = GoogleLoginButton;
|
|
24618
25238
|
exports.Input = Input;
|
|
25239
|
+
exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
|
|
25240
|
+
exports.InvoiceDetailsDownloadButton = InvoiceDetailsDownloadButton;
|
|
25241
|
+
exports.InvoiceDetailsModal = InvoiceDetailsModal;
|
|
25242
|
+
exports.InvoiceDetailsPayButton = InvoiceDetailsPayButton;
|
|
25243
|
+
exports.InvoiceDetailsView = InvoiceDetailsView;
|
|
25244
|
+
exports.InvoicePaymentContainer = InvoicePaymentContainer;
|
|
25245
|
+
exports.InvoicePaymentModal = InvoicePaymentModal;
|
|
25246
|
+
exports.InvoicePaymentView = InvoicePaymentView;
|
|
24619
25247
|
exports.Link = Link;
|
|
24620
25248
|
exports.LoginButton = LoginButton;
|
|
24621
25249
|
exports.LoginContainer = LoginContainer;
|
|
@@ -24731,6 +25359,7 @@ exports.authenticatedButtons = authenticatedButtons;
|
|
|
24731
25359
|
exports.i18n = i18next;
|
|
24732
25360
|
exports.initButtons = init$1;
|
|
24733
25361
|
exports.initContentEntitlement = init;
|
|
25362
|
+
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
24734
25363
|
exports.notify = notify;
|
|
24735
25364
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
24736
25365
|
exports.usePelcro = usePelcro;
|