@pelcro/react-pelcro-js 3.0.0-beta.2 → 3.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1106 -480
- package/dist/index.esm.js +1098 -481
- package/dist/pelcro.css +48 -0
- package/package.json +1 -1
package/dist/index.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,30 @@ 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 translations = i18next.t("messages", {
|
|
9092
|
+
returnObjects: true
|
|
9093
|
+
});
|
|
9094
|
+
notify.error(translations.invalidInvoice);
|
|
9095
|
+
}
|
|
9096
|
+
});
|
|
9097
|
+
};
|
|
9098
|
+
|
|
8978
9099
|
const defaultOptions = {
|
|
8979
9100
|
loadPaymentSDKs: true,
|
|
8980
9101
|
loadAuth0SDK: true,
|
|
@@ -9314,7 +9435,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
|
|
|
9314
9435
|
const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
|
|
9315
9436
|
const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
|
|
9316
9437
|
|
|
9317
|
-
const initialState$
|
|
9438
|
+
const initialState$h = {
|
|
9318
9439
|
email: "",
|
|
9319
9440
|
password: "",
|
|
9320
9441
|
emailError: null,
|
|
@@ -9325,10 +9446,10 @@ const initialState$g = {
|
|
|
9325
9446
|
content: ""
|
|
9326
9447
|
}
|
|
9327
9448
|
};
|
|
9328
|
-
const store$
|
|
9449
|
+
const store$h = /*#__PURE__*/createContext(initialState$h);
|
|
9329
9450
|
const {
|
|
9330
|
-
Provider: Provider$
|
|
9331
|
-
} = store$
|
|
9451
|
+
Provider: Provider$h
|
|
9452
|
+
} = store$h;
|
|
9332
9453
|
|
|
9333
9454
|
const LoginContainer = ({
|
|
9334
9455
|
style,
|
|
@@ -9435,7 +9556,7 @@ const LoginContainer = ({
|
|
|
9435
9556
|
});
|
|
9436
9557
|
|
|
9437
9558
|
case RESET_LOGIN_FORM:
|
|
9438
|
-
return initialState$
|
|
9559
|
+
return initialState$h;
|
|
9439
9560
|
|
|
9440
9561
|
case DISABLE_LOGIN_BUTTON:
|
|
9441
9562
|
return lib_7({ ...state,
|
|
@@ -9453,12 +9574,12 @@ const LoginContainer = ({
|
|
|
9453
9574
|
default:
|
|
9454
9575
|
return state;
|
|
9455
9576
|
}
|
|
9456
|
-
}, initialState$
|
|
9577
|
+
}, initialState$h);
|
|
9457
9578
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
9458
9579
|
style: { ...style
|
|
9459
9580
|
},
|
|
9460
9581
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
9461
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
9582
|
+
}, /*#__PURE__*/React__default.createElement(Provider$h, {
|
|
9462
9583
|
value: {
|
|
9463
9584
|
state,
|
|
9464
9585
|
dispatch
|
|
@@ -9466,12 +9587,12 @@ const LoginContainer = ({
|
|
|
9466
9587
|
}, children.length ? children.map((child, i) => {
|
|
9467
9588
|
if (child) {
|
|
9468
9589
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
9469
|
-
store: store$
|
|
9590
|
+
store: store$h,
|
|
9470
9591
|
key: i
|
|
9471
9592
|
});
|
|
9472
9593
|
}
|
|
9473
9594
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
9474
|
-
store: store$
|
|
9595
|
+
store: store$h
|
|
9475
9596
|
})));
|
|
9476
9597
|
};
|
|
9477
9598
|
|
|
@@ -9716,7 +9837,7 @@ const LoginButton = ({
|
|
|
9716
9837
|
buttonDisabled
|
|
9717
9838
|
},
|
|
9718
9839
|
dispatch
|
|
9719
|
-
} = useContext(store$
|
|
9840
|
+
} = useContext(store$h);
|
|
9720
9841
|
const {
|
|
9721
9842
|
t
|
|
9722
9843
|
} = useTranslation("login");
|
|
@@ -9737,23 +9858,23 @@ const LoginButton = ({
|
|
|
9737
9858
|
};
|
|
9738
9859
|
|
|
9739
9860
|
const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
9740
|
-
store: store$
|
|
9861
|
+
store: store$h
|
|
9741
9862
|
}, props));
|
|
9742
9863
|
|
|
9743
9864
|
const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
9744
|
-
store: store$
|
|
9865
|
+
store: store$h
|
|
9745
9866
|
}, props));
|
|
9746
9867
|
|
|
9747
|
-
var _path$
|
|
9868
|
+
var _path$r;
|
|
9748
9869
|
|
|
9749
|
-
function _extends$
|
|
9870
|
+
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
9871
|
|
|
9751
9872
|
function SvgCheck(props) {
|
|
9752
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
9873
|
+
return /*#__PURE__*/React.createElement("svg", _extends$t({
|
|
9753
9874
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9754
9875
|
fill: "currentColor",
|
|
9755
9876
|
viewBox: "0 0 20 20"
|
|
9756
|
-
}, props), _path$
|
|
9877
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
|
|
9757
9878
|
fillRule: "evenodd",
|
|
9758
9879
|
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
9880
|
clipRule: "evenodd"
|
|
@@ -9818,7 +9939,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
9818
9939
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
9819
9940
|
facebookLoginRenderProps.FacebookLogin;
|
|
9820
9941
|
|
|
9821
|
-
const initialState$
|
|
9942
|
+
const initialState$g = {
|
|
9822
9943
|
email: "",
|
|
9823
9944
|
password: "",
|
|
9824
9945
|
emailError: null,
|
|
@@ -9835,10 +9956,10 @@ const initialState$f = {
|
|
|
9835
9956
|
content: ""
|
|
9836
9957
|
}
|
|
9837
9958
|
};
|
|
9838
|
-
const store$
|
|
9959
|
+
const store$g = /*#__PURE__*/createContext(initialState$g);
|
|
9839
9960
|
const {
|
|
9840
|
-
Provider: Provider$
|
|
9841
|
-
} = store$
|
|
9961
|
+
Provider: Provider$g
|
|
9962
|
+
} = store$g;
|
|
9842
9963
|
|
|
9843
9964
|
const RegisterContainer = ({
|
|
9844
9965
|
style,
|
|
@@ -10021,7 +10142,7 @@ const RegisterContainer = ({
|
|
|
10021
10142
|
});
|
|
10022
10143
|
|
|
10023
10144
|
case RESET_LOGIN_FORM:
|
|
10024
|
-
return initialState$
|
|
10145
|
+
return initialState$g;
|
|
10025
10146
|
|
|
10026
10147
|
case DISABLE_REGISTRATION_BUTTON:
|
|
10027
10148
|
return lib_7({ ...state,
|
|
@@ -10039,12 +10160,12 @@ const RegisterContainer = ({
|
|
|
10039
10160
|
default:
|
|
10040
10161
|
return state;
|
|
10041
10162
|
}
|
|
10042
|
-
}, initialState$
|
|
10163
|
+
}, initialState$g);
|
|
10043
10164
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10044
10165
|
style: { ...style
|
|
10045
10166
|
},
|
|
10046
10167
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
10047
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
10168
|
+
}, /*#__PURE__*/React__default.createElement(Provider$g, {
|
|
10048
10169
|
value: {
|
|
10049
10170
|
state,
|
|
10050
10171
|
dispatch
|
|
@@ -10052,12 +10173,12 @@ const RegisterContainer = ({
|
|
|
10052
10173
|
}, children.length ? children.map((child, i) => {
|
|
10053
10174
|
if (child) {
|
|
10054
10175
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
10055
|
-
store: store$
|
|
10176
|
+
store: store$g,
|
|
10056
10177
|
key: i
|
|
10057
10178
|
});
|
|
10058
10179
|
}
|
|
10059
10180
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
10060
|
-
store: store$
|
|
10181
|
+
store: store$g
|
|
10061
10182
|
})));
|
|
10062
10183
|
};
|
|
10063
10184
|
/**
|
|
@@ -10072,15 +10193,15 @@ function hasSecurityTokenEnabled$1() {
|
|
|
10072
10193
|
return hasSecuritySdkLoaded;
|
|
10073
10194
|
}
|
|
10074
10195
|
|
|
10075
|
-
var _path$
|
|
10196
|
+
var _path$q;
|
|
10076
10197
|
|
|
10077
|
-
function _extends$
|
|
10198
|
+
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
10199
|
|
|
10079
10200
|
function SvgFacebookLogo(props) {
|
|
10080
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10201
|
+
return /*#__PURE__*/React.createElement("svg", _extends$s({
|
|
10081
10202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10082
10203
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
10083
|
-
}, props), _path$
|
|
10204
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
|
|
10084
10205
|
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
10206
|
fill: "#3c5a9a"
|
|
10086
10207
|
})));
|
|
@@ -10097,10 +10218,10 @@ const FacebookLoginButton = ({
|
|
|
10097
10218
|
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
10219
|
const {
|
|
10099
10220
|
dispatch: loginDispatch
|
|
10100
|
-
} = useContext(store$
|
|
10221
|
+
} = useContext(store$h);
|
|
10101
10222
|
const {
|
|
10102
10223
|
dispatch: registerDispatch
|
|
10103
|
-
} = useContext(store$
|
|
10224
|
+
} = useContext(store$g);
|
|
10104
10225
|
|
|
10105
10226
|
const onSuccess = facebookUser => {
|
|
10106
10227
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
@@ -10153,15 +10274,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
10153
10274
|
unwrapExports(googleLogin);
|
|
10154
10275
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
10155
10276
|
|
|
10156
|
-
var _path$
|
|
10277
|
+
var _path$p, _path2$3, _path3$1, _path4;
|
|
10157
10278
|
|
|
10158
|
-
function _extends$
|
|
10279
|
+
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
10280
|
|
|
10160
10281
|
function SvgGoogleLogo(props) {
|
|
10161
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10282
|
+
return /*#__PURE__*/React.createElement("svg", _extends$r({
|
|
10162
10283
|
viewBox: "0 0 24 24",
|
|
10163
10284
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10164
|
-
}, props), _path$
|
|
10285
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
|
|
10165
10286
|
fill: "#4285F4",
|
|
10166
10287
|
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
10288
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
|
|
@@ -10187,10 +10308,10 @@ const GoogleLoginButton = ({
|
|
|
10187
10308
|
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
10309
|
const {
|
|
10189
10310
|
dispatch: loginDispatch
|
|
10190
|
-
} = useContext(store$
|
|
10311
|
+
} = useContext(store$h);
|
|
10191
10312
|
const {
|
|
10192
10313
|
dispatch: registerDispatch
|
|
10193
|
-
} = useContext(store$
|
|
10314
|
+
} = useContext(store$g);
|
|
10194
10315
|
|
|
10195
10316
|
const onSuccess = response => {
|
|
10196
10317
|
var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
|
|
@@ -10238,15 +10359,15 @@ const GoogleLoginButton = ({
|
|
|
10238
10359
|
}) : null;
|
|
10239
10360
|
};
|
|
10240
10361
|
|
|
10241
|
-
var _path$
|
|
10362
|
+
var _path$o;
|
|
10242
10363
|
|
|
10243
|
-
function _extends$
|
|
10364
|
+
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
10365
|
|
|
10245
10366
|
function SvgAuth0Logo(props) {
|
|
10246
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10367
|
+
return /*#__PURE__*/React.createElement("svg", _extends$q({
|
|
10247
10368
|
viewBox: "0 0 256 285",
|
|
10248
10369
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10249
|
-
}, props), _path$
|
|
10370
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
|
|
10250
10371
|
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
10372
|
})));
|
|
10252
10373
|
}
|
|
@@ -10270,7 +10391,9 @@ const Auth0LoginButton = ({
|
|
|
10270
10391
|
}
|
|
10271
10392
|
|
|
10272
10393
|
return () => {
|
|
10273
|
-
|
|
10394
|
+
var _auth0Script$removeEv;
|
|
10395
|
+
|
|
10396
|
+
auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
|
|
10274
10397
|
};
|
|
10275
10398
|
}, [auth0Script, auth0Enabled, auth0Loaded]);
|
|
10276
10399
|
const auth0InstanceRef = React__default.useRef(null);
|
|
@@ -10284,10 +10407,10 @@ const Auth0LoginButton = ({
|
|
|
10284
10407
|
}, [auth0Enabled, auth0Loaded]);
|
|
10285
10408
|
const {
|
|
10286
10409
|
dispatch: loginDispatch
|
|
10287
|
-
} = useContext(store$
|
|
10410
|
+
} = useContext(store$h);
|
|
10288
10411
|
const {
|
|
10289
10412
|
dispatch: registerDispatch
|
|
10290
|
-
} = useContext(store$
|
|
10413
|
+
} = useContext(store$g);
|
|
10291
10414
|
|
|
10292
10415
|
function handleClick() {
|
|
10293
10416
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
@@ -10420,15 +10543,15 @@ function LoginView(props) {
|
|
|
10420
10543
|
}, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
|
|
10421
10544
|
}
|
|
10422
10545
|
|
|
10423
|
-
var _path$
|
|
10546
|
+
var _path$n, _path2$2, _path3;
|
|
10424
10547
|
|
|
10425
|
-
function _extends$
|
|
10548
|
+
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); }
|
|
10426
10549
|
|
|
10427
10550
|
function SvgPelcroAuthorship(props) {
|
|
10428
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
10551
|
+
return /*#__PURE__*/React.createElement("svg", _extends$p({
|
|
10429
10552
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10430
10553
|
viewBox: "0 -80.652 497.072 179.991"
|
|
10431
|
-
}, props), _path$
|
|
10554
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
|
|
10432
10555
|
fill: "none",
|
|
10433
10556
|
stroke: "#4a4a4a",
|
|
10434
10557
|
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"
|
|
@@ -10575,11 +10698,11 @@ function LoginModal({
|
|
|
10575
10698
|
LoginModal.viewId = "login";
|
|
10576
10699
|
|
|
10577
10700
|
const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
10578
|
-
store: store$
|
|
10701
|
+
store: store$g
|
|
10579
10702
|
}, props));
|
|
10580
10703
|
|
|
10581
10704
|
const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
10582
|
-
store: store$
|
|
10705
|
+
store: store$g
|
|
10583
10706
|
}, props));
|
|
10584
10707
|
|
|
10585
10708
|
const RegisterButton = ({
|
|
@@ -10599,7 +10722,7 @@ const RegisterButton = ({
|
|
|
10599
10722
|
buttonDisabled
|
|
10600
10723
|
},
|
|
10601
10724
|
dispatch
|
|
10602
|
-
} = useContext(store$
|
|
10725
|
+
} = useContext(store$g);
|
|
10603
10726
|
const {
|
|
10604
10727
|
t
|
|
10605
10728
|
} = useTranslation("register");
|
|
@@ -10737,7 +10860,7 @@ function FirstName({
|
|
|
10737
10860
|
}
|
|
10738
10861
|
|
|
10739
10862
|
const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
10740
|
-
store: store$
|
|
10863
|
+
store: store$g
|
|
10741
10864
|
}, props));
|
|
10742
10865
|
|
|
10743
10866
|
function LastName({
|
|
@@ -10768,7 +10891,7 @@ function LastName({
|
|
|
10768
10891
|
}
|
|
10769
10892
|
|
|
10770
10893
|
const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
10771
|
-
store: store$
|
|
10894
|
+
store: store$g
|
|
10772
10895
|
}, props));
|
|
10773
10896
|
|
|
10774
10897
|
/**
|
|
@@ -10892,7 +11015,7 @@ function TextInput({
|
|
|
10892
11015
|
|
|
10893
11016
|
const RegisterTextInput = props => {
|
|
10894
11017
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
10895
|
-
store: store$
|
|
11018
|
+
store: store$g
|
|
10896
11019
|
}));
|
|
10897
11020
|
};
|
|
10898
11021
|
|
|
@@ -12561,7 +12684,8 @@ const SUBSCRIPTION_TYPES = {
|
|
|
12561
12684
|
CREATE_SUBSCRIPTION: "CREATE_SUBSCRIPTION",
|
|
12562
12685
|
CREATE_GIFTED_SUBSCRIPTION: "CREATE_GIFTED_SUBSCRIPTION",
|
|
12563
12686
|
RENEW_SUBSCRIPTION: "RENEW_SUBSCRIPTION",
|
|
12564
|
-
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION"
|
|
12687
|
+
RENEW_GIFTED_SUBSCRIPTION: "RENEW_GIFTED_SUBSCRIPTION",
|
|
12688
|
+
PAY_INVOICE: "PAY_INVOICE"
|
|
12565
12689
|
};
|
|
12566
12690
|
|
|
12567
12691
|
var _isPaymentGatewayInvalid = /*#__PURE__*/new WeakMap();
|
|
@@ -12623,6 +12747,7 @@ class Subscription {
|
|
|
12623
12747
|
* @property {number} [subscriptionIdToRenew]
|
|
12624
12748
|
* @property {number} [quantity]
|
|
12625
12749
|
* @property {string} addressId
|
|
12750
|
+
* @property {number} invoiceId
|
|
12626
12751
|
*/
|
|
12627
12752
|
|
|
12628
12753
|
/**
|
|
@@ -12663,6 +12788,8 @@ var _renewSubscription = /*#__PURE__*/new WeakMap();
|
|
|
12663
12788
|
|
|
12664
12789
|
var _renewGiftedSubscription = /*#__PURE__*/new WeakMap();
|
|
12665
12790
|
|
|
12791
|
+
var _payInvoice = /*#__PURE__*/new WeakMap();
|
|
12792
|
+
|
|
12666
12793
|
class StripeGateway {
|
|
12667
12794
|
constructor() {
|
|
12668
12795
|
_paymentGateway.set(this, {
|
|
@@ -12686,6 +12813,9 @@ class StripeGateway {
|
|
|
12686
12813
|
case types.RENEW_GIFTED_SUBSCRIPTION:
|
|
12687
12814
|
return _classPrivateFieldGet(this, _renewGiftedSubscription).call(this, options, callback);
|
|
12688
12815
|
|
|
12816
|
+
case types.PAY_INVOICE:
|
|
12817
|
+
return _classPrivateFieldGet(this, _payInvoice).call(this, options, callback);
|
|
12818
|
+
|
|
12689
12819
|
default:
|
|
12690
12820
|
console.error("Unsupported subscriptiion method: Stripe Gateway");
|
|
12691
12821
|
}
|
|
@@ -12794,6 +12924,23 @@ class StripeGateway {
|
|
|
12794
12924
|
});
|
|
12795
12925
|
}
|
|
12796
12926
|
});
|
|
12927
|
+
|
|
12928
|
+
_payInvoice.set(this, {
|
|
12929
|
+
writable: true,
|
|
12930
|
+
value: (options, callback) => {
|
|
12931
|
+
const {
|
|
12932
|
+
token,
|
|
12933
|
+
invoiceId
|
|
12934
|
+
} = options;
|
|
12935
|
+
window.Pelcro.invoice.pay({
|
|
12936
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway),
|
|
12937
|
+
gateway_token: token,
|
|
12938
|
+
invoice_id: invoiceId
|
|
12939
|
+
}, (err, res) => {
|
|
12940
|
+
callback(err, res);
|
|
12941
|
+
});
|
|
12942
|
+
}
|
|
12943
|
+
});
|
|
12797
12944
|
}
|
|
12798
12945
|
|
|
12799
12946
|
}
|
|
@@ -12807,6 +12954,8 @@ var _createSubscription2 = /*#__PURE__*/new WeakMap();
|
|
|
12807
12954
|
|
|
12808
12955
|
var _createGiftedSubscription2 = /*#__PURE__*/new WeakMap();
|
|
12809
12956
|
|
|
12957
|
+
var _payInvoice2 = /*#__PURE__*/new WeakMap();
|
|
12958
|
+
|
|
12810
12959
|
class PaypalGateWay {
|
|
12811
12960
|
constructor() {
|
|
12812
12961
|
_paymentGateway2.set(this, {
|
|
@@ -12824,6 +12973,9 @@ class PaypalGateWay {
|
|
|
12824
12973
|
case types.CREATE_GIFTED_SUBSCRIPTION:
|
|
12825
12974
|
return _classPrivateFieldGet(this, _createGiftedSubscription2).call(this, options, callback);
|
|
12826
12975
|
|
|
12976
|
+
case types.PAY_INVOICE:
|
|
12977
|
+
return _classPrivateFieldGet(this, _payInvoice2).call(this, options, callback);
|
|
12978
|
+
|
|
12827
12979
|
default:
|
|
12828
12980
|
console.error("Unsupported subscriptiion method: PayPal Gateway");
|
|
12829
12981
|
}
|
|
@@ -12884,6 +13036,23 @@ class PaypalGateWay {
|
|
|
12884
13036
|
});
|
|
12885
13037
|
}
|
|
12886
13038
|
});
|
|
13039
|
+
|
|
13040
|
+
_payInvoice2.set(this, {
|
|
13041
|
+
writable: true,
|
|
13042
|
+
value: (options, callback) => {
|
|
13043
|
+
const {
|
|
13044
|
+
token,
|
|
13045
|
+
invoiceId
|
|
13046
|
+
} = options;
|
|
13047
|
+
window.Pelcro.invoice.pay({
|
|
13048
|
+
payment_gateway: _classPrivateFieldGet(this, _paymentGateway2),
|
|
13049
|
+
gateway_token: token,
|
|
13050
|
+
invoice_id: invoiceId
|
|
13051
|
+
}, (err, res) => {
|
|
13052
|
+
callback(err, res);
|
|
13053
|
+
});
|
|
13054
|
+
}
|
|
13055
|
+
});
|
|
12887
13056
|
}
|
|
12888
13057
|
|
|
12889
13058
|
}
|
|
@@ -12908,7 +13077,7 @@ class PaypalGateWay {
|
|
|
12908
13077
|
|
|
12909
13078
|
/** @type {PaymentStateType} */
|
|
12910
13079
|
|
|
12911
|
-
const initialState$
|
|
13080
|
+
const initialState$f = {
|
|
12912
13081
|
disableSubmit: false,
|
|
12913
13082
|
isLoading: false,
|
|
12914
13083
|
disableCouponButton: false,
|
|
@@ -12927,10 +13096,10 @@ const initialState$e = {
|
|
|
12927
13096
|
content: ""
|
|
12928
13097
|
}
|
|
12929
13098
|
};
|
|
12930
|
-
const store$
|
|
13099
|
+
const store$f = /*#__PURE__*/createContext(initialState$f);
|
|
12931
13100
|
const {
|
|
12932
|
-
Provider: Provider$
|
|
12933
|
-
} = store$
|
|
13101
|
+
Provider: Provider$f
|
|
13102
|
+
} = store$f;
|
|
12934
13103
|
|
|
12935
13104
|
const PaymentMethodContainerWithoutStripe = ({
|
|
12936
13105
|
style,
|
|
@@ -12943,7 +13112,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12943
13112
|
onFailure = () => {},
|
|
12944
13113
|
...props
|
|
12945
13114
|
}) => {
|
|
12946
|
-
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift;
|
|
13115
|
+
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isRenewingGift, _props$invoice;
|
|
12947
13116
|
|
|
12948
13117
|
const {
|
|
12949
13118
|
t
|
|
@@ -12960,6 +13129,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
12960
13129
|
const selectedAddressId = (_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : pelcroStore.selectedAddressId;
|
|
12961
13130
|
const giftRecipient = (_props$giftRecipient = props.giftRecipient) !== null && _props$giftRecipient !== void 0 ? _props$giftRecipient : pelcroStore.giftRecipient;
|
|
12962
13131
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
13132
|
+
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
12963
13133
|
useEffect(() => {
|
|
12964
13134
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
12965
13135
|
dispatch({
|
|
@@ -13528,6 +13698,40 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13528
13698
|
});
|
|
13529
13699
|
};
|
|
13530
13700
|
|
|
13701
|
+
const payInvoice = (gatewayService, gatewayToken, dispatch) => {
|
|
13702
|
+
const subscription = new Subscription(gatewayService);
|
|
13703
|
+
return subscription.execute({
|
|
13704
|
+
type: SUBSCRIPTION_TYPES.PAY_INVOICE,
|
|
13705
|
+
token: gatewayToken,
|
|
13706
|
+
invoiceId: invoice.id
|
|
13707
|
+
}, (err, res) => {
|
|
13708
|
+
dispatch({
|
|
13709
|
+
type: DISABLE_SUBMIT,
|
|
13710
|
+
payload: false
|
|
13711
|
+
});
|
|
13712
|
+
dispatch({
|
|
13713
|
+
type: LOADING,
|
|
13714
|
+
payload: false
|
|
13715
|
+
});
|
|
13716
|
+
|
|
13717
|
+
if (err) {
|
|
13718
|
+
onFailure(err);
|
|
13719
|
+
return dispatch({
|
|
13720
|
+
type: SHOW_ALERT,
|
|
13721
|
+
payload: {
|
|
13722
|
+
type: "error",
|
|
13723
|
+
content: getErrorMessages(err)
|
|
13724
|
+
}
|
|
13725
|
+
});
|
|
13726
|
+
}
|
|
13727
|
+
|
|
13728
|
+
set({
|
|
13729
|
+
invoice: null
|
|
13730
|
+
});
|
|
13731
|
+
onSuccess(res);
|
|
13732
|
+
});
|
|
13733
|
+
};
|
|
13734
|
+
|
|
13531
13735
|
const updatePaymentSource = (state, dispatch) => {
|
|
13532
13736
|
return stripe.createSource({
|
|
13533
13737
|
type: "card"
|
|
@@ -13602,13 +13806,17 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13602
13806
|
source,
|
|
13603
13807
|
error
|
|
13604
13808
|
}) => {
|
|
13605
|
-
var _ref, _state$updatedPrice, _source$card3;
|
|
13809
|
+
var _ref, _ref2, _state$updatedPrice, _source$card3;
|
|
13606
13810
|
|
|
13607
13811
|
if (error) {
|
|
13608
13812
|
return handlePaymentError(error);
|
|
13609
13813
|
}
|
|
13610
13814
|
|
|
13611
13815
|
const getOrderItemsTotal = () => {
|
|
13816
|
+
if (!order) {
|
|
13817
|
+
return null;
|
|
13818
|
+
}
|
|
13819
|
+
|
|
13612
13820
|
const isQuickPurchase = !Array.isArray(order);
|
|
13613
13821
|
|
|
13614
13822
|
if (isQuickPurchase) {
|
|
@@ -13624,7 +13832,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13624
13832
|
}, 0);
|
|
13625
13833
|
};
|
|
13626
13834
|
|
|
13627
|
-
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();
|
|
13835
|
+
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();
|
|
13628
13836
|
|
|
13629
13837
|
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) {
|
|
13630
13838
|
return resolveTaxCalculation().then(res => {
|
|
@@ -13657,6 +13865,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13657
13865
|
const resolveTaxCalculation = () => {
|
|
13658
13866
|
var _window$Pelcro$site$r2;
|
|
13659
13867
|
|
|
13868
|
+
if (type === "invoicePayment") {
|
|
13869
|
+
return new Promise(resolve => resolve());
|
|
13870
|
+
}
|
|
13871
|
+
|
|
13660
13872
|
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;
|
|
13661
13873
|
return new Promise((resolve, reject) => {
|
|
13662
13874
|
// resolve early if taxes isn't enabled
|
|
@@ -13730,6 +13942,8 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13730
13942
|
subscribe(stripeSource, state, dispatch);
|
|
13731
13943
|
} else if (stripeSource && type === "orderCreate") {
|
|
13732
13944
|
purchase(stripeSource, state, dispatch);
|
|
13945
|
+
} else if (stripeSource && type === "invoicePayment") {
|
|
13946
|
+
payInvoice(new StripeGateway(), stripeSource.id, dispatch);
|
|
13733
13947
|
}
|
|
13734
13948
|
};
|
|
13735
13949
|
|
|
@@ -13863,7 +14077,13 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13863
14077
|
});
|
|
13864
14078
|
|
|
13865
14079
|
case HANDLE_PAYPAL_SUBSCRIPTION:
|
|
13866
|
-
return lib_5(state, () =>
|
|
14080
|
+
return lib_5(state, (state, dispatch) => {
|
|
14081
|
+
if (type === "invoicePayment") {
|
|
14082
|
+
payInvoice(new PaypalGateWay(), action.payload, dispatch);
|
|
14083
|
+
} else {
|
|
14084
|
+
handlePaypalSubscription(state, action.payload);
|
|
14085
|
+
}
|
|
14086
|
+
});
|
|
13867
14087
|
|
|
13868
14088
|
case SET_UPDATED_PRICE:
|
|
13869
14089
|
return lib_7({ ...state,
|
|
@@ -13921,21 +14141,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
13921
14141
|
default:
|
|
13922
14142
|
return state;
|
|
13923
14143
|
}
|
|
13924
|
-
}, initialState$
|
|
14144
|
+
}, initialState$f);
|
|
13925
14145
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
13926
14146
|
style: { ...style
|
|
13927
14147
|
},
|
|
13928
14148
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
13929
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
14149
|
+
}, /*#__PURE__*/React__default.createElement(Provider$f, {
|
|
13930
14150
|
value: {
|
|
13931
14151
|
state,
|
|
13932
14152
|
dispatch
|
|
13933
14153
|
}
|
|
13934
14154
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
13935
|
-
store: store$
|
|
14155
|
+
store: store$f,
|
|
13936
14156
|
key: i
|
|
13937
14157
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
13938
|
-
store: store$
|
|
14158
|
+
store: store$f
|
|
13939
14159
|
})));
|
|
13940
14160
|
};
|
|
13941
14161
|
|
|
@@ -13957,7 +14177,7 @@ const PaymentMethodContainer = props => {
|
|
|
13957
14177
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
13958
14178
|
locale: getPageOrDefaultLanguage()
|
|
13959
14179
|
}, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
|
|
13960
|
-
store: store$
|
|
14180
|
+
store: store$f
|
|
13961
14181
|
}, props))));
|
|
13962
14182
|
}
|
|
13963
14183
|
|
|
@@ -14010,7 +14230,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
14010
14230
|
currentPlan,
|
|
14011
14231
|
updatedPrice
|
|
14012
14232
|
}
|
|
14013
|
-
} = useContext(store$
|
|
14233
|
+
} = useContext(store$f);
|
|
14014
14234
|
|
|
14015
14235
|
const updatePaymentRequest = () => {
|
|
14016
14236
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
@@ -14070,7 +14290,7 @@ const DiscountedPrice = props => {
|
|
|
14070
14290
|
taxAmount,
|
|
14071
14291
|
percentOff
|
|
14072
14292
|
}
|
|
14073
|
-
} = useContext(store$
|
|
14293
|
+
} = useContext(store$f);
|
|
14074
14294
|
const {
|
|
14075
14295
|
order,
|
|
14076
14296
|
plan
|
|
@@ -14120,7 +14340,7 @@ const SubmitPaymentMethod = ({
|
|
|
14120
14340
|
isLoading,
|
|
14121
14341
|
updatedPrice
|
|
14122
14342
|
}
|
|
14123
|
-
} = useContext(store$
|
|
14343
|
+
} = useContext(store$f);
|
|
14124
14344
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
14125
14345
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
14126
14346
|
const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -14141,17 +14361,17 @@ const SubmitPaymentMethod = ({
|
|
|
14141
14361
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
14142
14362
|
};
|
|
14143
14363
|
|
|
14144
|
-
var _path$
|
|
14364
|
+
var _path$m;
|
|
14145
14365
|
|
|
14146
|
-
function _extends$
|
|
14366
|
+
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); }
|
|
14147
14367
|
|
|
14148
14368
|
function SvgArrowLeft(props) {
|
|
14149
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14369
|
+
return /*#__PURE__*/React.createElement("svg", _extends$o({
|
|
14150
14370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14151
14371
|
fill: "none",
|
|
14152
14372
|
viewBox: "0 0 24 24",
|
|
14153
14373
|
stroke: "currentColor"
|
|
14154
|
-
}, props), _path$
|
|
14374
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
|
|
14155
14375
|
strokeLinecap: "round",
|
|
14156
14376
|
strokeLinejoin: "round",
|
|
14157
14377
|
strokeWidth: 2,
|
|
@@ -14170,7 +14390,7 @@ const ApplyCouponButton = ({
|
|
|
14170
14390
|
disableCouponButton
|
|
14171
14391
|
},
|
|
14172
14392
|
dispatch
|
|
14173
|
-
} = useContext(store$
|
|
14393
|
+
} = useContext(store$f);
|
|
14174
14394
|
const {
|
|
14175
14395
|
t
|
|
14176
14396
|
} = useTranslation("checkoutForm");
|
|
@@ -14204,7 +14424,7 @@ const CouponCodeField = props => {
|
|
|
14204
14424
|
couponCode,
|
|
14205
14425
|
couponError
|
|
14206
14426
|
}
|
|
14207
|
-
} = useContext(store$
|
|
14427
|
+
} = useContext(store$f);
|
|
14208
14428
|
|
|
14209
14429
|
const onCouponCodeChange = e => {
|
|
14210
14430
|
dispatch({
|
|
@@ -14233,17 +14453,17 @@ const CouponCodeField = props => {
|
|
|
14233
14453
|
}, props));
|
|
14234
14454
|
};
|
|
14235
14455
|
|
|
14236
|
-
var _path$
|
|
14456
|
+
var _path$l;
|
|
14237
14457
|
|
|
14238
|
-
function _extends$
|
|
14458
|
+
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); }
|
|
14239
14459
|
|
|
14240
14460
|
function SvgTicket(props) {
|
|
14241
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14461
|
+
return /*#__PURE__*/React.createElement("svg", _extends$n({
|
|
14242
14462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14243
14463
|
fill: "none",
|
|
14244
14464
|
viewBox: "0 0 24 24",
|
|
14245
14465
|
stroke: "currentColor"
|
|
14246
|
-
}, props), _path$
|
|
14466
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
|
|
14247
14467
|
strokeLinecap: "round",
|
|
14248
14468
|
strokeLinejoin: "round",
|
|
14249
14469
|
strokeWidth: 2,
|
|
@@ -14260,7 +14480,7 @@ const CouponCode = ({
|
|
|
14260
14480
|
state: {
|
|
14261
14481
|
enableCouponField
|
|
14262
14482
|
}
|
|
14263
|
-
} = useContext(store$
|
|
14483
|
+
} = useContext(store$f);
|
|
14264
14484
|
const {
|
|
14265
14485
|
t
|
|
14266
14486
|
} = useTranslation("checkoutForm");
|
|
@@ -14517,17 +14737,18 @@ const PaypalSubscribeButton = props => {
|
|
|
14517
14737
|
const {
|
|
14518
14738
|
dispatch,
|
|
14519
14739
|
state
|
|
14520
|
-
} = useContext(store$
|
|
14740
|
+
} = useContext(store$f);
|
|
14521
14741
|
const {
|
|
14522
14742
|
product,
|
|
14523
14743
|
plan,
|
|
14744
|
+
invoice,
|
|
14524
14745
|
selectedAddressId
|
|
14525
14746
|
} = usePelcro();
|
|
14526
14747
|
useEffect(() => {
|
|
14527
|
-
var _ref, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14748
|
+
var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
|
|
14528
14749
|
|
|
14529
14750
|
// sometimes, price is updated. eg. Coupon codes.
|
|
14530
|
-
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 :
|
|
14751
|
+
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;
|
|
14531
14752
|
const selectedAddress = getAddressById((_props$selectedAddres = props.selectedAddressId) !== null && _props$selectedAddres !== void 0 ? _props$selectedAddres : selectedAddressId); // initialize paypal client, then render paypal button.
|
|
14532
14753
|
|
|
14533
14754
|
const initializePaypal = async () => {
|
|
@@ -14536,7 +14757,7 @@ const PaypalSubscribeButton = props => {
|
|
|
14536
14757
|
const paypalCheckoutInstance = new PaypalClient({
|
|
14537
14758
|
buttonElementID: (_props$buttonElementI = props.buttonElementID) !== null && _props$buttonElementI !== void 0 ? _props$buttonElementI : "pelcro-paypal-button",
|
|
14538
14759
|
style: props.buttonStyle,
|
|
14539
|
-
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,
|
|
14760
|
+
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,
|
|
14540
14761
|
shippingAddressEditable: props.makeAddressEditable,
|
|
14541
14762
|
displayName: props.merchantDisplayName,
|
|
14542
14763
|
locale: props.locale,
|
|
@@ -14546,9 +14767,9 @@ const PaypalSubscribeButton = props => {
|
|
|
14546
14767
|
await paypalCheckoutInstance.build(); // Create paypal payment
|
|
14547
14768
|
|
|
14548
14769
|
paypalCheckoutInstance.createPayment({
|
|
14549
|
-
product: (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14770
|
+
product: invoice ? invoice.plan : (_props$plan2 = props.plan) !== null && _props$plan2 !== void 0 ? _props$plan2 : plan,
|
|
14550
14771
|
amount: updatedPrice,
|
|
14551
|
-
address: selectedAddress,
|
|
14772
|
+
address: invoice ? null : selectedAddress,
|
|
14552
14773
|
onButtonClick: () => {
|
|
14553
14774
|
dispatch({
|
|
14554
14775
|
type: DISABLE_SUBMIT,
|
|
@@ -14602,16 +14823,16 @@ const BankRedirection = () => {
|
|
|
14602
14823
|
}));
|
|
14603
14824
|
};
|
|
14604
14825
|
|
|
14605
|
-
var _path$
|
|
14826
|
+
var _path$k;
|
|
14606
14827
|
|
|
14607
|
-
function _extends$
|
|
14828
|
+
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); }
|
|
14608
14829
|
|
|
14609
14830
|
function SvgLock(props) {
|
|
14610
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
14831
|
+
return /*#__PURE__*/React.createElement("svg", _extends$m({
|
|
14611
14832
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14612
14833
|
viewBox: "0 0 20 20",
|
|
14613
14834
|
fill: "currentColor"
|
|
14614
|
-
}, props), _path$
|
|
14835
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
|
|
14615
14836
|
fillRule: "evenodd",
|
|
14616
14837
|
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",
|
|
14617
14838
|
clipRule: "evenodd"
|
|
@@ -14628,7 +14849,7 @@ const SelectedPaymentMethod = () => {
|
|
|
14628
14849
|
state: {
|
|
14629
14850
|
isLoading
|
|
14630
14851
|
}
|
|
14631
|
-
} = useContext(store$
|
|
14852
|
+
} = useContext(store$f);
|
|
14632
14853
|
const {
|
|
14633
14854
|
switchView,
|
|
14634
14855
|
selectedPaymentMethodId
|
|
@@ -14670,7 +14891,7 @@ const TaxAmount = () => {
|
|
|
14670
14891
|
state: {
|
|
14671
14892
|
taxAmount
|
|
14672
14893
|
}
|
|
14673
|
-
} = useContext(store$
|
|
14894
|
+
} = useContext(store$f);
|
|
14674
14895
|
const {
|
|
14675
14896
|
plan
|
|
14676
14897
|
} = usePelcro();
|
|
@@ -14833,12 +15054,12 @@ function SubscriptionRenewModal({
|
|
|
14833
15054
|
}
|
|
14834
15055
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
14835
15056
|
|
|
14836
|
-
var _path$
|
|
15057
|
+
var _path$j;
|
|
14837
15058
|
|
|
14838
|
-
function _extends$
|
|
15059
|
+
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); }
|
|
14839
15060
|
|
|
14840
15061
|
function SvgGift(props) {
|
|
14841
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
15062
|
+
return /*#__PURE__*/React.createElement("svg", _extends$l({
|
|
14842
15063
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
14843
15064
|
fill: "none",
|
|
14844
15065
|
stroke: "currentColor",
|
|
@@ -14847,7 +15068,7 @@ function SvgGift(props) {
|
|
|
14847
15068
|
strokeWidth: 2,
|
|
14848
15069
|
viewBox: "0 0 24 24",
|
|
14849
15070
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14850
|
-
}, props), _path$
|
|
15071
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
|
|
14851
15072
|
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"
|
|
14852
15073
|
})));
|
|
14853
15074
|
}
|
|
@@ -14885,10 +15106,13 @@ const getCurrentFlow = () => {
|
|
|
14885
15106
|
const {
|
|
14886
15107
|
product,
|
|
14887
15108
|
giftRecipient,
|
|
14888
|
-
giftCode
|
|
15109
|
+
giftCode,
|
|
15110
|
+
invoice
|
|
14889
15111
|
} = usePelcro.getStore();
|
|
14890
15112
|
|
|
14891
|
-
if (
|
|
15113
|
+
if (invoice) {
|
|
15114
|
+
return "invoicePayment";
|
|
15115
|
+
} else if (giftRecipient) {
|
|
14892
15116
|
return "giftCreate";
|
|
14893
15117
|
} else if (giftCode) {
|
|
14894
15118
|
return "giftRedeem";
|
|
@@ -14925,6 +15149,13 @@ const getSuccessContent = i18n => {
|
|
|
14925
15149
|
}),
|
|
14926
15150
|
successTitle: i18n("messages.giftRedeem.title"),
|
|
14927
15151
|
successContent: i18n("messages.giftRedeem.content")
|
|
15152
|
+
},
|
|
15153
|
+
invoicePayment: {
|
|
15154
|
+
successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
|
|
15155
|
+
className: "plc-w-32 plc-my-4 plc-text-green-500"
|
|
15156
|
+
}),
|
|
15157
|
+
successTitle: i18n("messages.invoicePayment.title"),
|
|
15158
|
+
successContent: i18n("messages.invoicePayment.title")
|
|
14928
15159
|
}
|
|
14929
15160
|
};
|
|
14930
15161
|
return wordingDictionary[flow];
|
|
@@ -15178,7 +15409,7 @@ class DefaultNewsLetter extends Component {
|
|
|
15178
15409
|
|
|
15179
15410
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
15180
15411
|
|
|
15181
|
-
const initialState$
|
|
15412
|
+
const initialState$e = {
|
|
15182
15413
|
didSubToNewslettersBefore: false,
|
|
15183
15414
|
newsletters: [],
|
|
15184
15415
|
isListLoading: true,
|
|
@@ -15188,10 +15419,10 @@ const initialState$d = {
|
|
|
15188
15419
|
content: ""
|
|
15189
15420
|
}
|
|
15190
15421
|
};
|
|
15191
|
-
const store$
|
|
15422
|
+
const store$e = /*#__PURE__*/createContext(initialState$e);
|
|
15192
15423
|
const {
|
|
15193
|
-
Provider: Provider$
|
|
15194
|
-
} = store$
|
|
15424
|
+
Provider: Provider$e
|
|
15425
|
+
} = store$e;
|
|
15195
15426
|
|
|
15196
15427
|
const NewsletterUpdateContainer = ({
|
|
15197
15428
|
style,
|
|
@@ -15304,7 +15535,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15304
15535
|
default:
|
|
15305
15536
|
return state;
|
|
15306
15537
|
}
|
|
15307
|
-
}, initialState$
|
|
15538
|
+
}, initialState$e);
|
|
15308
15539
|
useEffect(() => {
|
|
15309
15540
|
const getUserNewsletters = () => {
|
|
15310
15541
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -15348,7 +15579,7 @@ const NewsletterUpdateContainer = ({
|
|
|
15348
15579
|
style: { ...style
|
|
15349
15580
|
},
|
|
15350
15581
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
15351
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15582
|
+
}, /*#__PURE__*/React__default.createElement(Provider$e, {
|
|
15352
15583
|
value: {
|
|
15353
15584
|
state,
|
|
15354
15585
|
dispatch
|
|
@@ -15356,12 +15587,12 @@ const NewsletterUpdateContainer = ({
|
|
|
15356
15587
|
}, children.length ? children.map((child, i) => {
|
|
15357
15588
|
if (child) {
|
|
15358
15589
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
15359
|
-
store: store$
|
|
15590
|
+
store: store$e,
|
|
15360
15591
|
key: i
|
|
15361
15592
|
});
|
|
15362
15593
|
}
|
|
15363
15594
|
}) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15364
|
-
store: store$
|
|
15595
|
+
store: store$e
|
|
15365
15596
|
})));
|
|
15366
15597
|
};
|
|
15367
15598
|
|
|
@@ -15376,7 +15607,7 @@ const NewsletterUpdateButton = ({
|
|
|
15376
15607
|
isSubmitting,
|
|
15377
15608
|
isListLoading
|
|
15378
15609
|
}
|
|
15379
|
-
} = useContext(store$
|
|
15610
|
+
} = useContext(store$e);
|
|
15380
15611
|
const {
|
|
15381
15612
|
t
|
|
15382
15613
|
} = useTranslation("newsletter");
|
|
@@ -15406,7 +15637,7 @@ const NewsletterUpdateList = () => {
|
|
|
15406
15637
|
newsletters,
|
|
15407
15638
|
isListLoading
|
|
15408
15639
|
}
|
|
15409
|
-
} = useContext(store$
|
|
15640
|
+
} = useContext(store$e);
|
|
15410
15641
|
|
|
15411
15642
|
if (isListLoading) {
|
|
15412
15643
|
return /*#__PURE__*/React__default.createElement(Loader, {
|
|
@@ -15610,7 +15841,7 @@ function SubscriptionCreateModal({
|
|
|
15610
15841
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
15611
15842
|
|
|
15612
15843
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
|
|
15613
|
-
const initialState$
|
|
15844
|
+
const initialState$d = {
|
|
15614
15845
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
15615
15846
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
15616
15847
|
lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
|
|
@@ -15623,10 +15854,10 @@ const initialState$c = {
|
|
|
15623
15854
|
content: ""
|
|
15624
15855
|
}
|
|
15625
15856
|
};
|
|
15626
|
-
const store$
|
|
15857
|
+
const store$d = /*#__PURE__*/createContext(initialState$d);
|
|
15627
15858
|
const {
|
|
15628
|
-
Provider: Provider$
|
|
15629
|
-
} = store$
|
|
15859
|
+
Provider: Provider$d
|
|
15860
|
+
} = store$d;
|
|
15630
15861
|
|
|
15631
15862
|
const UserUpdateContainer = ({
|
|
15632
15863
|
style,
|
|
@@ -15758,27 +15989,27 @@ const UserUpdateContainer = ({
|
|
|
15758
15989
|
default:
|
|
15759
15990
|
return state;
|
|
15760
15991
|
}
|
|
15761
|
-
}, initialState$
|
|
15992
|
+
}, initialState$d);
|
|
15762
15993
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15763
15994
|
style: { ...style
|
|
15764
15995
|
},
|
|
15765
15996
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
15766
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
15997
|
+
}, /*#__PURE__*/React__default.createElement(Provider$d, {
|
|
15767
15998
|
value: {
|
|
15768
15999
|
state,
|
|
15769
16000
|
dispatch
|
|
15770
16001
|
}
|
|
15771
16002
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
15772
|
-
store: store$
|
|
16003
|
+
store: store$d,
|
|
15773
16004
|
key: i
|
|
15774
16005
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
15775
|
-
store: store$
|
|
16006
|
+
store: store$d
|
|
15776
16007
|
})));
|
|
15777
16008
|
};
|
|
15778
16009
|
|
|
15779
16010
|
const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
15780
16011
|
disabled: true,
|
|
15781
|
-
store: store$
|
|
16012
|
+
store: store$d
|
|
15782
16013
|
}, props));
|
|
15783
16014
|
|
|
15784
16015
|
const UserUpdateButton = ({
|
|
@@ -15791,7 +16022,7 @@ const UserUpdateButton = ({
|
|
|
15791
16022
|
buttonDisabled
|
|
15792
16023
|
},
|
|
15793
16024
|
dispatch
|
|
15794
|
-
} = useContext(store$
|
|
16025
|
+
} = useContext(store$d);
|
|
15795
16026
|
const {
|
|
15796
16027
|
t
|
|
15797
16028
|
} = useTranslation("userEdit");
|
|
@@ -15808,11 +16039,11 @@ const UserUpdateButton = ({
|
|
|
15808
16039
|
};
|
|
15809
16040
|
|
|
15810
16041
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
15811
|
-
store: store$
|
|
16042
|
+
store: store$d
|
|
15812
16043
|
}, props));
|
|
15813
16044
|
|
|
15814
16045
|
const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
15815
|
-
store: store$
|
|
16046
|
+
store: store$d
|
|
15816
16047
|
}, props));
|
|
15817
16048
|
|
|
15818
16049
|
function Phone({
|
|
@@ -15841,22 +16072,22 @@ function Phone({
|
|
|
15841
16072
|
}
|
|
15842
16073
|
|
|
15843
16074
|
const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
|
|
15844
|
-
store: store$
|
|
16075
|
+
store: store$d
|
|
15845
16076
|
}, props));
|
|
15846
16077
|
|
|
15847
16078
|
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";
|
|
15848
16079
|
|
|
15849
|
-
var _path$
|
|
16080
|
+
var _path$i;
|
|
15850
16081
|
|
|
15851
|
-
function _extends$
|
|
16082
|
+
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); }
|
|
15852
16083
|
|
|
15853
16084
|
function SvgEdit(props) {
|
|
15854
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
16085
|
+
return /*#__PURE__*/React.createElement("svg", _extends$k({
|
|
15855
16086
|
className: "plc-w-6 plc-h-6",
|
|
15856
16087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15857
16088
|
viewBox: "0 0 20 20",
|
|
15858
16089
|
fill: "currentColor"
|
|
15859
|
-
}, props), _path$
|
|
16090
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
|
|
15860
16091
|
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"
|
|
15861
16092
|
})));
|
|
15862
16093
|
}
|
|
@@ -15988,16 +16219,16 @@ function DisplayName({
|
|
|
15988
16219
|
}
|
|
15989
16220
|
|
|
15990
16221
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
|
|
15991
|
-
store: store$
|
|
16222
|
+
store: store$d
|
|
15992
16223
|
}, props));
|
|
15993
16224
|
|
|
15994
16225
|
const UserUpdateTextInput = props => {
|
|
15995
16226
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
15996
|
-
store: store$
|
|
16227
|
+
store: store$d
|
|
15997
16228
|
}));
|
|
15998
16229
|
};
|
|
15999
16230
|
|
|
16000
|
-
const initialState$
|
|
16231
|
+
const initialState$c = {
|
|
16001
16232
|
isSubmitting: false,
|
|
16002
16233
|
firstName: "",
|
|
16003
16234
|
firstNameError: "",
|
|
@@ -16022,10 +16253,10 @@ const initialState$b = {
|
|
|
16022
16253
|
content: ""
|
|
16023
16254
|
}
|
|
16024
16255
|
};
|
|
16025
|
-
const store$
|
|
16256
|
+
const store$c = /*#__PURE__*/createContext(initialState$c);
|
|
16026
16257
|
const {
|
|
16027
|
-
Provider: Provider$
|
|
16028
|
-
} = store$
|
|
16258
|
+
Provider: Provider$c
|
|
16259
|
+
} = store$c;
|
|
16029
16260
|
|
|
16030
16261
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
16031
16262
|
|
|
@@ -16232,7 +16463,7 @@ const AddressCreateContainer = ({
|
|
|
16232
16463
|
default:
|
|
16233
16464
|
return state;
|
|
16234
16465
|
}
|
|
16235
|
-
}, initialState$
|
|
16466
|
+
}, initialState$c);
|
|
16236
16467
|
useEffect(() => {
|
|
16237
16468
|
const getStates = () => {
|
|
16238
16469
|
dispatch({
|
|
@@ -16264,16 +16495,16 @@ const AddressCreateContainer = ({
|
|
|
16264
16495
|
style: { ...style
|
|
16265
16496
|
},
|
|
16266
16497
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
16267
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
16498
|
+
}, /*#__PURE__*/React__default.createElement(Provider$c, {
|
|
16268
16499
|
value: {
|
|
16269
16500
|
state,
|
|
16270
16501
|
dispatch
|
|
16271
16502
|
}
|
|
16272
16503
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
16273
|
-
store: store$
|
|
16504
|
+
store: store$c,
|
|
16274
16505
|
key: i
|
|
16275
16506
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
16276
|
-
store: store$
|
|
16507
|
+
store: store$c
|
|
16277
16508
|
})));
|
|
16278
16509
|
};
|
|
16279
16510
|
|
|
@@ -16284,7 +16515,7 @@ function AddressCreateFirstName(props) {
|
|
|
16284
16515
|
firstName,
|
|
16285
16516
|
firstNameError
|
|
16286
16517
|
}
|
|
16287
|
-
} = useContext(store$
|
|
16518
|
+
} = useContext(store$c);
|
|
16288
16519
|
|
|
16289
16520
|
const handleBlur = () => {
|
|
16290
16521
|
return dispatch({
|
|
@@ -16327,7 +16558,7 @@ function AddressCreateLastName(props) {
|
|
|
16327
16558
|
lastName,
|
|
16328
16559
|
lastNameError
|
|
16329
16560
|
}
|
|
16330
|
-
} = useContext(store$
|
|
16561
|
+
} = useContext(store$c);
|
|
16331
16562
|
|
|
16332
16563
|
const handleBlur = () => {
|
|
16333
16564
|
return dispatch({
|
|
@@ -16370,7 +16601,7 @@ function AddressCreateLine1(props) {
|
|
|
16370
16601
|
line1,
|
|
16371
16602
|
line1Error
|
|
16372
16603
|
}
|
|
16373
|
-
} = useContext(store$
|
|
16604
|
+
} = useContext(store$c);
|
|
16374
16605
|
|
|
16375
16606
|
const handleBlur = () => {
|
|
16376
16607
|
return dispatch({
|
|
@@ -16413,7 +16644,7 @@ function AddressCreateCity(props) {
|
|
|
16413
16644
|
city,
|
|
16414
16645
|
cityError
|
|
16415
16646
|
}
|
|
16416
|
-
} = useContext(store$
|
|
16647
|
+
} = useContext(store$c);
|
|
16417
16648
|
|
|
16418
16649
|
const handleBlur = () => {
|
|
16419
16650
|
return dispatch({
|
|
@@ -16456,7 +16687,7 @@ function AddressCreatePostalCode(props) {
|
|
|
16456
16687
|
postalCode,
|
|
16457
16688
|
postalCodeError
|
|
16458
16689
|
}
|
|
16459
|
-
} = useContext(store$
|
|
16690
|
+
} = useContext(store$c);
|
|
16460
16691
|
|
|
16461
16692
|
const handleBlur = () => {
|
|
16462
16693
|
return dispatch({
|
|
@@ -16502,7 +16733,7 @@ const AddressCreateSubmit = ({
|
|
|
16502
16733
|
state: {
|
|
16503
16734
|
isSubmitting
|
|
16504
16735
|
}
|
|
16505
|
-
} = useContext(store$
|
|
16736
|
+
} = useContext(store$c);
|
|
16506
16737
|
const {
|
|
16507
16738
|
t
|
|
16508
16739
|
} = useTranslation("address");
|
|
@@ -16613,7 +16844,7 @@ function CountrySelect({
|
|
|
16613
16844
|
}
|
|
16614
16845
|
|
|
16615
16846
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
16616
|
-
store: store$
|
|
16847
|
+
store: store$c
|
|
16617
16848
|
}, props));
|
|
16618
16849
|
|
|
16619
16850
|
function StateSelect({
|
|
@@ -16701,7 +16932,7 @@ function StateSelect({
|
|
|
16701
16932
|
}
|
|
16702
16933
|
|
|
16703
16934
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
16704
|
-
store: store$
|
|
16935
|
+
store: store$c
|
|
16705
16936
|
}, props));
|
|
16706
16937
|
|
|
16707
16938
|
const AddressCreateView = props => {
|
|
@@ -16806,18 +17037,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
16806
17037
|
|
|
16807
17038
|
const AddressCreateTextInput = props => {
|
|
16808
17039
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
16809
|
-
store: store$
|
|
17040
|
+
store: store$c
|
|
16810
17041
|
}));
|
|
16811
17042
|
};
|
|
16812
17043
|
|
|
16813
17044
|
const AddressCreateLine2 = props => {
|
|
16814
17045
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
16815
17046
|
fieldName: "line2",
|
|
16816
|
-
store: store$
|
|
17047
|
+
store: store$c
|
|
16817
17048
|
}, props));
|
|
16818
17049
|
};
|
|
16819
17050
|
|
|
16820
|
-
const initialState$
|
|
17051
|
+
const initialState$b = {
|
|
16821
17052
|
isSubmitting: false,
|
|
16822
17053
|
firstName: "",
|
|
16823
17054
|
firstNameError: "",
|
|
@@ -16842,10 +17073,10 @@ const initialState$a = {
|
|
|
16842
17073
|
content: ""
|
|
16843
17074
|
}
|
|
16844
17075
|
};
|
|
16845
|
-
const store$
|
|
17076
|
+
const store$b = /*#__PURE__*/createContext(initialState$b);
|
|
16846
17077
|
const {
|
|
16847
|
-
Provider: Provider$
|
|
16848
|
-
} = store$
|
|
17078
|
+
Provider: Provider$b
|
|
17079
|
+
} = store$b;
|
|
16849
17080
|
|
|
16850
17081
|
const AddressUpdateContainer = ({
|
|
16851
17082
|
style,
|
|
@@ -16897,7 +17128,7 @@ const AddressUpdateContainer = ({
|
|
|
16897
17128
|
const thisAddress = addresses[address];
|
|
16898
17129
|
|
|
16899
17130
|
if (+thisAddress.id === +addressId) {
|
|
16900
|
-
const newState = { ...initialState$
|
|
17131
|
+
const newState = { ...initialState$b,
|
|
16901
17132
|
firstName: thisAddress.first_name,
|
|
16902
17133
|
lastName: thisAddress.last_name,
|
|
16903
17134
|
line1: thisAddress.line1,
|
|
@@ -17030,7 +17261,7 @@ const AddressUpdateContainer = ({
|
|
|
17030
17261
|
default:
|
|
17031
17262
|
return state;
|
|
17032
17263
|
}
|
|
17033
|
-
}, initialState$
|
|
17264
|
+
}, initialState$b);
|
|
17034
17265
|
useEffect(() => {
|
|
17035
17266
|
const getStates = () => {
|
|
17036
17267
|
dispatch({
|
|
@@ -17062,21 +17293,21 @@ const AddressUpdateContainer = ({
|
|
|
17062
17293
|
style: { ...style
|
|
17063
17294
|
},
|
|
17064
17295
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
17065
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17296
|
+
}, /*#__PURE__*/React__default.createElement(Provider$b, {
|
|
17066
17297
|
value: {
|
|
17067
17298
|
state,
|
|
17068
17299
|
dispatch
|
|
17069
17300
|
}
|
|
17070
17301
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17071
|
-
store: store$
|
|
17302
|
+
store: store$b,
|
|
17072
17303
|
key: i
|
|
17073
17304
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17074
|
-
store: store$
|
|
17305
|
+
store: store$b
|
|
17075
17306
|
})));
|
|
17076
17307
|
};
|
|
17077
17308
|
|
|
17078
17309
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
|
|
17079
|
-
store: store$
|
|
17310
|
+
store: store$b
|
|
17080
17311
|
}, props));
|
|
17081
17312
|
|
|
17082
17313
|
function AddressUpdateFirstName(props) {
|
|
@@ -17086,7 +17317,7 @@ function AddressUpdateFirstName(props) {
|
|
|
17086
17317
|
firstName,
|
|
17087
17318
|
firstNameError
|
|
17088
17319
|
}
|
|
17089
|
-
} = useContext(store$
|
|
17320
|
+
} = useContext(store$b);
|
|
17090
17321
|
|
|
17091
17322
|
const handleBlur = () => {
|
|
17092
17323
|
return dispatch({
|
|
@@ -17129,7 +17360,7 @@ function AddressUpdateLastName(props) {
|
|
|
17129
17360
|
lastName,
|
|
17130
17361
|
lastNameError
|
|
17131
17362
|
}
|
|
17132
|
-
} = useContext(store$
|
|
17363
|
+
} = useContext(store$b);
|
|
17133
17364
|
|
|
17134
17365
|
const handleBlur = () => {
|
|
17135
17366
|
return dispatch({
|
|
@@ -17172,7 +17403,7 @@ function AddressUpdateLine1(props) {
|
|
|
17172
17403
|
line1,
|
|
17173
17404
|
line1Error
|
|
17174
17405
|
}
|
|
17175
|
-
} = useContext(store$
|
|
17406
|
+
} = useContext(store$b);
|
|
17176
17407
|
|
|
17177
17408
|
const handleBlur = () => {
|
|
17178
17409
|
return dispatch({
|
|
@@ -17212,7 +17443,7 @@ const AddressUpdateLine2 = props => {
|
|
|
17212
17443
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
|
|
17213
17444
|
fieldName: "line2"
|
|
17214
17445
|
}, props, {
|
|
17215
|
-
store: store$
|
|
17446
|
+
store: store$b
|
|
17216
17447
|
}));
|
|
17217
17448
|
};
|
|
17218
17449
|
|
|
@@ -17223,7 +17454,7 @@ function AddressUpdateCity(props) {
|
|
|
17223
17454
|
city,
|
|
17224
17455
|
cityError
|
|
17225
17456
|
}
|
|
17226
|
-
} = useContext(store$
|
|
17457
|
+
} = useContext(store$b);
|
|
17227
17458
|
|
|
17228
17459
|
const handleBlur = () => {
|
|
17229
17460
|
return dispatch({
|
|
@@ -17266,7 +17497,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
17266
17497
|
postalCode,
|
|
17267
17498
|
postalCodeError
|
|
17268
17499
|
}
|
|
17269
|
-
} = useContext(store$
|
|
17500
|
+
} = useContext(store$b);
|
|
17270
17501
|
|
|
17271
17502
|
const handleBlur = () => {
|
|
17272
17503
|
return dispatch({
|
|
@@ -17312,7 +17543,7 @@ const AddressUpdateSubmit = ({
|
|
|
17312
17543
|
state: {
|
|
17313
17544
|
isSubmitting
|
|
17314
17545
|
}
|
|
17315
|
-
} = useContext(store$
|
|
17546
|
+
} = useContext(store$b);
|
|
17316
17547
|
const {
|
|
17317
17548
|
t
|
|
17318
17549
|
} = useTranslation("address");
|
|
@@ -17328,7 +17559,7 @@ const AddressUpdateSubmit = ({
|
|
|
17328
17559
|
};
|
|
17329
17560
|
|
|
17330
17561
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
|
|
17331
|
-
store: store$
|
|
17562
|
+
store: store$b
|
|
17332
17563
|
}, props));
|
|
17333
17564
|
|
|
17334
17565
|
const AddressUpdateView = props => {
|
|
@@ -17411,7 +17642,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
17411
17642
|
|
|
17412
17643
|
const AddressUpdateTextInput = props => {
|
|
17413
17644
|
return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
|
|
17414
|
-
store: store$
|
|
17645
|
+
store: store$b
|
|
17415
17646
|
}));
|
|
17416
17647
|
};
|
|
17417
17648
|
|
|
@@ -17494,7 +17725,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
17494
17725
|
};
|
|
17495
17726
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
17496
17727
|
|
|
17497
|
-
const initialState$
|
|
17728
|
+
const initialState$a = {
|
|
17498
17729
|
email: "",
|
|
17499
17730
|
password: "",
|
|
17500
17731
|
passwordError: null,
|
|
@@ -17507,10 +17738,10 @@ const initialState$9 = {
|
|
|
17507
17738
|
content: ""
|
|
17508
17739
|
}
|
|
17509
17740
|
};
|
|
17510
|
-
const store$
|
|
17741
|
+
const store$a = /*#__PURE__*/createContext(initialState$a);
|
|
17511
17742
|
const {
|
|
17512
|
-
Provider: Provider$
|
|
17513
|
-
} = store$
|
|
17743
|
+
Provider: Provider$a
|
|
17744
|
+
} = store$a;
|
|
17514
17745
|
|
|
17515
17746
|
const PasswordResetContainer = ({
|
|
17516
17747
|
style,
|
|
@@ -17567,7 +17798,7 @@ const PasswordResetContainer = ({
|
|
|
17567
17798
|
type: SET_EMAIL,
|
|
17568
17799
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
17569
17800
|
});
|
|
17570
|
-
initialState$
|
|
17801
|
+
initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
|
|
17571
17802
|
dispatch({
|
|
17572
17803
|
type: SET_TOKEN,
|
|
17573
17804
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -17627,26 +17858,26 @@ const PasswordResetContainer = ({
|
|
|
17627
17858
|
default:
|
|
17628
17859
|
return state;
|
|
17629
17860
|
}
|
|
17630
|
-
}, initialState$
|
|
17861
|
+
}, initialState$a);
|
|
17631
17862
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17632
17863
|
style: { ...style
|
|
17633
17864
|
},
|
|
17634
17865
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
17635
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
17866
|
+
}, /*#__PURE__*/React__default.createElement(Provider$a, {
|
|
17636
17867
|
value: {
|
|
17637
17868
|
state,
|
|
17638
17869
|
dispatch
|
|
17639
17870
|
}
|
|
17640
17871
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17641
|
-
store: store$
|
|
17872
|
+
store: store$a,
|
|
17642
17873
|
key: i
|
|
17643
17874
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17644
|
-
store: store$
|
|
17875
|
+
store: store$a
|
|
17645
17876
|
})));
|
|
17646
17877
|
};
|
|
17647
17878
|
|
|
17648
17879
|
const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
|
|
17649
|
-
store: store$
|
|
17880
|
+
store: store$a
|
|
17650
17881
|
}, props));
|
|
17651
17882
|
|
|
17652
17883
|
const PasswordResetButton = ({
|
|
@@ -17659,7 +17890,7 @@ const PasswordResetButton = ({
|
|
|
17659
17890
|
buttonDisabled
|
|
17660
17891
|
},
|
|
17661
17892
|
dispatch
|
|
17662
|
-
} = useContext(store$
|
|
17893
|
+
} = useContext(store$a);
|
|
17663
17894
|
const {
|
|
17664
17895
|
t
|
|
17665
17896
|
} = useTranslation("passwordReset");
|
|
@@ -17676,14 +17907,14 @@ const PasswordResetButton = ({
|
|
|
17676
17907
|
};
|
|
17677
17908
|
|
|
17678
17909
|
const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17679
|
-
store: store$
|
|
17910
|
+
store: store$a
|
|
17680
17911
|
}, props, {
|
|
17681
17912
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
17682
17913
|
disabled: true
|
|
17683
17914
|
}));
|
|
17684
17915
|
|
|
17685
17916
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
|
|
17686
|
-
store: store$
|
|
17917
|
+
store: store$a
|
|
17687
17918
|
}, props));
|
|
17688
17919
|
|
|
17689
17920
|
const PasswordResetView = props => {
|
|
@@ -17735,7 +17966,7 @@ const PasswordResetModal = ({
|
|
|
17735
17966
|
};
|
|
17736
17967
|
PasswordResetModal.viewId = "password-reset";
|
|
17737
17968
|
|
|
17738
|
-
const initialState$
|
|
17969
|
+
const initialState$9 = {
|
|
17739
17970
|
email: "",
|
|
17740
17971
|
emailError: null,
|
|
17741
17972
|
buttonDisabled: false,
|
|
@@ -17744,10 +17975,10 @@ const initialState$8 = {
|
|
|
17744
17975
|
content: ""
|
|
17745
17976
|
}
|
|
17746
17977
|
};
|
|
17747
|
-
const store$
|
|
17978
|
+
const store$9 = /*#__PURE__*/createContext(initialState$9);
|
|
17748
17979
|
const {
|
|
17749
|
-
Provider: Provider$
|
|
17750
|
-
} = store$
|
|
17980
|
+
Provider: Provider$9
|
|
17981
|
+
} = store$9;
|
|
17751
17982
|
|
|
17752
17983
|
const PasswordForgotContainer = ({
|
|
17753
17984
|
style,
|
|
@@ -17825,21 +18056,21 @@ const PasswordForgotContainer = ({
|
|
|
17825
18056
|
default:
|
|
17826
18057
|
return state;
|
|
17827
18058
|
}
|
|
17828
|
-
}, initialState$
|
|
18059
|
+
}, initialState$9);
|
|
17829
18060
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
17830
18061
|
style: { ...style
|
|
17831
18062
|
},
|
|
17832
18063
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
17833
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18064
|
+
}, /*#__PURE__*/React__default.createElement(Provider$9, {
|
|
17834
18065
|
value: {
|
|
17835
18066
|
state,
|
|
17836
18067
|
dispatch
|
|
17837
18068
|
}
|
|
17838
18069
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
17839
|
-
store: store$
|
|
18070
|
+
store: store$9,
|
|
17840
18071
|
key: i
|
|
17841
18072
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
17842
|
-
store: store$
|
|
18073
|
+
store: store$9
|
|
17843
18074
|
})));
|
|
17844
18075
|
};
|
|
17845
18076
|
|
|
@@ -17855,7 +18086,7 @@ const PasswordForgotButton = ({
|
|
|
17855
18086
|
emailError
|
|
17856
18087
|
},
|
|
17857
18088
|
dispatch
|
|
17858
|
-
} = useContext(store$
|
|
18089
|
+
} = useContext(store$9);
|
|
17859
18090
|
const {
|
|
17860
18091
|
t
|
|
17861
18092
|
} = useTranslation("passwordForgot");
|
|
@@ -17876,7 +18107,7 @@ const PasswordForgotButton = ({
|
|
|
17876
18107
|
};
|
|
17877
18108
|
|
|
17878
18109
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
17879
|
-
store: store$
|
|
18110
|
+
store: store$9
|
|
17880
18111
|
}, props));
|
|
17881
18112
|
|
|
17882
18113
|
const PasswordForgotView = props => {
|
|
@@ -17926,7 +18157,7 @@ const PasswordForgotModal = ({
|
|
|
17926
18157
|
};
|
|
17927
18158
|
PasswordForgotModal.viewId = "password-forgot";
|
|
17928
18159
|
|
|
17929
|
-
const initialState$
|
|
18160
|
+
const initialState$8 = {
|
|
17930
18161
|
currentPassword: "",
|
|
17931
18162
|
newPassword: "",
|
|
17932
18163
|
confirmNewPassword: "",
|
|
@@ -17940,10 +18171,10 @@ const initialState$7 = {
|
|
|
17940
18171
|
content: ""
|
|
17941
18172
|
}
|
|
17942
18173
|
};
|
|
17943
|
-
const store$
|
|
18174
|
+
const store$8 = /*#__PURE__*/createContext(initialState$8);
|
|
17944
18175
|
const {
|
|
17945
|
-
Provider: Provider$
|
|
17946
|
-
} = store$
|
|
18176
|
+
Provider: Provider$8
|
|
18177
|
+
} = store$8;
|
|
17947
18178
|
const PasswordChangeContainer = ({
|
|
17948
18179
|
style,
|
|
17949
18180
|
className = "",
|
|
@@ -18095,21 +18326,21 @@ const PasswordChangeContainer = ({
|
|
|
18095
18326
|
default:
|
|
18096
18327
|
return state;
|
|
18097
18328
|
}
|
|
18098
|
-
}, initialState$
|
|
18329
|
+
}, initialState$8);
|
|
18099
18330
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18100
18331
|
style: { ...style
|
|
18101
18332
|
},
|
|
18102
18333
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
18103
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18334
|
+
}, /*#__PURE__*/React__default.createElement(Provider$8, {
|
|
18104
18335
|
value: {
|
|
18105
18336
|
state,
|
|
18106
18337
|
dispatch
|
|
18107
18338
|
}
|
|
18108
18339
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18109
|
-
store: store$
|
|
18340
|
+
store: store$8,
|
|
18110
18341
|
key: i
|
|
18111
18342
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18112
|
-
store: store$
|
|
18343
|
+
store: store$8
|
|
18113
18344
|
})));
|
|
18114
18345
|
};
|
|
18115
18346
|
|
|
@@ -18120,7 +18351,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
18120
18351
|
currentPassword,
|
|
18121
18352
|
currentPasswordError
|
|
18122
18353
|
}
|
|
18123
|
-
} = useContext(store$
|
|
18354
|
+
} = useContext(store$8);
|
|
18124
18355
|
const handleBlur = useCallback(() => {
|
|
18125
18356
|
return dispatch({
|
|
18126
18357
|
type: VALIDATE_PASSWORD
|
|
@@ -18154,7 +18385,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
18154
18385
|
newPassword,
|
|
18155
18386
|
newPasswordError
|
|
18156
18387
|
}
|
|
18157
|
-
} = useContext(store$
|
|
18388
|
+
} = useContext(store$8);
|
|
18158
18389
|
const handleBlur = useCallback(() => {
|
|
18159
18390
|
return dispatch({
|
|
18160
18391
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -18188,7 +18419,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
18188
18419
|
confirmNewPassword,
|
|
18189
18420
|
confirmNewPasswordError
|
|
18190
18421
|
}
|
|
18191
|
-
} = useContext(store$
|
|
18422
|
+
} = useContext(store$8);
|
|
18192
18423
|
const handleBlur = useCallback(() => {
|
|
18193
18424
|
return dispatch({
|
|
18194
18425
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -18229,7 +18460,7 @@ const PasswordChangeButton = ({
|
|
|
18229
18460
|
confirmNewPasswordError
|
|
18230
18461
|
},
|
|
18231
18462
|
dispatch
|
|
18232
|
-
} = useContext(store$
|
|
18463
|
+
} = useContext(store$8);
|
|
18233
18464
|
const {
|
|
18234
18465
|
t
|
|
18235
18466
|
} = useTranslation("passwordChange");
|
|
@@ -18295,17 +18526,17 @@ const PasswordChangeModal = ({
|
|
|
18295
18526
|
};
|
|
18296
18527
|
PasswordChangeModal.viewId = "password-change";
|
|
18297
18528
|
|
|
18298
|
-
const initialState$
|
|
18529
|
+
const initialState$7 = {
|
|
18299
18530
|
buttonDisabled: false,
|
|
18300
18531
|
alert: {
|
|
18301
18532
|
type: "error",
|
|
18302
18533
|
content: ""
|
|
18303
18534
|
}
|
|
18304
18535
|
};
|
|
18305
|
-
const store$
|
|
18536
|
+
const store$7 = /*#__PURE__*/createContext(initialState$7);
|
|
18306
18537
|
const {
|
|
18307
|
-
Provider: Provider$
|
|
18308
|
-
} = store$
|
|
18538
|
+
Provider: Provider$7
|
|
18539
|
+
} = store$7;
|
|
18309
18540
|
|
|
18310
18541
|
const CartContainer = ({
|
|
18311
18542
|
style,
|
|
@@ -18396,21 +18627,21 @@ const CartContainer = ({
|
|
|
18396
18627
|
default:
|
|
18397
18628
|
return state;
|
|
18398
18629
|
}
|
|
18399
|
-
}, initialState$
|
|
18630
|
+
}, initialState$7);
|
|
18400
18631
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18401
18632
|
style: { ...style
|
|
18402
18633
|
},
|
|
18403
18634
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
18404
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
18635
|
+
}, /*#__PURE__*/React__default.createElement(Provider$7, {
|
|
18405
18636
|
value: {
|
|
18406
18637
|
state,
|
|
18407
18638
|
dispatch
|
|
18408
18639
|
}
|
|
18409
18640
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18410
|
-
store: store$
|
|
18641
|
+
store: store$7,
|
|
18411
18642
|
key: i
|
|
18412
18643
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18413
|
-
store: store$
|
|
18644
|
+
store: store$7
|
|
18414
18645
|
})));
|
|
18415
18646
|
};
|
|
18416
18647
|
|
|
@@ -18447,7 +18678,7 @@ const CartSubmit = ({
|
|
|
18447
18678
|
buttonDisabled
|
|
18448
18679
|
},
|
|
18449
18680
|
dispatch
|
|
18450
|
-
} = useContext(store$
|
|
18681
|
+
} = useContext(store$7);
|
|
18451
18682
|
const {
|
|
18452
18683
|
t
|
|
18453
18684
|
} = useTranslation("cart");
|
|
@@ -18478,7 +18709,7 @@ const CartTotalPrice = () => {
|
|
|
18478
18709
|
state: {
|
|
18479
18710
|
alert
|
|
18480
18711
|
}
|
|
18481
|
-
} = useContext(store$
|
|
18712
|
+
} = useContext(store$7);
|
|
18482
18713
|
const {
|
|
18483
18714
|
cartItems
|
|
18484
18715
|
} = usePelcro();
|
|
@@ -18791,7 +19022,7 @@ const OrderConfirmModal = props => {
|
|
|
18791
19022
|
};
|
|
18792
19023
|
OrderConfirmModal.viewId = "order-confirm";
|
|
18793
19024
|
|
|
18794
|
-
const initialState$
|
|
19025
|
+
const initialState$6 = {
|
|
18795
19026
|
email: "",
|
|
18796
19027
|
firstName: "",
|
|
18797
19028
|
lastName: "",
|
|
@@ -18803,10 +19034,10 @@ const initialState$5 = {
|
|
|
18803
19034
|
content: ""
|
|
18804
19035
|
}
|
|
18805
19036
|
};
|
|
18806
|
-
const store$
|
|
19037
|
+
const store$6 = /*#__PURE__*/createContext(initialState$6);
|
|
18807
19038
|
const {
|
|
18808
|
-
Provider: Provider$
|
|
18809
|
-
} = store$
|
|
19039
|
+
Provider: Provider$6
|
|
19040
|
+
} = store$6;
|
|
18810
19041
|
|
|
18811
19042
|
const GiftCreateContainer = ({
|
|
18812
19043
|
style,
|
|
@@ -18910,21 +19141,21 @@ const GiftCreateContainer = ({
|
|
|
18910
19141
|
default:
|
|
18911
19142
|
return state;
|
|
18912
19143
|
}
|
|
18913
|
-
}, initialState$
|
|
19144
|
+
}, initialState$6);
|
|
18914
19145
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18915
19146
|
style: { ...style
|
|
18916
19147
|
},
|
|
18917
19148
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
18918
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19149
|
+
}, /*#__PURE__*/React__default.createElement(Provider$6, {
|
|
18919
19150
|
value: {
|
|
18920
19151
|
state,
|
|
18921
19152
|
dispatch
|
|
18922
19153
|
}
|
|
18923
19154
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
18924
|
-
store: store$
|
|
19155
|
+
store: store$6,
|
|
18925
19156
|
key: i
|
|
18926
19157
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
18927
|
-
store: store$
|
|
19158
|
+
store: store$6
|
|
18928
19159
|
})));
|
|
18929
19160
|
};
|
|
18930
19161
|
|
|
@@ -18938,7 +19169,7 @@ const GiftCreateSubmitButton = ({
|
|
|
18938
19169
|
state: {
|
|
18939
19170
|
disableSubmit
|
|
18940
19171
|
}
|
|
18941
|
-
} = useContext(store$
|
|
19172
|
+
} = useContext(store$6);
|
|
18942
19173
|
const {
|
|
18943
19174
|
t
|
|
18944
19175
|
} = useTranslation("register");
|
|
@@ -18955,29 +19186,29 @@ const GiftCreateSubmitButton = ({
|
|
|
18955
19186
|
|
|
18956
19187
|
const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
|
|
18957
19188
|
initWithUserEmail: false,
|
|
18958
|
-
store: store$
|
|
19189
|
+
store: store$6
|
|
18959
19190
|
}, props));
|
|
18960
19191
|
|
|
18961
19192
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
|
|
18962
|
-
store: store$
|
|
19193
|
+
store: store$6
|
|
18963
19194
|
}, props));
|
|
18964
19195
|
|
|
18965
19196
|
const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
|
|
18966
|
-
store: store$
|
|
19197
|
+
store: store$6
|
|
18967
19198
|
}, props));
|
|
18968
19199
|
|
|
18969
|
-
var _path$
|
|
19200
|
+
var _path$h;
|
|
18970
19201
|
|
|
18971
|
-
function _extends$
|
|
19202
|
+
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); }
|
|
18972
19203
|
|
|
18973
19204
|
function SvgInfoCircle(props) {
|
|
18974
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
19205
|
+
return /*#__PURE__*/React.createElement("svg", _extends$j({
|
|
18975
19206
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18976
19207
|
className: "plc-w-5 plc-h-5",
|
|
18977
19208
|
fill: "none",
|
|
18978
19209
|
viewBox: "0 0 24 24",
|
|
18979
19210
|
stroke: "currentColor"
|
|
18980
|
-
}, props), _path$
|
|
19211
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
|
|
18981
19212
|
strokeLinecap: "round",
|
|
18982
19213
|
strokeLinejoin: "round",
|
|
18983
19214
|
strokeWidth: 2,
|
|
@@ -19048,7 +19279,7 @@ const GiftCreateStartDate = props => {
|
|
|
19048
19279
|
const {
|
|
19049
19280
|
dispatch,
|
|
19050
19281
|
state
|
|
19051
|
-
} = useContext(store$
|
|
19282
|
+
} = useContext(store$6);
|
|
19052
19283
|
|
|
19053
19284
|
const handleInputChange = value => {
|
|
19054
19285
|
dispatch({
|
|
@@ -19119,7 +19350,7 @@ function GiftCreateMessage(props) {
|
|
|
19119
19350
|
const {
|
|
19120
19351
|
dispatch,
|
|
19121
19352
|
state
|
|
19122
|
-
} = useContext(store$
|
|
19353
|
+
} = useContext(store$6);
|
|
19123
19354
|
|
|
19124
19355
|
const handleInputChange = value => {
|
|
19125
19356
|
dispatch({
|
|
@@ -19239,7 +19470,7 @@ const GiftCreateModal = ({
|
|
|
19239
19470
|
};
|
|
19240
19471
|
GiftCreateModal.viewId = "gift-create";
|
|
19241
19472
|
|
|
19242
|
-
const initialState$
|
|
19473
|
+
const initialState$5 = {
|
|
19243
19474
|
giftCode: "",
|
|
19244
19475
|
buttonDisabled: true,
|
|
19245
19476
|
alert: {
|
|
@@ -19247,10 +19478,10 @@ const initialState$4 = {
|
|
|
19247
19478
|
content: ""
|
|
19248
19479
|
}
|
|
19249
19480
|
};
|
|
19250
|
-
const store$
|
|
19481
|
+
const store$5 = /*#__PURE__*/createContext(initialState$5);
|
|
19251
19482
|
const {
|
|
19252
|
-
Provider: Provider$
|
|
19253
|
-
} = store$
|
|
19483
|
+
Provider: Provider$5
|
|
19484
|
+
} = store$5;
|
|
19254
19485
|
|
|
19255
19486
|
const GiftRedeemContainer = ({
|
|
19256
19487
|
style,
|
|
@@ -19315,21 +19546,21 @@ const GiftRedeemContainer = ({
|
|
|
19315
19546
|
default:
|
|
19316
19547
|
return state;
|
|
19317
19548
|
}
|
|
19318
|
-
}, initialState$
|
|
19549
|
+
}, initialState$5);
|
|
19319
19550
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
19320
19551
|
style: { ...style
|
|
19321
19552
|
},
|
|
19322
19553
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
19323
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19554
|
+
}, /*#__PURE__*/React__default.createElement(Provider$5, {
|
|
19324
19555
|
value: {
|
|
19325
19556
|
state,
|
|
19326
19557
|
dispatch
|
|
19327
19558
|
}
|
|
19328
19559
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19329
|
-
store: store$
|
|
19560
|
+
store: store$5,
|
|
19330
19561
|
key: i
|
|
19331
19562
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19332
|
-
store: store$
|
|
19563
|
+
store: store$5
|
|
19333
19564
|
})));
|
|
19334
19565
|
};
|
|
19335
19566
|
|
|
@@ -19366,7 +19597,7 @@ function GiftCode({
|
|
|
19366
19597
|
}
|
|
19367
19598
|
|
|
19368
19599
|
const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
|
|
19369
|
-
store: store$
|
|
19600
|
+
store: store$5
|
|
19370
19601
|
}, props));
|
|
19371
19602
|
|
|
19372
19603
|
const GiftRedeemSubmitButton = ({
|
|
@@ -19379,7 +19610,7 @@ const GiftRedeemSubmitButton = ({
|
|
|
19379
19610
|
state: {
|
|
19380
19611
|
disableSubmit
|
|
19381
19612
|
}
|
|
19382
|
-
} = useContext(store$
|
|
19613
|
+
} = useContext(store$5);
|
|
19383
19614
|
const {
|
|
19384
19615
|
t
|
|
19385
19616
|
} = useTranslation("register");
|
|
@@ -19472,7 +19703,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
19472
19703
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
19473
19704
|
};
|
|
19474
19705
|
|
|
19475
|
-
const initialState$
|
|
19706
|
+
const initialState$4 = {
|
|
19476
19707
|
addresses: [],
|
|
19477
19708
|
selectedAddressId: null,
|
|
19478
19709
|
isSubmitting: false,
|
|
@@ -19481,10 +19712,10 @@ const initialState$3 = {
|
|
|
19481
19712
|
content: ""
|
|
19482
19713
|
}
|
|
19483
19714
|
};
|
|
19484
|
-
const store$
|
|
19715
|
+
const store$4 = /*#__PURE__*/createContext(initialState$4);
|
|
19485
19716
|
const {
|
|
19486
|
-
Provider: Provider$
|
|
19487
|
-
} = store$
|
|
19717
|
+
Provider: Provider$4
|
|
19718
|
+
} = store$4;
|
|
19488
19719
|
|
|
19489
19720
|
const AddressSelectContainer = ({
|
|
19490
19721
|
style,
|
|
@@ -19579,7 +19810,7 @@ const AddressSelectContainer = ({
|
|
|
19579
19810
|
default:
|
|
19580
19811
|
return state;
|
|
19581
19812
|
}
|
|
19582
|
-
}, initialState$
|
|
19813
|
+
}, initialState$4);
|
|
19583
19814
|
useEffect(() => {
|
|
19584
19815
|
var _window$Pelcro$user$r;
|
|
19585
19816
|
|
|
@@ -19592,16 +19823,16 @@ const AddressSelectContainer = ({
|
|
|
19592
19823
|
style: { ...style
|
|
19593
19824
|
},
|
|
19594
19825
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
19595
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
19826
|
+
}, /*#__PURE__*/React__default.createElement(Provider$4, {
|
|
19596
19827
|
value: {
|
|
19597
19828
|
state,
|
|
19598
19829
|
dispatch
|
|
19599
19830
|
}
|
|
19600
19831
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19601
|
-
store: store$
|
|
19832
|
+
store: store$4,
|
|
19602
19833
|
key: i
|
|
19603
19834
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19604
|
-
store: store$
|
|
19835
|
+
store: store$4
|
|
19605
19836
|
})));
|
|
19606
19837
|
};
|
|
19607
19838
|
|
|
@@ -19612,7 +19843,7 @@ const AddressSelectList = () => {
|
|
|
19612
19843
|
addresses,
|
|
19613
19844
|
selectedAddressId
|
|
19614
19845
|
}
|
|
19615
|
-
} = useContext(store$
|
|
19846
|
+
} = useContext(store$4);
|
|
19616
19847
|
|
|
19617
19848
|
const handleAddressSelect = event => {
|
|
19618
19849
|
dispatch({
|
|
@@ -19656,7 +19887,7 @@ const AddressSelectSubmit = ({
|
|
|
19656
19887
|
selectedAddressId,
|
|
19657
19888
|
isSubmitting
|
|
19658
19889
|
}
|
|
19659
|
-
} = useContext(store$
|
|
19890
|
+
} = useContext(store$4);
|
|
19660
19891
|
const {
|
|
19661
19892
|
t
|
|
19662
19893
|
} = useTranslation("address");
|
|
@@ -19752,7 +19983,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
19752
19983
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
19753
19984
|
};
|
|
19754
19985
|
|
|
19755
|
-
const initialState$
|
|
19986
|
+
const initialState$3 = {
|
|
19756
19987
|
paymentMethods: [],
|
|
19757
19988
|
selectedPaymentMethodId: null,
|
|
19758
19989
|
isSubmitting: false,
|
|
@@ -19761,10 +19992,10 @@ const initialState$2 = {
|
|
|
19761
19992
|
content: ""
|
|
19762
19993
|
}
|
|
19763
19994
|
};
|
|
19764
|
-
const store$
|
|
19995
|
+
const store$3 = /*#__PURE__*/createContext(initialState$3);
|
|
19765
19996
|
const {
|
|
19766
|
-
Provider: Provider$
|
|
19767
|
-
} = store$
|
|
19997
|
+
Provider: Provider$3
|
|
19998
|
+
} = store$3;
|
|
19768
19999
|
|
|
19769
20000
|
const PaymentMethodSelectContainer = ({
|
|
19770
20001
|
style,
|
|
@@ -19809,7 +20040,7 @@ const PaymentMethodSelectContainer = ({
|
|
|
19809
20040
|
default:
|
|
19810
20041
|
return state;
|
|
19811
20042
|
}
|
|
19812
|
-
}, initialState$
|
|
20043
|
+
}, initialState$3);
|
|
19813
20044
|
useEffect(() => {
|
|
19814
20045
|
var _window$Pelcro$user$r4;
|
|
19815
20046
|
|
|
@@ -19822,16 +20053,16 @@ const PaymentMethodSelectContainer = ({
|
|
|
19822
20053
|
style: { ...style
|
|
19823
20054
|
},
|
|
19824
20055
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
19825
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
20056
|
+
}, /*#__PURE__*/React__default.createElement(Provider$3, {
|
|
19826
20057
|
value: {
|
|
19827
20058
|
state,
|
|
19828
20059
|
dispatch
|
|
19829
20060
|
}
|
|
19830
20061
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
19831
|
-
store: store$
|
|
20062
|
+
store: store$3,
|
|
19832
20063
|
key: i
|
|
19833
20064
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
19834
|
-
store: store$
|
|
20065
|
+
store: store$3
|
|
19835
20066
|
})));
|
|
19836
20067
|
};
|
|
19837
20068
|
|
|
@@ -19845,7 +20076,7 @@ const PaymentMethodSelectList = () => {
|
|
|
19845
20076
|
paymentMethods,
|
|
19846
20077
|
selectedPaymentMethodId
|
|
19847
20078
|
}
|
|
19848
|
-
} = useContext(store$
|
|
20079
|
+
} = useContext(store$3);
|
|
19849
20080
|
|
|
19850
20081
|
const handlePaymentMethodSelect = event => {
|
|
19851
20082
|
dispatch({
|
|
@@ -19895,7 +20126,7 @@ const PaymentMethodSelectSubmit = ({
|
|
|
19895
20126
|
selectedPaymentMethodId,
|
|
19896
20127
|
isSubmitting
|
|
19897
20128
|
}
|
|
19898
|
-
} = useContext(store$
|
|
20129
|
+
} = useContext(store$3);
|
|
19899
20130
|
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
19900
20131
|
onClick: () => {
|
|
19901
20132
|
dispatch({
|
|
@@ -19969,8 +20200,8 @@ const PaymentMethodSelectModal = ({
|
|
|
19969
20200
|
};
|
|
19970
20201
|
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
19971
20202
|
|
|
19972
|
-
function _extends$
|
|
19973
|
-
_extends$
|
|
20203
|
+
function _extends$i() {
|
|
20204
|
+
_extends$i = Object.assign || function (target) {
|
|
19974
20205
|
for (var i = 1; i < arguments.length; i++) {
|
|
19975
20206
|
var source = arguments[i];
|
|
19976
20207
|
|
|
@@ -19984,7 +20215,7 @@ function _extends$h() {
|
|
|
19984
20215
|
return target;
|
|
19985
20216
|
};
|
|
19986
20217
|
|
|
19987
|
-
return _extends$
|
|
20218
|
+
return _extends$i.apply(this, arguments);
|
|
19988
20219
|
}
|
|
19989
20220
|
|
|
19990
20221
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -20168,7 +20399,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
20168
20399
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
20169
20400
|
return null;
|
|
20170
20401
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
20171
|
-
return _render(_extends$
|
|
20402
|
+
return _render(_extends$i({}, _rest, {
|
|
20172
20403
|
hidden: true,
|
|
20173
20404
|
style: {
|
|
20174
20405
|
display: 'none'
|
|
@@ -20696,7 +20927,7 @@ function TransitionChild(props) {
|
|
|
20696
20927
|
var passthroughProps = rest;
|
|
20697
20928
|
return React__default.createElement(NestingContext.Provider, {
|
|
20698
20929
|
value: nesting
|
|
20699
|
-
}, render(_extends$
|
|
20930
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
20700
20931
|
}
|
|
20701
20932
|
|
|
20702
20933
|
function Transition(props) {
|
|
@@ -20740,7 +20971,7 @@ function Transition(props) {
|
|
|
20740
20971
|
value: nestingBag
|
|
20741
20972
|
}, React__default.createElement(TransitionContext.Provider, {
|
|
20742
20973
|
value: transitionBag
|
|
20743
|
-
}, render(_extends$
|
|
20974
|
+
}, render(_extends$i({}, sharedProps, {
|
|
20744
20975
|
as: Fragment,
|
|
20745
20976
|
children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
20746
20977
|
}), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -20867,12 +21098,12 @@ var ActionTypes;
|
|
|
20867
21098
|
})(ActionTypes || (ActionTypes = {}));
|
|
20868
21099
|
|
|
20869
21100
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
20870
|
-
return _extends$
|
|
21101
|
+
return _extends$i({}, state, {
|
|
20871
21102
|
activeItemIndex: null,
|
|
20872
21103
|
menuState: MenuStates.Closed
|
|
20873
21104
|
});
|
|
20874
21105
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
20875
|
-
return _extends$
|
|
21106
|
+
return _extends$i({}, state, {
|
|
20876
21107
|
menuState: MenuStates.Open
|
|
20877
21108
|
});
|
|
20878
21109
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -20891,7 +21122,7 @@ var ActionTypes;
|
|
|
20891
21122
|
}
|
|
20892
21123
|
});
|
|
20893
21124
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
20894
|
-
return _extends$
|
|
21125
|
+
return _extends$i({}, state, {
|
|
20895
21126
|
searchQuery: '',
|
|
20896
21127
|
activeItemIndex: activeItemIndex
|
|
20897
21128
|
});
|
|
@@ -20902,19 +21133,19 @@ var ActionTypes;
|
|
|
20902
21133
|
|
|
20903
21134
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
20904
21135
|
});
|
|
20905
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
21136
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
20906
21137
|
searchQuery: searchQuery
|
|
20907
21138
|
});
|
|
20908
|
-
return _extends$
|
|
21139
|
+
return _extends$i({}, state, {
|
|
20909
21140
|
searchQuery: searchQuery,
|
|
20910
21141
|
activeItemIndex: match
|
|
20911
21142
|
});
|
|
20912
21143
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
20913
|
-
return _extends$
|
|
21144
|
+
return _extends$i({}, state, {
|
|
20914
21145
|
searchQuery: ''
|
|
20915
21146
|
});
|
|
20916
21147
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
20917
|
-
return _extends$
|
|
21148
|
+
return _extends$i({}, state, {
|
|
20918
21149
|
items: [].concat(state.items, [{
|
|
20919
21150
|
id: action.id,
|
|
20920
21151
|
dataRef: action.dataRef
|
|
@@ -20927,7 +21158,7 @@ var ActionTypes;
|
|
|
20927
21158
|
return a.id === action.id;
|
|
20928
21159
|
});
|
|
20929
21160
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
20930
|
-
return _extends$
|
|
21161
|
+
return _extends$i({}, state, {
|
|
20931
21162
|
items: nextItems,
|
|
20932
21163
|
activeItemIndex: function () {
|
|
20933
21164
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -20966,19 +21197,19 @@ var ActionTypes$1;
|
|
|
20966
21197
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
20967
21198
|
if (state.disabled) return state;
|
|
20968
21199
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
20969
|
-
return _extends$
|
|
21200
|
+
return _extends$i({}, state, {
|
|
20970
21201
|
activeOptionIndex: null,
|
|
20971
21202
|
listboxState: ListboxStates.Closed
|
|
20972
21203
|
});
|
|
20973
21204
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
20974
21205
|
if (state.disabled) return state;
|
|
20975
21206
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
20976
|
-
return _extends$
|
|
21207
|
+
return _extends$i({}, state, {
|
|
20977
21208
|
listboxState: ListboxStates.Open
|
|
20978
21209
|
});
|
|
20979
21210
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
20980
21211
|
if (state.disabled === action.disabled) return state;
|
|
20981
|
-
return _extends$
|
|
21212
|
+
return _extends$i({}, state, {
|
|
20982
21213
|
disabled: action.disabled
|
|
20983
21214
|
});
|
|
20984
21215
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -20999,7 +21230,7 @@ var ActionTypes$1;
|
|
|
20999
21230
|
}
|
|
21000
21231
|
});
|
|
21001
21232
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
21002
|
-
return _extends$
|
|
21233
|
+
return _extends$i({}, state, {
|
|
21003
21234
|
searchQuery: '',
|
|
21004
21235
|
activeOptionIndex: activeOptionIndex
|
|
21005
21236
|
});
|
|
@@ -21012,10 +21243,10 @@ var ActionTypes$1;
|
|
|
21012
21243
|
|
|
21013
21244
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
21014
21245
|
});
|
|
21015
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
21246
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
21016
21247
|
searchQuery: searchQuery
|
|
21017
21248
|
});
|
|
21018
|
-
return _extends$
|
|
21249
|
+
return _extends$i({}, state, {
|
|
21019
21250
|
searchQuery: searchQuery,
|
|
21020
21251
|
activeOptionIndex: match
|
|
21021
21252
|
});
|
|
@@ -21023,11 +21254,11 @@ var ActionTypes$1;
|
|
|
21023
21254
|
if (state.disabled) return state;
|
|
21024
21255
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
21025
21256
|
if (state.searchQuery === '') return state;
|
|
21026
|
-
return _extends$
|
|
21257
|
+
return _extends$i({}, state, {
|
|
21027
21258
|
searchQuery: ''
|
|
21028
21259
|
});
|
|
21029
21260
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
21030
|
-
return _extends$
|
|
21261
|
+
return _extends$i({}, state, {
|
|
21031
21262
|
options: [].concat(state.options, [{
|
|
21032
21263
|
id: action.id,
|
|
21033
21264
|
dataRef: action.dataRef
|
|
@@ -21040,7 +21271,7 @@ var ActionTypes$1;
|
|
|
21040
21271
|
return a.id === action.id;
|
|
21041
21272
|
});
|
|
21042
21273
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
21043
|
-
return _extends$
|
|
21274
|
+
return _extends$i({}, state, {
|
|
21044
21275
|
options: nextOptions,
|
|
21045
21276
|
activeOptionIndex: function () {
|
|
21046
21277
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -21101,18 +21332,18 @@ const getPaymentCardIcon = name => {
|
|
|
21101
21332
|
}));
|
|
21102
21333
|
};
|
|
21103
21334
|
|
|
21104
|
-
var _path$
|
|
21335
|
+
var _path$g;
|
|
21105
21336
|
|
|
21106
|
-
function _extends$
|
|
21337
|
+
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); }
|
|
21107
21338
|
|
|
21108
21339
|
function SvgChevronRight(props) {
|
|
21109
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21340
|
+
return /*#__PURE__*/React.createElement("svg", _extends$h({
|
|
21110
21341
|
className: "plc-w-6 plc-h-6",
|
|
21111
21342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21112
21343
|
fill: "none",
|
|
21113
21344
|
viewBox: "0 0 24 24",
|
|
21114
21345
|
stroke: "currentColor"
|
|
21115
|
-
}, props), _path$
|
|
21346
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
|
|
21116
21347
|
strokeLinecap: "round",
|
|
21117
21348
|
strokeLinejoin: "round",
|
|
21118
21349
|
strokeWidth: 2,
|
|
@@ -21328,18 +21559,18 @@ const SavedItems = ({
|
|
|
21328
21559
|
});
|
|
21329
21560
|
};
|
|
21330
21561
|
|
|
21331
|
-
var _path$
|
|
21562
|
+
var _path$f;
|
|
21332
21563
|
|
|
21333
|
-
function _extends$
|
|
21564
|
+
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); }
|
|
21334
21565
|
|
|
21335
21566
|
function SvgRefresh(props) {
|
|
21336
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21567
|
+
return /*#__PURE__*/React.createElement("svg", _extends$g({
|
|
21337
21568
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21338
21569
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21339
21570
|
fill: "none",
|
|
21340
21571
|
viewBox: "0 0 24 24",
|
|
21341
21572
|
stroke: "currentColor"
|
|
21342
|
-
}, props), _path$
|
|
21573
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
|
|
21343
21574
|
strokeLinecap: "round",
|
|
21344
21575
|
strokeLinejoin: "round",
|
|
21345
21576
|
strokeWidth: 2,
|
|
@@ -21347,35 +21578,35 @@ function SvgRefresh(props) {
|
|
|
21347
21578
|
})));
|
|
21348
21579
|
}
|
|
21349
21580
|
|
|
21350
|
-
var _path$
|
|
21581
|
+
var _path$e;
|
|
21351
21582
|
|
|
21352
|
-
function _extends$
|
|
21583
|
+
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); }
|
|
21353
21584
|
|
|
21354
21585
|
function SvgCalendar(props) {
|
|
21355
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21586
|
+
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
|
21356
21587
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21357
21588
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
21358
21589
|
viewBox: "0 0 20 20",
|
|
21359
21590
|
fill: "currentColor"
|
|
21360
|
-
}, props), _path$
|
|
21591
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
|
|
21361
21592
|
fillRule: "evenodd",
|
|
21362
21593
|
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",
|
|
21363
21594
|
clipRule: "evenodd"
|
|
21364
21595
|
})));
|
|
21365
21596
|
}
|
|
21366
21597
|
|
|
21367
|
-
var _path$
|
|
21598
|
+
var _path$d;
|
|
21368
21599
|
|
|
21369
|
-
function _extends$
|
|
21600
|
+
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); }
|
|
21370
21601
|
|
|
21371
21602
|
function SvgPlus(props) {
|
|
21372
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21603
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
21373
21604
|
className: "plc-w-5 plc-h-5",
|
|
21374
21605
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21375
21606
|
fill: "none",
|
|
21376
21607
|
viewBox: "0 0 24 24",
|
|
21377
21608
|
stroke: "currentColor"
|
|
21378
|
-
}, props), _path$
|
|
21609
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
|
|
21379
21610
|
strokeLinecap: "round",
|
|
21380
21611
|
strokeLinejoin: "round",
|
|
21381
21612
|
strokeWidth: 2,
|
|
@@ -21383,17 +21614,17 @@ function SvgPlus(props) {
|
|
|
21383
21614
|
})));
|
|
21384
21615
|
}
|
|
21385
21616
|
|
|
21386
|
-
var _path$
|
|
21617
|
+
var _path$c;
|
|
21387
21618
|
|
|
21388
|
-
function _extends$
|
|
21619
|
+
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); }
|
|
21389
21620
|
|
|
21390
21621
|
function SvgCheckMark(props) {
|
|
21391
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21622
|
+
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
|
21392
21623
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
21393
21624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21394
21625
|
viewBox: "0 0 20 20",
|
|
21395
21626
|
fill: "currentColor"
|
|
21396
|
-
}, props), _path$
|
|
21627
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
|
|
21397
21628
|
fillRule: "evenodd",
|
|
21398
21629
|
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",
|
|
21399
21630
|
clipRule: "evenodd"
|
|
@@ -21688,18 +21919,18 @@ Accordion.item = function AccordionItem({
|
|
|
21688
21919
|
}, content)) : null;
|
|
21689
21920
|
};
|
|
21690
21921
|
|
|
21691
|
-
var _path$
|
|
21922
|
+
var _path$b;
|
|
21692
21923
|
|
|
21693
|
-
function _extends$
|
|
21924
|
+
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); }
|
|
21694
21925
|
|
|
21695
21926
|
function SvgExit(props) {
|
|
21696
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
21927
|
+
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
21697
21928
|
className: "plc-w-6 plc-h-6",
|
|
21698
21929
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21699
21930
|
fill: "none",
|
|
21700
21931
|
viewBox: "0 0 24 24",
|
|
21701
21932
|
stroke: "currentColor"
|
|
21702
|
-
}, props), _path$
|
|
21933
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
|
|
21703
21934
|
strokeLinecap: "round",
|
|
21704
21935
|
strokeLinejoin: "round",
|
|
21705
21936
|
strokeWidth: 2,
|
|
@@ -21707,13 +21938,32 @@ function SvgExit(props) {
|
|
|
21707
21938
|
})));
|
|
21708
21939
|
}
|
|
21709
21940
|
|
|
21941
|
+
var _path$a;
|
|
21942
|
+
|
|
21943
|
+
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); }
|
|
21944
|
+
|
|
21945
|
+
function SvgUser(props) {
|
|
21946
|
+
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
21947
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21948
|
+
fill: "none",
|
|
21949
|
+
viewBox: "0 0 24 24",
|
|
21950
|
+
stroke: "currentColor"
|
|
21951
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
|
|
21952
|
+
strokeLinecap: "round",
|
|
21953
|
+
strokeLinejoin: "round",
|
|
21954
|
+
strokeWidth: 2,
|
|
21955
|
+
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"
|
|
21956
|
+
})));
|
|
21957
|
+
}
|
|
21958
|
+
|
|
21710
21959
|
var _path$9;
|
|
21711
21960
|
|
|
21712
21961
|
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); }
|
|
21713
21962
|
|
|
21714
|
-
function
|
|
21963
|
+
function SvgNewsletter(props) {
|
|
21715
21964
|
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
21716
21965
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21966
|
+
className: "plc-h-5 plc-w-5",
|
|
21717
21967
|
fill: "none",
|
|
21718
21968
|
viewBox: "0 0 24 24",
|
|
21719
21969
|
stroke: "currentColor"
|
|
@@ -21721,7 +21971,7 @@ function SvgUser(props) {
|
|
|
21721
21971
|
strokeLinecap: "round",
|
|
21722
21972
|
strokeLinejoin: "round",
|
|
21723
21973
|
strokeWidth: 2,
|
|
21724
|
-
d: "
|
|
21974
|
+
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"
|
|
21725
21975
|
})));
|
|
21726
21976
|
}
|
|
21727
21977
|
|
|
@@ -21729,10 +21979,10 @@ var _path$8;
|
|
|
21729
21979
|
|
|
21730
21980
|
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); }
|
|
21731
21981
|
|
|
21732
|
-
function
|
|
21982
|
+
function SvgDocument(props) {
|
|
21733
21983
|
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
21734
21984
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21735
|
-
className: "plc-h-
|
|
21985
|
+
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
21736
21986
|
fill: "none",
|
|
21737
21987
|
viewBox: "0 0 24 24",
|
|
21738
21988
|
stroke: "currentColor"
|
|
@@ -21740,7 +21990,7 @@ function SvgNewsletter(props) {
|
|
|
21740
21990
|
strokeLinecap: "round",
|
|
21741
21991
|
strokeLinejoin: "round",
|
|
21742
21992
|
strokeWidth: 2,
|
|
21743
|
-
d: "
|
|
21993
|
+
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"
|
|
21744
21994
|
})));
|
|
21745
21995
|
}
|
|
21746
21996
|
|
|
@@ -21918,6 +22168,130 @@ function formatStartDate(date) {
|
|
|
21918
22168
|
return new Intl.DateTimeFormat("en-CA").format(startDate);
|
|
21919
22169
|
}
|
|
21920
22170
|
|
|
22171
|
+
const InvoicesMenu = props => {
|
|
22172
|
+
const {
|
|
22173
|
+
t
|
|
22174
|
+
} = useTranslation("dashboard");
|
|
22175
|
+
return /*#__PURE__*/React__default.createElement("table", {
|
|
22176
|
+
className: "plc-w-full plc-table-fixed"
|
|
22177
|
+
}, /*#__PURE__*/React__default.createElement("thead", {
|
|
22178
|
+
className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
|
|
22179
|
+
}, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
22180
|
+
className: "plc-w-4/12 "
|
|
22181
|
+
}, t("labels.details")), /*#__PURE__*/React__default.createElement("th", {
|
|
22182
|
+
className: "plc-w-4/12 "
|
|
22183
|
+
}, t("labels.status.title")), /*#__PURE__*/React__default.createElement("th", {
|
|
22184
|
+
className: "plc-w-3/12 "
|
|
22185
|
+
}, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
22186
|
+
className: "plc-h-4"
|
|
22187
|
+
}), /*#__PURE__*/React__default.createElement(InvoicesItems, props)));
|
|
22188
|
+
};
|
|
22189
|
+
|
|
22190
|
+
const InvoicesItems = () => {
|
|
22191
|
+
var _window$Pelcro$invoic;
|
|
22192
|
+
|
|
22193
|
+
const {
|
|
22194
|
+
t
|
|
22195
|
+
} = useTranslation("dashboard");
|
|
22196
|
+
const {
|
|
22197
|
+
setInvoice,
|
|
22198
|
+
switchView
|
|
22199
|
+
} = usePelcro();
|
|
22200
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22201
|
+
|
|
22202
|
+
const showInvoiceDetails = event => {
|
|
22203
|
+
if (setInvoice(event.target.dataset.id)) {
|
|
22204
|
+
switchView("invoice-details");
|
|
22205
|
+
}
|
|
22206
|
+
};
|
|
22207
|
+
|
|
22208
|
+
if (invoices.length === 0) return null;
|
|
22209
|
+
return invoices.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()).map(invoice => {
|
|
22210
|
+
const invoiceStatus = getInvoiceStatus(invoice);
|
|
22211
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(new Date(invoice.created_at));
|
|
22212
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
22213
|
+
key: invoice.id,
|
|
22214
|
+
className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50`
|
|
22215
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
22216
|
+
className: "plc-truncate"
|
|
22217
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
22218
|
+
className: "plc-font-semibold plc-text-gray-500"
|
|
22219
|
+
}, `#${invoice.id}`), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
22220
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22221
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
22222
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
22223
|
+
}, formattedCreationDate)), /*#__PURE__*/React__default.createElement("td", {
|
|
22224
|
+
className: "plc-py-2"
|
|
22225
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
22226
|
+
className: `plc-inline-flex plc-p-1 plc-text-xs plc-font-semibold ${invoiceStatus.bgColor} plc-uppercase ${invoiceStatus.textColor} plc-rounded-lg`
|
|
22227
|
+
}, invoiceStatus.icon, invoiceStatus.title)), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement(Button, {
|
|
22228
|
+
variant: "ghost",
|
|
22229
|
+
className: "plc-text-blue-400 focus:plc-ring-blue-400 pelcro-dashboard-view-invoice-button",
|
|
22230
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDocument, {
|
|
22231
|
+
className: "plc-w-4 plc-h-4"
|
|
22232
|
+
}),
|
|
22233
|
+
onClick: showInvoiceDetails,
|
|
22234
|
+
"data-id": invoice.id
|
|
22235
|
+
}, t("labels.view"))));
|
|
22236
|
+
});
|
|
22237
|
+
};
|
|
22238
|
+
|
|
22239
|
+
function getInvoiceStatus(invoice) {
|
|
22240
|
+
const translations = i18next.t("dashboard:labels", {
|
|
22241
|
+
returnObjects: true
|
|
22242
|
+
});
|
|
22243
|
+
|
|
22244
|
+
switch (invoice.status) {
|
|
22245
|
+
case "paid":
|
|
22246
|
+
return {
|
|
22247
|
+
textColor: "plc-text-green-700",
|
|
22248
|
+
bgColor: "plc-bg-green-100",
|
|
22249
|
+
icon: /*#__PURE__*/React__default.createElement(SvgCheckMark, null),
|
|
22250
|
+
title: translations.paid
|
|
22251
|
+
};
|
|
22252
|
+
|
|
22253
|
+
case "past_due":
|
|
22254
|
+
return {
|
|
22255
|
+
textColor: "plc-text-orange-700",
|
|
22256
|
+
bgColor: "plc-bg-orange-100",
|
|
22257
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
|
|
22258
|
+
title: translations.pastDue
|
|
22259
|
+
};
|
|
22260
|
+
|
|
22261
|
+
case "open":
|
|
22262
|
+
return {
|
|
22263
|
+
textColor: "plc-text-yellow-700",
|
|
22264
|
+
bgColor: "plc-bg-yellow-100",
|
|
22265
|
+
icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null),
|
|
22266
|
+
title: translations.open
|
|
22267
|
+
};
|
|
22268
|
+
|
|
22269
|
+
case "draft":
|
|
22270
|
+
return {
|
|
22271
|
+
textColor: "plc-text-blue-700",
|
|
22272
|
+
bgColor: "plc-bg-blue-100",
|
|
22273
|
+
icon: /*#__PURE__*/React__default.createElement(SvgEdit, null),
|
|
22274
|
+
title: translations.draft
|
|
22275
|
+
};
|
|
22276
|
+
|
|
22277
|
+
case "uncollectible":
|
|
22278
|
+
return {
|
|
22279
|
+
textColor: "plc-text-red-700",
|
|
22280
|
+
bgColor: "plc-bg-red-100",
|
|
22281
|
+
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
22282
|
+
title: translations.uncollectible
|
|
22283
|
+
};
|
|
22284
|
+
|
|
22285
|
+
case "void":
|
|
22286
|
+
return {
|
|
22287
|
+
textColor: "plc-text-gray-700",
|
|
22288
|
+
bgColor: "plc-bg-gray-100",
|
|
22289
|
+
icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
|
|
22290
|
+
title: translations.void
|
|
22291
|
+
};
|
|
22292
|
+
}
|
|
22293
|
+
}
|
|
22294
|
+
|
|
21921
22295
|
const SUB_MENUS = {
|
|
21922
22296
|
PROFILE: "profile",
|
|
21923
22297
|
SUBSCRIPTIONS: "subscriptions",
|
|
@@ -21926,6 +22300,7 @@ const SUB_MENUS = {
|
|
|
21926
22300
|
ADDRESSES: "addresses",
|
|
21927
22301
|
GIFTS: "gifts",
|
|
21928
22302
|
ORDERS: "orders",
|
|
22303
|
+
INVOICES: "invoices",
|
|
21929
22304
|
SAVED_ITEMS: "saved-items"
|
|
21930
22305
|
};
|
|
21931
22306
|
/**
|
|
@@ -22468,6 +22843,12 @@ class Dashboard extends Component {
|
|
|
22468
22843
|
icon: /*#__PURE__*/React__default.createElement(SvgShopping, null),
|
|
22469
22844
|
title: this.locale("labels.orders.label"),
|
|
22470
22845
|
content: /*#__PURE__*/React__default.createElement(OrdersMenu, null)
|
|
22846
|
+
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22847
|
+
show: hasInvoices(),
|
|
22848
|
+
name: SUB_MENUS.INVOICES,
|
|
22849
|
+
icon: /*#__PURE__*/React__default.createElement(SvgDocument, null),
|
|
22850
|
+
title: this.locale("labels.invoices"),
|
|
22851
|
+
content: /*#__PURE__*/React__default.createElement(InvoicesMenu, null)
|
|
22471
22852
|
}), /*#__PURE__*/React__default.createElement(Accordion.item, {
|
|
22472
22853
|
name: SUB_MENUS.SAVED_ITEMS,
|
|
22473
22854
|
icon: /*#__PURE__*/React__default.createElement(SvgBookmark, null),
|
|
@@ -22483,6 +22864,13 @@ class Dashboard extends Component {
|
|
|
22483
22864
|
|
|
22484
22865
|
}
|
|
22485
22866
|
|
|
22867
|
+
function hasInvoices() {
|
|
22868
|
+
var _window$Pelcro$invoic;
|
|
22869
|
+
|
|
22870
|
+
const invoices = (_window$Pelcro$invoic = window.Pelcro.invoice.list()) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
|
|
22871
|
+
return invoices.length > 0;
|
|
22872
|
+
}
|
|
22873
|
+
|
|
22486
22874
|
function hasDonationSubs() {
|
|
22487
22875
|
var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
|
|
22488
22876
|
|
|
@@ -22517,7 +22905,7 @@ const DashboardOpenButton = () => {
|
|
|
22517
22905
|
};
|
|
22518
22906
|
DashboardOpenButton.viewId = "dashboard-open";
|
|
22519
22907
|
|
|
22520
|
-
const initialState$
|
|
22908
|
+
const initialState$2 = {
|
|
22521
22909
|
imageSrc: null,
|
|
22522
22910
|
crop: {
|
|
22523
22911
|
x: 0,
|
|
@@ -22531,10 +22919,10 @@ const initialState$1 = {
|
|
|
22531
22919
|
content: ""
|
|
22532
22920
|
}
|
|
22533
22921
|
};
|
|
22534
|
-
const store$
|
|
22922
|
+
const store$2 = /*#__PURE__*/createContext(initialState$2);
|
|
22535
22923
|
const {
|
|
22536
|
-
Provider: Provider$
|
|
22537
|
-
} = store$
|
|
22924
|
+
Provider: Provider$2
|
|
22925
|
+
} = store$2;
|
|
22538
22926
|
|
|
22539
22927
|
const ProfilePicChangeContainer = ({
|
|
22540
22928
|
style,
|
|
@@ -22668,21 +23056,21 @@ const ProfilePicChangeContainer = ({
|
|
|
22668
23056
|
default:
|
|
22669
23057
|
return state;
|
|
22670
23058
|
}
|
|
22671
|
-
}, initialState$
|
|
23059
|
+
}, initialState$2);
|
|
22672
23060
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22673
23061
|
style: { ...style
|
|
22674
23062
|
},
|
|
22675
23063
|
className: `pelcro-container pelcro-profile-picture-container ${className}`
|
|
22676
|
-
}, /*#__PURE__*/React__default.createElement(Provider$
|
|
23064
|
+
}, /*#__PURE__*/React__default.createElement(Provider$2, {
|
|
22677
23065
|
value: {
|
|
22678
23066
|
state,
|
|
22679
23067
|
dispatch
|
|
22680
23068
|
}
|
|
22681
23069
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
22682
|
-
store: store$
|
|
23070
|
+
store: store$2,
|
|
22683
23071
|
key: i
|
|
22684
23072
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
22685
|
-
store: store$
|
|
23073
|
+
store: store$2
|
|
22686
23074
|
})));
|
|
22687
23075
|
};
|
|
22688
23076
|
/**
|
|
@@ -22744,7 +23132,7 @@ const ProfilePicChangeButton = ({
|
|
|
22744
23132
|
isSubmitting
|
|
22745
23133
|
},
|
|
22746
23134
|
dispatch
|
|
22747
|
-
} = useContext(store$
|
|
23135
|
+
} = useContext(store$2);
|
|
22748
23136
|
const {
|
|
22749
23137
|
t
|
|
22750
23138
|
} = useTranslation("userEdit");
|
|
@@ -24112,7 +24500,7 @@ const ProfilePicChangeCropper = ({
|
|
|
24112
24500
|
zoom
|
|
24113
24501
|
},
|
|
24114
24502
|
dispatch
|
|
24115
|
-
} = useContext(store$
|
|
24503
|
+
} = useContext(store$2);
|
|
24116
24504
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24117
24505
|
className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
|
|
24118
24506
|
}, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
|
|
@@ -24154,7 +24542,7 @@ const ProfilePicChangeZoom = ({
|
|
|
24154
24542
|
zoom
|
|
24155
24543
|
},
|
|
24156
24544
|
dispatch
|
|
24157
|
-
} = useContext(store$
|
|
24545
|
+
} = useContext(store$2);
|
|
24158
24546
|
const {
|
|
24159
24547
|
t
|
|
24160
24548
|
} = useTranslation("userEdit");
|
|
@@ -24206,7 +24594,7 @@ const ProfilePicChangeSelectButton = ({
|
|
|
24206
24594
|
state: {
|
|
24207
24595
|
isSubmitting
|
|
24208
24596
|
}
|
|
24209
|
-
} = useContext(store$
|
|
24597
|
+
} = useContext(store$2);
|
|
24210
24598
|
const {
|
|
24211
24599
|
t
|
|
24212
24600
|
} = useTranslation("userEdit");
|
|
@@ -24248,7 +24636,7 @@ const ProfilePicChangeRemoveButton = ({
|
|
|
24248
24636
|
state: {
|
|
24249
24637
|
isSubmitting
|
|
24250
24638
|
}
|
|
24251
|
-
} = useContext(store$
|
|
24639
|
+
} = useContext(store$2);
|
|
24252
24640
|
const {
|
|
24253
24641
|
t
|
|
24254
24642
|
} = useTranslation("userEdit");
|
|
@@ -24271,7 +24659,7 @@ const ProfilePicChangeWrapper = () => {
|
|
|
24271
24659
|
state: {
|
|
24272
24660
|
imageSrc
|
|
24273
24661
|
}
|
|
24274
|
-
} = useContext(store$
|
|
24662
|
+
} = useContext(store$2);
|
|
24275
24663
|
const {
|
|
24276
24664
|
t
|
|
24277
24665
|
} = useTranslation("userEdit");
|
|
@@ -24333,17 +24721,17 @@ function ProfilePicChangeModal({
|
|
|
24333
24721
|
}
|
|
24334
24722
|
ProfilePicChangeModal.viewId = "profile-picture";
|
|
24335
24723
|
|
|
24336
|
-
const initialState = {
|
|
24724
|
+
const initialState$1 = {
|
|
24337
24725
|
isSubmitting: false,
|
|
24338
24726
|
alert: {
|
|
24339
24727
|
type: "error",
|
|
24340
24728
|
content: ""
|
|
24341
24729
|
}
|
|
24342
24730
|
};
|
|
24343
|
-
const store = /*#__PURE__*/createContext(initialState);
|
|
24731
|
+
const store$1 = /*#__PURE__*/createContext(initialState$1);
|
|
24344
24732
|
const {
|
|
24345
|
-
Provider
|
|
24346
|
-
} = store;
|
|
24733
|
+
Provider: Provider$1
|
|
24734
|
+
} = store$1;
|
|
24347
24735
|
|
|
24348
24736
|
const EmailVerifyContainer = ({
|
|
24349
24737
|
style,
|
|
@@ -24406,21 +24794,21 @@ const EmailVerifyContainer = ({
|
|
|
24406
24794
|
default:
|
|
24407
24795
|
return state;
|
|
24408
24796
|
}
|
|
24409
|
-
}, initialState);
|
|
24797
|
+
}, initialState$1);
|
|
24410
24798
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
24411
24799
|
style: { ...style
|
|
24412
24800
|
},
|
|
24413
24801
|
className: `pelcro-container pelcro-email-verify-container ${className}`
|
|
24414
|
-
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
24802
|
+
}, /*#__PURE__*/React__default.createElement(Provider$1, {
|
|
24415
24803
|
value: {
|
|
24416
24804
|
state,
|
|
24417
24805
|
dispatch
|
|
24418
24806
|
}
|
|
24419
24807
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24420
|
-
store,
|
|
24808
|
+
store: store$1,
|
|
24421
24809
|
key: i
|
|
24422
24810
|
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24423
|
-
store
|
|
24811
|
+
store: store$1
|
|
24424
24812
|
})));
|
|
24425
24813
|
};
|
|
24426
24814
|
|
|
@@ -24434,7 +24822,7 @@ const EmailVerifyResendButton = ({
|
|
|
24434
24822
|
state: {
|
|
24435
24823
|
isSubmitting
|
|
24436
24824
|
}
|
|
24437
|
-
} = useContext(store);
|
|
24825
|
+
} = useContext(store$1);
|
|
24438
24826
|
const {
|
|
24439
24827
|
t
|
|
24440
24828
|
} = useTranslation("verifyEmail");
|
|
@@ -24509,4 +24897,233 @@ const EmailVerifyModal = ({
|
|
|
24509
24897
|
};
|
|
24510
24898
|
EmailVerifyModal.viewId = "email-verify";
|
|
24511
24899
|
|
|
24512
|
-
|
|
24900
|
+
const InvoicePaymentContainer = props => /*#__PURE__*/React__default.createElement(PaymentMethodContainer, Object.assign({
|
|
24901
|
+
type: "invoicePayment",
|
|
24902
|
+
className: "pelcro-invoice-payment-container"
|
|
24903
|
+
}, props));
|
|
24904
|
+
|
|
24905
|
+
const InvoicePaymentView = props => {
|
|
24906
|
+
const {
|
|
24907
|
+
t
|
|
24908
|
+
} = useTranslation("payment");
|
|
24909
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24910
|
+
id: "pelcro-invoice-payment-view"
|
|
24911
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
24912
|
+
className: "plc-mb-6 plc-text-2xl plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
24913
|
+
}, /*#__PURE__*/React__default.createElement("h4", null, t("labels.checkout.title"))), /*#__PURE__*/React__default.createElement("form", {
|
|
24914
|
+
action: "javascript:void(0);",
|
|
24915
|
+
className: "plc-mt-2 pelcro-form"
|
|
24916
|
+
}, /*#__PURE__*/React__default.createElement(PaymentMethodView, Object.assign({
|
|
24917
|
+
type: "invoicePayment",
|
|
24918
|
+
showCoupon: false,
|
|
24919
|
+
showExternalPaymentMethods: true
|
|
24920
|
+
}, props))));
|
|
24921
|
+
};
|
|
24922
|
+
|
|
24923
|
+
const InvoicePaymentModal = ({
|
|
24924
|
+
onDisplay,
|
|
24925
|
+
onClose,
|
|
24926
|
+
...otherProps
|
|
24927
|
+
}) => {
|
|
24928
|
+
const {
|
|
24929
|
+
switchView
|
|
24930
|
+
} = usePelcro();
|
|
24931
|
+
|
|
24932
|
+
const onSuccess = () => {
|
|
24933
|
+
var _otherProps$onSuccess;
|
|
24934
|
+
|
|
24935
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
24936
|
+
return switchView("subscription-success");
|
|
24937
|
+
};
|
|
24938
|
+
|
|
24939
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
24940
|
+
id: "pelcro-invoice-payment-modal",
|
|
24941
|
+
onDisplay: onDisplay,
|
|
24942
|
+
onClose: onClose
|
|
24943
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoicePaymentView, Object.assign({}, otherProps, {
|
|
24944
|
+
onSuccess: onSuccess
|
|
24945
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
24946
|
+
};
|
|
24947
|
+
InvoicePaymentModal.viewId = "invoice-payment";
|
|
24948
|
+
|
|
24949
|
+
const invoicePaymentSubmitButton = props => {
|
|
24950
|
+
return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
|
|
24951
|
+
};
|
|
24952
|
+
|
|
24953
|
+
const initialState = {};
|
|
24954
|
+
const store = /*#__PURE__*/createContext(initialState);
|
|
24955
|
+
const {
|
|
24956
|
+
Provider
|
|
24957
|
+
} = store;
|
|
24958
|
+
|
|
24959
|
+
const InvoiceDetailsContainer = ({
|
|
24960
|
+
style,
|
|
24961
|
+
className = "",
|
|
24962
|
+
onSuccess = () => {},
|
|
24963
|
+
children,
|
|
24964
|
+
...props
|
|
24965
|
+
}) => {
|
|
24966
|
+
const onPayButtonClick = () => {
|
|
24967
|
+
return onSuccess();
|
|
24968
|
+
};
|
|
24969
|
+
|
|
24970
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
24971
|
+
switch (action.type) {
|
|
24972
|
+
case HANDLE_SUBMIT:
|
|
24973
|
+
return lib_4((state, dispatch) => onPayButtonClick());
|
|
24974
|
+
|
|
24975
|
+
default:
|
|
24976
|
+
return state;
|
|
24977
|
+
}
|
|
24978
|
+
}, initialState);
|
|
24979
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
24980
|
+
style: { ...style
|
|
24981
|
+
},
|
|
24982
|
+
className: `pelcro-container pelcro-invoice-details-container ${className}`
|
|
24983
|
+
}, /*#__PURE__*/React__default.createElement(Provider, {
|
|
24984
|
+
value: {
|
|
24985
|
+
state,
|
|
24986
|
+
dispatch
|
|
24987
|
+
}
|
|
24988
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
24989
|
+
store,
|
|
24990
|
+
key: i
|
|
24991
|
+
})) : /*#__PURE__*/React__default.cloneElement(children, {
|
|
24992
|
+
store
|
|
24993
|
+
})));
|
|
24994
|
+
};
|
|
24995
|
+
|
|
24996
|
+
const InvoiceDetailsDownloadButton = ({
|
|
24997
|
+
name,
|
|
24998
|
+
url,
|
|
24999
|
+
className,
|
|
25000
|
+
...otherProps
|
|
25001
|
+
}) => {
|
|
25002
|
+
const {
|
|
25003
|
+
t
|
|
25004
|
+
} = useTranslation("invoiceDetails");
|
|
25005
|
+
const {
|
|
25006
|
+
invoice
|
|
25007
|
+
} = usePelcro();
|
|
25008
|
+
return /*#__PURE__*/React__default.createElement(Link, Object.assign({
|
|
25009
|
+
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}`,
|
|
25010
|
+
id: "pelcro-download-invoice-link",
|
|
25011
|
+
href: url !== null && url !== void 0 ? url : invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25012
|
+
target: "_blank",
|
|
25013
|
+
rel: "noopener noreferrer"
|
|
25014
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.download"));
|
|
25015
|
+
};
|
|
25016
|
+
|
|
25017
|
+
const InvoiceDetailsPayButton = ({
|
|
25018
|
+
name,
|
|
25019
|
+
onClick,
|
|
25020
|
+
...otherProps
|
|
25021
|
+
}) => {
|
|
25022
|
+
const {
|
|
25023
|
+
dispatch
|
|
25024
|
+
} = useContext(store);
|
|
25025
|
+
const {
|
|
25026
|
+
t
|
|
25027
|
+
} = useTranslation("invoiceDetails");
|
|
25028
|
+
return /*#__PURE__*/React__default.createElement(Button, Object.assign({
|
|
25029
|
+
onClick: () => {
|
|
25030
|
+
dispatch({
|
|
25031
|
+
type: HANDLE_SUBMIT
|
|
25032
|
+
});
|
|
25033
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
25034
|
+
}
|
|
25035
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("buttons.pay"));
|
|
25036
|
+
};
|
|
25037
|
+
|
|
25038
|
+
const InvoiceDetailsView = props => {
|
|
25039
|
+
const {
|
|
25040
|
+
t
|
|
25041
|
+
} = useTranslation("invoiceDetails");
|
|
25042
|
+
const {
|
|
25043
|
+
invoice
|
|
25044
|
+
} = usePelcro();
|
|
25045
|
+
const showPayButton = canPayInvoice(invoice);
|
|
25046
|
+
const creationDate = new Date(invoice === null || invoice === void 0 ? void 0 : invoice.created_at);
|
|
25047
|
+
const formattedCreationDate = new Intl.DateTimeFormat("en-CA").format(creationDate);
|
|
25048
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
25049
|
+
id: "pelcro-invoice-details-view"
|
|
25050
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25051
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
25052
|
+
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
25053
|
+
className: "plc-text-2xl plc-font-semibold"
|
|
25054
|
+
}, t("title"))), /*#__PURE__*/React__default.createElement("form", {
|
|
25055
|
+
action: "javascript:void(0);",
|
|
25056
|
+
className: "plc-mt-2 pelcro-form"
|
|
25057
|
+
}, /*#__PURE__*/React__default.createElement(InvoiceDetailsContainer, props, /*#__PURE__*/React__default.createElement("div", {
|
|
25058
|
+
className: "plc-mt-5 pelcro-invoice-summary-wrapper"
|
|
25059
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25060
|
+
className: "plc-font-bold pelcro-invoice-summary-title"
|
|
25061
|
+
}, t("labels.summary")), invoice && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
25062
|
+
className: "plc-mr-2 pelcro-invoice-creation-date"
|
|
25063
|
+
}, `${t("labels.creationDate")} ${formattedCreationDate}`), /*#__PURE__*/React__default.createElement("div", {
|
|
25064
|
+
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"
|
|
25065
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25066
|
+
className: "plc-w-1/2 plc-break-words pelcro-invoice-plan-name"
|
|
25067
|
+
}, invoice.plan.nickname), /*#__PURE__*/React__default.createElement("div", {
|
|
25068
|
+
className: "plc-w-1/5 plc-text-center pelcro-invoice-summary-price"
|
|
25069
|
+
}, calcAndFormatItemsTotal([invoice.plan], invoice.currency))), /*#__PURE__*/React__default.createElement("div", {
|
|
25070
|
+
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"
|
|
25071
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25072
|
+
className: "plc-mr-2 plc-flex plc-flex-col"
|
|
25073
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25074
|
+
className: "pelcro-invoice-total-text"
|
|
25075
|
+
}, t("labels.total")), /*#__PURE__*/React__default.createElement("p", {
|
|
25076
|
+
className: "pelcro-invoice-total-text"
|
|
25077
|
+
}, t("labels.amountPaid")), /*#__PURE__*/React__default.createElement("p", {
|
|
25078
|
+
className: "plc-font-semibold pelcro-invoice-total-text"
|
|
25079
|
+
}, t("labels.amountDue"))), /*#__PURE__*/React__default.createElement("div", {
|
|
25080
|
+
className: "plc-flex plc-flex-col"
|
|
25081
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
25082
|
+
className: "pelcro-invoice-total"
|
|
25083
|
+
}, getFormattedPriceByLocal(invoice.total, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
|
|
25084
|
+
className: "pelcro-invoice-total"
|
|
25085
|
+
}, getFormattedPriceByLocal(invoice.amount_paid, invoice.currency, getPageOrDefaultLanguage())), /*#__PURE__*/React__default.createElement("p", {
|
|
25086
|
+
className: "plc-font-semibold pelcro-invoice-total"
|
|
25087
|
+
}, getFormattedPriceByLocal(invoice.amount_remaining, invoice.currency, getPageOrDefaultLanguage())))))), /*#__PURE__*/React__default.createElement("div", {
|
|
25088
|
+
className: "plc-flex plc-items-center plc-justify-center plc-mt-4"
|
|
25089
|
+
}, /*#__PURE__*/React__default.createElement(InvoiceDetailsDownloadButton, {
|
|
25090
|
+
url: invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf,
|
|
25091
|
+
className: "plc-w-full plc-text-center"
|
|
25092
|
+
}), showPayButton && /*#__PURE__*/React__default.createElement(InvoiceDetailsPayButton, {
|
|
25093
|
+
role: "submit",
|
|
25094
|
+
className: "plc-ml-4 plc-w-full",
|
|
25095
|
+
id: "pelcro-submit"
|
|
25096
|
+
})))));
|
|
25097
|
+
};
|
|
25098
|
+
|
|
25099
|
+
function canPayInvoice(invoice) {
|
|
25100
|
+
return (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "open" || (invoice === null || invoice === void 0 ? void 0 : invoice.status) === "past_due";
|
|
25101
|
+
}
|
|
25102
|
+
|
|
25103
|
+
const InvoiceDetailsModal = ({
|
|
25104
|
+
onDisplay,
|
|
25105
|
+
onClose,
|
|
25106
|
+
...otherProps
|
|
25107
|
+
}) => {
|
|
25108
|
+
const {
|
|
25109
|
+
switchToPaymentView
|
|
25110
|
+
} = usePelcro();
|
|
25111
|
+
|
|
25112
|
+
const onSuccess = () => {
|
|
25113
|
+
var _otherProps$onSuccess;
|
|
25114
|
+
|
|
25115
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
|
|
25116
|
+
switchToPaymentView();
|
|
25117
|
+
};
|
|
25118
|
+
|
|
25119
|
+
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
25120
|
+
onDisplay: onDisplay,
|
|
25121
|
+
onClose: onClose,
|
|
25122
|
+
id: "pelcro-invoice-details-modal"
|
|
25123
|
+
}, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(InvoiceDetailsView, Object.assign({}, otherProps, {
|
|
25124
|
+
onSuccess: onSuccess
|
|
25125
|
+
}))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
|
|
25126
|
+
};
|
|
25127
|
+
InvoiceDetailsModal.viewId = "invoice-details";
|
|
25128
|
+
|
|
25129
|
+
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 };
|