@pelcro/react-pelcro-js 3.9.4 → 3.10.0-beta.1

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 CHANGED
@@ -3806,7 +3806,8 @@ var meter_ko = {
3806
3806
 
3807
3807
  var messages$I = {
3808
3808
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3809
- bankRedirection: "Please hold, redirecting you to your bank."
3809
+ bankRedirection: "Please hold, redirecting you to your bank.",
3810
+ bankAuthenticationSuccess: "Please wait while we process your request."
3810
3811
  };
3811
3812
  var labels$F = {
3812
3813
  card: "Enter card number",
@@ -3836,7 +3837,8 @@ var checkoutForm_en = {
3836
3837
 
3837
3838
  var messages$H = {
3838
3839
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3839
- bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3840
+ bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque.",
3841
+ bankAuthenticationSuccess: "Veuillez patienter pendant que nous accédons à votre requête."
3840
3842
  };
3841
3843
  var labels$E = {
3842
3844
  card: "Entrez le numéro de carte",
@@ -3866,7 +3868,8 @@ var checkoutForm_fr = {
3866
3868
 
3867
3869
  var messages$G = {
3868
3870
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
3869
- bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다."
3871
+ bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다.",
3872
+ bankAuthenticationSuccess: "요청을 처리하는 동안 기다려 주십시오."
3870
3873
  };
3871
3874
  var labels$D = {
3872
3875
  card: "카드 번호 입력",
@@ -15516,6 +15519,7 @@ const PaymentMethodContainerWithoutStripe = ({
15516
15519
  if (data.message === "3DS-authentication-complete") {
15517
15520
  const tapID = data.tapID;
15518
15521
  toggleAuthenticationPendingView(false);
15522
+ toggleAuthenticationSuccessPendingView(true);
15519
15523
  window.removeEventListener("message", retrieveSourceInfoFromIframe);
15520
15524
  dispatch({
15521
15525
  type: SHOW_ALERT,
@@ -16793,6 +16797,8 @@ const PaymentMethodContainerWithoutStripe = ({
16793
16797
  const handlePaymentError = error => {
16794
16798
  var _getErrorMessages;
16795
16799
 
16800
+ toggleAuthenticationSuccessPendingView(false);
16801
+
16796
16802
  if (error.type === "validation_error" && // Subscription creation & renewal
16797
16803
  type === "createPayment") {
16798
16804
  var _state$couponObject;
@@ -16862,6 +16868,18 @@ const PaymentMethodContainerWithoutStripe = ({
16862
16868
  }
16863
16869
  };
16864
16870
 
16871
+ const toggleAuthenticationSuccessPendingView = show => {
16872
+ const cardAuthContainer = document.querySelector(".card-authentication-success-container");
16873
+
16874
+ if (show) {
16875
+ cardAuthContainer.classList.remove("plc-hidden");
16876
+ cardAuthContainer.classList.add("plc-flex");
16877
+ } else {
16878
+ cardAuthContainer.classList.add("plc-hidden");
16879
+ cardAuthContainer.classList.remove("plc-flex");
16880
+ }
16881
+ };
16882
+
16865
16883
  const injectCardAuthenticationIframe = source => {
16866
16884
  var _source$redirect;
16867
16885
 
@@ -17778,6 +17796,17 @@ const BankRedirection = () => {
17778
17796
  }));
17779
17797
  };
17780
17798
 
17799
+ const BankAuthenticationSuccess = () => {
17800
+ const {
17801
+ t
17802
+ } = useTranslation("checkoutForm");
17803
+ return /*#__PURE__*/React__default['default'].createElement("div", {
17804
+ className: "plc-absolute plc-inset-0 plc-flex-col plc-items-center plc-justify-center plc-hidden plc-text-lg plc-bg-white plc-z-max plc-text-primary-500 card-authentication-success-container"
17805
+ }, t("messages.bankAuthenticationSuccess"), /*#__PURE__*/React__default['default'].createElement(SvgSpinner, {
17806
+ className: "plc-w-10 plc-h-10 plc-mt-5 plc-animate-spin"
17807
+ }));
17808
+ };
17809
+
17781
17810
  var _path$l;
17782
17811
 
17783
17812
  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); }
@@ -17919,7 +17948,7 @@ function PaymentMethodView({
17919
17948
  onSuccess: onSuccess,
17920
17949
  onGiftRenewalSuccess: onGiftRenewalSuccess,
17921
17950
  onFailure: onFailure
17922
- }, /*#__PURE__*/React__default['default'].createElement(BankRedirection, null), /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
17951
+ }, /*#__PURE__*/React__default['default'].createElement(BankRedirection, null), /*#__PURE__*/React__default['default'].createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
17923
17952
  className: "plc-mb-2"
17924
17953
  }), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
17925
17954
  className: "plc-flex plc-items-start"
@@ -30847,6 +30876,7 @@ exports.AlertElement = Alert;
30847
30876
  exports.ApplyCouponButton = ApplyCouponButton;
30848
30877
  exports.Auth0LoginButton = Auth0LoginButton;
30849
30878
  exports.Badge = Badge;
30879
+ exports.BankAuthenticationSuccess = BankAuthenticationSuccess;
30850
30880
  exports.BankRedirection = BankRedirection;
30851
30881
  exports.Button = Button;
30852
30882
  exports.CartContainer = CartContainer;
package/dist/index.esm.js CHANGED
@@ -3776,7 +3776,8 @@ var meter_ko = {
3776
3776
 
3777
3777
  var messages$I = {
3778
3778
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3779
- bankRedirection: "Please hold, redirecting you to your bank."
3779
+ bankRedirection: "Please hold, redirecting you to your bank.",
3780
+ bankAuthenticationSuccess: "Please wait while we process your request."
3780
3781
  };
3781
3782
  var labels$F = {
3782
3783
  card: "Enter card number",
@@ -3806,7 +3807,8 @@ var checkoutForm_en = {
3806
3807
 
3807
3808
  var messages$H = {
3808
3809
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3809
- bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3810
+ bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque.",
3811
+ bankAuthenticationSuccess: "Veuillez patienter pendant que nous accédons à votre requête."
3810
3812
  };
3811
3813
  var labels$E = {
3812
3814
  card: "Entrez le numéro de carte",
@@ -3836,7 +3838,8 @@ var checkoutForm_fr = {
3836
3838
 
3837
3839
  var messages$G = {
3838
3840
  youAreSafe: "PCI 준수 128비트 SSL 인증서로 보호됩니다. 제공: ",
3839
- bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다."
3841
+ bankRedirection: "잠시만 기다려 주십시오. 결제 은행으로 연결 중입니다.",
3842
+ bankAuthenticationSuccess: "요청을 처리하는 동안 기다려 주십시오."
3840
3843
  };
3841
3844
  var labels$D = {
3842
3845
  card: "카드 번호 입력",
@@ -15486,6 +15489,7 @@ const PaymentMethodContainerWithoutStripe = ({
15486
15489
  if (data.message === "3DS-authentication-complete") {
15487
15490
  const tapID = data.tapID;
15488
15491
  toggleAuthenticationPendingView(false);
15492
+ toggleAuthenticationSuccessPendingView(true);
15489
15493
  window.removeEventListener("message", retrieveSourceInfoFromIframe);
15490
15494
  dispatch({
15491
15495
  type: SHOW_ALERT,
@@ -16763,6 +16767,8 @@ const PaymentMethodContainerWithoutStripe = ({
16763
16767
  const handlePaymentError = error => {
16764
16768
  var _getErrorMessages;
16765
16769
 
16770
+ toggleAuthenticationSuccessPendingView(false);
16771
+
16766
16772
  if (error.type === "validation_error" && // Subscription creation & renewal
16767
16773
  type === "createPayment") {
16768
16774
  var _state$couponObject;
@@ -16832,6 +16838,18 @@ const PaymentMethodContainerWithoutStripe = ({
16832
16838
  }
16833
16839
  };
16834
16840
 
16841
+ const toggleAuthenticationSuccessPendingView = show => {
16842
+ const cardAuthContainer = document.querySelector(".card-authentication-success-container");
16843
+
16844
+ if (show) {
16845
+ cardAuthContainer.classList.remove("plc-hidden");
16846
+ cardAuthContainer.classList.add("plc-flex");
16847
+ } else {
16848
+ cardAuthContainer.classList.add("plc-hidden");
16849
+ cardAuthContainer.classList.remove("plc-flex");
16850
+ }
16851
+ };
16852
+
16835
16853
  const injectCardAuthenticationIframe = source => {
16836
16854
  var _source$redirect;
16837
16855
 
@@ -17748,6 +17766,17 @@ const BankRedirection = () => {
17748
17766
  }));
17749
17767
  };
17750
17768
 
17769
+ const BankAuthenticationSuccess = () => {
17770
+ const {
17771
+ t
17772
+ } = useTranslation("checkoutForm");
17773
+ return /*#__PURE__*/React__default.createElement("div", {
17774
+ className: "plc-absolute plc-inset-0 plc-flex-col plc-items-center plc-justify-center plc-hidden plc-text-lg plc-bg-white plc-z-max plc-text-primary-500 card-authentication-success-container"
17775
+ }, t("messages.bankAuthenticationSuccess"), /*#__PURE__*/React__default.createElement(SvgSpinner, {
17776
+ className: "plc-w-10 plc-h-10 plc-mt-5 plc-animate-spin"
17777
+ }));
17778
+ };
17779
+
17751
17780
  var _path$l;
17752
17781
 
17753
17782
  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); }
@@ -17889,7 +17918,7 @@ function PaymentMethodView({
17889
17918
  onSuccess: onSuccess,
17890
17919
  onGiftRenewalSuccess: onGiftRenewalSuccess,
17891
17920
  onFailure: onFailure
17892
- }, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(AlertWithContext, {
17921
+ }, /*#__PURE__*/React__default.createElement(BankRedirection, null), /*#__PURE__*/React__default.createElement(BankAuthenticationSuccess, null), /*#__PURE__*/React__default.createElement(AlertWithContext, {
17893
17922
  className: "plc-mb-2"
17894
17923
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SelectedPaymentMethod, null), supportsTap && (!isUserFirstName || !isUserLastName || !isUserPhone) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
17895
17924
  className: "plc-flex plc-items-start"
@@ -30779,4 +30808,4 @@ const QrCodeModal = ({
30779
30808
  };
30780
30809
  QrCodeModal.viewId = "qrcode";
30781
30810
 
30782
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, 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, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
30811
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, 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, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, 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, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, 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, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.9.4",
4
+ "version": "3.10.0-beta.1",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",