rebill-web-components-sdk 1.8.34-beta.1 → 1.8.35
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/cjs/apm-checkout_19.cjs.entry.js +1 -1
- package/dist/cjs/card-identification_5.cjs.entry.js +1 -1
- package/dist/cjs/discount-coupon.rebill-divider.entry.cjs.js.map +1 -1
- package/dist/cjs/discount-coupon_2.cjs.entry.js +26 -7
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.cjs.js.map +1 -1
- package/dist/cjs/organization-logo_4.cjs.entry.js +1 -1
- package/dist/cjs/rebill-renewal.cjs.entry.js +2 -2
- package/dist/cjs/rebill-renewal.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-web-components-sdk.cjs.js +1 -1
- package/dist/cjs/renewal-success-page.renewal-summary.entry.cjs.js.map +1 -1
- package/dist/cjs/renewal-success-page_2.cjs.entry.js +25 -57
- package/dist/cjs/{renewal.store-BaH9Id4E.js → renewal.store-3JWhB1Pi.js} +3 -2
- package/dist/cjs/renewal.store-3JWhB1Pi.js.map +1 -0
- package/dist/collection/components/checkout/discount-coupon/discount-coupon.js +26 -7
- package/dist/collection/components/checkout/discount-coupon/discount-coupon.js.map +1 -1
- package/dist/collection/components/checkout/rebill-footer/rebill-footer.css +2 -1
- package/dist/collection/components/renewal/rebill-renewal.js +1 -1
- package/dist/collection/components/renewal/rebill-renewal.js.map +1 -1
- package/dist/collection/components/renewal/renewal-success-page/renewal-success-page.js +12 -34
- package/dist/collection/components/renewal/renewal-success-page/renewal-success-page.js.map +1 -1
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js +31 -22
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js.map +1 -1
- package/dist/collection/models/renewal.model.js.map +1 -1
- package/dist/collection/store/renewal.store.js +1 -0
- package/dist/collection/store/renewal.store.js.map +1 -1
- package/dist/components/card-fields-wrapper.js +1 -1
- package/dist/components/card-identification.js +1 -1
- package/dist/components/card-iframe.js +1 -1
- package/dist/components/discount-coupon.js +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-D6xIJNnb.js → p-BJUr_-ZO.js} +3 -3
- package/dist/components/{p-D6xIJNnb.js.map → p-BJUr_-ZO.js.map} +1 -1
- package/dist/components/{p-B-sufB9-.js → p-BSCSd_ch.js} +17 -39
- package/dist/components/p-BSCSd_ch.js.map +1 -0
- package/dist/components/{p-FjaOut9O.js → p-BZUoWYrL.js} +4 -4
- package/dist/components/{p-FjaOut9O.js.map → p-BZUoWYrL.js.map} +1 -1
- package/dist/components/{p-r2jtUw42.js → p-B_lR-4t9.js} +3 -3
- package/dist/components/{p-r2jtUw42.js.map → p-B_lR-4t9.js.map} +1 -1
- package/dist/components/{p-BY43VCzz.js → p-Bln3wBD6.js} +5 -5
- package/dist/components/{p-BY43VCzz.js.map → p-Bln3wBD6.js.map} +1 -1
- package/dist/components/{p-CtTqLwLn.js → p-D5TXI2Hb.js} +28 -9
- package/dist/components/p-D5TXI2Hb.js.map +1 -0
- package/dist/components/{p-dgrAtFYi.js → p-DDVDLDRI.js} +3 -3
- package/dist/components/{p-dgrAtFYi.js.map → p-DDVDLDRI.js.map} +1 -1
- package/dist/components/{p-B1lTVbgj.js → p-DPpE0kdy.js} +5 -5
- package/dist/components/{p-B1lTVbgj.js.map → p-DPpE0kdy.js.map} +1 -1
- package/dist/components/{p-BCu7Nkqb.js → p-DWIWSpMW.js} +3 -3
- package/dist/components/p-DWIWSpMW.js.map +1 -0
- package/dist/components/{p-Cnr-CyGT.js → p-Db7dntOn.js} +4 -4
- package/dist/components/{p-Cnr-CyGT.js.map → p-Db7dntOn.js.map} +1 -1
- package/dist/components/{p-rO7aLibt.js → p-VskO2WrV.js} +3 -3
- package/dist/components/{p-rO7aLibt.js.map → p-VskO2WrV.js.map} +1 -1
- package/dist/components/{p-hpg1lOUJ.js → p-b0Xc3sbS.js} +3 -2
- package/dist/components/p-b0Xc3sbS.js.map +1 -0
- package/dist/components/{p-DbfmzIIw.js → p-mqJmoJIO.js} +16 -25
- package/dist/components/p-mqJmoJIO.js.map +1 -0
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/rebill-checkout-single-column.js +1 -1
- package/dist/components/rebill-checkout.js +10 -10
- package/dist/components/rebill-footer.js +1 -1
- package/dist/components/rebill-processing-payment.js +1 -1
- package/dist/components/rebill-renewal.js +12 -12
- package/dist/components/rebill-renewal.js.map +1 -1
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/renewal-summary.js +1 -1
- package/dist/components/success-page.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +1 -1
- package/dist/esm/card-identification_5.entry.js +1 -1
- package/dist/esm/discount-coupon.rebill-divider.entry.js.map +1 -1
- package/dist/esm/discount-coupon_2.entry.js +26 -7
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.js.map +1 -1
- package/dist/esm/organization-logo_4.entry.js +1 -1
- package/dist/esm/rebill-renewal.entry.js +2 -2
- package/dist/esm/rebill-renewal.entry.js.map +1 -1
- package/dist/esm/rebill-web-components-sdk.js +1 -1
- package/dist/esm/renewal-success-page.renewal-summary.entry.js.map +1 -1
- package/dist/esm/renewal-success-page_2.entry.js +25 -57
- package/dist/esm/{renewal.store-vAxzxA8H.js → renewal.store-jTjLDpeh.js} +3 -2
- package/dist/esm/renewal.store-jTjLDpeh.js.map +1 -0
- package/dist/rebill-web-components-sdk/discount-coupon.rebill-divider.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-b75b53a8.entry.js → p-28d04513.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-80dcd17e.entry.js → p-392fb691.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-e242be38.entry.js → p-736d2bdc.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-736d2bdc.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-8bf5ce94.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-8bf5ce94.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-BOVs95c7.js +2 -0
- package/dist/rebill-web-components-sdk/p-BOVs95c7.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/p-bde8f6aa.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-bde8f6aa.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-e68db8f7.entry.js → p-d0636f82.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-e68db8f7.entry.js.map → p-d0636f82.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/rebill-renewal.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/dist/rebill-web-components-sdk/renewal-success-page.renewal-summary.entry.esm.js.map +1 -1
- package/dist/types/components/checkout/discount-coupon/discount-coupon.d.ts +1 -0
- package/dist/types/components/renewal/renewal-success-page/renewal-success-page.d.ts +1 -4
- package/dist/types/components/renewal/renewal-summary/renewal-summary.d.ts +1 -2
- package/dist/types/components.d.ts +2 -0
- package/dist/types/models/renewal.model.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/renewal.store-BaH9Id4E.js.map +0 -1
- package/dist/components/p-B-sufB9-.js.map +0 -1
- package/dist/components/p-BCu7Nkqb.js.map +0 -1
- package/dist/components/p-CtTqLwLn.js.map +0 -1
- package/dist/components/p-DbfmzIIw.js.map +0 -1
- package/dist/components/p-hpg1lOUJ.js.map +0 -1
- package/dist/esm/renewal.store-vAxzxA8H.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-1a748630.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-1a748630.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-5eda5359.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-5eda5359.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-e242be38.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-nVuaISVM.js +0 -2
- package/dist/rebill-web-components-sdk/p-nVuaISVM.js.map +0 -1
- /package/dist/rebill-web-components-sdk/{p-b75b53a8.entry.js.map → p-28d04513.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-80dcd17e.entry.js.map → p-392fb691.entry.js.map} +0 -0
|
@@ -17,6 +17,6 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy(JSON.parse("[[\"rebill-checkout\",[[256,\"rebill-checkout\",{\"productId\":[1,\"product-id\"],\"planId\":[1,\"plan-id\"],\"publicKey\":[1,\"public-key\"],\"instantProduct\":[1,\"instant-product\"],\"instantPlan\":[1,\"instant-plan\"],\"display\":[1],\"customerInformation\":[1,\"customer-information\"],\"oneClickCheckout\":[4,\"one-click-checkout\"],\"css\":[1],\"language\":[1],\"checkoutLandingSession\":[1,\"checkout-landing-session\"],\"externalPayment\":[1,\"external-payment\"],\"rejectedPaymentCard\":[32],\"rejectedPaymentAPM\":[32],\"countries\":[32],\"currentPaymentMethod\":[32],\"checkoutResponse\":[32],\"isSubmitting\":[32],\"isCardSubmitting\":[32],\"isCardSuccess\":[32],\"isAPMSubmitting\":[32],\"isAPMSuccess\":[32],\"storedCheckoutResults\":[32],\"alertErrorKeys\":[32],\"currentApmPaymentMethod\":[32],\"breakpoint\":[32],\"showRefreshModal\":[32],\"cardError\":[32],\"initialData\":[32],\"allRequiredFields\":[32],\"currentRequiredFields\":[32],\"customerExists\":[32],\"showOtp\":[32],\"otpVerified\":[32],\"responseCheckoutCard\":[32],\"cardMode\":[32],\"submit\":[64]},[[0,\"paymentMethodSelected\",\"handlePaymentMethodSelected\"],[0,\"input\",\"handleInputChange\"],[0,\"onRebillAccountClick\",\"handleRebillAccountClick\"],[0,\"returnForm\",\"handleReturnForm\"],[0,\"signOut\",\"handleSignOut\"],[0,\"codeVerified\",\"handleCodeVerified\"]],{\"language\":[\"handleLanguageChange\"]}]]],[\"rebill-renewal\",[[256,\"rebill-renewal\",{\"renewalData\":[1,\"renewal-data\"],\"renewalToken\":[1,\"renewal-token\"],\"currentPaymentMethod\":[32],\"isSubmitting\":[32],\"isCardSubmitting\":[32],\"isCardSuccess\":[32],\"errorMessage\":[32],\"breakpoint\":[32],\"errorPaymentCard\":[32],\"errorPaymentAPM\":[32],\"initialData\":[32],\"checkoutResponse\":[32],\"currentApmPaymentMethod\":[32],\"countries\":[32],\"allRequiredFields\":[32],\"currentRequiredFields\":[32],\"errorCardInvalid\":[32],\"cardMode\":[32]},[[0,\"paymentMethodSelected\",\"handlePaymentMethodSelected\"],[0,\"bankSelected\",\"handleBankSelected\"],[0,\"cardSelected\",\"handleCardSelected\"]]]]],[\"root-component\",[[256,\"root-component\",{\"isLoading\":[32],\"currentLang\":[32],\"formData\":[32]}]]],[\"rebill-card-carousel\",[[256,\"rebill-card-carousel\",{\"interval\":[2],\"size\":[1],\"color\":[1],\"showAllCards\":[4,\"show-all-cards\"],\"currentIndex\":[32]}]]],[\"rebill-flex-container\",[[260,\"rebill-flex-container\",{\"direction\":[1],\"wrap\":[1],\"gap\":[1],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"]}]]],[\"rebill-grid-container\",[[260,\"rebill-grid-container\",{\"columns\":[2],\"gap\":[1],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"]}]]],[\"renewal-success-page_2\",[[256,\"renewal-success-page\",{\"typePaymentMethod\":[1,\"type-payment-method\"],\"country\":[1],\"bank\":[1],\"paymentMethodName\":[1,\"payment-method-name\"],\"cardLastFour\":[1,\"card-last-four\"],\"paymentDate\":[1,\"payment-date\"],\"referenceNumber\":[1,\"reference-number\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"debitDay\":[2,\"debit-day\"],\"planAmount\":[2,\"plan-amount\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32],\"showRedirectMessage\":[32]}],[256,\"renewal-summary\",{\"displayedComponents\":[16],\"totalAmount\":[2,\"total-amount\"],\"subscriptionTitle\":[1,\"subscription-title\"],\"subscriptionAmount\":[2,\"subscription-amount\"],\"nextChargeDate\":[1,\"next-charge-date\"],\"frequency\":[16],\"currency\":[1],\"couponCode\":[1,\"coupon-code\"],\"discountAmount\":[2,\"discount-amount\"],\"discountPercentage\":[2,\"discount-percentage\"],\"forceUpdate\":[32]}]]],[\"input-otp\",[[256,\"input-otp\",{\"error\":[1],\"otp\":[1],\"clearable\":[4],\"placeholder\":[1],\"otpValue\":[32]}]]],[\"rebill-card\",[[256,\"rebill-card\",{\"cardTitle\":[1,\"card-title\"],\"cardLabels\":[16]}]]],[\"rebill-container_2\",[[260,\"rebill-container\",{\"maxWidth\":[1,\"max-width\"],\"padding\":[1],\"fluid\":[4]}],[256,\"rebill-input-checkbox\",{\"label\":[1],\"checked\":[1540],\"error\":[1],\"id\":[1],\"disabled\":[4]},[[4,\"change\",\"handleFormChange\"]]]]],[\"rebill-timeline-debit-day_2\",[[256,\"rebill-timeline-debit-day\",{\"debitDay\":[2,\"debit-day\"],\"totalAmount\":[2,\"total-amount\"],\"planAmount\":[2,\"plan-amount\"],\"currency\":[1],\"debitStrategy\":[1,\"debit-strategy\"],\"language\":[1],\"discountApplied\":[4,\"discount-applied\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"currentLanguage\":[32]}],[256,\"rebill-timeline-free-trial\",{\"trialPeriodEndsAt\":[1,\"trial-period-ends-at\"],\"trialPeriodEndsReminderAt\":[1,\"trial-period-ends-reminder-at\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"subtotal\":[2],\"currency\":[1],\"language\":[1],\"discountApplied\":[4,\"discount-applied\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"currentLanguage\":[32]}]]],[\"rebill-form\",[[260,\"rebill-form\",{\"validationSchema\":[8,\"validation-schema\"],\"initialData\":[16],\"renderForm\":[16],\"formData\":[32],\"errors\":[32],\"submitForm\":[64],\"resetValidation\":[64],\"clearError\":[64]},[[0,\"input\",\"handleInputChange\"],[0,\"blur\",\"handleBlur\"]],{\"initialData\":[\"handleInitialDataChange\"],\"validationSchema\":[\"handleValidationSchemaChange\"]}]]],[\"rebill-vertical-divider\",[[256,\"rebill-vertical-divider\",{\"height\":[1],\"color\":[1],\"thickness\":[1],\"dashed\":[4],\"connectorActive\":[4,\"connector-active\"],\"withDot\":[4,\"with-dot\"]}]]],[\"rebill-icon_2\",[[260,\"rebill-typography\",{\"variant\":[1],\"color\":[1],\"align\":[1],\"noWrap\":[4,\"no-wrap\"],\"gutterBottom\":[4,\"gutter-bottom\"],\"paragraph\":[4]}],[256,\"rebill-icon\",{\"name\":[1],\"size\":[1],\"color\":[1],\"svgContent\":[32]}]]],[\"collapsible-card\",[[260,\"collapsible-card\",{\"header\":[1],\"open\":[4],\"variant\":[1],\"isOpen\":[32]}]]],[\"discount-coupon_2\",[[256,\"discount-coupon\",{\"hideLabel\":[4,\"hide-label\"],\"displayMode\":[1,\"display-mode\"],\"readonlyCouponCode\":[1,\"readonly-coupon-code\"],\"readonlyDiscountAmount\":[2,\"readonly-discount-amount\"],\"readonlyCurrency\":[1,\"readonly-currency\"],\"couponCode\":[32],\"actionStatus\":[32],\"isLoading\":[32],\"isError\":[32],\"currentLocale\":[32]}],[256,\"rebill-divider\"]]],[\"rebill-alert\",[[256,\"rebill-alert\",{\"type\":[1],\"message\":[1],\"alertTitle\":[1,\"alert-title\"],\"icon\":[1],\"variant\":[1],\"size\":[1],\"colorIcon\":[1,\"color-icon\"]}]]],[\"rebill-input-text\",[[256,\"rebill-input-text\",{\"label\":[1],\"placeholder\":[1],\"value\":[1537],\"error\":[1],\"id\":[1],\"disabled\":[4],\"leftIcon\":[1,\"left-icon\"],\"rightIcon\":[1,\"right-icon\"],\"clearable\":[4],\"variant\":[1],\"uppercase\":[4],\"getInputElement\":[64]},[[4,\"change\",\"handleFormChange\"]]]]],[\"rebill-input-select\",[[256,\"rebill-input-select\",{\"label\":[1],\"options\":[16],\"value\":[1537],\"error\":[1],\"id\":[1],\"disabled\":[4],\"placeholder\":[1],\"variant\":[1],\"arrowIcon\":[1,\"arrow-icon\"],\"dropPosition\":[1,\"drop-position\"],\"fontSize\":[1,\"font-size\"],\"backgroundColor\":[1,\"background-color\"],\"searchable\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"loading\":[4],\"isOpen\":[32],\"componentId\":[32],\"highlightedIndex\":[32],\"searchTerm\":[32],\"filteredOptions\":[32],\"languageUpdateTrigger\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"rebill-button\",[[260,\"rebill-button\",{\"type\":[1],\"disabled\":[4],\"id\":[1],\"loading\":[4],\"showSpinnerWithText\":[4,\"show-spinner-with-text\"],\"nonClickable\":[4,\"non-clickable\"],\"variant\":[1],\"theme\":[1],\"size\":[1],\"icon\":[1],\"iconColor\":[1,\"icon-color\"]}]]],[\"organization-logo_4\",[[256,\"rebill-card-icon\",{\"cardBrand\":[1,\"card-brand\"],\"width\":[2],\"height\":[2]}],[260,\"rebill-checkout-single-column\"],[256,\"rebill-footer\",{\"breakpoint\":[32]}],[256,\"organization-logo\",{\"organization\":[16]}]]],[\"otp-component_7\",[[256,\"rebill-summary\",{\"totalAmount\":[8,\"total-amount\"],\"itemTitle\":[1,\"item-title\"],\"itemDescription\":[1,\"item-description\"],\"itemAmount\":[8,\"item-amount\"],\"planFrequency\":[1,\"plan-frequency\"],\"planFrequencyCount\":[2,\"plan-frequency-count\"],\"subtotal\":[8],\"discount\":[8],\"currency\":[1],\"displayedComponents\":[16],\"allowCoupon\":[4,\"allow-coupon\"],\"currentBreakpoint\":[1,\"current-breakpoint\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"discountApplied\":[32]},[[0,\"discountApplied\",\"handleDiscountApplied\"]]],[256,\"success-page\",{\"typePaymentMethod\":[1,\"type-payment-method\"],\"country\":[1],\"bank\":[1],\"paymentMethodName\":[1,\"payment-method-name\"],\"cardLastFour\":[1,\"card-last-four\"],\"paymentDate\":[1,\"payment-date\"],\"referenceNumber\":[1,\"reference-number\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"debitDay\":[2,\"debit-day\"],\"planAmount\":[2,\"plan-amount\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32],\"showRedirectMessage\":[32]}],[256,\"otp-component\",{\"timeLeft\":[32],\"isTimerRunning\":[32],\"codeResent\":[32],\"isVerifying\":[32],\"otpValue\":[32],\"error\":[32]}],[256,\"user-information\",{\"userInformation\":[16],\"errors\":[16],\"customerExists\":[4,\"customer-exists\"],\"disabled\":[4]},[[0,\"input\",\"handleInputChange\"],[0,\"blur\",\"handleBlur\"]]],[256,\"rebill-mode-sandbox\",{\"isPanelVisible\":[32],\"isPanelClosing\":[32],\"isCardsPanelVisible\":[32],\"isCardsPanelClosing\":[32],\"currentLanguage\":[32]}],[256,\"rebill-mode-sandbox-mobile\",{\"isPanelVisible\":[32],\"currentLanguage\":[32]}],[256,\"rebill-modal-overlay\",{\"visible\":[32],\"languageUpdateTrigger\":[32]}]]],[\"card-identification_5\",[[256,\"rebill-installments\",{\"error\":[1],\"currentValue\":[32],\"isDisabled\":[32],\"value\":[32],\"placeholder\":[32]}],[256,\"card-identification\",{\"documentTypeError\":[1,\"document-type-error\"],\"documentNumberError\":[1,\"document-number-error\"],\"disabled\":[4],\"documentTypes\":[32],\"country\":[32],\"currentLanguage\":[32]}],[256,\"card-iframe\",{\"customCSS\":[1,\"custom-c-s-s\"],\"iframeLoaded\":[32],\"currentLang\":[32],\"initialLang\":[32],\"iframeHeight\":[32]}],[256,\"rebill-input-combo\",{\"label\":[1],\"options\":[16],\"selectValue\":[1537,\"select-value\"],\"inputValue\":[1537,\"input-value\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"selectPlaceholder\":[1,\"select-placeholder\"],\"error\":[1],\"selectId\":[1,\"select-id\"],\"inputId\":[1,\"input-id\"],\"disabled\":[4],\"selectWidth\":[1,\"select-width\"],\"isOpen\":[32],\"highlightedIndex\":[32],\"componentId\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"]]],[256,\"card-skeleton\"]]],[\"apm-checkout_19\",[[256,\"payment-method-selector\",{\"enabledPaymentMethods\":[16],\"defaultSelected\":[1,\"default-selected\"],\"showErrorComponent\":[4,\"show-error-component\"],\"cardError\":[16],\"country\":[1],\"installmentsError\":[1,\"installments-error\"],\"documentTypeError\":[1,\"document-type-error\"],\"showDocument\":[4,\"show-document\"],\"documentNumberError\":[1,\"document-number-error\"],\"customCSS\":[1,\"custom-c-s-s\"],\"errorComponent\":[16],\"disabled\":[4],\"icon\":[32],\"selectedPaymentMethod\":[32],\"saveCard\":[32]},[[0,\"selectableCardClick\",\"handleSelectableCardClick\"]]],[256,\"apm-checkout\",{\"paymentMethod\":[1,\"payment-method\"],\"referenceId\":[1,\"reference-id\"],\"qrCodeData\":[1,\"qr-code-data\"],\"code\":[1],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"country\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"checkoutRequestId\":[1,\"checkout-request-id\"],\"bearerToken\":[1,\"bearer-token\"],\"bankTransferData\":[8,\"bank-transfer-data\"],\"showRedirectMessage\":[32],\"isPolling\":[32],\"minutesLeft\":[32],\"qrStartTime\":[32],\"downloadData\":[32]}],[256,\"rebill-processing-payment\",{\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32]}],[256,\"rebill-address\",{\"billingView\":[1537,\"billing-view\"],\"disabled\":[4],\"countryOptions\":[16],\"errors\":[16],\"currentBillingStateOptions\":[32],\"isLoadingAddress\":[32]}],[256,\"user-information-static\",{\"userInfo\":[16],\"variant\":[1]}],[256,\"payment-button\",{\"isDisabled\":[4,\"is-disabled\"],\"isLoading\":[4,\"is-loading\"],\"paymentMethod\":[1,\"payment-method\"],\"isRenewal\":[4,\"is-renewal\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"redirectUrl\":[4,\"redirect-url\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"country\":[1],\"currentLanguage\":[32],\"countdownSeconds\":[32],\"paymentMethodDisplayName\":[32]},null,{\"redirectUrl\":[\"onRedirectPropsChange\"],\"timeToRedirect\":[\"onRedirectPropsChange\"]}],[256,\"rebill-bank-selector\",{\"banks\":[16],\"defaultSelectedBankId\":[1,\"default-selected-bank-id\"],\"error\":[1],\"disabled\":[4],\"selectedBankId\":[32],\"languageUpdateTrigger\":[32]}],[256,\"user-information-phone\",{\"error\":[1],\"countryCode\":[1,\"country-code\"],\"disabled\":[4],\"languageUpdateTrigger\":[32]}],[256,\"rebill-checkout-form\",{\"validationSchema\":[8,\"validation-schema\"],\"initialData\":[16],\"renderForm\":[16],\"resetValidation\":[64]},[[0,\"change\",\"handleFormChange\"]]],[256,\"card-fields-wrapper\",{\"installmentsError\":[1,\"installments-error\"],\"documentTypeError\":[1,\"document-type-error\"],\"documentNumberError\":[1,\"document-number-error\"],\"showDocument\":[4,\"show-document\"],\"customCSS\":[1,\"custom-c-s-s\"]}],[256,\"bank-transfer\",{\"bankTransferData\":[8,\"bank-transfer-data\"]}],[256,\"qr-code\",{\"qrCodeData\":[1,\"qr-code-data\"],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"paymentMethod\":[1,\"payment-method\"],\"code\":[1],\"qrCodeSvg\":[32],\"isImage\":[32],\"timeLeft\":[32],\"formattedTime\":[32],\"hasCopied\":[32]}],[256,\"rebill-address-form\",{\"addressType\":[1,\"address-type\"],\"countryOptions\":[16],\"stateOptions\":[16],\"errors\":[16],\"disabled\":[4]}],[256,\"rebill-address-search\",{\"addressType\":[1,\"address-type\"],\"placeholder\":[1],\"error\":[1],\"disabled\":[4],\"isInitialized\":[32],\"currentLocale\":[32]}],[256,\"apm-download\",{\"data\":[16]}],[256,\"single-payment-method\",{\"paymentMethod\":[1,\"payment-method\"],\"currencyCountry\":[1,\"currency-country\"],\"paymentMethodDetails\":[16],\"icons\":[16]}],[256,\"rebill-input-phone\",{\"placeholder\":[1],\"value\":[1537],\"error\":[1],\"phoneNumberId\":[1,\"phone-number-id\"],\"countryCodeId\":[1,\"country-code-id\"],\"validationErrorId\":[1,\"validation-error-id\"],\"disabled\":[4],\"initialCountry\":[1,\"initial-country\"],\"required\":[4],\"searchable\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"selectedCountry\":[32],\"isDropdownOpen\":[32],\"validationError\":[32],\"searchTerm\":[32],\"filteredCountries\":[32],\"componentId\":[32],\"languageUpdateTrigger\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"]]],[256,\"reference-code\",{\"referenceId\":[1,\"reference-id\"],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"instructions\":[16],\"showInstructions\":[32]}],[260,\"selectable-card\",{\"selected\":[4],\"label\":[1],\"cardKey\":[1,\"card-key\"],\"disabled\":[4]}]]]]"), options);
|
|
20
|
+
return bootstrapLazy(JSON.parse("[[\"rebill-checkout\",[[256,\"rebill-checkout\",{\"productId\":[1,\"product-id\"],\"planId\":[1,\"plan-id\"],\"publicKey\":[1,\"public-key\"],\"instantProduct\":[1,\"instant-product\"],\"instantPlan\":[1,\"instant-plan\"],\"display\":[1],\"customerInformation\":[1,\"customer-information\"],\"oneClickCheckout\":[4,\"one-click-checkout\"],\"css\":[1],\"language\":[1],\"checkoutLandingSession\":[1,\"checkout-landing-session\"],\"externalPayment\":[1,\"external-payment\"],\"rejectedPaymentCard\":[32],\"rejectedPaymentAPM\":[32],\"countries\":[32],\"currentPaymentMethod\":[32],\"checkoutResponse\":[32],\"isSubmitting\":[32],\"isCardSubmitting\":[32],\"isCardSuccess\":[32],\"isAPMSubmitting\":[32],\"isAPMSuccess\":[32],\"storedCheckoutResults\":[32],\"alertErrorKeys\":[32],\"currentApmPaymentMethod\":[32],\"breakpoint\":[32],\"showRefreshModal\":[32],\"cardError\":[32],\"initialData\":[32],\"allRequiredFields\":[32],\"currentRequiredFields\":[32],\"customerExists\":[32],\"showOtp\":[32],\"otpVerified\":[32],\"responseCheckoutCard\":[32],\"cardMode\":[32],\"submit\":[64]},[[0,\"paymentMethodSelected\",\"handlePaymentMethodSelected\"],[0,\"input\",\"handleInputChange\"],[0,\"onRebillAccountClick\",\"handleRebillAccountClick\"],[0,\"returnForm\",\"handleReturnForm\"],[0,\"signOut\",\"handleSignOut\"],[0,\"codeVerified\",\"handleCodeVerified\"]],{\"language\":[\"handleLanguageChange\"]}]]],[\"rebill-renewal\",[[256,\"rebill-renewal\",{\"renewalData\":[1,\"renewal-data\"],\"renewalToken\":[1,\"renewal-token\"],\"currentPaymentMethod\":[32],\"isSubmitting\":[32],\"isCardSubmitting\":[32],\"isCardSuccess\":[32],\"errorMessage\":[32],\"breakpoint\":[32],\"errorPaymentCard\":[32],\"errorPaymentAPM\":[32],\"initialData\":[32],\"checkoutResponse\":[32],\"currentApmPaymentMethod\":[32],\"countries\":[32],\"allRequiredFields\":[32],\"currentRequiredFields\":[32],\"errorCardInvalid\":[32],\"cardMode\":[32]},[[0,\"paymentMethodSelected\",\"handlePaymentMethodSelected\"],[0,\"bankSelected\",\"handleBankSelected\"],[0,\"cardSelected\",\"handleCardSelected\"]]]]],[\"root-component\",[[256,\"root-component\",{\"isLoading\":[32],\"currentLang\":[32],\"formData\":[32]}]]],[\"rebill-card-carousel\",[[256,\"rebill-card-carousel\",{\"interval\":[2],\"size\":[1],\"color\":[1],\"showAllCards\":[4,\"show-all-cards\"],\"currentIndex\":[32]}]]],[\"rebill-flex-container\",[[260,\"rebill-flex-container\",{\"direction\":[1],\"wrap\":[1],\"gap\":[1],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"]}]]],[\"rebill-grid-container\",[[260,\"rebill-grid-container\",{\"columns\":[2],\"gap\":[1],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"]}]]],[\"renewal-success-page_2\",[[256,\"renewal-success-page\",{\"typePaymentMethod\":[1,\"type-payment-method\"],\"country\":[1],\"bank\":[1],\"paymentMethodName\":[1,\"payment-method-name\"],\"cardLastFour\":[1,\"card-last-four\"],\"paymentDate\":[1,\"payment-date\"],\"referenceNumber\":[1,\"reference-number\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"debitDay\":[2,\"debit-day\"],\"planAmount\":[2,\"plan-amount\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32],\"showRedirectMessage\":[32]}],[256,\"renewal-summary\",{\"displayedComponents\":[16],\"totalAmount\":[2,\"total-amount\"],\"subTotalAmount\":[2,\"sub-total-amount\"],\"subscriptionTitle\":[1,\"subscription-title\"],\"subscriptionAmount\":[2,\"subscription-amount\"],\"nextChargeDate\":[1,\"next-charge-date\"],\"frequency\":[16],\"currency\":[1],\"couponCode\":[1,\"coupon-code\"],\"discountAmount\":[2,\"discount-amount\"],\"discountPercentage\":[2,\"discount-percentage\"],\"forceUpdate\":[32]}]]],[\"input-otp\",[[256,\"input-otp\",{\"error\":[1],\"otp\":[1],\"clearable\":[4],\"placeholder\":[1],\"otpValue\":[32]}]]],[\"rebill-card\",[[256,\"rebill-card\",{\"cardTitle\":[1,\"card-title\"],\"cardLabels\":[16]}]]],[\"rebill-container_2\",[[260,\"rebill-container\",{\"maxWidth\":[1,\"max-width\"],\"padding\":[1],\"fluid\":[4]}],[256,\"rebill-input-checkbox\",{\"label\":[1],\"checked\":[1540],\"error\":[1],\"id\":[1],\"disabled\":[4]},[[4,\"change\",\"handleFormChange\"]]]]],[\"rebill-timeline-debit-day_2\",[[256,\"rebill-timeline-debit-day\",{\"debitDay\":[2,\"debit-day\"],\"totalAmount\":[2,\"total-amount\"],\"planAmount\":[2,\"plan-amount\"],\"currency\":[1],\"debitStrategy\":[1,\"debit-strategy\"],\"language\":[1],\"discountApplied\":[4,\"discount-applied\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"currentLanguage\":[32]}],[256,\"rebill-timeline-free-trial\",{\"trialPeriodEndsAt\":[1,\"trial-period-ends-at\"],\"trialPeriodEndsReminderAt\":[1,\"trial-period-ends-reminder-at\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"subtotal\":[2],\"currency\":[1],\"language\":[1],\"discountApplied\":[4,\"discount-applied\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"currentLanguage\":[32]}]]],[\"rebill-form\",[[260,\"rebill-form\",{\"validationSchema\":[8,\"validation-schema\"],\"initialData\":[16],\"renderForm\":[16],\"formData\":[32],\"errors\":[32],\"submitForm\":[64],\"resetValidation\":[64],\"clearError\":[64]},[[0,\"input\",\"handleInputChange\"],[0,\"blur\",\"handleBlur\"]],{\"initialData\":[\"handleInitialDataChange\"],\"validationSchema\":[\"handleValidationSchemaChange\"]}]]],[\"rebill-vertical-divider\",[[256,\"rebill-vertical-divider\",{\"height\":[1],\"color\":[1],\"thickness\":[1],\"dashed\":[4],\"connectorActive\":[4,\"connector-active\"],\"withDot\":[4,\"with-dot\"]}]]],[\"rebill-icon_2\",[[260,\"rebill-typography\",{\"variant\":[1],\"color\":[1],\"align\":[1],\"noWrap\":[4,\"no-wrap\"],\"gutterBottom\":[4,\"gutter-bottom\"],\"paragraph\":[4]}],[256,\"rebill-icon\",{\"name\":[1],\"size\":[1],\"color\":[1],\"svgContent\":[32]}]]],[\"collapsible-card\",[[260,\"collapsible-card\",{\"header\":[1],\"open\":[4],\"variant\":[1],\"isOpen\":[32]}]]],[\"discount-coupon_2\",[[256,\"discount-coupon\",{\"hideLabel\":[4,\"hide-label\"],\"displayMode\":[1,\"display-mode\"],\"readonlyCouponCode\":[1,\"readonly-coupon-code\"],\"readonlyDiscountAmount\":[2,\"readonly-discount-amount\"],\"readonlyCurrency\":[1,\"readonly-currency\"],\"couponCode\":[32],\"actionStatus\":[32],\"isLoading\":[32],\"isError\":[32],\"currentLocale\":[32]}],[256,\"rebill-divider\"]]],[\"rebill-alert\",[[256,\"rebill-alert\",{\"type\":[1],\"message\":[1],\"alertTitle\":[1,\"alert-title\"],\"icon\":[1],\"variant\":[1],\"size\":[1],\"colorIcon\":[1,\"color-icon\"]}]]],[\"rebill-input-text\",[[256,\"rebill-input-text\",{\"label\":[1],\"placeholder\":[1],\"value\":[1537],\"error\":[1],\"id\":[1],\"disabled\":[4],\"leftIcon\":[1,\"left-icon\"],\"rightIcon\":[1,\"right-icon\"],\"clearable\":[4],\"variant\":[1],\"uppercase\":[4],\"getInputElement\":[64]},[[4,\"change\",\"handleFormChange\"]]]]],[\"rebill-input-select\",[[256,\"rebill-input-select\",{\"label\":[1],\"options\":[16],\"value\":[1537],\"error\":[1],\"id\":[1],\"disabled\":[4],\"placeholder\":[1],\"variant\":[1],\"arrowIcon\":[1,\"arrow-icon\"],\"dropPosition\":[1,\"drop-position\"],\"fontSize\":[1,\"font-size\"],\"backgroundColor\":[1,\"background-color\"],\"searchable\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"loading\":[4],\"isOpen\":[32],\"componentId\":[32],\"highlightedIndex\":[32],\"searchTerm\":[32],\"filteredOptions\":[32],\"languageUpdateTrigger\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"],[0,\"keydown\",\"handleKeyDown\"]]]]],[\"rebill-button\",[[260,\"rebill-button\",{\"type\":[1],\"disabled\":[4],\"id\":[1],\"loading\":[4],\"showSpinnerWithText\":[4,\"show-spinner-with-text\"],\"nonClickable\":[4,\"non-clickable\"],\"variant\":[1],\"theme\":[1],\"size\":[1],\"icon\":[1],\"iconColor\":[1,\"icon-color\"]}]]],[\"organization-logo_4\",[[256,\"rebill-card-icon\",{\"cardBrand\":[1,\"card-brand\"],\"width\":[2],\"height\":[2]}],[260,\"rebill-checkout-single-column\"],[256,\"rebill-footer\",{\"breakpoint\":[32]}],[256,\"organization-logo\",{\"organization\":[16]}]]],[\"otp-component_7\",[[256,\"rebill-summary\",{\"totalAmount\":[8,\"total-amount\"],\"itemTitle\":[1,\"item-title\"],\"itemDescription\":[1,\"item-description\"],\"itemAmount\":[8,\"item-amount\"],\"planFrequency\":[1,\"plan-frequency\"],\"planFrequencyCount\":[2,\"plan-frequency-count\"],\"subtotal\":[8],\"discount\":[8],\"currency\":[1],\"displayedComponents\":[16],\"allowCoupon\":[4,\"allow-coupon\"],\"currentBreakpoint\":[1,\"current-breakpoint\"],\"discountType\":[1,\"discount-type\"],\"discountedPercentage\":[2,\"discounted-percentage\"],\"discountDuration\":[2,\"discount-duration\"],\"discountAmount\":[2,\"discount-amount\"],\"discountApplied\":[32]},[[0,\"discountApplied\",\"handleDiscountApplied\"]]],[256,\"success-page\",{\"typePaymentMethod\":[1,\"type-payment-method\"],\"country\":[1],\"bank\":[1],\"paymentMethodName\":[1,\"payment-method-name\"],\"cardLastFour\":[1,\"card-last-four\"],\"paymentDate\":[1,\"payment-date\"],\"referenceNumber\":[1,\"reference-number\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"debitDay\":[2,\"debit-day\"],\"planAmount\":[2,\"plan-amount\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32],\"showRedirectMessage\":[32]}],[256,\"otp-component\",{\"timeLeft\":[32],\"isTimerRunning\":[32],\"codeResent\":[32],\"isVerifying\":[32],\"otpValue\":[32],\"error\":[32]}],[256,\"user-information\",{\"userInformation\":[16],\"errors\":[16],\"customerExists\":[4,\"customer-exists\"],\"disabled\":[4]},[[0,\"input\",\"handleInputChange\"],[0,\"blur\",\"handleBlur\"]]],[256,\"rebill-mode-sandbox\",{\"isPanelVisible\":[32],\"isPanelClosing\":[32],\"isCardsPanelVisible\":[32],\"isCardsPanelClosing\":[32],\"currentLanguage\":[32]}],[256,\"rebill-mode-sandbox-mobile\",{\"isPanelVisible\":[32],\"currentLanguage\":[32]}],[256,\"rebill-modal-overlay\",{\"visible\":[32],\"languageUpdateTrigger\":[32]}]]],[\"card-identification_5\",[[256,\"rebill-installments\",{\"error\":[1],\"currentValue\":[32],\"isDisabled\":[32],\"value\":[32],\"placeholder\":[32]}],[256,\"card-identification\",{\"documentTypeError\":[1,\"document-type-error\"],\"documentNumberError\":[1,\"document-number-error\"],\"disabled\":[4],\"documentTypes\":[32],\"country\":[32],\"currentLanguage\":[32]}],[256,\"card-iframe\",{\"customCSS\":[1,\"custom-c-s-s\"],\"iframeLoaded\":[32],\"currentLang\":[32],\"initialLang\":[32],\"iframeHeight\":[32]}],[256,\"rebill-input-combo\",{\"label\":[1],\"options\":[16],\"selectValue\":[1537,\"select-value\"],\"inputValue\":[1537,\"input-value\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"selectPlaceholder\":[1,\"select-placeholder\"],\"error\":[1],\"selectId\":[1,\"select-id\"],\"inputId\":[1,\"input-id\"],\"disabled\":[4],\"selectWidth\":[1,\"select-width\"],\"isOpen\":[32],\"highlightedIndex\":[32],\"componentId\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"]]],[256,\"card-skeleton\"]]],[\"apm-checkout_19\",[[256,\"payment-method-selector\",{\"enabledPaymentMethods\":[16],\"defaultSelected\":[1,\"default-selected\"],\"showErrorComponent\":[4,\"show-error-component\"],\"cardError\":[16],\"country\":[1],\"installmentsError\":[1,\"installments-error\"],\"documentTypeError\":[1,\"document-type-error\"],\"showDocument\":[4,\"show-document\"],\"documentNumberError\":[1,\"document-number-error\"],\"customCSS\":[1,\"custom-c-s-s\"],\"errorComponent\":[16],\"disabled\":[4],\"icon\":[32],\"selectedPaymentMethod\":[32],\"saveCard\":[32]},[[0,\"selectableCardClick\",\"handleSelectableCardClick\"]]],[256,\"apm-checkout\",{\"paymentMethod\":[1,\"payment-method\"],\"referenceId\":[1,\"reference-id\"],\"qrCodeData\":[1,\"qr-code-data\"],\"code\":[1],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"country\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"checkoutRequestId\":[1,\"checkout-request-id\"],\"bearerToken\":[1,\"bearer-token\"],\"bankTransferData\":[8,\"bank-transfer-data\"],\"showRedirectMessage\":[32],\"isPolling\":[32],\"minutesLeft\":[32],\"qrStartTime\":[32],\"downloadData\":[32]}],[256,\"rebill-processing-payment\",{\"currentLocale\":[32],\"breakpoint\":[32],\"loaderProgress\":[32],\"isLoadingLottie\":[32]}],[256,\"rebill-address\",{\"billingView\":[1537,\"billing-view\"],\"disabled\":[4],\"countryOptions\":[16],\"errors\":[16],\"currentBillingStateOptions\":[32],\"isLoadingAddress\":[32]}],[256,\"user-information-static\",{\"userInfo\":[16],\"variant\":[1]}],[256,\"payment-button\",{\"isDisabled\":[4,\"is-disabled\"],\"isLoading\":[4,\"is-loading\"],\"paymentMethod\":[1,\"payment-method\"],\"isRenewal\":[4,\"is-renewal\"],\"trialPeriodDays\":[2,\"trial-period-days\"],\"redirectUrl\":[4,\"redirect-url\"],\"timeToRedirect\":[2,\"time-to-redirect\"],\"country\":[1],\"currentLanguage\":[32],\"countdownSeconds\":[32],\"paymentMethodDisplayName\":[32]},null,{\"redirectUrl\":[\"onRedirectPropsChange\"],\"timeToRedirect\":[\"onRedirectPropsChange\"]}],[256,\"rebill-bank-selector\",{\"banks\":[16],\"defaultSelectedBankId\":[1,\"default-selected-bank-id\"],\"error\":[1],\"disabled\":[4],\"selectedBankId\":[32],\"languageUpdateTrigger\":[32]}],[256,\"user-information-phone\",{\"error\":[1],\"countryCode\":[1,\"country-code\"],\"disabled\":[4],\"languageUpdateTrigger\":[32]}],[256,\"rebill-checkout-form\",{\"validationSchema\":[8,\"validation-schema\"],\"initialData\":[16],\"renderForm\":[16],\"resetValidation\":[64]},[[0,\"change\",\"handleFormChange\"]]],[256,\"card-fields-wrapper\",{\"installmentsError\":[1,\"installments-error\"],\"documentTypeError\":[1,\"document-type-error\"],\"documentNumberError\":[1,\"document-number-error\"],\"showDocument\":[4,\"show-document\"],\"customCSS\":[1,\"custom-c-s-s\"]}],[256,\"bank-transfer\",{\"bankTransferData\":[8,\"bank-transfer-data\"]}],[256,\"qr-code\",{\"qrCodeData\":[1,\"qr-code-data\"],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"paymentMethod\":[1,\"payment-method\"],\"code\":[1],\"qrCodeSvg\":[32],\"isImage\":[32],\"timeLeft\":[32],\"formattedTime\":[32],\"hasCopied\":[32]}],[256,\"rebill-address-form\",{\"addressType\":[1,\"address-type\"],\"countryOptions\":[16],\"stateOptions\":[16],\"errors\":[16],\"disabled\":[4]}],[256,\"rebill-address-search\",{\"addressType\":[1,\"address-type\"],\"placeholder\":[1],\"error\":[1],\"disabled\":[4],\"isInitialized\":[32],\"currentLocale\":[32]}],[256,\"apm-download\",{\"data\":[16]}],[256,\"single-payment-method\",{\"paymentMethod\":[1,\"payment-method\"],\"currencyCountry\":[1,\"currency-country\"],\"paymentMethodDetails\":[16],\"icons\":[16]}],[256,\"rebill-input-phone\",{\"placeholder\":[1],\"value\":[1537],\"error\":[1],\"phoneNumberId\":[1,\"phone-number-id\"],\"countryCodeId\":[1,\"country-code-id\"],\"validationErrorId\":[1,\"validation-error-id\"],\"disabled\":[4],\"initialCountry\":[1,\"initial-country\"],\"required\":[4],\"searchable\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"selectedCountry\":[32],\"isDropdownOpen\":[32],\"validationError\":[32],\"searchTerm\":[32],\"filteredCountries\":[32],\"componentId\":[32],\"languageUpdateTrigger\":[32]},[[4,\"change\",\"handleFormChange\"],[4,\"closeAllSelects\",\"handleCloseAllSelects\"],[4,\"click\",\"handleDocumentClick\"]]],[256,\"reference-code\",{\"referenceId\":[1,\"reference-id\"],\"providerName\":[1,\"provider-name\"],\"expirationDate\":[1,\"expiration-date\"],\"instructions\":[16],\"showInstructions\":[32]}],[260,\"selectable-card\",{\"selected\":[4],\"label\":[1],\"cardKey\":[1,\"card-key\"],\"disabled\":[4]}]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
//# sourceMappingURL=rebill-web-components-sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renewal-success-page.renewal-summary.entry.js","sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx","src/components/renewal/renewal-summary/renewal-summary.css?tag=renewal-summary","src/components/renewal/renewal-summary/renewal-summary.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: this.getFormattedSubtotal(),\n total: this.getFormattedTotal(),\n currency: (renewalState.data.price.currency as any) || ' ',\n discountAmount: this.getFormattedDiscountAmount(),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: this.getFormattedSubtotal(this.planAmount),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getDiscountAmountValue = () => {\n const discountAmount = Math.max(0, renewalState?.data?.price?.discountedAmount || 0);\n if (discountAmount > 0) {\n return discountAmount;\n }\n\n const discountPercentage = renewalState?.data?.price?.discountPercentage;\n if (discountPercentage && discountPercentage > 0) {\n const subtotal = renewalState?.data?.price?.amount || 0;\n return Math.max(0, (subtotal * discountPercentage) / 100);\n }\n\n return 0;\n };\n\n private hasDiscount = () => this.getDiscountAmountValue() > 0;\n\n private getFormattedDiscountAmount = () => {\n if (!this.hasDiscount()) {\n return undefined;\n }\n\n const formattedAmount = formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n );\n return `-${formattedAmount}`;\n };\n\n private getFormattedSubtotal = (planAmount?: number) => {\n const subtotal = planAmount ?? renewalState.data.price.amount ?? 0;\n return formatAmount(subtotal, renewalState.data.price.currency as any);\n };\n\n private getFormattedTotal = () => {\n if (this.trialPeriodDays > 0) {\n return formatAmount(0, renewalState.data.price.currency as any);\n }\n const subtotal = renewalState.data.price.amount || 0;\n const discount = this.getDiscountAmountValue();\n const total = Math.max(subtotal - discount, 0);\n return formatAmount(total, renewalState.data.price.currency as any);\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedSubtotal()}\n </rebill-typography>\n </div>\n {this.hasDiscount() && (\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('summary.discount')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedDiscountAmount()}\n </rebill-typography>\n </div>\n )}\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedTotal()}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n",".wrapper {\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.title {\n font-size: 1rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n text-align: center;\n}\n\n.amount {\n font-size: 2.25rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n margin: 0 0 1.5rem 0;\n text-align: center;\n line-height: 1.1;\n}\n\n.per {\n font-size: 1.1rem;\n font-weight: 400;\n color: var(--rebill-color-text-secondary);\n}\n\n.label-muted {\n font-size: 1rem;\n color: var(--rebill-color-primary-dark);\n margin: 0 0 1.5rem 0;\n text-align: center;\n}\n\n.info {\n width: 100%;\n margin-top: 1.5rem;\n margin-bottom: 3rem;\n display: flex;\n flex-direction: column;\n gap: 1.4rem;\n}\n\n.row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1rem;\n line-height: 1.4;\n width: 100%;\n}\n\n.left {\n color: var(--rebill-color-text-secondary);\n font-weight: 400;\n}\n\n.right {\n color: var(--rebill-color-primary-dark-text);\n font-weight: 400;\n text-align: right;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--rebill-color-border);\n margin: 1rem 0;\n}\n\n@media (max-width: 1024px) {\n .amount {\n margin-bottom: 0;\n }\n .row {\n font-size: 0.9rem;\n }\n .row:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n .left {\n color: var(--rebill-color-primary-dark-text);\n }\n}\n\n.total-row {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1.1rem;\n font-weight: 600;\n}\n\n.total-row .left {\n color: var(--rebill-color-primary-dark-text);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport i18n from '../../../i18n/i18n.config';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState } from '../../../store/session.store';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { formatDate as formatDateByLocale } from '../../../utils/date-formatter';\n\n@Component({\n tag: 'renewal-summary',\n styleUrl: 'renewal-summary.css',\n shadow: false,\n})\nexport class RenewalSummary {\n @State() private forceUpdate = 0;\n @Prop() displayedComponents: ('header' | 'details' | 'summary')[] = [\n 'header',\n 'details',\n 'summary',\n ];\n @Prop() totalAmount!: number;\n @Prop() subscriptionTitle!: string;\n @Prop() subscriptionAmount!: number;\n @Prop() nextChargeDate?: string;\n @Prop() frequency?: { count: number; period: string };\n @Prop() currency: string;\n @Prop() couponCode?: string;\n @Prop() discountAmount?: number;\n @Prop() discountPercentage?: number;\n\n componentWillLoad() {\n i18n.on('languageChanged', this.handleLanguageChange);\n }\n\n disconnectedCallback() {\n i18n.off('languageChanged', this.handleLanguageChange);\n }\n\n private handleLanguageChange = () => {\n this.forceUpdate = this.forceUpdate + 1;\n };\n\n private getFrequencyText(): string {\n if (!this.frequency || !this.frequency.period) return '';\n\n const period = this.frequency.period.toLowerCase();\n const count = this.frequency.count;\n\n const translationKey = `summary.${period}`;\n return I18nService.translate(translationKey, { count });\n }\n\n private getDiscountAmount(): number {\n const amountDiscount = Math.max(0, this.discountAmount);\n if (amountDiscount > 0) {\n return amountDiscount;\n }\n\n const percentage = this.discountPercentage;\n if (percentage && percentage > 0) {\n const base = this.totalAmount;\n const percentageDiscount = (base * percentage) / 100;\n return Math.max(0, percentageDiscount);\n }\n\n return 0;\n }\n\n private getFinalAmount(): number {\n const final = this.totalAmount - this.getDiscountAmount();\n return Math.max(0, final);\n }\n\n private hasDiscount(): boolean {\n return this.getDiscountAmount() > 0;\n }\n\n renderHeader = () => {\n return (\n <div class=\"header\">\n <p class=\"title\">{I18nService.translate('renewal.title')}</p>\n <p class=\"amount\">\n <span class=\"total-amount\">{formatAmount(this.getFinalAmount(), this.currency)}</span>{' '}\n <span class=\"per\">/ {this.getFrequencyText().toLowerCase()}</span>\n </p>\n </div>\n );\n };\n\n renderInfoRow = (label: string, value: string) => {\n return (\n <div class=\"row\">\n <div class=\"left\">{label}</div>\n <div class=\"right\">{value}</div>\n </div>\n );\n };\n\n renderProduct = () => {\n return this.renderInfoRow(\n this.subscriptionTitle,\n formatAmount(this.subscriptionAmount, this.currency),\n );\n };\n\n renderNextRenewal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.nextRenewal'),\n formatDateByLocale(this.nextChargeDate, undefined, sessionState.currentLocale),\n );\n };\n\n renderSubtotal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.subtotal'),\n formatAmount(this.totalAmount, this.currency),\n );\n };\n\n private renderDiscount = () => {\n if (!this.hasDiscount()) return null;\n return (\n <div class=\"row\">\n <div class=\"left\">{I18nService.translate('summary.discount')}</div>\n <div class=\"right discount-chip-wrapper\">\n <discount-coupon\n displayMode=\"readonly\"\n readonlyCouponCode={this.couponCode || undefined}\n readonlyDiscountAmount={this.getDiscountAmount()}\n readonlyCurrency={this.currency}\n />\n </div>\n </div>\n );\n };\n\n renderTotal = () => {\n return (\n <div class=\"total-row\">\n <div class=\"left\">{I18nService.translate('renewal.totalToRenew')}</div>\n <div class=\"right\">{formatAmount(this.getFinalAmount(), this.currency)}</div>\n </div>\n );\n };\n\n renderDesktop = () => {\n return (\n <div class=\"wrapper\">\n {this.renderHeader()}\n <div class=\"info\">\n <div class=\"row\">\n <div class=\"\">{I18nService.translate('renewal.subscriptionDetails')}</div>\n </div>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n </div>\n {this.renderTotal()}\n </div>\n );\n };\n\n render() {\n if (\n this.displayedComponents.includes('header') &&\n this.displayedComponents.includes('details') &&\n this.displayedComponents.includes('summary')\n ) {\n return this.renderDesktop();\n }\n if (this.displayedComponents.includes('header')) {\n return this.renderHeader();\n }\n if (this.displayedComponents.includes('details')) {\n return (\n <collapsible-card header={I18nService.translate('summary.details')}>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n </collapsible-card>\n );\n }\n if (this.displayedComponents.includes('summary')) {\n return (\n <collapsible-card header={I18nService.translate('summary.summary')}>\n {this.renderInfoRow(\n this.subscriptionTitle,\n '1 x ' + formatAmount(this.subscriptionAmount, this.currency),\n )}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n\n <rebill-divider />\n {this.renderInfoRow(\n I18nService.translate('renewal.totalToRenew'),\n formatAmount(this.getFinalAmount(), this.currency),\n )}\n </collapsible-card>\n );\n }\n }\n}\n"],"names":["i18n","formatDateByLocale","sessionState"],"mappings":";;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,GAAA,MAAA;;;;;AACrB,IAAA,iBAAiB,GAAwB,mBAAmB,CAAC,IAAI;IACjE,OAAO,GAAY,EAAE;IACrB,IAAI,GAAY,EAAE;IAClB,iBAAiB,GAAY,EAAE;IAC/B,YAAY,GAAY,EAAE;IAC1B,WAAW,GAAW,EAAE;IACxB,eAAe,GAAW,EAAE;IAC5B,eAAe,GAAY,CAAC;IAC5B,QAAQ,GAAY,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AAI,CAAC,QAAQ,CAAC,CACnD,CACgB;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"renewal-success-page.renewal-summary.entry.js","sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx","src/components/renewal/renewal-summary/renewal-summary.css?tag=renewal-summary","src/components/renewal/renewal-summary/renewal-summary.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n ),\n total: formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n ),\n currency: (renewalState.data.price.currency as any) || ' ',\n ...(this.getDiscountAmountValue() > 0 && {\n discountAmount: formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n ),\n }),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: formatAmount(this.planAmount, renewalState.data.price.currency as any),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getDiscountAmountValue = () => {\n if (renewalState?.data?.price?.amount < renewalState?.data?.subscription?.subTotalAmount) {\n return renewalState?.data?.subscription?.subTotalAmount - renewalState?.data?.price?.amount;\n }\n return 0;\n };\n\n hasDiscount = () => {\n return this.getDiscountAmountValue() > 0;\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.subscription.subTotalAmount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n {this.hasDiscount() && (\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('summary.discount')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n this.getDiscountAmountValue(),\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n )}\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatAmount(\n renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n )}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n",".wrapper {\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.title {\n font-size: 1rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n text-align: center;\n}\n\n.amount {\n font-size: 2.25rem;\n font-weight: 500;\n color: var(--rebill-color-primary-dark-text);\n margin: 0 0 1.5rem 0;\n text-align: center;\n line-height: 1.1;\n}\n\n.per {\n font-size: 1.1rem;\n font-weight: 400;\n color: var(--rebill-color-text-secondary);\n}\n\n.label-muted {\n font-size: 1rem;\n color: var(--rebill-color-primary-dark);\n margin: 0 0 1.5rem 0;\n text-align: center;\n}\n\n.info {\n width: 100%;\n margin-top: 1.5rem;\n margin-bottom: 3rem;\n display: flex;\n flex-direction: column;\n gap: 1.4rem;\n}\n\n.row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1rem;\n line-height: 1.4;\n width: 100%;\n}\n\n.left {\n color: var(--rebill-color-text-secondary);\n font-weight: 400;\n}\n\n.right {\n color: var(--rebill-color-primary-dark-text);\n font-weight: 400;\n text-align: right;\n}\n\n.divider {\n border: none;\n border-top: 1px solid var(--rebill-color-border);\n margin: 1rem 0;\n}\n\n@media (max-width: 1024px) {\n .amount {\n margin-bottom: 0;\n }\n .row {\n font-size: 0.9rem;\n }\n .row:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n .left {\n color: var(--rebill-color-primary-dark-text);\n }\n}\n\n.total-row {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 1.1rem;\n font-weight: 600;\n}\n\n.total-row .left {\n color: var(--rebill-color-primary-dark-text);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport i18n from '../../../i18n/i18n.config';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState } from '../../../store/session.store';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { formatDate as formatDateByLocale } from '../../../utils/date-formatter';\n\n@Component({\n tag: 'renewal-summary',\n styleUrl: 'renewal-summary.css',\n shadow: false,\n})\nexport class RenewalSummary {\n @State() private forceUpdate = 0;\n @Prop() displayedComponents: ('header' | 'details' | 'summary')[] = [\n 'header',\n 'details',\n 'summary',\n ];\n @Prop() totalAmount!: number;\n @Prop() subTotalAmount!: number;\n @Prop() subscriptionTitle!: string;\n @Prop() subscriptionAmount!: number;\n @Prop() nextChargeDate?: string;\n @Prop() frequency?: { count: number; period: string };\n @Prop() currency: string;\n @Prop() couponCode?: string;\n @Prop() discountAmount?: number;\n @Prop() discountPercentage?: number;\n\n componentWillLoad() {\n i18n.on('languageChanged', this.handleLanguageChange);\n }\n\n disconnectedCallback() {\n i18n.off('languageChanged', this.handleLanguageChange);\n }\n\n private handleLanguageChange = () => {\n this.forceUpdate = this.forceUpdate + 1;\n };\n\n private getFrequencyText(): string {\n if (!this.frequency || !this.frequency.period) return '';\n\n const period = this.frequency.period.toLowerCase();\n const count = this.frequency.count;\n\n const translationKey = `summary.${period}`;\n return I18nService.translate(translationKey, { count });\n }\n\n private getDiscountAmount(): number {\n if (this.totalAmount < this.subTotalAmount) {\n console.log('this.subTotalAmount', this.subTotalAmount);\n console.log('this.totalAmount', this.totalAmount);\n console.log('this.discountAmount', this.subTotalAmount - this.totalAmount);\n return this.subTotalAmount - this.totalAmount;\n }\n\n return this.discountAmount || 0;\n }\n\n renderHeader = () => {\n return (\n <div class=\"header\">\n <p class=\"title\">{I18nService.translate('renewal.title')}</p>\n <p class=\"amount\">\n <span class=\"total-amount\">{formatAmount(this.totalAmount, this.currency)}</span>{' '}\n <span class=\"per\">/ {this.getFrequencyText().toLowerCase()}</span>\n </p>\n </div>\n );\n };\n\n renderInfoRow = (label: string, value: string) => {\n return (\n <div class=\"row\">\n <div class=\"left\">{label}</div>\n <div class=\"right\">{value}</div>\n </div>\n );\n };\n\n renderProduct = () => {\n return this.renderInfoRow(\n this.subscriptionTitle,\n formatAmount(this.subscriptionAmount, this.currency),\n );\n };\n\n renderNextRenewal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.nextRenewal'),\n formatDateByLocale(this.nextChargeDate, undefined, sessionState.currentLocale),\n );\n };\n\n renderSubtotal = () => {\n return this.renderInfoRow(\n I18nService.translate('renewal.subtotal'),\n formatAmount(this.subTotalAmount, this.currency),\n );\n };\n\n private renderDiscount = () => {\n if (this.getDiscountAmount() <= 0) return null;\n return (\n <div class=\"row\">\n <div class=\"left\">{I18nService.translate('summary.discount')}</div>\n <div class=\"right discount-chip-wrapper\">\n <discount-coupon\n displayMode=\"readonly\"\n readonlyCouponCode={this.couponCode || undefined}\n readonlyDiscountAmount={this.getDiscountAmount()}\n readonlyCurrency={this.currency}\n />\n </div>\n </div>\n );\n };\n\n renderTotal = () => {\n return (\n <div class=\"total-row\">\n <div class=\"left\">{I18nService.translate('renewal.totalToRenew')}</div>\n <div class=\"right\">{formatAmount(this.totalAmount, this.currency)}</div>\n </div>\n );\n };\n\n renderDesktop = () => {\n return (\n <div class=\"wrapper\">\n {this.renderHeader()}\n <div class=\"info\">\n <div class=\"row\">\n <div class=\"\">{I18nService.translate('renewal.subscriptionDetails')}</div>\n </div>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n </div>\n\n {this.renderTotal()}\n </div>\n );\n };\n\n render() {\n if (\n this.displayedComponents.includes('header') &&\n this.displayedComponents.includes('details') &&\n this.displayedComponents.includes('summary')\n ) {\n return this.renderDesktop();\n }\n if (this.displayedComponents.includes('header')) {\n return this.renderHeader();\n }\n if (this.displayedComponents.includes('details')) {\n return (\n <collapsible-card header={I18nService.translate('summary.details')}>\n {this.renderProduct()}\n {this.renderNextRenewal()}\n </collapsible-card>\n );\n }\n if (this.displayedComponents.includes('summary')) {\n return (\n <collapsible-card header={I18nService.translate('summary.summary')}>\n {this.renderInfoRow(\n this.subscriptionTitle,\n '1 x ' + formatAmount(this.subscriptionAmount, this.currency),\n )}\n {this.renderSubtotal()}\n {this.renderDiscount()}\n\n <rebill-divider />\n {this.renderInfoRow(\n I18nService.translate('renewal.totalToRenew'),\n formatAmount(this.totalAmount, this.currency),\n )}\n </collapsible-card>\n );\n }\n }\n}\n"],"names":["i18n","formatDateByLocale","sessionState"],"mappings":";;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,GAAA,MAAA;;;;;AACrB,IAAA,iBAAiB,GAAwB,mBAAmB,CAAC,IAAI;IACjE,OAAO,GAAY,EAAE;IACrB,IAAI,GAAY,EAAE;IAClB,iBAAiB,GAAY,EAAE;IAC/B,YAAY,GAAY,EAAE;IAC1B,WAAW,GAAW,EAAE;IACxB,eAAe,GAAW,EAAE;IAC5B,eAAe,GAAY,CAAC;IAC5B,QAAQ,GAAY,CAAC;IACrB,UAAU,GAAY,CAAC;IACtB,aAAa,GAAW,IAAI;AAC5B,IAAA,UAAU,GAAoB,eAAe,CAAC,OAAO;AAErD,IAAA,eAAe;IACf,cAAc,GAAW,CAAC;IAC1B,eAAe,GAAY,IAAI;IAC/B,mBAAmB,GAAY,KAAK;IACrC,cAAc,GAAW,IAAI;AAC7B,IAAA,gBAAgB;AAChB,IAAA,eAAe;AACf,IAA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,CAC9C,CACgB;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, d as getAssetPath, h } from './index-D8cwEAmw.js';
|
|
2
2
|
import { P as PAYMENT_METHOD_ENUM, I as I18nService, f as formatAmount, e as instance, s as state } from './i18n.service-D2TBhbJY.js';
|
|
3
|
-
import { r as renewalState } from './renewal.store-
|
|
3
|
+
import { r as renewalState } from './renewal.store-jTjLDpeh.js';
|
|
4
4
|
import { B as BREAKPOINT_ENUM, g as getBreakpoint, i as isBreakpointBelow } from './breakpoint-Do_vNuMa.js';
|
|
5
5
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
6
6
|
import { g as getCountryPaymentMethods, P as PDFGenerator } from './pdf-generator-C-r7lzNo.js';
|
|
@@ -167,13 +167,15 @@ const RenewalSuccessPage = class {
|
|
|
167
167
|
email: renewalState.data.subscription.customerEmail || '',
|
|
168
168
|
referenceNumber: this.referenceNumber,
|
|
169
169
|
productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',
|
|
170
|
-
subtotal:
|
|
171
|
-
total:
|
|
170
|
+
subtotal: formatAmount(renewalState.data.subscription.subTotalAmount, renewalState.data.price.currency),
|
|
171
|
+
total: formatAmount(renewalState.data.price.amount, renewalState.data.price.currency),
|
|
172
172
|
currency: renewalState.data.price.currency || ' ',
|
|
173
|
-
|
|
173
|
+
...(this.getDiscountAmountValue() > 0 && {
|
|
174
|
+
discountAmount: formatAmount(this.getDiscountAmountValue(), renewalState.data.price.currency),
|
|
175
|
+
}),
|
|
174
176
|
trialPeriodDays: this.trialPeriodDays,
|
|
175
177
|
debitDay: this.debitDay,
|
|
176
|
-
planAmount:
|
|
178
|
+
planAmount: formatAmount(this.planAmount, renewalState.data.price.currency),
|
|
177
179
|
isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,
|
|
178
180
|
});
|
|
179
181
|
}
|
|
@@ -182,37 +184,13 @@ const RenewalSuccessPage = class {
|
|
|
182
184
|
}
|
|
183
185
|
};
|
|
184
186
|
getDiscountAmountValue = () => {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return discountAmount;
|
|
188
|
-
}
|
|
189
|
-
const discountPercentage = renewalState?.data?.price?.discountPercentage;
|
|
190
|
-
if (discountPercentage && discountPercentage > 0) {
|
|
191
|
-
const subtotal = renewalState?.data?.price?.amount || 0;
|
|
192
|
-
return Math.max(0, (subtotal * discountPercentage) / 100);
|
|
187
|
+
if (renewalState?.data?.price?.amount < renewalState?.data?.subscription?.subTotalAmount) {
|
|
188
|
+
return renewalState?.data?.subscription?.subTotalAmount - renewalState?.data?.price?.amount;
|
|
193
189
|
}
|
|
194
190
|
return 0;
|
|
195
191
|
};
|
|
196
|
-
hasDiscount = () =>
|
|
197
|
-
|
|
198
|
-
if (!this.hasDiscount()) {
|
|
199
|
-
return undefined;
|
|
200
|
-
}
|
|
201
|
-
const formattedAmount = formatAmount(this.getDiscountAmountValue(), renewalState.data.price.currency);
|
|
202
|
-
return `-${formattedAmount}`;
|
|
203
|
-
};
|
|
204
|
-
getFormattedSubtotal = (planAmount) => {
|
|
205
|
-
const subtotal = planAmount ?? renewalState.data.price.amount ?? 0;
|
|
206
|
-
return formatAmount(subtotal, renewalState.data.price.currency);
|
|
207
|
-
};
|
|
208
|
-
getFormattedTotal = () => {
|
|
209
|
-
if (this.trialPeriodDays > 0) {
|
|
210
|
-
return formatAmount(0, renewalState.data.price.currency);
|
|
211
|
-
}
|
|
212
|
-
const subtotal = renewalState.data.price.amount || 0;
|
|
213
|
-
const discount = this.getDiscountAmountValue();
|
|
214
|
-
const total = Math.max(subtotal - discount, 0);
|
|
215
|
-
return formatAmount(total, renewalState.data.price.currency);
|
|
192
|
+
hasDiscount = () => {
|
|
193
|
+
return this.getDiscountAmountValue() > 0;
|
|
216
194
|
};
|
|
217
195
|
textPaymentMethodCard = () => {
|
|
218
196
|
const cardBrand = renewalState.data?.cardInformation?.brand;
|
|
@@ -221,9 +199,9 @@ const RenewalSuccessPage = class {
|
|
|
221
199
|
return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;
|
|
222
200
|
};
|
|
223
201
|
render() {
|
|
224
|
-
return (h("rebill-checkout-single-column", { key: '
|
|
202
|
+
return (h("rebill-checkout-single-column", { key: 'cb90cb24d93fb4245e4eaf3cdeeab4e278b2c546' }, h("div", { key: '20e031f6307df3ffeceb32ff4bf1337ac54ad098', class: "renewal-success-page__success-content" }, h("rebill-typography", { key: '199431628bf2461d82397f04146f5f830d5ed88f', variant: "h3", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.successTitle')), h("div", { key: '761a4e40d5b1653a3cd3e9b667027025b19dacf0', class: "renewal-success-page__success-icon" }, h("svg", { key: '35c1f8a00382da91c35813c086a13236ef64d150', width: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96', height: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96', viewBox: "0 0 96 96", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'eba561010f527546317c5a5368364e3b7d88a8d8', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z", fill: "#35B093" }))), h("div", { key: '82ac13c8d26f7ac58c28e8b49518abe140749561', class: "renewal-success-page__info-card" }, h("div", { key: '0b1c283d679bf968265a23b67fd8821c9a1a57db', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: 'ca1a8d98b07b2a681cf630f09d047a0c60063be6', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentMethod')), h("div", { key: '4449bcb86cddf6316f570bad14b240f3e328ae99', class: "renewal-success-page__card-value" }, h("div", { key: '4858d10857b00244122145864cc92906abdcd24a', class: "renewal-success-page__payment-method-display" }, this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (h(h.Fragment, null, h("rebill-card-icon", { key: 'b64cfc5c69e3c0627f361650f039e06329c9004e', "card-brand": renewalState.data?.cardInformation?.brand || '' }), h("rebill-typography", { key: '7ef5fc2219158df995dfbcab3ecd35291ce6d1eb', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, this.textPaymentMethodCard()))), this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (h("div", { key: '9759c64a9ca925f6ad3ebe5be536451a2e7b8e9c', style: { display: 'flex', alignItems: 'center', gap: '8px' } }, h("div", { key: '9b8b9987a82403e24f355fd68ca625d5ac6be0d0', style: { display: 'flex', alignItems: 'center', gap: '8px' } }, this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(iconName => {
|
|
225
203
|
return h("rebill-icon", { name: iconName, size: "24px" });
|
|
226
|
-
})), h("rebill-typography", { key: '
|
|
204
|
+
})), h("rebill-typography", { key: 'b830a51f477da38f4fad6d861d56d8473eedc1e0', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('paymentMethods.bank_transfer'))))))), h("div", { key: '9f336dc44b09b227dca8d55f7543af8d6965340e', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '54487e54a1d044044748d39e838f0bcedc1806db', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentDate')), h("rebill-typography", { key: 'f90cb87eaad022c8e4e8a7fd50b6efc98e96e5fb', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, formatDateTime(this.paymentDate || this.getPaymentDate()) || '')), h("div", { key: '4f5dd152b68e4bf8f09929fc459204c9c9316c7d', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '977d12ffd4f81822f16e040f36380354569a38ee', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentEmail')), h("rebill-typography", { key: '62e10631ec66d641f7c2a2e18aecd583d14d51d1', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, renewalState.data.subscription.customerEmail)), h("div", { key: 'ef143339c11f42d47d5c29dcb77f432a6ab522ab', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: 'd7f341310f59a3f15a112cdcd393f60dd762f742', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentReference')), h("rebill-typography", { key: '06c82cbdede33d774212a283229e51a27de9526f', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT, class: "renewal-success-page__reference-number" }, this.referenceNumber || ''))), h("div", { key: '6e1dc249302831b6d86174d69c766d4149e532d0', class: "renewal-success-page__info-card" }, h("rebill-typography", { key: 'b9c21efa101829c13f8cc13518c55769fdf2f210', variant: "subtitle-bold", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.purchaseDetails')), h("div", { key: '28d67a7e5b44c05d5c4d795c0293c841ee5b220f', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '907bb77f52600cff2d1cfd9cc66653d5a62f1d8a', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseDetail')), h("rebill-typography", { key: 'ae917b6621a7e550793f363f64854cccc9c676c5', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, renewalState.data.subscription.name[0]?.text || 'Subscription')), h("div", { key: '5aee63e2757c447c31a554563bc3bfe4442e9727', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: 'dfd32d9e61e6671ae0ccd7204efc0dc957ce6f5f', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseSubtotal')), h("rebill-typography", { key: '60d4e2c5d2a9907c7676692f123b9ac809726636', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, formatAmount(renewalState.data.subscription.subTotalAmount, renewalState.data.price.currency))), this.hasDiscount() && (h("div", { key: 'c2b4d3539da9811e82e14f00e40995813642e281', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '4cc407db9e8654592ac8961793ac16c5c8bdc650', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('summary.discount')), h("rebill-typography", { key: '8767ff24390fd66f61a3007ec5c89b23f4d15708', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, formatAmount(this.getDiscountAmountValue(), renewalState.data.price.currency)))), h("div", { key: '6f58d05abb853a328a91bfb773f2efbb46ddf766', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '1b07af9baa275addf2270e9ebb652021ba3af2ad', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseMontoTotal')), h("div", { key: '01c846178f5a87baf3cebe47f373e93b415fd9fb', class: "renewal-success-page__total-amount-container" }, h("rebill-typography", { key: '570f795573812b983aacd716fc95892c16ddb66f', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, formatAmount(renewalState.data.price.amount, renewalState.data.price.currency)))), h("div", { key: '101e06be84246481dd7fb120b4e64df6656382e7', class: "renewal-success-page__card-divider" }), h("div", { key: 'bad8e69d95ee7befdb613246328ff6ef9556cf9d', class: "renewal-success-page__download-container" }, h("svg", { key: '97b4a2ac69de811ce0881b577cd0c3bc39e13c14', class: "download-icon", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '31afab13c012655e05413f5cf15d2545b3ac835e', d: "M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" })), h("rebill-button", { key: '335a6328a75c0474ff6983bc0c3be5f8fdd62033', type: "button", variant: "download", size: "small", onClick: this.handleDownloadReceipt }, h("rebill-typography", { key: '9d5427cb68781fe7b8202639ea9ef8f0fc13c6ed', variant: "overline", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.download')))), h("div", { key: '1fba619b28bac4f85e2f00a7a227c91a4352f9b7', class: "renewal-success-page__contact-info" }, h("rebill-typography", { key: '942aee63c06bc040ea304545ddf0dfc64235102a', variant: "information-text", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.downloadDescription')))))));
|
|
227
205
|
}
|
|
228
206
|
};
|
|
229
207
|
RenewalSuccessPage.style = renewalSuccessPageCss;
|
|
@@ -241,6 +219,7 @@ const RenewalSummary = class {
|
|
|
241
219
|
'summary',
|
|
242
220
|
];
|
|
243
221
|
totalAmount;
|
|
222
|
+
subTotalAmount;
|
|
244
223
|
subscriptionTitle;
|
|
245
224
|
subscriptionAmount;
|
|
246
225
|
nextChargeDate;
|
|
@@ -267,27 +246,16 @@ const RenewalSummary = class {
|
|
|
267
246
|
return I18nService.translate(translationKey, { count });
|
|
268
247
|
}
|
|
269
248
|
getDiscountAmount() {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
if (percentage && percentage > 0) {
|
|
276
|
-
const base = this.totalAmount;
|
|
277
|
-
const percentageDiscount = (base * percentage) / 100;
|
|
278
|
-
return Math.max(0, percentageDiscount);
|
|
249
|
+
if (this.totalAmount < this.subTotalAmount) {
|
|
250
|
+
console.log('this.subTotalAmount', this.subTotalAmount);
|
|
251
|
+
console.log('this.totalAmount', this.totalAmount);
|
|
252
|
+
console.log('this.discountAmount', this.subTotalAmount - this.totalAmount);
|
|
253
|
+
return this.subTotalAmount - this.totalAmount;
|
|
279
254
|
}
|
|
280
|
-
return 0;
|
|
281
|
-
}
|
|
282
|
-
getFinalAmount() {
|
|
283
|
-
const final = this.totalAmount - this.getDiscountAmount();
|
|
284
|
-
return Math.max(0, final);
|
|
285
|
-
}
|
|
286
|
-
hasDiscount() {
|
|
287
|
-
return this.getDiscountAmount() > 0;
|
|
255
|
+
return this.discountAmount || 0;
|
|
288
256
|
}
|
|
289
257
|
renderHeader = () => {
|
|
290
|
-
return (h("div", { class: "header" }, h("p", { class: "title" }, I18nService.translate('renewal.title')), h("p", { class: "amount" }, h("span", { class: "total-amount" }, formatAmount(this.
|
|
258
|
+
return (h("div", { class: "header" }, h("p", { class: "title" }, I18nService.translate('renewal.title')), h("p", { class: "amount" }, h("span", { class: "total-amount" }, formatAmount(this.totalAmount, this.currency)), ' ', h("span", { class: "per" }, "/ ", this.getFrequencyText().toLowerCase()))));
|
|
291
259
|
};
|
|
292
260
|
renderInfoRow = (label, value) => {
|
|
293
261
|
return (h("div", { class: "row" }, h("div", { class: "left" }, label), h("div", { class: "right" }, value)));
|
|
@@ -299,15 +267,15 @@ const RenewalSummary = class {
|
|
|
299
267
|
return this.renderInfoRow(I18nService.translate('renewal.nextRenewal'), formatDate(this.nextChargeDate, undefined, state.currentLocale));
|
|
300
268
|
};
|
|
301
269
|
renderSubtotal = () => {
|
|
302
|
-
return this.renderInfoRow(I18nService.translate('renewal.subtotal'), formatAmount(this.
|
|
270
|
+
return this.renderInfoRow(I18nService.translate('renewal.subtotal'), formatAmount(this.subTotalAmount, this.currency));
|
|
303
271
|
};
|
|
304
272
|
renderDiscount = () => {
|
|
305
|
-
if (
|
|
273
|
+
if (this.getDiscountAmount() <= 0)
|
|
306
274
|
return null;
|
|
307
275
|
return (h("div", { class: "row" }, h("div", { class: "left" }, I18nService.translate('summary.discount')), h("div", { class: "right discount-chip-wrapper" }, h("discount-coupon", { displayMode: "readonly", readonlyCouponCode: this.couponCode || undefined, readonlyDiscountAmount: this.getDiscountAmount(), readonlyCurrency: this.currency }))));
|
|
308
276
|
};
|
|
309
277
|
renderTotal = () => {
|
|
310
|
-
return (h("div", { class: "total-row" }, h("div", { class: "left" }, I18nService.translate('renewal.totalToRenew')), h("div", { class: "right" }, formatAmount(this.
|
|
278
|
+
return (h("div", { class: "total-row" }, h("div", { class: "left" }, I18nService.translate('renewal.totalToRenew')), h("div", { class: "right" }, formatAmount(this.totalAmount, this.currency))));
|
|
311
279
|
};
|
|
312
280
|
renderDesktop = () => {
|
|
313
281
|
return (h("div", { class: "wrapper" }, this.renderHeader(), h("div", { class: "info" }, h("div", { class: "row" }, h("div", { class: "" }, I18nService.translate('renewal.subscriptionDetails'))), this.renderProduct(), this.renderNextRenewal(), this.renderSubtotal(), this.renderDiscount()), this.renderTotal()));
|
|
@@ -325,7 +293,7 @@ const RenewalSummary = class {
|
|
|
325
293
|
return (h("collapsible-card", { header: I18nService.translate('summary.details') }, this.renderProduct(), this.renderNextRenewal()));
|
|
326
294
|
}
|
|
327
295
|
if (this.displayedComponents.includes('summary')) {
|
|
328
|
-
return (h("collapsible-card", { header: I18nService.translate('summary.summary') }, this.renderInfoRow(this.subscriptionTitle, '1 x ' + formatAmount(this.subscriptionAmount, this.currency)), this.renderSubtotal(), this.renderDiscount(), h("rebill-divider", null), this.renderInfoRow(I18nService.translate('renewal.totalToRenew'), formatAmount(this.
|
|
296
|
+
return (h("collapsible-card", { header: I18nService.translate('summary.summary') }, this.renderInfoRow(this.subscriptionTitle, '1 x ' + formatAmount(this.subscriptionAmount, this.currency)), this.renderSubtotal(), this.renderDiscount(), h("rebill-divider", null), this.renderInfoRow(I18nService.translate('renewal.totalToRenew'), formatAmount(this.totalAmount, this.currency))));
|
|
329
297
|
}
|
|
330
298
|
}
|
|
331
299
|
};
|
|
@@ -26,6 +26,7 @@ const initialRenewalState = {
|
|
|
26
26
|
description: [],
|
|
27
27
|
planId: null,
|
|
28
28
|
amount: 0,
|
|
29
|
+
subTotalAmount: 0,
|
|
29
30
|
currency: '',
|
|
30
31
|
isPriceFixed: false,
|
|
31
32
|
targetCurrency: null,
|
|
@@ -196,6 +197,6 @@ class RenewalStore {
|
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
export { RenewalStore as R, onChange as o, renewalState as r };
|
|
199
|
-
//# sourceMappingURL=renewal.store-
|
|
200
|
+
//# sourceMappingURL=renewal.store-jTjLDpeh.js.map
|
|
200
201
|
|
|
201
|
-
//# sourceMappingURL=renewal.store-
|
|
202
|
+
//# sourceMappingURL=renewal.store-jTjLDpeh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renewal.store-jTjLDpeh.js","sources":["src/store/renewal.store.ts"],"sourcesContent":["import { createStore } from '@stencil/store';\nimport { SavedCard } from '../api/entities/cards/types';\nimport {\n CreateAPMCheckoutResponse,\n CreateCardCheckoutResponse,\n} from '../api/entities/checkout/types';\nimport { ENUM_INSTALLMENT_MODEL } from '../models/enums/installment.enum';\nimport { PAYMENT_METHOD_ENUM } from '../models/enums/payment-methods.enum';\nimport { RebillRenewalProps, RenewalSession } from '../models/renewal.model';\n\nexport interface RenewalSessionState {\n token: string;\n data: RenewalSession;\n form: {\n isLoading: boolean;\n selectedPaymentMethod?: PAYMENT_METHOD_ENUM;\n selectedCard?: SavedCard;\n cvv?: string;\n savedCards: SavedCard[];\n checkoutResponse?: CreateCardCheckoutResponse | CreateAPMCheckoutResponse | null;\n userIdentification?: {\n documentType?: string;\n documentNumber?: string;\n };\n selectedBankId?: string;\n };\n isInitialized: boolean;\n fetchingInstallments: boolean;\n cardMode?: 'input' | 'select' | null;\n deviceId?: string;\n providerKey?: string;\n}\n\nconst initialRenewalState: RenewalSessionState = {\n token: '',\n data: {\n id: '',\n cardId: '',\n cardTokenId: '',\n cardInformation: {\n brand: '',\n type: '',\n isoCountry: '',\n bank: '',\n lastFour: '',\n installments: {\n isAvailableInstallments: false,\n installments: [],\n selectedInstallment: undefined,\n },\n },\n subscription: {\n id: '',\n organizationId: '',\n status: '',\n name: [],\n description: [],\n planId: null,\n amount: 0,\n subTotalAmount: 0,\n currency: '',\n isPriceFixed: false,\n targetCurrency: null,\n isProcessing: false,\n frequency: {\n count: 0,\n period: null,\n },\n repetitions: 0,\n currentRepetitions: 0,\n debitDay: null,\n type: '',\n lastChargeDate: '',\n nextChargeDate: '',\n remainingIterations: 0,\n customerId: '',\n customerName: '',\n customerEmail: '',\n paymentMethod: '',\n cardId: null,\n cardLastFour: null,\n trialPeriodDays: null,\n metadata: null,\n createdAt: '',\n },\n organization: {\n id: '',\n name: '',\n logoUrl: null,\n },\n price: {\n amount: 0,\n currency: '',\n country: '',\n paymentMethods: [],\n couponCode: null,\n discountPercentage: 0,\n discountedAmount: 0,\n },\n paymentMethods: [],\n country: '',\n createdAt: '',\n updatedAt: '',\n },\n form: {\n isLoading: false,\n savedCards: [],\n },\n isInitialized: false,\n fetchingInstallments: false,\n cardMode: 'select',\n};\n\nexport const { state: renewalState, onChange } =\n createStore<RenewalSessionState>(initialRenewalState);\n\nexport class RenewalStore {\n static initializeRenewal(renewalProps: RebillRenewalProps) {\n const { token, ...allProps } = renewalProps;\n renewalState.token = token;\n renewalState.data = allProps;\n renewalState.data.country = allProps.country;\n\n if (allProps.subscription?.cardId) {\n renewalState.data.cardId = allProps.subscription.cardId;\n }\n\n renewalState.isInitialized = true;\n }\n\n static setLoading(isLoading: boolean) {\n renewalState.form = {\n ...renewalState.form,\n isLoading,\n };\n }\n\n static setSelectedPaymentMethod(paymentMethod: PAYMENT_METHOD_ENUM) {\n renewalState.form = {\n ...renewalState.form,\n selectedPaymentMethod: paymentMethod,\n };\n }\n\n static setSelectedCard(card: SavedCard) {\n renewalState.form = {\n ...renewalState.form,\n selectedCard: card,\n };\n }\n\n static setCvv(cvv: string) {\n renewalState.form = {\n ...renewalState.form,\n cvv,\n };\n }\n\n static setSavedCards(cards: SavedCard[]) {\n renewalState.form = {\n ...renewalState.form,\n savedCards: cards,\n };\n }\n\n static setCheckoutResponse(response: CreateCardCheckoutResponse | CreateAPMCheckoutResponse) {\n renewalState.form = {\n ...renewalState.form,\n checkoutResponse: response,\n };\n }\n\n static setUserIdentification(identification: { documentType?: string; documentNumber?: string }) {\n renewalState.form = {\n ...renewalState.form,\n userIdentification: {\n ...renewalState.form.userIdentification,\n ...identification,\n },\n };\n }\n\n static clearRenewal() {\n renewalState.data = initialRenewalState.data;\n renewalState.form = initialRenewalState.form;\n renewalState.isInitialized = false;\n }\n\n static getRenewalState(): RenewalSessionState {\n return renewalState;\n }\n\n static setCardId(cardId: string) {\n renewalState.data.cardId = cardId;\n }\n\n static setCardTokenId(cardTokenId: string) {\n renewalState.data.cardTokenId = cardTokenId;\n }\n\n static setFetchingInstallments(fetchingInstallments: boolean) {\n renewalState.fetchingInstallments = fetchingInstallments;\n }\n\n static setCardInformation(cardInformation: {\n brand: string;\n type: string;\n isoCountry: string;\n bank: string;\n lastFour?: string;\n installments: {\n installments: {\n model: ENUM_INSTALLMENT_MODEL;\n cft: number;\n installment: number;\n totalAmount: number;\n installmentAmount: number;\n cftAmount: number;\n }[];\n };\n }) {\n if (cardInformation) {\n renewalState.data.cardInformation = {\n ...cardInformation,\n installments: {\n ...renewalState.data.cardInformation?.installments,\n installments: cardInformation.installments.installments,\n isAvailableInstallments: !!cardInformation.installments.installments.length,\n },\n };\n } else {\n renewalState.data.cardInformation = {\n brand: '',\n type: '',\n isoCountry: '',\n bank: '',\n lastFour: '',\n installments: {\n isAvailableInstallments: false,\n installments: [],\n selectedInstallment: undefined,\n },\n };\n }\n }\n\n static setSelectedBankId(bankId: string) {\n renewalState.form = {\n ...renewalState.form,\n selectedBankId: bankId,\n };\n }\n\n static setCardMode(cardMode: 'input' | 'select' | null) {\n renewalState.cardMode = cardMode;\n }\n\n static setDeviceId(deviceId: string) {\n renewalState.deviceId = deviceId;\n }\n\n static setProviderKey(providerKey: string) {\n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