rebill-web-components-sdk 1.8.35 → 1.8.37
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 +2 -2
- package/dist/cjs/card-identification_5.cjs.entry.js +2 -2
- package/dist/cjs/{config-ClgjQet_.js → config-Wx7Bi6_T.js} +3 -3
- package/dist/cjs/config-Wx7Bi6_T.js.map +1 -0
- package/dist/cjs/discount-coupon_2.cjs.entry.js +2 -2
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/{index-BCzOaoSU.js → index-D4-MOr9h.js} +3 -3
- package/dist/cjs/{index-BCzOaoSU.js.map → index-D4-MOr9h.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +2 -2
- package/dist/cjs/rebill-checkout.cjs.entry.js +4 -5
- package/dist/cjs/rebill-checkout.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-renewal.cjs.entry.js +2 -2
- package/dist/cjs/renewal-success-page.renewal-summary.entry.cjs.js.map +1 -1
- package/dist/cjs/renewal-success-page_2.cjs.entry.js +0 -3
- package/dist/collection/api/config.js +1 -1
- package/dist/collection/api/config.js.map +1 -1
- package/dist/collection/components/checkout/rebill-checkout.js +2 -3
- package/dist/collection/components/checkout/rebill-checkout.js.map +1 -1
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js +0 -3
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js.map +1 -1
- package/dist/components/apm-checkout.js +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/index.js +2 -2
- package/dist/components/otp-component.js +1 -1
- package/dist/components/{p-BjaEn-3m.js → p-2qMho_xL.js} +3 -3
- package/dist/{esm/config-BuNv9JwG.js.map → components/p-2qMho_xL.js.map} +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-DvgE3hKC.js → p-B-3lImmb.js} +3 -3
- package/dist/components/{p-DvgE3hKC.js.map → p-B-3lImmb.js.map} +1 -1
- package/dist/components/{p-D5TXI2Hb.js → p-BD1NqdR9.js} +3 -3
- package/dist/components/{p-D5TXI2Hb.js.map → p-BD1NqdR9.js.map} +1 -1
- package/dist/components/{p-VskO2WrV.js → p-Be6Svr7E.js} +3 -3
- package/dist/components/{p-VskO2WrV.js.map → p-Be6Svr7E.js.map} +1 -1
- package/dist/components/{p-DDVDLDRI.js → p-Bel0mbz7.js} +3 -3
- package/dist/components/{p-DDVDLDRI.js.map → p-Bel0mbz7.js.map} +1 -1
- package/dist/components/{p-mqJmoJIO.js → p-BlD-dFYd.js} +3 -6
- package/dist/components/p-BlD-dFYd.js.map +1 -0
- package/dist/components/{p-Dk10IZbR.js → p-CQS1pU-N.js} +3 -3
- package/dist/components/{p-Dk10IZbR.js.map → p-CQS1pU-N.js.map} +1 -1
- package/dist/components/{p-B4_i6BFO.js → p-CyKDtSI2.js} +3 -3
- package/dist/components/{p-B4_i6BFO.js.map → p-CyKDtSI2.js.map} +1 -1
- package/dist/components/{p-Bln3wBD6.js → p-DZRApK5D.js} +5 -5
- package/dist/components/{p-Bln3wBD6.js.map → p-DZRApK5D.js.map} +1 -1
- package/dist/components/{p-DPpE0kdy.js → p-D_lNAXr_.js} +4 -4
- package/dist/components/{p-DPpE0kdy.js.map → p-D_lNAXr_.js.map} +1 -1
- package/dist/components/{p-OSC_8G2_.js → p-c7IoEGtU.js} +3 -3
- package/dist/components/{p-OSC_8G2_.js.map → p-c7IoEGtU.js.map} +1 -1
- package/dist/components/{p-Dh-yfb0D.js → p-hdBb2rTT.js} +3 -3
- package/dist/components/{p-Dh-yfb0D.js.map → p-hdBb2rTT.js.map} +1 -1
- package/dist/components/{p-BJUr_-ZO.js → p-kh0HdPk5.js} +3 -3
- package/dist/components/{p-BJUr_-ZO.js.map → p-kh0HdPk5.js.map} +1 -1
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/rebill-address.js +1 -1
- package/dist/components/rebill-checkout.js +13 -14
- package/dist/components/rebill-checkout.js.map +1 -1
- package/dist/components/rebill-renewal.js +9 -9
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/renewal-summary.js +1 -1
- package/dist/components/user-information.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +2 -2
- package/dist/esm/card-identification_5.entry.js +2 -2
- package/dist/esm/{config-BuNv9JwG.js → config-CnVJ8ACO.js} +3 -3
- package/dist/{cjs/config-ClgjQet_.js.map → esm/config-CnVJ8ACO.js.map} +1 -1
- package/dist/esm/discount-coupon_2.entry.js +2 -2
- package/dist/esm/{index-BOj-Hiz8.js → index-8R_YGXw4.js} +3 -3
- package/dist/esm/{index-BOj-Hiz8.js.map → index-8R_YGXw4.js.map} +1 -1
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/otp-component_7.entry.js +2 -2
- package/dist/esm/rebill-checkout.entry.js +4 -5
- package/dist/esm/rebill-checkout.entry.js.map +1 -1
- package/dist/esm/rebill-renewal.entry.js +2 -2
- package/dist/esm/renewal-success-page.renewal-summary.entry.js.map +1 -1
- package/dist/esm/renewal-success-page_2.entry.js +0 -3
- package/dist/rebill-web-components-sdk/index.esm.js +1 -1
- package/dist/rebill-web-components-sdk/{p-28d04513.entry.js → p-2ddabd39.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-bde8f6aa.entry.js → p-3a585ddc.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-3a585ddc.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-736d2bdc.entry.js → p-3d02e7e9.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-405ab8da.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-6667496c.entry.js.map → p-405ab8da.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-D339jHg4.js → p-B5khCLtC.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-D339jHg4.js.map → p-B5khCLtC.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-CTo1s54i.js → p-D2_UL7f8.js} +4 -4
- package/dist/rebill-web-components-sdk/{p-CTo1s54i.js.map → p-D2_UL7f8.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-392fb691.entry.js → p-b8613f04.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-852bb04c.entry.js → p-d016b0d6.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-8bf5ce94.entry.js → p-ee460f6c.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/rebill-checkout.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/package.json +1 -1
- package/dist/components/p-BjaEn-3m.js.map +0 -1
- package/dist/components/p-mqJmoJIO.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-6667496c.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-bde8f6aa.entry.js.map +0 -1
- /package/dist/rebill-web-components-sdk/{p-28d04513.entry.js.map → p-2ddabd39.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-736d2bdc.entry.js.map → p-3d02e7e9.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-392fb691.entry.js.map → p-b8613f04.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-852bb04c.entry.js.map → p-d016b0d6.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-8bf5ce94.entry.js.map → p-ee460f6c.entry.js.map} +0 -0
|
@@ -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: 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,IAAA,eAAe;AACf,IAAA,qBAAqB;AAErB,IAAA,qBAAqB,GAAG,CAAC,KAAa,KAAY;AACxD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AAErB,Q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IACE,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC3C,YAAA,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC;YAC5C,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAC5C;AACA,YAAA,OAAO,IAAI,CAAC,aAAa,EAAE;;QAE7B,IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC/C,YAAA,OAAO,IAAI,CAAC,YAAY,EAAE;;QAE5B,IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAChD,QACE,wBAAkB,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA,EAC/D,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,iBAAiB,EAAE,CACR;;QAGvB,IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;AAChD,YAAA,QACE,wBAAkB,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA,EAC/D,IAAI,CAAC,aAAa,CACjB,IAAI,CAAC,iBAAiB,EACtB,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC9D,EACA,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,cAAc,EAAE,EAEtB,CAAkB,CAAA,gBAAA,EAAA,IAAA,CAAA,EACjB,IAAI,CAAC,aAAa,CACjB,WAAW,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAC7C,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC9C,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 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,IAAA,eAAe;AACf,IAAA,qBAAqB;AAErB,IAAA,qBAAqB,GAAG,CAAC,KAAa,KAAY;AACxD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;AAErB,QAAA,OAAO;AACJ,aAAA,WAAW;aACX,KAAK,CAAC,QAAQ;aACd,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,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IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAChD,QACE,wBAAkB,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA,EAC/D,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,iBAAiB,EAAE,CACR;;QAGvB,IAAI,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;AAChD,YAAA,QACE,wBAAkB,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAA,EAC/D,IAAI,CAAC,aAAa,CACjB,IAAI,CAAC,iBAAiB,EACtB,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC9D,EACA,IAAI,CAAC,cAAc,EAAE,EACrB,IAAI,CAAC,cAAc,EAAE,EAEtB,CAAkB,CAAA,gBAAA,EAAA,IAAA,CAAA,EACjB,IAAI,CAAC,aAAa,CACjB,WAAW,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAC7C,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAC9C,CACgB;;;;;;;;"}
|
|
@@ -247,9 +247,6 @@ const RenewalSummary = class {
|
|
|
247
247
|
}
|
|
248
248
|
getDiscountAmount() {
|
|
249
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
250
|
return this.subTotalAmount - this.totalAmount;
|
|
254
251
|
}
|
|
255
252
|
return this.discountAmount || 0;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"./p-
|
|
1
|
+
import{i as e}from"./p-B5khCLtC.js";export{g as getAPIConfig,a as getCurrentEnvironment,b as isDebugMode}from"./p-B5khCLtC.js";import{s as o,C as n}from"./p-C5OYI4I6.js";export{g as getAssetURL}from"./p-C5OYI4I6.js";export{a as setAssetPath}from"./p-D8cwEAmw.js";const s=(s={})=>{if(s.environment){const e=["development","staging","production"];if(!e.includes(s.environment)){throw new Error(`Invalid environment "${s.environment}". Must be one of: ${e.join(", ")}`)}}if(s.assetsUrl){o(s.assetsUrl);if(s.debug!==false){console.log(`📦 Assets URL configured: ${s.assetsUrl}`)}}else if(s.debug!==false){console.log(`📦 Using CDN for assets: ${n}`)}e(s);if(s.debug!==false){console.log("✅ Rebill SDK initialized successfully")}};const t={forProduction:(e=false)=>{s({environment:"production",debug:e})},forStaging:(e=true)=>{s({environment:"staging",debug:e})},forDevelopment:(e=true)=>{s({environment:"development",debug:e})}};const i=(e,o)=>import("./p-B2kbOjsN.js").then((({defineCustomElements:s})=>{if(o?.resourcesUrl){if(typeof window!=="undefined"){window.__REBILL_SDK_ASSETS_URL__=o.resourcesUrl}return s(e,o)}if(typeof window!=="undefined"){window.__REBILL_SDK_ASSETS_URL__=n}return s(e)}));export{t as RebillSDK,i as defineCustomElementsWithAssets,s as initializeRebillSDK,o as setAssetsURL};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as r,c as o,g as t}from"./p-D8cwEAmw.js";import{a as i}from"./p-CTo1s54i.js";import{I as l,s,e as a,a as n,o as c}from"./p-DkbFAMha.js";import{r as d,o as b,R as h}from"./p-BOVs95c7.js";import{g as p}from"./p-D339jHg4.js";import{c as f,d as u,E as m,e as g,b as y}from"./p-wvcrPcSK.js";import{C as x}from"./p-DA598vBj.js";import"./p-E-ZsRS8r.js";const v=class{constructor(r){e(this,r)}documentTypes=[];country="";currentLanguage=l.getCurrentLanguage();documentTypeError="";documentNumberError="";disabled=false;loadDocumentTypes=async()=>{const e=d.isInitialized?d.data?.price?.country:s?.data?.pricing?.country;if(e&&e!==this.country){try{const r=await i.data.getDocumentTypes(e);this.documentTypes=r.data;this.country=e}catch(e){console.error("Error loading document types:",e)}}};async componentWillLoad(){a.on("languageChanged",this.handleLanguageChange);n.onChange("data",(()=>{if(!d.isInitialized){this.loadDocumentTypes()}}));b("data",(()=>{if(d.isInitialized){this.loadDocumentTypes()}}));await this.loadDocumentTypes()}handleInputChange=e=>{const{id:r,value:o}=e.detail;if(d.isInitialized){h.setUserIdentification({[r]:o})}else{n.setUserInformation({[r]:o})}};disconnectedCallback(){a.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=l.getCurrentLanguage()};render(){const e=this.documentTypeError||this.documentNumberError;const o=this.documentTypes.map((e=>({label:e.value,value:e.value})));return r(r.Fragment,null,r("rebill-input-combo",{key:"075b874873f297d3e2e72e54625db2d5cc49c619","select-id":"documentType","input-id":"documentNumber","on-input":this.handleInputChange,"select-placeholder":l.translate("document.typePlaceholder"),"input-placeholder":l.translate("document.numberPlaceholder"),error:l.translate(e),options:o,disabled:this.disabled}))}};const k=class{constructor(r){e(this,r)}customCSS;iframeLoaded=false;currentLang=s.currentLocale;initialLang=s.currentLocale;iframeHeight="100px";getIframeURL(){const e=p().iframeURL;const r=new URL(e);r.searchParams.set("lang",this.initialLang);if(d.data?.subscription?.customerId&&d.token){r.searchParams.set("customerId",d.data.subscription.customerId);r.searchParams.set("token",d.token)}return r.toString()}iframeRef;unsubscribeCurrentLocaleStore;unsubscribeDataStore;unsubscribeRenewalStore;postInitialDataToIframe(){if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}this.postLanguageToIframe();this.postTotalPriceToIframe();this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}else{if(s.data?.organization?.id){this.postOrganizationIdToIframe(s.data.organization.id)}if(s?.currentLocale){this.postLanguageToIframe()}this.postTotalPriceToIframe();this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}this.postCustomCSSToIframe()}postTotalPriceToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){let e;if(d.isInitialized){e=d.data?.price?.amount||0}else{e=s.data?.pricing?.totalWithoutInstallment||0}this.iframeRef.contentWindow.postMessage({type:"SET_TOTAL_PRICE",payload:{total:e}},"*")}}postCustomerIdToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&d.data?.subscription?.customerId){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOMER_ID",payload:{customerId:d.data.subscription.customerId}},"*")}else if(this.iframeRef&&this.iframeRef.contentWindow&&s.data.customerId){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOMER_ID",payload:{customerId:s.data.customerId}},"*")}}postLanguageToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){this.iframeRef.contentWindow.postMessage({type:"SET_LANGUAGE",payload:{lang:this.currentLang}},"*")}}postOrganizationIdToIframe(e){if(!!this.iframeRef&&!!this.iframeRef.contentWindow){this.iframeRef.contentWindow.postMessage({type:"SET_ORGANIZATION_ID",payload:{organizationId:e}},"*")}}postTokenToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&d.token){this.iframeRef.contentWindow.postMessage({type:"SET_TOKEN",payload:{token:d.token}},"*")}else if(this.iframeRef&&this.iframeRef.contentWindow&&s.data.accessToken){this.iframeRef.contentWindow.postMessage({type:"SET_TOKEN",payload:{token:s.data.accessToken}},"*")}}postItemTypeToIframe(){if(!this.iframeRef||!this.iframeRef.contentWindow){return}if(d.isInitialized&&d.data?.subscription?.type){this.iframeRef.contentWindow.postMessage({type:"SET_ITEM_TYPE",payload:{itemType:d.data.subscription.type}},"*")}else if(s.data?.itemInformation?.type){this.iframeRef.contentWindow.postMessage({type:"SET_ITEM_TYPE",payload:{itemType:s.data.itemInformation.type}},"*")}}postCurrencyToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){let e;if(d.isInitialized){e=d.data?.price?.currency||""}else{e=s.data?.pricing?.currency||""}if(e){this.iframeRef.contentWindow.postMessage({type:"SET_CURRENCY",payload:{currency:e}},"*")}}}postCustomCSSToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&this.customCSS){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOM_CSS",payload:{css:this.customCSS}},"*")}}postClearCustomerIdToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&(!s.data.customerId||!s.data.accessToken)){this.iframeRef.contentWindow.postMessage({type:"CLEAR_CUSTOMER_ID_AND_TOKEN"},"*")}}componentWillLoad(){this.initialLang=s.currentLocale;this.unsubscribeCurrentLocaleStore=c("currentLocale",(()=>{this.currentLang=s.currentLocale;this.postLanguageToIframe()}));this.unsubscribeDataStore=c("data",(()=>{if(!d.isInitialized){if(s.data?.organization?.id){this.postOrganizationIdToIframe(s.data.organization.id)}if(s.data?.pricing?.totalWithoutInstallment!==undefined&&s.data?.pricing?.totalWithoutInstallment!==null){this.postTotalPriceToIframe()}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe();this.postClearCustomerIdToIframe()}}));this.unsubscribeRenewalStore=b("data",(()=>{if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}if(d.data?.price?.amount!==undefined){this.postTotalPriceToIframe()}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}}));setTimeout((()=>{this.postInitialDataToIframe()}),1e3)}componentWillUpdate(){if(this.iframeLoaded){this.postCustomCSSToIframe()}}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore)this.unsubscribeCurrentLocaleStore();if(this.unsubscribeDataStore)this.unsubscribeDataStore();if(this.unsubscribeRenewalStore)this.unsubscribeRenewalStore();window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{this.iframeLoaded=true;this.postLanguageToIframe();if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}this.postCustomCSSToIframe();setTimeout((()=>{this.postInitialDataToIframe()}),500)};handleIframeMessage=e=>{if(e.data&&e.data.type==="IFRAME_HEIGHT"&&e.data.payload&&typeof e.data.payload.height==="number"){this.iframeHeight=`${e.data.payload.height}px`}if(e.data&&e.data.type==="FORM_STATE"){if(d.isInitialized){if(!e.data.payload?.complete){h.setCardId(null);h.setCardTokenId(null)}}else if(s.isInitialized){if(!e.data.payload?.complete){n.setCardId(null);n.setCardTokenId(null)}}}if(e.data&&e.data.type==="INSTALLMENTS"&&e.data.payload){if(d.isInitialized){h.setCardInformation(e.data.payload)}else{n.setCardInformation(e.data.payload)}}if(e.data&&e.data.type==="CARD_TOKENIZED"){if(d.isInitialized){h.setCardTokenId(e.data?.payload?.token)}else if(s.isInitialized){n.setCardTokenId(e.data?.payload?.token)}}if(e.data&&e.data.type==="CARD_ID"){if(d.isInitialized){h.setCardId(e.data.payload?.id)}else if(s.isInitialized){n.setCardId(e.data.payload?.id)}}if(e.data&&e.data.type==="SAVE_CARD"){if(s.isInitialized){n.setSaveCard(e.data.payload?.saveCard)}}if(e.data&&e.data.type==="FETCHING_INSTALLMENTS"){const r=e.data.payload?.fetching||false;if(d.isInitialized){h.setFetchingInstallments(r)}else if(s.isInitialized){n.setFetchingInstallments(r)}}if(e.data&&e.data.type==="NEW_CARD_MODE"){const r=e.data.payload?.mode;if(r&&(r==="input"||r==="select")){if(d.isInitialized){h.setCardMode(r)}else if(s.isInitialized){n.setCardMode(r)}}}};render(){return r("div",{key:"21cee6426b31b15e214272bed3b893a89cfebdc3",style:{width:"100%",height:this.iframeHeight,position:"relative",overflow:"hidden"}},!this.iframeLoaded&&r("card-skeleton",{key:"66bbb20d750975f5e6a15a72c55f21ac209c9a10"}),r("iframe",{key:"8f9c689ea04b5b88511cbcc69b792454460b2a48",ref:e=>this.iframeRef=e,src:this.getIframeURL(),style:{width:"100%",height:"100%",border:"none",overflow:"hidden"},title:"Card Payment Component",allow:"payment",onLoad:this.handleIframeLoad}))}};const w=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.iframe-skeleton{display:flex;flex-direction:column;gap:16px}.input-skeleton{width:100%;height:40px;background:var(--rebill-color-border-primary);border-radius:8px;border:1px solid var(--rebill-color-border-primary)}";const T=class{constructor(r){e(this,r)}render(){return r("div",{key:"76c432f43c597f9ff92b949c16d70b1b6840e378",class:"iframe-skeleton"},r("div",{key:"9c77a9eeda10a23004890c934f30f8d25be7fbf1",class:"input-skeleton"}),r("div",{key:"d26032fe4bbb41dd0107e9fa5d8bd041da401351",class:"input-skeleton"}))}};T.style=w;const I=".input-container{display:flex;flex-direction:column}.input-label{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-bottom:0.375rem}.input-label.disabled{cursor:not-allowed}.input-element{border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);height:38.33px;box-sizing:border-box}.input-element.input-error{border-color:var(--rebill-color-error)}.input-element:disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}select.input-element{padding:10px 30px 10px 14px;appearance:none;cursor:pointer}select.input-element:disabled{cursor:not-allowed}.input-element:focus{border-color:var(--rebill-color-primary)}.input-element:disabled:focus{border-color:var(--rebill-color-disabled)}.input-element::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}@media screen and (max-width: 768px){.input-element{font-size:1rem}.input-element::placeholder{font-size:1rem}}:host{display:block;width:100%;box-sizing:border-box}.combo-wrapper{display:flex;align-items:stretch;width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);background:var(--rebill-color-background);transition:border-color 0.2s;position:relative;box-sizing:border-box}.combo-wrapper:focus-within{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.combo-wrapper.error{border-color:var(--rebill-color-error)}.combo-wrapper.disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}.select-section{position:relative;flex-shrink:0;min-width:80px;display:flex;align-items:center}.select-combo-trigger{width:100%;height:100%;padding:0 30px 0 14px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;position:relative;transition:border-color 0.2s}.select-combo-trigger:focus{outline:none}.select-combo-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-combo-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light)}.combo-wrapper.disabled .select-combo-trigger{cursor:not-allowed;color:var(--rebill-color-text-secondary)}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-section .icon-wrapper{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;height:20px;width:20px}.select-icon{color:var(--rebill-color-text-secondary);transition:transform 0.2s ease;transform-origin:50% 50%;display:block}.combo-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-dropdown{position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-top:0.25rem;max-height:200px;overflow-y:auto;animation:slideDown 0.15s ease-out;box-sizing:border-box;width:100%}.select-option{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;border-bottom:1px solid var(--rebill-color-border);transition:background-color 0.15s ease}.select-option:last-child{border-bottom:none}.select-option:hover,.select-option.highlighted{background-color:#f0f9ff}.select-option.selected{background-color:var(--rebill-color-primary);color:white}.select-option.selected:hover,.select-option.selected.highlighted{background-color:var(--rebill-color-primary)}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.combo-divider{width:1px;background-color:var(--rebill-color-border);margin:0;flex-shrink:0}.input-section{flex:1;min-width:0;display:flex;align-items:center}.combo-input{width:100%;height:100%;padding:0 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;box-sizing:border-box}.combo-input:focus{outline:none}.combo-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.combo-wrapper.disabled .combo-input{color:var(--rebill-color-text-secondary);cursor:not-allowed}.combo-wrapper.disabled .combo-input::placeholder{color:var(--rebill-color-text-secondary)}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}@media screen and (max-width: 768px){.select-combo-trigger{font-size:1rem}.select-option{font-size:1rem}.combo-input{font-size:1rem}.combo-input::placeholder{font-size:1rem}}";const E=class{constructor(r){e(this,r);this.blur=o(this,"blur");this.selectChange=o(this,"selectChange");this.input=o(this,"input")}dropdownRef;triggerRef;label="";options=[];selectValue="";inputValue="";inputPlaceholder="";selectPlaceholder="";error="";selectId="";inputId="";disabled=false;selectWidth="120px";isOpen=false;highlightedIndex=-1;componentId="";blur;selectChange;input;componentWillLoad(){this.componentId=this.selectId||`combo-${Math.random().toString(36).substr(2,9)}`}handleFormChange(e){const r=e.detail;if(r){if(this.selectId&&this.selectId in r){const e=r[this.selectId];if(typeof e==="string"){this.selectValue=e}}if(this.inputId&&this.inputId in r){const e=r[this.inputId];if(typeof e==="string"){this.inputValue=e}}}}handleCloseAllSelects(e){if(e.detail!==this.componentId){this.closeDropdown()}}handleDocumentClick(e){if(this.dropdownRef&&this.triggerRef&&!this.dropdownRef.contains(e.target)&&!this.triggerRef.contains(e.target)){this.closeDropdown()}}toggleDropdown=()=>{if(this.disabled)return;const e=this.isOpen;this.isOpen=!this.isOpen;if(this.isOpen){if(!e){document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}))}this.highlightedIndex=this.options.findIndex((e=>e.value===this.selectValue));if(this.highlightedIndex===-1){this.highlightedIndex=0}}};openDropdown=()=>{if(this.disabled)return;document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}));this.isOpen=true;this.highlightedIndex=this.options.findIndex((e=>e.value===this.selectValue));if(this.highlightedIndex===-1){this.highlightedIndex=0}};closeDropdown=()=>{this.isOpen=false;this.highlightedIndex=-1};selectOption=e=>{if(this.disabled)return;this.selectValue=e.value;this.closeDropdown();this.input.emit({id:this.selectId,value:this.selectValue})};onInputChange=e=>{if(this.disabled)return;const r=e.target;this.inputValue=r.value;this.input.emit({id:this.inputId,value:this.inputValue})};onSelectBlur=()=>{this.blur.emit({id:this.selectId,value:this.selectValue})};onInputBlur=()=>{const e=this.inputValue.trim();if(e!==this.inputValue){this.inputValue=e;this.input.emit({id:this.inputId,value:this.inputValue})}this.blur.emit({id:this.inputId,value:this.inputValue})};handleKeyDown=e=>{if(this.disabled)return;switch(e.key){case"Enter":case" ":e.preventDefault();if(this.isOpen&&this.highlightedIndex>=0){this.selectOption(this.options[this.highlightedIndex])}else{this.toggleDropdown()}break;case"Escape":e.preventDefault();this.closeDropdown();break;case"ArrowDown":e.preventDefault();if(!this.isOpen){this.openDropdown()}else{this.highlightedIndex=Math.min(this.highlightedIndex+1,this.options.length-1)}break;case"ArrowUp":e.preventDefault();if(this.isOpen){this.highlightedIndex=Math.max(this.highlightedIndex-1,0)}break}};getSelectedOptionLabel=()=>{const e=this.options.find((e=>e.value===this.selectValue));return e?e.label:this.selectPlaceholder};render(){const e=this.getSelectedOptionLabel();const o=this.selectValue!=="";return r("div",{key:"f30fb3ed1389a6e12f1d923e132498fe2f44fe6c",class:"input-container"},this.label&&r("label",{key:"73a36d44f468a4a6783782db056c402e6f31d0d4",class:`input-label ${this.disabled?"disabled":""}`},this.label),r("div",{key:"c283fb595144d44c0b9dc7ea7b21cbc14b296860",class:`input-combo-wrapper combo-wrapper ${this.disabled?"disabled":""} ${this.error?"error":""}`},r("div",{key:"9c1e8ea00d44d4cecd8a7e1eef3507135c021984",class:"select-section",style:{width:this.selectWidth}},r("div",{key:"42f65608af44f4ce777f3811b19a6a5d965f980d",ref:e=>this.triggerRef=e,class:`input-combo-select select-combo-trigger ${!o?"placeholder":""}`,onClick:this.toggleDropdown,onKeyDown:this.handleKeyDown,onBlur:this.onSelectBlur,tabIndex:this.disabled?-1:0,role:"combobox","aria-expanded":this.isOpen.toString(),"aria-haspopup":"listbox"},r("span",{key:"1b7402f39e8edfb2857b89339b44d352168053c3",class:"select-value"},e),r("div",{key:"9521467fd6b4844aa8eef664e05fdd2fffa93084",class:"icon-wrapper"},r("rebill-icon",{key:"3ca69faf99c23aa869b4f30d86d4ec3e27dbc87a",name:"chevron-up-down",size:"20px",class:"select-icon"}))),this.isOpen&&r("div",{key:"90c3696f5950268b273a166459bde04567097e72",ref:e=>this.dropdownRef=e,class:"select-dropdown",role:"listbox"},this.options.map(((e,o)=>r("div",{class:`select-option ${this.selectValue===e.value?"selected":""} ${this.highlightedIndex===o?"highlighted":""}`,onClick:()=>this.selectOption(e),role:"option","aria-selected":this.selectValue===e.value?"true":"false"},e.label))))),r("div",{key:"dba779de6a18058418e90354d022110b7b1484df",class:"combo-divider"}),r("div",{key:"8f9bb471e5c7803a322510a4eda20b145159203e",class:"input-section"},r("input",{key:"90542af1e1f10e137b1ab711a689fdbfdd46223e",type:"text",class:"input-combo-element combo-input",placeholder:this.inputPlaceholder,value:this.inputValue,onInput:this.onInputChange,onBlur:this.onInputBlur,disabled:this.disabled}))),this.error&&r("span",{key:"46c579be0ba230af0cb3d813d209fa51b8a35774",class:"error-message"},this.error))}};E.style=I;const C="";const S=class{constructor(r){e(this,r)}get el(){return t(this)}error;currentValue=null;isDisabled=false;value=null;placeholder=null;handleInstallments=e=>{if(this.isDisabled){const e=new CustomEvent("input",{detail:{id:"installments",value:"",disabled:true},bubbles:true});this.el.dispatchEvent(e);return}this.currentValue=e.detail.value;n.setSelectedInstallment(e.detail.value)};componentWillLoad(){n.onChange("data",(()=>{this.isDisabled=!s.data.cardInformation?.installments?.isAvailableInstallments;this.placeholder=!s.data.cardInformation?.installments?.isAvailableInstallments?f(s.data.pricing?.currency):u(s.data.pricing?.currency);this.value=this.isDisabled?"":this.value;if(this.isDisabled){const e=new CustomEvent("input",{detail:{id:"installments",value:"",disabled:true},bubbles:true});this.el.dispatchEvent(e)}}))}render(){return r("div",{key:"a7e2147789a5664d4b5857c86652c85f78a88872"},r("rebill-input-select",{key:this.isDisabled.toString(),id:"installments",variant:"outlined",value:this.value,options:s.data.cardInformation?.installments?.installments.map((e=>({label:g(e.installment,y(e.installmentAmount),s.data.pricing?.currency,e.cft,e.model),value:e?.installment?.toString()})))||[],loading:s.data.fetchingInstallments,placeholder:this.placeholder,disabled:this.isDisabled,"on-input":this.handleInstallments,error:l.translate(this.error)}),s.data.cardInformation?.installments?.installments.find((e=>e.installment===s.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===m.CUSTOMER_FINANCED&&r("rebill-typography",{key:"77b18f5f22cf47c79a6a2f30655117f4aaa60987",variant:"italic",color:x.SECONDARY},l.translate("installments.interest")))}};S.style=C;export{v as card_identification,k as card_iframe,T as card_skeleton,E as rebill_input_combo,S as rebill_installments};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as r,c as o,g as t}from"./p-D8cwEAmw.js";import{a as i}from"./p-D2_UL7f8.js";import{I as l,s,e as a,a as n,o as c}from"./p-DkbFAMha.js";import{r as d,o as b,R as h}from"./p-BOVs95c7.js";import{g as p}from"./p-B5khCLtC.js";import{c as f,d as u,E as m,e as g,b as y}from"./p-wvcrPcSK.js";import{C as x}from"./p-DA598vBj.js";import"./p-E-ZsRS8r.js";const v=class{constructor(r){e(this,r)}documentTypes=[];country="";currentLanguage=l.getCurrentLanguage();documentTypeError="";documentNumberError="";disabled=false;loadDocumentTypes=async()=>{const e=d.isInitialized?d.data?.price?.country:s?.data?.pricing?.country;if(e&&e!==this.country){try{const r=await i.data.getDocumentTypes(e);this.documentTypes=r.data;this.country=e}catch(e){console.error("Error loading document types:",e)}}};async componentWillLoad(){a.on("languageChanged",this.handleLanguageChange);n.onChange("data",(()=>{if(!d.isInitialized){this.loadDocumentTypes()}}));b("data",(()=>{if(d.isInitialized){this.loadDocumentTypes()}}));await this.loadDocumentTypes()}handleInputChange=e=>{const{id:r,value:o}=e.detail;if(d.isInitialized){h.setUserIdentification({[r]:o})}else{n.setUserInformation({[r]:o})}};disconnectedCallback(){a.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.currentLanguage=l.getCurrentLanguage()};render(){const e=this.documentTypeError||this.documentNumberError;const o=this.documentTypes.map((e=>({label:e.value,value:e.value})));return r(r.Fragment,null,r("rebill-input-combo",{key:"075b874873f297d3e2e72e54625db2d5cc49c619","select-id":"documentType","input-id":"documentNumber","on-input":this.handleInputChange,"select-placeholder":l.translate("document.typePlaceholder"),"input-placeholder":l.translate("document.numberPlaceholder"),error:l.translate(e),options:o,disabled:this.disabled}))}};const k=class{constructor(r){e(this,r)}customCSS;iframeLoaded=false;currentLang=s.currentLocale;initialLang=s.currentLocale;iframeHeight="100px";getIframeURL(){const e=p().iframeURL;const r=new URL(e);r.searchParams.set("lang",this.initialLang);if(d.data?.subscription?.customerId&&d.token){r.searchParams.set("customerId",d.data.subscription.customerId);r.searchParams.set("token",d.token)}return r.toString()}iframeRef;unsubscribeCurrentLocaleStore;unsubscribeDataStore;unsubscribeRenewalStore;postInitialDataToIframe(){if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}this.postLanguageToIframe();this.postTotalPriceToIframe();this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}else{if(s.data?.organization?.id){this.postOrganizationIdToIframe(s.data.organization.id)}if(s?.currentLocale){this.postLanguageToIframe()}this.postTotalPriceToIframe();this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}this.postCustomCSSToIframe()}postTotalPriceToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){let e;if(d.isInitialized){e=d.data?.price?.amount||0}else{e=s.data?.pricing?.totalWithoutInstallment||0}this.iframeRef.contentWindow.postMessage({type:"SET_TOTAL_PRICE",payload:{total:e}},"*")}}postCustomerIdToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&d.data?.subscription?.customerId){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOMER_ID",payload:{customerId:d.data.subscription.customerId}},"*")}else if(this.iframeRef&&this.iframeRef.contentWindow&&s.data.customerId){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOMER_ID",payload:{customerId:s.data.customerId}},"*")}}postLanguageToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){this.iframeRef.contentWindow.postMessage({type:"SET_LANGUAGE",payload:{lang:this.currentLang}},"*")}}postOrganizationIdToIframe(e){if(!!this.iframeRef&&!!this.iframeRef.contentWindow){this.iframeRef.contentWindow.postMessage({type:"SET_ORGANIZATION_ID",payload:{organizationId:e}},"*")}}postTokenToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&d.token){this.iframeRef.contentWindow.postMessage({type:"SET_TOKEN",payload:{token:d.token}},"*")}else if(this.iframeRef&&this.iframeRef.contentWindow&&s.data.accessToken){this.iframeRef.contentWindow.postMessage({type:"SET_TOKEN",payload:{token:s.data.accessToken}},"*")}}postItemTypeToIframe(){if(!this.iframeRef||!this.iframeRef.contentWindow){return}if(d.isInitialized&&d.data?.subscription?.type){this.iframeRef.contentWindow.postMessage({type:"SET_ITEM_TYPE",payload:{itemType:d.data.subscription.type}},"*")}else if(s.data?.itemInformation?.type){this.iframeRef.contentWindow.postMessage({type:"SET_ITEM_TYPE",payload:{itemType:s.data.itemInformation.type}},"*")}}postCurrencyToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow){let e;if(d.isInitialized){e=d.data?.price?.currency||""}else{e=s.data?.pricing?.currency||""}if(e){this.iframeRef.contentWindow.postMessage({type:"SET_CURRENCY",payload:{currency:e}},"*")}}}postCustomCSSToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&this.customCSS){this.iframeRef.contentWindow.postMessage({type:"SET_CUSTOM_CSS",payload:{css:this.customCSS}},"*")}}postClearCustomerIdToIframe(){if(this.iframeRef&&this.iframeRef.contentWindow&&(!s.data.customerId||!s.data.accessToken)){this.iframeRef.contentWindow.postMessage({type:"CLEAR_CUSTOMER_ID_AND_TOKEN"},"*")}}componentWillLoad(){this.initialLang=s.currentLocale;this.unsubscribeCurrentLocaleStore=c("currentLocale",(()=>{this.currentLang=s.currentLocale;this.postLanguageToIframe()}));this.unsubscribeDataStore=c("data",(()=>{if(!d.isInitialized){if(s.data?.organization?.id){this.postOrganizationIdToIframe(s.data.organization.id)}if(s.data?.pricing?.totalWithoutInstallment!==undefined&&s.data?.pricing?.totalWithoutInstallment!==null){this.postTotalPriceToIframe()}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe();this.postClearCustomerIdToIframe()}}));this.unsubscribeRenewalStore=b("data",(()=>{if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}if(d.data?.price?.amount!==undefined){this.postTotalPriceToIframe()}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}}));setTimeout((()=>{this.postInitialDataToIframe()}),1e3)}componentWillUpdate(){if(this.iframeLoaded){this.postCustomCSSToIframe()}}componentDidLoad(){window.addEventListener("message",this.handleIframeMessage)}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore)this.unsubscribeCurrentLocaleStore();if(this.unsubscribeDataStore)this.unsubscribeDataStore();if(this.unsubscribeRenewalStore)this.unsubscribeRenewalStore();window.removeEventListener("message",this.handleIframeMessage)}handleIframeLoad=()=>{this.iframeLoaded=true;this.postLanguageToIframe();if(d.isInitialized){if(d.data?.organization?.id){this.postOrganizationIdToIframe(d.data.organization.id)}this.postCurrencyToIframe();this.postCustomerIdToIframe();this.postTokenToIframe();this.postItemTypeToIframe()}this.postCustomCSSToIframe();setTimeout((()=>{this.postInitialDataToIframe()}),500)};handleIframeMessage=e=>{if(e.data&&e.data.type==="IFRAME_HEIGHT"&&e.data.payload&&typeof e.data.payload.height==="number"){this.iframeHeight=`${e.data.payload.height}px`}if(e.data&&e.data.type==="FORM_STATE"){if(d.isInitialized){if(!e.data.payload?.complete){h.setCardId(null);h.setCardTokenId(null)}}else if(s.isInitialized){if(!e.data.payload?.complete){n.setCardId(null);n.setCardTokenId(null)}}}if(e.data&&e.data.type==="INSTALLMENTS"&&e.data.payload){if(d.isInitialized){h.setCardInformation(e.data.payload)}else{n.setCardInformation(e.data.payload)}}if(e.data&&e.data.type==="CARD_TOKENIZED"){if(d.isInitialized){h.setCardTokenId(e.data?.payload?.token)}else if(s.isInitialized){n.setCardTokenId(e.data?.payload?.token)}}if(e.data&&e.data.type==="CARD_ID"){if(d.isInitialized){h.setCardId(e.data.payload?.id)}else if(s.isInitialized){n.setCardId(e.data.payload?.id)}}if(e.data&&e.data.type==="SAVE_CARD"){if(s.isInitialized){n.setSaveCard(e.data.payload?.saveCard)}}if(e.data&&e.data.type==="FETCHING_INSTALLMENTS"){const r=e.data.payload?.fetching||false;if(d.isInitialized){h.setFetchingInstallments(r)}else if(s.isInitialized){n.setFetchingInstallments(r)}}if(e.data&&e.data.type==="NEW_CARD_MODE"){const r=e.data.payload?.mode;if(r&&(r==="input"||r==="select")){if(d.isInitialized){h.setCardMode(r)}else if(s.isInitialized){n.setCardMode(r)}}}};render(){return r("div",{key:"21cee6426b31b15e214272bed3b893a89cfebdc3",style:{width:"100%",height:this.iframeHeight,position:"relative",overflow:"hidden"}},!this.iframeLoaded&&r("card-skeleton",{key:"66bbb20d750975f5e6a15a72c55f21ac209c9a10"}),r("iframe",{key:"8f9c689ea04b5b88511cbcc69b792454460b2a48",ref:e=>this.iframeRef=e,src:this.getIframeURL(),style:{width:"100%",height:"100%",border:"none",overflow:"hidden"},title:"Card Payment Component",allow:"payment",onLoad:this.handleIframeLoad}))}};const w=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.iframe-skeleton{display:flex;flex-direction:column;gap:16px}.input-skeleton{width:100%;height:40px;background:var(--rebill-color-border-primary);border-radius:8px;border:1px solid var(--rebill-color-border-primary)}";const T=class{constructor(r){e(this,r)}render(){return r("div",{key:"76c432f43c597f9ff92b949c16d70b1b6840e378",class:"iframe-skeleton"},r("div",{key:"9c77a9eeda10a23004890c934f30f8d25be7fbf1",class:"input-skeleton"}),r("div",{key:"d26032fe4bbb41dd0107e9fa5d8bd041da401351",class:"input-skeleton"}))}};T.style=w;const I=".input-container{display:flex;flex-direction:column}.input-label{font-size:0.875rem;color:var(--rebill-color-text-primary);font-weight:500;margin-bottom:0.375rem}.input-label.disabled{cursor:not-allowed}.input-element{border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);height:38.33px;box-sizing:border-box}.input-element.input-error{border-color:var(--rebill-color-error)}.input-element:disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}select.input-element{padding:10px 30px 10px 14px;appearance:none;cursor:pointer}select.input-element:disabled{cursor:not-allowed}.input-element:focus{border-color:var(--rebill-color-primary)}.input-element:disabled:focus{border-color:var(--rebill-color-disabled)}.input-element::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.error-message{color:var(--rebill-color-error);font-size:0.75rem;margin-top:0.375rem}@media screen and (max-width: 768px){.input-element{font-size:1rem}.input-element::placeholder{font-size:1rem}}:host{display:block;width:100%;box-sizing:border-box}.combo-wrapper{display:flex;align-items:stretch;width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);background:var(--rebill-color-background);transition:border-color 0.2s;position:relative;box-sizing:border-box}.combo-wrapper:focus-within{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.combo-wrapper.error{border-color:var(--rebill-color-error)}.combo-wrapper.disabled{background-color:var(--rebill-color-background);border-color:var(--rebill-color-disabled);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}.select-section{position:relative;flex-shrink:0;min-width:80px;display:flex;align-items:center}.select-combo-trigger{width:100%;height:100%;padding:0 30px 0 14px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;position:relative;transition:border-color 0.2s}.select-combo-trigger:focus{outline:none}.select-combo-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-combo-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light)}.combo-wrapper.disabled .select-combo-trigger{cursor:not-allowed;color:var(--rebill-color-text-secondary)}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-section .icon-wrapper{position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;height:20px;width:20px}.select-icon{color:var(--rebill-color-text-secondary);transition:transform 0.2s ease;transform-origin:50% 50%;display:block}.combo-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-dropdown{position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:var(--rebill-color-background);border:1px solid var(--rebill-color-border);border-radius:0.375rem;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);margin-top:0.25rem;max-height:200px;overflow-y:auto;animation:slideDown 0.15s ease-out;box-sizing:border-box;width:100%}.select-option{padding:0.75rem;font-size:0.875rem;color:var(--rebill-color-text-primary);cursor:pointer;border-bottom:1px solid var(--rebill-color-border);transition:background-color 0.15s ease}.select-option:last-child{border-bottom:none}.select-option:hover,.select-option.highlighted{background-color:#f0f9ff}.select-option.selected{background-color:var(--rebill-color-primary);color:white}.select-option.selected:hover,.select-option.selected.highlighted{background-color:var(--rebill-color-primary)}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}.combo-divider{width:1px;background-color:var(--rebill-color-border);margin:0;flex-shrink:0}.input-section{flex:1;min-width:0;display:flex;align-items:center}.combo-input{width:100%;height:100%;padding:0 14px;font-size:0.875rem;color:var(--rebill-color-text-primary);background:transparent;border:none;outline:none;box-sizing:border-box}.combo-input:focus{outline:none}.combo-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem;opacity:1}.combo-wrapper.disabled .combo-input{color:var(--rebill-color-text-secondary);cursor:not-allowed}.combo-wrapper.disabled .combo-input::placeholder{color:var(--rebill-color-text-secondary)}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.select-dropdown::-webkit-scrollbar{width:6px}.select-dropdown::-webkit-scrollbar-track{background:transparent}.select-dropdown::-webkit-scrollbar-thumb{background-color:var(--rebill-color-border);border-radius:3px}.select-dropdown::-webkit-scrollbar-thumb:hover{background-color:var(--rebill-color-text-secondary)}@media screen and (max-width: 768px){.select-combo-trigger{font-size:1rem}.select-option{font-size:1rem}.combo-input{font-size:1rem}.combo-input::placeholder{font-size:1rem}}";const E=class{constructor(r){e(this,r);this.blur=o(this,"blur");this.selectChange=o(this,"selectChange");this.input=o(this,"input")}dropdownRef;triggerRef;label="";options=[];selectValue="";inputValue="";inputPlaceholder="";selectPlaceholder="";error="";selectId="";inputId="";disabled=false;selectWidth="120px";isOpen=false;highlightedIndex=-1;componentId="";blur;selectChange;input;componentWillLoad(){this.componentId=this.selectId||`combo-${Math.random().toString(36).substr(2,9)}`}handleFormChange(e){const r=e.detail;if(r){if(this.selectId&&this.selectId in r){const e=r[this.selectId];if(typeof e==="string"){this.selectValue=e}}if(this.inputId&&this.inputId in r){const e=r[this.inputId];if(typeof e==="string"){this.inputValue=e}}}}handleCloseAllSelects(e){if(e.detail!==this.componentId){this.closeDropdown()}}handleDocumentClick(e){if(this.dropdownRef&&this.triggerRef&&!this.dropdownRef.contains(e.target)&&!this.triggerRef.contains(e.target)){this.closeDropdown()}}toggleDropdown=()=>{if(this.disabled)return;const e=this.isOpen;this.isOpen=!this.isOpen;if(this.isOpen){if(!e){document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}))}this.highlightedIndex=this.options.findIndex((e=>e.value===this.selectValue));if(this.highlightedIndex===-1){this.highlightedIndex=0}}};openDropdown=()=>{if(this.disabled)return;document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}));this.isOpen=true;this.highlightedIndex=this.options.findIndex((e=>e.value===this.selectValue));if(this.highlightedIndex===-1){this.highlightedIndex=0}};closeDropdown=()=>{this.isOpen=false;this.highlightedIndex=-1};selectOption=e=>{if(this.disabled)return;this.selectValue=e.value;this.closeDropdown();this.input.emit({id:this.selectId,value:this.selectValue})};onInputChange=e=>{if(this.disabled)return;const r=e.target;this.inputValue=r.value;this.input.emit({id:this.inputId,value:this.inputValue})};onSelectBlur=()=>{this.blur.emit({id:this.selectId,value:this.selectValue})};onInputBlur=()=>{const e=this.inputValue.trim();if(e!==this.inputValue){this.inputValue=e;this.input.emit({id:this.inputId,value:this.inputValue})}this.blur.emit({id:this.inputId,value:this.inputValue})};handleKeyDown=e=>{if(this.disabled)return;switch(e.key){case"Enter":case" ":e.preventDefault();if(this.isOpen&&this.highlightedIndex>=0){this.selectOption(this.options[this.highlightedIndex])}else{this.toggleDropdown()}break;case"Escape":e.preventDefault();this.closeDropdown();break;case"ArrowDown":e.preventDefault();if(!this.isOpen){this.openDropdown()}else{this.highlightedIndex=Math.min(this.highlightedIndex+1,this.options.length-1)}break;case"ArrowUp":e.preventDefault();if(this.isOpen){this.highlightedIndex=Math.max(this.highlightedIndex-1,0)}break}};getSelectedOptionLabel=()=>{const e=this.options.find((e=>e.value===this.selectValue));return e?e.label:this.selectPlaceholder};render(){const e=this.getSelectedOptionLabel();const o=this.selectValue!=="";return r("div",{key:"f30fb3ed1389a6e12f1d923e132498fe2f44fe6c",class:"input-container"},this.label&&r("label",{key:"73a36d44f468a4a6783782db056c402e6f31d0d4",class:`input-label ${this.disabled?"disabled":""}`},this.label),r("div",{key:"c283fb595144d44c0b9dc7ea7b21cbc14b296860",class:`input-combo-wrapper combo-wrapper ${this.disabled?"disabled":""} ${this.error?"error":""}`},r("div",{key:"9c1e8ea00d44d4cecd8a7e1eef3507135c021984",class:"select-section",style:{width:this.selectWidth}},r("div",{key:"42f65608af44f4ce777f3811b19a6a5d965f980d",ref:e=>this.triggerRef=e,class:`input-combo-select select-combo-trigger ${!o?"placeholder":""}`,onClick:this.toggleDropdown,onKeyDown:this.handleKeyDown,onBlur:this.onSelectBlur,tabIndex:this.disabled?-1:0,role:"combobox","aria-expanded":this.isOpen.toString(),"aria-haspopup":"listbox"},r("span",{key:"1b7402f39e8edfb2857b89339b44d352168053c3",class:"select-value"},e),r("div",{key:"9521467fd6b4844aa8eef664e05fdd2fffa93084",class:"icon-wrapper"},r("rebill-icon",{key:"3ca69faf99c23aa869b4f30d86d4ec3e27dbc87a",name:"chevron-up-down",size:"20px",class:"select-icon"}))),this.isOpen&&r("div",{key:"90c3696f5950268b273a166459bde04567097e72",ref:e=>this.dropdownRef=e,class:"select-dropdown",role:"listbox"},this.options.map(((e,o)=>r("div",{class:`select-option ${this.selectValue===e.value?"selected":""} ${this.highlightedIndex===o?"highlighted":""}`,onClick:()=>this.selectOption(e),role:"option","aria-selected":this.selectValue===e.value?"true":"false"},e.label))))),r("div",{key:"dba779de6a18058418e90354d022110b7b1484df",class:"combo-divider"}),r("div",{key:"8f9bb471e5c7803a322510a4eda20b145159203e",class:"input-section"},r("input",{key:"90542af1e1f10e137b1ab711a689fdbfdd46223e",type:"text",class:"input-combo-element combo-input",placeholder:this.inputPlaceholder,value:this.inputValue,onInput:this.onInputChange,onBlur:this.onInputBlur,disabled:this.disabled}))),this.error&&r("span",{key:"46c579be0ba230af0cb3d813d209fa51b8a35774",class:"error-message"},this.error))}};E.style=I;const C="";const S=class{constructor(r){e(this,r)}get el(){return t(this)}error;currentValue=null;isDisabled=false;value=null;placeholder=null;handleInstallments=e=>{if(this.isDisabled){const e=new CustomEvent("input",{detail:{id:"installments",value:"",disabled:true},bubbles:true});this.el.dispatchEvent(e);return}this.currentValue=e.detail.value;n.setSelectedInstallment(e.detail.value)};componentWillLoad(){n.onChange("data",(()=>{this.isDisabled=!s.data.cardInformation?.installments?.isAvailableInstallments;this.placeholder=!s.data.cardInformation?.installments?.isAvailableInstallments?f(s.data.pricing?.currency):u(s.data.pricing?.currency);this.value=this.isDisabled?"":this.value;if(this.isDisabled){const e=new CustomEvent("input",{detail:{id:"installments",value:"",disabled:true},bubbles:true});this.el.dispatchEvent(e)}}))}render(){return r("div",{key:"a7e2147789a5664d4b5857c86652c85f78a88872"},r("rebill-input-select",{key:this.isDisabled.toString(),id:"installments",variant:"outlined",value:this.value,options:s.data.cardInformation?.installments?.installments.map((e=>({label:g(e.installment,y(e.installmentAmount),s.data.pricing?.currency,e.cft,e.model),value:e?.installment?.toString()})))||[],loading:s.data.fetchingInstallments,placeholder:this.placeholder,disabled:this.isDisabled,"on-input":this.handleInstallments,error:l.translate(this.error)}),s.data.cardInformation?.installments?.installments.find((e=>e.installment===s.data.cardInformation?.installments?.selectedInstallment?.installment))?.model===m.CUSTOMER_FINANCED&&r("rebill-typography",{key:"77b18f5f22cf47c79a6a2f30655117f4aaa60987",variant:"italic",color:x.SECONDARY},l.translate("installments.interest")))}};S.style=C;export{v as card_identification,k as card_iframe,T as card_skeleton,E as rebill_input_combo,S as rebill_installments};
|
|
2
|
+
//# sourceMappingURL=p-2ddabd39.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as a,d as r,h as t}from"./p-D8cwEAmw.js";import{P as i,I as s,f as o,e as c,s as l}from"./p-DkbFAMha.js";import{r as n}from"./p-BOVs95c7.js";import{B as d,g as b,i as p}from"./p-Do_vNuMa.js";import{C as f}from"./p-DA598vBj.js";import{g as h,P as y}from"./p-Catt3XCa.js";import{f as g,a as u}from"./p--EE-bffI.js";import"./p-E-ZsRS8r.js";import"./p-C5OYI4I6.js";const m=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.renewal-success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.renewal-success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.renewal-success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.renewal-success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.renewal-success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.renewal-success-page__card-row:last-of-type{margin-bottom:0}.renewal-success-page__card-value{display:flex;align-items:center;gap:0.5rem}.renewal-success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.renewal-success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.renewal-success-page__payment-method-display rebill-card-icon svg{display:block}.renewal-success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.renewal-success-page__payment-method-display rebill-icon div{display:block}.renewal-success-page__card-divider{height:1px;background:#e5e7eb}.renewal-success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.renewal-success-page__contact-info{text-align:left}.renewal-success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.renewal-success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}@media (max-width: 1024px){.renewal-success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.renewal-success-page__info-card{width:100%;max-width:100%;padding:12px}}@media (max-width: 767px){.renewal-success-page__info-card{padding:12px}}";const w=class{constructor(r){e(this,r);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=i.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale="es";breakpoint=d.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const a=this.country?h(this.country):null;const r=a?.find((a=>a.type===e));const t={[i.CARD]:{key:i.CARD,label:s.translate("paymentMethods.card"),icons:["card"]},[i.CASH]:{key:i.CASH,label:s.translate("paymentMethods.cash"),icons:["pago-facil"]},[i.BANK_TRANSFER]:{key:i.BANK_TRANSFER,label:s.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const o=t[e];return{...o,icons:r?.icons||o.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=b(window.innerWidth);if(this.showRedirectMessage){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{this.stopLoaderAnimation()}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=b(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const a=await fetch(r(`./assets/loader-redirect1.json`));const t=await a.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:t})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const a=50;const r=a/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+r,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),a)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await y.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===i.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===i.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===i.CARD&&{cardBrand:this.applyStartCaseToBrand(n.data.cardInformation?.brand||"")},...this.typePaymentMethod===i.CARD&&{cardLastFour:this.cardLastFour??n.data.cardInformation?.lastFour},paymentDate:g(this.getPaymentDate())||g((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:o(n.data.subscription.subTotalAmount,n.data.price.currency),total:o(n.data.price.amount,n.data.price.currency),currency:n.data.price.currency||" ",...this.getDiscountAmountValue()>0&&{discountAmount:o(this.getDiscountAmountValue(),n.data.price.currency)},trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:o(this.planAmount,n.data.price.currency),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getDiscountAmountValue=()=>{if(n?.data?.price?.amount<n?.data?.subscription?.subTotalAmount){return n?.data?.subscription?.subTotalAmount-n?.data?.price?.amount}return 0};hasDiscount=()=>this.getDiscountAmountValue()>0;textPaymentMethodCard=()=>{const e=n.data?.cardInformation?.brand;const a=this.cardLastFour||n.data?.cardInformation?.lastFour;const r=this.applyStartCaseToBrand(e||"");return e&&a?`${r} - ${a}`:r};render(){return t("rebill-checkout-single-column",{key:"cb90cb24d93fb4245e4eaf3cdeeab4e278b2c546"},t("div",{key:"20e031f6307df3ffeceb32ff4bf1337ac54ad098",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"199431628bf2461d82397f04146f5f830d5ed88f",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"761a4e40d5b1653a3cd3e9b667027025b19dacf0",class:"renewal-success-page__success-icon"},t("svg",{key:"35c1f8a00382da91c35813c086a13236ef64d150",width:p(this.breakpoint,d.DESKTOP)?"64":"96",height:p(this.breakpoint,d.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}))),t("div",{key:"82ac13c8d26f7ac58c28e8b49518abe140749561",class:"renewal-success-page__info-card"},t("div",{key:"0b1c283d679bf968265a23b67fd8821c9a1a57db",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"ca1a8d98b07b2a681cf630f09d047a0c60063be6",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"4449bcb86cddf6316f570bad14b240f3e328ae99",class:"renewal-success-page__card-value"},t("div",{key:"4858d10857b00244122145864cc92906abdcd24a",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"b64cfc5c69e3c0627f361650f039e06329c9004e","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"7ef5fc2219158df995dfbcab3ecd35291ce6d1eb",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"9759c64a9ca925f6ad3ebe5be536451a2e7b8e9c",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"9b8b9987a82403e24f355fd68ca625d5ac6be0d0",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(i.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"b830a51f477da38f4fad6d861d56d8473eedc1e0",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"9f336dc44b09b227dca8d55f7543af8d6965340e",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"54487e54a1d044044748d39e838f0bcedc1806db",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"f90cb87eaad022c8e4e8a7fd50b6efc98e96e5fb",variant:"body2",color:f.PRIMARY_DARK_TEXT},g(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"4f5dd152b68e4bf8f09929fc459204c9c9316c7d",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"977d12ffd4f81822f16e040f36380354569a38ee",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"62e10631ec66d641f7c2a2e18aecd583d14d51d1",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"ef143339c11f42d47d5c29dcb77f432a6ab522ab",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"d7f341310f59a3f15a112cdcd393f60dd762f742",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"06c82cbdede33d774212a283229e51a27de9526f",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"6e1dc249302831b6d86174d69c766d4149e532d0",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"b9c21efa101829c13f8cc13518c55769fdf2f210",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"28d67a7e5b44c05d5c4d795c0293c841ee5b220f",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"907bb77f52600cff2d1cfd9cc66653d5a62f1d8a",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"ae917b6621a7e550793f363f64854cccc9c676c5",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"5aee63e2757c447c31a554563bc3bfe4442e9727",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"dfd32d9e61e6671ae0ccd7204efc0dc957ce6f5f",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"60d4e2c5d2a9907c7676692f123b9ac809726636",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.subscription.subTotalAmount,n.data.price.currency))),this.hasDiscount()&&t("div",{key:"c2b4d3539da9811e82e14f00e40995813642e281",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"4cc407db9e8654592ac8961793ac16c5c8bdc650",variant:"body2",color:f.SECONDARY},s.translate("summary.discount")),t("rebill-typography",{key:"8767ff24390fd66f61a3007ec5c89b23f4d15708",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(this.getDiscountAmountValue(),n.data.price.currency))),t("div",{key:"6f58d05abb853a328a91bfb773f2efbb46ddf766",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"1b07af9baa275addf2270e9ebb652021ba3af2ad",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"01c846178f5a87baf3cebe47f373e93b415fd9fb",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"570f795573812b983aacd716fc95892c16ddb66f",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.price.amount,n.data.price.currency)))),t("div",{key:"101e06be84246481dd7fb120b4e64df6656382e7",class:"renewal-success-page__card-divider"}),t("div",{key:"bad8e69d95ee7befdb613246328ff6ef9556cf9d",class:"renewal-success-page__download-container"},t("svg",{key:"97b4a2ac69de811ce0881b577cd0c3bc39e13c14",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})),t("rebill-button",{key:"335a6328a75c0474ff6983bc0c3be5f8fdd62033",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"9d5427cb68781fe7b8202639ea9ef8f0fc13c6ed",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"1fba619b28bac4f85e2f00a7a227c91a4352f9b7",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"942aee63c06bc040ea304545ddf0dfc64235102a",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=m;const k=".wrapper{margin:0 auto;display:flex;flex-direction:column;align-items:center}.header{display:flex;flex-direction:column;align-items:center;gap:8px}.title{font-size:1rem;font-weight:500;color:var(--rebill-color-primary-dark-text);text-align:center}.amount{font-size:2.25rem;font-weight:500;color:var(--rebill-color-primary-dark-text);margin:0 0 1.5rem 0;text-align:center;line-height:1.1}.per{font-size:1.1rem;font-weight:400;color:var(--rebill-color-text-secondary)}.label-muted{font-size:1rem;color:var(--rebill-color-primary-dark);margin:0 0 1.5rem 0;text-align:center}.info{width:100%;margin-top:1.5rem;margin-bottom:3rem;display:flex;flex-direction:column;gap:1.4rem}.row{display:flex;justify-content:space-between;align-items:center;font-size:1rem;line-height:1.4;width:100%}.left{color:var(--rebill-color-text-secondary);font-weight:400}.right{color:var(--rebill-color-primary-dark-text);font-weight:400;text-align:right}.divider{border:none;border-top:1px solid var(--rebill-color-border);margin:1rem 0}@media (max-width: 1024px){.amount{margin-bottom:0}.row{font-size:0.9rem}.row:not(:last-child){margin-bottom:0.5rem}.left{color:var(--rebill-color-primary-dark-text)}}.total-row{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1rem;font-weight:600}.total-row .left{color:var(--rebill-color-primary-dark-text)}";const v=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];totalAmount;subTotalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;couponCode;discountAmount;discountPercentage;componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};getFrequencyText(){if(!this.frequency||!this.frequency.period)return"";const e=this.frequency.period.toLowerCase();const a=this.frequency.count;const r=`summary.${e}`;return s.translate(r,{count:a})}getDiscountAmount(){if(this.totalAmount<this.subTotalAmount){console.log("this.subTotalAmount",this.subTotalAmount);console.log("this.totalAmount",this.totalAmount);console.log("this.discountAmount",this.subTotalAmount-this.totalAmount);return this.subTotalAmount-this.totalAmount}return this.discountAmount||0}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},t("span",{class:"total-amount"},o(this.totalAmount,this.currency))," ",t("span",{class:"per"},"/ ",this.getFrequencyText().toLowerCase())));renderInfoRow=(e,a)=>t("div",{class:"row"},t("div",{class:"left"},e),t("div",{class:"right"},a));renderProduct=()=>this.renderInfoRow(this.subscriptionTitle,o(this.subscriptionAmount,this.currency));renderNextRenewal=()=>this.renderInfoRow(s.translate("renewal.nextRenewal"),u(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.subTotalAmount,this.currency));renderDiscount=()=>{if(this.getDiscountAmount()<=0)return null;return t("div",{class:"row"},t("div",{class:"left"},s.translate("summary.discount")),t("div",{class:"right discount-chip-wrapper"},t("discount-coupon",{displayMode:"readonly",readonlyCouponCode:this.couponCode||undefined,readonlyDiscountAmount:this.getDiscountAmount(),readonlyCurrency:this.currency})))};renderTotal=()=>t("div",{class:"total-row"},t("div",{class:"left"},s.translate("renewal.totalToRenew")),t("div",{class:"right"},o(this.totalAmount,this.currency)));renderDesktop=()=>t("div",{class:"wrapper"},this.renderHeader(),t("div",{class:"info"},t("div",{class:"row"},t("div",{class:""},s.translate("renewal.subscriptionDetails"))),this.renderProduct(),this.renderNextRenewal(),this.renderSubtotal(),this.renderDiscount()),this.renderTotal());render(){if(this.displayedComponents.includes("header")&&this.displayedComponents.includes("details")&&this.displayedComponents.includes("summary")){return this.renderDesktop()}if(this.displayedComponents.includes("header")){return this.renderHeader()}if(this.displayedComponents.includes("details")){return t("collapsible-card",{header:s.translate("summary.details")},this.renderProduct(),this.renderNextRenewal())}if(this.displayedComponents.includes("summary")){return t("collapsible-card",{header:s.translate("summary.summary")},this.renderInfoRow(this.subscriptionTitle,"1 x "+o(this.subscriptionAmount,this.currency)),this.renderSubtotal(),this.renderDiscount(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};v.style=k;export{w as renewal_success_page,v as renewal_summary};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as a,d as r,h as t}from"./p-D8cwEAmw.js";import{P as i,I as s,f as o,e as c,s as l}from"./p-DkbFAMha.js";import{r as n}from"./p-BOVs95c7.js";import{B as d,g as b,i as p}from"./p-Do_vNuMa.js";import{C as f}from"./p-DA598vBj.js";import{g as h,P as y}from"./p-Catt3XCa.js";import{f as g,a as u}from"./p--EE-bffI.js";import"./p-E-ZsRS8r.js";import"./p-C5OYI4I6.js";const m=":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}.renewal-success-page__success-content{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;overflow-x:hidden;box-sizing:border-box}.renewal-success-page__success-content rebill-typography[variant='h3']{margin:0 !important;padding:0 !important}.renewal-success-page__success-icon{display:flex;justify-content:center;margin:0.5rem 0}.renewal-success-page__info-card{padding:24px;gap:16px;width:100%;max-width:450px;border:1px solid #ebedef;border-radius:8px;display:flex;flex-direction:column;box-sizing:border-box}.renewal-success-page__card-row{display:flex;justify-content:space-between;align-items:start;min-height:20px;gap:15%}.renewal-success-page__card-row:last-of-type{margin-bottom:0}.renewal-success-page__card-value{display:flex;align-items:center;gap:0.5rem}.renewal-success-page__payment-method-display{display:flex;align-items:center;gap:8px;justify-content:center}.renewal-success-page__payment-method-display rebill-card-icon{display:inline-block;flex-shrink:0;margin-right:8px;vertical-align:middle}.renewal-success-page__payment-method-display rebill-card-icon svg{display:block}.renewal-success-page__payment-method-display rebill-icon{display:inline-block;vertical-align:middle;margin-right:8px}.renewal-success-page__payment-method-display rebill-icon div{display:block}.renewal-success-page__card-divider{height:1px;background:#e5e7eb}.renewal-success-page__download-container{display:flex;align-items:center;justify-content:flex-start;gap:2px;text-decoration:none;cursor:pointer}.renewal-success-page__contact-info{text-align:left}.renewal-success-page__reference-number{word-break:break-all;overflow-wrap:break-word;hyphens:auto;max-width:100%;text-align:right}.renewal-success-page__total-amount-container{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-direction:row}@media (max-width: 1024px){.renewal-success-page__success-content{max-width:100%;gap:1.5rem;margin-left:16px;margin-right:16px}.renewal-success-page__info-card{width:100%;max-width:100%;padding:12px}}@media (max-width: 767px){.renewal-success-page__info-card{padding:12px}}";const w=class{constructor(r){e(this,r);this.successRedirect=a(this,"successRedirect")}typePaymentMethod=i.CARD;country="";bank="";paymentMethodName="";cardLastFour="";paymentDate="";referenceNumber="";trialPeriodDays=0;debitDay=0;planAmount=0;currentLocale="es";breakpoint=d.DESKTOP;successRedirect;loaderProgress=0;isLoadingLottie=true;showRedirectMessage=false;timeToRedirect=3e3;progressInterval;lottieContainer;lottieAnimation;successDisplayTimeout;applyStartCaseToBrand=e=>{if(!e)return"";return e.toLowerCase().split(/[\s-]+/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")};getPaymentMethodConfig(e){const a=this.country?h(this.country):null;const r=a?.find((a=>a.type===e));const t={[i.CARD]:{key:i.CARD,label:s.translate("paymentMethods.card"),icons:["card"]},[i.CASH]:{key:i.CASH,label:s.translate("paymentMethods.cash"),icons:["pago-facil"]},[i.BANK_TRANSFER]:{key:i.BANK_TRANSFER,label:s.translate("paymentMethods.bank_transfer"),icons:["plus"]}};const o=t[e];return{...o,icons:r?.icons||o.icons}}getPaymentDate=()=>this.paymentDate||"";componentWillLoad(){this.breakpoint=b(window.innerWidth);if(this.showRedirectMessage){this.successDisplayTimeout=window.setTimeout((()=>{this.showRedirectMessage=true;this.loadLottieAnimation()}),1500);setTimeout((()=>{this.stopLoaderAnimation()}),this.timeToRedirect)}}componentDidLoad(){window.addEventListener("resize",this.handleResize);if(!this.showRedirectMessage){this.loadLottieAnimation()}}disconnectedCallback(){if(this.successDisplayTimeout){clearTimeout(this.successDisplayTimeout)}window.removeEventListener("resize",this.handleResize);this.stopLoaderAnimation()}handleResize=()=>{this.breakpoint=b(window.innerWidth)};loadLottieAnimation=async()=>{try{const e=await import("./p-GK75wIKe.js").then((function(e){return e.l}));const a=await fetch(r(`./assets/loader-redirect1.json`));const t=await a.json();if(this.lottieContainer){this.lottieAnimation=e.default.loadAnimation({container:this.lottieContainer,renderer:"svg",loop:true,autoplay:true,animationData:t})}else{this.startLoaderAnimation()}}catch(e){this.startLoaderAnimation()}};startLoaderAnimation=()=>{const e=3e3;const a=50;const r=a/e*100;this.progressInterval=window.setInterval((()=>{this.loaderProgress=Math.min(this.loaderProgress+r,100);if(this.loaderProgress>=100){this.stopLoaderAnimation()}}),a)};stopLoaderAnimation=()=>{if(this.progressInterval){clearInterval(this.progressInterval);this.progressInterval=undefined}if(this.lottieAnimation){this.lottieAnimation.destroy();this.lottieAnimation=undefined}};handleDownloadReceipt=async()=>{try{await y.generateAndDownloadReceipt({paymentMethod:this.typePaymentMethod===i.CARD?this.textPaymentMethodCard():this.paymentMethodName,...this.typePaymentMethod===i.BANK_TRANSFER&&{bank:this.bank},...this.typePaymentMethod===i.CARD&&{cardBrand:this.applyStartCaseToBrand(n.data.cardInformation?.brand||"")},...this.typePaymentMethod===i.CARD&&{cardLastFour:this.cardLastFour??n.data.cardInformation?.lastFour},paymentDate:g(this.getPaymentDate())||g((new Date).toISOString()),email:n.data.subscription.customerEmail||"",referenceNumber:this.referenceNumber,productTitle:n.data.subscription.name[0]?.text||"Subscription",subtotal:o(n.data.subscription.subTotalAmount,n.data.price.currency),total:o(n.data.price.amount,n.data.price.currency),currency:n.data.price.currency||" ",...this.getDiscountAmountValue()>0&&{discountAmount:o(this.getDiscountAmountValue(),n.data.price.currency)},trialPeriodDays:this.trialPeriodDays,debitDay:this.debitDay,planAmount:o(this.planAmount,n.data.price.currency),isBankTransfer:this.typePaymentMethod===i.BANK_TRANSFER})}catch(e){console.error("Error downloading receipt:",e)}};getDiscountAmountValue=()=>{if(n?.data?.price?.amount<n?.data?.subscription?.subTotalAmount){return n?.data?.subscription?.subTotalAmount-n?.data?.price?.amount}return 0};hasDiscount=()=>this.getDiscountAmountValue()>0;textPaymentMethodCard=()=>{const e=n.data?.cardInformation?.brand;const a=this.cardLastFour||n.data?.cardInformation?.lastFour;const r=this.applyStartCaseToBrand(e||"");return e&&a?`${r} - ${a}`:r};render(){return t("rebill-checkout-single-column",{key:"cb90cb24d93fb4245e4eaf3cdeeab4e278b2c546"},t("div",{key:"20e031f6307df3ffeceb32ff4bf1337ac54ad098",class:"renewal-success-page__success-content"},t("rebill-typography",{key:"199431628bf2461d82397f04146f5f830d5ed88f",variant:"h3",color:f.PRIMARY_DARK_TEXT},s.translate("processing.successTitle")),t("div",{key:"761a4e40d5b1653a3cd3e9b667027025b19dacf0",class:"renewal-success-page__success-icon"},t("svg",{key:"35c1f8a00382da91c35813c086a13236ef64d150",width:p(this.breakpoint,d.DESKTOP)?"64":"96",height:p(this.breakpoint,d.DESKTOP)?"64":"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}))),t("div",{key:"82ac13c8d26f7ac58c28e8b49518abe140749561",class:"renewal-success-page__info-card"},t("div",{key:"0b1c283d679bf968265a23b67fd8821c9a1a57db",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"ca1a8d98b07b2a681cf630f09d047a0c60063be6",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentMethod")),t("div",{key:"4449bcb86cddf6316f570bad14b240f3e328ae99",class:"renewal-success-page__card-value"},t("div",{key:"4858d10857b00244122145864cc92906abdcd24a",class:"renewal-success-page__payment-method-display"},this.typePaymentMethod===i.CARD&&t(t.Fragment,null,t("rebill-card-icon",{key:"b64cfc5c69e3c0627f361650f039e06329c9004e","card-brand":n.data?.cardInformation?.brand||""}),t("rebill-typography",{key:"7ef5fc2219158df995dfbcab3ecd35291ce6d1eb",variant:"body2",color:f.PRIMARY_DARK_TEXT},this.textPaymentMethodCard())),this.typePaymentMethod===i.BANK_TRANSFER&&t("div",{key:"9759c64a9ca925f6ad3ebe5be536451a2e7b8e9c",style:{display:"flex",alignItems:"center",gap:"8px"}},t("div",{key:"9b8b9987a82403e24f355fd68ca625d5ac6be0d0",style:{display:"flex",alignItems:"center",gap:"8px"}},this.getPaymentMethodConfig(i.BANK_TRANSFER).icons.map((e=>t("rebill-icon",{name:e,size:"24px"})))),t("rebill-typography",{key:"b830a51f477da38f4fad6d861d56d8473eedc1e0",variant:"body2",color:f.PRIMARY_DARK_TEXT},s.translate("paymentMethods.bank_transfer")))))),t("div",{key:"9f336dc44b09b227dca8d55f7543af8d6965340e",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"54487e54a1d044044748d39e838f0bcedc1806db",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentDate")),t("rebill-typography",{key:"f90cb87eaad022c8e4e8a7fd50b6efc98e96e5fb",variant:"body2",color:f.PRIMARY_DARK_TEXT},g(this.paymentDate||this.getPaymentDate())||"")),t("div",{key:"4f5dd152b68e4bf8f09929fc459204c9c9316c7d",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"977d12ffd4f81822f16e040f36380354569a38ee",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentEmail")),t("rebill-typography",{key:"62e10631ec66d641f7c2a2e18aecd583d14d51d1",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.customerEmail)),t("div",{key:"ef143339c11f42d47d5c29dcb77f432a6ab522ab",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"d7f341310f59a3f15a112cdcd393f60dd762f742",variant:"body2",color:f.SECONDARY},s.translate("processing.paymentReference")),t("rebill-typography",{key:"06c82cbdede33d774212a283229e51a27de9526f",variant:"body2",color:f.PRIMARY_DARK_TEXT,class:"renewal-success-page__reference-number"},this.referenceNumber||""))),t("div",{key:"6e1dc249302831b6d86174d69c766d4149e532d0",class:"renewal-success-page__info-card"},t("rebill-typography",{key:"b9c21efa101829c13f8cc13518c55769fdf2f210",variant:"subtitle-bold",color:f.PRIMARY_DARK_TEXT},s.translate("processing.purchaseDetails")),t("div",{key:"28d67a7e5b44c05d5c4d795c0293c841ee5b220f",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"907bb77f52600cff2d1cfd9cc66653d5a62f1d8a",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseDetail")),t("rebill-typography",{key:"ae917b6621a7e550793f363f64854cccc9c676c5",variant:"body2",color:f.PRIMARY_DARK_TEXT},n.data.subscription.name[0]?.text||"Subscription")),t("div",{key:"5aee63e2757c447c31a554563bc3bfe4442e9727",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"dfd32d9e61e6671ae0ccd7204efc0dc957ce6f5f",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseSubtotal")),t("rebill-typography",{key:"60d4e2c5d2a9907c7676692f123b9ac809726636",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.subscription.subTotalAmount,n.data.price.currency))),this.hasDiscount()&&t("div",{key:"c2b4d3539da9811e82e14f00e40995813642e281",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"4cc407db9e8654592ac8961793ac16c5c8bdc650",variant:"body2",color:f.SECONDARY},s.translate("summary.discount")),t("rebill-typography",{key:"8767ff24390fd66f61a3007ec5c89b23f4d15708",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(this.getDiscountAmountValue(),n.data.price.currency))),t("div",{key:"6f58d05abb853a328a91bfb773f2efbb46ddf766",class:"renewal-success-page__card-row"},t("rebill-typography",{key:"1b07af9baa275addf2270e9ebb652021ba3af2ad",variant:"body2",color:f.SECONDARY},s.translate("processing.purchaseMontoTotal")),t("div",{key:"01c846178f5a87baf3cebe47f373e93b415fd9fb",class:"renewal-success-page__total-amount-container"},t("rebill-typography",{key:"570f795573812b983aacd716fc95892c16ddb66f",variant:"body2",color:f.PRIMARY_DARK_TEXT},o(n.data.price.amount,n.data.price.currency)))),t("div",{key:"101e06be84246481dd7fb120b4e64df6656382e7",class:"renewal-success-page__card-divider"}),t("div",{key:"bad8e69d95ee7befdb613246328ff6ef9556cf9d",class:"renewal-success-page__download-container"},t("svg",{key:"97b4a2ac69de811ce0881b577cd0c3bc39e13c14",class:"download-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})),t("rebill-button",{key:"335a6328a75c0474ff6983bc0c3be5f8fdd62033",type:"button",variant:"download",size:"small",onClick:this.handleDownloadReceipt},t("rebill-typography",{key:"9d5427cb68781fe7b8202639ea9ef8f0fc13c6ed",variant:"overline",color:f.PRIMARY_DARK_TEXT},s.translate("processing.download")))),t("div",{key:"1fba619b28bac4f85e2f00a7a227c91a4352f9b7",class:"renewal-success-page__contact-info"},t("rebill-typography",{key:"942aee63c06bc040ea304545ddf0dfc64235102a",variant:"information-text",color:f.SECONDARY},s.translate("processing.downloadDescription"))))))}};w.style=m;const k=".wrapper{margin:0 auto;display:flex;flex-direction:column;align-items:center}.header{display:flex;flex-direction:column;align-items:center;gap:8px}.title{font-size:1rem;font-weight:500;color:var(--rebill-color-primary-dark-text);text-align:center}.amount{font-size:2.25rem;font-weight:500;color:var(--rebill-color-primary-dark-text);margin:0 0 1.5rem 0;text-align:center;line-height:1.1}.per{font-size:1.1rem;font-weight:400;color:var(--rebill-color-text-secondary)}.label-muted{font-size:1rem;color:var(--rebill-color-primary-dark);margin:0 0 1.5rem 0;text-align:center}.info{width:100%;margin-top:1.5rem;margin-bottom:3rem;display:flex;flex-direction:column;gap:1.4rem}.row{display:flex;justify-content:space-between;align-items:center;font-size:1rem;line-height:1.4;width:100%}.left{color:var(--rebill-color-text-secondary);font-weight:400}.right{color:var(--rebill-color-primary-dark-text);font-weight:400;text-align:right}.divider{border:none;border-top:1px solid var(--rebill-color-border);margin:1rem 0}@media (max-width: 1024px){.amount{margin-bottom:0}.row{font-size:0.9rem}.row:not(:last-child){margin-bottom:0.5rem}.left{color:var(--rebill-color-primary-dark-text)}}.total-row{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:1.1rem;font-weight:600}.total-row .left{color:var(--rebill-color-primary-dark-text)}";const v=class{constructor(a){e(this,a)}forceUpdate=0;displayedComponents=["header","details","summary"];totalAmount;subTotalAmount;subscriptionTitle;subscriptionAmount;nextChargeDate;frequency;currency;couponCode;discountAmount;discountPercentage;componentWillLoad(){c.on("languageChanged",this.handleLanguageChange)}disconnectedCallback(){c.off("languageChanged",this.handleLanguageChange)}handleLanguageChange=()=>{this.forceUpdate=this.forceUpdate+1};getFrequencyText(){if(!this.frequency||!this.frequency.period)return"";const e=this.frequency.period.toLowerCase();const a=this.frequency.count;const r=`summary.${e}`;return s.translate(r,{count:a})}getDiscountAmount(){if(this.totalAmount<this.subTotalAmount){return this.subTotalAmount-this.totalAmount}return this.discountAmount||0}renderHeader=()=>t("div",{class:"header"},t("p",{class:"title"},s.translate("renewal.title")),t("p",{class:"amount"},t("span",{class:"total-amount"},o(this.totalAmount,this.currency))," ",t("span",{class:"per"},"/ ",this.getFrequencyText().toLowerCase())));renderInfoRow=(e,a)=>t("div",{class:"row"},t("div",{class:"left"},e),t("div",{class:"right"},a));renderProduct=()=>this.renderInfoRow(this.subscriptionTitle,o(this.subscriptionAmount,this.currency));renderNextRenewal=()=>this.renderInfoRow(s.translate("renewal.nextRenewal"),u(this.nextChargeDate,undefined,l.currentLocale));renderSubtotal=()=>this.renderInfoRow(s.translate("renewal.subtotal"),o(this.subTotalAmount,this.currency));renderDiscount=()=>{if(this.getDiscountAmount()<=0)return null;return t("div",{class:"row"},t("div",{class:"left"},s.translate("summary.discount")),t("div",{class:"right discount-chip-wrapper"},t("discount-coupon",{displayMode:"readonly",readonlyCouponCode:this.couponCode||undefined,readonlyDiscountAmount:this.getDiscountAmount(),readonlyCurrency:this.currency})))};renderTotal=()=>t("div",{class:"total-row"},t("div",{class:"left"},s.translate("renewal.totalToRenew")),t("div",{class:"right"},o(this.totalAmount,this.currency)));renderDesktop=()=>t("div",{class:"wrapper"},this.renderHeader(),t("div",{class:"info"},t("div",{class:"row"},t("div",{class:""},s.translate("renewal.subscriptionDetails"))),this.renderProduct(),this.renderNextRenewal(),this.renderSubtotal(),this.renderDiscount()),this.renderTotal());render(){if(this.displayedComponents.includes("header")&&this.displayedComponents.includes("details")&&this.displayedComponents.includes("summary")){return this.renderDesktop()}if(this.displayedComponents.includes("header")){return this.renderHeader()}if(this.displayedComponents.includes("details")){return t("collapsible-card",{header:s.translate("summary.details")},this.renderProduct(),this.renderNextRenewal())}if(this.displayedComponents.includes("summary")){return t("collapsible-card",{header:s.translate("summary.summary")},this.renderInfoRow(this.subscriptionTitle,"1 x "+o(this.subscriptionAmount,this.currency)),this.renderSubtotal(),this.renderDiscount(),t("rebill-divider",null),this.renderInfoRow(s.translate("renewal.totalToRenew"),o(this.totalAmount,this.currency)))}}};v.style=k;export{w as renewal_success_page,v as renewal_summary};
|
|
2
|
+
//# sourceMappingURL=p-3a585ddc.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","getAssetPath","h","PAYMENT_METHOD_ENUM","I18nService","formatAmount","instance","state","renewalState","BREAKPOINT_ENUM","getBreakpoint","isBreakpointBelow","COLORS_ENUM","getCountryPaymentMethods","PDFGenerator","formatDateTime","formatDate","renewalSuccessPageCss","RenewalSuccessPage","constructor","hostRef","this","successRedirect","typePaymentMethod","CARD","country","bank","paymentMethodName","cardLastFour","paymentDate","referenceNumber","trialPeriodDays","debitDay","planAmount","currentLocale","breakpoint","DESKTOP","loaderProgress","isLoadingLottie","showRedirectMessage","timeToRedirect","progressInterval","lottieContainer","lottieAnimation","successDisplayTimeout","applyStartCaseToBrand","brand","toLowerCase","split","map","word","charAt","toUpperCase","slice","join","getPaymentMethodConfig","method","countryPaymentMethods","countrySpecificMethod","find","pm","type","defaultConfigs","key","label","translate","icons","CASH","BANK_TRANSFER","defaultConfig","getPaymentDate","componentWillLoad","window","innerWidth","setTimeout","loadLottieAnimation","stopLoaderAnimation","componentDidLoad","addEventListener","handleResize","disconnectedCallback","clearTimeout","removeEventListener","async","lottie","import","then","n","l","animationData","fetch","animationJson","json","default","loadAnimation","container","renderer","loop","autoplay","startLoaderAnimation","error","duration","interval","increment","setInterval","Math","min","clearInterval","undefined","destroy","handleDownloadReceipt","generateAndDownloadReceipt","paymentMethod","textPaymentMethodCard","cardBrand","data","cardInformation","lastFour","Date","toISOString","email","subscription","customerEmail","productTitle","name","text","subtotal","subTotalAmount","price","currency","total","amount","getDiscountAmountValue","discountAmount","isBankTransfer","console","hasDiscount","formattedBrand","render","class","variant","color","PRIMARY_DARK_TEXT","width","height","viewBox","fill","xmlns","d","SECONDARY","Fragment","style","display","alignItems","gap","iconName","size","stroke","onClick","renewalSummaryCss","RenewalSummary","forceUpdate","displayedComponents","totalAmount","subscriptionTitle","subscriptionAmount","nextChargeDate","frequency","couponCode","discountPercentage","on","handleLanguageChange","off","getFrequencyText","period","count","translationKey","getDiscountAmount","renderHeader","renderInfoRow","value","renderProduct","renderNextRenewal","renderSubtotal","renderDiscount","displayMode","readonlyCouponCode","readonlyDiscountAmount","readonlyCurrency","renderTotal","renderDesktop","includes","header"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAkBC,OAAcC,MAAS,8BAChEC,OAA0BC,OAAkBC,OAAmBC,OAAeC,MAAa,8BAC3FC,MAAoB,8BACpBC,OAAsBC,OAAoBC,MAAyB,8BACnEC,MAAmB,8BACnBC,OAA+BC,MAAoB,8BACnDC,OAAqBC,MAAkB,wBAC9C,wBACA,kBAEP,MAAMC,EAAwB,w3HAE9B,MAAMC,EAAqB,MACvB,WAAAC,CAAYC,GACRrB,EAAiBsB,KAAMD,GACvBC,KAAKC,gBAAkBtB,EAAYqB,KAAM,kBAC7C,CACAE,kBAAoBpB,EAAoBqB,KACxCC,QAAU,GACVC,KAAO,GACPC,kBAAoB,GACpBC,aAAe,GACfC,YAAc,GACdC,gBAAkB,GAClBC,gBAAkB,EAClBC,SAAW,EACXC,WAAa,EACbC,cAAgB,KAChBC,WAAa1B,EAAgB2B,QAC7Bd,gBACAe,eAAiB,EACjBC,gBAAkB,KAClBC,oBAAsB,MACtBC,eAAiB,IACjBC,iBACAC,gBACAC,gBACAC,sBACAC,sBAAyBC,IACrB,IAAKA,EACD,MAAO,GACX,OAAOA,EACFC,cACAC,MAAM,UACNC,KAAIC,GAAQA,EAAKC,OAAO,GAAGC,cAAgBF,EAAKG,MAAM,KACtDC,KAAK,IAAI,EAElB,sBAAAC,CAAuBC,GACnB,MAAMC,EAAwBpC,KAAKI,QAAUZ,EAAyBQ,KAAKI,SAAW,KACtF,MAAMiC,EAAwBD,GAAuBE,MAAKC,GAAMA,EAAGC,OAASL,IAE5E,MAAMM,EAAiB,CACnB,CAAC3D,EAAoBqB,MAAO,CACxBuC,IAAK5D,EAAoBqB,KACzBwC,MAAO5D,EAAY6D,UAAU,uBAC7BC,MAAO,CAAC,SAEZ,CAAC/D,EAAoBgE,MAAO,CACxBJ,IAAK5D,EAAoBgE,KACzBH,MAAO5D,EAAY6D,UAA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