@pelcro/react-pelcro-js 3.0.0-beta.3 → 3.0.0-beta.4
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 +1102 -480
- package/dist/index.esm.js +1094 -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,28 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
9005
9102
|
});
|
|
9006
9103
|
};
|
|
9007
9104
|
|
|
9105
|
+
const showInvoiceDetailsFromUrl = () => {
|
|
9106
|
+
const {
|
|
9107
|
+
isAuthenticated,
|
|
9108
|
+
setInvoice,
|
|
9109
|
+
switchView
|
|
9110
|
+
} = usePelcro.getStore();
|
|
9111
|
+
|
|
9112
|
+
if (!isAuthenticated()) {
|
|
9113
|
+
return switchView("login");
|
|
9114
|
+
}
|
|
9115
|
+
|
|
9116
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9117
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9118
|
+
|
|
9119
|
+
if (!wasSetSuccessfully) {
|
|
9120
|
+
const translations = i18next.t("messages", {
|
|
9121
|
+
returnObjects: true
|
|
9122
|
+
});
|
|
9123
|
+
notify.error(translations.invalidInvoice);
|
|
9124
|
+
}
|
|
9125
|
+
};
|
|
9126
|
+
|
|
9008
9127
|
const defaultOptions = {
|
|
9009
9128
|
loadPaymentSDKs: true,
|
|
9010
9129
|
loadAuth0SDK: true,
|
|
@@ -9344,7 +9463,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9344
9463
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9345
9464
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9346
9465
|
|
|
9347
|
-
const initialState$
|
|
9466
|
+
const initialState$h = {
|
|
9348
9467
|
email: "",
|
|
9349
9468
|
password: "",
|
|
9350
9469
|
emailError: null,
|
|
@@ -9355,10 +9474,10 @@ const initialState$g = {
|
|
|
9355
9474
|
content: ""
|
|
9356
9475
|
}
|
|
9357
9476
|
};
|
|
9358
|
-
const store$
|
|
9477
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
9359
9478
|
const {
|
|
9360
|
-
Provider: Provider$
|
|
9361
|
-
} = store$
|
|
9479
|
+
Provider: Provider$h
|
|
9480
|
+
} = store$h;
|
|
9362
9481
|
|
|
9363
9482
|
const LoginContainer = ({
|
|
9364
9483
|
style,
|
|
@@ -9465,7 +9584,7 @@ const LoginContainer = ({
|
|
|
9465
9584
|
});
|
|
9466
9585
|
|
|
9467
9586
|
case RESET_LOGIN_FORM:
|
|
9468
|
-
return initialState$
|
|
9587
|
+
return initialState$h;
|
|
9469
9588
|
|
|
9470
9589
|
case DISABLE_LOGIN_BUTTON:
|
|
9471
9590
|
return lib_7({ ...state,
|
|
@@ -9483,12 +9602,12 @@ const LoginContainer = ({
|
|
|
9483
9602
|
default:
|
|
9484
9603
|
return state;
|
|
9485
9604
|
}
|
|
9486
|
-
}, initialState$
|
|
9605
|
+
}, initialState$h);
|
|
9487
9606
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9488
9607
|
style: { ...style
|
|
9489
9608
|
},
|
|
9490
9609
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9491
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
9610
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
9492
9611
|
value: {
|
|
9493
9612
|
state,
|
|
9494
9613
|
dispatch
|
|
@@ -9496,12 +9615,12 @@ const LoginContainer = ({
|
|
|
9496
9615
|
}, children.length ? children.map((child, i) => {
|
|
9497
9616
|
if (child) {
|
|
9498
9617
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
9499
|
-
store: store$
|
|
9618
|
+
store: store$h,
|
|
9500
9619
|
key: i
|
|
9501
9620
|
});
|
|
9502
9621
|
}
|
|
9503
9622
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
9504
|
-
store: store$
|
|
9623
|
+
store: store$h
|
|
9505
9624
|
})));
|
|
9506
9625
|
};
|
|
9507
9626
|
|
|
@@ -9746,7 +9865,7 @@ const LoginButton = ({
|
|
|
9746
9865
|
buttonDisabled
|
|
9747
9866
|
},
|
|
9748
9867
|
dispatch
|
|
9749
|
-
} = React.useContext(store$
|
|
9868
|
+
} = React.useContext(store$h);
|
|
9750
9869
|
const {
|
|
9751
9870
|
t
|
|
9752
9871
|
} = useTranslation("login");
|
|
@@ -9767,23 +9886,23 @@ const LoginButton = ({
|
|
|
9767
9886
|
};
|
|
9768
9887
|
|
|
9769
9888
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
9770
|
-
store: store$
|
|
9889
|
+
store: store$h
|
|
9771
9890
|
}, props));
|
|
9772
9891
|
|
|
9773
9892
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
9774
|
-
store: store$
|
|
9893
|
+
store: store$h
|
|
9775
9894
|
}, props));
|
|
9776
9895
|
|
|
9777
|
-
var _path$
|
|
9896
|
+
var _path$r;
|
|
9778
9897
|
|
|
9779
|
-
function _extends$
|
|
9898
|
+
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
9899
|
|
|
9781
9900
|
function SvgCheck(props) {
|
|
9782
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
9901
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
9783
9902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9784
9903
|
fill: "currentColor",
|
|
9785
9904
|
viewBox: "0 0 20 20"
|
|
9786
|
-
}, props), _path$
|
|
9905
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
9787
9906
|
fillRule: "evenodd",
|
|
9788
9907
|
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
9908
|
clipRule: "evenodd"
|
|
@@ -9848,7 +9967,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9848
9967
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9849
9968
|
facebookLoginRenderProps.FacebookLogin;
|
|
9850
9969
|
|
|
9851
|
-
const initialState$
|
|
9970
|
+
const initialState$g = {
|
|
9852
9971
|
email: "",
|
|
9853
9972
|
password: "",
|
|
9854
9973
|
emailError: null,
|
|
@@ -9865,10 +9984,10 @@ const initialState$f = {
|
|
|
9865
9984
|
content: ""
|
|
9866
9985
|
}
|
|
9867
9986
|
};
|
|
9868
|
-
const store$
|
|
9987
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
9869
9988
|
const {
|
|
9870
|
-
Provider: Provider$
|
|
9871
|
-
} = store$
|
|
9989
|
+
Provider: Provider$g
|
|
9990
|
+
} = store$g;
|
|
9872
9991
|
|
|
9873
9992
|
const RegisterContainer = ({
|
|
9874
9993
|
style,
|
|
@@ -10051,7 +10170,7 @@ const RegisterContainer = ({
|
|
|
10051
10170
|
});
|
|
10052
10171
|
|
|
10053
10172
|
case RESET_LOGIN_FORM:
|
|
10054
|
-
return initialState$
|
|
10173
|
+
return initialState$g;
|
|
10055
10174
|
|
|
10056
10175
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10057
10176
|
return lib_7({ ...state,
|
|
@@ -10069,12 +10188,12 @@ const RegisterContainer = ({
|
|
|
10069
10188
|
default:
|
|
10070
10189
|
return state;
|
|
10071
10190
|
}
|
|
10072
|
-
}, initialState$
|
|
10191
|
+
}, initialState$g);
|
|
10073
10192
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10074
10193
|
style: { ...style
|
|
10075
10194
|
},
|
|
10076
10195
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10077
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
10196
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
10078
10197
|
value: {
|
|
10079
10198
|
state,
|
|
10080
10199
|
dispatch
|
|
@@ -10082,12 +10201,12 @@ const RegisterContainer = ({
|
|
|
10082
10201
|
}, children.length ? children.map((child, i) => {
|
|
10083
10202
|
if (child) {
|
|
10084
10203
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
10085
|
-
store: store$
|
|
10204
|
+
store: store$g,
|
|
10086
10205
|
key: i
|
|
10087
10206
|
});
|
|
10088
10207
|
}
|
|
10089
10208
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
10090
|
-
store: store$
|
|
10209
|
+
store: store$g
|
|
10091
10210
|
})));
|
|
10092
10211
|
};
|
|
10093
10212
|
/**
|
|
@@ -10102,15 +10221,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10102
10221
|
return hasSecuritySdkLoaded;
|
|
10103
10222
|
}
|
|
10104
10223
|
|
|
10105
|
-
var _path$
|
|
10224
|
+
var _path$q;
|
|
10106
10225
|
|
|
10107
|
-
function _extends$
|
|
10226
|
+
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
10227
|
|
|
10109
10228
|
function SvgFacebookLogo(props) {
|
|
10110
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10229
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
10111
10230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10112
10231
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10113
|
-
}, props), _path$
|
|
10232
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10114
10233
|
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
10234
|
fill: "#3c5a9a"
|
|
10116
10235
|
})));
|
|
@@ -10127,10 +10246,10 @@ const FacebookLoginButton = ({
|
|
|
10127
10246
|
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
10247
|
const {
|
|
10129
10248
|
dispatch: loginDispatch
|
|
10130
|
-
} = React.useContext(store$
|
|
10249
|
+
} = React.useContext(store$h);
|
|
10131
10250
|
const {
|
|
10132
10251
|
dispatch: registerDispatch
|
|
10133
|
-
} = React.useContext(store$
|
|
10252
|
+
} = React.useContext(store$g);
|
|
10134
10253
|
|
|
10135
10254
|
const onSuccess = facebookUser => {
|
|
10136
10255
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10183,15 +10302,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10183
10302
|
unwrapExports(googleLogin);
|
|
10184
10303
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10185
10304
|
|
|
10186
|
-
var _path$
|
|
10305
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10187
10306
|
|
|
10188
|
-
function _extends$
|
|
10307
|
+
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
10308
|
|
|
10190
10309
|
function SvgGoogleLogo(props) {
|
|
10191
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10310
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
10192
10311
|
viewBox: "0 0 24 24",
|
|
10193
10312
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10194
|
-
}, props), _path$
|
|
10313
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10195
10314
|
fill: "#4285F4",
|
|
10196
10315
|
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
10316
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -10217,10 +10336,10 @@ const GoogleLoginButton = ({
|
|
|
10217
10336
|
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
10337
|
const {
|
|
10219
10338
|
dispatch: loginDispatch
|
|
10220
|
-
} = React.useContext(store$
|
|
10339
|
+
} = React.useContext(store$h);
|
|
10221
10340
|
const {
|
|
10222
10341
|
dispatch: registerDispatch
|
|
10223
|
-
} = React.useContext(store$
|
|
10342
|
+
} = React.useContext(store$g);
|
|
10224
10343
|
|
|
10225
10344
|
const onSuccess = response => {
|
|
10226
10345
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10268,15 +10387,15 @@ const GoogleLoginButton = ({
|
|
|
10268
10387
|
}) : null;
|
|
10269
10388
|
};
|
|
10270
10389
|
|
|
10271
|
-
var _path$
|
|
10390
|
+
var _path$o;
|
|
10272
10391
|
|
|
10273
|
-
function _extends$
|
|
10392
|
+
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
10393
|
|
|
10275
10394
|
function SvgAuth0Logo(props) {
|
|
10276
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10395
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
10277
10396
|
viewBox: "0 0 256 285",
|
|
10278
10397
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10279
|
-
}, props), _path$
|
|
10398
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10280
10399
|
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
10400
|
})));
|
|
10282
10401
|
}
|
|
@@ -10316,10 +10435,10 @@ const Auth0LoginButton = ({
|
|
|
10316
10435
|
}, [auth0Enabled, auth0Loaded]);
|
|
10317
10436
|
const {
|
|
10318
10437
|
dispatch: loginDispatch
|
|
10319
|
-
} = React.useContext(store$
|
|
10438
|
+
} = React.useContext(store$h);
|
|
10320
10439
|
const {
|
|
10321
10440
|
dispatch: registerDispatch
|
|
10322
|
-
} = React.useContext(store$
|
|
10441
|
+
} = React.useContext(store$g);
|
|
10323
10442
|
|
|
10324
10443
|
function handleClick() {
|
|
10325
10444
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10452,15 +10571,15 @@ function LoginView(props) {
|
|
|
10452
10571
|
}, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
|
|
10453
10572
|
}
|
|
10454
10573
|
|
|
10455
|
-
var _path$
|
|
10574
|
+
var _path$n, _path2$2, _path3;
|
|
10456
10575
|
|
|
10457
|
-
function _extends$
|
|
10576
|
+
function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
10458
10577
|
|
|
10459
10578
|
function SvgPelcroAuthorship(props) {
|
|
10460
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
10579
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
10461
10580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10462
10581
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10463
|
-
}, props), _path$
|
|
10582
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
10464
10583
|
fill: "none",
|
|
10465
10584
|
stroke: "#4a4a4a",
|
|
10466
10585
|
d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
|
|
@@ -10607,11 +10726,11 @@ function LoginModal({
|
|
|
10607
10726
|
LoginModal.viewId = "login";
|
|
10608
10727
|
|
|
10609
10728
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
10610
|
-
store: store$
|
|
10729
|
+
store: store$g
|
|
10611
10730
|
}, props));
|
|
10612
10731
|
|
|
10613
10732
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
10614
|
-
store: store$
|
|
10733
|
+
store: store$g
|
|
10615
10734
|
}, props));
|
|
10616
10735
|
|
|
10617
10736
|
const RegisterButton = ({
|
|
@@ -10631,7 +10750,7 @@ const RegisterButton = ({
|
|
|
10631
10750
|
buttonDisabled
|
|
10632
10751
|
},
|
|
10633
10752
|
dispatch
|
|
10634
|
-
} = React.useContext(store$
|
|
10753
|
+
} = React.useContext(store$g);
|
|
10635
10754
|
const {
|
|
10636
10755
|
t
|
|
10637
10756
|
} = useTranslation("register");
|
|
@@ -10769,7 +10888,7 @@ function FirstName({
|
|
|
10769
10888
|
}
|
|
10770
10889
|
|
|
10771
10890
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
10772
|
-
store: store$
|
|
10891
|
+
store: store$g
|
|
10773
10892
|
}, props));
|
|
10774
10893
|
|
|
10775
10894
|
function LastName({
|
|
@@ -10800,7 +10919,7 @@ function LastName({
|
|
|
10800
10919
|
}
|
|
10801
10920
|
|
|
10802
10921
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
10803
|
-
store: store$
|
|
10922
|
+
store: store$g
|
|
10804
10923
|
}, props));
|
|
10805
10924
|
|
|
10806
10925
|
/**
|
|
@@ -10924,7 +11043,7 @@ function TextInput({
|
|
|
10924
11043
|
|
|
10925
11044
|
const RegisterTextInput = props => {
|
|
10926
11045
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
10927
|
-
store: store$
|
|
11046
|
+
store: store$g
|
|
10928
11047
|
}));
|
|
10929
11048
|
};
|
|
10930
11049
|
|
|
@@ -12593,7 +12712,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12593
12712
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12594
12713
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12595
12714
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12596
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12715
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12716
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12597
12717
|
};
|
|
12598
12718
|
|
|
12599
12719
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12655,6 +12775,7 @@ class Subscription {
|
|
|
12655
12775
|
* @property {number} [subscriptionIdToRenew]
|
|
12656
12776
|
* @property {number} [quantity]
|
|
12657
12777
|
* @property {string} addressId
|
|
12778
|
+
* @property {number} invoiceId
|
|
12658
12779
|
*/
|
|
12659
12780
|
|
|
12660
12781
|
/**
|
|
@@ -12695,6 +12816,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12695
12816
|
|
|
12696
12817
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12697
12818
|
|
|
12819
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12820
|
+
|
|
12698
12821
|
class StripeGateway {
|
|
12699
12822
|
constructor() {
|
|
12700
12823
|
_paymentGateway.set(this, {
|
|
@@ -12718,6 +12841,9 @@ class StripeGateway {
|
|
|
12718
12841
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12719
12842
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12720
12843
|
|
|
12844
|
+
case types.PAY_INVOICE:
|
|
12845
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12846
|
+
|
|
12721
12847
|
default:
|
|
12722
12848
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12723
12849
|
}
|
|
@@ -12826,6 +12952,23 @@ class StripeGateway {
|
|
|
12826
12952
|
});
|
|
12827
12953
|
}
|
|
12828
12954
|
});
|
|
12955
|
+
|
|
12956
|
+
_payInvoice.set(this, {
|
|
12957
|
+
writable: true,
|
|
12958
|
+
value: (options, callback) => {
|
|
12959
|
+
const {
|
|
12960
|
+
token,
|
|
12961
|
+
invoiceId
|
|
12962
|
+
} = options;
|
|
12963
|
+
window.Pelcro.invoice.pay({
|
|
12964
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
12965
|
+
gateway_token: token,
|
|
12966
|
+
invoice_id: invoiceId
|
|
12967
|
+
}, (err, res) => {
|
|
12968
|
+
callback(err, res);
|
|
12969
|
+
});
|
|
12970
|
+
}
|
|
12971
|
+
});
|
|
12829
12972
|
}
|
|
12830
12973
|
|
|
12831
12974
|
}
|
|
@@ -12839,6 +12982,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12839
12982
|
|
|
12840
12983
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12841
12984
|
|
|
12985
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
12986
|
+
|
|
12842
12987
|
class PaypalGateWay {
|
|
12843
12988
|
constructor() {
|
|
12844
12989
|
_paymentGateway2.set(this, {
|
|
@@ -12856,6 +13001,9 @@ class PaypalGateWay {
|
|
|
12856
13001
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12857
13002
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12858
13003
|
|
|
13004
|
+
case types.PAY_INVOICE:
|
|
13005
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
13006
|
+
|
|
12859
13007
|
default:
|
|
12860
13008
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12861
13009
|
}
|
|
@@ -12916,6 +13064,23 @@ class PaypalGateWay {
|
|
|
12916
13064
|
});
|
|
12917
13065
|
}
|
|
12918
13066
|
});
|
|
13067
|
+
|
|
13068
|
+
_payInvoice2.set(this, {
|
|
13069
|
+
writable: true,
|
|
13070
|
+
value: (options, callback) => {
|
|
13071
|
+
const {
|
|
13072
|
+
token,
|
|
13073
|
+
invoiceId
|
|
13074
|
+
} = options;
|
|
13075
|
+
window.Pelcro.invoice.pay({
|
|
13076
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13077
|
+
gateway_token: token,
|
|
13078
|
+
invoice_id: invoiceId
|
|
13079
|
+
}, (err, res) => {
|
|
13080
|
+
callback(err, res);
|
|
13081
|
+
});
|
|
13082
|
+
}
|
|
13083
|
+
});
|
|
12919
13084
|
}
|
|
12920
13085
|
|
|
12921
13086
|
}
|
|
@@ -12940,7 +13105,7 @@ class PaypalGateWay {
|
|
|
12940
13105
|
|
|
12941
13106
|
/** @type {PaymentStateType} */
|
|
12942
13107
|
|
|
12943
|
-
const initialState$
|
|
13108
|
+
const initialState$f = {
|
|
12944
13109
|
disableSubmit: false,
|
|
12945
13110
|
isLoading: false,
|
|
12946
13111
|
disableCouponButton: false,
|
|
@@ -12959,10 +13124,10 @@ const initialState$e = {
|
|
|
12959
13124
|
content: ""
|
|
12960
13125
|
}
|
|
12961
13126
|
};
|
|
12962
|
-
const store$
|
|
13127
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
12963
13128
|
const {
|
|
12964
|
-
Provider: Provider$
|
|
12965
|
-
} = store$
|
|
13129
|
+
Provider: Provider$f
|
|
13130
|
+
} = store$f;
|
|
12966
13131
|
|
|
12967
13132
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12968
13133
|
style,
|
|
@@ -12975,7 +13140,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12975
13140
|
onFailure = () => {},
|
|
12976
13141
|
...props
|
|
12977
13142
|
}) => {
|
|
12978
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13143
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12979
13144
|
|
|
12980
13145
|
const {
|
|
12981
13146
|
t
|
|
@@ -12992,6 +13157,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12992
13157
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12993
13158
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12994
13159
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13160
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12995
13161
|
React.useEffect(() => {
|
|
12996
13162
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12997
13163
|
dispatch({
|
|
@@ -13560,6 +13726,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13560
13726
|
});
|
|
13561
13727
|
};
|
|
13562
13728
|
|
|
13729
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13730
|
+
const subscription = new Subscription(gatewayService);
|
|
13731
|
+
return subscription.execute({
|
|
13732
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13733
|
+
token: gatewayToken,
|
|
13734
|
+
invoiceId: invoice.id
|
|
13735
|
+
}, (err, res) => {
|
|
13736
|
+
dispatch({
|
|
13737
|
+
type: DISABLE_SUBMIT,
|
|
13738
|
+
payload: false
|
|
13739
|
+
});
|
|
13740
|
+
dispatch({
|
|
13741
|
+
type: LOADING,
|
|
13742
|
+
payload: false
|
|
13743
|
+
});
|
|
13744
|
+
|
|
13745
|
+
if (err) {
|
|
13746
|
+
onFailure(err);
|
|
13747
|
+
return dispatch({
|
|
13748
|
+
type: SHOW_ALERT,
|
|
13749
|
+
payload: {
|
|
13750
|
+
type: "error",
|
|
13751
|
+
content: getErrorMessages(err)
|
|
13752
|
+
}
|
|
13753
|
+
});
|
|
13754
|
+
}
|
|
13755
|
+
|
|
13756
|
+
set({
|
|
13757
|
+
invoice: null
|
|
13758
|
+
});
|
|
13759
|
+
onSuccess(res);
|
|
13760
|
+
});
|
|
13761
|
+
};
|
|
13762
|
+
|
|
13563
13763
|
const updatePaymentSource = (state, dispatch) => {
|
|
13564
13764
|
return stripe.createSource({
|
|
13565
13765
|
type: "card"
|
|
@@ -13634,13 +13834,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13634
13834
|
source,
|
|
13635
13835
|
error
|
|
13636
13836
|
}) => {
|
|
13637
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13837
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13638
13838
|
|
|
13639
13839
|
if (error) {
|
|
13640
13840
|
return handlePaymentError(error);
|
|
13641
13841
|
}
|
|
13642
13842
|
|
|
13643
13843
|
const getOrderItemsTotal = () => {
|
|
13844
|
+
if (!order) {
|
|
13845
|
+
return null;
|
|
13846
|
+
}
|
|
13847
|
+
|
|
13644
13848
|
const isQuickPurchase = !Array.isArray(order);
|
|
13645
13849
|
|
|
13646
13850
|
if (isQuickPurchase) {
|
|
@@ -13656,7 +13860,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13656
13860
|
}, 0);
|
|
13657
13861
|
};
|
|
13658
13862
|
|
|
13659
|
-
const totalAmount = (_ref = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
|
|
13863
|
+
const totalAmount = (_ref = (_ref2 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref2 !== void 0 ? _ref2 : invoice.amount_remaining) !== null && _ref !== void 0 ? _ref : getOrderItemsTotal();
|
|
13660
13864
|
|
|
13661
13865
|
if ((source === null || source === void 0 ? void 0 : (_source$card3 = source.card) === null || _source$card3 === void 0 ? void 0 : _source$card3.three_d_secure) === "required" && totalAmount > 0) {
|
|
13662
13866
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13689,6 +13893,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13689
13893
|
const resolveTaxCalculation = () => {
|
|
13690
13894
|
var _window$Pelcro$site$r2;
|
|
13691
13895
|
|
|
13896
|
+
if (type === "invoicePayment") {
|
|
13897
|
+
return new Promise(resolve => resolve());
|
|
13898
|
+
}
|
|
13899
|
+
|
|
13692
13900
|
const taxesEnabled = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.taxes_enabled;
|
|
13693
13901
|
return new Promise((resolve, reject) => {
|
|
13694
13902
|
// resolve early if taxes isn't enabled
|
|
@@ -13762,6 +13970,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13762
13970
|
subscribe(stripeSource, state, dispatch);
|
|
13763
13971
|
} else if (stripeSource && type === "orderCreate") {
|
|
13764
13972
|
purchase(stripeSource, state, dispatch);
|
|
13973
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
13974
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13765
13975
|
}
|
|
13766
13976
|
};
|
|
13767
13977
|
|
|
@@ -13895,7 +14105,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13895
14105
|
});
|
|
13896
14106
|
|
|
13897
14107
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13898
|
-
return lib_5(state, () =>
|
|
14108
|
+
return lib_5(state, (state, dispatch) => {
|
|
14109
|
+
if (type === "invoicePayment") {
|
|
14110
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14111
|
+
} else {
|
|
14112
|
+
handlePaypalSubscription(state, action.payload);
|
|
14113
|
+
}
|
|
14114
|
+
});
|
|
13899
14115
|
|
|
13900
14116
|
case SET_UPDATED_PRICE:
|
|
13901
14117
|
return lib_7({ ...state,
|
|
@@ -13953,21 +14169,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13953
14169
|
default:
|
|
13954
14170
|
return state;
|
|
13955
14171
|
}
|
|
13956
|
-
}, initialState$
|
|
14172
|
+
}, initialState$f);
|
|
13957
14173
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13958
14174
|
style: { ...style
|
|
13959
14175
|
},
|
|
13960
14176
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13961
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
14177
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
13962
14178
|
value: {
|
|
13963
14179
|
state,
|
|
13964
14180
|
dispatch
|
|
13965
14181
|
}
|
|
13966
14182
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13967
|
-
store: store$
|
|
14183
|
+
store: store$f,
|
|
13968
14184
|
key: i
|
|
13969
14185
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13970
|
-
store: store$
|
|
14186
|
+
store: store$f
|
|
13971
14187
|
})));
|
|
13972
14188
|
};
|
|
13973
14189
|
|
|
@@ -13989,7 +14205,7 @@ const PaymentMethodContainer = props => {
|
|
|
13989
14205
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13990
14206
|
locale: getPageOrDefaultLanguage()
|
|
13991
14207
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
13992
|
-
store: store$
|
|
14208
|
+
store: store$f
|
|
13993
14209
|
}, props))));
|
|
13994
14210
|
}
|
|
13995
14211
|
|
|
@@ -14042,7 +14258,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14042
14258
|
currentPlan,
|
|
14043
14259
|
updatedPrice
|
|
14044
14260
|
}
|
|
14045
|
-
} = React.useContext(store$
|
|
14261
|
+
} = React.useContext(store$f);
|
|
14046
14262
|
|
|
14047
14263
|
const updatePaymentRequest = () => {
|
|
14048
14264
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14102,7 +14318,7 @@ const DiscountedPrice = props => {
|
|
|
14102
14318
|
taxAmount,
|
|
14103
14319
|
percentOff
|
|
14104
14320
|
}
|
|
14105
|
-
} = React.useContext(store$
|
|
14321
|
+
} = React.useContext(store$f);
|
|
14106
14322
|
const {
|
|
14107
14323
|
order,
|
|
14108
14324
|
plan
|
|
@@ -14152,7 +14368,7 @@ const SubmitPaymentMethod = ({
|
|
|
14152
14368
|
isLoading,
|
|
14153
14369
|
updatedPrice
|
|
14154
14370
|
}
|
|
14155
|
-
} = React.useContext(store$
|
|
14371
|
+
} = React.useContext(store$f);
|
|
14156
14372
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14157
14373
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14158
14374
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14173,17 +14389,17 @@ const SubmitPaymentMethod = ({
|
|
|
14173
14389
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14174
14390
|
};
|
|
14175
14391
|
|
|
14176
|
-
var _path$
|
|
14392
|
+
var _path$m;
|
|
14177
14393
|
|
|
14178
|
-
function _extends$
|
|
14394
|
+
function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
14179
14395
|
|
|
14180
14396
|
function SvgArrowLeft(props) {
|
|
14181
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14397
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
14182
14398
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14183
14399
|
fill: "none",
|
|
14184
14400
|
viewBox: "0 0 24 24",
|
|
14185
14401
|
stroke: "currentColor"
|
|
14186
|
-
}, props), _path$
|
|
14402
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14187
14403
|
strokeLinecap: "round",
|
|
14188
14404
|
strokeLinejoin: "round",
|
|
14189
14405
|
strokeWidth: 2,
|
|
@@ -14202,7 +14418,7 @@ const ApplyCouponButton = ({
|
|
|
14202
14418
|
disableCouponButton
|
|
14203
14419
|
},
|
|
14204
14420
|
dispatch
|
|
14205
|
-
} = React.useContext(store$
|
|
14421
|
+
} = React.useContext(store$f);
|
|
14206
14422
|
const {
|
|
14207
14423
|
t
|
|
14208
14424
|
} = useTranslation("checkoutForm");
|
|
@@ -14236,7 +14452,7 @@ const CouponCodeField = props => {
|
|
|
14236
14452
|
couponCode,
|
|
14237
14453
|
couponError
|
|
14238
14454
|
}
|
|
14239
|
-
} = React.useContext(store$
|
|
14455
|
+
} = React.useContext(store$f);
|
|
14240
14456
|
|
|
14241
14457
|
const onCouponCodeChange = e => {
|
|
14242
14458
|
dispatch({
|
|
@@ -14265,17 +14481,17 @@ const CouponCodeField = props => {
|
|
|
14265
14481
|
}, props));
|
|
14266
14482
|
};
|
|
14267
14483
|
|
|
14268
|
-
var _path$
|
|
14484
|
+
var _path$l;
|
|
14269
14485
|
|
|
14270
|
-
function _extends$
|
|
14486
|
+
function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
14271
14487
|
|
|
14272
14488
|
function SvgTicket(props) {
|
|
14273
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14489
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
14274
14490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14275
14491
|
fill: "none",
|
|
14276
14492
|
viewBox: "0 0 24 24",
|
|
14277
14493
|
stroke: "currentColor"
|
|
14278
|
-
}, props), _path$
|
|
14494
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14279
14495
|
strokeLinecap: "round",
|
|
14280
14496
|
strokeLinejoin: "round",
|
|
14281
14497
|
strokeWidth: 2,
|
|
@@ -14292,7 +14508,7 @@ const CouponCode = ({
|
|
|
14292
14508
|
state: {
|
|
14293
14509
|
enableCouponField
|
|
14294
14510
|
}
|
|
14295
|
-
} = React.useContext(store$
|
|
14511
|
+
} = React.useContext(store$f);
|
|
14296
14512
|
const {
|
|
14297
14513
|
t
|
|
14298
14514
|
} = useTranslation("checkoutForm");
|
|
@@ -14549,17 +14765,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14549
14765
|
const {
|
|
14550
14766
|
dispatch,
|
|
14551
14767
|
state
|
|
14552
|
-
} = React.useContext(store$
|
|
14768
|
+
} = React.useContext(store$f);
|
|
14553
14769
|
const {
|
|
14554
14770
|
product,
|
|
14555
14771
|
plan,
|
|
14772
|
+
invoice,
|
|
14556
14773
|
selectedAddressId
|
|
14557
14774
|
} = usePelcro();
|
|
14558
14775
|
React.useEffect(() => {
|
|
14559
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14776
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14560
14777
|
|
|
14561
14778
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14562
|
-
const updatedPrice = (_ref = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref !== void 0 ? _ref :
|
|
14779
|
+
const updatedPrice = (_ref = (_ref2 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref2 !== void 0 ? _ref2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref !== void 0 ? _ref : invoice.amount_remaining;
|
|
14563
14780
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14564
14781
|
|
|
14565
14782
|
const initializePaypal = async () => {
|
|
@@ -14568,7 +14785,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14568
14785
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14569
14786
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14570
14787
|
style: props.buttonStyle,
|
|
14571
|
-
enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product.address_required,
|
|
14788
|
+
enableShippingAddress: (_props$product$addres = (_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.address_required) !== null && _props$product$addres !== void 0 ? _props$product$addres : product === null || product === void 0 ? void 0 : product.address_required,
|
|
14572
14789
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14573
14790
|
displayName: props.merchantDisplayName,
|
|
14574
14791
|
locale: props.locale,
|
|
@@ -14578,9 +14795,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14578
14795
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14579
14796
|
|
|
14580
14797
|
paypalCheckoutInstance.createPayment({
|
|
14581
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14798
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14582
14799
|
amount: updatedPrice,
|
|
14583
|
-
address: selectedAddress,
|
|
14800
|
+
address: invoice ? null : selectedAddress,
|
|
14584
14801
|
onButtonClick: () => {
|
|
14585
14802
|
dispatch({
|
|
14586
14803
|
type: DISABLE_SUBMIT,
|
|
@@ -14634,16 +14851,16 @@ const BankRedirection = () => {
|
|
|
14634
14851
|
}));
|
|
14635
14852
|
};
|
|
14636
14853
|
|
|
14637
|
-
var _path$
|
|
14854
|
+
var _path$k;
|
|
14638
14855
|
|
|
14639
|
-
function _extends$
|
|
14856
|
+
function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
14640
14857
|
|
|
14641
14858
|
function SvgLock(props) {
|
|
14642
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14859
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
14643
14860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14644
14861
|
viewBox: "0 0 20 20",
|
|
14645
14862
|
fill: "currentColor"
|
|
14646
|
-
}, props), _path$
|
|
14863
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14647
14864
|
fillRule: "evenodd",
|
|
14648
14865
|
d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
|
|
14649
14866
|
clipRule: "evenodd"
|
|
@@ -14660,7 +14877,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14660
14877
|
state: {
|
|
14661
14878
|
isLoading
|
|
14662
14879
|
}
|
|
14663
|
-
} = React.useContext(store$
|
|
14880
|
+
} = React.useContext(store$f);
|
|
14664
14881
|
const {
|
|
14665
14882
|
switchView,
|
|
14666
14883
|
selectedPaymentMethodId
|
|
@@ -14702,7 +14919,7 @@ const TaxAmount = () => {
|
|
|
14702
14919
|
state: {
|
|
14703
14920
|
taxAmount
|
|
14704
14921
|
}
|
|
14705
|
-
} = React.useContext(store$
|
|
14922
|
+
} = React.useContext(store$f);
|
|
14706
14923
|
const {
|
|
14707
14924
|
plan
|
|
14708
14925
|
} = usePelcro();
|
|
@@ -14865,12 +15082,12 @@ function SubscriptionRenewModal({
|
|
|
14865
15082
|
}
|
|
14866
15083
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14867
15084
|
|
|
14868
|
-
var _path$
|
|
15085
|
+
var _path$j;
|
|
14869
15086
|
|
|
14870
|
-
function _extends$
|
|
15087
|
+
function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
14871
15088
|
|
|
14872
15089
|
function SvgGift(props) {
|
|
14873
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
15090
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
14874
15091
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14875
15092
|
fill: "none",
|
|
14876
15093
|
stroke: "currentColor",
|
|
@@ -14879,7 +15096,7 @@ function SvgGift(props) {
|
|
|
14879
15096
|
strokeWidth: 2,
|
|
14880
15097
|
viewBox: "0 0 24 24",
|
|
14881
15098
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14882
|
-
}, props), _path$
|
|
15099
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14883
15100
|
d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
|
|
14884
15101
|
})));
|
|
14885
15102
|
}
|
|
@@ -14917,10 +15134,13 @@ const getCurrentFlow = () => {
|
|
|
14917
15134
|
const {
|
|
14918
15135
|
product,
|
|
14919
15136
|
giftRecipient,
|
|
14920
|
-
giftCode
|
|
15137
|
+
giftCode,
|
|
15138
|
+
invoice
|
|
14921
15139
|
} = usePelcro.getStore();
|
|
14922
15140
|
|
|
14923
|
-
if (
|
|
15141
|
+
if (invoice) {
|
|
15142
|
+
return "invoicePayment";
|
|
15143
|
+
} else if (giftRecipient) {
|
|
14924
15144
|
return "giftCreate";
|
|
14925
15145
|
} else if (giftCode) {
|
|
14926
15146
|
return "giftRedeem";
|
|
@@ -14957,6 +15177,13 @@ const getSuccessContent = i18n => {
|
|
|
14957
15177
|
}),
|
|
14958
15178
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14959
15179
|
successContent: i18n("messages.giftRedeem.content")
|
|
15180
|
+
},
|
|
15181
|
+
invoicePayment: {
|
|
15182
|
+
successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
|
|
15183
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15184
|
+
}),
|
|
15185
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15186
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14960
15187
|
}
|
|
14961
15188
|
};
|
|
14962
15189
|
return wordingDictionary[flow];
|
|
@@ -15210,7 +15437,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
15210
15437
|
|
|
15211
15438
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15212
15439
|
|
|
15213
|
-
const initialState$
|
|
15440
|
+
const initialState$e = {
|
|
15214
15441
|
didSubToNewslettersBefore: false,
|
|
15215
15442
|
newsletters: [],
|
|
15216
15443
|
isListLoading: true,
|
|
@@ -15220,10 +15447,10 @@ const initialState$d = {
|
|
|
15220
15447
|
content: ""
|
|
15221
15448
|
}
|
|
15222
15449
|
};
|
|
15223
|
-
const store$
|
|
15450
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
15224
15451
|
const {
|
|
15225
|
-
Provider: Provider$
|
|
15226
|
-
} = store$
|
|
15452
|
+
Provider: Provider$e
|
|
15453
|
+
} = store$e;
|
|
15227
15454
|
|
|
15228
15455
|
const NewsletterUpdateContainer = ({
|
|
15229
15456
|
style,
|
|
@@ -15336,7 +15563,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15336
15563
|
default:
|
|
15337
15564
|
return state;
|
|
15338
15565
|
}
|
|
15339
|
-
}, initialState$
|
|
15566
|
+
}, initialState$e);
|
|
15340
15567
|
React.useEffect(() => {
|
|
15341
15568
|
const getUserNewsletters = () => {
|
|
15342
15569
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15380,7 +15607,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15380
15607
|
style: { ...style
|
|
15381
15608
|
},
|
|
15382
15609
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15383
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
15610
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
15384
15611
|
value: {
|
|
15385
15612
|
state,
|
|
15386
15613
|
dispatch
|
|
@@ -15388,12 +15615,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15388
15615
|
}, children.length ? children.map((child, i) => {
|
|
15389
15616
|
if (child) {
|
|
15390
15617
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15391
|
-
store: store$
|
|
15618
|
+
store: store$e,
|
|
15392
15619
|
key: i
|
|
15393
15620
|
});
|
|
15394
15621
|
}
|
|
15395
15622
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15396
|
-
store: store$
|
|
15623
|
+
store: store$e
|
|
15397
15624
|
})));
|
|
15398
15625
|
};
|
|
15399
15626
|
|
|
@@ -15408,7 +15635,7 @@ const NewsletterUpdateButton = ({
|
|
|
15408
15635
|
isSubmitting,
|
|
15409
15636
|
isListLoading
|
|
15410
15637
|
}
|
|
15411
|
-
} = React.useContext(store$
|
|
15638
|
+
} = React.useContext(store$e);
|
|
15412
15639
|
const {
|
|
15413
15640
|
t
|
|
15414
15641
|
} = useTranslation("newsletter");
|
|
@@ -15438,7 +15665,7 @@ const NewsletterUpdateList = () => {
|
|
|
15438
15665
|
newsletters,
|
|
15439
15666
|
isListLoading
|
|
15440
15667
|
}
|
|
15441
|
-
} = React.useContext(store$
|
|
15668
|
+
} = React.useContext(store$e);
|
|
15442
15669
|
|
|
15443
15670
|
if (isListLoading) {
|
|
15444
15671
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
@@ -15642,7 +15869,7 @@ function SubscriptionCreateModal({
|
|
|
15642
15869
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15643
15870
|
|
|
15644
15871
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15645
|
-
const initialState$
|
|
15872
|
+
const initialState$d = {
|
|
15646
15873
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15647
15874
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15648
15875
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15655,10 +15882,10 @@ const initialState$c = {
|
|
|
15655
15882
|
content: ""
|
|
15656
15883
|
}
|
|
15657
15884
|
};
|
|
15658
|
-
const store$
|
|
15885
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
15659
15886
|
const {
|
|
15660
|
-
Provider: Provider$
|
|
15661
|
-
} = store$
|
|
15887
|
+
Provider: Provider$d
|
|
15888
|
+
} = store$d;
|
|
15662
15889
|
|
|
15663
15890
|
const UserUpdateContainer = ({
|
|
15664
15891
|
style,
|
|
@@ -15790,27 +16017,27 @@ const UserUpdateContainer = ({
|
|
|
15790
16017
|
default:
|
|
15791
16018
|
return state;
|
|
15792
16019
|
}
|
|
15793
|
-
}, initialState$
|
|
16020
|
+
}, initialState$d);
|
|
15794
16021
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15795
16022
|
style: { ...style
|
|
15796
16023
|
},
|
|
15797
16024
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15798
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16025
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
15799
16026
|
value: {
|
|
15800
16027
|
state,
|
|
15801
16028
|
dispatch
|
|
15802
16029
|
}
|
|
15803
16030
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
15804
|
-
store: store$
|
|
16031
|
+
store: store$d,
|
|
15805
16032
|
key: i
|
|
15806
16033
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
15807
|
-
store: store$
|
|
16034
|
+
store: store$d
|
|
15808
16035
|
})));
|
|
15809
16036
|
};
|
|
15810
16037
|
|
|
15811
16038
|
const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
15812
16039
|
disabled: true,
|
|
15813
|
-
store: store$
|
|
16040
|
+
store: store$d
|
|
15814
16041
|
}, props));
|
|
15815
16042
|
|
|
15816
16043
|
const UserUpdateButton = ({
|
|
@@ -15823,7 +16050,7 @@ const UserUpdateButton = ({
|
|
|
15823
16050
|
buttonDisabled
|
|
15824
16051
|
},
|
|
15825
16052
|
dispatch
|
|
15826
|
-
} = React.useContext(store$
|
|
16053
|
+
} = React.useContext(store$d);
|
|
15827
16054
|
const {
|
|
15828
16055
|
t
|
|
15829
16056
|
} = useTranslation("userEdit");
|
|
@@ -15840,11 +16067,11 @@ const UserUpdateButton = ({
|
|
|
15840
16067
|
};
|
|
15841
16068
|
|
|
15842
16069
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
15843
|
-
store: store$
|
|
16070
|
+
store: store$d
|
|
15844
16071
|
}, props));
|
|
15845
16072
|
|
|
15846
16073
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
15847
|
-
store: store$
|
|
16074
|
+
store: store$d
|
|
15848
16075
|
}, props));
|
|
15849
16076
|
|
|
15850
16077
|
function Phone({
|
|
@@ -15873,22 +16100,22 @@ function Phone({
|
|
|
15873
16100
|
}
|
|
15874
16101
|
|
|
15875
16102
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
15876
|
-
store: store$
|
|
16103
|
+
store: store$d
|
|
15877
16104
|
}, props));
|
|
15878
16105
|
|
|
15879
16106
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
15880
16107
|
|
|
15881
|
-
var _path$
|
|
16108
|
+
var _path$i;
|
|
15882
16109
|
|
|
15883
|
-
function _extends$
|
|
16110
|
+
function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
15884
16111
|
|
|
15885
16112
|
function SvgEdit(props) {
|
|
15886
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
16113
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
15887
16114
|
className: "plc-w-6 plc-h-6",
|
|
15888
16115
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15889
16116
|
viewBox: "0 0 20 20",
|
|
15890
16117
|
fill: "currentColor"
|
|
15891
|
-
}, props), _path$
|
|
16118
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
15892
16119
|
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
15893
16120
|
})));
|
|
15894
16121
|
}
|
|
@@ -16020,16 +16247,16 @@ function DisplayName({
|
|
|
16020
16247
|
}
|
|
16021
16248
|
|
|
16022
16249
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
16023
|
-
store: store$
|
|
16250
|
+
store: store$d
|
|
16024
16251
|
}, props));
|
|
16025
16252
|
|
|
16026
16253
|
const UserUpdateTextInput = props => {
|
|
16027
16254
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16028
|
-
store: store$
|
|
16255
|
+
store: store$d
|
|
16029
16256
|
}));
|
|
16030
16257
|
};
|
|
16031
16258
|
|
|
16032
|
-
const initialState$
|
|
16259
|
+
const initialState$c = {
|
|
16033
16260
|
isSubmitting: false,
|
|
16034
16261
|
firstName: "",
|
|
16035
16262
|
firstNameError: "",
|
|
@@ -16054,10 +16281,10 @@ const initialState$b = {
|
|
|
16054
16281
|
content: ""
|
|
16055
16282
|
}
|
|
16056
16283
|
};
|
|
16057
|
-
const store$
|
|
16284
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
16058
16285
|
const {
|
|
16059
|
-
Provider: Provider$
|
|
16060
|
-
} = store$
|
|
16286
|
+
Provider: Provider$c
|
|
16287
|
+
} = store$c;
|
|
16061
16288
|
|
|
16062
16289
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16063
16290
|
|
|
@@ -16264,7 +16491,7 @@ const AddressCreateContainer = ({
|
|
|
16264
16491
|
default:
|
|
16265
16492
|
return state;
|
|
16266
16493
|
}
|
|
16267
|
-
}, initialState$
|
|
16494
|
+
}, initialState$c);
|
|
16268
16495
|
React.useEffect(() => {
|
|
16269
16496
|
const getStates = () => {
|
|
16270
16497
|
dispatch({
|
|
@@ -16296,16 +16523,16 @@ const AddressCreateContainer = ({
|
|
|
16296
16523
|
style: { ...style
|
|
16297
16524
|
},
|
|
16298
16525
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16299
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
16526
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
16300
16527
|
value: {
|
|
16301
16528
|
state,
|
|
16302
16529
|
dispatch
|
|
16303
16530
|
}
|
|
16304
16531
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
16305
|
-
store: store$
|
|
16532
|
+
store: store$c,
|
|
16306
16533
|
key: i
|
|
16307
16534
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
16308
|
-
store: store$
|
|
16535
|
+
store: store$c
|
|
16309
16536
|
})));
|
|
16310
16537
|
};
|
|
16311
16538
|
|
|
@@ -16316,7 +16543,7 @@ function AddressCreateFirstName(props) {
|
|
|
16316
16543
|
firstName,
|
|
16317
16544
|
firstNameError
|
|
16318
16545
|
}
|
|
16319
|
-
} = React.useContext(store$
|
|
16546
|
+
} = React.useContext(store$c);
|
|
16320
16547
|
|
|
16321
16548
|
const handleBlur = () => {
|
|
16322
16549
|
return dispatch({
|
|
@@ -16359,7 +16586,7 @@ function AddressCreateLastName(props) {
|
|
|
16359
16586
|
lastName,
|
|
16360
16587
|
lastNameError
|
|
16361
16588
|
}
|
|
16362
|
-
} = React.useContext(store$
|
|
16589
|
+
} = React.useContext(store$c);
|
|
16363
16590
|
|
|
16364
16591
|
const handleBlur = () => {
|
|
16365
16592
|
return dispatch({
|
|
@@ -16402,7 +16629,7 @@ function AddressCreateLine1(props) {
|
|
|
16402
16629
|
line1,
|
|
16403
16630
|
line1Error
|
|
16404
16631
|
}
|
|
16405
|
-
} = React.useContext(store$
|
|
16632
|
+
} = React.useContext(store$c);
|
|
16406
16633
|
|
|
16407
16634
|
const handleBlur = () => {
|
|
16408
16635
|
return dispatch({
|
|
@@ -16445,7 +16672,7 @@ function AddressCreateCity(props) {
|
|
|
16445
16672
|
city,
|
|
16446
16673
|
cityError
|
|
16447
16674
|
}
|
|
16448
|
-
} = React.useContext(store$
|
|
16675
|
+
} = React.useContext(store$c);
|
|
16449
16676
|
|
|
16450
16677
|
const handleBlur = () => {
|
|
16451
16678
|
return dispatch({
|
|
@@ -16488,7 +16715,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16488
16715
|
postalCode,
|
|
16489
16716
|
postalCodeError
|
|
16490
16717
|
}
|
|
16491
|
-
} = React.useContext(store$
|
|
16718
|
+
} = React.useContext(store$c);
|
|
16492
16719
|
|
|
16493
16720
|
const handleBlur = () => {
|
|
16494
16721
|
return dispatch({
|
|
@@ -16534,7 +16761,7 @@ const AddressCreateSubmit = ({
|
|
|
16534
16761
|
state: {
|
|
16535
16762
|
isSubmitting
|
|
16536
16763
|
}
|
|
16537
|
-
} = React.useContext(store$
|
|
16764
|
+
} = React.useContext(store$c);
|
|
16538
16765
|
const {
|
|
16539
16766
|
t
|
|
16540
16767
|
} = useTranslation("address");
|
|
@@ -16645,7 +16872,7 @@ function CountrySelect({
|
|
|
16645
16872
|
}
|
|
16646
16873
|
|
|
16647
16874
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
16648
|
-
store: store$
|
|
16875
|
+
store: store$c
|
|
16649
16876
|
}, props));
|
|
16650
16877
|
|
|
16651
16878
|
function StateSelect({
|
|
@@ -16733,7 +16960,7 @@ function StateSelect({
|
|
|
16733
16960
|
}
|
|
16734
16961
|
|
|
16735
16962
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
16736
|
-
store: store$
|
|
16963
|
+
store: store$c
|
|
16737
16964
|
}, props));
|
|
16738
16965
|
|
|
16739
16966
|
const AddressCreateView = props => {
|
|
@@ -16838,18 +17065,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16838
17065
|
|
|
16839
17066
|
const AddressCreateTextInput = props => {
|
|
16840
17067
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
16841
|
-
store: store$
|
|
17068
|
+
store: store$c
|
|
16842
17069
|
}));
|
|
16843
17070
|
};
|
|
16844
17071
|
|
|
16845
17072
|
const AddressCreateLine2 = props => {
|
|
16846
17073
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
16847
17074
|
fieldName: "line2",
|
|
16848
|
-
store: store$
|
|
17075
|
+
store: store$c
|
|
16849
17076
|
}, props));
|
|
16850
17077
|
};
|
|
16851
17078
|
|
|
16852
|
-
const initialState$
|
|
17079
|
+
const initialState$b = {
|
|
16853
17080
|
isSubmitting: false,
|
|
16854
17081
|
firstName: "",
|
|
16855
17082
|
firstNameError: "",
|
|
@@ -16874,10 +17101,10 @@ const initialState$a = {
|
|
|
16874
17101
|
content: ""
|
|
16875
17102
|
}
|
|
16876
17103
|
};
|
|
16877
|
-
const store$
|
|
17104
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
16878
17105
|
const {
|
|
16879
|
-
Provider: Provider$
|
|
16880
|
-
} = store$
|
|
17106
|
+
Provider: Provider$b
|
|
17107
|
+
} = store$b;
|
|
16881
17108
|
|
|
16882
17109
|
const AddressUpdateContainer = ({
|
|
16883
17110
|
style,
|
|
@@ -16929,7 +17156,7 @@ const AddressUpdateContainer = ({
|
|
|
16929
17156
|
const thisAddress = addresses[address];
|
|
16930
17157
|
|
|
16931
17158
|
if (+thisAddress.id === +addressId) {
|
|
16932
|
-
const newState = { ...initialState$
|
|
17159
|
+
const newState = { ...initialState$b,
|
|
16933
17160
|
firstName: thisAddress.first_name,
|
|
16934
17161
|
lastName: thisAddress.last_name,
|
|
16935
17162
|
line1: thisAddress.line1,
|
|
@@ -17062,7 +17289,7 @@ const AddressUpdateContainer = ({
|
|
|
17062
17289
|
default:
|
|
17063
17290
|
return state;
|
|
17064
17291
|
}
|
|
17065
|
-
}, initialState$
|
|
17292
|
+
}, initialState$b);
|
|
17066
17293
|
React.useEffect(() => {
|
|
17067
17294
|
const getStates = () => {
|
|
17068
17295
|
dispatch({
|
|
@@ -17094,21 +17321,21 @@ const AddressUpdateContainer = ({
|
|
|
17094
17321
|
style: { ...style
|
|
17095
17322
|
},
|
|
17096
17323
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17097
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17324
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
17098
17325
|
value: {
|
|
17099
17326
|
state,
|
|
17100
17327
|
dispatch
|
|
17101
17328
|
}
|
|
17102
17329
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17103
|
-
store: store$
|
|
17330
|
+
store: store$b,
|
|
17104
17331
|
key: i
|
|
17105
17332
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17106
|
-
store: store$
|
|
17333
|
+
store: store$b
|
|
17107
17334
|
})));
|
|
17108
17335
|
};
|
|
17109
17336
|
|
|
17110
17337
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
17111
|
-
store: store$
|
|
17338
|
+
store: store$b
|
|
17112
17339
|
}, props));
|
|
17113
17340
|
|
|
17114
17341
|
function AddressUpdateFirstName(props) {
|
|
@@ -17118,7 +17345,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17118
17345
|
firstName,
|
|
17119
17346
|
firstNameError
|
|
17120
17347
|
}
|
|
17121
|
-
} = React.useContext(store$
|
|
17348
|
+
} = React.useContext(store$b);
|
|
17122
17349
|
|
|
17123
17350
|
const handleBlur = () => {
|
|
17124
17351
|
return dispatch({
|
|
@@ -17161,7 +17388,7 @@ function AddressUpdateLastName(props) {
|
|
|
17161
17388
|
lastName,
|
|
17162
17389
|
lastNameError
|
|
17163
17390
|
}
|
|
17164
|
-
} = React.useContext(store$
|
|
17391
|
+
} = React.useContext(store$b);
|
|
17165
17392
|
|
|
17166
17393
|
const handleBlur = () => {
|
|
17167
17394
|
return dispatch({
|
|
@@ -17204,7 +17431,7 @@ function AddressUpdateLine1(props) {
|
|
|
17204
17431
|
line1,
|
|
17205
17432
|
line1Error
|
|
17206
17433
|
}
|
|
17207
|
-
} = React.useContext(store$
|
|
17434
|
+
} = React.useContext(store$b);
|
|
17208
17435
|
|
|
17209
17436
|
const handleBlur = () => {
|
|
17210
17437
|
return dispatch({
|
|
@@ -17244,7 +17471,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17244
17471
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
17245
17472
|
fieldName: "line2"
|
|
17246
17473
|
}, props, {
|
|
17247
|
-
store: store$
|
|
17474
|
+
store: store$b
|
|
17248
17475
|
}));
|
|
17249
17476
|
};
|
|
17250
17477
|
|
|
@@ -17255,7 +17482,7 @@ function AddressUpdateCity(props) {
|
|
|
17255
17482
|
city,
|
|
17256
17483
|
cityError
|
|
17257
17484
|
}
|
|
17258
|
-
} = React.useContext(store$
|
|
17485
|
+
} = React.useContext(store$b);
|
|
17259
17486
|
|
|
17260
17487
|
const handleBlur = () => {
|
|
17261
17488
|
return dispatch({
|
|
@@ -17298,7 +17525,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17298
17525
|
postalCode,
|
|
17299
17526
|
postalCodeError
|
|
17300
17527
|
}
|
|
17301
|
-
} = React.useContext(store$
|
|
17528
|
+
} = React.useContext(store$b);
|
|
17302
17529
|
|
|
17303
17530
|
const handleBlur = () => {
|
|
17304
17531
|
return dispatch({
|
|
@@ -17344,7 +17571,7 @@ const AddressUpdateSubmit = ({
|
|
|
17344
17571
|
state: {
|
|
17345
17572
|
isSubmitting
|
|
17346
17573
|
}
|
|
17347
|
-
} = React.useContext(store$
|
|
17574
|
+
} = React.useContext(store$b);
|
|
17348
17575
|
const {
|
|
17349
17576
|
t
|
|
17350
17577
|
} = useTranslation("address");
|
|
@@ -17360,7 +17587,7 @@ const AddressUpdateSubmit = ({
|
|
|
17360
17587
|
};
|
|
17361
17588
|
|
|
17362
17589
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
17363
|
-
store: store$
|
|
17590
|
+
store: store$b
|
|
17364
17591
|
}, props));
|
|
17365
17592
|
|
|
17366
17593
|
const AddressUpdateView = props => {
|
|
@@ -17443,7 +17670,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17443
17670
|
|
|
17444
17671
|
const AddressUpdateTextInput = props => {
|
|
17445
17672
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
17446
|
-
store: store$
|
|
17673
|
+
store: store$b
|
|
17447
17674
|
}));
|
|
17448
17675
|
};
|
|
17449
17676
|
|
|
@@ -17526,7 +17753,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17526
17753
|
};
|
|
17527
17754
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17528
17755
|
|
|
17529
|
-
const initialState$
|
|
17756
|
+
const initialState$a = {
|
|
17530
17757
|
email: "",
|
|
17531
17758
|
password: "",
|
|
17532
17759
|
passwordError: null,
|
|
@@ -17539,10 +17766,10 @@ const initialState$9 = {
|
|
|
17539
17766
|
content: ""
|
|
17540
17767
|
}
|
|
17541
17768
|
};
|
|
17542
|
-
const store$
|
|
17769
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
17543
17770
|
const {
|
|
17544
|
-
Provider: Provider$
|
|
17545
|
-
} = store$
|
|
17771
|
+
Provider: Provider$a
|
|
17772
|
+
} = store$a;
|
|
17546
17773
|
|
|
17547
17774
|
const PasswordResetContainer = ({
|
|
17548
17775
|
style,
|
|
@@ -17599,7 +17826,7 @@ const PasswordResetContainer = ({
|
|
|
17599
17826
|
type: SET_EMAIL,
|
|
17600
17827
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17601
17828
|
});
|
|
17602
|
-
initialState$
|
|
17829
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17603
17830
|
dispatch({
|
|
17604
17831
|
type: SET_TOKEN,
|
|
17605
17832
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17659,26 +17886,26 @@ const PasswordResetContainer = ({
|
|
|
17659
17886
|
default:
|
|
17660
17887
|
return state;
|
|
17661
17888
|
}
|
|
17662
|
-
}, initialState$
|
|
17889
|
+
}, initialState$a);
|
|
17663
17890
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17664
17891
|
style: { ...style
|
|
17665
17892
|
},
|
|
17666
17893
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17667
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
17894
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
17668
17895
|
value: {
|
|
17669
17896
|
state,
|
|
17670
17897
|
dispatch
|
|
17671
17898
|
}
|
|
17672
17899
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17673
|
-
store: store$
|
|
17900
|
+
store: store$a,
|
|
17674
17901
|
key: i
|
|
17675
17902
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17676
|
-
store: store$
|
|
17903
|
+
store: store$a
|
|
17677
17904
|
})));
|
|
17678
17905
|
};
|
|
17679
17906
|
|
|
17680
17907
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
17681
|
-
store: store$
|
|
17908
|
+
store: store$a
|
|
17682
17909
|
}, props));
|
|
17683
17910
|
|
|
17684
17911
|
const PasswordResetButton = ({
|
|
@@ -17691,7 +17918,7 @@ const PasswordResetButton = ({
|
|
|
17691
17918
|
buttonDisabled
|
|
17692
17919
|
},
|
|
17693
17920
|
dispatch
|
|
17694
|
-
} = React.useContext(store$
|
|
17921
|
+
} = React.useContext(store$a);
|
|
17695
17922
|
const {
|
|
17696
17923
|
t
|
|
17697
17924
|
} = useTranslation("passwordReset");
|
|
@@ -17708,14 +17935,14 @@ const PasswordResetButton = ({
|
|
|
17708
17935
|
};
|
|
17709
17936
|
|
|
17710
17937
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17711
|
-
store: store$
|
|
17938
|
+
store: store$a
|
|
17712
17939
|
}, props, {
|
|
17713
17940
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17714
17941
|
disabled: true
|
|
17715
17942
|
}));
|
|
17716
17943
|
|
|
17717
17944
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
17718
|
-
store: store$
|
|
17945
|
+
store: store$a
|
|
17719
17946
|
}, props));
|
|
17720
17947
|
|
|
17721
17948
|
const PasswordResetView = props => {
|
|
@@ -17767,7 +17994,7 @@ const PasswordResetModal = ({
|
|
|
17767
17994
|
};
|
|
17768
17995
|
PasswordResetModal.viewId = "password-reset";
|
|
17769
17996
|
|
|
17770
|
-
const initialState$
|
|
17997
|
+
const initialState$9 = {
|
|
17771
17998
|
email: "",
|
|
17772
17999
|
emailError: null,
|
|
17773
18000
|
buttonDisabled: false,
|
|
@@ -17776,10 +18003,10 @@ const initialState$8 = {
|
|
|
17776
18003
|
content: ""
|
|
17777
18004
|
}
|
|
17778
18005
|
};
|
|
17779
|
-
const store$
|
|
18006
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
17780
18007
|
const {
|
|
17781
|
-
Provider: Provider$
|
|
17782
|
-
} = store$
|
|
18008
|
+
Provider: Provider$9
|
|
18009
|
+
} = store$9;
|
|
17783
18010
|
|
|
17784
18011
|
const PasswordForgotContainer = ({
|
|
17785
18012
|
style,
|
|
@@ -17857,21 +18084,21 @@ const PasswordForgotContainer = ({
|
|
|
17857
18084
|
default:
|
|
17858
18085
|
return state;
|
|
17859
18086
|
}
|
|
17860
|
-
}, initialState$
|
|
18087
|
+
}, initialState$9);
|
|
17861
18088
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
17862
18089
|
style: { ...style
|
|
17863
18090
|
},
|
|
17864
18091
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17865
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18092
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
17866
18093
|
value: {
|
|
17867
18094
|
state,
|
|
17868
18095
|
dispatch
|
|
17869
18096
|
}
|
|
17870
18097
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
17871
|
-
store: store$
|
|
18098
|
+
store: store$9,
|
|
17872
18099
|
key: i
|
|
17873
18100
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
17874
|
-
store: store$
|
|
18101
|
+
store: store$9
|
|
17875
18102
|
})));
|
|
17876
18103
|
};
|
|
17877
18104
|
|
|
@@ -17887,7 +18114,7 @@ const PasswordForgotButton = ({
|
|
|
17887
18114
|
emailError
|
|
17888
18115
|
},
|
|
17889
18116
|
dispatch
|
|
17890
|
-
} = React.useContext(store$
|
|
18117
|
+
} = React.useContext(store$9);
|
|
17891
18118
|
const {
|
|
17892
18119
|
t
|
|
17893
18120
|
} = useTranslation("passwordForgot");
|
|
@@ -17908,7 +18135,7 @@ const PasswordForgotButton = ({
|
|
|
17908
18135
|
};
|
|
17909
18136
|
|
|
17910
18137
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
17911
|
-
store: store$
|
|
18138
|
+
store: store$9
|
|
17912
18139
|
}, props));
|
|
17913
18140
|
|
|
17914
18141
|
const PasswordForgotView = props => {
|
|
@@ -17958,7 +18185,7 @@ const PasswordForgotModal = ({
|
|
|
17958
18185
|
};
|
|
17959
18186
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17960
18187
|
|
|
17961
|
-
const initialState$
|
|
18188
|
+
const initialState$8 = {
|
|
17962
18189
|
currentPassword: "",
|
|
17963
18190
|
newPassword: "",
|
|
17964
18191
|
confirmNewPassword: "",
|
|
@@ -17972,10 +18199,10 @@ const initialState$7 = {
|
|
|
17972
18199
|
content: ""
|
|
17973
18200
|
}
|
|
17974
18201
|
};
|
|
17975
|
-
const store$
|
|
18202
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
17976
18203
|
const {
|
|
17977
|
-
Provider: Provider$
|
|
17978
|
-
} = store$
|
|
18204
|
+
Provider: Provider$8
|
|
18205
|
+
} = store$8;
|
|
17979
18206
|
const PasswordChangeContainer = ({
|
|
17980
18207
|
style,
|
|
17981
18208
|
className = "",
|
|
@@ -18127,21 +18354,21 @@ const PasswordChangeContainer = ({
|
|
|
18127
18354
|
default:
|
|
18128
18355
|
return state;
|
|
18129
18356
|
}
|
|
18130
|
-
}, initialState$
|
|
18357
|
+
}, initialState$8);
|
|
18131
18358
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18132
18359
|
style: { ...style
|
|
18133
18360
|
},
|
|
18134
18361
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18135
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18362
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
18136
18363
|
value: {
|
|
18137
18364
|
state,
|
|
18138
18365
|
dispatch
|
|
18139
18366
|
}
|
|
18140
18367
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18141
|
-
store: store$
|
|
18368
|
+
store: store$8,
|
|
18142
18369
|
key: i
|
|
18143
18370
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18144
|
-
store: store$
|
|
18371
|
+
store: store$8
|
|
18145
18372
|
})));
|
|
18146
18373
|
};
|
|
18147
18374
|
|
|
@@ -18152,7 +18379,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18152
18379
|
currentPassword,
|
|
18153
18380
|
currentPasswordError
|
|
18154
18381
|
}
|
|
18155
|
-
} = React.useContext(store$
|
|
18382
|
+
} = React.useContext(store$8);
|
|
18156
18383
|
const handleBlur = React.useCallback(() => {
|
|
18157
18384
|
return dispatch({
|
|
18158
18385
|
type: VALIDATE_PASSWORD
|
|
@@ -18186,7 +18413,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18186
18413
|
newPassword,
|
|
18187
18414
|
newPasswordError
|
|
18188
18415
|
}
|
|
18189
|
-
} = React.useContext(store$
|
|
18416
|
+
} = React.useContext(store$8);
|
|
18190
18417
|
const handleBlur = React.useCallback(() => {
|
|
18191
18418
|
return dispatch({
|
|
18192
18419
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18220,7 +18447,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18220
18447
|
confirmNewPassword,
|
|
18221
18448
|
confirmNewPasswordError
|
|
18222
18449
|
}
|
|
18223
|
-
} = React.useContext(store$
|
|
18450
|
+
} = React.useContext(store$8);
|
|
18224
18451
|
const handleBlur = React.useCallback(() => {
|
|
18225
18452
|
return dispatch({
|
|
18226
18453
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18261,7 +18488,7 @@ const PasswordChangeButton = ({
|
|
|
18261
18488
|
confirmNewPasswordError
|
|
18262
18489
|
},
|
|
18263
18490
|
dispatch
|
|
18264
|
-
} = React.useContext(store$
|
|
18491
|
+
} = React.useContext(store$8);
|
|
18265
18492
|
const {
|
|
18266
18493
|
t
|
|
18267
18494
|
} = useTranslation("passwordChange");
|
|
@@ -18327,17 +18554,17 @@ const PasswordChangeModal = ({
|
|
|
18327
18554
|
};
|
|
18328
18555
|
PasswordChangeModal.viewId = "password-change";
|
|
18329
18556
|
|
|
18330
|
-
const initialState$
|
|
18557
|
+
const initialState$7 = {
|
|
18331
18558
|
buttonDisabled: false,
|
|
18332
18559
|
alert: {
|
|
18333
18560
|
type: "error",
|
|
18334
18561
|
content: ""
|
|
18335
18562
|
}
|
|
18336
18563
|
};
|
|
18337
|
-
const store$
|
|
18564
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
18338
18565
|
const {
|
|
18339
|
-
Provider: Provider$
|
|
18340
|
-
} = store$
|
|
18566
|
+
Provider: Provider$7
|
|
18567
|
+
} = store$7;
|
|
18341
18568
|
|
|
18342
18569
|
const CartContainer = ({
|
|
18343
18570
|
style,
|
|
@@ -18428,21 +18655,21 @@ const CartContainer = ({
|
|
|
18428
18655
|
default:
|
|
18429
18656
|
return state;
|
|
18430
18657
|
}
|
|
18431
|
-
}, initialState$
|
|
18658
|
+
}, initialState$7);
|
|
18432
18659
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18433
18660
|
style: { ...style
|
|
18434
18661
|
},
|
|
18435
18662
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18436
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
18663
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
18437
18664
|
value: {
|
|
18438
18665
|
state,
|
|
18439
18666
|
dispatch
|
|
18440
18667
|
}
|
|
18441
18668
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18442
|
-
store: store$
|
|
18669
|
+
store: store$7,
|
|
18443
18670
|
key: i
|
|
18444
18671
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18445
|
-
store: store$
|
|
18672
|
+
store: store$7
|
|
18446
18673
|
})));
|
|
18447
18674
|
};
|
|
18448
18675
|
|
|
@@ -18479,7 +18706,7 @@ const CartSubmit = ({
|
|
|
18479
18706
|
buttonDisabled
|
|
18480
18707
|
},
|
|
18481
18708
|
dispatch
|
|
18482
|
-
} = React.useContext(store$
|
|
18709
|
+
} = React.useContext(store$7);
|
|
18483
18710
|
const {
|
|
18484
18711
|
t
|
|
18485
18712
|
} = useTranslation("cart");
|
|
@@ -18510,7 +18737,7 @@ const CartTotalPrice = () => {
|
|
|
18510
18737
|
state: {
|
|
18511
18738
|
alert
|
|
18512
18739
|
}
|
|
18513
|
-
} = React.useContext(store$
|
|
18740
|
+
} = React.useContext(store$7);
|
|
18514
18741
|
const {
|
|
18515
18742
|
cartItems
|
|
18516
18743
|
} = usePelcro();
|
|
@@ -18823,7 +19050,7 @@ const OrderConfirmModal = props => {
|
|
|
18823
19050
|
};
|
|
18824
19051
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18825
19052
|
|
|
18826
|
-
const initialState$
|
|
19053
|
+
const initialState$6 = {
|
|
18827
19054
|
email: "",
|
|
18828
19055
|
firstName: "",
|
|
18829
19056
|
lastName: "",
|
|
@@ -18835,10 +19062,10 @@ const initialState$5 = {
|
|
|
18835
19062
|
content: ""
|
|
18836
19063
|
}
|
|
18837
19064
|
};
|
|
18838
|
-
const store$
|
|
19065
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
18839
19066
|
const {
|
|
18840
|
-
Provider: Provider$
|
|
18841
|
-
} = store$
|
|
19067
|
+
Provider: Provider$6
|
|
19068
|
+
} = store$6;
|
|
18842
19069
|
|
|
18843
19070
|
const GiftCreateContainer = ({
|
|
18844
19071
|
style,
|
|
@@ -18942,21 +19169,21 @@ const GiftCreateContainer = ({
|
|
|
18942
19169
|
default:
|
|
18943
19170
|
return state;
|
|
18944
19171
|
}
|
|
18945
|
-
}, initialState$
|
|
19172
|
+
}, initialState$6);
|
|
18946
19173
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18947
19174
|
style: { ...style
|
|
18948
19175
|
},
|
|
18949
19176
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18950
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19177
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
18951
19178
|
value: {
|
|
18952
19179
|
state,
|
|
18953
19180
|
dispatch
|
|
18954
19181
|
}
|
|
18955
19182
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
18956
|
-
store: store$
|
|
19183
|
+
store: store$6,
|
|
18957
19184
|
key: i
|
|
18958
19185
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
18959
|
-
store: store$
|
|
19186
|
+
store: store$6
|
|
18960
19187
|
})));
|
|
18961
19188
|
};
|
|
18962
19189
|
|
|
@@ -18970,7 +19197,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18970
19197
|
state: {
|
|
18971
19198
|
disableSubmit
|
|
18972
19199
|
}
|
|
18973
|
-
} = React.useContext(store$
|
|
19200
|
+
} = React.useContext(store$6);
|
|
18974
19201
|
const {
|
|
18975
19202
|
t
|
|
18976
19203
|
} = useTranslation("register");
|
|
@@ -18987,29 +19214,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18987
19214
|
|
|
18988
19215
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
18989
19216
|
initWithUserEmail: false,
|
|
18990
|
-
store: store$
|
|
19217
|
+
store: store$6
|
|
18991
19218
|
}, props));
|
|
18992
19219
|
|
|
18993
19220
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
18994
|
-
store: store$
|
|
19221
|
+
store: store$6
|
|
18995
19222
|
}, props));
|
|
18996
19223
|
|
|
18997
19224
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
18998
|
-
store: store$
|
|
19225
|
+
store: store$6
|
|
18999
19226
|
}, props));
|
|
19000
19227
|
|
|
19001
|
-
var _path$
|
|
19228
|
+
var _path$h;
|
|
19002
19229
|
|
|
19003
|
-
function _extends$
|
|
19230
|
+
function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
19004
19231
|
|
|
19005
19232
|
function SvgInfoCircle(props) {
|
|
19006
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
19233
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
19007
19234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19008
19235
|
className: "plc-w-5 plc-h-5",
|
|
19009
19236
|
fill: "none",
|
|
19010
19237
|
viewBox: "0 0 24 24",
|
|
19011
19238
|
stroke: "currentColor"
|
|
19012
|
-
}, props), _path$
|
|
19239
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
19013
19240
|
strokeLinecap: "round",
|
|
19014
19241
|
strokeLinejoin: "round",
|
|
19015
19242
|
strokeWidth: 2,
|
|
@@ -19080,7 +19307,7 @@ const GiftCreateStartDate = props => {
|
|
|
19080
19307
|
const {
|
|
19081
19308
|
dispatch,
|
|
19082
19309
|
state
|
|
19083
|
-
} = React.useContext(store$
|
|
19310
|
+
} = React.useContext(store$6);
|
|
19084
19311
|
|
|
19085
19312
|
const handleInputChange = value => {
|
|
19086
19313
|
dispatch({
|
|
@@ -19151,7 +19378,7 @@ function GiftCreateMessage(props) {
|
|
|
19151
19378
|
const {
|
|
19152
19379
|
dispatch,
|
|
19153
19380
|
state
|
|
19154
|
-
} = React.useContext(store$
|
|
19381
|
+
} = React.useContext(store$6);
|
|
19155
19382
|
|
|
19156
19383
|
const handleInputChange = value => {
|
|
19157
19384
|
dispatch({
|
|
@@ -19271,7 +19498,7 @@ const GiftCreateModal = ({
|
|
|
19271
19498
|
};
|
|
19272
19499
|
GiftCreateModal.viewId = "gift-create";
|
|
19273
19500
|
|
|
19274
|
-
const initialState$
|
|
19501
|
+
const initialState$5 = {
|
|
19275
19502
|
giftCode: "",
|
|
19276
19503
|
buttonDisabled: true,
|
|
19277
19504
|
alert: {
|
|
@@ -19279,10 +19506,10 @@ const initialState$4 = {
|
|
|
19279
19506
|
content: ""
|
|
19280
19507
|
}
|
|
19281
19508
|
};
|
|
19282
|
-
const store$
|
|
19509
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
19283
19510
|
const {
|
|
19284
|
-
Provider: Provider$
|
|
19285
|
-
} = store$
|
|
19511
|
+
Provider: Provider$5
|
|
19512
|
+
} = store$5;
|
|
19286
19513
|
|
|
19287
19514
|
const GiftRedeemContainer = ({
|
|
19288
19515
|
style,
|
|
@@ -19347,21 +19574,21 @@ const GiftRedeemContainer = ({
|
|
|
19347
19574
|
default:
|
|
19348
19575
|
return state;
|
|
19349
19576
|
}
|
|
19350
|
-
}, initialState$
|
|
19577
|
+
}, initialState$5);
|
|
19351
19578
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19352
19579
|
style: { ...style
|
|
19353
19580
|
},
|
|
19354
19581
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19355
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19582
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
19356
19583
|
value: {
|
|
19357
19584
|
state,
|
|
19358
19585
|
dispatch
|
|
19359
19586
|
}
|
|
19360
19587
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19361
|
-
store: store$
|
|
19588
|
+
store: store$5,
|
|
19362
19589
|
key: i
|
|
19363
19590
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19364
|
-
store: store$
|
|
19591
|
+
store: store$5
|
|
19365
19592
|
})));
|
|
19366
19593
|
};
|
|
19367
19594
|
|
|
@@ -19398,7 +19625,7 @@ function GiftCode({
|
|
|
19398
19625
|
}
|
|
19399
19626
|
|
|
19400
19627
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
19401
|
-
store: store$
|
|
19628
|
+
store: store$5
|
|
19402
19629
|
}, props));
|
|
19403
19630
|
|
|
19404
19631
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19411,7 +19638,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19411
19638
|
state: {
|
|
19412
19639
|
disableSubmit
|
|
19413
19640
|
}
|
|
19414
|
-
} = React.useContext(store$
|
|
19641
|
+
} = React.useContext(store$5);
|
|
19415
19642
|
const {
|
|
19416
19643
|
t
|
|
19417
19644
|
} = useTranslation("register");
|
|
@@ -19504,7 +19731,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19504
19731
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19505
19732
|
};
|
|
19506
19733
|
|
|
19507
|
-
const initialState$
|
|
19734
|
+
const initialState$4 = {
|
|
19508
19735
|
addresses: [],
|
|
19509
19736
|
selectedAddressId: null,
|
|
19510
19737
|
isSubmitting: false,
|
|
@@ -19513,10 +19740,10 @@ const initialState$3 = {
|
|
|
19513
19740
|
content: ""
|
|
19514
19741
|
}
|
|
19515
19742
|
};
|
|
19516
|
-
const store$
|
|
19743
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
19517
19744
|
const {
|
|
19518
|
-
Provider: Provider$
|
|
19519
|
-
} = store$
|
|
19745
|
+
Provider: Provider$4
|
|
19746
|
+
} = store$4;
|
|
19520
19747
|
|
|
19521
19748
|
const AddressSelectContainer = ({
|
|
19522
19749
|
style,
|
|
@@ -19611,7 +19838,7 @@ const AddressSelectContainer = ({
|
|
|
19611
19838
|
default:
|
|
19612
19839
|
return state;
|
|
19613
19840
|
}
|
|
19614
|
-
}, initialState$
|
|
19841
|
+
}, initialState$4);
|
|
19615
19842
|
React.useEffect(() => {
|
|
19616
19843
|
var _window$Pelcro$user$r;
|
|
19617
19844
|
|
|
@@ -19624,16 +19851,16 @@ const AddressSelectContainer = ({
|
|
|
19624
19851
|
style: { ...style
|
|
19625
19852
|
},
|
|
19626
19853
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19627
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
19854
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
19628
19855
|
value: {
|
|
19629
19856
|
state,
|
|
19630
19857
|
dispatch
|
|
19631
19858
|
}
|
|
19632
19859
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19633
|
-
store: store$
|
|
19860
|
+
store: store$4,
|
|
19634
19861
|
key: i
|
|
19635
19862
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19636
|
-
store: store$
|
|
19863
|
+
store: store$4
|
|
19637
19864
|
})));
|
|
19638
19865
|
};
|
|
19639
19866
|
|
|
@@ -19644,7 +19871,7 @@ const AddressSelectList = () => {
|
|
|
19644
19871
|
addresses,
|
|
19645
19872
|
selectedAddressId
|
|
19646
19873
|
}
|
|
19647
|
-
} = React.useContext(store$
|
|
19874
|
+
} = React.useContext(store$4);
|
|
19648
19875
|
|
|
19649
19876
|
const handleAddressSelect = event => {
|
|
19650
19877
|
dispatch({
|
|
@@ -19688,7 +19915,7 @@ const AddressSelectSubmit = ({
|
|
|
19688
19915
|
selectedAddressId,
|
|
19689
19916
|
isSubmitting
|
|
19690
19917
|
}
|
|
19691
|
-
} = React.useContext(store$
|
|
19918
|
+
} = React.useContext(store$4);
|
|
19692
19919
|
const {
|
|
19693
19920
|
t
|
|
19694
19921
|
} = useTranslation("address");
|
|
@@ -19784,7 +20011,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19784
20011
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19785
20012
|
};
|
|
19786
20013
|
|
|
19787
|
-
const initialState$
|
|
20014
|
+
const initialState$3 = {
|
|
19788
20015
|
paymentMethods: [],
|
|
19789
20016
|
selectedPaymentMethodId: null,
|
|
19790
20017
|
isSubmitting: false,
|
|
@@ -19793,10 +20020,10 @@ const initialState$2 = {
|
|
|
19793
20020
|
content: ""
|
|
19794
20021
|
}
|
|
19795
20022
|
};
|
|
19796
|
-
const store$
|
|
20023
|
+
const store$3 = /*#__PURE__*/React.createContext(initialState$3);
|
|
19797
20024
|
const {
|
|
19798
|
-
Provider: Provider$
|
|
19799
|
-
} = store$
|
|
20025
|
+
Provider: Provider$3
|
|
20026
|
+
} = store$3;
|
|
19800
20027
|
|
|
19801
20028
|
const PaymentMethodSelectContainer = ({
|
|
19802
20029
|
style,
|
|
@@ -19841,7 +20068,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19841
20068
|
default:
|
|
19842
20069
|
return state;
|
|
19843
20070
|
}
|
|
19844
|
-
}, initialState$
|
|
20071
|
+
}, initialState$3);
|
|
19845
20072
|
React.useEffect(() => {
|
|
19846
20073
|
var _window$Pelcro$user$r4;
|
|
19847
20074
|
|
|
@@ -19854,16 +20081,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19854
20081
|
style: { ...style
|
|
19855
20082
|
},
|
|
19856
20083
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19857
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20084
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
|
|
19858
20085
|
value: {
|
|
19859
20086
|
state,
|
|
19860
20087
|
dispatch
|
|
19861
20088
|
}
|
|
19862
20089
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
19863
|
-
store: store$
|
|
20090
|
+
store: store$3,
|
|
19864
20091
|
key: i
|
|
19865
20092
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
19866
|
-
store: store$
|
|
20093
|
+
store: store$3
|
|
19867
20094
|
})));
|
|
19868
20095
|
};
|
|
19869
20096
|
|
|
@@ -19877,7 +20104,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19877
20104
|
paymentMethods,
|
|
19878
20105
|
selectedPaymentMethodId
|
|
19879
20106
|
}
|
|
19880
|
-
} = React.useContext(store$
|
|
20107
|
+
} = React.useContext(store$3);
|
|
19881
20108
|
|
|
19882
20109
|
const handlePaymentMethodSelect = event => {
|
|
19883
20110
|
dispatch({
|
|
@@ -19927,7 +20154,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19927
20154
|
selectedPaymentMethodId,
|
|
19928
20155
|
isSubmitting
|
|
19929
20156
|
}
|
|
19930
|
-
} = React.useContext(store$
|
|
20157
|
+
} = React.useContext(store$3);
|
|
19931
20158
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
19932
20159
|
onClick: () => {
|
|
19933
20160
|
dispatch({
|
|
@@ -20001,8 +20228,8 @@ const PaymentMethodSelectModal = ({
|
|
|
20001
20228
|
};
|
|
20002
20229
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
20003
20230
|
|
|
20004
|
-
function _extends$
|
|
20005
|
-
_extends$
|
|
20231
|
+
function _extends$i() {
|
|
20232
|
+
_extends$i = Object.assign || function (target) {
|
|
20006
20233
|
for (var i = 1; i < arguments.length; i++) {
|
|
20007
20234
|
var source = arguments[i];
|
|
20008
20235
|
|
|
@@ -20016,7 +20243,7 @@ function _extends$h() {
|
|
|
20016
20243
|
return target;
|
|
20017
20244
|
};
|
|
20018
20245
|
|
|
20019
|
-
return _extends$
|
|
20246
|
+
return _extends$i.apply(this, arguments);
|
|
20020
20247
|
}
|
|
20021
20248
|
|
|
20022
20249
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20200,7 +20427,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20200
20427
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20201
20428
|
return null;
|
|
20202
20429
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20203
|
-
return _render(_extends$
|
|
20430
|
+
return _render(_extends$i({}, _rest, {
|
|
20204
20431
|
hidden: true,
|
|
20205
20432
|
style: {
|
|
20206
20433
|
display: 'none'
|
|
@@ -20728,7 +20955,7 @@ function TransitionChild(props) {
|
|
|
20728
20955
|
var passthroughProps = rest;
|
|
20729
20956
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
20730
20957
|
value: nesting
|
|
20731
|
-
}, render(_extends$
|
|
20958
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20732
20959
|
}
|
|
20733
20960
|
|
|
20734
20961
|
function Transition(props) {
|
|
@@ -20772,7 +20999,7 @@ function Transition(props) {
|
|
|
20772
20999
|
value: nestingBag
|
|
20773
21000
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
20774
21001
|
value: transitionBag
|
|
20775
|
-
}, render(_extends$
|
|
21002
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20776
21003
|
as: React.Fragment,
|
|
20777
21004
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20778
21005
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20899,12 +21126,12 @@ var ActionTypes;
|
|
|
20899
21126
|
})(ActionTypes || (ActionTypes = {}));
|
|
20900
21127
|
|
|
20901
21128
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20902
|
-
return _extends$
|
|
21129
|
+
return _extends$i({}, state, {
|
|
20903
21130
|
activeItemIndex: null,
|
|
20904
21131
|
menuState: MenuStates.Closed
|
|
20905
21132
|
});
|
|
20906
21133
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20907
|
-
return _extends$
|
|
21134
|
+
return _extends$i({}, state, {
|
|
20908
21135
|
menuState: MenuStates.Open
|
|
20909
21136
|
});
|
|
20910
21137
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20923,7 +21150,7 @@ var ActionTypes;
|
|
|
20923
21150
|
}
|
|
20924
21151
|
});
|
|
20925
21152
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20926
|
-
return _extends$
|
|
21153
|
+
return _extends$i({}, state, {
|
|
20927
21154
|
searchQuery: '',
|
|
20928
21155
|
activeItemIndex: activeItemIndex
|
|
20929
21156
|
});
|
|
@@ -20934,19 +21161,19 @@ var ActionTypes;
|
|
|
20934
21161
|
|
|
20935
21162
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20936
21163
|
});
|
|
20937
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21164
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20938
21165
|
searchQuery: searchQuery
|
|
20939
21166
|
});
|
|
20940
|
-
return _extends$
|
|
21167
|
+
return _extends$i({}, state, {
|
|
20941
21168
|
searchQuery: searchQuery,
|
|
20942
21169
|
activeItemIndex: match
|
|
20943
21170
|
});
|
|
20944
21171
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20945
|
-
return _extends$
|
|
21172
|
+
return _extends$i({}, state, {
|
|
20946
21173
|
searchQuery: ''
|
|
20947
21174
|
});
|
|
20948
21175
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20949
|
-
return _extends$
|
|
21176
|
+
return _extends$i({}, state, {
|
|
20950
21177
|
items: [].concat(state.items, [{
|
|
20951
21178
|
id: action.id,
|
|
20952
21179
|
dataRef: action.dataRef
|
|
@@ -20959,7 +21186,7 @@ var ActionTypes;
|
|
|
20959
21186
|
return a.id === action.id;
|
|
20960
21187
|
});
|
|
20961
21188
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20962
|
-
return _extends$
|
|
21189
|
+
return _extends$i({}, state, {
|
|
20963
21190
|
items: nextItems,
|
|
20964
21191
|
activeItemIndex: function () {
|
|
20965
21192
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20998,19 +21225,19 @@ var ActionTypes$1;
|
|
|
20998
21225
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20999
21226
|
if (state.disabled) return state;
|
|
21000
21227
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21001
|
-
return _extends$
|
|
21228
|
+
return _extends$i({}, state, {
|
|
21002
21229
|
activeOptionIndex: null,
|
|
21003
21230
|
listboxState: ListboxStates.Closed
|
|
21004
21231
|
});
|
|
21005
21232
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
21006
21233
|
if (state.disabled) return state;
|
|
21007
21234
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
21008
|
-
return _extends$
|
|
21235
|
+
return _extends$i({}, state, {
|
|
21009
21236
|
listboxState: ListboxStates.Open
|
|
21010
21237
|
});
|
|
21011
21238
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
21012
21239
|
if (state.disabled === action.disabled) return state;
|
|
21013
|
-
return _extends$
|
|
21240
|
+
return _extends$i({}, state, {
|
|
21014
21241
|
disabled: action.disabled
|
|
21015
21242
|
});
|
|
21016
21243
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21031,7 +21258,7 @@ var ActionTypes$1;
|
|
|
21031
21258
|
}
|
|
21032
21259
|
});
|
|
21033
21260
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21034
|
-
return _extends$
|
|
21261
|
+
return _extends$i({}, state, {
|
|
21035
21262
|
searchQuery: '',
|
|
21036
21263
|
activeOptionIndex: activeOptionIndex
|
|
21037
21264
|
});
|
|
@@ -21044,10 +21271,10 @@ var ActionTypes$1;
|
|
|
21044
21271
|
|
|
21045
21272
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21046
21273
|
});
|
|
21047
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21274
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21048
21275
|
searchQuery: searchQuery
|
|
21049
21276
|
});
|
|
21050
|
-
return _extends$
|
|
21277
|
+
return _extends$i({}, state, {
|
|
21051
21278
|
searchQuery: searchQuery,
|
|
21052
21279
|
activeOptionIndex: match
|
|
21053
21280
|
});
|
|
@@ -21055,11 +21282,11 @@ var ActionTypes$1;
|
|
|
21055
21282
|
if (state.disabled) return state;
|
|
21056
21283
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21057
21284
|
if (state.searchQuery === '') return state;
|
|
21058
|
-
return _extends$
|
|
21285
|
+
return _extends$i({}, state, {
|
|
21059
21286
|
searchQuery: ''
|
|
21060
21287
|
});
|
|
21061
21288
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21062
|
-
return _extends$
|
|
21289
|
+
return _extends$i({}, state, {
|
|
21063
21290
|
options: [].concat(state.options, [{
|
|
21064
21291
|
id: action.id,
|
|
21065
21292
|
dataRef: action.dataRef
|
|
@@ -21072,7 +21299,7 @@ var ActionTypes$1;
|
|
|
21072
21299
|
return a.id === action.id;
|
|
21073
21300
|
});
|
|
21074
21301
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21075
|
-
return _extends$
|
|
21302
|
+
return _extends$i({}, state, {
|
|
21076
21303
|
options: nextOptions,
|
|
21077
21304
|
activeOptionIndex: function () {
|
|
21078
21305
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21133,18 +21360,18 @@ const getPaymentCardIcon = name => {
|
|
|
21133
21360
|
}));
|
|
21134
21361
|
};
|
|
21135
21362
|
|
|
21136
|
-
var _path$
|
|
21363
|
+
var _path$g;
|
|
21137
21364
|
|
|
21138
|
-
function _extends$
|
|
21365
|
+
function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
21139
21366
|
|
|
21140
21367
|
function SvgChevronRight(props) {
|
|
21141
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21368
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
21142
21369
|
className: "plc-w-6 plc-h-6",
|
|
21143
21370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21144
21371
|
fill: "none",
|
|
21145
21372
|
viewBox: "0 0 24 24",
|
|
21146
21373
|
stroke: "currentColor"
|
|
21147
|
-
}, props), _path$
|
|
21374
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21148
21375
|
strokeLinecap: "round",
|
|
21149
21376
|
strokeLinejoin: "round",
|
|
21150
21377
|
strokeWidth: 2,
|
|
@@ -21360,18 +21587,18 @@ const SavedItems = ({
|
|
|
21360
21587
|
});
|
|
21361
21588
|
};
|
|
21362
21589
|
|
|
21363
|
-
var _path$
|
|
21590
|
+
var _path$f;
|
|
21364
21591
|
|
|
21365
|
-
function _extends$
|
|
21592
|
+
function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
21366
21593
|
|
|
21367
21594
|
function SvgRefresh(props) {
|
|
21368
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21595
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
21369
21596
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21370
21597
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21371
21598
|
fill: "none",
|
|
21372
21599
|
viewBox: "0 0 24 24",
|
|
21373
21600
|
stroke: "currentColor"
|
|
21374
|
-
}, props), _path$
|
|
21601
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21375
21602
|
strokeLinecap: "round",
|
|
21376
21603
|
strokeLinejoin: "round",
|
|
21377
21604
|
strokeWidth: 2,
|
|
@@ -21379,35 +21606,35 @@ function SvgRefresh(props) {
|
|
|
21379
21606
|
})));
|
|
21380
21607
|
}
|
|
21381
21608
|
|
|
21382
|
-
var _path$
|
|
21609
|
+
var _path$e;
|
|
21383
21610
|
|
|
21384
|
-
function _extends$
|
|
21611
|
+
function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
21385
21612
|
|
|
21386
21613
|
function SvgCalendar(props) {
|
|
21387
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21614
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
21388
21615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21389
21616
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21390
21617
|
viewBox: "0 0 20 20",
|
|
21391
21618
|
fill: "currentColor"
|
|
21392
|
-
}, props), _path$
|
|
21619
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21393
21620
|
fillRule: "evenodd",
|
|
21394
21621
|
d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
|
|
21395
21622
|
clipRule: "evenodd"
|
|
21396
21623
|
})));
|
|
21397
21624
|
}
|
|
21398
21625
|
|
|
21399
|
-
var _path$
|
|
21626
|
+
var _path$d;
|
|
21400
21627
|
|
|
21401
|
-
function _extends$
|
|
21628
|
+
function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
21402
21629
|
|
|
21403
21630
|
function SvgPlus(props) {
|
|
21404
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21631
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
21405
21632
|
className: "plc-w-5 plc-h-5",
|
|
21406
21633
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21407
21634
|
fill: "none",
|
|
21408
21635
|
viewBox: "0 0 24 24",
|
|
21409
21636
|
stroke: "currentColor"
|
|
21410
|
-
}, props), _path$
|
|
21637
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21411
21638
|
strokeLinecap: "round",
|
|
21412
21639
|
strokeLinejoin: "round",
|
|
21413
21640
|
strokeWidth: 2,
|
|
@@ -21415,17 +21642,17 @@ function SvgPlus(props) {
|
|
|
21415
21642
|
})));
|
|
21416
21643
|
}
|
|
21417
21644
|
|
|
21418
|
-
var _path$
|
|
21645
|
+
var _path$c;
|
|
21419
21646
|
|
|
21420
|
-
function _extends$
|
|
21647
|
+
function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
21421
21648
|
|
|
21422
21649
|
function SvgCheckMark(props) {
|
|
21423
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21650
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
21424
21651
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21425
21652
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21426
21653
|
viewBox: "0 0 20 20",
|
|
21427
21654
|
fill: "currentColor"
|
|
21428
|
-
}, props), _path$
|
|
21655
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21429
21656
|
fillRule: "evenodd",
|
|
21430
21657
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
21431
21658
|
clipRule: "evenodd"
|
|
@@ -21720,18 +21947,18 @@ Accordion.item = function AccordionItem({
|
|
|
21720
21947
|
}, content)) : null;
|
|
21721
21948
|
};
|
|
21722
21949
|
|
|
21723
|
-
var _path$
|
|
21950
|
+
var _path$b;
|
|
21724
21951
|
|
|
21725
|
-
function _extends$
|
|
21952
|
+
function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
21726
21953
|
|
|
21727
21954
|
function SvgExit(props) {
|
|
21728
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21955
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
21729
21956
|
className: "plc-w-6 plc-h-6",
|
|
21730
21957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21731
21958
|
fill: "none",
|
|
21732
21959
|
viewBox: "0 0 24 24",
|
|
21733
21960
|
stroke: "currentColor"
|
|
21734
|
-
}, props), _path$
|
|
21961
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21735
21962
|
strokeLinecap: "round",
|
|
21736
21963
|
strokeLinejoin: "round",
|
|
21737
21964
|
strokeWidth: 2,
|
|
@@ -21739,13 +21966,32 @@ function SvgExit(props) {
|
|
|
21739
21966
|
})));
|
|
21740
21967
|
}
|
|
21741
21968
|
|
|
21742
|
-
var _path$
|
|
21969
|
+
var _path$a;
|
|
21743
21970
|
|
|
21744
|
-
function _extends$
|
|
21971
|
+
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); }
|
|
21745
21972
|
|
|
21746
21973
|
function SvgUser(props) {
|
|
21974
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
21975
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21976
|
+
fill: "none",
|
|
21977
|
+
viewBox: "0 0 24 24",
|
|
21978
|
+
stroke: "currentColor"
|
|
21979
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21980
|
+
strokeLinecap: "round",
|
|
21981
|
+
strokeLinejoin: "round",
|
|
21982
|
+
strokeWidth: 2,
|
|
21983
|
+
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"
|
|
21984
|
+
})));
|
|
21985
|
+
}
|
|
21986
|
+
|
|
21987
|
+
var _path$9;
|
|
21988
|
+
|
|
21989
|
+
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); }
|
|
21990
|
+
|
|
21991
|
+
function SvgNewsletter(props) {
|
|
21747
21992
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
21748
21993
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21994
|
+
className: "plc-h-5 plc-w-5",
|
|
21749
21995
|
fill: "none",
|
|
21750
21996
|
viewBox: "0 0 24 24",
|
|
21751
21997
|
stroke: "currentColor"
|
|
@@ -21753,7 +21999,7 @@ function SvgUser(props) {
|
|
|
21753
21999
|
strokeLinecap: "round",
|
|
21754
22000
|
strokeLinejoin: "round",
|
|
21755
22001
|
strokeWidth: 2,
|
|
21756
|
-
d: "
|
|
22002
|
+
d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
|
|
21757
22003
|
})));
|
|
21758
22004
|
}
|
|
21759
22005
|
|
|
@@ -21761,10 +22007,10 @@ var _path$8;
|
|
|
21761
22007
|
|
|
21762
22008
|
function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
21763
22009
|
|
|
21764
|
-
function
|
|
22010
|
+
function SvgDocument(props) {
|
|
21765
22011
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
21766
22012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21767
|
-
className: "plc-h-
|
|
22013
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21768
22014
|
fill: "none",
|
|
21769
22015
|
viewBox: "0 0 24 24",
|
|
21770
22016
|
stroke: "currentColor"
|
|
@@ -21772,7 +22018,7 @@ function SvgNewsletter(props) {
|
|
|
21772
22018
|
strokeLinecap: "round",
|
|
21773
22019
|
strokeLinejoin: "round",
|
|
21774
22020
|
strokeWidth: 2,
|
|
21775
|
-
d: "
|
|
22021
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
21776
22022
|
})));
|
|
21777
22023
|
}
|
|
21778
22024
|
|
|
@@ -21950,6 +22196,130 @@ function formatStartDate(date) {
|
|
|
21950
22196
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21951
22197
|
}
|
|
21952
22198
|
|
|
22199
|
+
const InvoicesMenu = props => {
|
|
22200
|
+
const {
|
|
22201
|
+
t
|
|
22202
|
+
} = useTranslation("dashboard");
|
|
22203
|
+
return /*#__PURE__*/React__default['default'].createElement("table", {
|
|
22204
|
+
className: "plc-w-full plc-table-fixed"
|
|
22205
|
+
}, /*#__PURE__*/React__default['default'].createElement("thead", {
|
|
22206
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22207
|
+
}, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22208
|
+
className: "plc-w-4/12 "
|
|
22209
|
+
}, t("labels.details")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22210
|
+
className: "plc-w-4/12 "
|
|
22211
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default['default'].createElement("th", {
|
|
22212
|
+
className: "plc-w-3/12 "
|
|
22213
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22214
|
+
className: "plc-h-4"
|
|
22215
|
+
}), /*#__PURE__*/React__default['default'].createElement(InvoicesItems, props)));
|
|
22216
|
+
};
|
|
22217
|
+
|
|
22218
|
+
const InvoicesItems = () => {
|
|
22219
|
+
var _window$Pelcro$invoic;
|
|
22220
|
+
|
|
22221
|
+
const {
|
|
22222
|
+
t
|
|
22223
|
+
} = useTranslation("dashboard");
|
|
22224
|
+
const {
|
|
22225
|
+
setInvoice,
|
|
22226
|
+
switchView
|
|
22227
|
+
} = usePelcro();
|
|
22228
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22229
|
+
|
|
22230
|
+
const showInvoiceDetails = event => {
|
|
22231
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22232
|
+
switchView("invoice-details");
|
|
22233
|
+
}
|
|
22234
|
+
};
|
|
22235
|
+
|
|
22236
|
+
if (invoices.length === 0) return null;
|
|
22237
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22238
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22239
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22240
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", {
|
|
22241
|
+
key: invoice.id,
|
|
22242
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22243
|
+
}, /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22244
|
+
className: "plc-truncate"
|
|
22245
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22246
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22247
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22248
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22249
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22250
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22251
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22252
|
+
className: "plc-py-2"
|
|
22253
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22254
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22255
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
22256
|
+
variant: "ghost",
|
|
22257
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22258
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, {
|
|
22259
|
+
className: "plc-w-4 plc-h-4"
|
|
22260
|
+
}),
|
|
22261
|
+
onClick: showInvoiceDetails,
|
|
22262
|
+
"data-id": invoice.id
|
|
22263
|
+
}, t("labels.view"))));
|
|
22264
|
+
});
|
|
22265
|
+
};
|
|
22266
|
+
|
|
22267
|
+
function getInvoiceStatus(invoice) {
|
|
22268
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22269
|
+
returnObjects: true
|
|
22270
|
+
});
|
|
22271
|
+
|
|
22272
|
+
switch (invoice.status) {
|
|
22273
|
+
case "paid":
|
|
22274
|
+
return {
|
|
22275
|
+
textColor: "plc-text-green-700",
|
|
22276
|
+
bgColor: "plc-bg-green-100",
|
|
22277
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null),
|
|
22278
|
+
title: translations.paid
|
|
22279
|
+
};
|
|
22280
|
+
|
|
22281
|
+
case "past_due":
|
|
22282
|
+
return {
|
|
22283
|
+
textColor: "plc-text-orange-700",
|
|
22284
|
+
bgColor: "plc-bg-orange-100",
|
|
22285
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22286
|
+
title: translations.pastDue
|
|
22287
|
+
};
|
|
22288
|
+
|
|
22289
|
+
case "open":
|
|
22290
|
+
return {
|
|
22291
|
+
textColor: "plc-text-yellow-700",
|
|
22292
|
+
bgColor: "plc-bg-yellow-100",
|
|
22293
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null),
|
|
22294
|
+
title: translations.open
|
|
22295
|
+
};
|
|
22296
|
+
|
|
22297
|
+
case "draft":
|
|
22298
|
+
return {
|
|
22299
|
+
textColor: "plc-text-blue-700",
|
|
22300
|
+
bgColor: "plc-bg-blue-100",
|
|
22301
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
22302
|
+
title: translations.draft
|
|
22303
|
+
};
|
|
22304
|
+
|
|
22305
|
+
case "uncollectible":
|
|
22306
|
+
return {
|
|
22307
|
+
textColor: "plc-text-red-700",
|
|
22308
|
+
bgColor: "plc-bg-red-100",
|
|
22309
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22310
|
+
title: translations.uncollectible
|
|
22311
|
+
};
|
|
22312
|
+
|
|
22313
|
+
case "void":
|
|
22314
|
+
return {
|
|
22315
|
+
textColor: "plc-text-gray-700",
|
|
22316
|
+
bgColor: "plc-bg-gray-100",
|
|
22317
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgXIconSolid, null),
|
|
22318
|
+
title: translations.void
|
|
22319
|
+
};
|
|
22320
|
+
}
|
|
22321
|
+
}
|
|
22322
|
+
|
|
21953
22323
|
const SUB_MENUS = {
|
|
21954
22324
|
PROFILE: "profile",
|
|
21955
22325
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21958,6 +22328,7 @@ const SUB_MENUS = {
|
|
|
21958
22328
|
ADDRESSES: "addresses",
|
|
21959
22329
|
GIFTS: "gifts",
|
|
21960
22330
|
ORDERS: "orders",
|
|
22331
|
+
INVOICES: "invoices",
|
|
21961
22332
|
SAVED_ITEMS: "saved-items"
|
|
21962
22333
|
};
|
|
21963
22334
|
/**
|
|
@@ -22500,6 +22871,12 @@ class Dashboard extends React.Component {
|
|
|
22500
22871
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
|
|
22501
22872
|
title: this.locale("labels.orders.label"),
|
|
22502
22873
|
content: /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null)
|
|
22874
|
+
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22875
|
+
show: hasInvoices(),
|
|
22876
|
+
name: SUB_MENUS.INVOICES,
|
|
22877
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
|
|
22878
|
+
title: this.locale("labels.invoices"),
|
|
22879
|
+
content: /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null)
|
|
22503
22880
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
22504
22881
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22505
22882
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
|
|
@@ -22515,6 +22892,13 @@ class Dashboard extends React.Component {
|
|
|
22515
22892
|
|
|
22516
22893
|
}
|
|
22517
22894
|
|
|
22895
|
+
function hasInvoices() {
|
|
22896
|
+
var _window$Pelcro$invoic;
|
|
22897
|
+
|
|
22898
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22899
|
+
return invoices.length > 0;
|
|
22900
|
+
}
|
|
22901
|
+
|
|
22518
22902
|
function hasDonationSubs() {
|
|
22519
22903
|
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22520
22904
|
|
|
@@ -22549,7 +22933,7 @@ const DashboardOpenButton = () => {
|
|
|
22549
22933
|
};
|
|
22550
22934
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22551
22935
|
|
|
22552
|
-
const initialState$
|
|
22936
|
+
const initialState$2 = {
|
|
22553
22937
|
imageSrc: null,
|
|
22554
22938
|
crop: {
|
|
22555
22939
|
x: 0,
|
|
@@ -22563,10 +22947,10 @@ const initialState$1 = {
|
|
|
22563
22947
|
content: ""
|
|
22564
22948
|
}
|
|
22565
22949
|
};
|
|
22566
|
-
const store$
|
|
22950
|
+
const store$2 = /*#__PURE__*/React.createContext(initialState$2);
|
|
22567
22951
|
const {
|
|
22568
|
-
Provider: Provider$
|
|
22569
|
-
} = store$
|
|
22952
|
+
Provider: Provider$2
|
|
22953
|
+
} = store$2;
|
|
22570
22954
|
|
|
22571
22955
|
const ProfilePicChangeContainer = ({
|
|
22572
22956
|
style,
|
|
@@ -22700,21 +23084,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22700
23084
|
default:
|
|
22701
23085
|
return state;
|
|
22702
23086
|
}
|
|
22703
|
-
}, initialState$
|
|
23087
|
+
}, initialState$2);
|
|
22704
23088
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22705
23089
|
style: { ...style
|
|
22706
23090
|
},
|
|
22707
23091
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22708
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23092
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
|
|
22709
23093
|
value: {
|
|
22710
23094
|
state,
|
|
22711
23095
|
dispatch
|
|
22712
23096
|
}
|
|
22713
23097
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22714
|
-
store: store$
|
|
23098
|
+
store: store$2,
|
|
22715
23099
|
key: i
|
|
22716
23100
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22717
|
-
store: store$
|
|
23101
|
+
store: store$2
|
|
22718
23102
|
})));
|
|
22719
23103
|
};
|
|
22720
23104
|
/**
|
|
@@ -22776,7 +23160,7 @@ const ProfilePicChangeButton = ({
|
|
|
22776
23160
|
isSubmitting
|
|
22777
23161
|
},
|
|
22778
23162
|
dispatch
|
|
22779
|
-
} = React.useContext(store$
|
|
23163
|
+
} = React.useContext(store$2);
|
|
22780
23164
|
const {
|
|
22781
23165
|
t
|
|
22782
23166
|
} = useTranslation("userEdit");
|
|
@@ -24144,7 +24528,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24144
24528
|
zoom
|
|
24145
24529
|
},
|
|
24146
24530
|
dispatch
|
|
24147
|
-
} = React.useContext(store$
|
|
24531
|
+
} = React.useContext(store$2);
|
|
24148
24532
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24149
24533
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24150
24534
|
}, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
|
|
@@ -24186,7 +24570,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24186
24570
|
zoom
|
|
24187
24571
|
},
|
|
24188
24572
|
dispatch
|
|
24189
|
-
} = React.useContext(store$
|
|
24573
|
+
} = React.useContext(store$2);
|
|
24190
24574
|
const {
|
|
24191
24575
|
t
|
|
24192
24576
|
} = useTranslation("userEdit");
|
|
@@ -24238,7 +24622,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24238
24622
|
state: {
|
|
24239
24623
|
isSubmitting
|
|
24240
24624
|
}
|
|
24241
|
-
} = React.useContext(store$
|
|
24625
|
+
} = React.useContext(store$2);
|
|
24242
24626
|
const {
|
|
24243
24627
|
t
|
|
24244
24628
|
} = useTranslation("userEdit");
|
|
@@ -24280,7 +24664,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24280
24664
|
state: {
|
|
24281
24665
|
isSubmitting
|
|
24282
24666
|
}
|
|
24283
|
-
} = React.useContext(store$
|
|
24667
|
+
} = React.useContext(store$2);
|
|
24284
24668
|
const {
|
|
24285
24669
|
t
|
|
24286
24670
|
} = useTranslation("userEdit");
|
|
@@ -24303,7 +24687,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24303
24687
|
state: {
|
|
24304
24688
|
imageSrc
|
|
24305
24689
|
}
|
|
24306
|
-
} = React.useContext(store$
|
|
24690
|
+
} = React.useContext(store$2);
|
|
24307
24691
|
const {
|
|
24308
24692
|
t
|
|
24309
24693
|
} = useTranslation("userEdit");
|
|
@@ -24365,17 +24749,17 @@ function ProfilePicChangeModal({
|
|
|
24365
24749
|
}
|
|
24366
24750
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24367
24751
|
|
|
24368
|
-
const initialState = {
|
|
24752
|
+
const initialState$1 = {
|
|
24369
24753
|
isSubmitting: false,
|
|
24370
24754
|
alert: {
|
|
24371
24755
|
type: "error",
|
|
24372
24756
|
content: ""
|
|
24373
24757
|
}
|
|
24374
24758
|
};
|
|
24375
|
-
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24759
|
+
const store$1 = /*#__PURE__*/React.createContext(initialState$1);
|
|
24376
24760
|
const {
|
|
24377
|
-
Provider
|
|
24378
|
-
} = store;
|
|
24761
|
+
Provider: Provider$1
|
|
24762
|
+
} = store$1;
|
|
24379
24763
|
|
|
24380
24764
|
const EmailVerifyContainer = ({
|
|
24381
24765
|
style,
|
|
@@ -24438,21 +24822,21 @@ const EmailVerifyContainer = ({
|
|
|
24438
24822
|
default:
|
|
24439
24823
|
return state;
|
|
24440
24824
|
}
|
|
24441
|
-
}, initialState);
|
|
24825
|
+
}, initialState$1);
|
|
24442
24826
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24443
24827
|
style: { ...style
|
|
24444
24828
|
},
|
|
24445
24829
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24446
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
24830
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
|
|
24447
24831
|
value: {
|
|
24448
24832
|
state,
|
|
24449
24833
|
dispatch
|
|
24450
24834
|
}
|
|
24451
24835
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24452
|
-
store,
|
|
24836
|
+
store: store$1,
|
|
24453
24837
|
key: i
|
|
24454
24838
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24455
|
-
store
|
|
24839
|
+
store: store$1
|
|
24456
24840
|
})));
|
|
24457
24841
|
};
|
|
24458
24842
|
|
|
@@ -24466,7 +24850,7 @@ const EmailVerifyResendButton = ({
|
|
|
24466
24850
|
state: {
|
|
24467
24851
|
isSubmitting
|
|
24468
24852
|
}
|
|
24469
|
-
} = React.useContext(store);
|
|
24853
|
+
} = React.useContext(store$1);
|
|
24470
24854
|
const {
|
|
24471
24855
|
t
|
|
24472
24856
|
} = useTranslation("verifyEmail");
|
|
@@ -24541,6 +24925,235 @@ const EmailVerifyModal = ({
|
|
|
24541
24925
|
};
|
|
24542
24926
|
EmailVerifyModal.viewId = "email-verify";
|
|
24543
24927
|
|
|
24928
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
24929
|
+
type: "invoicePayment",
|
|
24930
|
+
className: "pelcro-invoice-payment-container"
|
|
24931
|
+
}, props));
|
|
24932
|
+
|
|
24933
|
+
const InvoicePaymentView = props => {
|
|
24934
|
+
const {
|
|
24935
|
+
t
|
|
24936
|
+
} = useTranslation("payment");
|
|
24937
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24938
|
+
id: "pelcro-invoice-payment-view"
|
|
24939
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24940
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24941
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
24942
|
+
action: "javascript:void(0);",
|
|
24943
|
+
className: "plc-mt-2 pelcro-form"
|
|
24944
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, Object.assign({
|
|
24945
|
+
type: "invoicePayment",
|
|
24946
|
+
showCoupon: false,
|
|
24947
|
+
showExternalPaymentMethods: true
|
|
24948
|
+
}, props))));
|
|
24949
|
+
};
|
|
24950
|
+
|
|
24951
|
+
const InvoicePaymentModal = ({
|
|
24952
|
+
onDisplay,
|
|
24953
|
+
onClose,
|
|
24954
|
+
...otherProps
|
|
24955
|
+
}) => {
|
|
24956
|
+
const {
|
|
24957
|
+
switchView
|
|
24958
|
+
} = usePelcro();
|
|
24959
|
+
|
|
24960
|
+
const onSuccess = () => {
|
|
24961
|
+
var _otherProps$onSuccess;
|
|
24962
|
+
|
|
24963
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
24964
|
+
return switchView("subscription-success");
|
|
24965
|
+
};
|
|
24966
|
+
|
|
24967
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
24968
|
+
id: "pelcro-invoice-payment-modal",
|
|
24969
|
+
onDisplay: onDisplay,
|
|
24970
|
+
onClose: onClose
|
|
24971
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
24972
|
+
onSuccess: onSuccess
|
|
24973
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
24974
|
+
};
|
|
24975
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
24976
|
+
|
|
24977
|
+
const invoicePaymentSubmitButton = props => {
|
|
24978
|
+
return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
|
|
24979
|
+
};
|
|
24980
|
+
|
|
24981
|
+
const initialState = {};
|
|
24982
|
+
const store = /*#__PURE__*/React.createContext(initialState);
|
|
24983
|
+
const {
|
|
24984
|
+
Provider
|
|
24985
|
+
} = store;
|
|
24986
|
+
|
|
24987
|
+
const InvoiceDetailsContainer = ({
|
|
24988
|
+
style,
|
|
24989
|
+
className = "",
|
|
24990
|
+
onSuccess = () => {},
|
|
24991
|
+
children,
|
|
24992
|
+
...props
|
|
24993
|
+
}) => {
|
|
24994
|
+
const onPayButtonClick = () => {
|
|
24995
|
+
return onSuccess();
|
|
24996
|
+
};
|
|
24997
|
+
|
|
24998
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
24999
|
+
switch (action.type) {
|
|
25000
|
+
case HANDLE_SUBMIT:
|
|
25001
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
25002
|
+
|
|
25003
|
+
default:
|
|
25004
|
+
return state;
|
|
25005
|
+
}
|
|
25006
|
+
}, initialState);
|
|
25007
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25008
|
+
style: { ...style
|
|
25009
|
+
},
|
|
25010
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
25011
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider, {
|
|
25012
|
+
value: {
|
|
25013
|
+
state,
|
|
25014
|
+
dispatch
|
|
25015
|
+
}
|
|
25016
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25017
|
+
store,
|
|
25018
|
+
key: i
|
|
25019
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25020
|
+
store
|
|
25021
|
+
})));
|
|
25022
|
+
};
|
|
25023
|
+
|
|
25024
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25025
|
+
name,
|
|
25026
|
+
url,
|
|
25027
|
+
className,
|
|
25028
|
+
...otherProps
|
|
25029
|
+
}) => {
|
|
25030
|
+
const {
|
|
25031
|
+
t
|
|
25032
|
+
} = useTranslation("invoiceDetails");
|
|
25033
|
+
const {
|
|
25034
|
+
invoice
|
|
25035
|
+
} = usePelcro();
|
|
25036
|
+
return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
|
|
25037
|
+
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}`,
|
|
25038
|
+
id: "pelcro-download-invoice-link",
|
|
25039
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25040
|
+
target: "_blank",
|
|
25041
|
+
rel: "noopener noreferrer"
|
|
25042
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25043
|
+
};
|
|
25044
|
+
|
|
25045
|
+
const InvoiceDetailsPayButton = ({
|
|
25046
|
+
name,
|
|
25047
|
+
onClick,
|
|
25048
|
+
...otherProps
|
|
25049
|
+
}) => {
|
|
25050
|
+
const {
|
|
25051
|
+
dispatch
|
|
25052
|
+
} = React.useContext(store);
|
|
25053
|
+
const {
|
|
25054
|
+
t
|
|
25055
|
+
} = useTranslation("invoiceDetails");
|
|
25056
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
25057
|
+
onClick: () => {
|
|
25058
|
+
dispatch({
|
|
25059
|
+
type: HANDLE_SUBMIT
|
|
25060
|
+
});
|
|
25061
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25062
|
+
}
|
|
25063
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25064
|
+
};
|
|
25065
|
+
|
|
25066
|
+
const InvoiceDetailsView = props => {
|
|
25067
|
+
const {
|
|
25068
|
+
t
|
|
25069
|
+
} = useTranslation("invoiceDetails");
|
|
25070
|
+
const {
|
|
25071
|
+
invoice
|
|
25072
|
+
} = usePelcro();
|
|
25073
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25074
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25075
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25076
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25077
|
+
id: "pelcro-invoice-details-view"
|
|
25078
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25079
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25080
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
25081
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25082
|
+
}, t("title"))), /*#__PURE__*/React__default['default'].createElement("form", {
|
|
25083
|
+
action: "javascript:void(0);",
|
|
25084
|
+
className: "plc-mt-2 pelcro-form"
|
|
25085
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25086
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25087
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25088
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25089
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25090
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25091
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25092
|
+
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"
|
|
25093
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25094
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25095
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25096
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25097
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25098
|
+
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"
|
|
25099
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25100
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25101
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25102
|
+
className: "pelcro-invoice-total-text"
|
|
25103
|
+
}, t("labels.total")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25104
|
+
className: "pelcro-invoice-total-text"
|
|
25105
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25106
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25107
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25108
|
+
className: "plc-flex plc-flex-col"
|
|
25109
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25110
|
+
className: "pelcro-invoice-total"
|
|
25111
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25112
|
+
className: "pelcro-invoice-total"
|
|
25113
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
25114
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25115
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25116
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25117
|
+
}, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsDownloadButton, {
|
|
25118
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25119
|
+
className: "plc-w-full plc-text-center"
|
|
25120
|
+
}), showPayButton && /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsPayButton, {
|
|
25121
|
+
role: "submit",
|
|
25122
|
+
className: "plc-ml-4 plc-w-full",
|
|
25123
|
+
id: "pelcro-submit"
|
|
25124
|
+
})))));
|
|
25125
|
+
};
|
|
25126
|
+
|
|
25127
|
+
function canPayInvoice(invoice) {
|
|
25128
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25129
|
+
}
|
|
25130
|
+
|
|
25131
|
+
const InvoiceDetailsModal = ({
|
|
25132
|
+
onDisplay,
|
|
25133
|
+
onClose,
|
|
25134
|
+
...otherProps
|
|
25135
|
+
}) => {
|
|
25136
|
+
const {
|
|
25137
|
+
switchToPaymentView
|
|
25138
|
+
} = usePelcro();
|
|
25139
|
+
|
|
25140
|
+
const onSuccess = () => {
|
|
25141
|
+
var _otherProps$onSuccess;
|
|
25142
|
+
|
|
25143
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25144
|
+
switchToPaymentView();
|
|
25145
|
+
};
|
|
25146
|
+
|
|
25147
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
25148
|
+
onDisplay: onDisplay,
|
|
25149
|
+
onClose: onClose,
|
|
25150
|
+
id: "pelcro-invoice-details-modal"
|
|
25151
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25152
|
+
onSuccess: onSuccess
|
|
25153
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
25154
|
+
};
|
|
25155
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25156
|
+
|
|
24544
25157
|
exports.AddressCreateCity = AddressCreateCity;
|
|
24545
25158
|
exports.AddressCreateContainer = AddressCreateContainer;
|
|
24546
25159
|
exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
|
|
@@ -24616,6 +25229,14 @@ exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
|
|
|
24616
25229
|
exports.GiftRedeemView = GiftRedeemView;
|
|
24617
25230
|
exports.GoogleLoginButton = GoogleLoginButton;
|
|
24618
25231
|
exports.Input = Input;
|
|
25232
|
+
exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
|
|
25233
|
+
exports.InvoiceDetailsDownloadButton = InvoiceDetailsDownloadButton;
|
|
25234
|
+
exports.InvoiceDetailsModal = InvoiceDetailsModal;
|
|
25235
|
+
exports.InvoiceDetailsPayButton = InvoiceDetailsPayButton;
|
|
25236
|
+
exports.InvoiceDetailsView = InvoiceDetailsView;
|
|
25237
|
+
exports.InvoicePaymentContainer = InvoicePaymentContainer;
|
|
25238
|
+
exports.InvoicePaymentModal = InvoicePaymentModal;
|
|
25239
|
+
exports.InvoicePaymentView = InvoicePaymentView;
|
|
24619
25240
|
exports.Link = Link;
|
|
24620
25241
|
exports.LoginButton = LoginButton;
|
|
24621
25242
|
exports.LoginContainer = LoginContainer;
|
|
@@ -24731,6 +25352,7 @@ exports.authenticatedButtons = authenticatedButtons;
|
|
|
24731
25352
|
exports.i18n = i18next;
|
|
24732
25353
|
exports.initButtons = init$1;
|
|
24733
25354
|
exports.initContentEntitlement = init;
|
|
25355
|
+
exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
|
|
24734
25356
|
exports.notify = notify;
|
|
24735
25357
|
exports.unauthenticatedButtons = unauthenticatedButtons;
|
|
24736
25358
|
exports.usePelcro = usePelcro;
|