@pelcro/react-pelcro-js 3.0.0-beta.3 → 3.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1112 -483
- package/dist/index.esm.js +1104 -484
- package/dist/pelcro.css +48 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3216,7 +3216,7 @@ var validation$1 = {
|
|
|
3216
3216
|
enterEmail: "Un courriel est requis.",
|
|
3217
3217
|
enterPassword: "Mot de passe requis."
|
|
3218
3218
|
};
|
|
3219
|
-
var buttons$
|
|
3219
|
+
var buttons$9 = {
|
|
3220
3220
|
account: "Accès abonné(e)s",
|
|
3221
3221
|
login: "Se connecter"
|
|
3222
3222
|
};
|
|
@@ -3293,7 +3293,7 @@ var confirm$5 = {
|
|
|
3293
3293
|
};
|
|
3294
3294
|
var common_fr = {
|
|
3295
3295
|
validation: validation$1,
|
|
3296
|
-
buttons: buttons$
|
|
3296
|
+
buttons: buttons$9,
|
|
3297
3297
|
dashboard: dashboard$1,
|
|
3298
3298
|
select: select$3,
|
|
3299
3299
|
confirm: confirm$5
|
|
@@ -3304,7 +3304,7 @@ var validation = {
|
|
|
3304
3304
|
enterEmail: "Email address is required.",
|
|
3305
3305
|
enterPassword: "Password is required."
|
|
3306
3306
|
};
|
|
3307
|
-
var buttons$
|
|
3307
|
+
var buttons$8 = {
|
|
3308
3308
|
account: "My account",
|
|
3309
3309
|
login: "Login"
|
|
3310
3310
|
};
|
|
@@ -3381,7 +3381,7 @@ var confirm$4 = {
|
|
|
3381
3381
|
};
|
|
3382
3382
|
var common_en = {
|
|
3383
3383
|
validation: validation,
|
|
3384
|
-
buttons: buttons$
|
|
3384
|
+
buttons: buttons$8,
|
|
3385
3385
|
dashboard: dashboard,
|
|
3386
3386
|
select: select$2,
|
|
3387
3387
|
confirm: confirm$4
|
|
@@ -3431,10 +3431,10 @@ var paymentMethod_fr = {
|
|
|
3431
3431
|
select: select
|
|
3432
3432
|
};
|
|
3433
3433
|
|
|
3434
|
-
var title$
|
|
3434
|
+
var title$f = "Enter your email to subscribe to our newsletter";
|
|
3435
3435
|
var updateTitle$1 = "Update newsletter selections";
|
|
3436
3436
|
var subtitle$7 = "We may use your email for other marketing communication";
|
|
3437
|
-
var labels$
|
|
3437
|
+
var labels$p = {
|
|
3438
3438
|
submit: "Submit",
|
|
3439
3439
|
firstName: "First name",
|
|
3440
3440
|
lastName: "Last name",
|
|
@@ -3450,17 +3450,17 @@ var messages$r = {
|
|
|
3450
3450
|
here: "here"
|
|
3451
3451
|
};
|
|
3452
3452
|
var newsletter_en = {
|
|
3453
|
-
title: title$
|
|
3453
|
+
title: title$f,
|
|
3454
3454
|
updateTitle: updateTitle$1,
|
|
3455
3455
|
subtitle: subtitle$7,
|
|
3456
|
-
labels: labels$
|
|
3456
|
+
labels: labels$p,
|
|
3457
3457
|
messages: messages$r
|
|
3458
3458
|
};
|
|
3459
3459
|
|
|
3460
|
-
var title$
|
|
3460
|
+
var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
3461
3461
|
var updateTitle = "Mettre à jour son choix d'infolettres";
|
|
3462
3462
|
var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
|
|
3463
|
-
var labels$
|
|
3463
|
+
var labels$o = {
|
|
3464
3464
|
submit: "Lire l’article !",
|
|
3465
3465
|
firstName: "Prénom",
|
|
3466
3466
|
lastName: "Nom de famille",
|
|
@@ -3476,14 +3476,14 @@ var messages$q = {
|
|
|
3476
3476
|
here: "ici"
|
|
3477
3477
|
};
|
|
3478
3478
|
var newsletter_fr = {
|
|
3479
|
-
title: title$
|
|
3479
|
+
title: title$e,
|
|
3480
3480
|
updateTitle: updateTitle,
|
|
3481
3481
|
subtitle: subtitle$6,
|
|
3482
|
-
labels: labels$
|
|
3482
|
+
labels: labels$o,
|
|
3483
3483
|
messages: messages$q
|
|
3484
3484
|
};
|
|
3485
3485
|
|
|
3486
|
-
var labels$
|
|
3486
|
+
var labels$n = {
|
|
3487
3487
|
"continue": "Continue to content"
|
|
3488
3488
|
};
|
|
3489
3489
|
var messages$p = {
|
|
@@ -3502,18 +3502,22 @@ var messages$p = {
|
|
|
3502
3502
|
giftRedeem: {
|
|
3503
3503
|
title: "Congratulations",
|
|
3504
3504
|
content: "You have successfully redeemed your gift subscription. Enjoy!"
|
|
3505
|
+
},
|
|
3506
|
+
invoicePayment: {
|
|
3507
|
+
title: "Invoice paid successfully",
|
|
3508
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3505
3509
|
}
|
|
3506
3510
|
};
|
|
3507
3511
|
var errors$9 = {
|
|
3508
3512
|
"": ""
|
|
3509
3513
|
};
|
|
3510
3514
|
var success_en = {
|
|
3511
|
-
labels: labels$
|
|
3515
|
+
labels: labels$n,
|
|
3512
3516
|
messages: messages$p,
|
|
3513
3517
|
errors: errors$9
|
|
3514
3518
|
};
|
|
3515
3519
|
|
|
3516
|
-
var labels$
|
|
3520
|
+
var labels$m = {
|
|
3517
3521
|
"continue": "Abonnement réussi !"
|
|
3518
3522
|
};
|
|
3519
3523
|
var messages$o = {
|
|
@@ -3532,13 +3536,17 @@ var messages$o = {
|
|
|
3532
3536
|
giftRedeem: {
|
|
3533
3537
|
title: "Félicitations",
|
|
3534
3538
|
content: "Vous avez validé votre abonnement cadeau. Profitez-en!"
|
|
3539
|
+
},
|
|
3540
|
+
invoicePayment: {
|
|
3541
|
+
title: "Invoice paid successfully",
|
|
3542
|
+
content: "Please contact us if you have any questions or concerns."
|
|
3535
3543
|
}
|
|
3536
3544
|
};
|
|
3537
3545
|
var errors$8 = {
|
|
3538
3546
|
"": ""
|
|
3539
3547
|
};
|
|
3540
3548
|
var success_fr = {
|
|
3541
|
-
labels: labels$
|
|
3549
|
+
labels: labels$m,
|
|
3542
3550
|
messages: messages$o,
|
|
3543
3551
|
errors: errors$8
|
|
3544
3552
|
};
|
|
@@ -3575,7 +3583,7 @@ var messages$l = {
|
|
|
3575
3583
|
youAreSafe: "You're safe - PCI compliant 128 SSL by",
|
|
3576
3584
|
bankRedirection: "Please hold, redirecting you to your bank."
|
|
3577
3585
|
};
|
|
3578
|
-
var labels$
|
|
3586
|
+
var labels$l = {
|
|
3579
3587
|
card: "Enter card number",
|
|
3580
3588
|
date: "Expiration date",
|
|
3581
3589
|
CVC: "CVC",
|
|
@@ -3595,14 +3603,14 @@ var labels$j = {
|
|
|
3595
3603
|
};
|
|
3596
3604
|
var checkoutForm_en = {
|
|
3597
3605
|
messages: messages$l,
|
|
3598
|
-
labels: labels$
|
|
3606
|
+
labels: labels$l
|
|
3599
3607
|
};
|
|
3600
3608
|
|
|
3601
3609
|
var messages$k = {
|
|
3602
3610
|
youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
|
|
3603
3611
|
bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
|
|
3604
3612
|
};
|
|
3605
|
-
var labels$
|
|
3613
|
+
var labels$k = {
|
|
3606
3614
|
card: "Entrez le numéro de carte",
|
|
3607
3615
|
date: "Date d’expiration",
|
|
3608
3616
|
CVC: "CVC",
|
|
@@ -3622,7 +3630,7 @@ var labels$i = {
|
|
|
3622
3630
|
};
|
|
3623
3631
|
var checkoutForm_fr = {
|
|
3624
3632
|
messages: messages$k,
|
|
3625
|
-
labels: labels$
|
|
3633
|
+
labels: labels$k
|
|
3626
3634
|
};
|
|
3627
3635
|
|
|
3628
3636
|
var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
|
|
@@ -3631,13 +3639,15 @@ var giftSent$1 = "Subscription gift has been sent to";
|
|
|
3631
3639
|
var successfully$1 = "successfully";
|
|
3632
3640
|
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.";
|
|
3633
3641
|
var recaptcha$1 = "This site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <3>Terms of Service</3> apply.";
|
|
3642
|
+
var invalidInvoice$1 = "Invalid invoice ID, please contact support";
|
|
3634
3643
|
var messages_en = {
|
|
3635
3644
|
youAreSafe: youAreSafe$1,
|
|
3636
3645
|
cancel: cancel$1,
|
|
3637
3646
|
giftSent: giftSent$1,
|
|
3638
3647
|
successfully: successfully$1,
|
|
3639
3648
|
entitlement: entitlement$1,
|
|
3640
|
-
recaptcha: recaptcha$1
|
|
3649
|
+
recaptcha: recaptcha$1,
|
|
3650
|
+
invalidInvoice: invalidInvoice$1
|
|
3641
3651
|
};
|
|
3642
3652
|
|
|
3643
3653
|
var youAreSafe = "Vous êtes en sécurité - PCI conforme 128 SSL par";
|
|
@@ -3646,16 +3656,18 @@ var giftSent = "Le cadeau d’abonnement a été envoyé à";
|
|
|
3646
3656
|
var successfully = "avec succès.";
|
|
3647
3657
|
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";
|
|
3648
3658
|
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.";
|
|
3659
|
+
var invalidInvoice = "Invalid invoice ID, please contact support";
|
|
3649
3660
|
var messages_fr = {
|
|
3650
3661
|
youAreSafe: youAreSafe,
|
|
3651
3662
|
cancel: cancel,
|
|
3652
3663
|
giftSent: giftSent,
|
|
3653
3664
|
successfully: successfully,
|
|
3654
3665
|
entitlement: entitlement,
|
|
3655
|
-
recaptcha: recaptcha
|
|
3666
|
+
recaptcha: recaptcha,
|
|
3667
|
+
invalidInvoice: invalidInvoice
|
|
3656
3668
|
};
|
|
3657
3669
|
|
|
3658
|
-
var labels$
|
|
3670
|
+
var labels$j = {
|
|
3659
3671
|
email: "Enter email",
|
|
3660
3672
|
password: "Enter password",
|
|
3661
3673
|
required: "required",
|
|
@@ -3682,12 +3694,12 @@ var errors$5 = {
|
|
|
3682
3694
|
"": ""
|
|
3683
3695
|
};
|
|
3684
3696
|
var login_en = {
|
|
3685
|
-
labels: labels$
|
|
3697
|
+
labels: labels$j,
|
|
3686
3698
|
messages: messages$j,
|
|
3687
3699
|
errors: errors$5
|
|
3688
3700
|
};
|
|
3689
3701
|
|
|
3690
|
-
var labels$
|
|
3702
|
+
var labels$i = {
|
|
3691
3703
|
email: "Entrez votre adresse courriel",
|
|
3692
3704
|
password: "Entrez votre mot de passe",
|
|
3693
3705
|
required: "Champs obligatoires",
|
|
@@ -3714,14 +3726,14 @@ var errors$4 = {
|
|
|
3714
3726
|
"": ""
|
|
3715
3727
|
};
|
|
3716
3728
|
var login_fr = {
|
|
3717
|
-
labels: labels$
|
|
3729
|
+
labels: labels$i,
|
|
3718
3730
|
messages: messages$i,
|
|
3719
3731
|
errors: errors$4
|
|
3720
3732
|
};
|
|
3721
3733
|
|
|
3722
|
-
var title$
|
|
3734
|
+
var title$d = "Create an account";
|
|
3723
3735
|
var subtitle$5 = "Enter your email and password below";
|
|
3724
|
-
var labels$
|
|
3736
|
+
var labels$h = {
|
|
3725
3737
|
signUpFacebook: "Sign up with Facebook",
|
|
3726
3738
|
signUpGoogle: "Sign up with Google",
|
|
3727
3739
|
signUpEmail: "Sign up with Email",
|
|
@@ -3805,18 +3817,18 @@ var redeem$1 = {
|
|
|
3805
3817
|
}
|
|
3806
3818
|
};
|
|
3807
3819
|
var register_en = {
|
|
3808
|
-
title: title$
|
|
3820
|
+
title: title$d,
|
|
3809
3821
|
subtitle: subtitle$5,
|
|
3810
|
-
labels: labels$
|
|
3822
|
+
labels: labels$h,
|
|
3811
3823
|
messages: messages$h,
|
|
3812
3824
|
errors: errors$3,
|
|
3813
3825
|
gift: gift$1,
|
|
3814
3826
|
redeem: redeem$1
|
|
3815
3827
|
};
|
|
3816
3828
|
|
|
3817
|
-
var title$
|
|
3829
|
+
var title$c = "Créer un compte";
|
|
3818
3830
|
var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
|
|
3819
|
-
var labels$
|
|
3831
|
+
var labels$g = {
|
|
3820
3832
|
signUpFacebook: "Inscrivez-vous avec Facebook",
|
|
3821
3833
|
signUpGoogle: "Inscrivez-vous avec Google",
|
|
3822
3834
|
signUpEmail: "Inscrivez-vous avec votre courriel",
|
|
@@ -3901,16 +3913,16 @@ var redeem = {
|
|
|
3901
3913
|
}
|
|
3902
3914
|
};
|
|
3903
3915
|
var register_fr = {
|
|
3904
|
-
title: title$
|
|
3916
|
+
title: title$c,
|
|
3905
3917
|
subtitle: subtitle$4,
|
|
3906
|
-
labels: labels$
|
|
3918
|
+
labels: labels$g,
|
|
3907
3919
|
messages: messages$g,
|
|
3908
3920
|
errors: errors$2,
|
|
3909
3921
|
gift: gift,
|
|
3910
3922
|
redeem: redeem
|
|
3911
3923
|
};
|
|
3912
3924
|
|
|
3913
|
-
var labels$
|
|
3925
|
+
var labels$f = {
|
|
3914
3926
|
title: "Want to update your profile?",
|
|
3915
3927
|
subtitle: "Enter your information below to update your profile",
|
|
3916
3928
|
email: "Email",
|
|
@@ -3932,11 +3944,11 @@ var messages$f = {
|
|
|
3932
3944
|
pictureUpdated: "Your profile picture was updated successfully."
|
|
3933
3945
|
};
|
|
3934
3946
|
var userEdit_en = {
|
|
3935
|
-
labels: labels$
|
|
3947
|
+
labels: labels$f,
|
|
3936
3948
|
messages: messages$f
|
|
3937
3949
|
};
|
|
3938
3950
|
|
|
3939
|
-
var labels$
|
|
3951
|
+
var labels$e = {
|
|
3940
3952
|
title: "Voulez-vous mettre à jour votre profil ?",
|
|
3941
3953
|
subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
|
|
3942
3954
|
email: "Address courriel",
|
|
@@ -3958,14 +3970,14 @@ var messages$e = {
|
|
|
3958
3970
|
pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
|
|
3959
3971
|
};
|
|
3960
3972
|
var userEdit_fr = {
|
|
3961
|
-
labels: labels$
|
|
3973
|
+
labels: labels$e,
|
|
3962
3974
|
messages: messages$e
|
|
3963
3975
|
};
|
|
3964
3976
|
|
|
3965
|
-
var title$
|
|
3977
|
+
var title$b = "Enter your shipping address";
|
|
3966
3978
|
var selectAddressTitle$1 = "Please select an address";
|
|
3967
3979
|
var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
|
|
3968
|
-
var labels$
|
|
3980
|
+
var labels$d = {
|
|
3969
3981
|
address: "Address",
|
|
3970
3982
|
code: "Postal Code/Zip",
|
|
3971
3983
|
city: "City",
|
|
@@ -3975,7 +3987,7 @@ var labels$b = {
|
|
|
3975
3987
|
lastName: "Last name",
|
|
3976
3988
|
required: "required"
|
|
3977
3989
|
};
|
|
3978
|
-
var buttons$
|
|
3990
|
+
var buttons$7 = {
|
|
3979
3991
|
submit: "Submit",
|
|
3980
3992
|
selectAddress: "Select address",
|
|
3981
3993
|
addAddress: "Add new address"
|
|
@@ -3985,18 +3997,18 @@ var messages$d = {
|
|
|
3985
3997
|
subRedeemed: "Your subscription has been redeemed."
|
|
3986
3998
|
};
|
|
3987
3999
|
var address_en = {
|
|
3988
|
-
title: title$
|
|
4000
|
+
title: title$b,
|
|
3989
4001
|
selectAddressTitle: selectAddressTitle$1,
|
|
3990
4002
|
selectAddressSubtitle: selectAddressSubtitle$1,
|
|
3991
|
-
labels: labels$
|
|
3992
|
-
buttons: buttons$
|
|
4003
|
+
labels: labels$d,
|
|
4004
|
+
buttons: buttons$7,
|
|
3993
4005
|
messages: messages$d
|
|
3994
4006
|
};
|
|
3995
4007
|
|
|
3996
|
-
var title$
|
|
4008
|
+
var title$a = "Entrez votre adresse de livraison";
|
|
3997
4009
|
var selectAddressTitle = "Veuillez sélectionner une adresse";
|
|
3998
4010
|
var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
|
|
3999
|
-
var labels$
|
|
4011
|
+
var labels$c = {
|
|
4000
4012
|
address: "Adresse",
|
|
4001
4013
|
code: "Code postal / Zip",
|
|
4002
4014
|
city: "Ville",
|
|
@@ -4006,7 +4018,7 @@ var labels$a = {
|
|
|
4006
4018
|
lastName: "Nom de famille",
|
|
4007
4019
|
required: "Champs obligatoires"
|
|
4008
4020
|
};
|
|
4009
|
-
var buttons$
|
|
4021
|
+
var buttons$6 = {
|
|
4010
4022
|
submit: "Valider",
|
|
4011
4023
|
selectAddress: "Choisir cette adresse",
|
|
4012
4024
|
addAddress: "Ajouter une nouvelle adresse"
|
|
@@ -4016,15 +4028,15 @@ var messages$c = {
|
|
|
4016
4028
|
subRedeemed: "Votre abonnement a bien été activé."
|
|
4017
4029
|
};
|
|
4018
4030
|
var address_fr = {
|
|
4019
|
-
title: title$
|
|
4031
|
+
title: title$a,
|
|
4020
4032
|
selectAddressTitle: selectAddressTitle,
|
|
4021
4033
|
selectAddressSubtitle: selectAddressSubtitle,
|
|
4022
|
-
labels: labels$
|
|
4023
|
-
buttons: buttons$
|
|
4034
|
+
labels: labels$c,
|
|
4035
|
+
buttons: buttons$6,
|
|
4024
4036
|
messages: messages$c
|
|
4025
4037
|
};
|
|
4026
4038
|
|
|
4027
|
-
var title$
|
|
4039
|
+
var title$9 = "Reset your password";
|
|
4028
4040
|
var subtitle$3 = "Enter a new password below";
|
|
4029
4041
|
var email$3 = "Email";
|
|
4030
4042
|
var password$3 = "Password";
|
|
@@ -4033,7 +4045,7 @@ var submit$5 = "Submit";
|
|
|
4033
4045
|
var required$5 = "Required";
|
|
4034
4046
|
var passwordUpdated$1 = "Password has been updated, please login with the new password";
|
|
4035
4047
|
var passwordReset_en = {
|
|
4036
|
-
title: title$
|
|
4048
|
+
title: title$9,
|
|
4037
4049
|
subtitle: subtitle$3,
|
|
4038
4050
|
email: email$3,
|
|
4039
4051
|
password: password$3,
|
|
@@ -4043,7 +4055,7 @@ var passwordReset_en = {
|
|
|
4043
4055
|
passwordUpdated: passwordUpdated$1
|
|
4044
4056
|
};
|
|
4045
4057
|
|
|
4046
|
-
var title$
|
|
4058
|
+
var title$8 = "Réinitialiser votre mot de passe";
|
|
4047
4059
|
var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
|
|
4048
4060
|
var email$2 = "Adresse courriel";
|
|
4049
4061
|
var password$2 = "Mot de passe";
|
|
@@ -4052,7 +4064,7 @@ var submit$4 = "Soumettre";
|
|
|
4052
4064
|
var required$4 = "Champs obligatoires";
|
|
4053
4065
|
var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
|
|
4054
4066
|
var passwordReset_fr = {
|
|
4055
|
-
title: title$
|
|
4067
|
+
title: title$8,
|
|
4056
4068
|
subtitle: subtitle$2,
|
|
4057
4069
|
email: email$2,
|
|
4058
4070
|
password: password$2,
|
|
@@ -4062,7 +4074,7 @@ var passwordReset_fr = {
|
|
|
4062
4074
|
passwordUpdated: passwordUpdated
|
|
4063
4075
|
};
|
|
4064
4076
|
|
|
4065
|
-
var title$
|
|
4077
|
+
var title$7 = "Forgot your password?";
|
|
4066
4078
|
var email$1 = "Email";
|
|
4067
4079
|
var password$1 = "Password";
|
|
4068
4080
|
var submit$3 = "Submit";
|
|
@@ -4073,7 +4085,7 @@ var messages$b = {
|
|
|
4073
4085
|
loginHere: "login here."
|
|
4074
4086
|
};
|
|
4075
4087
|
var passwordForgot_en = {
|
|
4076
|
-
title: title$
|
|
4088
|
+
title: title$7,
|
|
4077
4089
|
email: email$1,
|
|
4078
4090
|
password: password$1,
|
|
4079
4091
|
submit: submit$3,
|
|
@@ -4082,7 +4094,7 @@ var passwordForgot_en = {
|
|
|
4082
4094
|
messages: messages$b
|
|
4083
4095
|
};
|
|
4084
4096
|
|
|
4085
|
-
var title$
|
|
4097
|
+
var title$6 = "Mot de passe oublié ?";
|
|
4086
4098
|
var email = "Courriel";
|
|
4087
4099
|
var password = "Mot de passe";
|
|
4088
4100
|
var submit$2 = "Soumettre";
|
|
@@ -4093,7 +4105,7 @@ var messages$a = {
|
|
|
4093
4105
|
loginHere: "Connectez-vous ici"
|
|
4094
4106
|
};
|
|
4095
4107
|
var passwordForgot_fr = {
|
|
4096
|
-
title: title$
|
|
4108
|
+
title: title$6,
|
|
4097
4109
|
email: email,
|
|
4098
4110
|
password: password,
|
|
4099
4111
|
submit: submit$2,
|
|
@@ -4102,7 +4114,7 @@ var passwordForgot_fr = {
|
|
|
4102
4114
|
messages: messages$a
|
|
4103
4115
|
};
|
|
4104
4116
|
|
|
4105
|
-
var title$
|
|
4117
|
+
var title$5 = "Change your password";
|
|
4106
4118
|
var currentPassword$1 = "Current password";
|
|
4107
4119
|
var newPassword$1 = "New password";
|
|
4108
4120
|
var confirmNewPassword$1 = "Confirm new password";
|
|
@@ -4112,7 +4124,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
|
|
|
4112
4124
|
var passwordsNotMatching$1 = "Passwords don't match";
|
|
4113
4125
|
var weakPassword$1 = "Your password must contain at least 6 characters";
|
|
4114
4126
|
var passwordChange_en = {
|
|
4115
|
-
title: title$
|
|
4127
|
+
title: title$5,
|
|
4116
4128
|
currentPassword: currentPassword$1,
|
|
4117
4129
|
newPassword: newPassword$1,
|
|
4118
4130
|
confirmNewPassword: confirmNewPassword$1,
|
|
@@ -4123,7 +4135,7 @@ var passwordChange_en = {
|
|
|
4123
4135
|
weakPassword: weakPassword$1
|
|
4124
4136
|
};
|
|
4125
4137
|
|
|
4126
|
-
var title$
|
|
4138
|
+
var title$4 = "Changez votre mot de passe";
|
|
4127
4139
|
var currentPassword = "Mot de passe actuel";
|
|
4128
4140
|
var newPassword = "Nouveau mot de passe";
|
|
4129
4141
|
var confirmNewPassword = "Confirmer le nouveau mot de passe";
|
|
@@ -4133,7 +4145,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
|
|
|
4133
4145
|
var passwordsNotMatching = "Les mots de passe ne correspondent pas";
|
|
4134
4146
|
var weakPassword = "Votre mot de passe doit contenir au moins 6";
|
|
4135
4147
|
var passwordChange_fr = {
|
|
4136
|
-
title: title$
|
|
4148
|
+
title: title$4,
|
|
4137
4149
|
currentPassword: currentPassword,
|
|
4138
4150
|
newPassword: newPassword,
|
|
4139
4151
|
confirmNewPassword: confirmNewPassword,
|
|
@@ -4144,7 +4156,7 @@ var passwordChange_fr = {
|
|
|
4144
4156
|
weakPassword: weakPassword
|
|
4145
4157
|
};
|
|
4146
4158
|
|
|
4147
|
-
var title$
|
|
4159
|
+
var title$3 = "Votre panier";
|
|
4148
4160
|
var subtitle$1 = "Terminez votre achat ci-dessous";
|
|
4149
4161
|
var name$1 = "Produit";
|
|
4150
4162
|
var quantity$1 = "Quantité";
|
|
@@ -4156,7 +4168,7 @@ var confirm$3 = "Passer à la caisse";
|
|
|
4156
4168
|
var empty$1 = "Votre panier est vide.";
|
|
4157
4169
|
var removeAll$1 = "Vider";
|
|
4158
4170
|
var cart_fr = {
|
|
4159
|
-
title: title$
|
|
4171
|
+
title: title$3,
|
|
4160
4172
|
subtitle: subtitle$1,
|
|
4161
4173
|
name: name$1,
|
|
4162
4174
|
quantity: quantity$1,
|
|
@@ -4169,7 +4181,7 @@ var cart_fr = {
|
|
|
4169
4181
|
removeAll: removeAll$1
|
|
4170
4182
|
};
|
|
4171
4183
|
|
|
4172
|
-
var title = "Your shopping cart";
|
|
4184
|
+
var title$2 = "Your shopping cart";
|
|
4173
4185
|
var subtitle = "Comple your purchase below";
|
|
4174
4186
|
var name = "Name";
|
|
4175
4187
|
var quantity = "Quantity";
|
|
@@ -4181,7 +4193,7 @@ var confirm$2 = "Checkout";
|
|
|
4181
4193
|
var empty = "Your cart is empty.";
|
|
4182
4194
|
var removeAll = "Remove all";
|
|
4183
4195
|
var cart_en = {
|
|
4184
|
-
title: title,
|
|
4196
|
+
title: title$2,
|
|
4185
4197
|
subtitle: subtitle,
|
|
4186
4198
|
name: name,
|
|
4187
4199
|
quantity: quantity,
|
|
@@ -4194,7 +4206,7 @@ var cart_en = {
|
|
|
4194
4206
|
removeAll: removeAll
|
|
4195
4207
|
};
|
|
4196
4208
|
|
|
4197
|
-
var buttons$
|
|
4209
|
+
var buttons$5 = {
|
|
4198
4210
|
select: "Select",
|
|
4199
4211
|
added: "Added to cart",
|
|
4200
4212
|
purchase: "Purchase",
|
|
@@ -4209,17 +4221,17 @@ var messages$9 = {
|
|
|
4209
4221
|
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.",
|
|
4210
4222
|
currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
|
|
4211
4223
|
};
|
|
4212
|
-
var labels$
|
|
4224
|
+
var labels$b = {
|
|
4213
4225
|
summary: "Order summary",
|
|
4214
4226
|
total: "total"
|
|
4215
4227
|
};
|
|
4216
4228
|
var shop_en = {
|
|
4217
|
-
buttons: buttons$
|
|
4229
|
+
buttons: buttons$5,
|
|
4218
4230
|
messages: messages$9,
|
|
4219
|
-
labels: labels$
|
|
4231
|
+
labels: labels$b
|
|
4220
4232
|
};
|
|
4221
4233
|
|
|
4222
|
-
var buttons$
|
|
4234
|
+
var buttons$4 = {
|
|
4223
4235
|
select: "Choisir",
|
|
4224
4236
|
added: "Ajouté au panier",
|
|
4225
4237
|
purchase: "Acheter",
|
|
@@ -4234,17 +4246,17 @@ var messages$8 = {
|
|
|
4234
4246
|
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.",
|
|
4235
4247
|
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."
|
|
4236
4248
|
};
|
|
4237
|
-
var labels$
|
|
4249
|
+
var labels$a = {
|
|
4238
4250
|
summary: "récapitulatif de commande",
|
|
4239
4251
|
total: "total"
|
|
4240
4252
|
};
|
|
4241
4253
|
var shop_fr = {
|
|
4242
|
-
buttons: buttons$
|
|
4254
|
+
buttons: buttons$4,
|
|
4243
4255
|
messages: messages$8,
|
|
4244
|
-
labels: labels$
|
|
4256
|
+
labels: labels$a
|
|
4245
4257
|
};
|
|
4246
4258
|
|
|
4247
|
-
var labels$
|
|
4259
|
+
var labels$9 = {
|
|
4248
4260
|
cardNumber: "Numéro de carte",
|
|
4249
4261
|
securityCode: "Code de sécurité",
|
|
4250
4262
|
submit: "Soumettre",
|
|
@@ -4279,12 +4291,12 @@ var errors$1 = {
|
|
|
4279
4291
|
"": ""
|
|
4280
4292
|
};
|
|
4281
4293
|
var payment_fr = {
|
|
4282
|
-
labels: labels$
|
|
4294
|
+
labels: labels$9,
|
|
4283
4295
|
messages: messages$7,
|
|
4284
4296
|
errors: errors$1
|
|
4285
4297
|
};
|
|
4286
4298
|
|
|
4287
|
-
var labels$
|
|
4299
|
+
var labels$8 = {
|
|
4288
4300
|
cardNumber: "Card number",
|
|
4289
4301
|
securityCode: "Security Code",
|
|
4290
4302
|
submit: "Submit",
|
|
@@ -4319,12 +4331,12 @@ var errors = {
|
|
|
4319
4331
|
"": ""
|
|
4320
4332
|
};
|
|
4321
4333
|
var payment_en = {
|
|
4322
|
-
labels: labels$
|
|
4334
|
+
labels: labels$8,
|
|
4323
4335
|
messages: messages$6,
|
|
4324
4336
|
errors: errors
|
|
4325
4337
|
};
|
|
4326
4338
|
|
|
4327
|
-
var labels$
|
|
4339
|
+
var labels$7 = {
|
|
4328
4340
|
menu: "Pelcro Menu",
|
|
4329
4341
|
name: "Name",
|
|
4330
4342
|
email: "Email",
|
|
@@ -4349,6 +4361,15 @@ var labels$5 = {
|
|
|
4349
4361
|
purchases: "Purchases",
|
|
4350
4362
|
subscriptions: "Subscriptions",
|
|
4351
4363
|
donations: "Donations",
|
|
4364
|
+
invoices: "Invoices",
|
|
4365
|
+
details: "Details",
|
|
4366
|
+
view: "View",
|
|
4367
|
+
paid: "Paid",
|
|
4368
|
+
open: "Open",
|
|
4369
|
+
draft: "Draft",
|
|
4370
|
+
uncollectible: "Uncollectible",
|
|
4371
|
+
"void": "Void",
|
|
4372
|
+
pastDue: "Past due",
|
|
4352
4373
|
updatePaymentSource: "Update",
|
|
4353
4374
|
profile: "Profile",
|
|
4354
4375
|
updateProfile: "Edit profile",
|
|
@@ -4401,11 +4422,11 @@ var messages$5 = {
|
|
|
4401
4422
|
}
|
|
4402
4423
|
};
|
|
4403
4424
|
var dashboard_en = {
|
|
4404
|
-
labels: labels$
|
|
4425
|
+
labels: labels$7,
|
|
4405
4426
|
messages: messages$5
|
|
4406
4427
|
};
|
|
4407
4428
|
|
|
4408
|
-
var labels$
|
|
4429
|
+
var labels$6 = {
|
|
4409
4430
|
menu: "Menu Pelcro",
|
|
4410
4431
|
name: "Nom",
|
|
4411
4432
|
email: "Courriel",
|
|
@@ -4430,6 +4451,15 @@ var labels$4 = {
|
|
|
4430
4451
|
purchases: "Achats",
|
|
4431
4452
|
subscriptions: "Abonnements",
|
|
4432
4453
|
donations: "Des dons",
|
|
4454
|
+
invoices: "Invoices",
|
|
4455
|
+
details: "Details",
|
|
4456
|
+
view: "View",
|
|
4457
|
+
paid: "Paid",
|
|
4458
|
+
open: "open",
|
|
4459
|
+
draft: "Draft",
|
|
4460
|
+
uncollectible: "Uncollectible",
|
|
4461
|
+
"void": "Void",
|
|
4462
|
+
pastDue: "Past due",
|
|
4433
4463
|
updatePaymentSource: "Mettre à jour la source de paiement",
|
|
4434
4464
|
profile: "Profil",
|
|
4435
4465
|
updateProfile: "Mettre à jour le profil",
|
|
@@ -4482,7 +4512,7 @@ var messages$4 = {
|
|
|
4482
4512
|
}
|
|
4483
4513
|
};
|
|
4484
4514
|
var dashboard_fr = {
|
|
4485
|
-
labels: labels$
|
|
4515
|
+
labels: labels$6,
|
|
4486
4516
|
messages: messages$4
|
|
4487
4517
|
};
|
|
4488
4518
|
|
|
@@ -4491,7 +4521,7 @@ var messages$3 = {
|
|
|
4491
4521
|
loginHere: "Login here",
|
|
4492
4522
|
checkbox: "Check this box to gift this subscription"
|
|
4493
4523
|
};
|
|
4494
|
-
var labels$
|
|
4524
|
+
var labels$5 = {
|
|
4495
4525
|
plan: {
|
|
4496
4526
|
title: "Subscribe to a plan",
|
|
4497
4527
|
subtitle: "Select one of the plans below and click on next."
|
|
@@ -4508,15 +4538,15 @@ var labels$3 = {
|
|
|
4508
4538
|
or: "Or take a look at some of our other options below"
|
|
4509
4539
|
}
|
|
4510
4540
|
};
|
|
4511
|
-
var buttons$
|
|
4541
|
+
var buttons$3 = {
|
|
4512
4542
|
next: "Next",
|
|
4513
4543
|
select: "Select",
|
|
4514
4544
|
back: "Back"
|
|
4515
4545
|
};
|
|
4516
4546
|
var select_en = {
|
|
4517
4547
|
messages: messages$3,
|
|
4518
|
-
labels: labels$
|
|
4519
|
-
buttons: buttons$
|
|
4548
|
+
labels: labels$5,
|
|
4549
|
+
buttons: buttons$3
|
|
4520
4550
|
};
|
|
4521
4551
|
|
|
4522
4552
|
var messages$2 = {
|
|
@@ -4524,7 +4554,7 @@ var messages$2 = {
|
|
|
4524
4554
|
loginHere: "Connectez-vous ici",
|
|
4525
4555
|
checkbox: "Cochez cette case pour offrir cet abonnement"
|
|
4526
4556
|
};
|
|
4527
|
-
var labels$
|
|
4557
|
+
var labels$4 = {
|
|
4528
4558
|
plan: {
|
|
4529
4559
|
title: "Abonnez-vous à un plan",
|
|
4530
4560
|
subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
|
|
@@ -4541,15 +4571,15 @@ var labels$2 = {
|
|
|
4541
4571
|
or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
|
|
4542
4572
|
}
|
|
4543
4573
|
};
|
|
4544
|
-
var buttons = {
|
|
4574
|
+
var buttons$2 = {
|
|
4545
4575
|
next: "Prochain",
|
|
4546
4576
|
select: "Choisir",
|
|
4547
4577
|
back: "Retour"
|
|
4548
4578
|
};
|
|
4549
4579
|
var select_fr = {
|
|
4550
4580
|
messages: messages$2,
|
|
4551
|
-
labels: labels$
|
|
4552
|
-
buttons: buttons
|
|
4581
|
+
labels: labels$4,
|
|
4582
|
+
buttons: buttons$2
|
|
4553
4583
|
};
|
|
4554
4584
|
|
|
4555
4585
|
var confirm$1 = {
|
|
@@ -4572,7 +4602,7 @@ var notification_fr = {
|
|
|
4572
4602
|
confirm: confirm
|
|
4573
4603
|
};
|
|
4574
4604
|
|
|
4575
|
-
var labels$
|
|
4605
|
+
var labels$3 = {
|
|
4576
4606
|
title: "Verify your email",
|
|
4577
4607
|
instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
|
|
4578
4608
|
resend: "Resend email"
|
|
@@ -4582,11 +4612,11 @@ var messages$1 = {
|
|
|
4582
4612
|
success: "Email verified successfully!"
|
|
4583
4613
|
};
|
|
4584
4614
|
var verifyEmail_en = {
|
|
4585
|
-
labels: labels$
|
|
4615
|
+
labels: labels$3,
|
|
4586
4616
|
messages: messages$1
|
|
4587
4617
|
};
|
|
4588
4618
|
|
|
4589
|
-
var labels = {
|
|
4619
|
+
var labels$2 = {
|
|
4590
4620
|
title: "Vérifiez votre e-mail",
|
|
4591
4621
|
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:",
|
|
4592
4622
|
resend: "Ré-envoyer l'email"
|
|
@@ -4596,10 +4626,46 @@ var messages = {
|
|
|
4596
4626
|
success: "Email vérifié avec succès!"
|
|
4597
4627
|
};
|
|
4598
4628
|
var verifyEmail_fr = {
|
|
4599
|
-
labels: labels,
|
|
4629
|
+
labels: labels$2,
|
|
4600
4630
|
messages: messages
|
|
4601
4631
|
};
|
|
4602
4632
|
|
|
4633
|
+
var title$1 = "Invoice details";
|
|
4634
|
+
var labels$1 = {
|
|
4635
|
+
summary: "Summary",
|
|
4636
|
+
total: "Total",
|
|
4637
|
+
amountPaid: "Amount paid",
|
|
4638
|
+
amountDue: "Amount due",
|
|
4639
|
+
creationDate: "Created on:"
|
|
4640
|
+
};
|
|
4641
|
+
var buttons$1 = {
|
|
4642
|
+
download: "Download",
|
|
4643
|
+
pay: "Pay now"
|
|
4644
|
+
};
|
|
4645
|
+
var invoiceDetails_en = {
|
|
4646
|
+
title: title$1,
|
|
4647
|
+
labels: labels$1,
|
|
4648
|
+
buttons: buttons$1
|
|
4649
|
+
};
|
|
4650
|
+
|
|
4651
|
+
var title = "Invoice details";
|
|
4652
|
+
var labels = {
|
|
4653
|
+
summary: "Summary",
|
|
4654
|
+
total: "Total",
|
|
4655
|
+
amountPaid: "Amount paid",
|
|
4656
|
+
amountDue: "Amount due",
|
|
4657
|
+
creationDate: "Created on:"
|
|
4658
|
+
};
|
|
4659
|
+
var buttons = {
|
|
4660
|
+
download: "Download",
|
|
4661
|
+
pay: "Pay now"
|
|
4662
|
+
};
|
|
4663
|
+
var invoiceDetails_fr = {
|
|
4664
|
+
title: title,
|
|
4665
|
+
labels: labels,
|
|
4666
|
+
buttons: buttons
|
|
4667
|
+
};
|
|
4668
|
+
|
|
4603
4669
|
function create$1(createState) {
|
|
4604
4670
|
let state;
|
|
4605
4671
|
const listeners = new Set();
|
|
@@ -5949,7 +6015,7 @@ class PelcroActions {
|
|
|
5949
6015
|
view,
|
|
5950
6016
|
cartItems,
|
|
5951
6017
|
...otherStateFields
|
|
5952
|
-
} = initialState$
|
|
6018
|
+
} = initialState$i;
|
|
5953
6019
|
this.set(otherStateFields);
|
|
5954
6020
|
});
|
|
5955
6021
|
|
|
@@ -5993,10 +6059,11 @@ class PelcroActions {
|
|
|
5993
6059
|
resetView,
|
|
5994
6060
|
switchToCheckoutForm,
|
|
5995
6061
|
product,
|
|
5996
|
-
order
|
|
6062
|
+
order,
|
|
6063
|
+
invoice
|
|
5997
6064
|
} = this.get();
|
|
5998
6065
|
|
|
5999
|
-
if (product || order) {
|
|
6066
|
+
if (product || order || invoice) {
|
|
6000
6067
|
// direct user to stripe checkout form when there are no existing cards
|
|
6001
6068
|
if (!userHasPaymentMethod()) {
|
|
6002
6069
|
return switchToCheckoutForm();
|
|
@@ -6013,7 +6080,8 @@ class PelcroActions {
|
|
|
6013
6080
|
switchView,
|
|
6014
6081
|
product,
|
|
6015
6082
|
subscriptionIdToRenew,
|
|
6016
|
-
order
|
|
6083
|
+
order,
|
|
6084
|
+
invoice
|
|
6017
6085
|
} = this.get();
|
|
6018
6086
|
|
|
6019
6087
|
if (product && subscriptionIdToRenew) {
|
|
@@ -6027,6 +6095,10 @@ class PelcroActions {
|
|
|
6027
6095
|
if (order) {
|
|
6028
6096
|
return switchView("order-create");
|
|
6029
6097
|
}
|
|
6098
|
+
|
|
6099
|
+
if (invoice) {
|
|
6100
|
+
return switchView("invoice-payment");
|
|
6101
|
+
}
|
|
6030
6102
|
});
|
|
6031
6103
|
|
|
6032
6104
|
_defineProperty$3(this, "switchToAddressView", () => {
|
|
@@ -6057,6 +6129,23 @@ class PelcroActions {
|
|
|
6057
6129
|
});
|
|
6058
6130
|
});
|
|
6059
6131
|
|
|
6132
|
+
_defineProperty$3(this, "setInvoice", id => {
|
|
6133
|
+
var _window$Pelcro$invoic;
|
|
6134
|
+
|
|
6135
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
6136
|
+
const invoice = invoices.find(inv => String(inv.id) === String(id));
|
|
6137
|
+
|
|
6138
|
+
if (!invoice) {
|
|
6139
|
+
console.error("invalid invoice id");
|
|
6140
|
+
return false;
|
|
6141
|
+
}
|
|
6142
|
+
|
|
6143
|
+
this.set({
|
|
6144
|
+
invoice
|
|
6145
|
+
});
|
|
6146
|
+
return true;
|
|
6147
|
+
});
|
|
6148
|
+
|
|
6060
6149
|
_defineProperty$3(this, "logout", () => {
|
|
6061
6150
|
var _ReactGA$event;
|
|
6062
6151
|
|
|
@@ -6245,7 +6334,7 @@ class PelcroCallbacks {
|
|
|
6245
6334
|
|
|
6246
6335
|
}
|
|
6247
6336
|
|
|
6248
|
-
const initialState$
|
|
6337
|
+
const initialState$i = {
|
|
6249
6338
|
// View
|
|
6250
6339
|
view: null,
|
|
6251
6340
|
// Plans
|
|
@@ -6260,6 +6349,8 @@ const initialState$h = {
|
|
|
6260
6349
|
cartItems: [],
|
|
6261
6350
|
order: null,
|
|
6262
6351
|
// null | SKU[] | SKU,
|
|
6352
|
+
// invoices
|
|
6353
|
+
invoice: null,
|
|
6263
6354
|
// User
|
|
6264
6355
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
6265
6356
|
selectedPaymentMethodId: null,
|
|
@@ -6273,7 +6364,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
6273
6364
|
return {
|
|
6274
6365
|
// Store setter
|
|
6275
6366
|
set,
|
|
6276
|
-
...initialState$
|
|
6367
|
+
...initialState$i,
|
|
6277
6368
|
// State actions
|
|
6278
6369
|
...actions,
|
|
6279
6370
|
// Callbacks
|
|
@@ -6424,7 +6515,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
6424
6515
|
*/
|
|
6425
6516
|
|
|
6426
6517
|
const isValidViewFromURL = viewID => {
|
|
6427
|
-
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()) {
|
|
6518
|
+
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()) {
|
|
6428
6519
|
return true;
|
|
6429
6520
|
}
|
|
6430
6521
|
|
|
@@ -6651,7 +6742,8 @@ const resources = {
|
|
|
6651
6742
|
payment: payment_en,
|
|
6652
6743
|
dashboard: dashboard_en,
|
|
6653
6744
|
select: select_en,
|
|
6654
|
-
notification: notification_en
|
|
6745
|
+
notification: notification_en,
|
|
6746
|
+
invoiceDetails: invoiceDetails_en
|
|
6655
6747
|
},
|
|
6656
6748
|
fr: {
|
|
6657
6749
|
common: common_fr,
|
|
@@ -6674,7 +6766,8 @@ const resources = {
|
|
|
6674
6766
|
payment: payment_fr,
|
|
6675
6767
|
dashboard: dashboard_fr,
|
|
6676
6768
|
select: select_fr,
|
|
6677
|
-
notification: notification_fr
|
|
6769
|
+
notification: notification_fr,
|
|
6770
|
+
invoiceDetails: invoiceDetails_fr
|
|
6678
6771
|
}
|
|
6679
6772
|
}; // set UI language to the page language or default to the language in site settings
|
|
6680
6773
|
|
|
@@ -6965,8 +7058,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
6965
7058
|
|
|
6966
7059
|
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}}
|
|
6967
7060
|
|
|
6968
|
-
function _extends$
|
|
6969
|
-
_extends$
|
|
7061
|
+
function _extends$z() {
|
|
7062
|
+
_extends$z = Object.assign || function (target) {
|
|
6970
7063
|
for (var i = 1; i < arguments.length; i++) {
|
|
6971
7064
|
var source = arguments[i];
|
|
6972
7065
|
|
|
@@ -6980,7 +7073,7 @@ function _extends$y() {
|
|
|
6980
7073
|
return target;
|
|
6981
7074
|
};
|
|
6982
7075
|
|
|
6983
|
-
return _extends$
|
|
7076
|
+
return _extends$z.apply(this, arguments);
|
|
6984
7077
|
}
|
|
6985
7078
|
|
|
6986
7079
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -7070,7 +7163,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
7070
7163
|
var reducer = function reducer(state, action) {
|
|
7071
7164
|
switch (action.type) {
|
|
7072
7165
|
case ActionType.ADD_TOAST:
|
|
7073
|
-
return _extends$
|
|
7166
|
+
return _extends$z({}, state, {
|
|
7074
7167
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
7075
7168
|
});
|
|
7076
7169
|
|
|
@@ -7080,9 +7173,9 @@ var reducer = function reducer(state, action) {
|
|
|
7080
7173
|
clearFromRemoveQueue(action.toast.id);
|
|
7081
7174
|
}
|
|
7082
7175
|
|
|
7083
|
-
return _extends$
|
|
7176
|
+
return _extends$z({}, state, {
|
|
7084
7177
|
toasts: state.toasts.map(function (t) {
|
|
7085
|
-
return t.id === action.toast.id ? _extends$
|
|
7178
|
+
return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
|
|
7086
7179
|
})
|
|
7087
7180
|
});
|
|
7088
7181
|
|
|
@@ -7109,9 +7202,9 @@ var reducer = function reducer(state, action) {
|
|
|
7109
7202
|
});
|
|
7110
7203
|
}
|
|
7111
7204
|
|
|
7112
|
-
return _extends$
|
|
7205
|
+
return _extends$z({}, state, {
|
|
7113
7206
|
toasts: state.toasts.map(function (t) {
|
|
7114
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
7207
|
+
return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
|
|
7115
7208
|
visible: false
|
|
7116
7209
|
}) : t;
|
|
7117
7210
|
})
|
|
@@ -7119,28 +7212,28 @@ var reducer = function reducer(state, action) {
|
|
|
7119
7212
|
|
|
7120
7213
|
case ActionType.REMOVE_TOAST:
|
|
7121
7214
|
if (action.toastId === undefined) {
|
|
7122
|
-
return _extends$
|
|
7215
|
+
return _extends$z({}, state, {
|
|
7123
7216
|
toasts: []
|
|
7124
7217
|
});
|
|
7125
7218
|
}
|
|
7126
7219
|
|
|
7127
|
-
return _extends$
|
|
7220
|
+
return _extends$z({}, state, {
|
|
7128
7221
|
toasts: state.toasts.filter(function (t) {
|
|
7129
7222
|
return t.id !== action.toastId;
|
|
7130
7223
|
})
|
|
7131
7224
|
});
|
|
7132
7225
|
|
|
7133
7226
|
case ActionType.START_PAUSE:
|
|
7134
|
-
return _extends$
|
|
7227
|
+
return _extends$z({}, state, {
|
|
7135
7228
|
pausedAt: action.time
|
|
7136
7229
|
});
|
|
7137
7230
|
|
|
7138
7231
|
case ActionType.END_PAUSE:
|
|
7139
7232
|
var diff = action.time - (state.pausedAt || 0);
|
|
7140
|
-
return _extends$
|
|
7233
|
+
return _extends$z({}, state, {
|
|
7141
7234
|
pausedAt: undefined,
|
|
7142
7235
|
toasts: state.toasts.map(function (t) {
|
|
7143
|
-
return _extends$
|
|
7236
|
+
return _extends$z({}, t, {
|
|
7144
7237
|
pauseDuration: t.pauseDuration + diff
|
|
7145
7238
|
});
|
|
7146
7239
|
})
|
|
@@ -7187,12 +7280,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
7187
7280
|
var mergedToasts = state.toasts.map(function (t) {
|
|
7188
7281
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
7189
7282
|
|
|
7190
|
-
return _extends$
|
|
7283
|
+
return _extends$z({}, toastOptions, toastOptions[t.type], t, {
|
|
7191
7284
|
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],
|
|
7192
|
-
style: _extends$
|
|
7285
|
+
style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
7193
7286
|
});
|
|
7194
7287
|
});
|
|
7195
|
-
return _extends$
|
|
7288
|
+
return _extends$z({}, state, {
|
|
7196
7289
|
toasts: mergedToasts
|
|
7197
7290
|
});
|
|
7198
7291
|
};
|
|
@@ -7202,7 +7295,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
7202
7295
|
type = 'blank';
|
|
7203
7296
|
}
|
|
7204
7297
|
|
|
7205
|
-
return _extends$
|
|
7298
|
+
return _extends$z({
|
|
7206
7299
|
createdAt: Date.now(),
|
|
7207
7300
|
visible: true,
|
|
7208
7301
|
type: type,
|
|
@@ -7252,14 +7345,14 @@ toast.remove = function (toastId) {
|
|
|
7252
7345
|
};
|
|
7253
7346
|
|
|
7254
7347
|
toast.promise = function (promise, msgs, opts) {
|
|
7255
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
7348
|
+
var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
|
|
7256
7349
|
promise.then(function (p) {
|
|
7257
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
7350
|
+
toast.success(resolveValue(msgs.success, p), _extends$z({
|
|
7258
7351
|
id: id
|
|
7259
7352
|
}, opts, opts == null ? void 0 : opts.success));
|
|
7260
7353
|
return p;
|
|
7261
7354
|
})["catch"](function (e) {
|
|
7262
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
7355
|
+
toast.error(resolveValue(msgs.error, e), _extends$z({
|
|
7263
7356
|
id: id
|
|
7264
7357
|
}, opts, opts == null ? void 0 : opts.error));
|
|
7265
7358
|
});
|
|
@@ -7598,7 +7691,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
|
|
|
7598
7691
|
var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
7599
7692
|
return createElement(ToastBarBase, {
|
|
7600
7693
|
className: toast.className,
|
|
7601
|
-
style: _extends$
|
|
7694
|
+
style: _extends$z({}, animationStyle, style, toast.style)
|
|
7602
7695
|
}, typeof children === 'function' ? children({
|
|
7603
7696
|
icon: icon,
|
|
7604
7697
|
message: message
|
|
@@ -7628,7 +7721,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
7628
7721
|
} : position.includes('right') ? {
|
|
7629
7722
|
justifyContent: 'flex-end'
|
|
7630
7723
|
} : {};
|
|
7631
|
-
return _extends$
|
|
7724
|
+
return _extends$z({
|
|
7632
7725
|
left: 0,
|
|
7633
7726
|
right: 0,
|
|
7634
7727
|
display: 'flex',
|
|
@@ -7655,7 +7748,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
7655
7748
|
handlers = _useToaster.handlers;
|
|
7656
7749
|
|
|
7657
7750
|
return createElement("div", {
|
|
7658
|
-
style: _extends$
|
|
7751
|
+
style: _extends$z({
|
|
7659
7752
|
position: 'fixed',
|
|
7660
7753
|
zIndex: 9999,
|
|
7661
7754
|
top: DEFAULT_OFFSET,
|
|
@@ -7690,82 +7783,82 @@ var Toaster = function Toaster(_ref) {
|
|
|
7690
7783
|
}));
|
|
7691
7784
|
};
|
|
7692
7785
|
|
|
7693
|
-
var _path$
|
|
7786
|
+
var _path$w;
|
|
7694
7787
|
|
|
7695
|
-
function _extends$
|
|
7788
|
+
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); }
|
|
7696
7789
|
|
|
7697
7790
|
function SvgCheckSolid(props) {
|
|
7698
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7791
|
+
return /*#__PURE__*/React.createElement("svg", _extends$y({
|
|
7699
7792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7700
7793
|
className: "h-5 w-5",
|
|
7701
7794
|
viewBox: "0 0 20 20",
|
|
7702
7795
|
fill: "currentColor"
|
|
7703
|
-
}, props), _path$
|
|
7796
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
|
|
7704
7797
|
fillRule: "evenodd",
|
|
7705
7798
|
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",
|
|
7706
7799
|
clipRule: "evenodd"
|
|
7707
7800
|
})));
|
|
7708
7801
|
}
|
|
7709
7802
|
|
|
7710
|
-
var _path$
|
|
7803
|
+
var _path$v;
|
|
7711
7804
|
|
|
7712
|
-
function _extends$
|
|
7805
|
+
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); }
|
|
7713
7806
|
|
|
7714
7807
|
function SvgXIcon(props) {
|
|
7715
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7808
|
+
return /*#__PURE__*/React.createElement("svg", _extends$x({
|
|
7716
7809
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7717
7810
|
viewBox: "0 0 20 20",
|
|
7718
7811
|
fill: "currentColor"
|
|
7719
|
-
}, props), _path$
|
|
7812
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
|
|
7720
7813
|
fill: "evenodd",
|
|
7721
7814
|
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",
|
|
7722
7815
|
clipRule: "evenodd"
|
|
7723
7816
|
})));
|
|
7724
7817
|
}
|
|
7725
7818
|
|
|
7726
|
-
var _path$
|
|
7819
|
+
var _path$u;
|
|
7727
7820
|
|
|
7728
|
-
function _extends$
|
|
7821
|
+
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); }
|
|
7729
7822
|
|
|
7730
7823
|
function SvgXIconSolid(props) {
|
|
7731
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7824
|
+
return /*#__PURE__*/React.createElement("svg", _extends$w({
|
|
7732
7825
|
className: "plc-w-4 plc-h-4",
|
|
7733
7826
|
fill: "currentColor",
|
|
7734
7827
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7735
7828
|
viewBox: "0 0 100 100"
|
|
7736
|
-
}, props), _path$
|
|
7829
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
|
|
7737
7830
|
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"
|
|
7738
7831
|
})));
|
|
7739
7832
|
}
|
|
7740
7833
|
|
|
7741
|
-
var _path$
|
|
7834
|
+
var _path$t;
|
|
7742
7835
|
|
|
7743
|
-
function _extends$
|
|
7836
|
+
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); }
|
|
7744
7837
|
|
|
7745
7838
|
function SvgExclamation(props) {
|
|
7746
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7839
|
+
return /*#__PURE__*/React.createElement("svg", _extends$v({
|
|
7747
7840
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
7748
7841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7749
7842
|
viewBox: "0 0 20 20",
|
|
7750
7843
|
fill: "currentColor"
|
|
7751
|
-
}, props), _path$
|
|
7844
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
|
|
7752
7845
|
fillRule: "evenodd",
|
|
7753
7846
|
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",
|
|
7754
7847
|
clipRule: "evenodd"
|
|
7755
7848
|
})));
|
|
7756
7849
|
}
|
|
7757
7850
|
|
|
7758
|
-
var _path$
|
|
7851
|
+
var _path$s, _path2$4;
|
|
7759
7852
|
|
|
7760
|
-
function _extends$
|
|
7853
|
+
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); }
|
|
7761
7854
|
|
|
7762
7855
|
function SvgSpinner(props) {
|
|
7763
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
7856
|
+
return /*#__PURE__*/React.createElement("svg", _extends$u({
|
|
7764
7857
|
className: "plc-animate-spin",
|
|
7765
7858
|
viewBox: "0 0 24 24",
|
|
7766
7859
|
fill: "currentColor",
|
|
7767
7860
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7768
|
-
}, props), _path$
|
|
7861
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
|
|
7769
7862
|
opacity: 0.2,
|
|
7770
7863
|
fill: "evenodd",
|
|
7771
7864
|
clipRule: "evenodd",
|
|
@@ -8799,6 +8892,10 @@ const initViewFromURL = () => {
|
|
|
8799
8892
|
return verifyEmailTokenFromUrl();
|
|
8800
8893
|
}
|
|
8801
8894
|
|
|
8895
|
+
if (view === "invoice-details") {
|
|
8896
|
+
return showInvoiceDetailsFromUrl();
|
|
8897
|
+
}
|
|
8898
|
+
|
|
8802
8899
|
switchView(view);
|
|
8803
8900
|
});
|
|
8804
8901
|
}
|
|
@@ -8975,6 +9072,32 @@ const verifyEmailTokenFromUrl = () => {
|
|
|
8975
9072
|
});
|
|
8976
9073
|
};
|
|
8977
9074
|
|
|
9075
|
+
const showInvoiceDetailsFromUrl = () => {
|
|
9076
|
+
const {
|
|
9077
|
+
isAuthenticated,
|
|
9078
|
+
setInvoice,
|
|
9079
|
+
whenSiteReady,
|
|
9080
|
+
switchView
|
|
9081
|
+
} = usePelcro.getStore();
|
|
9082
|
+
whenSiteReady(() => {
|
|
9083
|
+
if (!isAuthenticated()) {
|
|
9084
|
+
return switchView("login");
|
|
9085
|
+
}
|
|
9086
|
+
|
|
9087
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9088
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9089
|
+
|
|
9090
|
+
if (!wasSetSuccessfully) {
|
|
9091
|
+
const errorMessage = i18next.t("messages:invalidInvoice", {
|
|
9092
|
+
returnObjects: true
|
|
9093
|
+
});
|
|
9094
|
+
return notify.error(errorMessage);
|
|
9095
|
+
}
|
|
9096
|
+
|
|
9097
|
+
return switchView("invoice-details");
|
|
9098
|
+
});
|
|
9099
|
+
};
|
|
9100
|
+
|
|
8978
9101
|
const defaultOptions = {
|
|
8979
9102
|
loadPaymentSDKs: true,
|
|
8980
9103
|
loadAuth0SDK: true,
|
|
@@ -9314,7 +9437,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9314
9437
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9315
9438
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9316
9439
|
|
|
9317
|
-
const initialState$
|
|
9440
|
+
const initialState$h = {
|
|
9318
9441
|
email: "",
|
|
9319
9442
|
password: "",
|
|
9320
9443
|
emailError: null,
|
|
@@ -9325,10 +9448,10 @@ const initialState$g = {
|
|
|
9325
9448
|
content: ""
|
|
9326
9449
|
}
|
|
9327
9450
|
};
|
|
9328
|
-
const store$
|
|
9451
|
+
const store$h = /*#__PURE__*/createContext(initialState$h);
|
|
9329
9452
|
const {
|
|
9330
|
-
Provider: Provider$
|
|
9331
|
-
} = store$
|
|
9453
|
+
Provider: Provider$h
|
|
9454
|
+
} = store$h;
|
|
9332
9455
|
|
|
9333
9456
|
const LoginContainer = ({
|
|
9334
9457
|
style,
|
|
@@ -9435,7 +9558,7 @@ const LoginContainer = ({
|
|
|
9435
9558
|
});
|
|
9436
9559
|
|
|
9437
9560
|
case RESET_LOGIN_FORM:
|
|
9438
|
-
return initialState$
|
|
9561
|
+
return initialState$h;
|
|
9439
9562
|
|
|
9440
9563
|
case DISABLE_LOGIN_BUTTON:
|
|
9441
9564
|
return lib_7({ ...state,
|
|
@@ -9453,12 +9576,12 @@ const LoginContainer = ({
|
|
|
9453
9576
|
default:
|
|
9454
9577
|
return state;
|
|
9455
9578
|
}
|
|
9456
|
-
}, initialState$
|
|
9579
|
+
}, initialState$h);
|
|
9457
9580
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9458
9581
|
style: { ...style
|
|
9459
9582
|
},
|
|
9460
9583
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9461
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
9584
|
+
}, /*#__PURE__*/React__default.createElement(Provider$h, {
|
|
9462
9585
|
value: {
|
|
9463
9586
|
state,
|
|
9464
9587
|
dispatch
|
|
@@ -9466,12 +9589,12 @@ const LoginContainer = ({
|
|
|
9466
9589
|
}, children.length ? children.map((child, i) => {
|
|
9467
9590
|
if (child) {
|
|
9468
9591
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
9469
|
-
store: store$
|
|
9592
|
+
store: store$h,
|
|
9470
9593
|
key: i
|
|
9471
9594
|
});
|
|
9472
9595
|
}
|
|
9473
9596
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
9474
|
-
store: store$
|
|
9597
|
+
store: store$h
|
|
9475
9598
|
})));
|
|
9476
9599
|
};
|
|
9477
9600
|
|
|
@@ -9716,7 +9839,7 @@ const LoginButton = ({
|
|
|
9716
9839
|
buttonDisabled
|
|
9717
9840
|
},
|
|
9718
9841
|
dispatch
|
|
9719
|
-
} = useContext(store$
|
|
9842
|
+
} = useContext(store$h);
|
|
9720
9843
|
const {
|
|
9721
9844
|
t
|
|
9722
9845
|
} = useTranslation("login");
|
|
@@ -9737,23 +9860,23 @@ const LoginButton = ({
|
|
|
9737
9860
|
};
|
|
9738
9861
|
|
|
9739
9862
|
const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
9740
|
-
store: store$
|
|
9863
|
+
store: store$h
|
|
9741
9864
|
}, props));
|
|
9742
9865
|
|
|
9743
9866
|
const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
9744
|
-
store: store$
|
|
9867
|
+
store: store$h
|
|
9745
9868
|
}, props));
|
|
9746
9869
|
|
|
9747
|
-
var _path$
|
|
9870
|
+
var _path$r;
|
|
9748
9871
|
|
|
9749
|
-
function _extends$
|
|
9872
|
+
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); }
|
|
9750
9873
|
|
|
9751
9874
|
function SvgCheck(props) {
|
|
9752
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9875
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
9753
9876
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9754
9877
|
fill: "currentColor",
|
|
9755
9878
|
viewBox: "0 0 20 20"
|
|
9756
|
-
}, props), _path$
|
|
9879
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
9757
9880
|
fillRule: "evenodd",
|
|
9758
9881
|
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",
|
|
9759
9882
|
clipRule: "evenodd"
|
|
@@ -9818,7 +9941,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9818
9941
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9819
9942
|
facebookLoginRenderProps.FacebookLogin;
|
|
9820
9943
|
|
|
9821
|
-
const initialState$
|
|
9944
|
+
const initialState$g = {
|
|
9822
9945
|
email: "",
|
|
9823
9946
|
password: "",
|
|
9824
9947
|
emailError: null,
|
|
@@ -9835,10 +9958,10 @@ const initialState$f = {
|
|
|
9835
9958
|
content: ""
|
|
9836
9959
|
}
|
|
9837
9960
|
};
|
|
9838
|
-
const store$
|
|
9961
|
+
const store$g = /*#__PURE__*/createContext(initialState$g);
|
|
9839
9962
|
const {
|
|
9840
|
-
Provider: Provider$
|
|
9841
|
-
} = store$
|
|
9963
|
+
Provider: Provider$g
|
|
9964
|
+
} = store$g;
|
|
9842
9965
|
|
|
9843
9966
|
const RegisterContainer = ({
|
|
9844
9967
|
style,
|
|
@@ -10021,7 +10144,7 @@ const RegisterContainer = ({
|
|
|
10021
10144
|
});
|
|
10022
10145
|
|
|
10023
10146
|
case RESET_LOGIN_FORM:
|
|
10024
|
-
return initialState$
|
|
10147
|
+
return initialState$g;
|
|
10025
10148
|
|
|
10026
10149
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10027
10150
|
return lib_7({ ...state,
|
|
@@ -10039,12 +10162,12 @@ const RegisterContainer = ({
|
|
|
10039
10162
|
default:
|
|
10040
10163
|
return state;
|
|
10041
10164
|
}
|
|
10042
|
-
}, initialState$
|
|
10165
|
+
}, initialState$g);
|
|
10043
10166
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10044
10167
|
style: { ...style
|
|
10045
10168
|
},
|
|
10046
10169
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10047
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
10170
|
+
}, /*#__PURE__*/React__default.createElement(Provider$g, {
|
|
10048
10171
|
value: {
|
|
10049
10172
|
state,
|
|
10050
10173
|
dispatch
|
|
@@ -10052,12 +10175,12 @@ const RegisterContainer = ({
|
|
|
10052
10175
|
}, children.length ? children.map((child, i) => {
|
|
10053
10176
|
if (child) {
|
|
10054
10177
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
10055
|
-
store: store$
|
|
10178
|
+
store: store$g,
|
|
10056
10179
|
key: i
|
|
10057
10180
|
});
|
|
10058
10181
|
}
|
|
10059
10182
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
10060
|
-
store: store$
|
|
10183
|
+
store: store$g
|
|
10061
10184
|
})));
|
|
10062
10185
|
};
|
|
10063
10186
|
/**
|
|
@@ -10072,15 +10195,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10072
10195
|
return hasSecuritySdkLoaded;
|
|
10073
10196
|
}
|
|
10074
10197
|
|
|
10075
|
-
var _path$
|
|
10198
|
+
var _path$q;
|
|
10076
10199
|
|
|
10077
|
-
function _extends$
|
|
10200
|
+
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); }
|
|
10078
10201
|
|
|
10079
10202
|
function SvgFacebookLogo(props) {
|
|
10080
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10203
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
10081
10204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10082
10205
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10083
|
-
}, props), _path$
|
|
10206
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
10084
10207
|
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",
|
|
10085
10208
|
fill: "#3c5a9a"
|
|
10086
10209
|
})));
|
|
@@ -10097,10 +10220,10 @@ const FacebookLoginButton = ({
|
|
|
10097
10220
|
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;
|
|
10098
10221
|
const {
|
|
10099
10222
|
dispatch: loginDispatch
|
|
10100
|
-
} = useContext(store$
|
|
10223
|
+
} = useContext(store$h);
|
|
10101
10224
|
const {
|
|
10102
10225
|
dispatch: registerDispatch
|
|
10103
|
-
} = useContext(store$
|
|
10226
|
+
} = useContext(store$g);
|
|
10104
10227
|
|
|
10105
10228
|
const onSuccess = facebookUser => {
|
|
10106
10229
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10153,15 +10276,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10153
10276
|
unwrapExports(googleLogin);
|
|
10154
10277
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10155
10278
|
|
|
10156
|
-
var _path$
|
|
10279
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10157
10280
|
|
|
10158
|
-
function _extends$
|
|
10281
|
+
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); }
|
|
10159
10282
|
|
|
10160
10283
|
function SvgGoogleLogo(props) {
|
|
10161
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10284
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
10162
10285
|
viewBox: "0 0 24 24",
|
|
10163
10286
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10164
|
-
}, props), _path$
|
|
10287
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
10165
10288
|
fill: "#4285F4",
|
|
10166
10289
|
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"
|
|
10167
10290
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10187,10 +10310,10 @@ const GoogleLoginButton = ({
|
|
|
10187
10310
|
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;
|
|
10188
10311
|
const {
|
|
10189
10312
|
dispatch: loginDispatch
|
|
10190
|
-
} = useContext(store$
|
|
10313
|
+
} = useContext(store$h);
|
|
10191
10314
|
const {
|
|
10192
10315
|
dispatch: registerDispatch
|
|
10193
|
-
} = useContext(store$
|
|
10316
|
+
} = useContext(store$g);
|
|
10194
10317
|
|
|
10195
10318
|
const onSuccess = response => {
|
|
10196
10319
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10238,15 +10361,15 @@ const GoogleLoginButton = ({
|
|
|
10238
10361
|
}) : null;
|
|
10239
10362
|
};
|
|
10240
10363
|
|
|
10241
|
-
var _path$
|
|
10364
|
+
var _path$o;
|
|
10242
10365
|
|
|
10243
|
-
function _extends$
|
|
10366
|
+
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); }
|
|
10244
10367
|
|
|
10245
10368
|
function SvgAuth0Logo(props) {
|
|
10246
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10369
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
10247
10370
|
viewBox: "0 0 256 285",
|
|
10248
10371
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10249
|
-
}, props), _path$
|
|
10372
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
10250
10373
|
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"
|
|
10251
10374
|
})));
|
|
10252
10375
|
}
|
|
@@ -10286,10 +10409,10 @@ const Auth0LoginButton = ({
|
|
|
10286
10409
|
}, [auth0Enabled, auth0Loaded]);
|
|
10287
10410
|
const {
|
|
10288
10411
|
dispatch: loginDispatch
|
|
10289
|
-
} = useContext(store$
|
|
10412
|
+
} = useContext(store$h);
|
|
10290
10413
|
const {
|
|
10291
10414
|
dispatch: registerDispatch
|
|
10292
|
-
} = useContext(store$
|
|
10415
|
+
} = useContext(store$g);
|
|
10293
10416
|
|
|
10294
10417
|
function handleClick() {
|
|
10295
10418
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10422,15 +10545,15 @@ function LoginView(props) {
|
|
|
10422
10545
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10423
10546
|
}
|
|
10424
10547
|
|
|
10425
|
-
var _path$
|
|
10548
|
+
var _path$n, _path2$2, _path3;
|
|
10426
10549
|
|
|
10427
|
-
function _extends$
|
|
10550
|
+
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); }
|
|
10428
10551
|
|
|
10429
10552
|
function SvgPelcroAuthorship(props) {
|
|
10430
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10553
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
10431
10554
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10432
10555
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10433
|
-
}, props), _path$
|
|
10556
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
10434
10557
|
fill: "none",
|
|
10435
10558
|
stroke: "#4a4a4a",
|
|
10436
10559
|
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"
|
|
@@ -10577,11 +10700,11 @@ function LoginModal({
|
|
|
10577
10700
|
LoginModal.viewId = "login";
|
|
10578
10701
|
|
|
10579
10702
|
const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
10580
|
-
store: store$
|
|
10703
|
+
store: store$g
|
|
10581
10704
|
}, props));
|
|
10582
10705
|
|
|
10583
10706
|
const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
10584
|
-
store: store$
|
|
10707
|
+
store: store$g
|
|
10585
10708
|
}, props));
|
|
10586
10709
|
|
|
10587
10710
|
const RegisterButton = ({
|
|
@@ -10601,7 +10724,7 @@ const RegisterButton = ({
|
|
|
10601
10724
|
buttonDisabled
|
|
10602
10725
|
},
|
|
10603
10726
|
dispatch
|
|
10604
|
-
} = useContext(store$
|
|
10727
|
+
} = useContext(store$g);
|
|
10605
10728
|
const {
|
|
10606
10729
|
t
|
|
10607
10730
|
} = useTranslation("register");
|
|
@@ -10739,7 +10862,7 @@ function FirstName({
|
|
|
10739
10862
|
}
|
|
10740
10863
|
|
|
10741
10864
|
const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
10742
|
-
store: store$
|
|
10865
|
+
store: store$g
|
|
10743
10866
|
}, props));
|
|
10744
10867
|
|
|
10745
10868
|
function LastName({
|
|
@@ -10770,7 +10893,7 @@ function LastName({
|
|
|
10770
10893
|
}
|
|
10771
10894
|
|
|
10772
10895
|
const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
10773
|
-
store: store$
|
|
10896
|
+
store: store$g
|
|
10774
10897
|
}, props));
|
|
10775
10898
|
|
|
10776
10899
|
/**
|
|
@@ -10894,7 +11017,7 @@ function TextInput({
|
|
|
10894
11017
|
|
|
10895
11018
|
const RegisterTextInput = props => {
|
|
10896
11019
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
10897
|
-
store: store$
|
|
11020
|
+
store: store$g
|
|
10898
11021
|
}));
|
|
10899
11022
|
};
|
|
10900
11023
|
|
|
@@ -12563,7 +12686,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12563
12686
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12564
12687
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12565
12688
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12566
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12689
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12690
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12567
12691
|
};
|
|
12568
12692
|
|
|
12569
12693
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12625,6 +12749,7 @@ class Subscription {
|
|
|
12625
12749
|
* @property {number} [subscriptionIdToRenew]
|
|
12626
12750
|
* @property {number} [quantity]
|
|
12627
12751
|
* @property {string} addressId
|
|
12752
|
+
* @property {number} invoiceId
|
|
12628
12753
|
*/
|
|
12629
12754
|
|
|
12630
12755
|
/**
|
|
@@ -12665,6 +12790,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12665
12790
|
|
|
12666
12791
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12667
12792
|
|
|
12793
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12794
|
+
|
|
12668
12795
|
class StripeGateway {
|
|
12669
12796
|
constructor() {
|
|
12670
12797
|
_paymentGateway.set(this, {
|
|
@@ -12688,6 +12815,9 @@ class StripeGateway {
|
|
|
12688
12815
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12689
12816
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12690
12817
|
|
|
12818
|
+
case types.PAY_INVOICE:
|
|
12819
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12820
|
+
|
|
12691
12821
|
default:
|
|
12692
12822
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12693
12823
|
}
|
|
@@ -12796,6 +12926,23 @@ class StripeGateway {
|
|
|
12796
12926
|
});
|
|
12797
12927
|
}
|
|
12798
12928
|
});
|
|
12929
|
+
|
|
12930
|
+
_payInvoice.set(this, {
|
|
12931
|
+
writable: true,
|
|
12932
|
+
value: (options, callback) => {
|
|
12933
|
+
const {
|
|
12934
|
+
token,
|
|
12935
|
+
invoiceId
|
|
12936
|
+
} = options;
|
|
12937
|
+
window.Pelcro.invoice.pay({
|
|
12938
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
12939
|
+
gateway_token: token,
|
|
12940
|
+
invoice_id: invoiceId
|
|
12941
|
+
}, (err, res) => {
|
|
12942
|
+
callback(err, res);
|
|
12943
|
+
});
|
|
12944
|
+
}
|
|
12945
|
+
});
|
|
12799
12946
|
}
|
|
12800
12947
|
|
|
12801
12948
|
}
|
|
@@ -12809,6 +12956,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12809
12956
|
|
|
12810
12957
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12811
12958
|
|
|
12959
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
12960
|
+
|
|
12812
12961
|
class PaypalGateWay {
|
|
12813
12962
|
constructor() {
|
|
12814
12963
|
_paymentGateway2.set(this, {
|
|
@@ -12826,6 +12975,9 @@ class PaypalGateWay {
|
|
|
12826
12975
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12827
12976
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12828
12977
|
|
|
12978
|
+
case types.PAY_INVOICE:
|
|
12979
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
12980
|
+
|
|
12829
12981
|
default:
|
|
12830
12982
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12831
12983
|
}
|
|
@@ -12886,6 +13038,23 @@ class PaypalGateWay {
|
|
|
12886
13038
|
});
|
|
12887
13039
|
}
|
|
12888
13040
|
});
|
|
13041
|
+
|
|
13042
|
+
_payInvoice2.set(this, {
|
|
13043
|
+
writable: true,
|
|
13044
|
+
value: (options, callback) => {
|
|
13045
|
+
const {
|
|
13046
|
+
token,
|
|
13047
|
+
invoiceId
|
|
13048
|
+
} = options;
|
|
13049
|
+
window.Pelcro.invoice.pay({
|
|
13050
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13051
|
+
gateway_token: token,
|
|
13052
|
+
invoice_id: invoiceId
|
|
13053
|
+
}, (err, res) => {
|
|
13054
|
+
callback(err, res);
|
|
13055
|
+
});
|
|
13056
|
+
}
|
|
13057
|
+
});
|
|
12889
13058
|
}
|
|
12890
13059
|
|
|
12891
13060
|
}
|
|
@@ -12910,7 +13079,7 @@ class PaypalGateWay {
|
|
|
12910
13079
|
|
|
12911
13080
|
/** @type {PaymentStateType} */
|
|
12912
13081
|
|
|
12913
|
-
const initialState$
|
|
13082
|
+
const initialState$f = {
|
|
12914
13083
|
disableSubmit: false,
|
|
12915
13084
|
isLoading: false,
|
|
12916
13085
|
disableCouponButton: false,
|
|
@@ -12929,10 +13098,10 @@ const initialState$e = {
|
|
|
12929
13098
|
content: ""
|
|
12930
13099
|
}
|
|
12931
13100
|
};
|
|
12932
|
-
const store$
|
|
13101
|
+
const store$f = /*#__PURE__*/createContext(initialState$f);
|
|
12933
13102
|
const {
|
|
12934
|
-
Provider: Provider$
|
|
12935
|
-
} = store$
|
|
13103
|
+
Provider: Provider$f
|
|
13104
|
+
} = store$f;
|
|
12936
13105
|
|
|
12937
13106
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12938
13107
|
style,
|
|
@@ -12945,7 +13114,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12945
13114
|
onFailure = () => {},
|
|
12946
13115
|
...props
|
|
12947
13116
|
}) => {
|
|
12948
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13117
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12949
13118
|
|
|
12950
13119
|
const {
|
|
12951
13120
|
t
|
|
@@ -12962,6 +13131,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12962
13131
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12963
13132
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12964
13133
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13134
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12965
13135
|
useEffect(() => {
|
|
12966
13136
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12967
13137
|
dispatch({
|
|
@@ -13530,6 +13700,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13530
13700
|
});
|
|
13531
13701
|
};
|
|
13532
13702
|
|
|
13703
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13704
|
+
const subscription = new Subscription(gatewayService);
|
|
13705
|
+
return subscription.execute({
|
|
13706
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13707
|
+
token: gatewayToken,
|
|
13708
|
+
invoiceId: invoice.id
|
|
13709
|
+
}, (err, res) => {
|
|
13710
|
+
dispatch({
|
|
13711
|
+
type: DISABLE_SUBMIT,
|
|
13712
|
+
payload: false
|
|
13713
|
+
});
|
|
13714
|
+
dispatch({
|
|
13715
|
+
type: LOADING,
|
|
13716
|
+
payload: false
|
|
13717
|
+
});
|
|
13718
|
+
|
|
13719
|
+
if (err) {
|
|
13720
|
+
onFailure(err);
|
|
13721
|
+
return dispatch({
|
|
13722
|
+
type: SHOW_ALERT,
|
|
13723
|
+
payload: {
|
|
13724
|
+
type: "error",
|
|
13725
|
+
content: getErrorMessages(err)
|
|
13726
|
+
}
|
|
13727
|
+
});
|
|
13728
|
+
}
|
|
13729
|
+
|
|
13730
|
+
set({
|
|
13731
|
+
invoice: null
|
|
13732
|
+
});
|
|
13733
|
+
onSuccess(res);
|
|
13734
|
+
});
|
|
13735
|
+
};
|
|
13736
|
+
|
|
13533
13737
|
const updatePaymentSource = (state, dispatch) => {
|
|
13534
13738
|
return stripe.createSource({
|
|
13535
13739
|
type: "card"
|
|
@@ -13604,13 +13808,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13604
13808
|
source,
|
|
13605
13809
|
error
|
|
13606
13810
|
}) => {
|
|
13607
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13811
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13608
13812
|
|
|
13609
13813
|
if (error) {
|
|
13610
13814
|
return handlePaymentError(error);
|
|
13611
13815
|
}
|
|
13612
13816
|
|
|
13613
13817
|
const getOrderItemsTotal = () => {
|
|
13818
|
+
if (!order) {
|
|
13819
|
+
return null;
|
|
13820
|
+
}
|
|
13821
|
+
|
|
13614
13822
|
const isQuickPurchase = !Array.isArray(order);
|
|
13615
13823
|
|
|
13616
13824
|
if (isQuickPurchase) {
|
|
@@ -13626,7 +13834,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13626
13834
|
}, 0);
|
|
13627
13835
|
};
|
|
13628
13836
|
|
|
13629
|
-
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();
|
|
13837
|
+
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();
|
|
13630
13838
|
|
|
13631
13839
|
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) {
|
|
13632
13840
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13659,6 +13867,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13659
13867
|
const resolveTaxCalculation = () => {
|
|
13660
13868
|
var _window$Pelcro$site$r2;
|
|
13661
13869
|
|
|
13870
|
+
if (type === "invoicePayment") {
|
|
13871
|
+
return new Promise(resolve => resolve());
|
|
13872
|
+
}
|
|
13873
|
+
|
|
13662
13874
|
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;
|
|
13663
13875
|
return new Promise((resolve, reject) => {
|
|
13664
13876
|
// resolve early if taxes isn't enabled
|
|
@@ -13732,6 +13944,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13732
13944
|
subscribe(stripeSource, state, dispatch);
|
|
13733
13945
|
} else if (stripeSource && type === "orderCreate") {
|
|
13734
13946
|
purchase(stripeSource, state, dispatch);
|
|
13947
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
13948
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13735
13949
|
}
|
|
13736
13950
|
};
|
|
13737
13951
|
|
|
@@ -13865,7 +14079,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13865
14079
|
});
|
|
13866
14080
|
|
|
13867
14081
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13868
|
-
return lib_5(state, () =>
|
|
14082
|
+
return lib_5(state, (state, dispatch) => {
|
|
14083
|
+
if (type === "invoicePayment") {
|
|
14084
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14085
|
+
} else {
|
|
14086
|
+
handlePaypalSubscription(state, action.payload);
|
|
14087
|
+
}
|
|
14088
|
+
});
|
|
13869
14089
|
|
|
13870
14090
|
case SET_UPDATED_PRICE:
|
|
13871
14091
|
return lib_7({ ...state,
|
|
@@ -13923,21 +14143,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13923
14143
|
default:
|
|
13924
14144
|
return state;
|
|
13925
14145
|
}
|
|
13926
|
-
}, initialState$
|
|
14146
|
+
}, initialState$f);
|
|
13927
14147
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13928
14148
|
style: { ...style
|
|
13929
14149
|
},
|
|
13930
14150
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13931
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
14151
|
+
}, /*#__PURE__*/React__default.createElement(Provider$f, {
|
|
13932
14152
|
value: {
|
|
13933
14153
|
state,
|
|
13934
14154
|
dispatch
|
|
13935
14155
|
}
|
|
13936
14156
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
13937
|
-
store: store$
|
|
14157
|
+
store: store$f,
|
|
13938
14158
|
key: i
|
|
13939
14159
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
13940
|
-
store: store$
|
|
14160
|
+
store: store$f
|
|
13941
14161
|
})));
|
|
13942
14162
|
};
|
|
13943
14163
|
|
|
@@ -13959,7 +14179,7 @@ const PaymentMethodContainer = props => {
|
|
|
13959
14179
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13960
14180
|
locale: getPageOrDefaultLanguage()
|
|
13961
14181
|
}, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
|
|
13962
|
-
store: store$
|
|
14182
|
+
store: store$f
|
|
13963
14183
|
}, props))));
|
|
13964
14184
|
}
|
|
13965
14185
|
|
|
@@ -14012,7 +14232,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14012
14232
|
currentPlan,
|
|
14013
14233
|
updatedPrice
|
|
14014
14234
|
}
|
|
14015
|
-
} = useContext(store$
|
|
14235
|
+
} = useContext(store$f);
|
|
14016
14236
|
|
|
14017
14237
|
const updatePaymentRequest = () => {
|
|
14018
14238
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14072,7 +14292,7 @@ const DiscountedPrice = props => {
|
|
|
14072
14292
|
taxAmount,
|
|
14073
14293
|
percentOff
|
|
14074
14294
|
}
|
|
14075
|
-
} = useContext(store$
|
|
14295
|
+
} = useContext(store$f);
|
|
14076
14296
|
const {
|
|
14077
14297
|
order,
|
|
14078
14298
|
plan
|
|
@@ -14122,7 +14342,7 @@ const SubmitPaymentMethod = ({
|
|
|
14122
14342
|
isLoading,
|
|
14123
14343
|
updatedPrice
|
|
14124
14344
|
}
|
|
14125
|
-
} = useContext(store$
|
|
14345
|
+
} = useContext(store$f);
|
|
14126
14346
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14127
14347
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14128
14348
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14143,17 +14363,17 @@ const SubmitPaymentMethod = ({
|
|
|
14143
14363
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14144
14364
|
};
|
|
14145
14365
|
|
|
14146
|
-
var _path$
|
|
14366
|
+
var _path$m;
|
|
14147
14367
|
|
|
14148
|
-
function _extends$
|
|
14368
|
+
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); }
|
|
14149
14369
|
|
|
14150
14370
|
function SvgArrowLeft(props) {
|
|
14151
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14371
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
14152
14372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14153
14373
|
fill: "none",
|
|
14154
14374
|
viewBox: "0 0 24 24",
|
|
14155
14375
|
stroke: "currentColor"
|
|
14156
|
-
}, props), _path$
|
|
14376
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
14157
14377
|
strokeLinecap: "round",
|
|
14158
14378
|
strokeLinejoin: "round",
|
|
14159
14379
|
strokeWidth: 2,
|
|
@@ -14172,7 +14392,7 @@ const ApplyCouponButton = ({
|
|
|
14172
14392
|
disableCouponButton
|
|
14173
14393
|
},
|
|
14174
14394
|
dispatch
|
|
14175
|
-
} = useContext(store$
|
|
14395
|
+
} = useContext(store$f);
|
|
14176
14396
|
const {
|
|
14177
14397
|
t
|
|
14178
14398
|
} = useTranslation("checkoutForm");
|
|
@@ -14206,7 +14426,7 @@ const CouponCodeField = props => {
|
|
|
14206
14426
|
couponCode,
|
|
14207
14427
|
couponError
|
|
14208
14428
|
}
|
|
14209
|
-
} = useContext(store$
|
|
14429
|
+
} = useContext(store$f);
|
|
14210
14430
|
|
|
14211
14431
|
const onCouponCodeChange = e => {
|
|
14212
14432
|
dispatch({
|
|
@@ -14235,17 +14455,17 @@ const CouponCodeField = props => {
|
|
|
14235
14455
|
}, props));
|
|
14236
14456
|
};
|
|
14237
14457
|
|
|
14238
|
-
var _path$
|
|
14458
|
+
var _path$l;
|
|
14239
14459
|
|
|
14240
|
-
function _extends$
|
|
14460
|
+
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); }
|
|
14241
14461
|
|
|
14242
14462
|
function SvgTicket(props) {
|
|
14243
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14463
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
14244
14464
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14245
14465
|
fill: "none",
|
|
14246
14466
|
viewBox: "0 0 24 24",
|
|
14247
14467
|
stroke: "currentColor"
|
|
14248
|
-
}, props), _path$
|
|
14468
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
14249
14469
|
strokeLinecap: "round",
|
|
14250
14470
|
strokeLinejoin: "round",
|
|
14251
14471
|
strokeWidth: 2,
|
|
@@ -14262,7 +14482,7 @@ const CouponCode = ({
|
|
|
14262
14482
|
state: {
|
|
14263
14483
|
enableCouponField
|
|
14264
14484
|
}
|
|
14265
|
-
} = useContext(store$
|
|
14485
|
+
} = useContext(store$f);
|
|
14266
14486
|
const {
|
|
14267
14487
|
t
|
|
14268
14488
|
} = useTranslation("checkoutForm");
|
|
@@ -14519,17 +14739,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14519
14739
|
const {
|
|
14520
14740
|
dispatch,
|
|
14521
14741
|
state
|
|
14522
|
-
} = useContext(store$
|
|
14742
|
+
} = useContext(store$f);
|
|
14523
14743
|
const {
|
|
14524
14744
|
product,
|
|
14525
14745
|
plan,
|
|
14746
|
+
invoice,
|
|
14526
14747
|
selectedAddressId
|
|
14527
14748
|
} = usePelcro();
|
|
14528
14749
|
useEffect(() => {
|
|
14529
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14750
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14530
14751
|
|
|
14531
14752
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14532
|
-
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 :
|
|
14753
|
+
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;
|
|
14533
14754
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14534
14755
|
|
|
14535
14756
|
const initializePaypal = async () => {
|
|
@@ -14538,7 +14759,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14538
14759
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14539
14760
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14540
14761
|
style: props.buttonStyle,
|
|
14541
|
-
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,
|
|
14762
|
+
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,
|
|
14542
14763
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14543
14764
|
displayName: props.merchantDisplayName,
|
|
14544
14765
|
locale: props.locale,
|
|
@@ -14548,9 +14769,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14548
14769
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14549
14770
|
|
|
14550
14771
|
paypalCheckoutInstance.createPayment({
|
|
14551
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14772
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14552
14773
|
amount: updatedPrice,
|
|
14553
|
-
address: selectedAddress,
|
|
14774
|
+
address: invoice ? null : selectedAddress,
|
|
14554
14775
|
onButtonClick: () => {
|
|
14555
14776
|
dispatch({
|
|
14556
14777
|
type: DISABLE_SUBMIT,
|
|
@@ -14604,16 +14825,16 @@ const BankRedirection = () => {
|
|
|
14604
14825
|
}));
|
|
14605
14826
|
};
|
|
14606
14827
|
|
|
14607
|
-
var _path$
|
|
14828
|
+
var _path$k;
|
|
14608
14829
|
|
|
14609
|
-
function _extends$
|
|
14830
|
+
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); }
|
|
14610
14831
|
|
|
14611
14832
|
function SvgLock(props) {
|
|
14612
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14833
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
14613
14834
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14614
14835
|
viewBox: "0 0 20 20",
|
|
14615
14836
|
fill: "currentColor"
|
|
14616
|
-
}, props), _path$
|
|
14837
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
14617
14838
|
fillRule: "evenodd",
|
|
14618
14839
|
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",
|
|
14619
14840
|
clipRule: "evenodd"
|
|
@@ -14630,7 +14851,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14630
14851
|
state: {
|
|
14631
14852
|
isLoading
|
|
14632
14853
|
}
|
|
14633
|
-
} = useContext(store$
|
|
14854
|
+
} = useContext(store$f);
|
|
14634
14855
|
const {
|
|
14635
14856
|
switchView,
|
|
14636
14857
|
selectedPaymentMethodId
|
|
@@ -14672,7 +14893,7 @@ const TaxAmount = () => {
|
|
|
14672
14893
|
state: {
|
|
14673
14894
|
taxAmount
|
|
14674
14895
|
}
|
|
14675
|
-
} = useContext(store$
|
|
14896
|
+
} = useContext(store$f);
|
|
14676
14897
|
const {
|
|
14677
14898
|
plan
|
|
14678
14899
|
} = usePelcro();
|
|
@@ -14835,12 +15056,12 @@ function SubscriptionRenewModal({
|
|
|
14835
15056
|
}
|
|
14836
15057
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14837
15058
|
|
|
14838
|
-
var _path$
|
|
15059
|
+
var _path$j;
|
|
14839
15060
|
|
|
14840
|
-
function _extends$
|
|
15061
|
+
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); }
|
|
14841
15062
|
|
|
14842
15063
|
function SvgGift(props) {
|
|
14843
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15064
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
14844
15065
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14845
15066
|
fill: "none",
|
|
14846
15067
|
stroke: "currentColor",
|
|
@@ -14849,7 +15070,7 @@ function SvgGift(props) {
|
|
|
14849
15070
|
strokeWidth: 2,
|
|
14850
15071
|
viewBox: "0 0 24 24",
|
|
14851
15072
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14852
|
-
}, props), _path$
|
|
15073
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
14853
15074
|
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"
|
|
14854
15075
|
})));
|
|
14855
15076
|
}
|
|
@@ -14887,10 +15108,13 @@ const getCurrentFlow = () => {
|
|
|
14887
15108
|
const {
|
|
14888
15109
|
product,
|
|
14889
15110
|
giftRecipient,
|
|
14890
|
-
giftCode
|
|
15111
|
+
giftCode,
|
|
15112
|
+
invoice
|
|
14891
15113
|
} = usePelcro.getStore();
|
|
14892
15114
|
|
|
14893
|
-
if (
|
|
15115
|
+
if (invoice) {
|
|
15116
|
+
return "invoicePayment";
|
|
15117
|
+
} else if (giftRecipient) {
|
|
14894
15118
|
return "giftCreate";
|
|
14895
15119
|
} else if (giftCode) {
|
|
14896
15120
|
return "giftRedeem";
|
|
@@ -14927,6 +15151,13 @@ const getSuccessContent = i18n => {
|
|
|
14927
15151
|
}),
|
|
14928
15152
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14929
15153
|
successContent: i18n("messages.giftRedeem.content")
|
|
15154
|
+
},
|
|
15155
|
+
invoicePayment: {
|
|
15156
|
+
successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
|
|
15157
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15158
|
+
}),
|
|
15159
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15160
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14930
15161
|
}
|
|
14931
15162
|
};
|
|
14932
15163
|
return wordingDictionary[flow];
|
|
@@ -15180,7 +15411,7 @@ class DefaultNewsLetter extends Component {
|
|
|
15180
15411
|
|
|
15181
15412
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15182
15413
|
|
|
15183
|
-
const initialState$
|
|
15414
|
+
const initialState$e = {
|
|
15184
15415
|
didSubToNewslettersBefore: false,
|
|
15185
15416
|
newsletters: [],
|
|
15186
15417
|
isListLoading: true,
|
|
@@ -15190,10 +15421,10 @@ const initialState$d = {
|
|
|
15190
15421
|
content: ""
|
|
15191
15422
|
}
|
|
15192
15423
|
};
|
|
15193
|
-
const store$
|
|
15424
|
+
const store$e = /*#__PURE__*/createContext(initialState$e);
|
|
15194
15425
|
const {
|
|
15195
|
-
Provider: Provider$
|
|
15196
|
-
} = store$
|
|
15426
|
+
Provider: Provider$e
|
|
15427
|
+
} = store$e;
|
|
15197
15428
|
|
|
15198
15429
|
const NewsletterUpdateContainer = ({
|
|
15199
15430
|
style,
|
|
@@ -15306,7 +15537,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15306
15537
|
default:
|
|
15307
15538
|
return state;
|
|
15308
15539
|
}
|
|
15309
|
-
}, initialState$
|
|
15540
|
+
}, initialState$e);
|
|
15310
15541
|
useEffect(() => {
|
|
15311
15542
|
const getUserNewsletters = () => {
|
|
15312
15543
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15350,7 +15581,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15350
15581
|
style: { ...style
|
|
15351
15582
|
},
|
|
15352
15583
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15353
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15584
|
+
}, /*#__PURE__*/React__default.createElement(Provider$e, {
|
|
15354
15585
|
value: {
|
|
15355
15586
|
state,
|
|
15356
15587
|
dispatch
|
|
@@ -15358,12 +15589,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15358
15589
|
}, children.length ? children.map((child, i) => {
|
|
15359
15590
|
if (child) {
|
|
15360
15591
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15361
|
-
store: store$
|
|
15592
|
+
store: store$e,
|
|
15362
15593
|
key: i
|
|
15363
15594
|
});
|
|
15364
15595
|
}
|
|
15365
15596
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15366
|
-
store: store$
|
|
15597
|
+
store: store$e
|
|
15367
15598
|
})));
|
|
15368
15599
|
};
|
|
15369
15600
|
|
|
@@ -15378,7 +15609,7 @@ const NewsletterUpdateButton = ({
|
|
|
15378
15609
|
isSubmitting,
|
|
15379
15610
|
isListLoading
|
|
15380
15611
|
}
|
|
15381
|
-
} = useContext(store$
|
|
15612
|
+
} = useContext(store$e);
|
|
15382
15613
|
const {
|
|
15383
15614
|
t
|
|
15384
15615
|
} = useTranslation("newsletter");
|
|
@@ -15408,7 +15639,7 @@ const NewsletterUpdateList = () => {
|
|
|
15408
15639
|
newsletters,
|
|
15409
15640
|
isListLoading
|
|
15410
15641
|
}
|
|
15411
|
-
} = useContext(store$
|
|
15642
|
+
} = useContext(store$e);
|
|
15412
15643
|
|
|
15413
15644
|
if (isListLoading) {
|
|
15414
15645
|
return /*#__PURE__*/React__default.createElement(Loader, {
|
|
@@ -15612,7 +15843,7 @@ function SubscriptionCreateModal({
|
|
|
15612
15843
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15613
15844
|
|
|
15614
15845
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15615
|
-
const initialState$
|
|
15846
|
+
const initialState$d = {
|
|
15616
15847
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15617
15848
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15618
15849
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15625,10 +15856,10 @@ const initialState$c = {
|
|
|
15625
15856
|
content: ""
|
|
15626
15857
|
}
|
|
15627
15858
|
};
|
|
15628
|
-
const store$
|
|
15859
|
+
const store$d = /*#__PURE__*/createContext(initialState$d);
|
|
15629
15860
|
const {
|
|
15630
|
-
Provider: Provider$
|
|
15631
|
-
} = store$
|
|
15861
|
+
Provider: Provider$d
|
|
15862
|
+
} = store$d;
|
|
15632
15863
|
|
|
15633
15864
|
const UserUpdateContainer = ({
|
|
15634
15865
|
style,
|
|
@@ -15760,27 +15991,27 @@ const UserUpdateContainer = ({
|
|
|
15760
15991
|
default:
|
|
15761
15992
|
return state;
|
|
15762
15993
|
}
|
|
15763
|
-
}, initialState$
|
|
15994
|
+
}, initialState$d);
|
|
15764
15995
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15765
15996
|
style: { ...style
|
|
15766
15997
|
},
|
|
15767
15998
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15768
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15999
|
+
}, /*#__PURE__*/React__default.createElement(Provider$d, {
|
|
15769
16000
|
value: {
|
|
15770
16001
|
state,
|
|
15771
16002
|
dispatch
|
|
15772
16003
|
}
|
|
15773
16004
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
15774
|
-
store: store$
|
|
16005
|
+
store: store$d,
|
|
15775
16006
|
key: i
|
|
15776
16007
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15777
|
-
store: store$
|
|
16008
|
+
store: store$d
|
|
15778
16009
|
})));
|
|
15779
16010
|
};
|
|
15780
16011
|
|
|
15781
16012
|
const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
15782
16013
|
disabled: true,
|
|
15783
|
-
store: store$
|
|
16014
|
+
store: store$d
|
|
15784
16015
|
}, props));
|
|
15785
16016
|
|
|
15786
16017
|
const UserUpdateButton = ({
|
|
@@ -15793,7 +16024,7 @@ const UserUpdateButton = ({
|
|
|
15793
16024
|
buttonDisabled
|
|
15794
16025
|
},
|
|
15795
16026
|
dispatch
|
|
15796
|
-
} = useContext(store$
|
|
16027
|
+
} = useContext(store$d);
|
|
15797
16028
|
const {
|
|
15798
16029
|
t
|
|
15799
16030
|
} = useTranslation("userEdit");
|
|
@@ -15810,11 +16041,11 @@ const UserUpdateButton = ({
|
|
|
15810
16041
|
};
|
|
15811
16042
|
|
|
15812
16043
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
15813
|
-
store: store$
|
|
16044
|
+
store: store$d
|
|
15814
16045
|
}, props));
|
|
15815
16046
|
|
|
15816
16047
|
const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
15817
|
-
store: store$
|
|
16048
|
+
store: store$d
|
|
15818
16049
|
}, props));
|
|
15819
16050
|
|
|
15820
16051
|
function Phone({
|
|
@@ -15843,22 +16074,22 @@ function Phone({
|
|
|
15843
16074
|
}
|
|
15844
16075
|
|
|
15845
16076
|
const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
15846
|
-
store: store$
|
|
16077
|
+
store: store$d
|
|
15847
16078
|
}, props));
|
|
15848
16079
|
|
|
15849
16080
|
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";
|
|
15850
16081
|
|
|
15851
|
-
var _path$
|
|
16082
|
+
var _path$i;
|
|
15852
16083
|
|
|
15853
|
-
function _extends$
|
|
16084
|
+
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); }
|
|
15854
16085
|
|
|
15855
16086
|
function SvgEdit(props) {
|
|
15856
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
16087
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
15857
16088
|
className: "plc-w-6 plc-h-6",
|
|
15858
16089
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15859
16090
|
viewBox: "0 0 20 20",
|
|
15860
16091
|
fill: "currentColor"
|
|
15861
|
-
}, props), _path$
|
|
16092
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
15862
16093
|
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"
|
|
15863
16094
|
})));
|
|
15864
16095
|
}
|
|
@@ -15990,16 +16221,16 @@ function DisplayName({
|
|
|
15990
16221
|
}
|
|
15991
16222
|
|
|
15992
16223
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
|
|
15993
|
-
store: store$
|
|
16224
|
+
store: store$d
|
|
15994
16225
|
}, props));
|
|
15995
16226
|
|
|
15996
16227
|
const UserUpdateTextInput = props => {
|
|
15997
16228
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
15998
|
-
store: store$
|
|
16229
|
+
store: store$d
|
|
15999
16230
|
}));
|
|
16000
16231
|
};
|
|
16001
16232
|
|
|
16002
|
-
const initialState$
|
|
16233
|
+
const initialState$c = {
|
|
16003
16234
|
isSubmitting: false,
|
|
16004
16235
|
firstName: "",
|
|
16005
16236
|
firstNameError: "",
|
|
@@ -16024,10 +16255,10 @@ const initialState$b = {
|
|
|
16024
16255
|
content: ""
|
|
16025
16256
|
}
|
|
16026
16257
|
};
|
|
16027
|
-
const store$
|
|
16258
|
+
const store$c = /*#__PURE__*/createContext(initialState$c);
|
|
16028
16259
|
const {
|
|
16029
|
-
Provider: Provider$
|
|
16030
|
-
} = store$
|
|
16260
|
+
Provider: Provider$c
|
|
16261
|
+
} = store$c;
|
|
16031
16262
|
|
|
16032
16263
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16033
16264
|
|
|
@@ -16234,7 +16465,7 @@ const AddressCreateContainer = ({
|
|
|
16234
16465
|
default:
|
|
16235
16466
|
return state;
|
|
16236
16467
|
}
|
|
16237
|
-
}, initialState$
|
|
16468
|
+
}, initialState$c);
|
|
16238
16469
|
useEffect(() => {
|
|
16239
16470
|
const getStates = () => {
|
|
16240
16471
|
dispatch({
|
|
@@ -16266,16 +16497,16 @@ const AddressCreateContainer = ({
|
|
|
16266
16497
|
style: { ...style
|
|
16267
16498
|
},
|
|
16268
16499
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16269
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
16500
|
+
}, /*#__PURE__*/React__default.createElement(Provider$c, {
|
|
16270
16501
|
value: {
|
|
16271
16502
|
state,
|
|
16272
16503
|
dispatch
|
|
16273
16504
|
}
|
|
16274
16505
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16275
|
-
store: store$
|
|
16506
|
+
store: store$c,
|
|
16276
16507
|
key: i
|
|
16277
16508
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16278
|
-
store: store$
|
|
16509
|
+
store: store$c
|
|
16279
16510
|
})));
|
|
16280
16511
|
};
|
|
16281
16512
|
|
|
@@ -16286,7 +16517,7 @@ function AddressCreateFirstName(props) {
|
|
|
16286
16517
|
firstName,
|
|
16287
16518
|
firstNameError
|
|
16288
16519
|
}
|
|
16289
|
-
} = useContext(store$
|
|
16520
|
+
} = useContext(store$c);
|
|
16290
16521
|
|
|
16291
16522
|
const handleBlur = () => {
|
|
16292
16523
|
return dispatch({
|
|
@@ -16329,7 +16560,7 @@ function AddressCreateLastName(props) {
|
|
|
16329
16560
|
lastName,
|
|
16330
16561
|
lastNameError
|
|
16331
16562
|
}
|
|
16332
|
-
} = useContext(store$
|
|
16563
|
+
} = useContext(store$c);
|
|
16333
16564
|
|
|
16334
16565
|
const handleBlur = () => {
|
|
16335
16566
|
return dispatch({
|
|
@@ -16372,7 +16603,7 @@ function AddressCreateLine1(props) {
|
|
|
16372
16603
|
line1,
|
|
16373
16604
|
line1Error
|
|
16374
16605
|
}
|
|
16375
|
-
} = useContext(store$
|
|
16606
|
+
} = useContext(store$c);
|
|
16376
16607
|
|
|
16377
16608
|
const handleBlur = () => {
|
|
16378
16609
|
return dispatch({
|
|
@@ -16415,7 +16646,7 @@ function AddressCreateCity(props) {
|
|
|
16415
16646
|
city,
|
|
16416
16647
|
cityError
|
|
16417
16648
|
}
|
|
16418
|
-
} = useContext(store$
|
|
16649
|
+
} = useContext(store$c);
|
|
16419
16650
|
|
|
16420
16651
|
const handleBlur = () => {
|
|
16421
16652
|
return dispatch({
|
|
@@ -16458,7 +16689,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16458
16689
|
postalCode,
|
|
16459
16690
|
postalCodeError
|
|
16460
16691
|
}
|
|
16461
|
-
} = useContext(store$
|
|
16692
|
+
} = useContext(store$c);
|
|
16462
16693
|
|
|
16463
16694
|
const handleBlur = () => {
|
|
16464
16695
|
return dispatch({
|
|
@@ -16504,7 +16735,7 @@ const AddressCreateSubmit = ({
|
|
|
16504
16735
|
state: {
|
|
16505
16736
|
isSubmitting
|
|
16506
16737
|
}
|
|
16507
|
-
} = useContext(store$
|
|
16738
|
+
} = useContext(store$c);
|
|
16508
16739
|
const {
|
|
16509
16740
|
t
|
|
16510
16741
|
} = useTranslation("address");
|
|
@@ -16615,7 +16846,7 @@ function CountrySelect({
|
|
|
16615
16846
|
}
|
|
16616
16847
|
|
|
16617
16848
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
16618
|
-
store: store$
|
|
16849
|
+
store: store$c
|
|
16619
16850
|
}, props));
|
|
16620
16851
|
|
|
16621
16852
|
function StateSelect({
|
|
@@ -16703,7 +16934,7 @@ function StateSelect({
|
|
|
16703
16934
|
}
|
|
16704
16935
|
|
|
16705
16936
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
16706
|
-
store: store$
|
|
16937
|
+
store: store$c
|
|
16707
16938
|
}, props));
|
|
16708
16939
|
|
|
16709
16940
|
const AddressCreateView = props => {
|
|
@@ -16808,18 +17039,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16808
17039
|
|
|
16809
17040
|
const AddressCreateTextInput = props => {
|
|
16810
17041
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
16811
|
-
store: store$
|
|
17042
|
+
store: store$c
|
|
16812
17043
|
}));
|
|
16813
17044
|
};
|
|
16814
17045
|
|
|
16815
17046
|
const AddressCreateLine2 = props => {
|
|
16816
17047
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
16817
17048
|
fieldName: "line2",
|
|
16818
|
-
store: store$
|
|
17049
|
+
store: store$c
|
|
16819
17050
|
}, props));
|
|
16820
17051
|
};
|
|
16821
17052
|
|
|
16822
|
-
const initialState$
|
|
17053
|
+
const initialState$b = {
|
|
16823
17054
|
isSubmitting: false,
|
|
16824
17055
|
firstName: "",
|
|
16825
17056
|
firstNameError: "",
|
|
@@ -16844,10 +17075,10 @@ const initialState$a = {
|
|
|
16844
17075
|
content: ""
|
|
16845
17076
|
}
|
|
16846
17077
|
};
|
|
16847
|
-
const store$
|
|
17078
|
+
const store$b = /*#__PURE__*/createContext(initialState$b);
|
|
16848
17079
|
const {
|
|
16849
|
-
Provider: Provider$
|
|
16850
|
-
} = store$
|
|
17080
|
+
Provider: Provider$b
|
|
17081
|
+
} = store$b;
|
|
16851
17082
|
|
|
16852
17083
|
const AddressUpdateContainer = ({
|
|
16853
17084
|
style,
|
|
@@ -16899,7 +17130,7 @@ const AddressUpdateContainer = ({
|
|
|
16899
17130
|
const thisAddress = addresses[address];
|
|
16900
17131
|
|
|
16901
17132
|
if (+thisAddress.id === +addressId) {
|
|
16902
|
-
const newState = { ...initialState$
|
|
17133
|
+
const newState = { ...initialState$b,
|
|
16903
17134
|
firstName: thisAddress.first_name,
|
|
16904
17135
|
lastName: thisAddress.last_name,
|
|
16905
17136
|
line1: thisAddress.line1,
|
|
@@ -17032,7 +17263,7 @@ const AddressUpdateContainer = ({
|
|
|
17032
17263
|
default:
|
|
17033
17264
|
return state;
|
|
17034
17265
|
}
|
|
17035
|
-
}, initialState$
|
|
17266
|
+
}, initialState$b);
|
|
17036
17267
|
useEffect(() => {
|
|
17037
17268
|
const getStates = () => {
|
|
17038
17269
|
dispatch({
|
|
@@ -17064,21 +17295,21 @@ const AddressUpdateContainer = ({
|
|
|
17064
17295
|
style: { ...style
|
|
17065
17296
|
},
|
|
17066
17297
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17067
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17298
|
+
}, /*#__PURE__*/React__default.createElement(Provider$b, {
|
|
17068
17299
|
value: {
|
|
17069
17300
|
state,
|
|
17070
17301
|
dispatch
|
|
17071
17302
|
}
|
|
17072
17303
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17073
|
-
store: store$
|
|
17304
|
+
store: store$b,
|
|
17074
17305
|
key: i
|
|
17075
17306
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17076
|
-
store: store$
|
|
17307
|
+
store: store$b
|
|
17077
17308
|
})));
|
|
17078
17309
|
};
|
|
17079
17310
|
|
|
17080
17311
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
17081
|
-
store: store$
|
|
17312
|
+
store: store$b
|
|
17082
17313
|
}, props));
|
|
17083
17314
|
|
|
17084
17315
|
function AddressUpdateFirstName(props) {
|
|
@@ -17088,7 +17319,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17088
17319
|
firstName,
|
|
17089
17320
|
firstNameError
|
|
17090
17321
|
}
|
|
17091
|
-
} = useContext(store$
|
|
17322
|
+
} = useContext(store$b);
|
|
17092
17323
|
|
|
17093
17324
|
const handleBlur = () => {
|
|
17094
17325
|
return dispatch({
|
|
@@ -17131,7 +17362,7 @@ function AddressUpdateLastName(props) {
|
|
|
17131
17362
|
lastName,
|
|
17132
17363
|
lastNameError
|
|
17133
17364
|
}
|
|
17134
|
-
} = useContext(store$
|
|
17365
|
+
} = useContext(store$b);
|
|
17135
17366
|
|
|
17136
17367
|
const handleBlur = () => {
|
|
17137
17368
|
return dispatch({
|
|
@@ -17174,7 +17405,7 @@ function AddressUpdateLine1(props) {
|
|
|
17174
17405
|
line1,
|
|
17175
17406
|
line1Error
|
|
17176
17407
|
}
|
|
17177
|
-
} = useContext(store$
|
|
17408
|
+
} = useContext(store$b);
|
|
17178
17409
|
|
|
17179
17410
|
const handleBlur = () => {
|
|
17180
17411
|
return dispatch({
|
|
@@ -17214,7 +17445,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17214
17445
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
17215
17446
|
fieldName: "line2"
|
|
17216
17447
|
}, props, {
|
|
17217
|
-
store: store$
|
|
17448
|
+
store: store$b
|
|
17218
17449
|
}));
|
|
17219
17450
|
};
|
|
17220
17451
|
|
|
@@ -17225,7 +17456,7 @@ function AddressUpdateCity(props) {
|
|
|
17225
17456
|
city,
|
|
17226
17457
|
cityError
|
|
17227
17458
|
}
|
|
17228
|
-
} = useContext(store$
|
|
17459
|
+
} = useContext(store$b);
|
|
17229
17460
|
|
|
17230
17461
|
const handleBlur = () => {
|
|
17231
17462
|
return dispatch({
|
|
@@ -17268,7 +17499,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17268
17499
|
postalCode,
|
|
17269
17500
|
postalCodeError
|
|
17270
17501
|
}
|
|
17271
|
-
} = useContext(store$
|
|
17502
|
+
} = useContext(store$b);
|
|
17272
17503
|
|
|
17273
17504
|
const handleBlur = () => {
|
|
17274
17505
|
return dispatch({
|
|
@@ -17314,7 +17545,7 @@ const AddressUpdateSubmit = ({
|
|
|
17314
17545
|
state: {
|
|
17315
17546
|
isSubmitting
|
|
17316
17547
|
}
|
|
17317
|
-
} = useContext(store$
|
|
17548
|
+
} = useContext(store$b);
|
|
17318
17549
|
const {
|
|
17319
17550
|
t
|
|
17320
17551
|
} = useTranslation("address");
|
|
@@ -17330,7 +17561,7 @@ const AddressUpdateSubmit = ({
|
|
|
17330
17561
|
};
|
|
17331
17562
|
|
|
17332
17563
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
17333
|
-
store: store$
|
|
17564
|
+
store: store$b
|
|
17334
17565
|
}, props));
|
|
17335
17566
|
|
|
17336
17567
|
const AddressUpdateView = props => {
|
|
@@ -17413,7 +17644,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17413
17644
|
|
|
17414
17645
|
const AddressUpdateTextInput = props => {
|
|
17415
17646
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
17416
|
-
store: store$
|
|
17647
|
+
store: store$b
|
|
17417
17648
|
}));
|
|
17418
17649
|
};
|
|
17419
17650
|
|
|
@@ -17496,7 +17727,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17496
17727
|
};
|
|
17497
17728
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17498
17729
|
|
|
17499
|
-
const initialState$
|
|
17730
|
+
const initialState$a = {
|
|
17500
17731
|
email: "",
|
|
17501
17732
|
password: "",
|
|
17502
17733
|
passwordError: null,
|
|
@@ -17509,10 +17740,10 @@ const initialState$9 = {
|
|
|
17509
17740
|
content: ""
|
|
17510
17741
|
}
|
|
17511
17742
|
};
|
|
17512
|
-
const store$
|
|
17743
|
+
const store$a = /*#__PURE__*/createContext(initialState$a);
|
|
17513
17744
|
const {
|
|
17514
|
-
Provider: Provider$
|
|
17515
|
-
} = store$
|
|
17745
|
+
Provider: Provider$a
|
|
17746
|
+
} = store$a;
|
|
17516
17747
|
|
|
17517
17748
|
const PasswordResetContainer = ({
|
|
17518
17749
|
style,
|
|
@@ -17569,7 +17800,7 @@ const PasswordResetContainer = ({
|
|
|
17569
17800
|
type: SET_EMAIL,
|
|
17570
17801
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17571
17802
|
});
|
|
17572
|
-
initialState$
|
|
17803
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17573
17804
|
dispatch({
|
|
17574
17805
|
type: SET_TOKEN,
|
|
17575
17806
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17629,26 +17860,26 @@ const PasswordResetContainer = ({
|
|
|
17629
17860
|
default:
|
|
17630
17861
|
return state;
|
|
17631
17862
|
}
|
|
17632
|
-
}, initialState$
|
|
17863
|
+
}, initialState$a);
|
|
17633
17864
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17634
17865
|
style: { ...style
|
|
17635
17866
|
},
|
|
17636
17867
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17637
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17868
|
+
}, /*#__PURE__*/React__default.createElement(Provider$a, {
|
|
17638
17869
|
value: {
|
|
17639
17870
|
state,
|
|
17640
17871
|
dispatch
|
|
17641
17872
|
}
|
|
17642
17873
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17643
|
-
store: store$
|
|
17874
|
+
store: store$a,
|
|
17644
17875
|
key: i
|
|
17645
17876
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17646
|
-
store: store$
|
|
17877
|
+
store: store$a
|
|
17647
17878
|
})));
|
|
17648
17879
|
};
|
|
17649
17880
|
|
|
17650
17881
|
const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
17651
|
-
store: store$
|
|
17882
|
+
store: store$a
|
|
17652
17883
|
}, props));
|
|
17653
17884
|
|
|
17654
17885
|
const PasswordResetButton = ({
|
|
@@ -17661,7 +17892,7 @@ const PasswordResetButton = ({
|
|
|
17661
17892
|
buttonDisabled
|
|
17662
17893
|
},
|
|
17663
17894
|
dispatch
|
|
17664
|
-
} = useContext(store$
|
|
17895
|
+
} = useContext(store$a);
|
|
17665
17896
|
const {
|
|
17666
17897
|
t
|
|
17667
17898
|
} = useTranslation("passwordReset");
|
|
@@ -17678,14 +17909,14 @@ const PasswordResetButton = ({
|
|
|
17678
17909
|
};
|
|
17679
17910
|
|
|
17680
17911
|
const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17681
|
-
store: store$
|
|
17912
|
+
store: store$a
|
|
17682
17913
|
}, props, {
|
|
17683
17914
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17684
17915
|
disabled: true
|
|
17685
17916
|
}));
|
|
17686
17917
|
|
|
17687
17918
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
|
|
17688
|
-
store: store$
|
|
17919
|
+
store: store$a
|
|
17689
17920
|
}, props));
|
|
17690
17921
|
|
|
17691
17922
|
const PasswordResetView = props => {
|
|
@@ -17737,7 +17968,7 @@ const PasswordResetModal = ({
|
|
|
17737
17968
|
};
|
|
17738
17969
|
PasswordResetModal.viewId = "password-reset";
|
|
17739
17970
|
|
|
17740
|
-
const initialState$
|
|
17971
|
+
const initialState$9 = {
|
|
17741
17972
|
email: "",
|
|
17742
17973
|
emailError: null,
|
|
17743
17974
|
buttonDisabled: false,
|
|
@@ -17746,10 +17977,10 @@ const initialState$8 = {
|
|
|
17746
17977
|
content: ""
|
|
17747
17978
|
}
|
|
17748
17979
|
};
|
|
17749
|
-
const store$
|
|
17980
|
+
const store$9 = /*#__PURE__*/createContext(initialState$9);
|
|
17750
17981
|
const {
|
|
17751
|
-
Provider: Provider$
|
|
17752
|
-
} = store$
|
|
17982
|
+
Provider: Provider$9
|
|
17983
|
+
} = store$9;
|
|
17753
17984
|
|
|
17754
17985
|
const PasswordForgotContainer = ({
|
|
17755
17986
|
style,
|
|
@@ -17827,21 +18058,21 @@ const PasswordForgotContainer = ({
|
|
|
17827
18058
|
default:
|
|
17828
18059
|
return state;
|
|
17829
18060
|
}
|
|
17830
|
-
}, initialState$
|
|
18061
|
+
}, initialState$9);
|
|
17831
18062
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17832
18063
|
style: { ...style
|
|
17833
18064
|
},
|
|
17834
18065
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17835
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18066
|
+
}, /*#__PURE__*/React__default.createElement(Provider$9, {
|
|
17836
18067
|
value: {
|
|
17837
18068
|
state,
|
|
17838
18069
|
dispatch
|
|
17839
18070
|
}
|
|
17840
18071
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17841
|
-
store: store$
|
|
18072
|
+
store: store$9,
|
|
17842
18073
|
key: i
|
|
17843
18074
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17844
|
-
store: store$
|
|
18075
|
+
store: store$9
|
|
17845
18076
|
})));
|
|
17846
18077
|
};
|
|
17847
18078
|
|
|
@@ -17857,7 +18088,7 @@ const PasswordForgotButton = ({
|
|
|
17857
18088
|
emailError
|
|
17858
18089
|
},
|
|
17859
18090
|
dispatch
|
|
17860
|
-
} = useContext(store$
|
|
18091
|
+
} = useContext(store$9);
|
|
17861
18092
|
const {
|
|
17862
18093
|
t
|
|
17863
18094
|
} = useTranslation("passwordForgot");
|
|
@@ -17878,7 +18109,7 @@ const PasswordForgotButton = ({
|
|
|
17878
18109
|
};
|
|
17879
18110
|
|
|
17880
18111
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17881
|
-
store: store$
|
|
18112
|
+
store: store$9
|
|
17882
18113
|
}, props));
|
|
17883
18114
|
|
|
17884
18115
|
const PasswordForgotView = props => {
|
|
@@ -17928,7 +18159,7 @@ const PasswordForgotModal = ({
|
|
|
17928
18159
|
};
|
|
17929
18160
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17930
18161
|
|
|
17931
|
-
const initialState$
|
|
18162
|
+
const initialState$8 = {
|
|
17932
18163
|
currentPassword: "",
|
|
17933
18164
|
newPassword: "",
|
|
17934
18165
|
confirmNewPassword: "",
|
|
@@ -17942,10 +18173,10 @@ const initialState$7 = {
|
|
|
17942
18173
|
content: ""
|
|
17943
18174
|
}
|
|
17944
18175
|
};
|
|
17945
|
-
const store$
|
|
18176
|
+
const store$8 = /*#__PURE__*/createContext(initialState$8);
|
|
17946
18177
|
const {
|
|
17947
|
-
Provider: Provider$
|
|
17948
|
-
} = store$
|
|
18178
|
+
Provider: Provider$8
|
|
18179
|
+
} = store$8;
|
|
17949
18180
|
const PasswordChangeContainer = ({
|
|
17950
18181
|
style,
|
|
17951
18182
|
className = "",
|
|
@@ -18097,21 +18328,21 @@ const PasswordChangeContainer = ({
|
|
|
18097
18328
|
default:
|
|
18098
18329
|
return state;
|
|
18099
18330
|
}
|
|
18100
|
-
}, initialState$
|
|
18331
|
+
}, initialState$8);
|
|
18101
18332
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18102
18333
|
style: { ...style
|
|
18103
18334
|
},
|
|
18104
18335
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18105
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18336
|
+
}, /*#__PURE__*/React__default.createElement(Provider$8, {
|
|
18106
18337
|
value: {
|
|
18107
18338
|
state,
|
|
18108
18339
|
dispatch
|
|
18109
18340
|
}
|
|
18110
18341
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18111
|
-
store: store$
|
|
18342
|
+
store: store$8,
|
|
18112
18343
|
key: i
|
|
18113
18344
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18114
|
-
store: store$
|
|
18345
|
+
store: store$8
|
|
18115
18346
|
})));
|
|
18116
18347
|
};
|
|
18117
18348
|
|
|
@@ -18122,7 +18353,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18122
18353
|
currentPassword,
|
|
18123
18354
|
currentPasswordError
|
|
18124
18355
|
}
|
|
18125
|
-
} = useContext(store$
|
|
18356
|
+
} = useContext(store$8);
|
|
18126
18357
|
const handleBlur = useCallback(() => {
|
|
18127
18358
|
return dispatch({
|
|
18128
18359
|
type: VALIDATE_PASSWORD
|
|
@@ -18156,7 +18387,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18156
18387
|
newPassword,
|
|
18157
18388
|
newPasswordError
|
|
18158
18389
|
}
|
|
18159
|
-
} = useContext(store$
|
|
18390
|
+
} = useContext(store$8);
|
|
18160
18391
|
const handleBlur = useCallback(() => {
|
|
18161
18392
|
return dispatch({
|
|
18162
18393
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18190,7 +18421,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18190
18421
|
confirmNewPassword,
|
|
18191
18422
|
confirmNewPasswordError
|
|
18192
18423
|
}
|
|
18193
|
-
} = useContext(store$
|
|
18424
|
+
} = useContext(store$8);
|
|
18194
18425
|
const handleBlur = useCallback(() => {
|
|
18195
18426
|
return dispatch({
|
|
18196
18427
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18231,7 +18462,7 @@ const PasswordChangeButton = ({
|
|
|
18231
18462
|
confirmNewPasswordError
|
|
18232
18463
|
},
|
|
18233
18464
|
dispatch
|
|
18234
|
-
} = useContext(store$
|
|
18465
|
+
} = useContext(store$8);
|
|
18235
18466
|
const {
|
|
18236
18467
|
t
|
|
18237
18468
|
} = useTranslation("passwordChange");
|
|
@@ -18297,17 +18528,17 @@ const PasswordChangeModal = ({
|
|
|
18297
18528
|
};
|
|
18298
18529
|
PasswordChangeModal.viewId = "password-change";
|
|
18299
18530
|
|
|
18300
|
-
const initialState$
|
|
18531
|
+
const initialState$7 = {
|
|
18301
18532
|
buttonDisabled: false,
|
|
18302
18533
|
alert: {
|
|
18303
18534
|
type: "error",
|
|
18304
18535
|
content: ""
|
|
18305
18536
|
}
|
|
18306
18537
|
};
|
|
18307
|
-
const store$
|
|
18538
|
+
const store$7 = /*#__PURE__*/createContext(initialState$7);
|
|
18308
18539
|
const {
|
|
18309
|
-
Provider: Provider$
|
|
18310
|
-
} = store$
|
|
18540
|
+
Provider: Provider$7
|
|
18541
|
+
} = store$7;
|
|
18311
18542
|
|
|
18312
18543
|
const CartContainer = ({
|
|
18313
18544
|
style,
|
|
@@ -18398,21 +18629,21 @@ const CartContainer = ({
|
|
|
18398
18629
|
default:
|
|
18399
18630
|
return state;
|
|
18400
18631
|
}
|
|
18401
|
-
}, initialState$
|
|
18632
|
+
}, initialState$7);
|
|
18402
18633
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18403
18634
|
style: { ...style
|
|
18404
18635
|
},
|
|
18405
18636
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18406
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18637
|
+
}, /*#__PURE__*/React__default.createElement(Provider$7, {
|
|
18407
18638
|
value: {
|
|
18408
18639
|
state,
|
|
18409
18640
|
dispatch
|
|
18410
18641
|
}
|
|
18411
18642
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18412
|
-
store: store$
|
|
18643
|
+
store: store$7,
|
|
18413
18644
|
key: i
|
|
18414
18645
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18415
|
-
store: store$
|
|
18646
|
+
store: store$7
|
|
18416
18647
|
})));
|
|
18417
18648
|
};
|
|
18418
18649
|
|
|
@@ -18449,7 +18680,7 @@ const CartSubmit = ({
|
|
|
18449
18680
|
buttonDisabled
|
|
18450
18681
|
},
|
|
18451
18682
|
dispatch
|
|
18452
|
-
} = useContext(store$
|
|
18683
|
+
} = useContext(store$7);
|
|
18453
18684
|
const {
|
|
18454
18685
|
t
|
|
18455
18686
|
} = useTranslation("cart");
|
|
@@ -18480,7 +18711,7 @@ const CartTotalPrice = () => {
|
|
|
18480
18711
|
state: {
|
|
18481
18712
|
alert
|
|
18482
18713
|
}
|
|
18483
|
-
} = useContext(store$
|
|
18714
|
+
} = useContext(store$7);
|
|
18484
18715
|
const {
|
|
18485
18716
|
cartItems
|
|
18486
18717
|
} = usePelcro();
|
|
@@ -18793,7 +19024,7 @@ const OrderConfirmModal = props => {
|
|
|
18793
19024
|
};
|
|
18794
19025
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18795
19026
|
|
|
18796
|
-
const initialState$
|
|
19027
|
+
const initialState$6 = {
|
|
18797
19028
|
email: "",
|
|
18798
19029
|
firstName: "",
|
|
18799
19030
|
lastName: "",
|
|
@@ -18805,10 +19036,10 @@ const initialState$5 = {
|
|
|
18805
19036
|
content: ""
|
|
18806
19037
|
}
|
|
18807
19038
|
};
|
|
18808
|
-
const store$
|
|
19039
|
+
const store$6 = /*#__PURE__*/createContext(initialState$6);
|
|
18809
19040
|
const {
|
|
18810
|
-
Provider: Provider$
|
|
18811
|
-
} = store$
|
|
19041
|
+
Provider: Provider$6
|
|
19042
|
+
} = store$6;
|
|
18812
19043
|
|
|
18813
19044
|
const GiftCreateContainer = ({
|
|
18814
19045
|
style,
|
|
@@ -18912,21 +19143,21 @@ const GiftCreateContainer = ({
|
|
|
18912
19143
|
default:
|
|
18913
19144
|
return state;
|
|
18914
19145
|
}
|
|
18915
|
-
}, initialState$
|
|
19146
|
+
}, initialState$6);
|
|
18916
19147
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18917
19148
|
style: { ...style
|
|
18918
19149
|
},
|
|
18919
19150
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18920
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19151
|
+
}, /*#__PURE__*/React__default.createElement(Provider$6, {
|
|
18921
19152
|
value: {
|
|
18922
19153
|
state,
|
|
18923
19154
|
dispatch
|
|
18924
19155
|
}
|
|
18925
19156
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18926
|
-
store: store$
|
|
19157
|
+
store: store$6,
|
|
18927
19158
|
key: i
|
|
18928
19159
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18929
|
-
store: store$
|
|
19160
|
+
store: store$6
|
|
18930
19161
|
})));
|
|
18931
19162
|
};
|
|
18932
19163
|
|
|
@@ -18940,7 +19171,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18940
19171
|
state: {
|
|
18941
19172
|
disableSubmit
|
|
18942
19173
|
}
|
|
18943
|
-
} = useContext(store$
|
|
19174
|
+
} = useContext(store$6);
|
|
18944
19175
|
const {
|
|
18945
19176
|
t
|
|
18946
19177
|
} = useTranslation("register");
|
|
@@ -18957,29 +19188,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18957
19188
|
|
|
18958
19189
|
const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
18959
19190
|
initWithUserEmail: false,
|
|
18960
|
-
store: store$
|
|
19191
|
+
store: store$6
|
|
18961
19192
|
}, props));
|
|
18962
19193
|
|
|
18963
19194
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
18964
|
-
store: store$
|
|
19195
|
+
store: store$6
|
|
18965
19196
|
}, props));
|
|
18966
19197
|
|
|
18967
19198
|
const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
18968
|
-
store: store$
|
|
19199
|
+
store: store$6
|
|
18969
19200
|
}, props));
|
|
18970
19201
|
|
|
18971
|
-
var _path$
|
|
19202
|
+
var _path$h;
|
|
18972
19203
|
|
|
18973
|
-
function _extends$
|
|
19204
|
+
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); }
|
|
18974
19205
|
|
|
18975
19206
|
function SvgInfoCircle(props) {
|
|
18976
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
19207
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
18977
19208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18978
19209
|
className: "plc-w-5 plc-h-5",
|
|
18979
19210
|
fill: "none",
|
|
18980
19211
|
viewBox: "0 0 24 24",
|
|
18981
19212
|
stroke: "currentColor"
|
|
18982
|
-
}, props), _path$
|
|
19213
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
18983
19214
|
strokeLinecap: "round",
|
|
18984
19215
|
strokeLinejoin: "round",
|
|
18985
19216
|
strokeWidth: 2,
|
|
@@ -19050,7 +19281,7 @@ const GiftCreateStartDate = props => {
|
|
|
19050
19281
|
const {
|
|
19051
19282
|
dispatch,
|
|
19052
19283
|
state
|
|
19053
|
-
} = useContext(store$
|
|
19284
|
+
} = useContext(store$6);
|
|
19054
19285
|
|
|
19055
19286
|
const handleInputChange = value => {
|
|
19056
19287
|
dispatch({
|
|
@@ -19121,7 +19352,7 @@ function GiftCreateMessage(props) {
|
|
|
19121
19352
|
const {
|
|
19122
19353
|
dispatch,
|
|
19123
19354
|
state
|
|
19124
|
-
} = useContext(store$
|
|
19355
|
+
} = useContext(store$6);
|
|
19125
19356
|
|
|
19126
19357
|
const handleInputChange = value => {
|
|
19127
19358
|
dispatch({
|
|
@@ -19241,7 +19472,7 @@ const GiftCreateModal = ({
|
|
|
19241
19472
|
};
|
|
19242
19473
|
GiftCreateModal.viewId = "gift-create";
|
|
19243
19474
|
|
|
19244
|
-
const initialState$
|
|
19475
|
+
const initialState$5 = {
|
|
19245
19476
|
giftCode: "",
|
|
19246
19477
|
buttonDisabled: true,
|
|
19247
19478
|
alert: {
|
|
@@ -19249,10 +19480,10 @@ const initialState$4 = {
|
|
|
19249
19480
|
content: ""
|
|
19250
19481
|
}
|
|
19251
19482
|
};
|
|
19252
|
-
const store$
|
|
19483
|
+
const store$5 = /*#__PURE__*/createContext(initialState$5);
|
|
19253
19484
|
const {
|
|
19254
|
-
Provider: Provider$
|
|
19255
|
-
} = store$
|
|
19485
|
+
Provider: Provider$5
|
|
19486
|
+
} = store$5;
|
|
19256
19487
|
|
|
19257
19488
|
const GiftRedeemContainer = ({
|
|
19258
19489
|
style,
|
|
@@ -19317,21 +19548,21 @@ const GiftRedeemContainer = ({
|
|
|
19317
19548
|
default:
|
|
19318
19549
|
return state;
|
|
19319
19550
|
}
|
|
19320
|
-
}, initialState$
|
|
19551
|
+
}, initialState$5);
|
|
19321
19552
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19322
19553
|
style: { ...style
|
|
19323
19554
|
},
|
|
19324
19555
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19325
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19556
|
+
}, /*#__PURE__*/React__default.createElement(Provider$5, {
|
|
19326
19557
|
value: {
|
|
19327
19558
|
state,
|
|
19328
19559
|
dispatch
|
|
19329
19560
|
}
|
|
19330
19561
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19331
|
-
store: store$
|
|
19562
|
+
store: store$5,
|
|
19332
19563
|
key: i
|
|
19333
19564
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19334
|
-
store: store$
|
|
19565
|
+
store: store$5
|
|
19335
19566
|
})));
|
|
19336
19567
|
};
|
|
19337
19568
|
|
|
@@ -19368,7 +19599,7 @@ function GiftCode({
|
|
|
19368
19599
|
}
|
|
19369
19600
|
|
|
19370
19601
|
const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
|
|
19371
|
-
store: store$
|
|
19602
|
+
store: store$5
|
|
19372
19603
|
}, props));
|
|
19373
19604
|
|
|
19374
19605
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19381,7 +19612,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19381
19612
|
state: {
|
|
19382
19613
|
disableSubmit
|
|
19383
19614
|
}
|
|
19384
|
-
} = useContext(store$
|
|
19615
|
+
} = useContext(store$5);
|
|
19385
19616
|
const {
|
|
19386
19617
|
t
|
|
19387
19618
|
} = useTranslation("register");
|
|
@@ -19474,7 +19705,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19474
19705
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19475
19706
|
};
|
|
19476
19707
|
|
|
19477
|
-
const initialState$
|
|
19708
|
+
const initialState$4 = {
|
|
19478
19709
|
addresses: [],
|
|
19479
19710
|
selectedAddressId: null,
|
|
19480
19711
|
isSubmitting: false,
|
|
@@ -19483,10 +19714,10 @@ const initialState$3 = {
|
|
|
19483
19714
|
content: ""
|
|
19484
19715
|
}
|
|
19485
19716
|
};
|
|
19486
|
-
const store$
|
|
19717
|
+
const store$4 = /*#__PURE__*/createContext(initialState$4);
|
|
19487
19718
|
const {
|
|
19488
|
-
Provider: Provider$
|
|
19489
|
-
} = store$
|
|
19719
|
+
Provider: Provider$4
|
|
19720
|
+
} = store$4;
|
|
19490
19721
|
|
|
19491
19722
|
const AddressSelectContainer = ({
|
|
19492
19723
|
style,
|
|
@@ -19581,7 +19812,7 @@ const AddressSelectContainer = ({
|
|
|
19581
19812
|
default:
|
|
19582
19813
|
return state;
|
|
19583
19814
|
}
|
|
19584
|
-
}, initialState$
|
|
19815
|
+
}, initialState$4);
|
|
19585
19816
|
useEffect(() => {
|
|
19586
19817
|
var _window$Pelcro$user$r;
|
|
19587
19818
|
|
|
@@ -19594,16 +19825,16 @@ const AddressSelectContainer = ({
|
|
|
19594
19825
|
style: { ...style
|
|
19595
19826
|
},
|
|
19596
19827
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19597
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19828
|
+
}, /*#__PURE__*/React__default.createElement(Provider$4, {
|
|
19598
19829
|
value: {
|
|
19599
19830
|
state,
|
|
19600
19831
|
dispatch
|
|
19601
19832
|
}
|
|
19602
19833
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19603
|
-
store: store$
|
|
19834
|
+
store: store$4,
|
|
19604
19835
|
key: i
|
|
19605
19836
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19606
|
-
store: store$
|
|
19837
|
+
store: store$4
|
|
19607
19838
|
})));
|
|
19608
19839
|
};
|
|
19609
19840
|
|
|
@@ -19614,7 +19845,7 @@ const AddressSelectList = () => {
|
|
|
19614
19845
|
addresses,
|
|
19615
19846
|
selectedAddressId
|
|
19616
19847
|
}
|
|
19617
|
-
} = useContext(store$
|
|
19848
|
+
} = useContext(store$4);
|
|
19618
19849
|
|
|
19619
19850
|
const handleAddressSelect = event => {
|
|
19620
19851
|
dispatch({
|
|
@@ -19658,7 +19889,7 @@ const AddressSelectSubmit = ({
|
|
|
19658
19889
|
selectedAddressId,
|
|
19659
19890
|
isSubmitting
|
|
19660
19891
|
}
|
|
19661
|
-
} = useContext(store$
|
|
19892
|
+
} = useContext(store$4);
|
|
19662
19893
|
const {
|
|
19663
19894
|
t
|
|
19664
19895
|
} = useTranslation("address");
|
|
@@ -19754,7 +19985,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19754
19985
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19755
19986
|
};
|
|
19756
19987
|
|
|
19757
|
-
const initialState$
|
|
19988
|
+
const initialState$3 = {
|
|
19758
19989
|
paymentMethods: [],
|
|
19759
19990
|
selectedPaymentMethodId: null,
|
|
19760
19991
|
isSubmitting: false,
|
|
@@ -19763,10 +19994,10 @@ const initialState$2 = {
|
|
|
19763
19994
|
content: ""
|
|
19764
19995
|
}
|
|
19765
19996
|
};
|
|
19766
|
-
const store$
|
|
19997
|
+
const store$3 = /*#__PURE__*/createContext(initialState$3);
|
|
19767
19998
|
const {
|
|
19768
|
-
Provider: Provider$
|
|
19769
|
-
} = store$
|
|
19999
|
+
Provider: Provider$3
|
|
20000
|
+
} = store$3;
|
|
19770
20001
|
|
|
19771
20002
|
const PaymentMethodSelectContainer = ({
|
|
19772
20003
|
style,
|
|
@@ -19811,7 +20042,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19811
20042
|
default:
|
|
19812
20043
|
return state;
|
|
19813
20044
|
}
|
|
19814
|
-
}, initialState$
|
|
20045
|
+
}, initialState$3);
|
|
19815
20046
|
useEffect(() => {
|
|
19816
20047
|
var _window$Pelcro$user$r4;
|
|
19817
20048
|
|
|
@@ -19824,16 +20055,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19824
20055
|
style: { ...style
|
|
19825
20056
|
},
|
|
19826
20057
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19827
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
20058
|
+
}, /*#__PURE__*/React__default.createElement(Provider$3, {
|
|
19828
20059
|
value: {
|
|
19829
20060
|
state,
|
|
19830
20061
|
dispatch
|
|
19831
20062
|
}
|
|
19832
20063
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19833
|
-
store: store$
|
|
20064
|
+
store: store$3,
|
|
19834
20065
|
key: i
|
|
19835
20066
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19836
|
-
store: store$
|
|
20067
|
+
store: store$3
|
|
19837
20068
|
})));
|
|
19838
20069
|
};
|
|
19839
20070
|
|
|
@@ -19847,7 +20078,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19847
20078
|
paymentMethods,
|
|
19848
20079
|
selectedPaymentMethodId
|
|
19849
20080
|
}
|
|
19850
|
-
} = useContext(store$
|
|
20081
|
+
} = useContext(store$3);
|
|
19851
20082
|
|
|
19852
20083
|
const handlePaymentMethodSelect = event => {
|
|
19853
20084
|
dispatch({
|
|
@@ -19897,7 +20128,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19897
20128
|
selectedPaymentMethodId,
|
|
19898
20129
|
isSubmitting
|
|
19899
20130
|
}
|
|
19900
|
-
} = useContext(store$
|
|
20131
|
+
} = useContext(store$3);
|
|
19901
20132
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
19902
20133
|
onClick: () => {
|
|
19903
20134
|
dispatch({
|
|
@@ -19971,8 +20202,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19971
20202
|
};
|
|
19972
20203
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19973
20204
|
|
|
19974
|
-
function _extends$
|
|
19975
|
-
_extends$
|
|
20205
|
+
function _extends$i() {
|
|
20206
|
+
_extends$i = Object.assign || function (target) {
|
|
19976
20207
|
for (var i = 1; i < arguments.length; i++) {
|
|
19977
20208
|
var source = arguments[i];
|
|
19978
20209
|
|
|
@@ -19986,7 +20217,7 @@ function _extends$h() {
|
|
|
19986
20217
|
return target;
|
|
19987
20218
|
};
|
|
19988
20219
|
|
|
19989
|
-
return _extends$
|
|
20220
|
+
return _extends$i.apply(this, arguments);
|
|
19990
20221
|
}
|
|
19991
20222
|
|
|
19992
20223
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20170,7 +20401,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20170
20401
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20171
20402
|
return null;
|
|
20172
20403
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20173
|
-
return _render(_extends$
|
|
20404
|
+
return _render(_extends$i({}, _rest, {
|
|
20174
20405
|
hidden: true,
|
|
20175
20406
|
style: {
|
|
20176
20407
|
display: 'none'
|
|
@@ -20698,7 +20929,7 @@ function TransitionChild(props) {
|
|
|
20698
20929
|
var passthroughProps = rest;
|
|
20699
20930
|
return React__default.createElement(NestingContext.Provider, {
|
|
20700
20931
|
value: nesting
|
|
20701
|
-
}, render(_extends$
|
|
20932
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20702
20933
|
}
|
|
20703
20934
|
|
|
20704
20935
|
function Transition(props) {
|
|
@@ -20742,7 +20973,7 @@ function Transition(props) {
|
|
|
20742
20973
|
value: nestingBag
|
|
20743
20974
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
20744
20975
|
value: transitionBag
|
|
20745
|
-
}, render(_extends$
|
|
20976
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20746
20977
|
as: Fragment,
|
|
20747
20978
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20748
20979
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20869,12 +21100,12 @@ var ActionTypes;
|
|
|
20869
21100
|
})(ActionTypes || (ActionTypes = {}));
|
|
20870
21101
|
|
|
20871
21102
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20872
|
-
return _extends$
|
|
21103
|
+
return _extends$i({}, state, {
|
|
20873
21104
|
activeItemIndex: null,
|
|
20874
21105
|
menuState: MenuStates.Closed
|
|
20875
21106
|
});
|
|
20876
21107
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20877
|
-
return _extends$
|
|
21108
|
+
return _extends$i({}, state, {
|
|
20878
21109
|
menuState: MenuStates.Open
|
|
20879
21110
|
});
|
|
20880
21111
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20893,7 +21124,7 @@ var ActionTypes;
|
|
|
20893
21124
|
}
|
|
20894
21125
|
});
|
|
20895
21126
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20896
|
-
return _extends$
|
|
21127
|
+
return _extends$i({}, state, {
|
|
20897
21128
|
searchQuery: '',
|
|
20898
21129
|
activeItemIndex: activeItemIndex
|
|
20899
21130
|
});
|
|
@@ -20904,19 +21135,19 @@ var ActionTypes;
|
|
|
20904
21135
|
|
|
20905
21136
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20906
21137
|
});
|
|
20907
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21138
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20908
21139
|
searchQuery: searchQuery
|
|
20909
21140
|
});
|
|
20910
|
-
return _extends$
|
|
21141
|
+
return _extends$i({}, state, {
|
|
20911
21142
|
searchQuery: searchQuery,
|
|
20912
21143
|
activeItemIndex: match
|
|
20913
21144
|
});
|
|
20914
21145
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20915
|
-
return _extends$
|
|
21146
|
+
return _extends$i({}, state, {
|
|
20916
21147
|
searchQuery: ''
|
|
20917
21148
|
});
|
|
20918
21149
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20919
|
-
return _extends$
|
|
21150
|
+
return _extends$i({}, state, {
|
|
20920
21151
|
items: [].concat(state.items, [{
|
|
20921
21152
|
id: action.id,
|
|
20922
21153
|
dataRef: action.dataRef
|
|
@@ -20929,7 +21160,7 @@ var ActionTypes;
|
|
|
20929
21160
|
return a.id === action.id;
|
|
20930
21161
|
});
|
|
20931
21162
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20932
|
-
return _extends$
|
|
21163
|
+
return _extends$i({}, state, {
|
|
20933
21164
|
items: nextItems,
|
|
20934
21165
|
activeItemIndex: function () {
|
|
20935
21166
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20968,19 +21199,19 @@ var ActionTypes$1;
|
|
|
20968
21199
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20969
21200
|
if (state.disabled) return state;
|
|
20970
21201
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20971
|
-
return _extends$
|
|
21202
|
+
return _extends$i({}, state, {
|
|
20972
21203
|
activeOptionIndex: null,
|
|
20973
21204
|
listboxState: ListboxStates.Closed
|
|
20974
21205
|
});
|
|
20975
21206
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20976
21207
|
if (state.disabled) return state;
|
|
20977
21208
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20978
|
-
return _extends$
|
|
21209
|
+
return _extends$i({}, state, {
|
|
20979
21210
|
listboxState: ListboxStates.Open
|
|
20980
21211
|
});
|
|
20981
21212
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20982
21213
|
if (state.disabled === action.disabled) return state;
|
|
20983
|
-
return _extends$
|
|
21214
|
+
return _extends$i({}, state, {
|
|
20984
21215
|
disabled: action.disabled
|
|
20985
21216
|
});
|
|
20986
21217
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -21001,7 +21232,7 @@ var ActionTypes$1;
|
|
|
21001
21232
|
}
|
|
21002
21233
|
});
|
|
21003
21234
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21004
|
-
return _extends$
|
|
21235
|
+
return _extends$i({}, state, {
|
|
21005
21236
|
searchQuery: '',
|
|
21006
21237
|
activeOptionIndex: activeOptionIndex
|
|
21007
21238
|
});
|
|
@@ -21014,10 +21245,10 @@ var ActionTypes$1;
|
|
|
21014
21245
|
|
|
21015
21246
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21016
21247
|
});
|
|
21017
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21248
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21018
21249
|
searchQuery: searchQuery
|
|
21019
21250
|
});
|
|
21020
|
-
return _extends$
|
|
21251
|
+
return _extends$i({}, state, {
|
|
21021
21252
|
searchQuery: searchQuery,
|
|
21022
21253
|
activeOptionIndex: match
|
|
21023
21254
|
});
|
|
@@ -21025,11 +21256,11 @@ var ActionTypes$1;
|
|
|
21025
21256
|
if (state.disabled) return state;
|
|
21026
21257
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21027
21258
|
if (state.searchQuery === '') return state;
|
|
21028
|
-
return _extends$
|
|
21259
|
+
return _extends$i({}, state, {
|
|
21029
21260
|
searchQuery: ''
|
|
21030
21261
|
});
|
|
21031
21262
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21032
|
-
return _extends$
|
|
21263
|
+
return _extends$i({}, state, {
|
|
21033
21264
|
options: [].concat(state.options, [{
|
|
21034
21265
|
id: action.id,
|
|
21035
21266
|
dataRef: action.dataRef
|
|
@@ -21042,7 +21273,7 @@ var ActionTypes$1;
|
|
|
21042
21273
|
return a.id === action.id;
|
|
21043
21274
|
});
|
|
21044
21275
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21045
|
-
return _extends$
|
|
21276
|
+
return _extends$i({}, state, {
|
|
21046
21277
|
options: nextOptions,
|
|
21047
21278
|
activeOptionIndex: function () {
|
|
21048
21279
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21103,18 +21334,18 @@ const getPaymentCardIcon = name => {
|
|
|
21103
21334
|
}));
|
|
21104
21335
|
};
|
|
21105
21336
|
|
|
21106
|
-
var _path$
|
|
21337
|
+
var _path$g;
|
|
21107
21338
|
|
|
21108
|
-
function _extends$
|
|
21339
|
+
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); }
|
|
21109
21340
|
|
|
21110
21341
|
function SvgChevronRight(props) {
|
|
21111
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21342
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
21112
21343
|
className: "plc-w-6 plc-h-6",
|
|
21113
21344
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21114
21345
|
fill: "none",
|
|
21115
21346
|
viewBox: "0 0 24 24",
|
|
21116
21347
|
stroke: "currentColor"
|
|
21117
|
-
}, props), _path$
|
|
21348
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
21118
21349
|
strokeLinecap: "round",
|
|
21119
21350
|
strokeLinejoin: "round",
|
|
21120
21351
|
strokeWidth: 2,
|
|
@@ -21330,18 +21561,18 @@ const SavedItems = ({
|
|
|
21330
21561
|
});
|
|
21331
21562
|
};
|
|
21332
21563
|
|
|
21333
|
-
var _path$
|
|
21564
|
+
var _path$f;
|
|
21334
21565
|
|
|
21335
|
-
function _extends$
|
|
21566
|
+
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); }
|
|
21336
21567
|
|
|
21337
21568
|
function SvgRefresh(props) {
|
|
21338
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21569
|
+
return /*#__PURE__*/React.createElement("svg", _extends$g({
|
|
21339
21570
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21340
21571
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21341
21572
|
fill: "none",
|
|
21342
21573
|
viewBox: "0 0 24 24",
|
|
21343
21574
|
stroke: "currentColor"
|
|
21344
|
-
}, props), _path$
|
|
21575
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
21345
21576
|
strokeLinecap: "round",
|
|
21346
21577
|
strokeLinejoin: "round",
|
|
21347
21578
|
strokeWidth: 2,
|
|
@@ -21349,35 +21580,35 @@ function SvgRefresh(props) {
|
|
|
21349
21580
|
})));
|
|
21350
21581
|
}
|
|
21351
21582
|
|
|
21352
|
-
var _path$
|
|
21583
|
+
var _path$e;
|
|
21353
21584
|
|
|
21354
|
-
function _extends$
|
|
21585
|
+
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); }
|
|
21355
21586
|
|
|
21356
21587
|
function SvgCalendar(props) {
|
|
21357
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21588
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
21358
21589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21359
21590
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21360
21591
|
viewBox: "0 0 20 20",
|
|
21361
21592
|
fill: "currentColor"
|
|
21362
|
-
}, props), _path$
|
|
21593
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
21363
21594
|
fillRule: "evenodd",
|
|
21364
21595
|
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",
|
|
21365
21596
|
clipRule: "evenodd"
|
|
21366
21597
|
})));
|
|
21367
21598
|
}
|
|
21368
21599
|
|
|
21369
|
-
var _path$
|
|
21600
|
+
var _path$d;
|
|
21370
21601
|
|
|
21371
|
-
function _extends$
|
|
21602
|
+
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); }
|
|
21372
21603
|
|
|
21373
21604
|
function SvgPlus(props) {
|
|
21374
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21605
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
21375
21606
|
className: "plc-w-5 plc-h-5",
|
|
21376
21607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21377
21608
|
fill: "none",
|
|
21378
21609
|
viewBox: "0 0 24 24",
|
|
21379
21610
|
stroke: "currentColor"
|
|
21380
|
-
}, props), _path$
|
|
21611
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
21381
21612
|
strokeLinecap: "round",
|
|
21382
21613
|
strokeLinejoin: "round",
|
|
21383
21614
|
strokeWidth: 2,
|
|
@@ -21385,17 +21616,17 @@ function SvgPlus(props) {
|
|
|
21385
21616
|
})));
|
|
21386
21617
|
}
|
|
21387
21618
|
|
|
21388
|
-
var _path$
|
|
21619
|
+
var _path$c;
|
|
21389
21620
|
|
|
21390
|
-
function _extends$
|
|
21621
|
+
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); }
|
|
21391
21622
|
|
|
21392
21623
|
function SvgCheckMark(props) {
|
|
21393
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21624
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
21394
21625
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21395
21626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21396
21627
|
viewBox: "0 0 20 20",
|
|
21397
21628
|
fill: "currentColor"
|
|
21398
|
-
}, props), _path$
|
|
21629
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
21399
21630
|
fillRule: "evenodd",
|
|
21400
21631
|
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",
|
|
21401
21632
|
clipRule: "evenodd"
|
|
@@ -21690,18 +21921,18 @@ Accordion.item = function AccordionItem({
|
|
|
21690
21921
|
}, content)) : null;
|
|
21691
21922
|
};
|
|
21692
21923
|
|
|
21693
|
-
var _path$
|
|
21924
|
+
var _path$b;
|
|
21694
21925
|
|
|
21695
|
-
function _extends$
|
|
21926
|
+
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); }
|
|
21696
21927
|
|
|
21697
21928
|
function SvgExit(props) {
|
|
21698
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21929
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
21699
21930
|
className: "plc-w-6 plc-h-6",
|
|
21700
21931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21701
21932
|
fill: "none",
|
|
21702
21933
|
viewBox: "0 0 24 24",
|
|
21703
21934
|
stroke: "currentColor"
|
|
21704
|
-
}, props), _path$
|
|
21935
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
21705
21936
|
strokeLinecap: "round",
|
|
21706
21937
|
strokeLinejoin: "round",
|
|
21707
21938
|
strokeWidth: 2,
|
|
@@ -21709,13 +21940,32 @@ function SvgExit(props) {
|
|
|
21709
21940
|
})));
|
|
21710
21941
|
}
|
|
21711
21942
|
|
|
21943
|
+
var _path$a;
|
|
21944
|
+
|
|
21945
|
+
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); }
|
|
21946
|
+
|
|
21947
|
+
function SvgUser(props) {
|
|
21948
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
21949
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21950
|
+
fill: "none",
|
|
21951
|
+
viewBox: "0 0 24 24",
|
|
21952
|
+
stroke: "currentColor"
|
|
21953
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
21954
|
+
strokeLinecap: "round",
|
|
21955
|
+
strokeLinejoin: "round",
|
|
21956
|
+
strokeWidth: 2,
|
|
21957
|
+
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"
|
|
21958
|
+
})));
|
|
21959
|
+
}
|
|
21960
|
+
|
|
21712
21961
|
var _path$9;
|
|
21713
21962
|
|
|
21714
21963
|
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); }
|
|
21715
21964
|
|
|
21716
|
-
function
|
|
21965
|
+
function SvgNewsletter(props) {
|
|
21717
21966
|
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
21718
21967
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21968
|
+
className: "plc-h-5 plc-w-5",
|
|
21719
21969
|
fill: "none",
|
|
21720
21970
|
viewBox: "0 0 24 24",
|
|
21721
21971
|
stroke: "currentColor"
|
|
@@ -21723,7 +21973,7 @@ function SvgUser(props) {
|
|
|
21723
21973
|
strokeLinecap: "round",
|
|
21724
21974
|
strokeLinejoin: "round",
|
|
21725
21975
|
strokeWidth: 2,
|
|
21726
|
-
d: "
|
|
21976
|
+
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"
|
|
21727
21977
|
})));
|
|
21728
21978
|
}
|
|
21729
21979
|
|
|
@@ -21731,10 +21981,10 @@ var _path$8;
|
|
|
21731
21981
|
|
|
21732
21982
|
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); }
|
|
21733
21983
|
|
|
21734
|
-
function
|
|
21984
|
+
function SvgDocument(props) {
|
|
21735
21985
|
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
21736
21986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21737
|
-
className: "plc-h-
|
|
21987
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21738
21988
|
fill: "none",
|
|
21739
21989
|
viewBox: "0 0 24 24",
|
|
21740
21990
|
stroke: "currentColor"
|
|
@@ -21742,7 +21992,7 @@ function SvgNewsletter(props) {
|
|
|
21742
21992
|
strokeLinecap: "round",
|
|
21743
21993
|
strokeLinejoin: "round",
|
|
21744
21994
|
strokeWidth: 2,
|
|
21745
|
-
d: "
|
|
21995
|
+
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"
|
|
21746
21996
|
})));
|
|
21747
21997
|
}
|
|
21748
21998
|
|
|
@@ -21910,9 +22160,11 @@ const DonationsMenu = () => {
|
|
|
21910
22160
|
};
|
|
21911
22161
|
|
|
21912
22162
|
function getDonationSubs() {
|
|
21913
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22163
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r;
|
|
21914
22164
|
|
|
21915
|
-
|
|
22165
|
+
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22166
|
+
const canceledDonations = (_window$Pelcro$user$r = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
|
|
22167
|
+
return [...donations, ...canceledDonations];
|
|
21916
22168
|
}
|
|
21917
22169
|
|
|
21918
22170
|
function formatStartDate(date) {
|
|
@@ -21920,6 +22172,130 @@ function formatStartDate(date) {
|
|
|
21920
22172
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21921
22173
|
}
|
|
21922
22174
|
|
|
22175
|
+
const InvoicesMenu = props => {
|
|
22176
|
+
const {
|
|
22177
|
+
t
|
|
22178
|
+
} = useTranslation("dashboard");
|
|
22179
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
22180
|
+
className: "plc-w-full plc-table-fixed"
|
|
22181
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
22182
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22183
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
22184
|
+
className: "plc-w-4/12 "
|
|
22185
|
+
}, t("labels.details")), /*#__PURE__*/React__default.createElement("th", {
|
|
22186
|
+
className: "plc-w-4/12 "
|
|
22187
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
|
|
22188
|
+
className: "plc-w-3/12 "
|
|
22189
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
22190
|
+
className: "plc-h-4"
|
|
22191
|
+
}), /*#__PURE__*/React__default.createElement(InvoicesItems, props)));
|
|
22192
|
+
};
|
|
22193
|
+
|
|
22194
|
+
const InvoicesItems = () => {
|
|
22195
|
+
var _window$Pelcro$invoic;
|
|
22196
|
+
|
|
22197
|
+
const {
|
|
22198
|
+
t
|
|
22199
|
+
} = useTranslation("dashboard");
|
|
22200
|
+
const {
|
|
22201
|
+
setInvoice,
|
|
22202
|
+
switchView
|
|
22203
|
+
} = usePelcro();
|
|
22204
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22205
|
+
|
|
22206
|
+
const showInvoiceDetails = event => {
|
|
22207
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22208
|
+
switchView("invoice-details");
|
|
22209
|
+
}
|
|
22210
|
+
};
|
|
22211
|
+
|
|
22212
|
+
if (invoices.length === 0) return null;
|
|
22213
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22214
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22215
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22216
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
22217
|
+
key: invoice.id,
|
|
22218
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22219
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
22220
|
+
className: "plc-truncate"
|
|
22221
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
22222
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22223
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
22224
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22225
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
22226
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22227
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default.createElement("td", {
|
|
22228
|
+
className: "plc-py-2"
|
|
22229
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
22230
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22231
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
22232
|
+
variant: "ghost",
|
|
22233
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22234
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDocument, {
|
|
22235
|
+
className: "plc-w-4 plc-h-4"
|
|
22236
|
+
}),
|
|
22237
|
+
onClick: showInvoiceDetails,
|
|
22238
|
+
"data-id": invoice.id
|
|
22239
|
+
}, t("labels.view"))));
|
|
22240
|
+
});
|
|
22241
|
+
};
|
|
22242
|
+
|
|
22243
|
+
function getInvoiceStatus(invoice) {
|
|
22244
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22245
|
+
returnObjects: true
|
|
22246
|
+
});
|
|
22247
|
+
|
|
22248
|
+
switch (invoice.status) {
|
|
22249
|
+
case "paid":
|
|
22250
|
+
return {
|
|
22251
|
+
textColor: "plc-text-green-700",
|
|
22252
|
+
bgColor: "plc-bg-green-100",
|
|
22253
|
+
icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null),
|
|
22254
|
+
title: translations.paid
|
|
22255
|
+
};
|
|
22256
|
+
|
|
22257
|
+
case "past_due":
|
|
22258
|
+
return {
|
|
22259
|
+
textColor: "plc-text-orange-700",
|
|
22260
|
+
bgColor: "plc-bg-orange-100",
|
|
22261
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
|
|
22262
|
+
title: translations.pastDue
|
|
22263
|
+
};
|
|
22264
|
+
|
|
22265
|
+
case "open":
|
|
22266
|
+
return {
|
|
22267
|
+
textColor: "plc-text-yellow-700",
|
|
22268
|
+
bgColor: "plc-bg-yellow-100",
|
|
22269
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
|
|
22270
|
+
title: translations.open
|
|
22271
|
+
};
|
|
22272
|
+
|
|
22273
|
+
case "draft":
|
|
22274
|
+
return {
|
|
22275
|
+
textColor: "plc-text-blue-700",
|
|
22276
|
+
bgColor: "plc-bg-blue-100",
|
|
22277
|
+
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
22278
|
+
title: translations.draft
|
|
22279
|
+
};
|
|
22280
|
+
|
|
22281
|
+
case "uncollectible":
|
|
22282
|
+
return {
|
|
22283
|
+
textColor: "plc-text-red-700",
|
|
22284
|
+
bgColor: "plc-bg-red-100",
|
|
22285
|
+
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
22286
|
+
title: translations.uncollectible
|
|
22287
|
+
};
|
|
22288
|
+
|
|
22289
|
+
case "void":
|
|
22290
|
+
return {
|
|
22291
|
+
textColor: "plc-text-gray-700",
|
|
22292
|
+
bgColor: "plc-bg-gray-100",
|
|
22293
|
+
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
22294
|
+
title: translations.void
|
|
22295
|
+
};
|
|
22296
|
+
}
|
|
22297
|
+
}
|
|
22298
|
+
|
|
21923
22299
|
const SUB_MENUS = {
|
|
21924
22300
|
PROFILE: "profile",
|
|
21925
22301
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21928,6 +22304,7 @@ const SUB_MENUS = {
|
|
|
21928
22304
|
ADDRESSES: "addresses",
|
|
21929
22305
|
GIFTS: "gifts",
|
|
21930
22306
|
ORDERS: "orders",
|
|
22307
|
+
INVOICES: "invoices",
|
|
21931
22308
|
SAVED_ITEMS: "saved-items"
|
|
21932
22309
|
};
|
|
21933
22310
|
/**
|
|
@@ -22470,6 +22847,12 @@ class Dashboard extends Component {
|
|
|
22470
22847
|
icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
|
|
22471
22848
|
title: this.locale("labels.orders.label"),
|
|
22472
22849
|
content: /*#__PURE__*/React__default.createElement(OrdersMenu, null)
|
|
22850
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22851
|
+
show: hasInvoices(),
|
|
22852
|
+
name: SUB_MENUS.INVOICES,
|
|
22853
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
|
|
22854
|
+
title: this.locale("labels.invoices"),
|
|
22855
|
+
content: /*#__PURE__*/React__default.createElement(InvoicesMenu, null)
|
|
22473
22856
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22474
22857
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22475
22858
|
icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
|
|
@@ -22485,11 +22868,19 @@ class Dashboard extends Component {
|
|
|
22485
22868
|
|
|
22486
22869
|
}
|
|
22487
22870
|
|
|
22871
|
+
function hasInvoices() {
|
|
22872
|
+
var _window$Pelcro$invoic;
|
|
22873
|
+
|
|
22874
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22875
|
+
return invoices.length > 0;
|
|
22876
|
+
}
|
|
22877
|
+
|
|
22488
22878
|
function hasDonationSubs() {
|
|
22489
|
-
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22879
|
+
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4;
|
|
22490
22880
|
|
|
22491
22881
|
const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
|
|
22492
|
-
|
|
22882
|
+
const canceledDonations = (_window$Pelcro$user$r4 = window.Pelcro.user.read().expired_subscriptions) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
|
|
22883
|
+
return donations.length > 0 || canceledDonations.length > 0;
|
|
22493
22884
|
}
|
|
22494
22885
|
|
|
22495
22886
|
const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
|
|
@@ -22519,7 +22910,7 @@ const DashboardOpenButton = () => {
|
|
|
22519
22910
|
};
|
|
22520
22911
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22521
22912
|
|
|
22522
|
-
const initialState$
|
|
22913
|
+
const initialState$2 = {
|
|
22523
22914
|
imageSrc: null,
|
|
22524
22915
|
crop: {
|
|
22525
22916
|
x: 0,
|
|
@@ -22533,10 +22924,10 @@ const initialState$1 = {
|
|
|
22533
22924
|
content: ""
|
|
22534
22925
|
}
|
|
22535
22926
|
};
|
|
22536
|
-
const store$
|
|
22927
|
+
const store$2 = /*#__PURE__*/createContext(initialState$2);
|
|
22537
22928
|
const {
|
|
22538
|
-
Provider: Provider$
|
|
22539
|
-
} = store$
|
|
22929
|
+
Provider: Provider$2
|
|
22930
|
+
} = store$2;
|
|
22540
22931
|
|
|
22541
22932
|
const ProfilePicChangeContainer = ({
|
|
22542
22933
|
style,
|
|
@@ -22670,21 +23061,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22670
23061
|
default:
|
|
22671
23062
|
return state;
|
|
22672
23063
|
}
|
|
22673
|
-
}, initialState$
|
|
23064
|
+
}, initialState$2);
|
|
22674
23065
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22675
23066
|
style: { ...style
|
|
22676
23067
|
},
|
|
22677
23068
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22678
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
23069
|
+
}, /*#__PURE__*/React__default.createElement(Provider$2, {
|
|
22679
23070
|
value: {
|
|
22680
23071
|
state,
|
|
22681
23072
|
dispatch
|
|
22682
23073
|
}
|
|
22683
23074
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
22684
|
-
store: store$
|
|
23075
|
+
store: store$2,
|
|
22685
23076
|
key: i
|
|
22686
23077
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
22687
|
-
store: store$
|
|
23078
|
+
store: store$2
|
|
22688
23079
|
})));
|
|
22689
23080
|
};
|
|
22690
23081
|
/**
|
|
@@ -22746,7 +23137,7 @@ const ProfilePicChangeButton = ({
|
|
|
22746
23137
|
isSubmitting
|
|
22747
23138
|
},
|
|
22748
23139
|
dispatch
|
|
22749
|
-
} = useContext(store$
|
|
23140
|
+
} = useContext(store$2);
|
|
22750
23141
|
const {
|
|
22751
23142
|
t
|
|
22752
23143
|
} = useTranslation("userEdit");
|
|
@@ -24114,7 +24505,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24114
24505
|
zoom
|
|
24115
24506
|
},
|
|
24116
24507
|
dispatch
|
|
24117
|
-
} = useContext(store$
|
|
24508
|
+
} = useContext(store$2);
|
|
24118
24509
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24119
24510
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24120
24511
|
}, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
|
|
@@ -24156,7 +24547,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24156
24547
|
zoom
|
|
24157
24548
|
},
|
|
24158
24549
|
dispatch
|
|
24159
|
-
} = useContext(store$
|
|
24550
|
+
} = useContext(store$2);
|
|
24160
24551
|
const {
|
|
24161
24552
|
t
|
|
24162
24553
|
} = useTranslation("userEdit");
|
|
@@ -24208,7 +24599,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24208
24599
|
state: {
|
|
24209
24600
|
isSubmitting
|
|
24210
24601
|
}
|
|
24211
|
-
} = useContext(store$
|
|
24602
|
+
} = useContext(store$2);
|
|
24212
24603
|
const {
|
|
24213
24604
|
t
|
|
24214
24605
|
} = useTranslation("userEdit");
|
|
@@ -24250,7 +24641,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24250
24641
|
state: {
|
|
24251
24642
|
isSubmitting
|
|
24252
24643
|
}
|
|
24253
|
-
} = useContext(store$
|
|
24644
|
+
} = useContext(store$2);
|
|
24254
24645
|
const {
|
|
24255
24646
|
t
|
|
24256
24647
|
} = useTranslation("userEdit");
|
|
@@ -24273,7 +24664,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24273
24664
|
state: {
|
|
24274
24665
|
imageSrc
|
|
24275
24666
|
}
|
|
24276
|
-
} = useContext(store$
|
|
24667
|
+
} = useContext(store$2);
|
|
24277
24668
|
const {
|
|
24278
24669
|
t
|
|
24279
24670
|
} = useTranslation("userEdit");
|
|
@@ -24335,17 +24726,17 @@ function ProfilePicChangeModal({
|
|
|
24335
24726
|
}
|
|
24336
24727
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24337
24728
|
|
|
24338
|
-
const initialState = {
|
|
24729
|
+
const initialState$1 = {
|
|
24339
24730
|
isSubmitting: false,
|
|
24340
24731
|
alert: {
|
|
24341
24732
|
type: "error",
|
|
24342
24733
|
content: ""
|
|
24343
24734
|
}
|
|
24344
24735
|
};
|
|
24345
|
-
const store = /*#__PURE__*/createContext(initialState);
|
|
24736
|
+
const store$1 = /*#__PURE__*/createContext(initialState$1);
|
|
24346
24737
|
const {
|
|
24347
|
-
Provider
|
|
24348
|
-
} = store;
|
|
24738
|
+
Provider: Provider$1
|
|
24739
|
+
} = store$1;
|
|
24349
24740
|
|
|
24350
24741
|
const EmailVerifyContainer = ({
|
|
24351
24742
|
style,
|
|
@@ -24408,21 +24799,21 @@ const EmailVerifyContainer = ({
|
|
|
24408
24799
|
default:
|
|
24409
24800
|
return state;
|
|
24410
24801
|
}
|
|
24411
|
-
}, initialState);
|
|
24802
|
+
}, initialState$1);
|
|
24412
24803
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24413
24804
|
style: { ...style
|
|
24414
24805
|
},
|
|
24415
24806
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24416
|
-
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
24807
|
+
}, /*#__PURE__*/React__default.createElement(Provider$1, {
|
|
24417
24808
|
value: {
|
|
24418
24809
|
state,
|
|
24419
24810
|
dispatch
|
|
24420
24811
|
}
|
|
24421
24812
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24422
|
-
store,
|
|
24813
|
+
store: store$1,
|
|
24423
24814
|
key: i
|
|
24424
24815
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24425
|
-
store
|
|
24816
|
+
store: store$1
|
|
24426
24817
|
})));
|
|
24427
24818
|
};
|
|
24428
24819
|
|
|
@@ -24436,7 +24827,7 @@ const EmailVerifyResendButton = ({
|
|
|
24436
24827
|
state: {
|
|
24437
24828
|
isSubmitting
|
|
24438
24829
|
}
|
|
24439
|
-
} = useContext(store);
|
|
24830
|
+
} = useContext(store$1);
|
|
24440
24831
|
const {
|
|
24441
24832
|
t
|
|
24442
24833
|
} = useTranslation("verifyEmail");
|
|
@@ -24511,4 +24902,233 @@ const EmailVerifyModal = ({
|
|
|
24511
24902
|
};
|
|
24512
24903
|
EmailVerifyModal.viewId = "email-verify";
|
|
24513
24904
|
|
|
24514
|
-
|
|
24905
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default.createElement(PaymentMethodContainer, Object.assign({
|
|
24906
|
+
type: "invoicePayment",
|
|
24907
|
+
className: "pelcro-invoice-payment-container"
|
|
24908
|
+
}, props));
|
|
24909
|
+
|
|
24910
|
+
const InvoicePaymentView = props => {
|
|
24911
|
+
const {
|
|
24912
|
+
t
|
|
24913
|
+
} = useTranslation("payment");
|
|
24914
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24915
|
+
id: "pelcro-invoice-payment-view"
|
|
24916
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
24917
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24918
|
+
}, /*#__PURE__*/React__default.createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default.createElement("form", {
|
|
24919
|
+
action: "javascript:void(0);",
|
|
24920
|
+
className: "plc-mt-2 pelcro-form"
|
|
24921
|
+
}, /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
|
|
24922
|
+
type: "invoicePayment",
|
|
24923
|
+
showCoupon: false,
|
|
24924
|
+
showExternalPaymentMethods: true
|
|
24925
|
+
}, props))));
|
|
24926
|
+
};
|
|
24927
|
+
|
|
24928
|
+
const InvoicePaymentModal = ({
|
|
24929
|
+
onDisplay,
|
|
24930
|
+
onClose,
|
|
24931
|
+
...otherProps
|
|
24932
|
+
}) => {
|
|
24933
|
+
const {
|
|
24934
|
+
switchView
|
|
24935
|
+
} = usePelcro();
|
|
24936
|
+
|
|
24937
|
+
const onSuccess = () => {
|
|
24938
|
+
var _otherProps$onSuccess;
|
|
24939
|
+
|
|
24940
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
24941
|
+
return switchView("subscription-success");
|
|
24942
|
+
};
|
|
24943
|
+
|
|
24944
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
24945
|
+
id: "pelcro-invoice-payment-modal",
|
|
24946
|
+
onDisplay: onDisplay,
|
|
24947
|
+
onClose: onClose
|
|
24948
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
24949
|
+
onSuccess: onSuccess
|
|
24950
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
24951
|
+
};
|
|
24952
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
24953
|
+
|
|
24954
|
+
const invoicePaymentSubmitButton = props => {
|
|
24955
|
+
return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
|
|
24956
|
+
};
|
|
24957
|
+
|
|
24958
|
+
const initialState = {};
|
|
24959
|
+
const store = /*#__PURE__*/createContext(initialState);
|
|
24960
|
+
const {
|
|
24961
|
+
Provider
|
|
24962
|
+
} = store;
|
|
24963
|
+
|
|
24964
|
+
const InvoiceDetailsContainer = ({
|
|
24965
|
+
style,
|
|
24966
|
+
className = "",
|
|
24967
|
+
onSuccess = () => {},
|
|
24968
|
+
children,
|
|
24969
|
+
...props
|
|
24970
|
+
}) => {
|
|
24971
|
+
const onPayButtonClick = () => {
|
|
24972
|
+
return onSuccess();
|
|
24973
|
+
};
|
|
24974
|
+
|
|
24975
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
24976
|
+
switch (action.type) {
|
|
24977
|
+
case HANDLE_SUBMIT:
|
|
24978
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
24979
|
+
|
|
24980
|
+
default:
|
|
24981
|
+
return state;
|
|
24982
|
+
}
|
|
24983
|
+
}, initialState);
|
|
24984
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24985
|
+
style: { ...style
|
|
24986
|
+
},
|
|
24987
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
24988
|
+
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
24989
|
+
value: {
|
|
24990
|
+
state,
|
|
24991
|
+
dispatch
|
|
24992
|
+
}
|
|
24993
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24994
|
+
store,
|
|
24995
|
+
key: i
|
|
24996
|
+
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24997
|
+
store
|
|
24998
|
+
})));
|
|
24999
|
+
};
|
|
25000
|
+
|
|
25001
|
+
const InvoiceDetailsDownloadButton = ({
|
|
25002
|
+
name,
|
|
25003
|
+
url,
|
|
25004
|
+
className,
|
|
25005
|
+
...otherProps
|
|
25006
|
+
}) => {
|
|
25007
|
+
const {
|
|
25008
|
+
t
|
|
25009
|
+
} = useTranslation("invoiceDetails");
|
|
25010
|
+
const {
|
|
25011
|
+
invoice
|
|
25012
|
+
} = usePelcro();
|
|
25013
|
+
return /*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
25014
|
+
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}`,
|
|
25015
|
+
id: "pelcro-download-invoice-link",
|
|
25016
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25017
|
+
target: "_blank",
|
|
25018
|
+
rel: "noopener noreferrer"
|
|
25019
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25020
|
+
};
|
|
25021
|
+
|
|
25022
|
+
const InvoiceDetailsPayButton = ({
|
|
25023
|
+
name,
|
|
25024
|
+
onClick,
|
|
25025
|
+
...otherProps
|
|
25026
|
+
}) => {
|
|
25027
|
+
const {
|
|
25028
|
+
dispatch
|
|
25029
|
+
} = useContext(store);
|
|
25030
|
+
const {
|
|
25031
|
+
t
|
|
25032
|
+
} = useTranslation("invoiceDetails");
|
|
25033
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
25034
|
+
onClick: () => {
|
|
25035
|
+
dispatch({
|
|
25036
|
+
type: HANDLE_SUBMIT
|
|
25037
|
+
});
|
|
25038
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25039
|
+
}
|
|
25040
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25041
|
+
};
|
|
25042
|
+
|
|
25043
|
+
const InvoiceDetailsView = props => {
|
|
25044
|
+
const {
|
|
25045
|
+
t
|
|
25046
|
+
} = useTranslation("invoiceDetails");
|
|
25047
|
+
const {
|
|
25048
|
+
invoice
|
|
25049
|
+
} = usePelcro();
|
|
25050
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25051
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25052
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25053
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
25054
|
+
id: "pelcro-invoice-details-view"
|
|
25055
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25056
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25057
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25058
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25059
|
+
}, t("title"))), /*#__PURE__*/React__default.createElement("form", {
|
|
25060
|
+
action: "javascript:void(0);",
|
|
25061
|
+
className: "plc-mt-2 pelcro-form"
|
|
25062
|
+
}, /*#__PURE__*/React__default.createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default.createElement("div", {
|
|
25063
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25064
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25065
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25066
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
25067
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25068
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default.createElement("div", {
|
|
25069
|
+
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"
|
|
25070
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25071
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25072
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default.createElement("div", {
|
|
25073
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25074
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default.createElement("div", {
|
|
25075
|
+
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"
|
|
25076
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25077
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25078
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25079
|
+
className: "pelcro-invoice-total-text"
|
|
25080
|
+
}, t("labels.total")), /*#__PURE__*/React__default.createElement("p", {
|
|
25081
|
+
className: "pelcro-invoice-total-text"
|
|
25082
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default.createElement("p", {
|
|
25083
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25084
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default.createElement("div", {
|
|
25085
|
+
className: "plc-flex plc-flex-col"
|
|
25086
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25087
|
+
className: "pelcro-invoice-total"
|
|
25088
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
|
|
25089
|
+
className: "pelcro-invoice-total"
|
|
25090
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
|
|
25091
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25092
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default.createElement("div", {
|
|
25093
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25094
|
+
}, /*#__PURE__*/React__default.createElement(InvoiceDetailsDownloadButton, {
|
|
25095
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25096
|
+
className: "plc-w-full plc-text-center"
|
|
25097
|
+
}), showPayButton && /*#__PURE__*/React__default.createElement(InvoiceDetailsPayButton, {
|
|
25098
|
+
role: "submit",
|
|
25099
|
+
className: "plc-ml-4 plc-w-full",
|
|
25100
|
+
id: "pelcro-submit"
|
|
25101
|
+
})))));
|
|
25102
|
+
};
|
|
25103
|
+
|
|
25104
|
+
function canPayInvoice(invoice) {
|
|
25105
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25106
|
+
}
|
|
25107
|
+
|
|
25108
|
+
const InvoiceDetailsModal = ({
|
|
25109
|
+
onDisplay,
|
|
25110
|
+
onClose,
|
|
25111
|
+
...otherProps
|
|
25112
|
+
}) => {
|
|
25113
|
+
const {
|
|
25114
|
+
switchToPaymentView
|
|
25115
|
+
} = usePelcro();
|
|
25116
|
+
|
|
25117
|
+
const onSuccess = () => {
|
|
25118
|
+
var _otherProps$onSuccess;
|
|
25119
|
+
|
|
25120
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25121
|
+
switchToPaymentView();
|
|
25122
|
+
};
|
|
25123
|
+
|
|
25124
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
25125
|
+
onDisplay: onDisplay,
|
|
25126
|
+
onClose: onClose,
|
|
25127
|
+
id: "pelcro-invoice-details-modal"
|
|
25128
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25129
|
+
onSuccess: onSuccess
|
|
25130
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
25131
|
+
};
|
|
25132
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25133
|
+
|
|
25134
|
+
export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
|