@pelcro/react-pelcro-js 3.0.0-beta.2 → 3.0.0-beta.5
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 +1106 -480
- package/dist/index.esm.js +1098 -481
- 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,30 @@ 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 translations = i18next.t("messages", {
|
|
9122
|
+
returnObjects: true
|
|
9123
|
+
});
|
|
9124
|
+
notify.error(translations.invalidInvoice);
|
|
9125
|
+
}
|
|
9126
|
+
});
|
|
9127
|
+
};
|
|
9128
|
+
|
|
9008
9129
|
const defaultOptions = {
|
|
9009
9130
|
loadPaymentSDKs: true,
|
|
9010
9131
|
loadAuth0SDK: true,
|
|
@@ -9344,7 +9465,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9344
9465
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9345
9466
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9346
9467
|
|
|
9347
|
-
const initialState$
|
|
9468
|
+
const initialState$h = {
|
|
9348
9469
|
email: "",
|
|
9349
9470
|
password: "",
|
|
9350
9471
|
emailError: null,
|
|
@@ -9355,10 +9476,10 @@ const initialState$g = {
|
|
|
9355
9476
|
content: ""
|
|
9356
9477
|
}
|
|
9357
9478
|
};
|
|
9358
|
-
const store$
|
|
9479
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
9359
9480
|
const {
|
|
9360
|
-
Provider: Provider$
|
|
9361
|
-
} = store$
|
|
9481
|
+
Provider: Provider$h
|
|
9482
|
+
} = store$h;
|
|
9362
9483
|
|
|
9363
9484
|
const LoginContainer = ({
|
|
9364
9485
|
style,
|
|
@@ -9465,7 +9586,7 @@ const LoginContainer = ({
|
|
|
9465
9586
|
});
|
|
9466
9587
|
|
|
9467
9588
|
case RESET_LOGIN_FORM:
|
|
9468
|
-
return initialState$
|
|
9589
|
+
return initialState$h;
|
|
9469
9590
|
|
|
9470
9591
|
case DISABLE_LOGIN_BUTTON:
|
|
9471
9592
|
return lib_7({ ...state,
|
|
@@ -9483,12 +9604,12 @@ const LoginContainer = ({
|
|
|
9483
9604
|
default:
|
|
9484
9605
|
return state;
|
|
9485
9606
|
}
|
|
9486
|
-
}, initialState$
|
|
9607
|
+
}, initialState$h);
|
|
9487
9608
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9488
9609
|
style: { ...style
|
|
9489
9610
|
},
|
|
9490
9611
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9491
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
9612
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
9492
9613
|
value: {
|
|
9493
9614
|
state,
|
|
9494
9615
|
dispatch
|
|
@@ -9496,12 +9617,12 @@ const LoginContainer = ({
|
|
|
9496
9617
|
}, children.length ? children.map((child, i) => {
|
|
9497
9618
|
if (child) {
|
|
9498
9619
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9499
|
-
store: store$
|
|
9620
|
+
store: store$h,
|
|
9500
9621
|
key: i
|
|
9501
9622
|
});
|
|
9502
9623
|
}
|
|
9503
9624
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
9504
|
-
store: store$
|
|
9625
|
+
store: store$h
|
|
9505
9626
|
})));
|
|
9506
9627
|
};
|
|
9507
9628
|
|
|
@@ -9746,7 +9867,7 @@ const LoginButton = ({
|
|
|
9746
9867
|
buttonDisabled
|
|
9747
9868
|
},
|
|
9748
9869
|
dispatch
|
|
9749
|
-
} = React.useContext(store$
|
|
9870
|
+
} = React.useContext(store$h);
|
|
9750
9871
|
const {
|
|
9751
9872
|
t
|
|
9752
9873
|
} = useTranslation("login");
|
|
@@ -9767,23 +9888,23 @@ const LoginButton = ({
|
|
|
9767
9888
|
};
|
|
9768
9889
|
|
|
9769
9890
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
9770
|
-
store: store$
|
|
9891
|
+
store: store$h
|
|
9771
9892
|
}, props));
|
|
9772
9893
|
|
|
9773
9894
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
9774
|
-
store: store$
|
|
9895
|
+
store: store$h
|
|
9775
9896
|
}, props));
|
|
9776
9897
|
|
|
9777
|
-
var _path$
|
|
9898
|
+
var _path$r;
|
|
9778
9899
|
|
|
9779
|
-
function _extends$
|
|
9900
|
+
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
9901
|
|
|
9781
9902
|
function SvgCheck(props) {
|
|
9782
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9903
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
9783
9904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9784
9905
|
fill: "currentColor",
|
|
9785
9906
|
viewBox: "0 0 20 20"
|
|
9786
|
-
}, props), _path$
|
|
9907
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9787
9908
|
fillRule: "evenodd",
|
|
9788
9909
|
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
9910
|
clipRule: "evenodd"
|
|
@@ -9848,7 +9969,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9848
9969
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9849
9970
|
facebookLoginRenderProps.FacebookLogin;
|
|
9850
9971
|
|
|
9851
|
-
const initialState$
|
|
9972
|
+
const initialState$g = {
|
|
9852
9973
|
email: "",
|
|
9853
9974
|
password: "",
|
|
9854
9975
|
emailError: null,
|
|
@@ -9865,10 +9986,10 @@ const initialState$f = {
|
|
|
9865
9986
|
content: ""
|
|
9866
9987
|
}
|
|
9867
9988
|
};
|
|
9868
|
-
const store$
|
|
9989
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
9869
9990
|
const {
|
|
9870
|
-
Provider: Provider$
|
|
9871
|
-
} = store$
|
|
9991
|
+
Provider: Provider$g
|
|
9992
|
+
} = store$g;
|
|
9872
9993
|
|
|
9873
9994
|
const RegisterContainer = ({
|
|
9874
9995
|
style,
|
|
@@ -10051,7 +10172,7 @@ const RegisterContainer = ({
|
|
|
10051
10172
|
});
|
|
10052
10173
|
|
|
10053
10174
|
case RESET_LOGIN_FORM:
|
|
10054
|
-
return initialState$
|
|
10175
|
+
return initialState$g;
|
|
10055
10176
|
|
|
10056
10177
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10057
10178
|
return lib_7({ ...state,
|
|
@@ -10069,12 +10190,12 @@ const RegisterContainer = ({
|
|
|
10069
10190
|
default:
|
|
10070
10191
|
return state;
|
|
10071
10192
|
}
|
|
10072
|
-
}, initialState$
|
|
10193
|
+
}, initialState$g);
|
|
10073
10194
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10074
10195
|
style: { ...style
|
|
10075
10196
|
},
|
|
10076
10197
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10077
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
10198
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
10078
10199
|
value: {
|
|
10079
10200
|
state,
|
|
10080
10201
|
dispatch
|
|
@@ -10082,12 +10203,12 @@ const RegisterContainer = ({
|
|
|
10082
10203
|
}, children.length ? children.map((child, i) => {
|
|
10083
10204
|
if (child) {
|
|
10084
10205
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
10085
|
-
store: store$
|
|
10206
|
+
store: store$g,
|
|
10086
10207
|
key: i
|
|
10087
10208
|
});
|
|
10088
10209
|
}
|
|
10089
10210
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
10090
|
-
store: store$
|
|
10211
|
+
store: store$g
|
|
10091
10212
|
})));
|
|
10092
10213
|
};
|
|
10093
10214
|
/**
|
|
@@ -10102,15 +10223,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10102
10223
|
return hasSecuritySdkLoaded;
|
|
10103
10224
|
}
|
|
10104
10225
|
|
|
10105
|
-
var _path$
|
|
10226
|
+
var _path$q;
|
|
10106
10227
|
|
|
10107
|
-
function _extends$
|
|
10228
|
+
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
10229
|
|
|
10109
10230
|
function SvgFacebookLogo(props) {
|
|
10110
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10231
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
10111
10232
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10112
10233
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10113
|
-
}, props), _path$
|
|
10234
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10114
10235
|
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
10236
|
fill: "#3c5a9a"
|
|
10116
10237
|
})));
|
|
@@ -10127,10 +10248,10 @@ const FacebookLoginButton = ({
|
|
|
10127
10248
|
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
10249
|
const {
|
|
10129
10250
|
dispatch: loginDispatch
|
|
10130
|
-
} = React.useContext(store$
|
|
10251
|
+
} = React.useContext(store$h);
|
|
10131
10252
|
const {
|
|
10132
10253
|
dispatch: registerDispatch
|
|
10133
|
-
} = React.useContext(store$
|
|
10254
|
+
} = React.useContext(store$g);
|
|
10134
10255
|
|
|
10135
10256
|
const onSuccess = facebookUser => {
|
|
10136
10257
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10183,15 +10304,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10183
10304
|
unwrapExports(googleLogin);
|
|
10184
10305
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10185
10306
|
|
|
10186
|
-
var _path$
|
|
10307
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10187
10308
|
|
|
10188
|
-
function _extends$
|
|
10309
|
+
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
10310
|
|
|
10190
10311
|
function SvgGoogleLogo(props) {
|
|
10191
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10312
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
10192
10313
|
viewBox: "0 0 24 24",
|
|
10193
10314
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10194
|
-
}, props), _path$
|
|
10315
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10195
10316
|
fill: "#4285F4",
|
|
10196
10317
|
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
10318
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10217,10 +10338,10 @@ const GoogleLoginButton = ({
|
|
|
10217
10338
|
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
10339
|
const {
|
|
10219
10340
|
dispatch: loginDispatch
|
|
10220
|
-
} = React.useContext(store$
|
|
10341
|
+
} = React.useContext(store$h);
|
|
10221
10342
|
const {
|
|
10222
10343
|
dispatch: registerDispatch
|
|
10223
|
-
} = React.useContext(store$
|
|
10344
|
+
} = React.useContext(store$g);
|
|
10224
10345
|
|
|
10225
10346
|
const onSuccess = response => {
|
|
10226
10347
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10268,15 +10389,15 @@ const GoogleLoginButton = ({
|
|
|
10268
10389
|
}) : null;
|
|
10269
10390
|
};
|
|
10270
10391
|
|
|
10271
|
-
var _path$
|
|
10392
|
+
var _path$o;
|
|
10272
10393
|
|
|
10273
|
-
function _extends$
|
|
10394
|
+
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
10395
|
|
|
10275
10396
|
function SvgAuth0Logo(props) {
|
|
10276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10397
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10277
10398
|
viewBox: "0 0 256 285",
|
|
10278
10399
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10279
|
-
}, props), _path$
|
|
10400
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10280
10401
|
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
10402
|
})));
|
|
10282
10403
|
}
|
|
@@ -10300,7 +10421,9 @@ const Auth0LoginButton = ({
|
|
|
10300
10421
|
}
|
|
10301
10422
|
|
|
10302
10423
|
return () => {
|
|
10303
|
-
|
|
10424
|
+
var _auth0Script$removeEv;
|
|
10425
|
+
|
|
10426
|
+
auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
|
|
10304
10427
|
};
|
|
10305
10428
|
}, [auth0Script, auth0Enabled, auth0Loaded]);
|
|
10306
10429
|
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
@@ -10314,10 +10437,10 @@ const Auth0LoginButton = ({
|
|
|
10314
10437
|
}, [auth0Enabled, auth0Loaded]);
|
|
10315
10438
|
const {
|
|
10316
10439
|
dispatch: loginDispatch
|
|
10317
|
-
} = React.useContext(store$
|
|
10440
|
+
} = React.useContext(store$h);
|
|
10318
10441
|
const {
|
|
10319
10442
|
dispatch: registerDispatch
|
|
10320
|
-
} = React.useContext(store$
|
|
10443
|
+
} = React.useContext(store$g);
|
|
10321
10444
|
|
|
10322
10445
|
function handleClick() {
|
|
10323
10446
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10450,15 +10573,15 @@ function LoginView(props) {
|
|
|
10450
10573
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10451
10574
|
}
|
|
10452
10575
|
|
|
10453
|
-
var _path$
|
|
10576
|
+
var _path$n, _path2$2, _path3;
|
|
10454
10577
|
|
|
10455
|
-
function _extends$
|
|
10578
|
+
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); }
|
|
10456
10579
|
|
|
10457
10580
|
function SvgPelcroAuthorship(props) {
|
|
10458
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10581
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10459
10582
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10460
10583
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10461
|
-
}, props), _path$
|
|
10584
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10462
10585
|
fill: "none",
|
|
10463
10586
|
stroke: "#4a4a4a",
|
|
10464
10587
|
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"
|
|
@@ -10605,11 +10728,11 @@ function LoginModal({
|
|
|
10605
10728
|
LoginModal.viewId = "login";
|
|
10606
10729
|
|
|
10607
10730
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
10608
|
-
store: store$
|
|
10731
|
+
store: store$g
|
|
10609
10732
|
}, props));
|
|
10610
10733
|
|
|
10611
10734
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
10612
|
-
store: store$
|
|
10735
|
+
store: store$g
|
|
10613
10736
|
}, props));
|
|
10614
10737
|
|
|
10615
10738
|
const RegisterButton = ({
|
|
@@ -10629,7 +10752,7 @@ const RegisterButton = ({
|
|
|
10629
10752
|
buttonDisabled
|
|
10630
10753
|
},
|
|
10631
10754
|
dispatch
|
|
10632
|
-
} = React.useContext(store$
|
|
10755
|
+
} = React.useContext(store$g);
|
|
10633
10756
|
const {
|
|
10634
10757
|
t
|
|
10635
10758
|
} = useTranslation("register");
|
|
@@ -10767,7 +10890,7 @@ function FirstName({
|
|
|
10767
10890
|
}
|
|
10768
10891
|
|
|
10769
10892
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
10770
|
-
store: store$
|
|
10893
|
+
store: store$g
|
|
10771
10894
|
}, props));
|
|
10772
10895
|
|
|
10773
10896
|
function LastName({
|
|
@@ -10798,7 +10921,7 @@ function LastName({
|
|
|
10798
10921
|
}
|
|
10799
10922
|
|
|
10800
10923
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
10801
|
-
store: store$
|
|
10924
|
+
store: store$g
|
|
10802
10925
|
}, props));
|
|
10803
10926
|
|
|
10804
10927
|
/**
|
|
@@ -10922,7 +11045,7 @@ function TextInput({
|
|
|
10922
11045
|
|
|
10923
11046
|
const RegisterTextInput = props => {
|
|
10924
11047
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
10925
|
-
store: store$
|
|
11048
|
+
store: store$g
|
|
10926
11049
|
}));
|
|
10927
11050
|
};
|
|
10928
11051
|
|
|
@@ -12591,7 +12714,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12591
12714
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12592
12715
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12593
12716
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12594
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12717
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12718
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12595
12719
|
};
|
|
12596
12720
|
|
|
12597
12721
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12653,6 +12777,7 @@ class Subscription {
|
|
|
12653
12777
|
* @property {number} [subscriptionIdToRenew]
|
|
12654
12778
|
* @property {number} [quantity]
|
|
12655
12779
|
* @property {string} addressId
|
|
12780
|
+
* @property {number} invoiceId
|
|
12656
12781
|
*/
|
|
12657
12782
|
|
|
12658
12783
|
/**
|
|
@@ -12693,6 +12818,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12693
12818
|
|
|
12694
12819
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12695
12820
|
|
|
12821
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12822
|
+
|
|
12696
12823
|
class StripeGateway {
|
|
12697
12824
|
constructor() {
|
|
12698
12825
|
_paymentGateway.set(this, {
|
|
@@ -12716,6 +12843,9 @@ class StripeGateway {
|
|
|
12716
12843
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12717
12844
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12718
12845
|
|
|
12846
|
+
case types.PAY_INVOICE:
|
|
12847
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12848
|
+
|
|
12719
12849
|
default:
|
|
12720
12850
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12721
12851
|
}
|
|
@@ -12824,6 +12954,23 @@ class StripeGateway {
|
|
|
12824
12954
|
});
|
|
12825
12955
|
}
|
|
12826
12956
|
});
|
|
12957
|
+
|
|
12958
|
+
_payInvoice.set(this, {
|
|
12959
|
+
writable: true,
|
|
12960
|
+
value: (options, callback) => {
|
|
12961
|
+
const {
|
|
12962
|
+
token,
|
|
12963
|
+
invoiceId
|
|
12964
|
+
} = options;
|
|
12965
|
+
window.Pelcro.invoice.pay({
|
|
12966
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
12967
|
+
gateway_token: token,
|
|
12968
|
+
invoice_id: invoiceId
|
|
12969
|
+
}, (err, res) => {
|
|
12970
|
+
callback(err, res);
|
|
12971
|
+
});
|
|
12972
|
+
}
|
|
12973
|
+
});
|
|
12827
12974
|
}
|
|
12828
12975
|
|
|
12829
12976
|
}
|
|
@@ -12837,6 +12984,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12837
12984
|
|
|
12838
12985
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12839
12986
|
|
|
12987
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
12988
|
+
|
|
12840
12989
|
class PaypalGateWay {
|
|
12841
12990
|
constructor() {
|
|
12842
12991
|
_paymentGateway2.set(this, {
|
|
@@ -12854,6 +13003,9 @@ class PaypalGateWay {
|
|
|
12854
13003
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12855
13004
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12856
13005
|
|
|
13006
|
+
case types.PAY_INVOICE:
|
|
13007
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
13008
|
+
|
|
12857
13009
|
default:
|
|
12858
13010
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12859
13011
|
}
|
|
@@ -12914,6 +13066,23 @@ class PaypalGateWay {
|
|
|
12914
13066
|
});
|
|
12915
13067
|
}
|
|
12916
13068
|
});
|
|
13069
|
+
|
|
13070
|
+
_payInvoice2.set(this, {
|
|
13071
|
+
writable: true,
|
|
13072
|
+
value: (options, callback) => {
|
|
13073
|
+
const {
|
|
13074
|
+
token,
|
|
13075
|
+
invoiceId
|
|
13076
|
+
} = options;
|
|
13077
|
+
window.Pelcro.invoice.pay({
|
|
13078
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13079
|
+
gateway_token: token,
|
|
13080
|
+
invoice_id: invoiceId
|
|
13081
|
+
}, (err, res) => {
|
|
13082
|
+
callback(err, res);
|
|
13083
|
+
});
|
|
13084
|
+
}
|
|
13085
|
+
});
|
|
12917
13086
|
}
|
|
12918
13087
|
|
|
12919
13088
|
}
|
|
@@ -12938,7 +13107,7 @@ class PaypalGateWay {
|
|
|
12938
13107
|
|
|
12939
13108
|
/** @type {PaymentStateType} */
|
|
12940
13109
|
|
|
12941
|
-
const initialState$
|
|
13110
|
+
const initialState$f = {
|
|
12942
13111
|
disableSubmit: false,
|
|
12943
13112
|
isLoading: false,
|
|
12944
13113
|
disableCouponButton: false,
|
|
@@ -12957,10 +13126,10 @@ const initialState$e = {
|
|
|
12957
13126
|
content: ""
|
|
12958
13127
|
}
|
|
12959
13128
|
};
|
|
12960
|
-
const store$
|
|
13129
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
12961
13130
|
const {
|
|
12962
|
-
Provider: Provider$
|
|
12963
|
-
} = store$
|
|
13131
|
+
Provider: Provider$f
|
|
13132
|
+
} = store$f;
|
|
12964
13133
|
|
|
12965
13134
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12966
13135
|
style,
|
|
@@ -12973,7 +13142,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12973
13142
|
onFailure = () => {},
|
|
12974
13143
|
...props
|
|
12975
13144
|
}) => {
|
|
12976
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13145
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12977
13146
|
|
|
12978
13147
|
const {
|
|
12979
13148
|
t
|
|
@@ -12990,6 +13159,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12990
13159
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12991
13160
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12992
13161
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13162
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12993
13163
|
React.useEffect(() => {
|
|
12994
13164
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12995
13165
|
dispatch({
|
|
@@ -13558,6 +13728,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13558
13728
|
});
|
|
13559
13729
|
};
|
|
13560
13730
|
|
|
13731
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13732
|
+
const subscription = new Subscription(gatewayService);
|
|
13733
|
+
return subscription.execute({
|
|
13734
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13735
|
+
token: gatewayToken,
|
|
13736
|
+
invoiceId: invoice.id
|
|
13737
|
+
}, (err, res) => {
|
|
13738
|
+
dispatch({
|
|
13739
|
+
type: DISABLE_SUBMIT,
|
|
13740
|
+
payload: false
|
|
13741
|
+
});
|
|
13742
|
+
dispatch({
|
|
13743
|
+
type: LOADING,
|
|
13744
|
+
payload: false
|
|
13745
|
+
});
|
|
13746
|
+
|
|
13747
|
+
if (err) {
|
|
13748
|
+
onFailure(err);
|
|
13749
|
+
return dispatch({
|
|
13750
|
+
type: SHOW_ALERT,
|
|
13751
|
+
payload: {
|
|
13752
|
+
type: "error",
|
|
13753
|
+
content: getErrorMessages(err)
|
|
13754
|
+
}
|
|
13755
|
+
});
|
|
13756
|
+
}
|
|
13757
|
+
|
|
13758
|
+
set({
|
|
13759
|
+
invoice: null
|
|
13760
|
+
});
|
|
13761
|
+
onSuccess(res);
|
|
13762
|
+
});
|
|
13763
|
+
};
|
|
13764
|
+
|
|
13561
13765
|
const updatePaymentSource = (state, dispatch) => {
|
|
13562
13766
|
return stripe.createSource({
|
|
13563
13767
|
type: "card"
|
|
@@ -13632,13 +13836,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13632
13836
|
source,
|
|
13633
13837
|
error
|
|
13634
13838
|
}) => {
|
|
13635
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13839
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13636
13840
|
|
|
13637
13841
|
if (error) {
|
|
13638
13842
|
return handlePaymentError(error);
|
|
13639
13843
|
}
|
|
13640
13844
|
|
|
13641
13845
|
const getOrderItemsTotal = () => {
|
|
13846
|
+
if (!order) {
|
|
13847
|
+
return null;
|
|
13848
|
+
}
|
|
13849
|
+
|
|
13642
13850
|
const isQuickPurchase = !Array.isArray(order);
|
|
13643
13851
|
|
|
13644
13852
|
if (isQuickPurchase) {
|
|
@@ -13654,7 +13862,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13654
13862
|
}, 0);
|
|
13655
13863
|
};
|
|
13656
13864
|
|
|
13657
|
-
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();
|
|
13865
|
+
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();
|
|
13658
13866
|
|
|
13659
13867
|
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) {
|
|
13660
13868
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13687,6 +13895,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13687
13895
|
const resolveTaxCalculation = () => {
|
|
13688
13896
|
var _window$Pelcro$site$r2;
|
|
13689
13897
|
|
|
13898
|
+
if (type === "invoicePayment") {
|
|
13899
|
+
return new Promise(resolve => resolve());
|
|
13900
|
+
}
|
|
13901
|
+
|
|
13690
13902
|
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;
|
|
13691
13903
|
return new Promise((resolve, reject) => {
|
|
13692
13904
|
// resolve early if taxes isn't enabled
|
|
@@ -13760,6 +13972,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13760
13972
|
subscribe(stripeSource, state, dispatch);
|
|
13761
13973
|
} else if (stripeSource && type === "orderCreate") {
|
|
13762
13974
|
purchase(stripeSource, state, dispatch);
|
|
13975
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
13976
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13763
13977
|
}
|
|
13764
13978
|
};
|
|
13765
13979
|
|
|
@@ -13893,7 +14107,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13893
14107
|
});
|
|
13894
14108
|
|
|
13895
14109
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13896
|
-
return lib_5(state, () =>
|
|
14110
|
+
return lib_5(state, (state, dispatch) => {
|
|
14111
|
+
if (type === "invoicePayment") {
|
|
14112
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14113
|
+
} else {
|
|
14114
|
+
handlePaypalSubscription(state, action.payload);
|
|
14115
|
+
}
|
|
14116
|
+
});
|
|
13897
14117
|
|
|
13898
14118
|
case SET_UPDATED_PRICE:
|
|
13899
14119
|
return lib_7({ ...state,
|
|
@@ -13951,21 +14171,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13951
14171
|
default:
|
|
13952
14172
|
return state;
|
|
13953
14173
|
}
|
|
13954
|
-
}, initialState$
|
|
14174
|
+
}, initialState$f);
|
|
13955
14175
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13956
14176
|
style: { ...style
|
|
13957
14177
|
},
|
|
13958
14178
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13959
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
14179
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
13960
14180
|
value: {
|
|
13961
14181
|
state,
|
|
13962
14182
|
dispatch
|
|
13963
14183
|
}
|
|
13964
14184
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13965
|
-
store: store$
|
|
14185
|
+
store: store$f,
|
|
13966
14186
|
key: i
|
|
13967
14187
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13968
|
-
store: store$
|
|
14188
|
+
store: store$f
|
|
13969
14189
|
})));
|
|
13970
14190
|
};
|
|
13971
14191
|
|
|
@@ -13987,7 +14207,7 @@ const PaymentMethodContainer = props => {
|
|
|
13987
14207
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13988
14208
|
locale: getPageOrDefaultLanguage()
|
|
13989
14209
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
13990
|
-
store: store$
|
|
14210
|
+
store: store$f
|
|
13991
14211
|
}, props))));
|
|
13992
14212
|
}
|
|
13993
14213
|
|
|
@@ -14040,7 +14260,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14040
14260
|
currentPlan,
|
|
14041
14261
|
updatedPrice
|
|
14042
14262
|
}
|
|
14043
|
-
} = React.useContext(store$
|
|
14263
|
+
} = React.useContext(store$f);
|
|
14044
14264
|
|
|
14045
14265
|
const updatePaymentRequest = () => {
|
|
14046
14266
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14100,7 +14320,7 @@ const DiscountedPrice = props => {
|
|
|
14100
14320
|
taxAmount,
|
|
14101
14321
|
percentOff
|
|
14102
14322
|
}
|
|
14103
|
-
} = React.useContext(store$
|
|
14323
|
+
} = React.useContext(store$f);
|
|
14104
14324
|
const {
|
|
14105
14325
|
order,
|
|
14106
14326
|
plan
|
|
@@ -14150,7 +14370,7 @@ const SubmitPaymentMethod = ({
|
|
|
14150
14370
|
isLoading,
|
|
14151
14371
|
updatedPrice
|
|
14152
14372
|
}
|
|
14153
|
-
} = React.useContext(store$
|
|
14373
|
+
} = React.useContext(store$f);
|
|
14154
14374
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14155
14375
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14156
14376
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14171,17 +14391,17 @@ const SubmitPaymentMethod = ({
|
|
|
14171
14391
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14172
14392
|
};
|
|
14173
14393
|
|
|
14174
|
-
var _path$
|
|
14394
|
+
var _path$m;
|
|
14175
14395
|
|
|
14176
|
-
function _extends$
|
|
14396
|
+
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); }
|
|
14177
14397
|
|
|
14178
14398
|
function SvgArrowLeft(props) {
|
|
14179
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14399
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
14180
14400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14181
14401
|
fill: "none",
|
|
14182
14402
|
viewBox: "0 0 24 24",
|
|
14183
14403
|
stroke: "currentColor"
|
|
14184
|
-
}, props), _path$
|
|
14404
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14185
14405
|
strokeLinecap: "round",
|
|
14186
14406
|
strokeLinejoin: "round",
|
|
14187
14407
|
strokeWidth: 2,
|
|
@@ -14200,7 +14420,7 @@ const ApplyCouponButton = ({
|
|
|
14200
14420
|
disableCouponButton
|
|
14201
14421
|
},
|
|
14202
14422
|
dispatch
|
|
14203
|
-
} = React.useContext(store$
|
|
14423
|
+
} = React.useContext(store$f);
|
|
14204
14424
|
const {
|
|
14205
14425
|
t
|
|
14206
14426
|
} = useTranslation("checkoutForm");
|
|
@@ -14234,7 +14454,7 @@ const CouponCodeField = props => {
|
|
|
14234
14454
|
couponCode,
|
|
14235
14455
|
couponError
|
|
14236
14456
|
}
|
|
14237
|
-
} = React.useContext(store$
|
|
14457
|
+
} = React.useContext(store$f);
|
|
14238
14458
|
|
|
14239
14459
|
const onCouponCodeChange = e => {
|
|
14240
14460
|
dispatch({
|
|
@@ -14263,17 +14483,17 @@ const CouponCodeField = props => {
|
|
|
14263
14483
|
}, props));
|
|
14264
14484
|
};
|
|
14265
14485
|
|
|
14266
|
-
var _path$
|
|
14486
|
+
var _path$l;
|
|
14267
14487
|
|
|
14268
|
-
function _extends$
|
|
14488
|
+
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); }
|
|
14269
14489
|
|
|
14270
14490
|
function SvgTicket(props) {
|
|
14271
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14491
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
14272
14492
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14273
14493
|
fill: "none",
|
|
14274
14494
|
viewBox: "0 0 24 24",
|
|
14275
14495
|
stroke: "currentColor"
|
|
14276
|
-
}, props), _path$
|
|
14496
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14277
14497
|
strokeLinecap: "round",
|
|
14278
14498
|
strokeLinejoin: "round",
|
|
14279
14499
|
strokeWidth: 2,
|
|
@@ -14290,7 +14510,7 @@ const CouponCode = ({
|
|
|
14290
14510
|
state: {
|
|
14291
14511
|
enableCouponField
|
|
14292
14512
|
}
|
|
14293
|
-
} = React.useContext(store$
|
|
14513
|
+
} = React.useContext(store$f);
|
|
14294
14514
|
const {
|
|
14295
14515
|
t
|
|
14296
14516
|
} = useTranslation("checkoutForm");
|
|
@@ -14547,17 +14767,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14547
14767
|
const {
|
|
14548
14768
|
dispatch,
|
|
14549
14769
|
state
|
|
14550
|
-
} = React.useContext(store$
|
|
14770
|
+
} = React.useContext(store$f);
|
|
14551
14771
|
const {
|
|
14552
14772
|
product,
|
|
14553
14773
|
plan,
|
|
14774
|
+
invoice,
|
|
14554
14775
|
selectedAddressId
|
|
14555
14776
|
} = usePelcro();
|
|
14556
14777
|
React.useEffect(() => {
|
|
14557
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14778
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14558
14779
|
|
|
14559
14780
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14560
|
-
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 :
|
|
14781
|
+
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;
|
|
14561
14782
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14562
14783
|
|
|
14563
14784
|
const initializePaypal = async () => {
|
|
@@ -14566,7 +14787,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14566
14787
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14567
14788
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14568
14789
|
style: props.buttonStyle,
|
|
14569
|
-
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,
|
|
14790
|
+
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,
|
|
14570
14791
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14571
14792
|
displayName: props.merchantDisplayName,
|
|
14572
14793
|
locale: props.locale,
|
|
@@ -14576,9 +14797,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14576
14797
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14577
14798
|
|
|
14578
14799
|
paypalCheckoutInstance.createPayment({
|
|
14579
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14800
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14580
14801
|
amount: updatedPrice,
|
|
14581
|
-
address: selectedAddress,
|
|
14802
|
+
address: invoice ? null : selectedAddress,
|
|
14582
14803
|
onButtonClick: () => {
|
|
14583
14804
|
dispatch({
|
|
14584
14805
|
type: DISABLE_SUBMIT,
|
|
@@ -14632,16 +14853,16 @@ const BankRedirection = () => {
|
|
|
14632
14853
|
}));
|
|
14633
14854
|
};
|
|
14634
14855
|
|
|
14635
|
-
var _path$
|
|
14856
|
+
var _path$k;
|
|
14636
14857
|
|
|
14637
|
-
function _extends$
|
|
14858
|
+
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); }
|
|
14638
14859
|
|
|
14639
14860
|
function SvgLock(props) {
|
|
14640
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14861
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
14641
14862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14642
14863
|
viewBox: "0 0 20 20",
|
|
14643
14864
|
fill: "currentColor"
|
|
14644
|
-
}, props), _path$
|
|
14865
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14645
14866
|
fillRule: "evenodd",
|
|
14646
14867
|
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",
|
|
14647
14868
|
clipRule: "evenodd"
|
|
@@ -14658,7 +14879,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14658
14879
|
state: {
|
|
14659
14880
|
isLoading
|
|
14660
14881
|
}
|
|
14661
|
-
} = React.useContext(store$
|
|
14882
|
+
} = React.useContext(store$f);
|
|
14662
14883
|
const {
|
|
14663
14884
|
switchView,
|
|
14664
14885
|
selectedPaymentMethodId
|
|
@@ -14700,7 +14921,7 @@ const TaxAmount = () => {
|
|
|
14700
14921
|
state: {
|
|
14701
14922
|
taxAmount
|
|
14702
14923
|
}
|
|
14703
|
-
} = React.useContext(store$
|
|
14924
|
+
} = React.useContext(store$f);
|
|
14704
14925
|
const {
|
|
14705
14926
|
plan
|
|
14706
14927
|
} = usePelcro();
|
|
@@ -14863,12 +15084,12 @@ function SubscriptionRenewModal({
|
|
|
14863
15084
|
}
|
|
14864
15085
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14865
15086
|
|
|
14866
|
-
var _path$
|
|
15087
|
+
var _path$j;
|
|
14867
15088
|
|
|
14868
|
-
function _extends$
|
|
15089
|
+
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); }
|
|
14869
15090
|
|
|
14870
15091
|
function SvgGift(props) {
|
|
14871
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15092
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14872
15093
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14873
15094
|
fill: "none",
|
|
14874
15095
|
stroke: "currentColor",
|
|
@@ -14877,7 +15098,7 @@ function SvgGift(props) {
|
|
|
14877
15098
|
strokeWidth: 2,
|
|
14878
15099
|
viewBox: "0 0 24 24",
|
|
14879
15100
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14880
|
-
}, props), _path$
|
|
15101
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14881
15102
|
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"
|
|
14882
15103
|
})));
|
|
14883
15104
|
}
|
|
@@ -14915,10 +15136,13 @@ const getCurrentFlow = () => {
|
|
|
14915
15136
|
const {
|
|
14916
15137
|
product,
|
|
14917
15138
|
giftRecipient,
|
|
14918
|
-
giftCode
|
|
15139
|
+
giftCode,
|
|
15140
|
+
invoice
|
|
14919
15141
|
} = usePelcro.getStore();
|
|
14920
15142
|
|
|
14921
|
-
if (
|
|
15143
|
+
if (invoice) {
|
|
15144
|
+
return "invoicePayment";
|
|
15145
|
+
} else if (giftRecipient) {
|
|
14922
15146
|
return "giftCreate";
|
|
14923
15147
|
} else if (giftCode) {
|
|
14924
15148
|
return "giftRedeem";
|
|
@@ -14955,6 +15179,13 @@ const getSuccessContent = i18n => {
|
|
|
14955
15179
|
}),
|
|
14956
15180
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14957
15181
|
successContent: i18n("messages.giftRedeem.content")
|
|
15182
|
+
},
|
|
15183
|
+
invoicePayment: {
|
|
15184
|
+
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
15185
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15186
|
+
}),
|
|
15187
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15188
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14958
15189
|
}
|
|
14959
15190
|
};
|
|
14960
15191
|
return wordingDictionary[flow];
|
|
@@ -15208,7 +15439,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
15208
15439
|
|
|
15209
15440
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15210
15441
|
|
|
15211
|
-
const initialState$
|
|
15442
|
+
const initialState$e = {
|
|
15212
15443
|
didSubToNewslettersBefore: false,
|
|
15213
15444
|
newsletters: [],
|
|
15214
15445
|
isListLoading: true,
|
|
@@ -15218,10 +15449,10 @@ const initialState$d = {
|
|
|
15218
15449
|
content: ""
|
|
15219
15450
|
}
|
|
15220
15451
|
};
|
|
15221
|
-
const store$
|
|
15452
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
15222
15453
|
const {
|
|
15223
|
-
Provider: Provider$
|
|
15224
|
-
} = store$
|
|
15454
|
+
Provider: Provider$e
|
|
15455
|
+
} = store$e;
|
|
15225
15456
|
|
|
15226
15457
|
const NewsletterUpdateContainer = ({
|
|
15227
15458
|
style,
|
|
@@ -15334,7 +15565,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15334
15565
|
default:
|
|
15335
15566
|
return state;
|
|
15336
15567
|
}
|
|
15337
|
-
}, initialState$
|
|
15568
|
+
}, initialState$e);
|
|
15338
15569
|
React.useEffect(() => {
|
|
15339
15570
|
const getUserNewsletters = () => {
|
|
15340
15571
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15378,7 +15609,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15378
15609
|
style: { ...style
|
|
15379
15610
|
},
|
|
15380
15611
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15381
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
15612
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
15382
15613
|
value: {
|
|
15383
15614
|
state,
|
|
15384
15615
|
dispatch
|
|
@@ -15386,12 +15617,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15386
15617
|
}, children.length ? children.map((child, i) => {
|
|
15387
15618
|
if (child) {
|
|
15388
15619
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15389
|
-
store: store$
|
|
15620
|
+
store: store$e,
|
|
15390
15621
|
key: i
|
|
15391
15622
|
});
|
|
15392
15623
|
}
|
|
15393
15624
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15394
|
-
store: store$
|
|
15625
|
+
store: store$e
|
|
15395
15626
|
})));
|
|
15396
15627
|
};
|
|
15397
15628
|
|
|
@@ -15406,7 +15637,7 @@ const NewsletterUpdateButton = ({
|
|
|
15406
15637
|
isSubmitting,
|
|
15407
15638
|
isListLoading
|
|
15408
15639
|
}
|
|
15409
|
-
} = React.useContext(store$
|
|
15640
|
+
} = React.useContext(store$e);
|
|
15410
15641
|
const {
|
|
15411
15642
|
t
|
|
15412
15643
|
} = useTranslation("newsletter");
|
|
@@ -15436,7 +15667,7 @@ const NewsletterUpdateList = () => {
|
|
|
15436
15667
|
newsletters,
|
|
15437
15668
|
isListLoading
|
|
15438
15669
|
}
|
|
15439
|
-
} = React.useContext(store$
|
|
15670
|
+
} = React.useContext(store$e);
|
|
15440
15671
|
|
|
15441
15672
|
if (isListLoading) {
|
|
15442
15673
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
@@ -15640,7 +15871,7 @@ function SubscriptionCreateModal({
|
|
|
15640
15871
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15641
15872
|
|
|
15642
15873
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15643
|
-
const initialState$
|
|
15874
|
+
const initialState$d = {
|
|
15644
15875
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15645
15876
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15646
15877
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15653,10 +15884,10 @@ const initialState$c = {
|
|
|
15653
15884
|
content: ""
|
|
15654
15885
|
}
|
|
15655
15886
|
};
|
|
15656
|
-
const store$
|
|
15887
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
15657
15888
|
const {
|
|
15658
|
-
Provider: Provider$
|
|
15659
|
-
} = store$
|
|
15889
|
+
Provider: Provider$d
|
|
15890
|
+
} = store$d;
|
|
15660
15891
|
|
|
15661
15892
|
const UserUpdateContainer = ({
|
|
15662
15893
|
style,
|
|
@@ -15788,27 +16019,27 @@ const UserUpdateContainer = ({
|
|
|
15788
16019
|
default:
|
|
15789
16020
|
return state;
|
|
15790
16021
|
}
|
|
15791
|
-
}, initialState$
|
|
16022
|
+
}, initialState$d);
|
|
15792
16023
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15793
16024
|
style: { ...style
|
|
15794
16025
|
},
|
|
15795
16026
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15796
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16027
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
15797
16028
|
value: {
|
|
15798
16029
|
state,
|
|
15799
16030
|
dispatch
|
|
15800
16031
|
}
|
|
15801
16032
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15802
|
-
store: store$
|
|
16033
|
+
store: store$d,
|
|
15803
16034
|
key: i
|
|
15804
16035
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15805
|
-
store: store$
|
|
16036
|
+
store: store$d
|
|
15806
16037
|
})));
|
|
15807
16038
|
};
|
|
15808
16039
|
|
|
15809
16040
|
const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
15810
16041
|
disabled: true,
|
|
15811
|
-
store: store$
|
|
16042
|
+
store: store$d
|
|
15812
16043
|
}, props));
|
|
15813
16044
|
|
|
15814
16045
|
const UserUpdateButton = ({
|
|
@@ -15821,7 +16052,7 @@ const UserUpdateButton = ({
|
|
|
15821
16052
|
buttonDisabled
|
|
15822
16053
|
},
|
|
15823
16054
|
dispatch
|
|
15824
|
-
} = React.useContext(store$
|
|
16055
|
+
} = React.useContext(store$d);
|
|
15825
16056
|
const {
|
|
15826
16057
|
t
|
|
15827
16058
|
} = useTranslation("userEdit");
|
|
@@ -15838,11 +16069,11 @@ const UserUpdateButton = ({
|
|
|
15838
16069
|
};
|
|
15839
16070
|
|
|
15840
16071
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
15841
|
-
store: store$
|
|
16072
|
+
store: store$d
|
|
15842
16073
|
}, props));
|
|
15843
16074
|
|
|
15844
16075
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
15845
|
-
store: store$
|
|
16076
|
+
store: store$d
|
|
15846
16077
|
}, props));
|
|
15847
16078
|
|
|
15848
16079
|
function Phone({
|
|
@@ -15871,22 +16102,22 @@ function Phone({
|
|
|
15871
16102
|
}
|
|
15872
16103
|
|
|
15873
16104
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
15874
|
-
store: store$
|
|
16105
|
+
store: store$d
|
|
15875
16106
|
}, props));
|
|
15876
16107
|
|
|
15877
16108
|
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";
|
|
15878
16109
|
|
|
15879
|
-
var _path$
|
|
16110
|
+
var _path$i;
|
|
15880
16111
|
|
|
15881
|
-
function _extends$
|
|
16112
|
+
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); }
|
|
15882
16113
|
|
|
15883
16114
|
function SvgEdit(props) {
|
|
15884
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16115
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
15885
16116
|
className: "plc-w-6 plc-h-6",
|
|
15886
16117
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15887
16118
|
viewBox: "0 0 20 20",
|
|
15888
16119
|
fill: "currentColor"
|
|
15889
|
-
}, props), _path$
|
|
16120
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15890
16121
|
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"
|
|
15891
16122
|
})));
|
|
15892
16123
|
}
|
|
@@ -16018,16 +16249,16 @@ function DisplayName({
|
|
|
16018
16249
|
}
|
|
16019
16250
|
|
|
16020
16251
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
16021
|
-
store: store$
|
|
16252
|
+
store: store$d
|
|
16022
16253
|
}, props));
|
|
16023
16254
|
|
|
16024
16255
|
const UserUpdateTextInput = props => {
|
|
16025
16256
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16026
|
-
store: store$
|
|
16257
|
+
store: store$d
|
|
16027
16258
|
}));
|
|
16028
16259
|
};
|
|
16029
16260
|
|
|
16030
|
-
const initialState$
|
|
16261
|
+
const initialState$c = {
|
|
16031
16262
|
isSubmitting: false,
|
|
16032
16263
|
firstName: "",
|
|
16033
16264
|
firstNameError: "",
|
|
@@ -16052,10 +16283,10 @@ const initialState$b = {
|
|
|
16052
16283
|
content: ""
|
|
16053
16284
|
}
|
|
16054
16285
|
};
|
|
16055
|
-
const store$
|
|
16286
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
16056
16287
|
const {
|
|
16057
|
-
Provider: Provider$
|
|
16058
|
-
} = store$
|
|
16288
|
+
Provider: Provider$c
|
|
16289
|
+
} = store$c;
|
|
16059
16290
|
|
|
16060
16291
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16061
16292
|
|
|
@@ -16262,7 +16493,7 @@ const AddressCreateContainer = ({
|
|
|
16262
16493
|
default:
|
|
16263
16494
|
return state;
|
|
16264
16495
|
}
|
|
16265
|
-
}, initialState$
|
|
16496
|
+
}, initialState$c);
|
|
16266
16497
|
React.useEffect(() => {
|
|
16267
16498
|
const getStates = () => {
|
|
16268
16499
|
dispatch({
|
|
@@ -16294,16 +16525,16 @@ const AddressCreateContainer = ({
|
|
|
16294
16525
|
style: { ...style
|
|
16295
16526
|
},
|
|
16296
16527
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16297
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16528
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
16298
16529
|
value: {
|
|
16299
16530
|
state,
|
|
16300
16531
|
dispatch
|
|
16301
16532
|
}
|
|
16302
16533
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
16303
|
-
store: store$
|
|
16534
|
+
store: store$c,
|
|
16304
16535
|
key: i
|
|
16305
16536
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
16306
|
-
store: store$
|
|
16537
|
+
store: store$c
|
|
16307
16538
|
})));
|
|
16308
16539
|
};
|
|
16309
16540
|
|
|
@@ -16314,7 +16545,7 @@ function AddressCreateFirstName(props) {
|
|
|
16314
16545
|
firstName,
|
|
16315
16546
|
firstNameError
|
|
16316
16547
|
}
|
|
16317
|
-
} = React.useContext(store$
|
|
16548
|
+
} = React.useContext(store$c);
|
|
16318
16549
|
|
|
16319
16550
|
const handleBlur = () => {
|
|
16320
16551
|
return dispatch({
|
|
@@ -16357,7 +16588,7 @@ function AddressCreateLastName(props) {
|
|
|
16357
16588
|
lastName,
|
|
16358
16589
|
lastNameError
|
|
16359
16590
|
}
|
|
16360
|
-
} = React.useContext(store$
|
|
16591
|
+
} = React.useContext(store$c);
|
|
16361
16592
|
|
|
16362
16593
|
const handleBlur = () => {
|
|
16363
16594
|
return dispatch({
|
|
@@ -16400,7 +16631,7 @@ function AddressCreateLine1(props) {
|
|
|
16400
16631
|
line1,
|
|
16401
16632
|
line1Error
|
|
16402
16633
|
}
|
|
16403
|
-
} = React.useContext(store$
|
|
16634
|
+
} = React.useContext(store$c);
|
|
16404
16635
|
|
|
16405
16636
|
const handleBlur = () => {
|
|
16406
16637
|
return dispatch({
|
|
@@ -16443,7 +16674,7 @@ function AddressCreateCity(props) {
|
|
|
16443
16674
|
city,
|
|
16444
16675
|
cityError
|
|
16445
16676
|
}
|
|
16446
|
-
} = React.useContext(store$
|
|
16677
|
+
} = React.useContext(store$c);
|
|
16447
16678
|
|
|
16448
16679
|
const handleBlur = () => {
|
|
16449
16680
|
return dispatch({
|
|
@@ -16486,7 +16717,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16486
16717
|
postalCode,
|
|
16487
16718
|
postalCodeError
|
|
16488
16719
|
}
|
|
16489
|
-
} = React.useContext(store$
|
|
16720
|
+
} = React.useContext(store$c);
|
|
16490
16721
|
|
|
16491
16722
|
const handleBlur = () => {
|
|
16492
16723
|
return dispatch({
|
|
@@ -16532,7 +16763,7 @@ const AddressCreateSubmit = ({
|
|
|
16532
16763
|
state: {
|
|
16533
16764
|
isSubmitting
|
|
16534
16765
|
}
|
|
16535
|
-
} = React.useContext(store$
|
|
16766
|
+
} = React.useContext(store$c);
|
|
16536
16767
|
const {
|
|
16537
16768
|
t
|
|
16538
16769
|
} = useTranslation("address");
|
|
@@ -16643,7 +16874,7 @@ function CountrySelect({
|
|
|
16643
16874
|
}
|
|
16644
16875
|
|
|
16645
16876
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
16646
|
-
store: store$
|
|
16877
|
+
store: store$c
|
|
16647
16878
|
}, props));
|
|
16648
16879
|
|
|
16649
16880
|
function StateSelect({
|
|
@@ -16731,7 +16962,7 @@ function StateSelect({
|
|
|
16731
16962
|
}
|
|
16732
16963
|
|
|
16733
16964
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
16734
|
-
store: store$
|
|
16965
|
+
store: store$c
|
|
16735
16966
|
}, props));
|
|
16736
16967
|
|
|
16737
16968
|
const AddressCreateView = props => {
|
|
@@ -16836,18 +17067,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16836
17067
|
|
|
16837
17068
|
const AddressCreateTextInput = props => {
|
|
16838
17069
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16839
|
-
store: store$
|
|
17070
|
+
store: store$c
|
|
16840
17071
|
}));
|
|
16841
17072
|
};
|
|
16842
17073
|
|
|
16843
17074
|
const AddressCreateLine2 = props => {
|
|
16844
17075
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
16845
17076
|
fieldName: "line2",
|
|
16846
|
-
store: store$
|
|
17077
|
+
store: store$c
|
|
16847
17078
|
}, props));
|
|
16848
17079
|
};
|
|
16849
17080
|
|
|
16850
|
-
const initialState$
|
|
17081
|
+
const initialState$b = {
|
|
16851
17082
|
isSubmitting: false,
|
|
16852
17083
|
firstName: "",
|
|
16853
17084
|
firstNameError: "",
|
|
@@ -16872,10 +17103,10 @@ const initialState$a = {
|
|
|
16872
17103
|
content: ""
|
|
16873
17104
|
}
|
|
16874
17105
|
};
|
|
16875
|
-
const store$
|
|
17106
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
16876
17107
|
const {
|
|
16877
|
-
Provider: Provider$
|
|
16878
|
-
} = store$
|
|
17108
|
+
Provider: Provider$b
|
|
17109
|
+
} = store$b;
|
|
16879
17110
|
|
|
16880
17111
|
const AddressUpdateContainer = ({
|
|
16881
17112
|
style,
|
|
@@ -16927,7 +17158,7 @@ const AddressUpdateContainer = ({
|
|
|
16927
17158
|
const thisAddress = addresses[address];
|
|
16928
17159
|
|
|
16929
17160
|
if (+thisAddress.id === +addressId) {
|
|
16930
|
-
const newState = { ...initialState$
|
|
17161
|
+
const newState = { ...initialState$b,
|
|
16931
17162
|
firstName: thisAddress.first_name,
|
|
16932
17163
|
lastName: thisAddress.last_name,
|
|
16933
17164
|
line1: thisAddress.line1,
|
|
@@ -17060,7 +17291,7 @@ const AddressUpdateContainer = ({
|
|
|
17060
17291
|
default:
|
|
17061
17292
|
return state;
|
|
17062
17293
|
}
|
|
17063
|
-
}, initialState$
|
|
17294
|
+
}, initialState$b);
|
|
17064
17295
|
React.useEffect(() => {
|
|
17065
17296
|
const getStates = () => {
|
|
17066
17297
|
dispatch({
|
|
@@ -17092,21 +17323,21 @@ const AddressUpdateContainer = ({
|
|
|
17092
17323
|
style: { ...style
|
|
17093
17324
|
},
|
|
17094
17325
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17095
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17326
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
17096
17327
|
value: {
|
|
17097
17328
|
state,
|
|
17098
17329
|
dispatch
|
|
17099
17330
|
}
|
|
17100
17331
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17101
|
-
store: store$
|
|
17332
|
+
store: store$b,
|
|
17102
17333
|
key: i
|
|
17103
17334
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17104
|
-
store: store$
|
|
17335
|
+
store: store$b
|
|
17105
17336
|
})));
|
|
17106
17337
|
};
|
|
17107
17338
|
|
|
17108
17339
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
17109
|
-
store: store$
|
|
17340
|
+
store: store$b
|
|
17110
17341
|
}, props));
|
|
17111
17342
|
|
|
17112
17343
|
function AddressUpdateFirstName(props) {
|
|
@@ -17116,7 +17347,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17116
17347
|
firstName,
|
|
17117
17348
|
firstNameError
|
|
17118
17349
|
}
|
|
17119
|
-
} = React.useContext(store$
|
|
17350
|
+
} = React.useContext(store$b);
|
|
17120
17351
|
|
|
17121
17352
|
const handleBlur = () => {
|
|
17122
17353
|
return dispatch({
|
|
@@ -17159,7 +17390,7 @@ function AddressUpdateLastName(props) {
|
|
|
17159
17390
|
lastName,
|
|
17160
17391
|
lastNameError
|
|
17161
17392
|
}
|
|
17162
|
-
} = React.useContext(store$
|
|
17393
|
+
} = React.useContext(store$b);
|
|
17163
17394
|
|
|
17164
17395
|
const handleBlur = () => {
|
|
17165
17396
|
return dispatch({
|
|
@@ -17202,7 +17433,7 @@ function AddressUpdateLine1(props) {
|
|
|
17202
17433
|
line1,
|
|
17203
17434
|
line1Error
|
|
17204
17435
|
}
|
|
17205
|
-
} = React.useContext(store$
|
|
17436
|
+
} = React.useContext(store$b);
|
|
17206
17437
|
|
|
17207
17438
|
const handleBlur = () => {
|
|
17208
17439
|
return dispatch({
|
|
@@ -17242,7 +17473,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17242
17473
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
17243
17474
|
fieldName: "line2"
|
|
17244
17475
|
}, props, {
|
|
17245
|
-
store: store$
|
|
17476
|
+
store: store$b
|
|
17246
17477
|
}));
|
|
17247
17478
|
};
|
|
17248
17479
|
|
|
@@ -17253,7 +17484,7 @@ function AddressUpdateCity(props) {
|
|
|
17253
17484
|
city,
|
|
17254
17485
|
cityError
|
|
17255
17486
|
}
|
|
17256
|
-
} = React.useContext(store$
|
|
17487
|
+
} = React.useContext(store$b);
|
|
17257
17488
|
|
|
17258
17489
|
const handleBlur = () => {
|
|
17259
17490
|
return dispatch({
|
|
@@ -17296,7 +17527,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17296
17527
|
postalCode,
|
|
17297
17528
|
postalCodeError
|
|
17298
17529
|
}
|
|
17299
|
-
} = React.useContext(store$
|
|
17530
|
+
} = React.useContext(store$b);
|
|
17300
17531
|
|
|
17301
17532
|
const handleBlur = () => {
|
|
17302
17533
|
return dispatch({
|
|
@@ -17342,7 +17573,7 @@ const AddressUpdateSubmit = ({
|
|
|
17342
17573
|
state: {
|
|
17343
17574
|
isSubmitting
|
|
17344
17575
|
}
|
|
17345
|
-
} = React.useContext(store$
|
|
17576
|
+
} = React.useContext(store$b);
|
|
17346
17577
|
const {
|
|
17347
17578
|
t
|
|
17348
17579
|
} = useTranslation("address");
|
|
@@ -17358,7 +17589,7 @@ const AddressUpdateSubmit = ({
|
|
|
17358
17589
|
};
|
|
17359
17590
|
|
|
17360
17591
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
17361
|
-
store: store$
|
|
17592
|
+
store: store$b
|
|
17362
17593
|
}, props));
|
|
17363
17594
|
|
|
17364
17595
|
const AddressUpdateView = props => {
|
|
@@ -17441,7 +17672,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17441
17672
|
|
|
17442
17673
|
const AddressUpdateTextInput = props => {
|
|
17443
17674
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
17444
|
-
store: store$
|
|
17675
|
+
store: store$b
|
|
17445
17676
|
}));
|
|
17446
17677
|
};
|
|
17447
17678
|
|
|
@@ -17524,7 +17755,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17524
17755
|
};
|
|
17525
17756
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17526
17757
|
|
|
17527
|
-
const initialState$
|
|
17758
|
+
const initialState$a = {
|
|
17528
17759
|
email: "",
|
|
17529
17760
|
password: "",
|
|
17530
17761
|
passwordError: null,
|
|
@@ -17537,10 +17768,10 @@ const initialState$9 = {
|
|
|
17537
17768
|
content: ""
|
|
17538
17769
|
}
|
|
17539
17770
|
};
|
|
17540
|
-
const store$
|
|
17771
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
17541
17772
|
const {
|
|
17542
|
-
Provider: Provider$
|
|
17543
|
-
} = store$
|
|
17773
|
+
Provider: Provider$a
|
|
17774
|
+
} = store$a;
|
|
17544
17775
|
|
|
17545
17776
|
const PasswordResetContainer = ({
|
|
17546
17777
|
style,
|
|
@@ -17597,7 +17828,7 @@ const PasswordResetContainer = ({
|
|
|
17597
17828
|
type: SET_EMAIL,
|
|
17598
17829
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17599
17830
|
});
|
|
17600
|
-
initialState$
|
|
17831
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17601
17832
|
dispatch({
|
|
17602
17833
|
type: SET_TOKEN,
|
|
17603
17834
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17657,26 +17888,26 @@ const PasswordResetContainer = ({
|
|
|
17657
17888
|
default:
|
|
17658
17889
|
return state;
|
|
17659
17890
|
}
|
|
17660
|
-
}, initialState$
|
|
17891
|
+
}, initialState$a);
|
|
17661
17892
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17662
17893
|
style: { ...style
|
|
17663
17894
|
},
|
|
17664
17895
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17665
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17896
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
17666
17897
|
value: {
|
|
17667
17898
|
state,
|
|
17668
17899
|
dispatch
|
|
17669
17900
|
}
|
|
17670
17901
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17671
|
-
store: store$
|
|
17902
|
+
store: store$a,
|
|
17672
17903
|
key: i
|
|
17673
17904
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17674
|
-
store: store$
|
|
17905
|
+
store: store$a
|
|
17675
17906
|
})));
|
|
17676
17907
|
};
|
|
17677
17908
|
|
|
17678
17909
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
17679
|
-
store: store$
|
|
17910
|
+
store: store$a
|
|
17680
17911
|
}, props));
|
|
17681
17912
|
|
|
17682
17913
|
const PasswordResetButton = ({
|
|
@@ -17689,7 +17920,7 @@ const PasswordResetButton = ({
|
|
|
17689
17920
|
buttonDisabled
|
|
17690
17921
|
},
|
|
17691
17922
|
dispatch
|
|
17692
|
-
} = React.useContext(store$
|
|
17923
|
+
} = React.useContext(store$a);
|
|
17693
17924
|
const {
|
|
17694
17925
|
t
|
|
17695
17926
|
} = useTranslation("passwordReset");
|
|
@@ -17706,14 +17937,14 @@ const PasswordResetButton = ({
|
|
|
17706
17937
|
};
|
|
17707
17938
|
|
|
17708
17939
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17709
|
-
store: store$
|
|
17940
|
+
store: store$a
|
|
17710
17941
|
}, props, {
|
|
17711
17942
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17712
17943
|
disabled: true
|
|
17713
17944
|
}));
|
|
17714
17945
|
|
|
17715
17946
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
17716
|
-
store: store$
|
|
17947
|
+
store: store$a
|
|
17717
17948
|
}, props));
|
|
17718
17949
|
|
|
17719
17950
|
const PasswordResetView = props => {
|
|
@@ -17765,7 +17996,7 @@ const PasswordResetModal = ({
|
|
|
17765
17996
|
};
|
|
17766
17997
|
PasswordResetModal.viewId = "password-reset";
|
|
17767
17998
|
|
|
17768
|
-
const initialState$
|
|
17999
|
+
const initialState$9 = {
|
|
17769
18000
|
email: "",
|
|
17770
18001
|
emailError: null,
|
|
17771
18002
|
buttonDisabled: false,
|
|
@@ -17774,10 +18005,10 @@ const initialState$8 = {
|
|
|
17774
18005
|
content: ""
|
|
17775
18006
|
}
|
|
17776
18007
|
};
|
|
17777
|
-
const store$
|
|
18008
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
17778
18009
|
const {
|
|
17779
|
-
Provider: Provider$
|
|
17780
|
-
} = store$
|
|
18010
|
+
Provider: Provider$9
|
|
18011
|
+
} = store$9;
|
|
17781
18012
|
|
|
17782
18013
|
const PasswordForgotContainer = ({
|
|
17783
18014
|
style,
|
|
@@ -17855,21 +18086,21 @@ const PasswordForgotContainer = ({
|
|
|
17855
18086
|
default:
|
|
17856
18087
|
return state;
|
|
17857
18088
|
}
|
|
17858
|
-
}, initialState$
|
|
18089
|
+
}, initialState$9);
|
|
17859
18090
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17860
18091
|
style: { ...style
|
|
17861
18092
|
},
|
|
17862
18093
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17863
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18094
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
17864
18095
|
value: {
|
|
17865
18096
|
state,
|
|
17866
18097
|
dispatch
|
|
17867
18098
|
}
|
|
17868
18099
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17869
|
-
store: store$
|
|
18100
|
+
store: store$9,
|
|
17870
18101
|
key: i
|
|
17871
18102
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17872
|
-
store: store$
|
|
18103
|
+
store: store$9
|
|
17873
18104
|
})));
|
|
17874
18105
|
};
|
|
17875
18106
|
|
|
@@ -17885,7 +18116,7 @@ const PasswordForgotButton = ({
|
|
|
17885
18116
|
emailError
|
|
17886
18117
|
},
|
|
17887
18118
|
dispatch
|
|
17888
|
-
} = React.useContext(store$
|
|
18119
|
+
} = React.useContext(store$9);
|
|
17889
18120
|
const {
|
|
17890
18121
|
t
|
|
17891
18122
|
} = useTranslation("passwordForgot");
|
|
@@ -17906,7 +18137,7 @@ const PasswordForgotButton = ({
|
|
|
17906
18137
|
};
|
|
17907
18138
|
|
|
17908
18139
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17909
|
-
store: store$
|
|
18140
|
+
store: store$9
|
|
17910
18141
|
}, props));
|
|
17911
18142
|
|
|
17912
18143
|
const PasswordForgotView = props => {
|
|
@@ -17956,7 +18187,7 @@ const PasswordForgotModal = ({
|
|
|
17956
18187
|
};
|
|
17957
18188
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17958
18189
|
|
|
17959
|
-
const initialState$
|
|
18190
|
+
const initialState$8 = {
|
|
17960
18191
|
currentPassword: "",
|
|
17961
18192
|
newPassword: "",
|
|
17962
18193
|
confirmNewPassword: "",
|
|
@@ -17970,10 +18201,10 @@ const initialState$7 = {
|
|
|
17970
18201
|
content: ""
|
|
17971
18202
|
}
|
|
17972
18203
|
};
|
|
17973
|
-
const store$
|
|
18204
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
17974
18205
|
const {
|
|
17975
|
-
Provider: Provider$
|
|
17976
|
-
} = store$
|
|
18206
|
+
Provider: Provider$8
|
|
18207
|
+
} = store$8;
|
|
17977
18208
|
const PasswordChangeContainer = ({
|
|
17978
18209
|
style,
|
|
17979
18210
|
className = "",
|
|
@@ -18125,21 +18356,21 @@ const PasswordChangeContainer = ({
|
|
|
18125
18356
|
default:
|
|
18126
18357
|
return state;
|
|
18127
18358
|
}
|
|
18128
|
-
}, initialState$
|
|
18359
|
+
}, initialState$8);
|
|
18129
18360
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18130
18361
|
style: { ...style
|
|
18131
18362
|
},
|
|
18132
18363
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18133
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18364
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
18134
18365
|
value: {
|
|
18135
18366
|
state,
|
|
18136
18367
|
dispatch
|
|
18137
18368
|
}
|
|
18138
18369
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18139
|
-
store: store$
|
|
18370
|
+
store: store$8,
|
|
18140
18371
|
key: i
|
|
18141
18372
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18142
|
-
store: store$
|
|
18373
|
+
store: store$8
|
|
18143
18374
|
})));
|
|
18144
18375
|
};
|
|
18145
18376
|
|
|
@@ -18150,7 +18381,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18150
18381
|
currentPassword,
|
|
18151
18382
|
currentPasswordError
|
|
18152
18383
|
}
|
|
18153
|
-
} = React.useContext(store$
|
|
18384
|
+
} = React.useContext(store$8);
|
|
18154
18385
|
const handleBlur = React.useCallback(() => {
|
|
18155
18386
|
return dispatch({
|
|
18156
18387
|
type: VALIDATE_PASSWORD
|
|
@@ -18184,7 +18415,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18184
18415
|
newPassword,
|
|
18185
18416
|
newPasswordError
|
|
18186
18417
|
}
|
|
18187
|
-
} = React.useContext(store$
|
|
18418
|
+
} = React.useContext(store$8);
|
|
18188
18419
|
const handleBlur = React.useCallback(() => {
|
|
18189
18420
|
return dispatch({
|
|
18190
18421
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18218,7 +18449,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18218
18449
|
confirmNewPassword,
|
|
18219
18450
|
confirmNewPasswordError
|
|
18220
18451
|
}
|
|
18221
|
-
} = React.useContext(store$
|
|
18452
|
+
} = React.useContext(store$8);
|
|
18222
18453
|
const handleBlur = React.useCallback(() => {
|
|
18223
18454
|
return dispatch({
|
|
18224
18455
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18259,7 +18490,7 @@ const PasswordChangeButton = ({
|
|
|
18259
18490
|
confirmNewPasswordError
|
|
18260
18491
|
},
|
|
18261
18492
|
dispatch
|
|
18262
|
-
} = React.useContext(store$
|
|
18493
|
+
} = React.useContext(store$8);
|
|
18263
18494
|
const {
|
|
18264
18495
|
t
|
|
18265
18496
|
} = useTranslation("passwordChange");
|
|
@@ -18325,17 +18556,17 @@ const PasswordChangeModal = ({
|
|
|
18325
18556
|
};
|
|
18326
18557
|
PasswordChangeModal.viewId = "password-change";
|
|
18327
18558
|
|
|
18328
|
-
const initialState$
|
|
18559
|
+
const initialState$7 = {
|
|
18329
18560
|
buttonDisabled: false,
|
|
18330
18561
|
alert: {
|
|
18331
18562
|
type: "error",
|
|
18332
18563
|
content: ""
|
|
18333
18564
|
}
|
|
18334
18565
|
};
|
|
18335
|
-
const store$
|
|
18566
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
18336
18567
|
const {
|
|
18337
|
-
Provider: Provider$
|
|
18338
|
-
} = store$
|
|
18568
|
+
Provider: Provider$7
|
|
18569
|
+
} = store$7;
|
|
18339
18570
|
|
|
18340
18571
|
const CartContainer = ({
|
|
18341
18572
|
style,
|
|
@@ -18426,21 +18657,21 @@ const CartContainer = ({
|
|
|
18426
18657
|
default:
|
|
18427
18658
|
return state;
|
|
18428
18659
|
}
|
|
18429
|
-
}, initialState$
|
|
18660
|
+
}, initialState$7);
|
|
18430
18661
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18431
18662
|
style: { ...style
|
|
18432
18663
|
},
|
|
18433
18664
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18434
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18665
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
18435
18666
|
value: {
|
|
18436
18667
|
state,
|
|
18437
18668
|
dispatch
|
|
18438
18669
|
}
|
|
18439
18670
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18440
|
-
store: store$
|
|
18671
|
+
store: store$7,
|
|
18441
18672
|
key: i
|
|
18442
18673
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18443
|
-
store: store$
|
|
18674
|
+
store: store$7
|
|
18444
18675
|
})));
|
|
18445
18676
|
};
|
|
18446
18677
|
|
|
@@ -18477,7 +18708,7 @@ const CartSubmit = ({
|
|
|
18477
18708
|
buttonDisabled
|
|
18478
18709
|
},
|
|
18479
18710
|
dispatch
|
|
18480
|
-
} = React.useContext(store$
|
|
18711
|
+
} = React.useContext(store$7);
|
|
18481
18712
|
const {
|
|
18482
18713
|
t
|
|
18483
18714
|
} = useTranslation("cart");
|
|
@@ -18508,7 +18739,7 @@ const CartTotalPrice = () => {
|
|
|
18508
18739
|
state: {
|
|
18509
18740
|
alert
|
|
18510
18741
|
}
|
|
18511
|
-
} = React.useContext(store$
|
|
18742
|
+
} = React.useContext(store$7);
|
|
18512
18743
|
const {
|
|
18513
18744
|
cartItems
|
|
18514
18745
|
} = usePelcro();
|
|
@@ -18821,7 +19052,7 @@ const OrderConfirmModal = props => {
|
|
|
18821
19052
|
};
|
|
18822
19053
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18823
19054
|
|
|
18824
|
-
const initialState$
|
|
19055
|
+
const initialState$6 = {
|
|
18825
19056
|
email: "",
|
|
18826
19057
|
firstName: "",
|
|
18827
19058
|
lastName: "",
|
|
@@ -18833,10 +19064,10 @@ const initialState$5 = {
|
|
|
18833
19064
|
content: ""
|
|
18834
19065
|
}
|
|
18835
19066
|
};
|
|
18836
|
-
const store$
|
|
19067
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
18837
19068
|
const {
|
|
18838
|
-
Provider: Provider$
|
|
18839
|
-
} = store$
|
|
19069
|
+
Provider: Provider$6
|
|
19070
|
+
} = store$6;
|
|
18840
19071
|
|
|
18841
19072
|
const GiftCreateContainer = ({
|
|
18842
19073
|
style,
|
|
@@ -18940,21 +19171,21 @@ const GiftCreateContainer = ({
|
|
|
18940
19171
|
default:
|
|
18941
19172
|
return state;
|
|
18942
19173
|
}
|
|
18943
|
-
}, initialState$
|
|
19174
|
+
}, initialState$6);
|
|
18944
19175
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18945
19176
|
style: { ...style
|
|
18946
19177
|
},
|
|
18947
19178
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18948
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19179
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
18949
19180
|
value: {
|
|
18950
19181
|
state,
|
|
18951
19182
|
dispatch
|
|
18952
19183
|
}
|
|
18953
19184
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18954
|
-
store: store$
|
|
19185
|
+
store: store$6,
|
|
18955
19186
|
key: i
|
|
18956
19187
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18957
|
-
store: store$
|
|
19188
|
+
store: store$6
|
|
18958
19189
|
})));
|
|
18959
19190
|
};
|
|
18960
19191
|
|
|
@@ -18968,7 +19199,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18968
19199
|
state: {
|
|
18969
19200
|
disableSubmit
|
|
18970
19201
|
}
|
|
18971
|
-
} = React.useContext(store$
|
|
19202
|
+
} = React.useContext(store$6);
|
|
18972
19203
|
const {
|
|
18973
19204
|
t
|
|
18974
19205
|
} = useTranslation("register");
|
|
@@ -18985,29 +19216,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18985
19216
|
|
|
18986
19217
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
18987
19218
|
initWithUserEmail: false,
|
|
18988
|
-
store: store$
|
|
19219
|
+
store: store$6
|
|
18989
19220
|
}, props));
|
|
18990
19221
|
|
|
18991
19222
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
18992
|
-
store: store$
|
|
19223
|
+
store: store$6
|
|
18993
19224
|
}, props));
|
|
18994
19225
|
|
|
18995
19226
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
18996
|
-
store: store$
|
|
19227
|
+
store: store$6
|
|
18997
19228
|
}, props));
|
|
18998
19229
|
|
|
18999
|
-
var _path$
|
|
19230
|
+
var _path$h;
|
|
19000
19231
|
|
|
19001
|
-
function _extends$
|
|
19232
|
+
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); }
|
|
19002
19233
|
|
|
19003
19234
|
function SvgInfoCircle(props) {
|
|
19004
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
19235
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
19005
19236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19006
19237
|
className: "plc-w-5 plc-h-5",
|
|
19007
19238
|
fill: "none",
|
|
19008
19239
|
viewBox: "0 0 24 24",
|
|
19009
19240
|
stroke: "currentColor"
|
|
19010
|
-
}, props), _path$
|
|
19241
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
19011
19242
|
strokeLinecap: "round",
|
|
19012
19243
|
strokeLinejoin: "round",
|
|
19013
19244
|
strokeWidth: 2,
|
|
@@ -19078,7 +19309,7 @@ const GiftCreateStartDate = props => {
|
|
|
19078
19309
|
const {
|
|
19079
19310
|
dispatch,
|
|
19080
19311
|
state
|
|
19081
|
-
} = React.useContext(store$
|
|
19312
|
+
} = React.useContext(store$6);
|
|
19082
19313
|
|
|
19083
19314
|
const handleInputChange = value => {
|
|
19084
19315
|
dispatch({
|
|
@@ -19149,7 +19380,7 @@ function GiftCreateMessage(props) {
|
|
|
19149
19380
|
const {
|
|
19150
19381
|
dispatch,
|
|
19151
19382
|
state
|
|
19152
|
-
} = React.useContext(store$
|
|
19383
|
+
} = React.useContext(store$6);
|
|
19153
19384
|
|
|
19154
19385
|
const handleInputChange = value => {
|
|
19155
19386
|
dispatch({
|
|
@@ -19269,7 +19500,7 @@ const GiftCreateModal = ({
|
|
|
19269
19500
|
};
|
|
19270
19501
|
GiftCreateModal.viewId = "gift-create";
|
|
19271
19502
|
|
|
19272
|
-
const initialState$
|
|
19503
|
+
const initialState$5 = {
|
|
19273
19504
|
giftCode: "",
|
|
19274
19505
|
buttonDisabled: true,
|
|
19275
19506
|
alert: {
|
|
@@ -19277,10 +19508,10 @@ const initialState$4 = {
|
|
|
19277
19508
|
content: ""
|
|
19278
19509
|
}
|
|
19279
19510
|
};
|
|
19280
|
-
const store$
|
|
19511
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
19281
19512
|
const {
|
|
19282
|
-
Provider: Provider$
|
|
19283
|
-
} = store$
|
|
19513
|
+
Provider: Provider$5
|
|
19514
|
+
} = store$5;
|
|
19284
19515
|
|
|
19285
19516
|
const GiftRedeemContainer = ({
|
|
19286
19517
|
style,
|
|
@@ -19345,21 +19576,21 @@ const GiftRedeemContainer = ({
|
|
|
19345
19576
|
default:
|
|
19346
19577
|
return state;
|
|
19347
19578
|
}
|
|
19348
|
-
}, initialState$
|
|
19579
|
+
}, initialState$5);
|
|
19349
19580
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19350
19581
|
style: { ...style
|
|
19351
19582
|
},
|
|
19352
19583
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19353
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19584
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
19354
19585
|
value: {
|
|
19355
19586
|
state,
|
|
19356
19587
|
dispatch
|
|
19357
19588
|
}
|
|
19358
19589
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19359
|
-
store: store$
|
|
19590
|
+
store: store$5,
|
|
19360
19591
|
key: i
|
|
19361
19592
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19362
|
-
store: store$
|
|
19593
|
+
store: store$5
|
|
19363
19594
|
})));
|
|
19364
19595
|
};
|
|
19365
19596
|
|
|
@@ -19396,7 +19627,7 @@ function GiftCode({
|
|
|
19396
19627
|
}
|
|
19397
19628
|
|
|
19398
19629
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
19399
|
-
store: store$
|
|
19630
|
+
store: store$5
|
|
19400
19631
|
}, props));
|
|
19401
19632
|
|
|
19402
19633
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19409,7 +19640,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19409
19640
|
state: {
|
|
19410
19641
|
disableSubmit
|
|
19411
19642
|
}
|
|
19412
|
-
} = React.useContext(store$
|
|
19643
|
+
} = React.useContext(store$5);
|
|
19413
19644
|
const {
|
|
19414
19645
|
t
|
|
19415
19646
|
} = useTranslation("register");
|
|
@@ -19502,7 +19733,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19502
19733
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19503
19734
|
};
|
|
19504
19735
|
|
|
19505
|
-
const initialState$
|
|
19736
|
+
const initialState$4 = {
|
|
19506
19737
|
addresses: [],
|
|
19507
19738
|
selectedAddressId: null,
|
|
19508
19739
|
isSubmitting: false,
|
|
@@ -19511,10 +19742,10 @@ const initialState$3 = {
|
|
|
19511
19742
|
content: ""
|
|
19512
19743
|
}
|
|
19513
19744
|
};
|
|
19514
|
-
const store$
|
|
19745
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
19515
19746
|
const {
|
|
19516
|
-
Provider: Provider$
|
|
19517
|
-
} = store$
|
|
19747
|
+
Provider: Provider$4
|
|
19748
|
+
} = store$4;
|
|
19518
19749
|
|
|
19519
19750
|
const AddressSelectContainer = ({
|
|
19520
19751
|
style,
|
|
@@ -19609,7 +19840,7 @@ const AddressSelectContainer = ({
|
|
|
19609
19840
|
default:
|
|
19610
19841
|
return state;
|
|
19611
19842
|
}
|
|
19612
|
-
}, initialState$
|
|
19843
|
+
}, initialState$4);
|
|
19613
19844
|
React.useEffect(() => {
|
|
19614
19845
|
var _window$Pelcro$user$r;
|
|
19615
19846
|
|
|
@@ -19622,16 +19853,16 @@ const AddressSelectContainer = ({
|
|
|
19622
19853
|
style: { ...style
|
|
19623
19854
|
},
|
|
19624
19855
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19625
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19856
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
19626
19857
|
value: {
|
|
19627
19858
|
state,
|
|
19628
19859
|
dispatch
|
|
19629
19860
|
}
|
|
19630
19861
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19631
|
-
store: store$
|
|
19862
|
+
store: store$4,
|
|
19632
19863
|
key: i
|
|
19633
19864
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19634
|
-
store: store$
|
|
19865
|
+
store: store$4
|
|
19635
19866
|
})));
|
|
19636
19867
|
};
|
|
19637
19868
|
|
|
@@ -19642,7 +19873,7 @@ const AddressSelectList = () => {
|
|
|
19642
19873
|
addresses,
|
|
19643
19874
|
selectedAddressId
|
|
19644
19875
|
}
|
|
19645
|
-
} = React.useContext(store$
|
|
19876
|
+
} = React.useContext(store$4);
|
|
19646
19877
|
|
|
19647
19878
|
const handleAddressSelect = event => {
|
|
19648
19879
|
dispatch({
|
|
@@ -19686,7 +19917,7 @@ const AddressSelectSubmit = ({
|
|
|
19686
19917
|
selectedAddressId,
|
|
19687
19918
|
isSubmitting
|
|
19688
19919
|
}
|
|
19689
|
-
} = React.useContext(store$
|
|
19920
|
+
} = React.useContext(store$4);
|
|
19690
19921
|
const {
|
|
19691
19922
|
t
|
|
19692
19923
|
} = useTranslation("address");
|
|
@@ -19782,7 +20013,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19782
20013
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19783
20014
|
};
|
|
19784
20015
|
|
|
19785
|
-
const initialState$
|
|
20016
|
+
const initialState$3 = {
|
|
19786
20017
|
paymentMethods: [],
|
|
19787
20018
|
selectedPaymentMethodId: null,
|
|
19788
20019
|
isSubmitting: false,
|
|
@@ -19791,10 +20022,10 @@ const initialState$2 = {
|
|
|
19791
20022
|
content: ""
|
|
19792
20023
|
}
|
|
19793
20024
|
};
|
|
19794
|
-
const store$
|
|
20025
|
+
const store$3 = /*#__PURE__*/React.createContext(initialState$3);
|
|
19795
20026
|
const {
|
|
19796
|
-
Provider: Provider$
|
|
19797
|
-
} = store$
|
|
20027
|
+
Provider: Provider$3
|
|
20028
|
+
} = store$3;
|
|
19798
20029
|
|
|
19799
20030
|
const PaymentMethodSelectContainer = ({
|
|
19800
20031
|
style,
|
|
@@ -19839,7 +20070,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19839
20070
|
default:
|
|
19840
20071
|
return state;
|
|
19841
20072
|
}
|
|
19842
|
-
}, initialState$
|
|
20073
|
+
}, initialState$3);
|
|
19843
20074
|
React.useEffect(() => {
|
|
19844
20075
|
var _window$Pelcro$user$r4;
|
|
19845
20076
|
|
|
@@ -19852,16 +20083,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19852
20083
|
style: { ...style
|
|
19853
20084
|
},
|
|
19854
20085
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19855
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20086
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
|
|
19856
20087
|
value: {
|
|
19857
20088
|
state,
|
|
19858
20089
|
dispatch
|
|
19859
20090
|
}
|
|
19860
20091
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19861
|
-
store: store$
|
|
20092
|
+
store: store$3,
|
|
19862
20093
|
key: i
|
|
19863
20094
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19864
|
-
store: store$
|
|
20095
|
+
store: store$3
|
|
19865
20096
|
})));
|
|
19866
20097
|
};
|
|
19867
20098
|
|
|
@@ -19875,7 +20106,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19875
20106
|
paymentMethods,
|
|
19876
20107
|
selectedPaymentMethodId
|
|
19877
20108
|
}
|
|
19878
|
-
} = React.useContext(store$
|
|
20109
|
+
} = React.useContext(store$3);
|
|
19879
20110
|
|
|
19880
20111
|
const handlePaymentMethodSelect = event => {
|
|
19881
20112
|
dispatch({
|
|
@@ -19925,7 +20156,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19925
20156
|
selectedPaymentMethodId,
|
|
19926
20157
|
isSubmitting
|
|
19927
20158
|
}
|
|
19928
|
-
} = React.useContext(store$
|
|
20159
|
+
} = React.useContext(store$3);
|
|
19929
20160
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19930
20161
|
onClick: () => {
|
|
19931
20162
|
dispatch({
|
|
@@ -19999,8 +20230,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19999
20230
|
};
|
|
20000
20231
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
20001
20232
|
|
|
20002
|
-
function _extends$
|
|
20003
|
-
_extends$
|
|
20233
|
+
function _extends$i() {
|
|
20234
|
+
_extends$i = Object.assign || function (target) {
|
|
20004
20235
|
for (var i = 1; i < arguments.length; i++) {
|
|
20005
20236
|
var source = arguments[i];
|
|
20006
20237
|
|
|
@@ -20014,7 +20245,7 @@ function _extends$h() {
|
|
|
20014
20245
|
return target;
|
|
20015
20246
|
};
|
|
20016
20247
|
|
|
20017
|
-
return _extends$
|
|
20248
|
+
return _extends$i.apply(this, arguments);
|
|
20018
20249
|
}
|
|
20019
20250
|
|
|
20020
20251
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20198,7 +20429,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20198
20429
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20199
20430
|
return null;
|
|
20200
20431
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20201
|
-
return _render(_extends$
|
|
20432
|
+
return _render(_extends$i({}, _rest, {
|
|
20202
20433
|
hidden: true,
|
|
20203
20434
|
style: {
|
|
20204
20435
|
display: 'none'
|
|
@@ -20726,7 +20957,7 @@ function TransitionChild(props) {
|
|
|
20726
20957
|
var passthroughProps = rest;
|
|
20727
20958
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20728
20959
|
value: nesting
|
|
20729
|
-
}, render(_extends$
|
|
20960
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20730
20961
|
}
|
|
20731
20962
|
|
|
20732
20963
|
function Transition(props) {
|
|
@@ -20770,7 +21001,7 @@ function Transition(props) {
|
|
|
20770
21001
|
value: nestingBag
|
|
20771
21002
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20772
21003
|
value: transitionBag
|
|
20773
|
-
}, render(_extends$
|
|
21004
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20774
21005
|
as: React.Fragment,
|
|
20775
21006
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20776
21007
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20897,12 +21128,12 @@ var ActionTypes;
|
|
|
20897
21128
|
})(ActionTypes || (ActionTypes = {}));
|
|
20898
21129
|
|
|
20899
21130
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20900
|
-
return _extends$
|
|
21131
|
+
return _extends$i({}, state, {
|
|
20901
21132
|
activeItemIndex: null,
|
|
20902
21133
|
menuState: MenuStates.Closed
|
|
20903
21134
|
});
|
|
20904
21135
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20905
|
-
return _extends$
|
|
21136
|
+
return _extends$i({}, state, {
|
|
20906
21137
|
menuState: MenuStates.Open
|
|
20907
21138
|
});
|
|
20908
21139
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20921,7 +21152,7 @@ var ActionTypes;
|
|
|
20921
21152
|
}
|
|
20922
21153
|
});
|
|
20923
21154
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20924
|
-
return _extends$
|
|
21155
|
+
return _extends$i({}, state, {
|
|
20925
21156
|
searchQuery: '',
|
|
20926
21157
|
activeItemIndex: activeItemIndex
|
|
20927
21158
|
});
|
|
@@ -20932,19 +21163,19 @@ var ActionTypes;
|
|
|
20932
21163
|
|
|
20933
21164
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20934
21165
|
});
|
|
20935
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21166
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20936
21167
|
searchQuery: searchQuery
|
|
20937
21168
|
});
|
|
20938
|
-
return _extends$
|
|
21169
|
+
return _extends$i({}, state, {
|
|
20939
21170
|
searchQuery: searchQuery,
|
|
20940
21171
|
activeItemIndex: match
|
|
20941
21172
|
});
|
|
20942
21173
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20943
|
-
return _extends$
|
|
21174
|
+
return _extends$i({}, state, {
|
|
20944
21175
|
searchQuery: ''
|
|
20945
21176
|
});
|
|
20946
21177
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20947
|
-
return _extends$
|
|
21178
|
+
return _extends$i({}, state, {
|
|
20948
21179
|
items: [].concat(state.items, [{
|
|
20949
21180
|
id: action.id,
|
|
20950
21181
|
dataRef: action.dataRef
|
|
@@ -20957,7 +21188,7 @@ var ActionTypes;
|
|
|
20957
21188
|
return a.id === action.id;
|
|
20958
21189
|
});
|
|
20959
21190
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20960
|
-
return _extends$
|
|
21191
|
+
return _extends$i({}, state, {
|
|
20961
21192
|
items: nextItems,
|
|
20962
21193
|
activeItemIndex: function () {
|
|
20963
21194
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20996,19 +21227,19 @@ var ActionTypes$1;
|
|
|
20996
21227
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20997
21228
|
if (state.disabled) return state;
|
|
20998
21229
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20999
|
-
return _extends$
|
|
21230
|
+
return _extends$i({}, state, {
|
|
21000
21231
|
activeOptionIndex: null,
|
|
21001
21232
|
listboxState: ListboxStates.Closed
|
|
21002
21233
|
});
|
|
21003
21234
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
21004
21235
|
if (state.disabled) return state;
|
|
21005
21236
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
21006
|
-
return _extends$
|
|
21237
|
+
return _extends$i({}, state, {
|
|
21007
21238
|
listboxState: ListboxStates.Open
|
|
21008
21239
|
});
|
|
21009
21240
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
21010
21241
|
if (state.disabled === action.disabled) return state;
|
|
21011
|
-
return _extends$
|
|
21242
|
+
return _extends$i({}, state, {
|
|
21012
21243
|
disabled: action.disabled
|
|
21013
21244
|
});
|
|
21014
21245
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21029,7 +21260,7 @@ var ActionTypes$1;
|
|
|
21029
21260
|
}
|
|
21030
21261
|
});
|
|
21031
21262
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21032
|
-
return _extends$
|
|
21263
|
+
return _extends$i({}, state, {
|
|
21033
21264
|
searchQuery: '',
|
|
21034
21265
|
activeOptionIndex: activeOptionIndex
|
|
21035
21266
|
});
|
|
@@ -21042,10 +21273,10 @@ var ActionTypes$1;
|
|
|
21042
21273
|
|
|
21043
21274
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21044
21275
|
});
|
|
21045
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21276
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21046
21277
|
searchQuery: searchQuery
|
|
21047
21278
|
});
|
|
21048
|
-
return _extends$
|
|
21279
|
+
return _extends$i({}, state, {
|
|
21049
21280
|
searchQuery: searchQuery,
|
|
21050
21281
|
activeOptionIndex: match
|
|
21051
21282
|
});
|
|
@@ -21053,11 +21284,11 @@ var ActionTypes$1;
|
|
|
21053
21284
|
if (state.disabled) return state;
|
|
21054
21285
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21055
21286
|
if (state.searchQuery === '') return state;
|
|
21056
|
-
return _extends$
|
|
21287
|
+
return _extends$i({}, state, {
|
|
21057
21288
|
searchQuery: ''
|
|
21058
21289
|
});
|
|
21059
21290
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21060
|
-
return _extends$
|
|
21291
|
+
return _extends$i({}, state, {
|
|
21061
21292
|
options: [].concat(state.options, [{
|
|
21062
21293
|
id: action.id,
|
|
21063
21294
|
dataRef: action.dataRef
|
|
@@ -21070,7 +21301,7 @@ var ActionTypes$1;
|
|
|
21070
21301
|
return a.id === action.id;
|
|
21071
21302
|
});
|
|
21072
21303
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21073
|
-
return _extends$
|
|
21304
|
+
return _extends$i({}, state, {
|
|
21074
21305
|
options: nextOptions,
|
|
21075
21306
|
activeOptionIndex: function () {
|
|
21076
21307
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21131,18 +21362,18 @@ const getPaymentCardIcon = name => {
|
|
|
21131
21362
|
}));
|
|
21132
21363
|
};
|
|
21133
21364
|
|
|
21134
|
-
var _path$
|
|
21365
|
+
var _path$g;
|
|
21135
21366
|
|
|
21136
|
-
function _extends$
|
|
21367
|
+
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); }
|
|
21137
21368
|
|
|
21138
21369
|
function SvgChevronRight(props) {
|
|
21139
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21370
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
21140
21371
|
className: "plc-w-6 plc-h-6",
|
|
21141
21372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21142
21373
|
fill: "none",
|
|
21143
21374
|
viewBox: "0 0 24 24",
|
|
21144
21375
|
stroke: "currentColor"
|
|
21145
|
-
}, props), _path$
|
|
21376
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21146
21377
|
strokeLinecap: "round",
|
|
21147
21378
|
strokeLinejoin: "round",
|
|
21148
21379
|
strokeWidth: 2,
|
|
@@ -21358,18 +21589,18 @@ const SavedItems = ({
|
|
|
21358
21589
|
});
|
|
21359
21590
|
};
|
|
21360
21591
|
|
|
21361
|
-
var _path$
|
|
21592
|
+
var _path$f;
|
|
21362
21593
|
|
|
21363
|
-
function _extends$
|
|
21594
|
+
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); }
|
|
21364
21595
|
|
|
21365
21596
|
function SvgRefresh(props) {
|
|
21366
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21597
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
21367
21598
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21368
21599
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21369
21600
|
fill: "none",
|
|
21370
21601
|
viewBox: "0 0 24 24",
|
|
21371
21602
|
stroke: "currentColor"
|
|
21372
|
-
}, props), _path$
|
|
21603
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21373
21604
|
strokeLinecap: "round",
|
|
21374
21605
|
strokeLinejoin: "round",
|
|
21375
21606
|
strokeWidth: 2,
|
|
@@ -21377,35 +21608,35 @@ function SvgRefresh(props) {
|
|
|
21377
21608
|
})));
|
|
21378
21609
|
}
|
|
21379
21610
|
|
|
21380
|
-
var _path$
|
|
21611
|
+
var _path$e;
|
|
21381
21612
|
|
|
21382
|
-
function _extends$
|
|
21613
|
+
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); }
|
|
21383
21614
|
|
|
21384
21615
|
function SvgCalendar(props) {
|
|
21385
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21616
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
21386
21617
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21387
21618
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21388
21619
|
viewBox: "0 0 20 20",
|
|
21389
21620
|
fill: "currentColor"
|
|
21390
|
-
}, props), _path$
|
|
21621
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21391
21622
|
fillRule: "evenodd",
|
|
21392
21623
|
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",
|
|
21393
21624
|
clipRule: "evenodd"
|
|
21394
21625
|
})));
|
|
21395
21626
|
}
|
|
21396
21627
|
|
|
21397
|
-
var _path$
|
|
21628
|
+
var _path$d;
|
|
21398
21629
|
|
|
21399
|
-
function _extends$
|
|
21630
|
+
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); }
|
|
21400
21631
|
|
|
21401
21632
|
function SvgPlus(props) {
|
|
21402
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21633
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21403
21634
|
className: "plc-w-5 plc-h-5",
|
|
21404
21635
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21405
21636
|
fill: "none",
|
|
21406
21637
|
viewBox: "0 0 24 24",
|
|
21407
21638
|
stroke: "currentColor"
|
|
21408
|
-
}, props), _path$
|
|
21639
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21409
21640
|
strokeLinecap: "round",
|
|
21410
21641
|
strokeLinejoin: "round",
|
|
21411
21642
|
strokeWidth: 2,
|
|
@@ -21413,17 +21644,17 @@ function SvgPlus(props) {
|
|
|
21413
21644
|
})));
|
|
21414
21645
|
}
|
|
21415
21646
|
|
|
21416
|
-
var _path$
|
|
21647
|
+
var _path$c;
|
|
21417
21648
|
|
|
21418
|
-
function _extends$
|
|
21649
|
+
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); }
|
|
21419
21650
|
|
|
21420
21651
|
function SvgCheckMark(props) {
|
|
21421
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21652
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21422
21653
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21423
21654
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21424
21655
|
viewBox: "0 0 20 20",
|
|
21425
21656
|
fill: "currentColor"
|
|
21426
|
-
}, props), _path$
|
|
21657
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21427
21658
|
fillRule: "evenodd",
|
|
21428
21659
|
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",
|
|
21429
21660
|
clipRule: "evenodd"
|
|
@@ -21718,18 +21949,18 @@ Accordion.item = function AccordionItem({
|
|
|
21718
21949
|
}, content)) : null;
|
|
21719
21950
|
};
|
|
21720
21951
|
|
|
21721
|
-
var _path$
|
|
21952
|
+
var _path$b;
|
|
21722
21953
|
|
|
21723
|
-
function _extends$
|
|
21954
|
+
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); }
|
|
21724
21955
|
|
|
21725
21956
|
function SvgExit(props) {
|
|
21726
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21957
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
21727
21958
|
className: "plc-w-6 plc-h-6",
|
|
21728
21959
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21729
21960
|
fill: "none",
|
|
21730
21961
|
viewBox: "0 0 24 24",
|
|
21731
21962
|
stroke: "currentColor"
|
|
21732
|
-
}, props), _path$
|
|
21963
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21733
21964
|
strokeLinecap: "round",
|
|
21734
21965
|
strokeLinejoin: "round",
|
|
21735
21966
|
strokeWidth: 2,
|
|
@@ -21737,13 +21968,32 @@ function SvgExit(props) {
|
|
|
21737
21968
|
})));
|
|
21738
21969
|
}
|
|
21739
21970
|
|
|
21971
|
+
var _path$a;
|
|
21972
|
+
|
|
21973
|
+
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); }
|
|
21974
|
+
|
|
21975
|
+
function SvgUser(props) {
|
|
21976
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21977
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21978
|
+
fill: "none",
|
|
21979
|
+
viewBox: "0 0 24 24",
|
|
21980
|
+
stroke: "currentColor"
|
|
21981
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21982
|
+
strokeLinecap: "round",
|
|
21983
|
+
strokeLinejoin: "round",
|
|
21984
|
+
strokeWidth: 2,
|
|
21985
|
+
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"
|
|
21986
|
+
})));
|
|
21987
|
+
}
|
|
21988
|
+
|
|
21740
21989
|
var _path$9;
|
|
21741
21990
|
|
|
21742
21991
|
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); }
|
|
21743
21992
|
|
|
21744
|
-
function
|
|
21993
|
+
function SvgNewsletter(props) {
|
|
21745
21994
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21746
21995
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21996
|
+
className: "plc-h-5 plc-w-5",
|
|
21747
21997
|
fill: "none",
|
|
21748
21998
|
viewBox: "0 0 24 24",
|
|
21749
21999
|
stroke: "currentColor"
|
|
@@ -21751,7 +22001,7 @@ function SvgUser(props) {
|
|
|
21751
22001
|
strokeLinecap: "round",
|
|
21752
22002
|
strokeLinejoin: "round",
|
|
21753
22003
|
strokeWidth: 2,
|
|
21754
|
-
d: "
|
|
22004
|
+
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"
|
|
21755
22005
|
})));
|
|
21756
22006
|
}
|
|
21757
22007
|
|
|
@@ -21759,10 +22009,10 @@ var _path$8;
|
|
|
21759
22009
|
|
|
21760
22010
|
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); }
|
|
21761
22011
|
|
|
21762
|
-
function
|
|
22012
|
+
function SvgDocument(props) {
|
|
21763
22013
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21764
22014
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21765
|
-
className: "plc-h-
|
|
22015
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21766
22016
|
fill: "none",
|
|
21767
22017
|
viewBox: "0 0 24 24",
|
|
21768
22018
|
stroke: "currentColor"
|
|
@@ -21770,7 +22020,7 @@ function SvgNewsletter(props) {
|
|
|
21770
22020
|
strokeLinecap: "round",
|
|
21771
22021
|
strokeLinejoin: "round",
|
|
21772
22022
|
strokeWidth: 2,
|
|
21773
|
-
d: "
|
|
22023
|
+
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"
|
|
21774
22024
|
})));
|
|
21775
22025
|
}
|
|
21776
22026
|
|
|
@@ -21948,6 +22198,130 @@ function formatStartDate(date) {
|
|
|
21948
22198
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21949
22199
|
}
|
|
21950
22200
|
|
|
22201
|
+
const InvoicesMenu = props => {
|
|
22202
|
+
const {
|
|
22203
|
+
t
|
|
22204
|
+
} = useTranslation("dashboard");
|
|
22205
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
22206
|
+
className: "plc-w-full plc-table-fixed"
|
|
22207
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
22208
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22209
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22210
|
+
className: "plc-w-4/12 "
|
|
22211
|
+
}, t("labels.details")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22212
|
+
className: "plc-w-4/12 "
|
|
22213
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22214
|
+
className: "plc-w-3/12 "
|
|
22215
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22216
|
+
className: "plc-h-4"
|
|
22217
|
+
}), /*#__PURE__*/React__default['default'].createElement(InvoicesItems, props)));
|
|
22218
|
+
};
|
|
22219
|
+
|
|
22220
|
+
const InvoicesItems = () => {
|
|
22221
|
+
var _window$Pelcro$invoic;
|
|
22222
|
+
|
|
22223
|
+
const {
|
|
22224
|
+
t
|
|
22225
|
+
} = useTranslation("dashboard");
|
|
22226
|
+
const {
|
|
22227
|
+
setInvoice,
|
|
22228
|
+
switchView
|
|
22229
|
+
} = usePelcro();
|
|
22230
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22231
|
+
|
|
22232
|
+
const showInvoiceDetails = event => {
|
|
22233
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22234
|
+
switchView("invoice-details");
|
|
22235
|
+
}
|
|
22236
|
+
};
|
|
22237
|
+
|
|
22238
|
+
if (invoices.length === 0) return null;
|
|
22239
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22240
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22241
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22242
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22243
|
+
key: invoice.id,
|
|
22244
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22245
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22246
|
+
className: "plc-truncate"
|
|
22247
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22248
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22249
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22250
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22251
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22252
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22253
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22254
|
+
className: "plc-py-2"
|
|
22255
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22256
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22257
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
22258
|
+
variant: "ghost",
|
|
22259
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22260
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, {
|
|
22261
|
+
className: "plc-w-4 plc-h-4"
|
|
22262
|
+
}),
|
|
22263
|
+
onClick: showInvoiceDetails,
|
|
22264
|
+
"data-id": invoice.id
|
|
22265
|
+
}, t("labels.view"))));
|
|
22266
|
+
});
|
|
22267
|
+
};
|
|
22268
|
+
|
|
22269
|
+
function getInvoiceStatus(invoice) {
|
|
22270
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22271
|
+
returnObjects: true
|
|
22272
|
+
});
|
|
22273
|
+
|
|
22274
|
+
switch (invoice.status) {
|
|
22275
|
+
case "paid":
|
|
22276
|
+
return {
|
|
22277
|
+
textColor: "plc-text-green-700",
|
|
22278
|
+
bgColor: "plc-bg-green-100",
|
|
22279
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null),
|
|
22280
|
+
title: translations.paid
|
|
22281
|
+
};
|
|
22282
|
+
|
|
22283
|
+
case "past_due":
|
|
22284
|
+
return {
|
|
22285
|
+
textColor: "plc-text-orange-700",
|
|
22286
|
+
bgColor: "plc-bg-orange-100",
|
|
22287
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22288
|
+
title: translations.pastDue
|
|
22289
|
+
};
|
|
22290
|
+
|
|
22291
|
+
case "open":
|
|
22292
|
+
return {
|
|
22293
|
+
textColor: "plc-text-yellow-700",
|
|
22294
|
+
bgColor: "plc-bg-yellow-100",
|
|
22295
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22296
|
+
title: translations.open
|
|
22297
|
+
};
|
|
22298
|
+
|
|
22299
|
+
case "draft":
|
|
22300
|
+
return {
|
|
22301
|
+
textColor: "plc-text-blue-700",
|
|
22302
|
+
bgColor: "plc-bg-blue-100",
|
|
22303
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
22304
|
+
title: translations.draft
|
|
22305
|
+
};
|
|
22306
|
+
|
|
22307
|
+
case "uncollectible":
|
|
22308
|
+
return {
|
|
22309
|
+
textColor: "plc-text-red-700",
|
|
22310
|
+
bgColor: "plc-bg-red-100",
|
|
22311
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22312
|
+
title: translations.uncollectible
|
|
22313
|
+
};
|
|
22314
|
+
|
|
22315
|
+
case "void":
|
|
22316
|
+
return {
|
|
22317
|
+
textColor: "plc-text-gray-700",
|
|
22318
|
+
bgColor: "plc-bg-gray-100",
|
|
22319
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22320
|
+
title: translations.void
|
|
22321
|
+
};
|
|
22322
|
+
}
|
|
22323
|
+
}
|
|
22324
|
+
|
|
21951
22325
|
const SUB_MENUS = {
|
|
21952
22326
|
PROFILE: "profile",
|
|
21953
22327
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21956,6 +22330,7 @@ const SUB_MENUS = {
|
|
|
21956
22330
|
ADDRESSES: "addresses",
|
|
21957
22331
|
GIFTS: "gifts",
|
|
21958
22332
|
ORDERS: "orders",
|
|
22333
|
+
INVOICES: "invoices",
|
|
21959
22334
|
SAVED_ITEMS: "saved-items"
|
|
21960
22335
|
};
|
|
21961
22336
|
/**
|
|
@@ -22498,6 +22873,12 @@ class Dashboard extends React.Component {
|
|
|
22498
22873
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
|
|
22499
22874
|
title: this.locale("labels.orders.label"),
|
|
22500
22875
|
content: /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null)
|
|
22876
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22877
|
+
show: hasInvoices(),
|
|
22878
|
+
name: SUB_MENUS.INVOICES,
|
|
22879
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
|
|
22880
|
+
title: this.locale("labels.invoices"),
|
|
22881
|
+
content: /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null)
|
|
22501
22882
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22502
22883
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22503
22884
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -22513,6 +22894,13 @@ class Dashboard extends React.Component {
|
|
|
22513
22894
|
|
|
22514
22895
|
}
|
|
22515
22896
|
|
|
22897
|
+
function hasInvoices() {
|
|
22898
|
+
var _window$Pelcro$invoic;
|
|
22899
|
+
|
|
22900
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22901
|
+
return invoices.length > 0;
|
|
22902
|
+
}
|
|
22903
|
+
|
|
22516
22904
|
function hasDonationSubs() {
|
|
22517
22905
|
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22518
22906
|
|
|
@@ -22547,7 +22935,7 @@ const DashboardOpenButton = () => {
|
|
|
22547
22935
|
};
|
|
22548
22936
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22549
22937
|
|
|
22550
|
-
const initialState$
|
|
22938
|
+
const initialState$2 = {
|
|
22551
22939
|
imageSrc: null,
|
|
22552
22940
|
crop: {
|
|
22553
22941
|
x: 0,
|
|
@@ -22561,10 +22949,10 @@ const initialState$1 = {
|
|
|
22561
22949
|
content: ""
|
|
22562
22950
|
}
|
|
22563
22951
|
};
|
|
22564
|
-
const store$
|
|
22952
|
+
const store$2 = /*#__PURE__*/React.createContext(initialState$2);
|
|
22565
22953
|
const {
|
|
22566
|
-
Provider: Provider$
|
|
22567
|
-
} = store$
|
|
22954
|
+
Provider: Provider$2
|
|
22955
|
+
} = store$2;
|
|
22568
22956
|
|
|
22569
22957
|
const ProfilePicChangeContainer = ({
|
|
22570
22958
|
style,
|
|
@@ -22698,21 +23086,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22698
23086
|
default:
|
|
22699
23087
|
return state;
|
|
22700
23088
|
}
|
|
22701
|
-
}, initialState$
|
|
23089
|
+
}, initialState$2);
|
|
22702
23090
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22703
23091
|
style: { ...style
|
|
22704
23092
|
},
|
|
22705
23093
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22706
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23094
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
|
|
22707
23095
|
value: {
|
|
22708
23096
|
state,
|
|
22709
23097
|
dispatch
|
|
22710
23098
|
}
|
|
22711
23099
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22712
|
-
store: store$
|
|
23100
|
+
store: store$2,
|
|
22713
23101
|
key: i
|
|
22714
23102
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22715
|
-
store: store$
|
|
23103
|
+
store: store$2
|
|
22716
23104
|
})));
|
|
22717
23105
|
};
|
|
22718
23106
|
/**
|
|
@@ -22774,7 +23162,7 @@ const ProfilePicChangeButton = ({
|
|
|
22774
23162
|
isSubmitting
|
|
22775
23163
|
},
|
|
22776
23164
|
dispatch
|
|
22777
|
-
} = React.useContext(store$
|
|
23165
|
+
} = React.useContext(store$2);
|
|
22778
23166
|
const {
|
|
22779
23167
|
t
|
|
22780
23168
|
} = useTranslation("userEdit");
|
|
@@ -24142,7 +24530,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24142
24530
|
zoom
|
|
24143
24531
|
},
|
|
24144
24532
|
dispatch
|
|
24145
|
-
} = React.useContext(store$
|
|
24533
|
+
} = React.useContext(store$2);
|
|
24146
24534
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24147
24535
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24148
24536
|
}, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
|
|
@@ -24184,7 +24572,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24184
24572
|
zoom
|
|
24185
24573
|
},
|
|
24186
24574
|
dispatch
|
|
24187
|
-
} = React.useContext(store$
|
|
24575
|
+
} = React.useContext(store$2);
|
|
24188
24576
|
const {
|
|
24189
24577
|
t
|
|
24190
24578
|
} = useTranslation("userEdit");
|
|
@@ -24236,7 +24624,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24236
24624
|
state: {
|
|
24237
24625
|
isSubmitting
|
|
24238
24626
|
}
|
|
24239
|
-
} = React.useContext(store$
|
|
24627
|
+
} = React.useContext(store$2);
|
|
24240
24628
|
const {
|
|
24241
24629
|
t
|
|
24242
24630
|
} = useTranslation("userEdit");
|
|
@@ -24278,7 +24666,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24278
24666
|
state: {
|
|
24279
24667
|
isSubmitting
|
|
24280
24668
|
}
|
|
24281
|
-
} = React.useContext(store$
|
|
24669
|
+
} = React.useContext(store$2);
|
|
24282
24670
|
const {
|
|
24283
24671
|
t
|
|
24284
24672
|
} = useTranslation("userEdit");
|
|
@@ -24301,7 +24689,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24301
24689
|
state: {
|
|
24302
24690
|
imageSrc
|
|
24303
24691
|
}
|
|
24304
|
-
} = React.useContext(store$
|
|
24692
|
+
} = React.useContext(store$2);
|
|
24305
24693
|
const {
|
|
24306
24694
|
t
|
|
24307
24695
|
} = useTranslation("userEdit");
|
|
@@ -24363,17 +24751,17 @@ function ProfilePicChangeModal({
|
|
|
24363
24751
|
}
|
|
24364
24752
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24365
24753
|
|
|
24366
|
-
const initialState = {
|
|
24754
|
+
const initialState$1 = {
|
|
24367
24755
|
isSubmitting: false,
|
|
24368
24756
|
alert: {
|
|
24369
24757
|
type: "error",
|
|
24370
24758
|
content: ""
|
|
24371
24759
|
}
|
|
24372
24760
|
};
|
|
24373
|
-
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24761
|
+
const store$1 = /*#__PURE__*/React.createContext(initialState$1);
|
|
24374
24762
|
const {
|
|
24375
|
-
Provider
|
|
24376
|
-
} = store;
|
|
24763
|
+
Provider: Provider$1
|
|
24764
|
+
} = store$1;
|
|
24377
24765
|
|
|
24378
24766
|
const EmailVerifyContainer = ({
|
|
24379
24767
|
style,
|
|
@@ -24436,21 +24824,21 @@ const EmailVerifyContainer = ({
|
|
|
24436
24824
|
default:
|
|
24437
24825
|
return state;
|
|
24438
24826
|
}
|
|
24439
|
-
}, initialState);
|
|
24827
|
+
}, initialState$1);
|
|
24440
24828
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24441
24829
|
style: { ...style
|
|
24442
24830
|
},
|
|
24443
24831
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24444
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
24832
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
|
|
24445
24833
|
value: {
|
|
24446
24834
|
state,
|
|
24447
24835
|
dispatch
|
|
24448
24836
|
}
|
|
24449
24837
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24450
|
-
store,
|
|
24838
|
+
store: store$1,
|
|
24451
24839
|
key: i
|
|
24452
24840
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24453
|
-
store
|
|
24841
|
+
store: store$1
|
|
24454
24842
|
})));
|
|
24455
24843
|
};
|
|
24456
24844
|
|
|
@@ -24464,7 +24852,7 @@ const EmailVerifyResendButton = ({
|
|
|
24464
24852
|
state: {
|
|
24465
24853
|
isSubmitting
|
|
24466
24854
|
}
|
|
24467
|
-
} = React.useContext(store);
|
|
24855
|
+
} = React.useContext(store$1);
|
|
24468
24856
|
const {
|
|
24469
24857
|
t
|
|
24470
24858
|
} = useTranslation("verifyEmail");
|
|
@@ -24539,6 +24927,235 @@ const EmailVerifyModal = ({
|
|
|
24539
24927
|
};
|
|
24540
24928
|
EmailVerifyModal.viewId = "email-verify";
|
|
24541
24929
|
|
|
24930
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
24931
|
+
type: "invoicePayment",
|
|
24932
|
+
className: "pelcro-invoice-payment-container"
|
|
24933
|
+
}, props));
|
|
24934
|
+
|
|
24935
|
+
const InvoicePaymentView = props => {
|
|
24936
|
+
const {
|
|
24937
|
+
t
|
|
24938
|
+
} = useTranslation("payment");
|
|
24939
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24940
|
+
id: "pelcro-invoice-payment-view"
|
|
24941
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24942
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24943
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
24944
|
+
action: "javascript:void(0);",
|
|
24945
|
+
className: "plc-mt-2 pelcro-form"
|
|
24946
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
|
|
24947
|
+
type: "invoicePayment",
|
|
24948
|
+
showCoupon: false,
|
|
24949
|
+
showExternalPaymentMethods: true
|
|
24950
|
+
}, props))));
|
|
24951
|
+
};
|
|
24952
|
+
|
|
24953
|
+
const InvoicePaymentModal = ({
|
|
24954
|
+
onDisplay,
|
|
24955
|
+
onClose,
|
|
24956
|
+
...otherProps
|
|
24957
|
+
}) => {
|
|
24958
|
+
const {
|
|
24959
|
+
switchView
|
|
24960
|
+
} = usePelcro();
|
|
24961
|
+
|
|
24962
|
+
const onSuccess = () => {
|
|
24963
|
+
var _otherProps$onSuccess;
|
|
24964
|
+
|
|
24965
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
24966
|
+
return switchView("subscription-success");
|
|
24967
|
+
};
|
|
24968
|
+
|
|
24969
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
24970
|
+
id: "pelcro-invoice-payment-modal",
|
|
24971
|
+
onDisplay: onDisplay,
|
|
24972
|
+
onClose: onClose
|
|
24973
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
24974
|
+
onSuccess: onSuccess
|
|
24975
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
24976
|
+
};
|
|
24977
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
24978
|
+
|
|
24979
|
+
const invoicePaymentSubmitButton = props => {
|
|
24980
|
+
return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
|
|
24981
|
+
};
|
|
24982
|
+
|
|
24983
|
+
const initialState = {};
|
|
24984
|
+
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24985
|
+
const {
|
|
24986
|
+
Provider
|
|
24987
|
+
} = store;
|
|
24988
|
+
|
|
24989
|
+
const InvoiceDetailsContainer = ({
|
|
24990
|
+
style,
|
|
24991
|
+
className = "",
|
|
24992
|
+
onSuccess = () => {},
|
|
24993
|
+
children,
|
|
24994
|
+
...props
|
|
24995
|
+
}) => {
|
|
24996
|
+
const onPayButtonClick = () => {
|
|
24997
|
+
return onSuccess();
|
|
24998
|
+
};
|
|
24999
|
+
|
|
25000
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
25001
|
+
switch (action.type) {
|
|
25002
|
+
case HANDLE_SUBMIT:
|
|
25003
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
25004
|
+
|
|
25005
|
+
default:
|
|
25006
|
+
return state;
|
|
25007
|
+
}
|
|
25008
|
+
}, initialState);
|
|
25009
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25010
|
+
style: { ...style
|
|
25011
|
+
},
|
|
25012
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25013
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25014
|
+
value: {
|
|
25015
|
+
state,
|
|
25016
|
+
dispatch
|
|
25017
|
+
}
|
|
25018
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25019
|
+
store,
|
|
25020
|
+
key: i
|
|
25021
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25022
|
+
store
|
|
25023
|
+
})));
|
|
25024
|
+
};
|
|
25025
|
+
|
|
25026
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25027
|
+
name,
|
|
25028
|
+
url,
|
|
25029
|
+
className,
|
|
25030
|
+
...otherProps
|
|
25031
|
+
}) => {
|
|
25032
|
+
const {
|
|
25033
|
+
t
|
|
25034
|
+
} = useTranslation("invoiceDetails");
|
|
25035
|
+
const {
|
|
25036
|
+
invoice
|
|
25037
|
+
} = usePelcro();
|
|
25038
|
+
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
25039
|
+
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}`,
|
|
25040
|
+
id: "pelcro-download-invoice-link",
|
|
25041
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25042
|
+
target: "_blank",
|
|
25043
|
+
rel: "noopener noreferrer"
|
|
25044
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25045
|
+
};
|
|
25046
|
+
|
|
25047
|
+
const InvoiceDetailsPayButton = ({
|
|
25048
|
+
name,
|
|
25049
|
+
onClick,
|
|
25050
|
+
...otherProps
|
|
25051
|
+
}) => {
|
|
25052
|
+
const {
|
|
25053
|
+
dispatch
|
|
25054
|
+
} = React.useContext(store);
|
|
25055
|
+
const {
|
|
25056
|
+
t
|
|
25057
|
+
} = useTranslation("invoiceDetails");
|
|
25058
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
25059
|
+
onClick: () => {
|
|
25060
|
+
dispatch({
|
|
25061
|
+
type: HANDLE_SUBMIT
|
|
25062
|
+
});
|
|
25063
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25064
|
+
}
|
|
25065
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25066
|
+
};
|
|
25067
|
+
|
|
25068
|
+
const InvoiceDetailsView = props => {
|
|
25069
|
+
const {
|
|
25070
|
+
t
|
|
25071
|
+
} = useTranslation("invoiceDetails");
|
|
25072
|
+
const {
|
|
25073
|
+
invoice
|
|
25074
|
+
} = usePelcro();
|
|
25075
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25076
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25077
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25078
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25079
|
+
id: "pelcro-invoice-details-view"
|
|
25080
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25081
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25082
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25083
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25084
|
+
}, t("title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25085
|
+
action: "javascript:void(0);",
|
|
25086
|
+
className: "plc-mt-2 pelcro-form"
|
|
25087
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25088
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25089
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25090
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25091
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25092
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25093
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25094
|
+
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"
|
|
25095
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25096
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25097
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25098
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25099
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25100
|
+
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"
|
|
25101
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25102
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25103
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25104
|
+
className: "pelcro-invoice-total-text"
|
|
25105
|
+
}, t("labels.total")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25106
|
+
className: "pelcro-invoice-total-text"
|
|
25107
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25108
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25109
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25110
|
+
className: "plc-flex plc-flex-col"
|
|
25111
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25112
|
+
className: "pelcro-invoice-total"
|
|
25113
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25114
|
+
className: "pelcro-invoice-total"
|
|
25115
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25116
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25117
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25118
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25119
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsDownloadButton, {
|
|
25120
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25121
|
+
className: "plc-w-full plc-text-center"
|
|
25122
|
+
}), showPayButton && /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsPayButton, {
|
|
25123
|
+
role: "submit",
|
|
25124
|
+
className: "plc-ml-4 plc-w-full",
|
|
25125
|
+
id: "pelcro-submit"
|
|
25126
|
+
})))));
|
|
25127
|
+
};
|
|
25128
|
+
|
|
25129
|
+
function canPayInvoice(invoice) {
|
|
25130
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25131
|
+
}
|
|
25132
|
+
|
|
25133
|
+
const InvoiceDetailsModal = ({
|
|
25134
|
+
onDisplay,
|
|
25135
|
+
onClose,
|
|
25136
|
+
...otherProps
|
|
25137
|
+
}) => {
|
|
25138
|
+
const {
|
|
25139
|
+
switchToPaymentView
|
|
25140
|
+
} = usePelcro();
|
|
25141
|
+
|
|
25142
|
+
const onSuccess = () => {
|
|
25143
|
+
var _otherProps$onSuccess;
|
|
25144
|
+
|
|
25145
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25146
|
+
switchToPaymentView();
|
|
25147
|
+
};
|
|
25148
|
+
|
|
25149
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25150
|
+
onDisplay: onDisplay,
|
|
25151
|
+
onClose: onClose,
|
|
25152
|
+
id: "pelcro-invoice-details-modal"
|
|
25153
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25154
|
+
onSuccess: onSuccess
|
|
25155
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25156
|
+
};
|
|
25157
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25158
|
+
|
|
24542
25159
|
exports.AddressCreateCity = AddressCreateCity;
|
|
24543
25160
|
exports.AddressCreateContainer = AddressCreateContainer;
|
|
24544
25161
|
exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
|
|
@@ -24614,6 +25231,14 @@ exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
|
|
|
24614
25231
|
exports.GiftRedeemView = GiftRedeemView;
|
|
24615
25232
|
exports.GoogleLoginButton = GoogleLoginButton;
|
|
24616
25233
|
exports.Input = Input;
|
|
25234
|
+
exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
|
|
25235
|
+
exports.InvoiceDetailsDownloadButton = InvoiceDetailsDownloadButton;
|
|
25236
|
+
exports.InvoiceDetailsModal = InvoiceDetailsModal;
|
|
25237
|
+
exports.InvoiceDetailsPayButton = InvoiceDetailsPayButton;
|
|
25238
|
+
exports.InvoiceDetailsView = InvoiceDetailsView;
|
|
25239
|
+
exports.InvoicePaymentContainer = InvoicePaymentContainer;
|
|
25240
|
+
exports.InvoicePaymentModal = InvoicePaymentModal;
|
|
25241
|
+
exports.InvoicePaymentView = InvoicePaymentView;
|
|
24617
25242
|
exports.Link = Link;
|
|
24618
25243
|
exports.LoginButton = LoginButton;
|
|
24619
25244
|
exports.LoginContainer = LoginContainer;
|
|
@@ -24729,6 +25354,7 @@ exports.authenticatedButtons = authenticatedButtons;
|
|
|
24729
25354
|
exports.i18n = i18next;
|
|
24730
25355
|
exports.initButtons = init$1;
|
|
24731
25356
|
exports.initContentEntitlement = init;
|
|
25357
|
+
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
24732
25358
|
exports.notify = notify;
|
|
24733
25359
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
24734
25360
|
exports.usePelcro = usePelcro;
|