rebill-web-components-sdk 1.8.32 → 1.8.34-beta.0
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 +12 -12
- package/dist/cjs/card-identification_5.cjs.entry.js +8 -8
- package/dist/cjs/collapsible-card.cjs.entry.js +1 -1
- package/dist/cjs/discount-coupon.rebill-divider.entry.cjs.js.map +1 -0
- package/dist/cjs/discount-coupon_2.cjs.entry.js +157 -0
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/input-otp.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.cjs.js.map +1 -1
- package/dist/cjs/organization-logo_4.cjs.entry.js +3 -3
- package/dist/cjs/otp-component_7.cjs.entry.js +8 -8
- package/dist/cjs/rebill-alert.cjs.entry.js +2 -2
- package/dist/cjs/rebill-card-carousel.cjs.entry.js +1 -1
- package/dist/cjs/rebill-card.cjs.entry.js +1 -1
- package/dist/cjs/rebill-container_2.cjs.entry.js +2 -2
- package/dist/cjs/rebill-flex-container.cjs.entry.js +1 -1
- package/dist/cjs/rebill-form.cjs.entry.js +1 -1
- package/dist/cjs/rebill-grid-container.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-select.cjs.entry.js +2 -2
- package/dist/cjs/rebill-input-text.cjs.entry.js +2 -2
- package/dist/cjs/rebill-renewal.cjs.entry.js +32 -12
- package/dist/cjs/rebill-renewal.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-timeline-debit-day.rebill-timeline-free-trial.entry.cjs.js.map +1 -0
- package/dist/cjs/{discount-coupon_3.cjs.entry.js → rebill-timeline-debit-day_2.cjs.entry.js} +3 -117
- package/dist/cjs/rebill-vertical-divider.cjs.entry.js +1 -1
- package/dist/cjs/rebill-web-components-sdk.cjs.js +1 -1
- package/dist/cjs/renewal-success-page.renewal-summary.entry.cjs.js.map +1 -1
- package/dist/cjs/renewal-success-page_2.cjs.entry.js +41 -13
- package/dist/cjs/{renewal.store-C9AesGY1.js → renewal.store-BaH9Id4E.js} +5 -2
- package/dist/cjs/renewal.store-BaH9Id4E.js.map +1 -0
- package/dist/cjs/root-component.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/discount-coupon/discount-coupon.css +4 -0
- package/dist/collection/components/checkout/discount-coupon/discount-coupon.js +104 -4
- package/dist/collection/components/checkout/discount-coupon/discount-coupon.js.map +1 -1
- package/dist/collection/components/checkout/otp/otp.js +4 -4
- package/dist/collection/components/checkout/payment-method-selector/card-fields/card-fields-wrapper.js +2 -2
- package/dist/collection/components/checkout/payment-method-selector/card-fields/identification/identification.js +1 -1
- package/dist/collection/components/checkout/payment-method-selector/card-fields/iframe/CardIframe.js +2 -2
- package/dist/collection/components/checkout/payment-method-selector/card-fields/iframe/skeleton/CardSkeleton.js +1 -1
- package/dist/collection/components/checkout/payment-method-selector/card-fields/installments/installments.js +2 -2
- package/dist/collection/components/checkout/rebill-footer/rebill-footer.css +1 -1
- package/dist/collection/components/checkout/rebill-footer/rebill-footer.js +1 -1
- package/dist/collection/components/checkout/user-information/user-information-phone.js +1 -1
- package/dist/collection/components/checkout/user-information/user-information.js +3 -3
- package/dist/collection/components/renewal/rebill-renewal.js +31 -11
- package/dist/collection/components/renewal/rebill-renewal.js.map +1 -1
- package/dist/collection/components/renewal/renewal-success-page/renewal-success-page.js +2 -2
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js +101 -16
- package/dist/collection/components/renewal/renewal-summary/renewal-summary.js.map +1 -1
- package/dist/collection/components/root-component/root-component.js +1 -1
- package/dist/collection/components/shared/alert/alert.js +2 -2
- package/dist/collection/components/shared/card/card.js +1 -1
- package/dist/collection/components/shared/card-carousel/card-carousel.js +1 -1
- package/dist/collection/components/shared/collapsible-card/collapsible-card.js +1 -1
- package/dist/collection/components/shared/divider/divider.js +1 -1
- package/dist/collection/components/shared/divider/vertical-divider.js +1 -1
- package/dist/collection/components/shared/form/form.js +1 -1
- package/dist/collection/components/shared/inputs/input-checkbox/input-checkbox.js +1 -1
- package/dist/collection/components/shared/inputs/input-combo/input-combo.js +1 -1
- package/dist/collection/components/shared/inputs/input-otp/input-otp.js +2 -2
- package/dist/collection/components/shared/inputs/input-phone/input-phone.js +2 -2
- package/dist/collection/components/shared/inputs/input-select/input-select.js +2 -2
- package/dist/collection/components/shared/inputs/input-text/input-text.js +2 -2
- package/dist/collection/components/shared/layouts/custom/single-column/checkout-single-column.js +1 -1
- package/dist/collection/components/shared/layouts/generics/container.js +1 -1
- package/dist/collection/components/shared/layouts/generics/flex.js +1 -1
- package/dist/collection/components/shared/layouts/generics/grid.js +1 -1
- package/dist/collection/components/shared/mode-sandbox/mode-sandbox-mobile.js +1 -1
- package/dist/collection/components/shared/selectable-card/selectable-card.js +2 -2
- package/dist/collection/components/shared/singlePaymentMethod/singlePaymentMethod.js +4 -4
- package/dist/collection/components/shared/timeline/timeline-debit-day.js +1 -1
- package/dist/collection/components/shared/timeline/timeline-free-trial.js +1 -1
- package/dist/collection/models/renewal.model.js.map +1 -1
- package/dist/collection/store/renewal.store.js +3 -0
- package/dist/collection/store/renewal.store.js.map +1 -1
- package/dist/components/apm-checkout.js +1 -1
- package/dist/components/bank-transfer.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/card-skeleton.js +1 -1
- package/dist/components/collapsible-card.js +1 -1
- package/dist/components/discount-coupon.js +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/otp-component.js +1 -1
- package/dist/components/{p-BbLfqjb0.js → p-3K2fnS0h.js} +5 -5
- package/dist/components/{p-BbLfqjb0.js.map → p-3K2fnS0h.js.map} +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-Dm2xJSTe.js → p-B0QvmxUI.js} +3 -3
- package/dist/components/{p-Dm2xJSTe.js.map → p-B0QvmxUI.js.map} +1 -1
- package/dist/components/{p-CYhj6VLQ.js → p-B544NesK.js} +4 -4
- package/dist/components/{p-CYhj6VLQ.js.map → p-B544NesK.js.map} +1 -1
- package/dist/components/{p-mA3Sj5fj.js → p-B7uE6iBd.js} +11 -11
- package/dist/components/{p-mA3Sj5fj.js.map → p-B7uE6iBd.js.map} +1 -1
- package/dist/components/{p-1ZvL9CLG.js → p-BLbS7nF7.js} +3 -3
- package/dist/components/{p-1ZvL9CLG.js.map → p-BLbS7nF7.js.map} +1 -1
- package/dist/components/{p-qI3t-gYu.js → p-BZYd-So1.js} +4 -4
- package/dist/components/{p-qI3t-gYu.js.map → p-BZYd-So1.js.map} +1 -1
- package/dist/components/{p-tTqPr5zM.js → p-BeVdyYff.js} +6 -6
- package/dist/components/{p-tTqPr5zM.js.map → p-BeVdyYff.js.map} +1 -1
- package/dist/components/{p-1I-sUD5D.js → p-BuNsfNGm.js} +6 -6
- package/dist/components/{p-1I-sUD5D.js.map → p-BuNsfNGm.js.map} +1 -1
- package/dist/components/{p-BV_MHtDc.js → p-C0LGxeng.js} +3 -3
- package/dist/components/{p-BV_MHtDc.js.map → p-C0LGxeng.js.map} +1 -1
- package/dist/components/{p-DvXuQN4U.js → p-CD0TNzOh.js} +12 -12
- package/dist/components/{p-DvXuQN4U.js.map → p-CD0TNzOh.js.map} +1 -1
- package/dist/components/{p-wjfhDzgd.js → p-CKYowY5T.js} +4 -4
- package/dist/components/{p-wjfhDzgd.js.map → p-CKYowY5T.js.map} +1 -1
- package/dist/components/{p-ChnuJbVe.js → p-C_S6-o9t.js} +10 -10
- package/dist/components/{p-ChnuJbVe.js.map → p-C_S6-o9t.js.map} +1 -1
- package/dist/components/{p-CKiwr2yo.js → p-CajUouzQ.js} +3 -3
- package/dist/components/{p-CKiwr2yo.js.map → p-CajUouzQ.js.map} +1 -1
- package/dist/components/{p-fEiok6NF.js → p-CfUbJq8-.js} +3 -3
- package/dist/components/{p-fEiok6NF.js.map → p-CfUbJq8-.js.map} +1 -1
- package/dist/components/{p-BWkW7_Hh.js → p-CisP549A.js} +36 -9
- package/dist/components/p-CisP549A.js.map +1 -0
- package/dist/components/{p-DiNW75Kd.js → p-CmYsenWG.js} +3 -3
- package/dist/components/{p-DiNW75Kd.js.map → p-CmYsenWG.js.map} +1 -1
- package/dist/components/{p-QzWBUSLD.js → p-CneaXzeq.js} +4 -4
- package/dist/components/{p-QzWBUSLD.js.map → p-CneaXzeq.js.map} +1 -1
- package/dist/components/{p-Di8WeTd9.js → p-CuX2faVH.js} +4 -4
- package/dist/components/{p-Di8WeTd9.js.map → p-CuX2faVH.js.map} +1 -1
- package/dist/components/{p-h8TZeiqt.js → p-D0AmEJnp.js} +6 -6
- package/dist/components/{p-h8TZeiqt.js.map → p-D0AmEJnp.js.map} +1 -1
- package/dist/components/{p-B1BCKuQ0.js → p-D1lAYXxG.js} +8 -8
- package/dist/components/{p-B1BCKuQ0.js.map → p-D1lAYXxG.js.map} +1 -1
- package/dist/components/{p-BnBTbmTe.js → p-DA0QxWuE.js} +4 -4
- package/dist/components/{p-BnBTbmTe.js.map → p-DA0QxWuE.js.map} +1 -1
- package/dist/components/{p-CpXk4UfE.js → p-DBi6K19S.js} +5 -5
- package/dist/components/{p-CpXk4UfE.js.map → p-DBi6K19S.js.map} +1 -1
- package/dist/components/{p-gj5jUg6C.js → p-DDp9qjAz.js} +3 -3
- package/dist/components/{p-gj5jUg6C.js.map → p-DDp9qjAz.js.map} +1 -1
- package/dist/components/{p-DlrQ_kVv.js → p-DIILFLsN.js} +5 -5
- package/dist/components/{p-DlrQ_kVv.js.map → p-DIILFLsN.js.map} +1 -1
- package/dist/components/{p-CNBrNMEa.js → p-DKn8wDv6.js} +3 -3
- package/dist/components/{p-CNBrNMEa.js.map → p-DKn8wDv6.js.map} +1 -1
- package/dist/components/{p-D6yu2OYw.js → p-DPUz_1Ev.js} +5 -5
- package/dist/components/{p-D6yu2OYw.js.map → p-DPUz_1Ev.js.map} +1 -1
- package/dist/components/{p-BL08tUBX.js → p-DRTzT9ks.js} +3 -3
- package/dist/components/{p-BL08tUBX.js.map → p-DRTzT9ks.js.map} +1 -1
- package/dist/components/{p-DSFlA7FF.js → p-DaS8xGPM.js} +5 -5
- package/dist/components/{p-DSFlA7FF.js.map → p-DaS8xGPM.js.map} +1 -1
- package/dist/components/{p-DZWQyp55.js → p-DgRM4z7g.js} +3 -3
- package/dist/components/{p-DZWQyp55.js.map → p-DgRM4z7g.js.map} +1 -1
- package/dist/components/{p-DU4kUISl.js → p-Dm8Dxmer.js} +5 -5
- package/dist/components/{p-DU4kUISl.js.map → p-Dm8Dxmer.js.map} +1 -1
- package/dist/components/{p-DrAiGSzG.js → p-Dp8EoajW.js} +3 -3
- package/dist/components/{p-DrAiGSzG.js.map → p-Dp8EoajW.js.map} +1 -1
- package/dist/components/{p-BX1_zmbg.js → p-DvV5MmYi.js} +5 -5
- package/dist/components/{p-BX1_zmbg.js.map → p-DvV5MmYi.js.map} +1 -1
- package/dist/components/{p-4hVDutj0.js → p-DzdUnkvh.js} +3 -3
- package/dist/components/{p-4hVDutj0.js.map → p-DzdUnkvh.js.map} +1 -1
- package/dist/components/{p-D3QILlvg.js → p-HzmATjhQ.js} +5 -5
- package/dist/components/p-HzmATjhQ.js.map +1 -0
- package/dist/components/{p-CVtNCEPd.js → p-PBF27XTU.js} +3 -3
- package/dist/components/{p-CVtNCEPd.js.map → p-PBF27XTU.js.map} +1 -1
- package/dist/components/{p-BmjU_TBT.js → p-QTa3HvQl.js} +3 -3
- package/dist/components/{p-BmjU_TBT.js.map → p-QTa3HvQl.js.map} +1 -1
- package/dist/components/{p-WQJ1HwUp.js → p-dgrAtFYi.js} +6 -6
- package/dist/components/{p-WQJ1HwUp.js.map → p-dgrAtFYi.js.map} +1 -1
- package/dist/components/{p-RGadlsa-.js → p-hpg1lOUJ.js} +5 -2
- package/dist/components/p-hpg1lOUJ.js.map +1 -0
- package/dist/components/{p-D4oYYfeG.js → p-nkv8Z87a.js} +8 -8
- package/dist/components/{p-D4oYYfeG.js.map → p-nkv8Z87a.js.map} +1 -1
- package/dist/components/{p-dtookouT.js → p-nvpvagPB.js} +7 -7
- package/dist/components/{p-dtookouT.js.map → p-nvpvagPB.js.map} +1 -1
- package/dist/components/{p-B-Wxp2_p.js → p-oE_0ElW3.js} +69 -20
- package/dist/components/p-oE_0ElW3.js.map +1 -0
- package/dist/components/{p-CKZvdOpK.js → p-qDaQOriJ.js} +4 -4
- package/dist/components/{p-CKZvdOpK.js.map → p-qDaQOriJ.js.map} +1 -1
- package/dist/components/{p-lfUd06gm.js → p-rnhSIhil.js} +3 -3
- package/dist/components/{p-lfUd06gm.js.map → p-rnhSIhil.js.map} +1 -1
- package/dist/components/{p-Dr1acigj.js → p-xNgCL9nV.js} +4 -4
- package/dist/components/{p-Dr1acigj.js.map → p-xNgCL9nV.js.map} +1 -1
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/qr-code.js +1 -1
- package/dist/components/rebill-address-form.js +1 -1
- package/dist/components/rebill-address-search.js +1 -1
- package/dist/components/rebill-address.js +1 -1
- package/dist/components/rebill-alert.js +1 -1
- package/dist/components/rebill-bank-selector.js +1 -1
- package/dist/components/rebill-card-carousel.js +1 -1
- package/dist/components/rebill-card.js +1 -1
- package/dist/components/rebill-checkout-form.js +1 -1
- package/dist/components/rebill-checkout-single-column.js +1 -1
- package/dist/components/rebill-checkout.js +39 -39
- package/dist/components/rebill-container.js +1 -1
- package/dist/components/rebill-divider.js +1 -1
- package/dist/components/rebill-flex-container.js +1 -1
- package/dist/components/rebill-footer.js +1 -1
- package/dist/components/rebill-form.js +1 -1
- package/dist/components/rebill-grid-container.js +1 -1
- package/dist/components/rebill-input-checkbox.js +1 -1
- package/dist/components/rebill-input-combo.js +1 -1
- package/dist/components/rebill-input-phone.js +1 -1
- package/dist/components/rebill-input-select.js +1 -1
- package/dist/components/rebill-input-text.js +1 -1
- package/dist/components/rebill-installments.js +1 -1
- package/dist/components/rebill-mode-sandbox-mobile.js +1 -1
- package/dist/components/rebill-processing-payment.js +1 -1
- package/dist/components/rebill-renewal.js +77 -51
- package/dist/components/rebill-renewal.js.map +1 -1
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/rebill-timeline-debit-day.js +1 -1
- package/dist/components/rebill-timeline-free-trial.js +1 -1
- package/dist/components/rebill-vertical-divider.js +1 -1
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/renewal-summary.js +1 -1
- package/dist/components/root-component.js +6 -6
- package/dist/components/selectable-card.js +1 -1
- package/dist/components/single-payment-method.js +1 -1
- package/dist/components/success-page.js +1 -1
- package/dist/components/user-information-phone.js +1 -1
- package/dist/components/user-information.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +12 -12
- package/dist/esm/card-identification_5.entry.js +8 -8
- package/dist/esm/collapsible-card.entry.js +1 -1
- package/dist/esm/discount-coupon.rebill-divider.entry.js.map +1 -0
- package/dist/esm/discount-coupon_2.entry.js +154 -0
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/input-otp.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.js.map +1 -1
- package/dist/esm/organization-logo_4.entry.js +3 -3
- package/dist/esm/otp-component_7.entry.js +8 -8
- package/dist/esm/rebill-alert.entry.js +2 -2
- package/dist/esm/rebill-card-carousel.entry.js +1 -1
- package/dist/esm/rebill-card.entry.js +1 -1
- package/dist/esm/rebill-container_2.entry.js +2 -2
- package/dist/esm/rebill-flex-container.entry.js +1 -1
- package/dist/esm/rebill-form.entry.js +1 -1
- package/dist/esm/rebill-grid-container.entry.js +1 -1
- package/dist/esm/rebill-input-select.entry.js +2 -2
- package/dist/esm/rebill-input-text.entry.js +2 -2
- package/dist/esm/rebill-renewal.entry.js +32 -12
- package/dist/esm/rebill-renewal.entry.js.map +1 -1
- package/dist/esm/rebill-timeline-debit-day.rebill-timeline-free-trial.entry.js.map +1 -0
- package/dist/esm/{discount-coupon_3.entry.js → rebill-timeline-debit-day_2.entry.js} +6 -119
- package/dist/esm/rebill-vertical-divider.entry.js +1 -1
- package/dist/esm/rebill-web-components-sdk.js +1 -1
- package/dist/esm/renewal-success-page.renewal-summary.entry.js.map +1 -1
- package/dist/esm/renewal-success-page_2.entry.js +41 -13
- package/dist/esm/{renewal.store-C6hSvhsF.js → renewal.store-vAxzxA8H.js} +5 -2
- package/dist/esm/renewal.store-vAxzxA8H.js.map +1 -0
- package/dist/esm/root-component.entry.js +1 -1
- package/dist/rebill-web-components-sdk/discount-coupon.rebill-divider.entry.esm.js.map +1 -0
- package/dist/rebill-web-components-sdk/organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/p-012e3770.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-012e3770.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-1c3e7171.entry.js → p-0239917e.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-edb69e28.entry.js → p-1ac036d7.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-36a897c4.entry.js → p-1d7e392c.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-e5b0f2b9.entry.js → p-2ebb1d54.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-e8eadef6.entry.js → p-3a5bdb02.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-5df71605.entry.js → p-43924d1d.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-43924d1d.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-9084f3ef.entry.js → p-47ee3edc.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-92de0c03.entry.js → p-508cc019.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-924e7ec2.entry.js → p-515e9e16.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-5ac0522d.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-821e1fed.entry.js → p-6089b208.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-63baba00.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-63baba00.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/{p-a0d6b0c0.entry.js → p-6ea98ccf.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-bc6f455d.entry.js → p-7287e0f0.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-26f12a67.entry.js → p-8c7f75c0.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-26f12a67.entry.js.map → p-8c7f75c0.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-c8a5a137.entry.js → p-aa96087c.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-63020e78.entry.js → p-ad9a6685.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-7e94aec8.entry.js → p-e0a3f3a8.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/p-e242be38.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-e242be38.entry.js.map +1 -0
- package/dist/rebill-web-components-sdk/p-f672574a.entry.js +2 -0
- package/dist/rebill-web-components-sdk/p-nVuaISVM.js +2 -0
- package/dist/rebill-web-components-sdk/p-nVuaISVM.js.map +1 -0
- package/dist/rebill-web-components-sdk/rebill-renewal.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-timeline-debit-day.rebill-timeline-free-trial.entry.esm.js.map +1 -0
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/dist/rebill-web-components-sdk/renewal-success-page.renewal-summary.entry.esm.js.map +1 -1
- package/dist/types/components/checkout/discount-coupon/discount-coupon.d.ts +5 -0
- package/dist/types/components/renewal/renewal-summary/renewal-summary.d.ts +12 -5
- package/dist/types/components.d.ts +24 -4
- package/dist/types/models/renewal.model.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/discount-coupon.rebill-timeline-debit-day.rebill-timeline-free-trial.entry.cjs.js.map +0 -1
- package/dist/cjs/rebill-divider.cjs.entry.js +0 -18
- package/dist/cjs/rebill-divider.entry.cjs.js.map +0 -1
- package/dist/cjs/renewal.store-C9AesGY1.js.map +0 -1
- package/dist/components/p-B-Wxp2_p.js.map +0 -1
- package/dist/components/p-BWkW7_Hh.js.map +0 -1
- package/dist/components/p-D3QILlvg.js.map +0 -1
- package/dist/components/p-RGadlsa-.js.map +0 -1
- package/dist/esm/discount-coupon.rebill-timeline-debit-day.rebill-timeline-free-trial.entry.js.map +0 -1
- package/dist/esm/rebill-divider.entry.js +0 -16
- package/dist/esm/rebill-divider.entry.js.map +0 -1
- package/dist/esm/renewal.store-C6hSvhsF.js.map +0 -1
- package/dist/rebill-web-components-sdk/discount-coupon.rebill-timeline-debit-day.rebill-timeline-free-trial.entry.esm.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-43675422.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-43675422.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-51571e15.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-5df71605.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-7ea96b11.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-CdYpsLqg.js +0 -2
- package/dist/rebill-web-components-sdk/p-CdYpsLqg.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-b519d8a2.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-b519d8a2.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/p-eb6a2c0d.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-eb6a2c0d.entry.js.map +0 -1
- package/dist/rebill-web-components-sdk/rebill-divider.entry.esm.js.map +0 -1
- /package/dist/rebill-web-components-sdk/{p-1c3e7171.entry.js.map → p-0239917e.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-edb69e28.entry.js.map → p-1ac036d7.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-36a897c4.entry.js.map → p-1d7e392c.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-e5b0f2b9.entry.js.map → p-2ebb1d54.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-e8eadef6.entry.js.map → p-3a5bdb02.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-9084f3ef.entry.js.map → p-47ee3edc.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-92de0c03.entry.js.map → p-508cc019.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-924e7ec2.entry.js.map → p-515e9e16.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-51571e15.entry.js.map → p-5ac0522d.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-821e1fed.entry.js.map → p-6089b208.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-a0d6b0c0.entry.js.map → p-6ea98ccf.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-bc6f455d.entry.js.map → p-7287e0f0.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-c8a5a137.entry.js.map → p-aa96087c.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-63020e78.entry.js.map → p-ad9a6685.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-7e94aec8.entry.js.map → p-e0a3f3a8.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-7ea96b11.entry.js.map → p-f672574a.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, d as getAssetPath, h } from './index-D8cwEAmw.js';
|
|
2
2
|
import { P as PAYMENT_METHOD_ENUM, I as I18nService, f as formatAmount, e as instance, s as state } from './i18n.service-D2TBhbJY.js';
|
|
3
|
-
import { r as renewalState } from './renewal.store-
|
|
3
|
+
import { r as renewalState } from './renewal.store-vAxzxA8H.js';
|
|
4
4
|
import { B as BREAKPOINT_ENUM, g as getBreakpoint, i as isBreakpointBelow } from './breakpoint-Do_vNuMa.js';
|
|
5
5
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
6
6
|
import { g as getCountryPaymentMethods, P as PDFGenerator } from './pdf-generator-IaRVwbhQ.js';
|
|
@@ -201,9 +201,9 @@ const RenewalSuccessPage = class {
|
|
|
201
201
|
return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;
|
|
202
202
|
};
|
|
203
203
|
render() {
|
|
204
|
-
return (h("rebill-checkout-single-column", { key: '
|
|
204
|
+
return (h("rebill-checkout-single-column", { key: 'e2146edfbd50d59dc29b1b1f9bf65a0a4fa62d99' }, h("div", { key: 'a66cd3a74d7f1101ff6b80c0cb5ebf8ece74f0fa', class: "renewal-success-page__success-content" }, h("rebill-typography", { key: '006d639c3bbf87f00cd5a54a471f34ca441ef567', variant: "h3", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.successTitle')), h("div", { key: '018ca7c5c6c8738b869d1b74924ec65e51088b10', class: "renewal-success-page__success-icon" }, h("svg", { key: '6ea6d85826586426c59e98564c798b6056b05b2d', width: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96', height: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96', viewBox: "0 0 96 96", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '86f2b5114a0628dc3db093f2e7cbe4f7a59b12c4', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z", fill: "#35B093" }))), h("div", { key: 'c9575e3a1d2627caf0aa80ea29240b0730b20dd2', class: "renewal-success-page__info-card" }, h("div", { key: 'afe371111cf2f4cda615ecb32eec06f652a9154b', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '38dc7a45fbeb51b4916a617e60be972f7e03c5ac', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentMethod')), h("div", { key: 'f6f93a8dac29163f7901b8adbd5816754715c109', class: "renewal-success-page__card-value" }, h("div", { key: 'f2e8e8ee445ba3078dce3a76f6a82290424449cd', class: "renewal-success-page__payment-method-display" }, this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (h(h.Fragment, null, h("rebill-card-icon", { key: 'c8176486ea186d7a87314cdefe373152bd1d1736', "card-brand": renewalState.data?.cardInformation?.brand || '' }), h("rebill-typography", { key: '8275ffadcdae6f22dc1693b2d0f14a2f13973dec', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, this.textPaymentMethodCard()))), this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (h("div", { key: 'd841b51309ff60d7562ea4dfd9229b3737b86b25', style: { display: 'flex', alignItems: 'center', gap: '8px' } }, h("div", { key: '6f8f18b839c59222030b5ba8767e785f530deb18', style: { display: 'flex', alignItems: 'center', gap: '8px' } }, this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(iconName => {
|
|
205
205
|
return h("rebill-icon", { name: iconName, size: "24px" });
|
|
206
|
-
})), h("rebill-typography", { key: '
|
|
206
|
+
})), h("rebill-typography", { key: 'cdc1f6e8824cec829d63b86951b787a42e51590a', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('paymentMethods.bank_transfer'))))))), h("div", { key: 'ae4594811c441f28816ab96b1541d52bf6ccb581', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: 'f182608a30ca95723f525c2f412dba6b913fd31a', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentDate')), h("rebill-typography", { key: '8274d6f30d424022d7572f09542abd4d3cc26102', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, formatDateTime(this.paymentDate || this.getPaymentDate()) || '')), h("div", { key: 'cc8a1e805cdbe2a059e0d3d55ac00ad9a5a6c54b', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '2c27cda2c104b58dc9cd3cdb0d5e34d4d2de776d', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentEmail')), h("rebill-typography", { key: '0848731cf49df91c67630dc074d2cd5b1a23d2c0', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, renewalState.data.subscription.customerEmail)), h("div", { key: 'c2ca80947dae7e8650a14466501601252e389ede', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: 'aad476e68218021d5b329c67f5e4a3d2d0cf8408', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.paymentReference')), h("rebill-typography", { key: '5805602cd60f1a597dab5f3b08936aab1f413413', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT, class: "renewal-success-page__reference-number" }, this.referenceNumber || ''))), h("div", { key: '08ddc28d25d2a44fe7f5967310c1d85691411344', class: "renewal-success-page__info-card" }, h("rebill-typography", { key: '4169af6ef1a19ca4f803a2f40698038eba00fab5', variant: "subtitle-bold", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.purchaseDetails')), h("div", { key: '53bb4e1ec2bfaf7978cc130c4b695b821b1a047f', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '06b15d3b19eb904ca807533c2d1c09d35987e876', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseDetail')), h("rebill-typography", { key: '75b11c207c212ecfb8b8e534055fed63284e04f4', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, renewalState.data.subscription.name[0]?.text || 'Subscription')), h("div", { key: 'd708351cd149371409dc1463ea4cc50c89483afd', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '466df181658f791dcdab0f90f2b3b4273b4d52d5', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseSubtotal')), h("rebill-typography", { key: '2075bf46e03956f38d10a1be0e81a4b376f8890a', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, this.getFormattedSubtotal())), h("div", { key: '8f303e0df89e32e81701d35893eaf52e9b1fb292', class: "renewal-success-page__card-row" }, h("rebill-typography", { key: '5692c09557b35fb139e1bd7e4fe058ae6a3710f6', variant: "body2", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.purchaseMontoTotal')), h("div", { key: 'c53f7ff474c7fbb496c57ed682bcfd72952efe19', class: "renewal-success-page__total-amount-container" }, h("rebill-typography", { key: 'c80499907d5b09f9672295cd0a455c86ad4769f6', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, this.getFormattedTotal()))), h("div", { key: '634c3dd9943445daa4e22f25e967d9d87626cec3', class: "renewal-success-page__card-divider" }), h("div", { key: '85242693ccd3b20d4185969db706e189522d57e2', class: "renewal-success-page__download-container" }, h("svg", { key: 'ce9a62f0dbef94f68bb6123c41a03b8d7dd1882e', class: "download-icon", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '08d9eb758104099b0659f18ce923e113e1bd6545', d: "M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" })), h("rebill-button", { key: '87939ff2ac53d1846765a75950bb2f83fef0a297', type: "button", variant: "download", size: "small", onClick: this.handleDownloadReceipt }, h("rebill-typography", { key: '71f24c5a35d00b90f7c7276fffd99799bf458f49', variant: "overline", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, I18nService.translate('processing.download')))), h("div", { key: 'f6298572d821d8c71e432c5218ef505dfcab0b13', class: "renewal-success-page__contact-info" }, h("rebill-typography", { key: '783e48675a837e12359795342de5220344c4a534', variant: "information-text", color: COLORS_ENUM.SECONDARY }, I18nService.translate('processing.downloadDescription')))))));
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
RenewalSuccessPage.style = renewalSuccessPageCss;
|
|
@@ -220,6 +220,15 @@ const RenewalSummary = class {
|
|
|
220
220
|
'details',
|
|
221
221
|
'summary',
|
|
222
222
|
];
|
|
223
|
+
totalAmount;
|
|
224
|
+
subscriptionTitle;
|
|
225
|
+
subscriptionAmount;
|
|
226
|
+
nextChargeDate;
|
|
227
|
+
frequency;
|
|
228
|
+
currency;
|
|
229
|
+
couponCode;
|
|
230
|
+
discountAmount;
|
|
231
|
+
discountPercentage;
|
|
223
232
|
componentWillLoad() {
|
|
224
233
|
instance.on('languageChanged', this.handleLanguageChange);
|
|
225
234
|
}
|
|
@@ -229,12 +238,6 @@ const RenewalSummary = class {
|
|
|
229
238
|
handleLanguageChange = () => {
|
|
230
239
|
this.forceUpdate = this.forceUpdate + 1;
|
|
231
240
|
};
|
|
232
|
-
totalAmount;
|
|
233
|
-
subscriptionTitle;
|
|
234
|
-
subscriptionAmount;
|
|
235
|
-
nextChargeDate;
|
|
236
|
-
frequency;
|
|
237
|
-
currency;
|
|
238
241
|
getFrequencyText() {
|
|
239
242
|
if (!this.frequency || !this.frequency.period)
|
|
240
243
|
return '';
|
|
@@ -243,8 +246,28 @@ const RenewalSummary = class {
|
|
|
243
246
|
const translationKey = `summary.${period}`;
|
|
244
247
|
return I18nService.translate(translationKey, { count });
|
|
245
248
|
}
|
|
249
|
+
getDiscountAmount() {
|
|
250
|
+
const amountDiscount = Math.max(0, this.discountAmount);
|
|
251
|
+
if (amountDiscount > 0) {
|
|
252
|
+
return amountDiscount;
|
|
253
|
+
}
|
|
254
|
+
const percentage = this.discountPercentage;
|
|
255
|
+
if (percentage && percentage > 0) {
|
|
256
|
+
const base = this.totalAmount;
|
|
257
|
+
const percentageDiscount = (base * percentage) / 100;
|
|
258
|
+
return Math.max(0, percentageDiscount);
|
|
259
|
+
}
|
|
260
|
+
return 0;
|
|
261
|
+
}
|
|
262
|
+
getFinalAmount() {
|
|
263
|
+
const final = this.totalAmount - this.getDiscountAmount();
|
|
264
|
+
return Math.max(0, final);
|
|
265
|
+
}
|
|
266
|
+
hasDiscount() {
|
|
267
|
+
return this.getDiscountAmount() > 0;
|
|
268
|
+
}
|
|
246
269
|
renderHeader = () => {
|
|
247
|
-
return (h("div", { class: "header" }, h("p", { class: "title" }, I18nService.translate('renewal.title')), h("p", { class: "amount" }, formatAmount(this.
|
|
270
|
+
return (h("div", { class: "header" }, h("p", { class: "title" }, I18nService.translate('renewal.title')), h("p", { class: "amount" }, h("span", { class: "total-amount" }, formatAmount(this.getFinalAmount(), this.currency)), ' ', h("span", { class: "per" }, "/ ", this.getFrequencyText().toLowerCase()))));
|
|
248
271
|
};
|
|
249
272
|
renderInfoRow = (label, value) => {
|
|
250
273
|
return (h("div", { class: "row" }, h("div", { class: "left" }, label), h("div", { class: "right" }, value)));
|
|
@@ -258,11 +281,16 @@ const RenewalSummary = class {
|
|
|
258
281
|
renderSubtotal = () => {
|
|
259
282
|
return this.renderInfoRow(I18nService.translate('renewal.subtotal'), formatAmount(this.totalAmount, this.currency));
|
|
260
283
|
};
|
|
284
|
+
renderDiscount = () => {
|
|
285
|
+
if (!this.hasDiscount())
|
|
286
|
+
return null;
|
|
287
|
+
return (h("div", { class: "row" }, h("div", { class: "left" }, I18nService.translate('summary.discount')), h("div", { class: "right discount-chip-wrapper" }, h("discount-coupon", { displayMode: "readonly", readonlyCouponCode: this.couponCode || undefined, readonlyDiscountAmount: this.getDiscountAmount(), readonlyCurrency: this.currency }))));
|
|
288
|
+
};
|
|
261
289
|
renderTotal = () => {
|
|
262
|
-
return (h("div", { class: "total-row" }, h("div", { class: "left" }, I18nService.translate('renewal.totalToRenew')), h("div", { class: "right" }, formatAmount(this.
|
|
290
|
+
return (h("div", { class: "total-row" }, h("div", { class: "left" }, I18nService.translate('renewal.totalToRenew')), h("div", { class: "right" }, formatAmount(this.getFinalAmount(), this.currency))));
|
|
263
291
|
};
|
|
264
292
|
renderDesktop = () => {
|
|
265
|
-
return (h("div", { class: "wrapper" }, this.renderHeader(), h("div", { class: "info" }, h("div", { class: "row" }, h("div", { class: "" }, I18nService.translate('renewal.subscriptionDetails'))), this.renderProduct(), this.renderNextRenewal(), this.renderSubtotal()), this.renderTotal()));
|
|
293
|
+
return (h("div", { class: "wrapper" }, this.renderHeader(), h("div", { class: "info" }, h("div", { class: "row" }, h("div", { class: "" }, I18nService.translate('renewal.subscriptionDetails'))), this.renderProduct(), this.renderNextRenewal(), this.renderSubtotal(), this.renderDiscount()), this.renderTotal()));
|
|
266
294
|
};
|
|
267
295
|
render() {
|
|
268
296
|
if (this.displayedComponents.includes('header') &&
|
|
@@ -277,7 +305,7 @@ const RenewalSummary = class {
|
|
|
277
305
|
return (h("collapsible-card", { header: I18nService.translate('summary.details') }, this.renderProduct(), this.renderNextRenewal()));
|
|
278
306
|
}
|
|
279
307
|
if (this.displayedComponents.includes('summary')) {
|
|
280
|
-
return (h("collapsible-card", { header: I18nService.translate('summary.summary') }, this.renderInfoRow(this.subscriptionTitle, '1 x ' + formatAmount(this.subscriptionAmount, this.currency)), this.renderSubtotal(), h("rebill-divider", null), this.renderInfoRow(I18nService.translate('renewal.totalToRenew'), formatAmount(this.
|
|
308
|
+
return (h("collapsible-card", { header: I18nService.translate('summary.summary') }, this.renderInfoRow(this.subscriptionTitle, '1 x ' + formatAmount(this.subscriptionAmount, this.currency)), this.renderSubtotal(), this.renderDiscount(), h("rebill-divider", null), this.renderInfoRow(I18nService.translate('renewal.totalToRenew'), formatAmount(this.getFinalAmount(), this.currency))));
|
|
281
309
|
}
|
|
282
310
|
}
|
|
283
311
|
};
|
|
@@ -61,6 +61,9 @@ const initialRenewalState = {
|
|
|
61
61
|
currency: '',
|
|
62
62
|
country: '',
|
|
63
63
|
paymentMethods: [],
|
|
64
|
+
couponCode: null,
|
|
65
|
+
discountPercentage: 0,
|
|
66
|
+
discountedAmount: 0,
|
|
64
67
|
},
|
|
65
68
|
paymentMethods: [],
|
|
66
69
|
country: '',
|
|
@@ -193,6 +196,6 @@ class RenewalStore {
|
|
|
193
196
|
}
|
|
194
197
|
|
|
195
198
|
export { RenewalStore as R, onChange as o, renewalState as r };
|
|
196
|
-
//# sourceMappingURL=renewal.store-
|
|
199
|
+
//# sourceMappingURL=renewal.store-vAxzxA8H.js.map
|
|
197
200
|
|
|
198
|
-
//# sourceMappingURL=renewal.store-
|
|
201
|
+
//# sourceMappingURL=renewal.store-vAxzxA8H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renewal.store-vAxzxA8H.js","sources":["src/store/renewal.store.ts"],"sourcesContent":["import { createStore } from '@stencil/store';\nimport { SavedCard } from '../api/entities/cards/types';\nimport {\n CreateAPMCheckoutResponse,\n CreateCardCheckoutResponse,\n} from '../api/entities/checkout/types';\nimport { ENUM_INSTALLMENT_MODEL } from '../models/enums/installment.enum';\nimport { PAYMENT_METHOD_ENUM } from '../models/enums/payment-methods.enum';\nimport { RebillRenewalProps, RenewalSession } from '../models/renewal.model';\n\nexport interface RenewalSessionState {\n token: string;\n data: RenewalSession;\n form: {\n isLoading: boolean;\n selectedPaymentMethod?: PAYMENT_METHOD_ENUM;\n selectedCard?: SavedCard;\n cvv?: string;\n savedCards: SavedCard[];\n checkoutResponse?: CreateCardCheckoutResponse | CreateAPMCheckoutResponse | null;\n userIdentification?: {\n documentType?: string;\n documentNumber?: string;\n };\n selectedBankId?: string;\n };\n isInitialized: boolean;\n fetchingInstallments: boolean;\n cardMode?: 'input' | 'select' | null;\n deviceId?: string;\n providerKey?: string;\n}\n\nconst initialRenewalState: RenewalSessionState = {\n token: '',\n data: {\n id: '',\n cardId: '',\n cardTokenId: '',\n cardInformation: {\n brand: '',\n type: '',\n isoCountry: '',\n bank: '',\n lastFour: '',\n installments: {\n isAvailableInstallments: false,\n installments: [],\n selectedInstallment: undefined,\n },\n },\n subscription: {\n id: '',\n organizationId: '',\n status: '',\n name: [],\n description: [],\n planId: null,\n amount: 0,\n currency: '',\n isPriceFixed: false,\n targetCurrency: null,\n isProcessing: false,\n frequency: {\n count: 0,\n period: null,\n },\n repetitions: 0,\n currentRepetitions: 0,\n debitDay: null,\n type: '',\n lastChargeDate: '',\n nextChargeDate: '',\n remainingIterations: 0,\n customerId: '',\n customerName: '',\n customerEmail: '',\n paymentMethod: '',\n cardId: null,\n cardLastFour: null,\n trialPeriodDays: null,\n metadata: null,\n createdAt: '',\n },\n organization: {\n id: '',\n name: '',\n logoUrl: null,\n },\n price: {\n amount: 0,\n currency: '',\n country: '',\n paymentMethods: [],\n couponCode: null,\n discountPercentage: 0,\n discountedAmount: 0,\n },\n paymentMethods: [],\n country: '',\n createdAt: '',\n updatedAt: '',\n },\n form: {\n isLoading: false,\n savedCards: [],\n },\n isInitialized: false,\n fetchingInstallments: false,\n cardMode: 'select',\n};\n\nexport const { state: renewalState, onChange } =\n createStore<RenewalSessionState>(initialRenewalState);\n\nexport class RenewalStore {\n static initializeRenewal(renewalProps: RebillRenewalProps) {\n const { token, ...allProps } = renewalProps;\n renewalState.token = token;\n renewalState.data = allProps;\n renewalState.data.country = allProps.country;\n\n if (allProps.subscription?.cardId) {\n renewalState.data.cardId = allProps.subscription.cardId;\n }\n\n renewalState.isInitialized = true;\n }\n\n static setLoading(isLoading: boolean) {\n renewalState.form = {\n ...renewalState.form,\n isLoading,\n };\n }\n\n static setSelectedPaymentMethod(paymentMethod: PAYMENT_METHOD_ENUM) {\n renewalState.form = {\n ...renewalState.form,\n selectedPaymentMethod: paymentMethod,\n };\n }\n\n static setSelectedCard(card: SavedCard) {\n renewalState.form = {\n ...renewalState.form,\n selectedCard: card,\n };\n }\n\n static setCvv(cvv: string) {\n renewalState.form = {\n ...renewalState.form,\n cvv,\n };\n }\n\n static setSavedCards(cards: SavedCard[]) {\n renewalState.form = {\n ...renewalState.form,\n savedCards: cards,\n };\n }\n\n static setCheckoutResponse(response: CreateCardCheckoutResponse | CreateAPMCheckoutResponse) {\n renewalState.form = {\n ...renewalState.form,\n checkoutResponse: response,\n };\n }\n\n static setUserIdentification(identification: { documentType?: string; documentNumber?: string }) {\n renewalState.form = {\n ...renewalState.form,\n userIdentification: {\n ...renewalState.form.userIdentification,\n ...identification,\n },\n };\n }\n\n static clearRenewal() {\n renewalState.data = initialRenewalState.data;\n renewalState.form = initialRenewalState.form;\n renewalState.isInitialized = false;\n }\n\n static getRenewalState(): RenewalSessionState {\n return renewalState;\n }\n\n static setCardId(cardId: string) {\n renewalState.data.cardId = cardId;\n }\n\n static setCardTokenId(cardTokenId: string) {\n renewalState.data.cardTokenId = cardTokenId;\n }\n\n static setFetchingInstallments(fetchingInstallments: boolean) {\n renewalState.fetchingInstallments = fetchingInstallments;\n }\n\n static setCardInformation(cardInformation: {\n brand: string;\n type: string;\n isoCountry: string;\n bank: string;\n lastFour?: string;\n installments: {\n installments: {\n model: ENUM_INSTALLMENT_MODEL;\n cft: number;\n installment: number;\n totalAmount: number;\n installmentAmount: number;\n cftAmount: number;\n }[];\n };\n }) {\n if (cardInformation) {\n renewalState.data.cardInformation = {\n ...cardInformation,\n installments: {\n ...renewalState.data.cardInformation?.installments,\n installments: cardInformation.installments.installments,\n isAvailableInstallments: !!cardInformation.installments.installments.length,\n },\n };\n } else {\n renewalState.data.cardInformation = {\n brand: '',\n type: '',\n isoCountry: '',\n bank: '',\n lastFour: '',\n installments: {\n isAvailableInstallments: false,\n installments: [],\n selectedInstallment: undefined,\n },\n };\n }\n }\n\n static setSelectedBankId(bankId: string) {\n renewalState.form = {\n ...renewalState.form,\n selectedBankId: bankId,\n };\n }\n\n static setCardMode(cardMode: 'input' | 'select' | null) {\n renewalState.cardMode = cardMode;\n }\n\n static setDeviceId(deviceId: string) {\n renewalState.deviceId = deviceId;\n }\n\n static setProviderKey(providerKey: string) {\n renewalState.providerKey = providerKey;\n }\n}\n"],"names":[],"mappings":";;AAiCA,MAAM,mBAAmB,GAAwB;AAC/C,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,eAAe,EAAE;AACf,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,UAAU,EAAE,EAAE;AACd,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,YAAY,EAAE;AACZ,gBAAA,uBAAuB,EAAE,KAAK;AAC9B,gBAAA,YAAY,EAAE,EAAE;AAChB,gBAAA,mBAAmB,EAAE,SAAS;AAC/B,aAAA;AACF,SAAA;AACD,QAAA,YAAY,EAAE;AACZ,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,cAAc,EAAE,EAAE;AAClB,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,MAAM,EAAE,CAAC;AACT,YAAA,QAAQ,EAAE,EAAE;AACZ,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE,IAAI;AACpB,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,SAAS,EAAE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;AACL,YAAA,YAAY,CAAC,IAAI,CAAC,eAAe,GAAG;AAClC,gBAAA,KAAK,EAAE,EAAE;AACT,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,UAAU,EAAE,EAAE;AACd,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,QAAQ,EAAE,EAAE;AACZ,gBAAA,YAAY,EAAE;AACZ,oBAAA,uBAAuB,EAAE,KAAK;AAC9B,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,mBAAmB,EAAE,SAAS;AAC/B,iBAAA;aACF;;;IAIL,OAAO,iBAAiB,CAAC,MAAc,EAAA;QACrC,YAAY,CAAC,IAAI,GAAG;YAClB,GAAG,YAAY,CAAC,IAAI;AACpB,YAAA,cAAc,EAAE,MAAM;SACvB;;IAGH,OAAO,WAAW,CAAC,QAAmC,EAAA;AACpD,QAAA,YAAY,CAAC,QAAQ,GAAG,QAAQ;;IAGlC,OAAO,WAAW,CAAC,QAAgB,EAAA;AACjC,QAAA,YAAY,CAAC,QAAQ,GAAG,QAAQ;;IAGlC,OAAO,cAAc,CAAC,WAAmB,EAAA;AACvC,QAAA,YAAY,CAAC,WAAW,GAAG,WAAW;;AAEzC;;;;"}
|
|
@@ -52,7 +52,7 @@ const RootComponent = class {
|
|
|
52
52
|
SessionStore.setDiscount(null);
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h("div", { key: '
|
|
55
|
+
return (h("div", { key: '564e1491e1df14c02c46df6840d4f615d83e1d31' }, h("div", { key: '2600d34a558565c7c45310e5349926958e025ef0', style: { display: 'flex', justifyContent: 'flex-end', padding: '1rem' } }, h("rebill-button", { key: '5fad0458517fceafcfab3fa2704206b61e528220', onClick: () => this.handleLanguageChange(this.currentLang === LOCALES_ENUM.EN ? LOCALES_ENUM.ES : LOCALES_ENUM.EN) }, this.currentLang === LOCALES_ENUM.EN ? 'Cambiar a Español' : 'Switch to English')), h("rebill-form", { key: '7cf4b4d03bdaf7169915336b34acb8dc42fd752b', validationSchema: this.validationSchema, initialData: this.formData, onSubmit: e => this.handleSubmit(e), onChange: e => this.handleChange(e), renderForm: ({ submit, formData: _formData, errors }) => (h("rebill-container", { maxWidth: "800px" }, h("h3", null, I18nService.translate('common.welcome')), h("rebill-input-text", { id: "nombre", label: "Nombre", placeholder: "Ingrese su nombre", error: errors.nombre }), h("rebill-input-text", { id: "apellido", label: "Apellido", placeholder: "Ingrese su apellido", error: errors.apellido }), h("rebill-input-select", { disabled: true, id: "pais", label: "Pa\u00EDs", error: errors.pais, options: [
|
|
56
56
|
{ label: 'Argentina', value: 'AR' },
|
|
57
57
|
{ label: 'Brasil', value: 'BR' },
|
|
58
58
|
{ label: 'Chile', value: 'CL' },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-coupon.rebill-divider.entry.esm.js","sources":["src/components/checkout/discount-coupon/discount-coupon.css?tag=discount-coupon","src/components/checkout/discount-coupon/discount-coupon.tsx","src/components/shared/divider/divider.css?tag=rebill-divider","src/components/shared/divider/divider.tsx"],"sourcesContent":[".summary-row {\n gap: 12px;\n}\n.coupon-chip {\n display: flex;\n align-items: center;\n background: var(--rebill-color-background);\n border: 1px solid var(--rebill-color-border-primary);\n justify-content: space-between;\n border-radius: 6px;\n padding: 4px 8px;\n gap: 8px;\n width: fit-content;\n}\n\n.coupon-chip--readonly {\n cursor: default;\n}\n\n.coupon-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n}\n\n.coupon-close {\n cursor: pointer;\n}\n\n.coupon-content {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 4px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { sessionState, SessionStore } from '../../../store/session.store';\nimport { formatAmountWithoutCurrency } from '../../../utils';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\n\nenum ACTION_STATUS {\n EDITING = 'editing',\n APPLIED = 'applied',\n NOT_APPLIED = 'not_applied',\n}\n\n@Component({\n tag: 'discount-coupon',\n styleUrl: 'discount-coupon.css',\n shadow: false,\n})\nexport class DiscountCoupon {\n @Element() el: HTMLElement;\n @Prop() hideLabel: boolean = false;\n @Prop() displayMode: 'editable' | 'readonly' = 'editable';\n @Prop() readonlyCouponCode?: string;\n @Prop() readonlyDiscountAmount?: number;\n @Prop() readonlyCurrency?: string;\n @State() couponCode: string = '';\n @State() actionStatus: ACTION_STATUS = ACTION_STATUS.NOT_APPLIED;\n @State() isLoading: boolean = false;\n @State() isError: boolean = false;\n @State() currentLocale: string = sessionState.currentLocale;\n @Event() discountApplied: EventEmitter<boolean>;\n private inputRef: HTMLRebillInputTextElement;\n private unsubscribeCurrentLocaleStore?: () => void;\n\n componentWillLoad() {\n this.unsubscribeCurrentLocaleStore = SessionStore.onChange('currentLocale', () => {\n this.currentLocale = sessionState.currentLocale;\n });\n\n if (this.readonlyCouponCode) {\n return;\n }\n\n if (\n sessionState.data.pricing.discountCouponCode &&\n sessionState.data.pricing.discountAmount > 0\n ) {\n this.actionStatus = ACTION_STATUS.APPLIED;\n this.couponCode = sessionState.data.pricing.discountCouponCode;\n }\n }\n\n disconnectedCallback() {\n if (this.unsubscribeCurrentLocaleStore) {\n this.unsubscribeCurrentLocaleStore();\n }\n }\n componentDidUpdate() {\n if (this.readonlyCouponCode) {\n return;\n }\n\n if (this.actionStatus === ACTION_STATUS.EDITING && this.inputRef) {\n setTimeout(async () => {\n const inputElement = await this.inputRef.getInputElement();\n if (inputElement) {\n inputElement.focus();\n }\n }, 0);\n }\n }\n\n private async onApplyCoupon() {\n if (this.readonlyCouponCode) return;\n const sessionId = sessionState.data.sessionId;\n if (!sessionId) {\n return;\n }\n this.isLoading = true;\n try {\n const response = await api.discountCoupon.applyDiscountCoupon({\n couponCode: this.couponCode,\n quantity: 1,\n sessionId: sessionId,\n organizationId: sessionState.data.organization.id,\n });\n this.actionStatus = ACTION_STATUS.APPLIED;\n SessionStore.setDiscount({\n couponCode: this.couponCode,\n amount: response.amount,\n discountType: response.discountType,\n discountAmount: response.discountedAmount,\n discountedPercentage: response?.discountedPercentage || 0,\n discountDuration: response?.discountDuration || null,\n });\n this.discountApplied.emit(true);\n } catch (error) {\n this.actionStatus = ACTION_STATUS.EDITING;\n this.discountApplied.emit(false);\n this.isError = true;\n SessionStore.setDiscount(null);\n } finally {\n this.isLoading = false;\n }\n }\n\n private onCancelCoupon() {\n if (this.readonlyCouponCode) return;\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n this.isError = false;\n }\n\n private renderReadonlyView() {\n if (!this.readonlyCouponCode && this.readonlyDiscountAmount) {\n return null;\n }\n\n return (\n <div class=\"coupon-chip coupon-chip--readonly\">\n <rebill-icon name=\"tag-sale\" size=\"16px\" />\n <div class=\"coupon-content\">\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.readonlyCouponCode}\n </rebill-typography>\n {this.readonlyDiscountAmount && (\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.GREEN}>\n -$\n {formatAmountWithoutCurrency(\n this.readonlyDiscountAmount,\n this.readonlyCurrency as any,\n )}\n </rebill-typography>\n )}\n </div>\n </div>\n );\n }\n\n render() {\n if (this.readonlyCouponCode) {\n return this.renderReadonlyView();\n }\n\n return (\n <div>\n <div\n class=\"summary-row\"\n style={{\n alignItems: this.actionStatus === ACTION_STATUS.EDITING ? 'flex-start' : 'center',\n display: 'flex',\n }}\n >\n {!this.hideLabel && (\n <rebill-typography\n variant=\"body2\"\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '7px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.discount')}\n </rebill-typography>\n )}\n {this.actionStatus === ACTION_STATUS.NOT_APPLIED && (\n <rebill-button\n variant=\"filled\"\n size=\"small\"\n theme=\"primary-dark\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n {I18nService.translate('discountCoupons.addDiscount')}\n </rebill-button>\n )}\n {this.actionStatus === ACTION_STATUS.EDITING && (\n <div class=\"summary-row\" style={{ alignItems: 'flex-start', display: 'flex' }}>\n <rebill-input-text\n ref={el => (this.inputRef = el)}\n id=\"discountCoupon\"\n value={this.couponCode}\n placeholder={I18nService.translate('discountCoupons.addDiscount')}\n disabled={this.isLoading}\n error={this.isError ? I18nService.translate('discountCoupons.error') : ''}\n clearable={true}\n uppercase={true}\n onInput={e => {\n e.stopPropagation();\n if (e.detail && e.detail.value !== undefined) {\n this.couponCode = e.detail.value;\n }\n }}\n onBlur={() => {\n if (!this.couponCode.trim()) {\n this.onCancelCoupon();\n }\n }}\n />\n <rebill-button\n variant=\"filled\"\n theme=\"primary-dark\"\n size=\"small\"\n loading={this.isLoading}\n disabled={this.isLoading || !this.couponCode.trim()}\n onClick={() => this.onApplyCoupon()}\n style={{ marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '3px' : '0px' }}\n >\n {I18nService.translate('discountCoupons.apply')}\n </rebill-button>\n </div>\n )}\n {this.actionStatus === ACTION_STATUS.APPLIED && (\n <div class=\"coupon-chip\">\n <rebill-icon name=\"tag-sale\" size=\"16px\" />\n <div\n class=\"coupon-content\"\n onClick={() => (this.actionStatus = ACTION_STATUS.EDITING)}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {sessionState.data.pricing.discountCouponCode}\n </rebill-typography>\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.GREEN}>\n -$\n {formatAmountWithoutCurrency(\n sessionState.data.pricing.discountAmount,\n sessionState.data.pricing.currency,\n )}\n </rebill-typography>\n </div>\n <div\n class=\"coupon-close\"\n onClick={() => {\n this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n SessionStore.setDiscount(null);\n this.discountApplied.emit(false);\n }}\n >\n <rebill-icon name=\"x\" size=\"20px\" color={COLORS_ENUM.PRIMARY_DARK_TEXT} />\n </div>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n",".rebill-divider {\n border: none;\n border-top: 0.5px solid var(--rebill-color-border-primary);\n width: 100%;\n height: 0.5px;\n}\n","import { Component, h } from '@stencil/core';\nimport './divider.css';\n\n@Component({\n tag: 'rebill-divider',\n styleUrl: 'divider.css',\n shadow: false,\n})\nexport class Divider {\n render() {\n return <div class=\"rebill-divider\"></div>;\n }\n}\n"],"names":["sessionState"],"mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,ggBAAggB;;ACO1hB,IAAK,aAIJ;AAJD,CAAA,UAAK,aAAa,EAAA;AAChB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAJI,aAAa,KAAb,aAAa,GAIjB,EAAA,CAAA,CAAA;MAOY,cAAc,GAAA,MAAA;;;;;;IAEjB,SAAS,GAAY,KAAK;IAC1B,WAAW,GAA4B,UAAU;AACjD,IAAA,kBAAkB;AAClB,IAAA,sBAAsB;AACtB,IAAA,gBAAgB;IACf,UAAU,GAAW,EAAE;AACvB,IAAA,YAAY,GAAkB,aAAa,CAAC,WAAW;IACvD,SAAS,GAAY,KAAK;IAC1B,OAAO,GAAY,KAAK;AACxB,IAAA,aAAa,GAAWA,KAAY,CAAC,aAAa;AAClD,IAAA,eAAe;AAChB,IAAA,QAAQ;AACR,IAAA,6BAA6B;IAErC,iBAAiB,GAAA;QACf,IAAI,CAAC,6BAA6B,GAAG,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAK;AAC/E,YAAA,IAAI,CAAC,aAAa,GAAGA,KAAY,CAAC,aAAa;AACjD,SAAC,CAAC;AAEF,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B;;AAGF,QAAA,IACEA,KAAY,CAAC,IAAI,CAAC,OAAO,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AAW,CAAC,iBAAiB,GAAI,CACtE,CACF,CACP,CACG,CACF;;;;;AC/OZ,MAAM,UAAU,GAAG,gHAAgH;;MCQtH,OAAO,GAAA,MAAA;;;;IAClB,MAAM,GAAA;AACJ,QAAA,OAAO,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,gBAAgB,GAAO;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.esm.js","sources":["src/components/shared/card-icon/card-icon.css?tag=rebill-card-icon","src/components/shared/card-icon/card-icon.tsx","src/components/shared/organization-logo/organization-logo.css?tag=organization-logo","src/components/shared/organization-logo/organization-logo.tsx","src/components/shared/layouts/custom/single-column/checkout-single-column.css?tag=rebill-checkout-single-column","src/components/shared/layouts/custom/single-column/checkout-single-column.tsx","src/components/checkout/rebill-footer/rebill-footer.css?tag=rebill-footer","src/components/checkout/rebill-footer/rebill-footer.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.card-icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\nenum PAYMENT_ICON_TYPE_ENUM {\n VISA = 'visa',\n MASTERCARD = 'mastercard',\n DISCOVER = 'discover',\n JCB = 'jcb',\n UNIONPAY = 'unionpay',\n MAESTRO = 'maestro',\n MIR = 'mir',\n ELO = 'elo',\n HIPER = 'hiper',\n HIPERCARD = 'hipercard',\n GENERIC = 'generic',\n AMEX = 'amex',\n DINERS = 'diners',\n}\n\nconst CARD_TYPE_MAP: Record<string, PAYMENT_ICON_TYPE_ENUM> = {\n 'visa': PAYMENT_ICON_TYPE_ENUM.VISA,\n 'mastercard': PAYMENT_ICON_TYPE_ENUM.MASTERCARD,\n 'american-express': PAYMENT_ICON_TYPE_ENUM.AMEX,\n 'amex': PAYMENT_ICON_TYPE_ENUM.AMEX,\n 'diners-club': PAYMENT_ICON_TYPE_ENUM.DINERS,\n 'discover': PAYMENT_ICON_TYPE_ENUM.DISCOVER,\n 'jcb': PAYMENT_ICON_TYPE_ENUM.JCB,\n 'unionpay': PAYMENT_ICON_TYPE_ENUM.UNIONPAY,\n 'maestro': PAYMENT_ICON_TYPE_ENUM.MAESTRO,\n 'mir': PAYMENT_ICON_TYPE_ENUM.MIR,\n 'elo': PAYMENT_ICON_TYPE_ENUM.ELO,\n 'hiper': PAYMENT_ICON_TYPE_ENUM.HIPER,\n 'hipercard': PAYMENT_ICON_TYPE_ENUM.HIPERCARD,\n};\n\n@Component({\n tag: 'rebill-card-icon',\n styleUrl: 'card-icon.css',\n shadow: false,\n})\nexport class CardIcon {\n @Prop() cardBrand?: string;\n @Prop() width?: number = 35;\n @Prop() height?: number = 24;\n\n private getCardType(): PAYMENT_ICON_TYPE_ENUM {\n if (this.cardBrand) {\n const brandLower = this.cardBrand.toLowerCase();\n return CARD_TYPE_MAP[brandLower] || PAYMENT_ICON_TYPE_ENUM.GENERIC;\n }\n return PAYMENT_ICON_TYPE_ENUM.GENERIC;\n }\n\n private renderVisaIcon() {\n return (\n <svg\n width=\"23\"\n height=\"16\"\n viewBox=\"0 0 23 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.5\" y=\"0.5\" width=\"22\" height=\"15\" rx=\"2\" fill=\"white\" stroke=\"#D9D9D9\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.02517 10.8392H5.63182L4.58697 6.79524C4.53738 6.60922 4.43208 6.44477 4.27718 6.36726C3.89063 6.17248 3.46468 6.01746 3 5.93928V5.78359H5.24458C5.55437 5.78359 5.78671 6.01746 5.82543 6.28908L6.36756 9.20609L7.76023 5.78359H9.11486L7.02517 10.8392ZM9.88932 10.8392H8.57341L9.65698 5.78359H10.9729L9.88932 10.8392ZM12.6754 7.18413C12.7141 6.91184 12.9464 6.75615 13.2175 6.75615C13.6434 6.71706 14.1074 6.79524 14.4947 6.98935L14.727 5.90087C14.3398 5.74517 13.9138 5.66699 13.5273 5.66699C12.2501 5.66699 11.3207 6.36726 11.3207 7.33915C11.3207 8.07851 11.979 8.46673 12.4437 8.7006C12.9464 8.9338 13.14 9.08949 13.1013 9.32269C13.1013 9.67249 12.7141 9.82818 12.3275 9.82818C11.8629 9.82818 11.3982 9.71158 10.9729 9.5168L10.7406 10.606C11.2052 10.8001 11.708 10.8783 12.1726 10.8783C13.6047 10.9167 14.4947 10.2171 14.4947 9.167C14.4947 7.84464 12.6754 7.76713 12.6754 7.18413ZM19.1 10.8392L18.0552 5.78359H16.9329C16.7005 5.78359 16.4682 5.93928 16.3907 6.17248L14.4559 10.8392H15.8106L16.081 10.1005H17.7454L17.9003 10.8392H19.1ZM17.1265 7.14505L17.513 9.05041H16.4294L17.1265 7.14505Z\"\n fill=\"#172B85\"\n />\n </svg>\n );\n }\n\n private renderMastercardIcon() {\n return (\n <svg\n width=\"35\"\n height=\"25\"\n viewBox=\"0 0 35 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.5\" y=\"1.01758\" width=\"34\" height=\"23\" rx=\"3.5\" fill=\"white\" stroke=\"#D9D9D9\" />\n <path\n d=\"M22.1758 5.51758C25.9444 5.51758 29 8.60848 29 12.4209C28.9998 16.2332 25.9443 19.3232 22.1758 19.3232C20.4864 19.3231 18.9416 18.7007 17.75 17.6719C16.5584 18.7007 15.0137 19.3231 13.3242 19.3232C9.55566 19.3232 6.50018 16.2332 6.5 12.4209C6.5 8.60848 9.55555 5.51758 13.3242 5.51758C15.0134 5.51769 16.5584 6.13943 17.75 7.16797C18.9416 6.13943 20.4866 5.51769 22.1758 5.51758Z\"\n fill=\"#ED0006\"\n />\n <path\n d=\"M22.1758 5.51758C25.9444 5.51758 29 8.60848 29 12.4209C28.9998 16.2332 25.9443 19.3232 22.1758 19.3232C20.4863 19.3231 18.9416 18.7007 17.75 17.6719C19.2164 16.4058 20.1474 14.524 20.1475 12.4209C20.1475 10.3174 19.2168 8.4341 17.75 7.16797C18.9416 6.13943 20.4866 5.51769 22.1758 5.51758Z\"\n fill=\"#F9A000\"\n />\n <path\n d=\"M17.75 7.16895C19.2166 8.43507 20.1475 10.3176 20.1475 12.4209C20.1475 14.524 19.2163 16.4058 17.75 17.6719C16.2837 16.4058 15.3525 14.524 15.3525 12.4209C15.3525 10.3176 16.2834 8.43507 17.75 7.16895Z\"\n fill=\"#FF5E00\"\n />\n </svg>\n );\n }\n\n private renderAmexIcon() {\n return (\n <svg\n width=\"23\"\n height=\"16\"\n viewBox=\"0 0 23 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect\n x=\"0.216981\"\n y=\"0.216981\"\n width=\"22.566\"\n height=\"15.566\"\n rx=\"0.867925\"\n fill=\"#1F72CD\"\n stroke=\"#D9D9D9\"\n stroke-width=\"0.433962\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.1443 5.62012L2 10.5758H4.56703L4.88527 9.78562H5.61269L5.93093 10.5758H8.75651V9.9727L9.00828 10.5758H10.4699L10.7217 9.95995V10.5758H16.5981L17.3127 9.80614L17.9817 10.5758L21 10.5821L18.8489 8.11177L21 5.62012H18.0285L17.333 6.37551L16.685 5.62012H10.2922L9.74322 6.89921L9.18139 5.62012H6.61972V6.20265L6.33475 5.62012H4.1443ZM12.9196 6.32403H16.2941L17.3262 7.48832L18.3916 6.32403H19.4237L17.8555 8.11127L19.4237 9.87792H18.3448L17.3127 8.7001L16.2419 9.87792H12.9196V6.32403ZM13.7529 7.70949V7.06035V7.05973H15.8585L16.7772 8.09788L15.8178 9.1417H13.7529V8.43302H15.5938V7.70949H13.7529ZM4.64096 6.32403H5.89225L7.31456 9.68447V6.32403H8.68531L9.78388 8.73345L10.7963 6.32403H12.1602V9.88002H11.3303L11.3236 7.09356L10.1137 9.88002H9.37127L8.15459 7.09356V9.88002H6.4473L6.12363 9.08281H4.37497L4.05197 9.87932H3.13722L4.64096 6.32403ZM4.67357 8.34576L5.24969 6.9256L5.82513 8.34576H4.67357Z\"\n fill=\"white\"\n />\n </svg>\n );\n }\n\n private renderGenericIcon() {\n return (\n <svg\n width={this.width}\n height={this.height}\n viewBox=\"0 0 14 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.833984 4.50036V10.1644C0.833984 10.5326 1.13246 10.8311 1.50065 10.8311L12.498 10.8311C12.8662 10.8311 13.1647 10.5326 13.1647 10.1644V4.50036M0.833984 4.50036V1.83561C0.833984 1.46742 1.13246 1.16895 1.50065 1.16895H12.4974C12.8648 1.16895 13.163 1.46624 13.1636 1.83367C13.1651 2.72257 13.1647 3.61146 13.1647 4.50036M0.833984 4.50036H13.1647\"\n stroke=\"#788191\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n );\n }\n\n render() {\n const cardType = this.getCardType();\n\n switch (cardType) {\n case PAYMENT_ICON_TYPE_ENUM.VISA:\n return this.renderVisaIcon();\n case PAYMENT_ICON_TYPE_ENUM.MASTERCARD:\n return this.renderMastercardIcon();\n case PAYMENT_ICON_TYPE_ENUM.AMEX:\n return this.renderAmexIcon();\n default:\n return this.renderGenericIcon();\n }\n }\n}\n","@import '../../../styles/variables.css';\n\n.organization-logo {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n}\n\n.logo-image {\n max-height: 40px;\n max-width: 120px;\n width: auto;\n height: auto;\n object-fit: contain;\n border-radius: 8px;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'organization-logo',\n styleUrl: 'organization-logo.css',\n shadow: false,\n})\nexport class OrganizationLogo {\n /**\n * The organization data containing logo URL and name\n */\n @Prop() organization!: {\n name: string;\n logoUrl?: string;\n };\n\n render() {\n return (\n <div class=\"organization-logo\">\n {this.organization.logoUrl ? (\n <img src={this.organization.logoUrl} alt={this.organization.name} class=\"logo-image\" />\n ) : (\n <rebill-icon name=\"logo-default\" class=\"logo-image\" />\n )}\n </div>\n );\n }\n}\n",".checkout-single-column {\n min-height: 100vh;\n background: var(--rebill-color-background);\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-x: hidden;\n min-width: 320px;\n}\n\n.checkout-single-column__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n height: 72px;\n width: 100%;\n max-width: 1448px;\n min-width: 348px;\n background: var(--rebill-color-background);\n margin-left: 30px;\n box-sizing: border-box;\n}\n\n.checkout-single-column__main-content {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n /* padding: 0 20px; */\n max-width: 450px;\n\n margin: 0 auto;\n gap: 2rem;\n}\n\n.checkout-single-column__footer-container {\n margin-top: auto;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n box-sizing: border-box;\n}\n\n.checkout-single-column__footer-content {\n width: 100%;\n max-width: 450px;\n min-width: auto;\n flex-shrink: 1;\n flex-basis: auto;\n box-sizing: border-box;\n}\n\n@media (max-width: 1024px) {\n .checkout-single-column__header {\n width: 100%;\n max-width: 100%;\n\n justify-content: flex-start;\n }\n\n .checkout-single-column__main-content {\n /* padding: 0 20px; */\n gap: 0;\n align-items: center;\n justify-content: center;\n padding-top: 2rem;\n flex: 1;\n min-height: 0;\n width: 100%;\n }\n\n .checkout-single-column__footer-container {\n width: 100%;\n height: auto;\n min-height: 60px;\n justify-content: center;\n }\n\n .checkout-single-column__footer-content {\n width: 100%;\n min-width: auto;\n max-width: 100%;\n flex-basis: auto;\n }\n}\n\n@media (max-width: 767px) {\n .checkout-single-column__header {\n height: 60px;\n margin-left: 12px;\n margin-right: 12px;\n width: 100%;\n }\n\n .checkout-single-column__main-content {\n padding-top: 1rem;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n }\n\n .checkout-single-column__footer-container {\n margin-left: 12px;\n margin-right: 12px;\n height: auto;\n min-height: 60px;\n width: 100%;\n justify-content: center;\n }\n}\n\n@media (min-width: 1025px) {\n .checkout-single-column {\n background: var(--rebill-color-background-left);\n }\n .checkout-single-column__footer-container {\n margin-left: 16px;\n }\n\n .checkout-single-column__header {\n background: var(--rebill-color-background-left);\n }\n}\n","import { Component, h } from '@stencil/core';\nimport { sessionState } from '../../../../../store/session.store';\n\n@Component({\n tag: 'rebill-checkout-single-column',\n styleUrl: 'checkout-single-column.css',\n shadow: false,\n})\nexport class LayoutCheckoutSingleColumn {\n render() {\n return (\n <div class=\"checkout-single-column\">\n <header class=\"checkout-single-column__header\">\n <div class=\"header-container\">\n <organization-logo organization={sessionState.data.organization} />\n </div>\n </header>\n <main class=\"checkout-single-column__main-content\">\n <slot />\n </main>\n <div class=\"checkout-single-column__footer-container\">\n <rebill-footer class=\"checkout-single-column__footer-content\" />\n </div>\n </div>\n );\n }\n}\n",".language-selector {\n display: flex;\n align-items: center;\n margin-right: 12px;\n height: 24px;\n}\n.rebill-footer__footer-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n margin-bottom: 18px;\n}\n\n.terms-and-conditions {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 12px;\n}\n\n.footer-powered {\n margin-right: 4px;\n}\n\n.footer-separator {\n margin-right: 6px;\n margin-left: 6px;\n}\n\n.footer-link,\n.footer-powered,\n.footer-separator {\n display: flex;\n align-items: center;\n}\n\n.footer-link a {\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n text-decoration: none;\n}\n","import { Component, h, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { LOCALES_ENUM } from '../../../models/enums/locales.enum';\nimport { sessionState, SessionStore } from '../../../store/session.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\n\n@Component({\n tag: 'rebill-footer',\n styleUrl: 'rebill-footer.css',\n shadow: false,\n})\nexport class RebillFooter {\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n const language = I18nService.getCurrentLanguage();\n SessionStore.changeLanguage(language);\n }\n private handleLanguageChange = (event: any) => {\n I18nService.changeLanguage(event.detail.value);\n SessionStore.changeLanguage(event.detail.value);\n };\n render() {\n return (\n <div class=\"rebill-footer__footer-content\">\n <div class=\"terms-and-conditions\">\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <rebill-typography\n variant=\"subtitle3\"\n color={COLORS_ENUM.SECONDARY}\n class=\"footer-powered\"\n >\n {I18nService.translate('footer.poweredBy')}\n </rebill-typography>\n )}\n <rebill-icon name=\"rebill-logo\" color={COLORS_ENUM.SECONDARY} />\n <rebill-icon name=\"rebill\" color={COLORS_ENUM.SECONDARY} />\n <rebill-typography\n variant=\"subtitle3\"\n color={COLORS_ENUM.SECONDARY}\n class=\"footer-separator\"\n >\n |\n </rebill-typography>\n <rebill-typography variant=\"subtitle3\" color={COLORS_ENUM.SECONDARY} class=\"footer-link\">\n <a\n href=\"https://www.rebill.com/terminos-y-condiciones-usuarios-finales\"\n target=\"_blank\"\n >\n {I18nService.translate('footer.termsAndConditions')}\n </a>\n </rebill-typography>\n </div>\n <div class=\"language-selector\">\n <rebill-icon name=\"world\" />\n <rebill-input-select\n id=\"language-selector\"\n variant=\"underlined\"\n backgroundColor={\n isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? ''\n : 'var(--rebill-color-background-left)'\n }\n options={[\n { label: 'EN', value: LOCALES_ENUM.EN },\n { label: 'ES', value: LOCALES_ENUM.ES },\n { label: 'PT', value: LOCALES_ENUM.PT },\n ]}\n value={sessionState.currentLocale}\n on-input={this.handleLanguageChange}\n fontSize=\"10px\"\n dropPosition=\"up\"\n arrowIcon=\"down\"\n class=\"language-selector-input\"\n />\n </div>\n </div>\n );\n }\n}\n"],"names":["sessionState"],"mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,0HAA0H;;ACE9I,IAAK,sBAcJ;AAdD,CAAA,UAAK,sBAAsB,EAAA;AACzB,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,sBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,sBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACnB,CAAC,EAdI,sBAAsB,KAAtB,sBAAsB,GAc1B,EAAA,CAAA,CAAA;AAED,MAAM,aAAa,GAA2C;IAC5D,MAAM,EAAE,sBAAsB,CAAC,IAAI;IACnC,YAAY,EAAE,sBAAsB,CAAC,UAAU;IAC/C,kBAAkB,EAAE,sBAAsB,CAAC,IAAI;IAC/C,MAAM,EAAE,sBAAsB,CAAC,IAAI;IACnC,aAAa,EAAE,sBAAsB,CAAC,MAAM;IAC5C,UAAU,EAAE,sBAAsB,CAAC,Q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W,CAAC,SAAS,EAAE,KAAK,EAAC,aAAa,EAAA,EACtF,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,gEAAgE,EACrE,MAAM,EAAC,QAAQ,EAAA,EAEd,WAAW,CAAC,SAAS,CAAC,2BAA2B,CAAC,CACjD,CACc,CAChB,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,mBAAmB,EAAA,EAC5B,CAAa,CAAA,aAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EAAG,CAAA,EAC5B,CAAA,CAAA,qBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,EAAE,EAAC,mBAAmB,EACtB,OAAO,EAAC,YAAY,EACpB,eAAe,EACb,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO;AACxD,kBAAE;AACF,kBAAE,qCAAqC,EAE3C,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;gBACvC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;gBACvC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;AACxC,aAAA,EACD,KAAK,EAAEA,KAAY,CAAC,aAAa,EAAA,UAAA,EACvB,IAAI,CAAC,oBAAoB,EACnC,QAAQ,EAAC,MAAM,EACf,YAAY,EAAC,IAAI,EACjB,SAAS,EAAC,MAAM,EAChB,KAAK,EAAC,yBAAyB,EAAA,CAC/B,CACE,CACF;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"organization-logo.rebill-card-icon.rebill-checkout-single-column.rebill-footer.entry.esm.js","sources":["src/components/shared/card-icon/card-icon.css?tag=rebill-card-icon","src/components/shared/card-icon/card-icon.tsx","src/components/shared/organization-logo/organization-logo.css?tag=organization-logo","src/components/shared/organization-logo/organization-logo.tsx","src/components/shared/layouts/custom/single-column/checkout-single-column.css?tag=rebill-checkout-single-column","src/components/shared/layouts/custom/single-column/checkout-single-column.tsx","src/components/checkout/rebill-footer/rebill-footer.css?tag=rebill-footer","src/components/checkout/rebill-footer/rebill-footer.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.card-icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\nenum PAYMENT_ICON_TYPE_ENUM {\n VISA = 'visa',\n MASTERCARD = 'mastercard',\n DISCOVER = 'discover',\n JCB = 'jcb',\n UNIONPAY = 'unionpay',\n MAESTRO = 'maestro',\n MIR = 'mir',\n ELO = 'elo',\n HIPER = 'hiper',\n HIPERCARD = 'hipercard',\n GENERIC = 'generic',\n AMEX = 'amex',\n DINERS = 'diners',\n}\n\nconst CARD_TYPE_MAP: Record<string, PAYMENT_ICON_TYPE_ENUM> = {\n 'visa': PAYMENT_ICON_TYPE_ENUM.VISA,\n 'mastercard': PAYMENT_ICON_TYPE_ENUM.MASTERCARD,\n 'american-express': PAYMENT_ICON_TYPE_ENUM.AMEX,\n 'amex': PAYMENT_ICON_TYPE_ENUM.AMEX,\n 'diners-club': PAYMENT_ICON_TYPE_ENUM.DINERS,\n 'discover': PAYMENT_ICON_TYPE_ENUM.DISCOVER,\n 'jcb': PAYMENT_ICON_TYPE_ENUM.JCB,\n 'unionpay': PAYMENT_ICON_TYPE_ENUM.UNIONPAY,\n 'maestro': PAYMENT_ICON_TYPE_ENUM.MAESTRO,\n 'mir': PAYMENT_ICON_TYPE_ENUM.MIR,\n 'elo': PAYMENT_ICON_TYPE_ENUM.ELO,\n 'hiper': PAYMENT_ICON_TYPE_ENUM.HIPER,\n 'hipercard': PAYMENT_ICON_TYPE_ENUM.HIPERCARD,\n};\n\n@Component({\n tag: 'rebill-card-icon',\n styleUrl: 'card-icon.css',\n shadow: false,\n})\nexport class CardIcon {\n @Prop() cardBrand?: string;\n @Prop() width?: number = 35;\n @Prop() height?: number = 24;\n\n private getCardType(): PAYMENT_ICON_TYPE_ENUM {\n if (this.cardBrand) {\n const brandLower = this.cardBrand.toLowerCase();\n return CARD_TYPE_MAP[brandLower] || PAYMENT_ICON_TYPE_ENUM.GENERIC;\n }\n return PAYMENT_ICON_TYPE_ENUM.GENERIC;\n }\n\n private renderVisaIcon() {\n return (\n <svg\n width=\"23\"\n height=\"16\"\n viewBox=\"0 0 23 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.5\" y=\"0.5\" width=\"22\" height=\"15\" rx=\"2\" fill=\"white\" stroke=\"#D9D9D9\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.02517 10.8392H5.63182L4.58697 6.79524C4.53738 6.60922 4.43208 6.44477 4.27718 6.36726C3.89063 6.17248 3.46468 6.01746 3 5.93928V5.78359H5.24458C5.55437 5.78359 5.78671 6.01746 5.82543 6.28908L6.36756 9.20609L7.76023 5.78359H9.11486L7.02517 10.8392ZM9.88932 10.8392H8.57341L9.65698 5.78359H10.9729L9.88932 10.8392ZM12.6754 7.18413C12.7141 6.91184 12.9464 6.75615 13.2175 6.75615C13.6434 6.71706 14.1074 6.79524 14.4947 6.98935L14.727 5.90087C14.3398 5.74517 13.9138 5.66699 13.5273 5.66699C12.2501 5.66699 11.3207 6.36726 11.3207 7.33915C11.3207 8.07851 11.979 8.46673 12.4437 8.7006C12.9464 8.9338 13.14 9.08949 13.1013 9.32269C13.1013 9.67249 12.7141 9.82818 12.3275 9.82818C11.8629 9.82818 11.3982 9.71158 10.9729 9.5168L10.7406 10.606C11.2052 10.8001 11.708 10.8783 12.1726 10.8783C13.6047 10.9167 14.4947 10.2171 14.4947 9.167C14.4947 7.84464 12.6754 7.76713 12.6754 7.18413ZM19.1 10.8392L18.0552 5.78359H16.9329C16.7005 5.78359 16.4682 5.93928 16.3907 6.17248L14.4559 10.8392H15.8106L16.081 10.1005H17.7454L17.9003 10.8392H19.1ZM17.1265 7.14505L17.513 9.05041H16.4294L17.1265 7.14505Z\"\n fill=\"#172B85\"\n />\n </svg>\n );\n }\n\n private renderMastercardIcon() {\n return (\n <svg\n width=\"35\"\n height=\"25\"\n viewBox=\"0 0 35 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.5\" y=\"1.01758\" width=\"34\" height=\"23\" rx=\"3.5\" fill=\"white\" stroke=\"#D9D9D9\" />\n <path\n d=\"M22.1758 5.51758C25.9444 5.51758 29 8.60848 29 12.4209C28.9998 16.2332 25.9443 19.3232 22.1758 19.3232C20.4864 19.3231 18.9416 18.7007 17.75 17.6719C16.5584 18.7007 15.0137 19.3231 13.3242 19.3232C9.55566 19.3232 6.50018 16.2332 6.5 12.4209C6.5 8.60848 9.55555 5.51758 13.3242 5.51758C15.0134 5.51769 16.5584 6.13943 17.75 7.16797C18.9416 6.13943 20.4866 5.51769 22.1758 5.51758Z\"\n fill=\"#ED0006\"\n />\n <path\n d=\"M22.1758 5.51758C25.9444 5.51758 29 8.60848 29 12.4209C28.9998 16.2332 25.9443 19.3232 22.1758 19.3232C20.4863 19.3231 18.9416 18.7007 17.75 17.6719C19.2164 16.4058 20.1474 14.524 20.1475 12.4209C20.1475 10.3174 19.2168 8.4341 17.75 7.16797C18.9416 6.13943 20.4866 5.51769 22.1758 5.51758Z\"\n fill=\"#F9A000\"\n />\n <path\n d=\"M17.75 7.16895C19.2166 8.43507 20.1475 10.3176 20.1475 12.4209C20.1475 14.524 19.2163 16.4058 17.75 17.6719C16.2837 16.4058 15.3525 14.524 15.3525 12.4209C15.3525 10.3176 16.2834 8.43507 17.75 7.16895Z\"\n fill=\"#FF5E00\"\n />\n </svg>\n );\n }\n\n private renderAmexIcon() {\n return (\n <svg\n width=\"23\"\n height=\"16\"\n viewBox=\"0 0 23 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect\n x=\"0.216981\"\n y=\"0.216981\"\n width=\"22.566\"\n height=\"15.566\"\n rx=\"0.867925\"\n fill=\"#1F72CD\"\n stroke=\"#D9D9D9\"\n stroke-width=\"0.433962\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M4.1443 5.62012L2 10.5758H4.56703L4.88527 9.78562H5.61269L5.93093 10.5758H8.75651V9.9727L9.00828 10.5758H10.4699L10.7217 9.95995V10.5758H16.5981L17.3127 9.80614L17.9817 10.5758L21 10.5821L18.8489 8.11177L21 5.62012H18.0285L17.333 6.37551L16.685 5.62012H10.2922L9.74322 6.89921L9.18139 5.62012H6.61972V6.20265L6.33475 5.62012H4.1443ZM12.9196 6.32403H16.2941L17.3262 7.48832L18.3916 6.32403H19.4237L17.8555 8.11127L19.4237 9.87792H18.3448L17.3127 8.7001L16.2419 9.87792H12.9196V6.32403ZM13.7529 7.70949V7.06035V7.05973H15.8585L16.7772 8.09788L15.8178 9.1417H13.7529V8.43302H15.5938V7.70949H13.7529ZM4.64096 6.32403H5.89225L7.31456 9.68447V6.32403H8.68531L9.78388 8.73345L10.7963 6.32403H12.1602V9.88002H11.3303L11.3236 7.09356L10.1137 9.88002H9.37127L8.15459 7.09356V9.88002H6.4473L6.12363 9.08281H4.37497L4.05197 9.87932H3.13722L4.64096 6.32403ZM4.67357 8.34576L5.24969 6.9256L5.82513 8.34576H4.67357Z\"\n fill=\"white\"\n />\n </svg>\n );\n }\n\n private renderGenericIcon() {\n return (\n <svg\n width={this.width}\n height={this.height}\n viewBox=\"0 0 14 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.833984 4.50036V10.1644C0.833984 10.5326 1.13246 10.8311 1.50065 10.8311L12.498 10.8311C12.8662 10.8311 13.1647 10.5326 13.1647 10.1644V4.50036M0.833984 4.50036V1.83561C0.833984 1.46742 1.13246 1.16895 1.50065 1.16895H12.4974C12.8648 1.16895 13.163 1.46624 13.1636 1.83367C13.1651 2.72257 13.1647 3.61146 13.1647 4.50036M0.833984 4.50036H13.1647\"\n stroke=\"#788191\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n );\n }\n\n render() {\n const cardType = this.getCardType();\n\n switch (cardType) {\n case PAYMENT_ICON_TYPE_ENUM.VISA:\n return this.renderVisaIcon();\n case PAYMENT_ICON_TYPE_ENUM.MASTERCARD:\n return this.renderMastercardIcon();\n case PAYMENT_ICON_TYPE_ENUM.AMEX:\n return this.renderAmexIcon();\n default:\n return this.renderGenericIcon();\n }\n }\n}\n","@import '../../../styles/variables.css';\n\n.organization-logo {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n}\n\n.logo-image {\n max-height: 40px;\n max-width: 120px;\n width: auto;\n height: auto;\n object-fit: contain;\n border-radius: 8px;\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'organization-logo',\n styleUrl: 'organization-logo.css',\n shadow: false,\n})\nexport class OrganizationLogo {\n /**\n * The organization data containing logo URL and name\n */\n @Prop() organization!: {\n name: string;\n logoUrl?: string;\n };\n\n render() {\n return (\n <div class=\"organization-logo\">\n {this.organization.logoUrl ? (\n <img src={this.organization.logoUrl} alt={this.organization.name} class=\"logo-image\" />\n ) : (\n <rebill-icon name=\"logo-default\" class=\"logo-image\" />\n )}\n </div>\n );\n }\n}\n",".checkout-single-column {\n min-height: 100vh;\n background: var(--rebill-color-background);\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-x: hidden;\n min-width: 320px;\n}\n\n.checkout-single-column__header {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n height: 72px;\n width: 100%;\n max-width: 1448px;\n min-width: 348px;\n background: var(--rebill-color-background);\n margin-left: 30px;\n box-sizing: border-box;\n}\n\n.checkout-single-column__main-content {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n /* padding: 0 20px; */\n max-width: 450px;\n\n margin: 0 auto;\n gap: 2rem;\n}\n\n.checkout-single-column__footer-container {\n margin-top: auto;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n box-sizing: border-box;\n}\n\n.checkout-single-column__footer-content {\n width: 100%;\n max-width: 450px;\n min-width: auto;\n flex-shrink: 1;\n flex-basis: auto;\n box-sizing: border-box;\n}\n\n@media (max-width: 1024px) {\n .checkout-single-column__header {\n width: 100%;\n max-width: 100%;\n\n justify-content: flex-start;\n }\n\n .checkout-single-column__main-content {\n /* padding: 0 20px; */\n gap: 0;\n align-items: center;\n justify-content: center;\n padding-top: 2rem;\n flex: 1;\n min-height: 0;\n width: 100%;\n }\n\n .checkout-single-column__footer-container {\n width: 100%;\n height: auto;\n min-height: 60px;\n justify-content: center;\n }\n\n .checkout-single-column__footer-content {\n width: 100%;\n min-width: auto;\n max-width: 100%;\n flex-basis: auto;\n }\n}\n\n@media (max-width: 767px) {\n .checkout-single-column__header {\n height: 60px;\n margin-left: 12px;\n margin-right: 12px;\n width: 100%;\n }\n\n .checkout-single-column__main-content {\n padding-top: 1rem;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n }\n\n .checkout-single-column__footer-container {\n margin-left: 12px;\n margin-right: 12px;\n height: auto;\n min-height: 60px;\n width: 100%;\n justify-content: center;\n }\n}\n\n@media (min-width: 1025px) {\n .checkout-single-column {\n background: var(--rebill-color-background-left);\n }\n .checkout-single-column__footer-container {\n margin-left: 16px;\n }\n\n .checkout-single-column__header {\n background: var(--rebill-color-background-left);\n }\n}\n","import { Component, h } from '@stencil/core';\nimport { sessionState } from '../../../../../store/session.store';\n\n@Component({\n tag: 'rebill-checkout-single-column',\n styleUrl: 'checkout-single-column.css',\n shadow: false,\n})\nexport class LayoutCheckoutSingleColumn {\n render() {\n return (\n <div class=\"checkout-single-column\">\n <header class=\"checkout-single-column__header\">\n <div class=\"header-container\">\n <organization-logo organization={sessionState.data.organization} />\n </div>\n </header>\n <main class=\"checkout-single-column__main-content\">\n <slot />\n </main>\n <div class=\"checkout-single-column__footer-container\">\n <rebill-footer class=\"checkout-single-column__footer-content\" />\n </div>\n </div>\n );\n }\n}\n",".language-selector {\n display: flex;\n align-items: center;\n margin-right: 12px;\n height: 24px;\n}\n.rebill-footer__footer-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n margin: 18px;\n}\n\n.terms-and-conditions {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 12px;\n}\n\n.footer-powered {\n margin-right: 4px;\n}\n\n.footer-separator {\n margin-right: 6px;\n margin-left: 6px;\n}\n\n.footer-link,\n.footer-powered,\n.footer-separator {\n display: flex;\n align-items: center;\n}\n\n.footer-link a {\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n text-decoration: none;\n}\n","import { Component, h, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { LOCALES_ENUM } from '../../../models/enums/locales.enum';\nimport { sessionState, SessionStore } from '../../../store/session.store';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\n\n@Component({\n tag: 'rebill-footer',\n styleUrl: 'rebill-footer.css',\n shadow: false,\n})\nexport class RebillFooter {\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n resizeHandler = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.resizeHandler);\n }\n\n async componentWillLoad() {\n this.resizeHandler();\n window.addEventListener('resize', this.resizeHandler);\n const language = I18nService.getCurrentLanguage();\n SessionStore.changeLanguage(language);\n }\n private handleLanguageChange = (event: any) => {\n I18nService.changeLanguage(event.detail.value);\n SessionStore.changeLanguage(event.detail.value);\n };\n render() {\n return (\n <div class=\"rebill-footer__footer-content\">\n <div class=\"terms-and-conditions\">\n {!isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (\n <rebill-typography\n variant=\"subtitle3\"\n color={COLORS_ENUM.SECONDARY}\n class=\"footer-powered\"\n >\n {I18nService.translate('footer.poweredBy')}\n </rebill-typography>\n )}\n <rebill-icon name=\"rebill-logo\" color={COLORS_ENUM.SECONDARY} />\n <rebill-icon name=\"rebill\" color={COLORS_ENUM.SECONDARY} />\n <rebill-typography\n variant=\"subtitle3\"\n color={COLORS_ENUM.SECONDARY}\n class=\"footer-separator\"\n >\n |\n </rebill-typography>\n <rebill-typography variant=\"subtitle3\" color={COLORS_ENUM.SECONDARY} class=\"footer-link\">\n <a\n href=\"https://www.rebill.com/terminos-y-condiciones-usuarios-finales\"\n target=\"_blank\"\n >\n {I18nService.translate('footer.termsAndConditions')}\n </a>\n </rebill-typography>\n </div>\n <div class=\"language-selector\">\n <rebill-icon name=\"world\" />\n <rebill-input-select\n id=\"language-selector\"\n variant=\"underlined\"\n backgroundColor={\n isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)\n ? ''\n : 'var(--rebill-color-background-left)'\n }\n options={[\n { label: 'EN', value: LOCALES_ENUM.EN },\n { label: 'ES', value: LOCALES_ENUM.ES },\n { label: 'PT', value: LOCALES_ENUM.PT },\n ]}\n value={sessionState.currentLocale}\n on-input={this.handleLanguageChange}\n fontSize=\"10px\"\n dropPosition=\"up\"\n arrowIcon=\"down\"\n class=\"language-selector-input\"\n />\n </div>\n </div>\n );\n }\n}\n"],"names":["sessionState"],"mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,0HAA0H;;ACE9I,IAAK,sBAcJ;AAdD,CAAA,UAAK,sBAAsB,EAAA;AACzB,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,sBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,sBAAA,CAAA,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A,EAAA,0CAAA,EACE,EAAE,EAAC,mBAAmB,EACtB,OAAO,EAAC,YAAY,EACpB,eAAe,EACb,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO;AACxD,kBAAE;AACF,kBAAE,qCAAqC,EAE3C,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;gBACvC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;gBACvC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,EAAE;AACxC,aAAA,EACD,KAAK,EAAEA,KAAY,CAAC,aAAa,EAAA,UAAA,EACvB,IAAI,CAAC,oBAAoB,EACnC,QAAQ,EAAC,MAAM,EACf,YAAY,EAAC,IAAI,EACjB,SAAS,EAAC,MAAM,EAChB,KAAK,EAAC,yBAAyB,EAAA,CAC/B,CACE,CACF;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,c as t,g as o,h as s}from"./p-D8cwEAmw.js";import{a as e}from"./p-CTo1s54i.js";import{s as r,a as n,g as l,I as a}from"./p-DkbFAMha.js";import{C as c}from"./p-DA598vBj.js";import"./p-E-ZsRS8r.js";import"./p-D339jHg4.js";const p=".summary-row{gap:12px}.coupon-chip{display:flex;align-items:center;background:var(--rebill-color-background);border:1px solid var(--rebill-color-border-primary);justify-content:space-between;border-radius:6px;padding:4px 8px;gap:8px;width:fit-content}.coupon-chip--readonly{cursor:default}.coupon-icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;vertical-align:middle}.coupon-close{cursor:pointer}.coupon-content{display:flex;flex-direction:row;align-items:flex-start;gap:4px}";var d;(function(i){i["EDITING"]="editing";i["APPLIED"]="applied";i["NOT_APPLIED"]="not_applied"})(d||(d={}));const u=class{constructor(o){i(this,o);this.discountApplied=t(this,"discountApplied")}get el(){return o(this)}hideLabel=false;displayMode="editable";readonlyCouponCode;readonlyDiscountAmount;readonlyCurrency;couponCode="";actionStatus=d.NOT_APPLIED;isLoading=false;isError=false;currentLocale=r.currentLocale;discountApplied;inputRef;unsubscribeCurrentLocaleStore;componentWillLoad(){this.unsubscribeCurrentLocaleStore=n.onChange("currentLocale",(()=>{this.currentLocale=r.currentLocale}));if(this.readonlyCouponCode){return}if(r.data.pricing.discountCouponCode&&r.data.pricing.discountAmount>0){this.actionStatus=d.APPLIED;this.couponCode=r.data.pricing.discountCouponCode}}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}}componentDidUpdate(){if(this.readonlyCouponCode){return}if(this.actionStatus===d.EDITING&&this.inputRef){setTimeout((async()=>{const i=await this.inputRef.getInputElement();if(i){i.focus()}}),0)}}async onApplyCoupon(){if(this.readonlyCouponCode)return;const i=r.data.sessionId;if(!i){return}this.isLoading=true;try{const t=await e.discountCoupon.applyDiscountCoupon({couponCode:this.couponCode,quantity:1,sessionId:i,organizationId:r.data.organization.id});this.actionStatus=d.APPLIED;n.setDiscount({couponCode:this.couponCode,amount:t.amount,discountType:t.discountType,discountAmount:t.discountedAmount,discountedPercentage:t?.discountedPercentage||0,discountDuration:t?.discountDuration||null});this.discountApplied.emit(true)}catch(i){this.actionStatus=d.EDITING;this.discountApplied.emit(false);this.isError=true;n.setDiscount(null)}finally{this.isLoading=false}}onCancelCoupon(){if(this.readonlyCouponCode)return;this.actionStatus=d.NOT_APPLIED;this.couponCode="";this.isError=false}renderReadonlyView(){if(!this.readonlyCouponCode&&this.readonlyDiscountAmount){return null}return s("div",{class:"coupon-chip coupon-chip--readonly"},s("rebill-icon",{name:"tag-sale",size:"16px"}),s("div",{class:"coupon-content"},s("rebill-typography",{variant:"overline",color:c.PRIMARY_DARK_TEXT},this.readonlyCouponCode),this.readonlyDiscountAmount&&s("rebill-typography",{variant:"overline",color:c.GREEN},"-$",l(this.readonlyDiscountAmount,this.readonlyCurrency))))}render(){if(this.readonlyCouponCode){return this.renderReadonlyView()}return s("div",null,s("div",{class:"summary-row",style:{alignItems:this.actionStatus===d.EDITING?"flex-start":"center",display:"flex"}},!this.hideLabel&&s("rebill-typography",{variant:"body2",style:{marginTop:this.actionStatus===d.EDITING?"7px":"0px"}},a.translate("discountCoupons.discount")),this.actionStatus===d.NOT_APPLIED&&s("rebill-button",{variant:"filled",size:"small",theme:"primary-dark",onClick:()=>this.actionStatus=d.EDITING},a.translate("discountCoupons.addDiscount")),this.actionStatus===d.EDITING&&s("div",{class:"summary-row",style:{alignItems:"flex-start",display:"flex"}},s("rebill-input-text",{ref:i=>this.inputRef=i,id:"discountCoupon",value:this.couponCode,placeholder:a.translate("discountCoupons.addDiscount"),disabled:this.isLoading,error:this.isError?a.translate("discountCoupons.error"):"",clearable:true,uppercase:true,onInput:i=>{i.stopPropagation();if(i.detail&&i.detail.value!==undefined){this.couponCode=i.detail.value}},onBlur:()=>{if(!this.couponCode.trim()){this.onCancelCoupon()}}}),s("rebill-button",{variant:"filled",theme:"primary-dark",size:"small",loading:this.isLoading,disabled:this.isLoading||!this.couponCode.trim(),onClick:()=>this.onApplyCoupon(),style:{marginTop:this.actionStatus===d.EDITING?"3px":"0px"}},a.translate("discountCoupons.apply"))),this.actionStatus===d.APPLIED&&s("div",{class:"coupon-chip"},s("rebill-icon",{name:"tag-sale",size:"16px"}),s("div",{class:"coupon-content",onClick:()=>this.actionStatus=d.EDITING},s("rebill-typography",{variant:"overline",color:c.PRIMARY_DARK_TEXT},r.data.pricing.discountCouponCode),s("rebill-typography",{variant:"overline",color:c.GREEN},"-$",l(r.data.pricing.discountAmount,r.data.pricing.currency))),s("div",{class:"coupon-close",onClick:()=>{this.actionStatus=d.NOT_APPLIED;this.couponCode="";n.setDiscount(null);this.discountApplied.emit(false)}},s("rebill-icon",{name:"x",size:"20px",color:c.PRIMARY_DARK_TEXT})))))}};u.style=p;const h=".rebill-divider{border:none;border-top:0.5px solid var(--rebill-color-border-primary);width:100%;height:0.5px}";const y=class{constructor(t){i(this,t)}render(){return s("div",{key:"e473487d16557d2a754a133173d72ca6ce5a7767",class:"rebill-divider"})}};y.style=h;export{u as discount_coupon,y as rebill_divider};
|
|
2
|
+
//# sourceMappingURL=p-012e3770.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["registerInstance","createEvent","getElement","h","api","state","SessionStore","formatAmountWithoutCurrency","I18nService","COLORS_ENUM","discountCouponCss","ACTION_STATUS","DiscountCoupon","constructor","hostRef","this","discountApplied","el","hideLabel","displayMode","readonlyCouponCode","readonlyDiscountAmount","readonlyCurrency","couponCode","actionStatus","NOT_APPLIED","isLoading","isError","currentLocale","inputRef","unsubscribeCurrentLocaleStore","componentWillLoad","onChange","data","pricing","discountCouponCode","discountAmount","APPLIED","disconnectedCallback","componentDidUpdate","EDITING","setTimeout","async","inputElement","getInputElement","focus","onApplyCoupon","sessionId","response","discountCoupon","applyDiscountCoupon","quantity","organizationId","organization","id","setDiscount","amount","discountType","discountedAmount","discountedPercentage","discountDuration","emit","error","onCancelCoupon","renderReadonlyView","class","name","size","variant","color","PRIMARY_DARK_TEXT","GREEN","render","style","alignItems","display","marginTop","translate","theme","onClick","ref","value","placeholder","disabled","clearable","uppercase","onInput","e","stopPropagation","detail","undefined","onBlur","trim","loading","currency","dividerCss","Divider","key"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAkBC,OAAYC,MAAS,8BAC9DC,MAAW,8BACXC,OAAYC,OAAmBC,OAAkCC,MAAmB,8BACpFC,MAAmB,wBAC1B,wBACA,kBAEP,MAAMC,EAAoB,igBAE1B,IAAIC,GACJ,SAAWA,GACPA,EAAc,WAAa,UAC3BA,EAAc,WAAa,UAC3BA,EAAc,eAAiB,aAClC,EAJD,CAIGA,IAAkBA,EAAgB,CAAC,IACtC,MAAMC,EAAiB,MACnB,WAAAC,CAAYC,GACRd,EAAiBe,KAAMD,GACvBC,KAAKC,gBAAkBf,EAAYc,KAAM,kB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,WAAYC,MAAO5D,EAAY8D,OAAS,KAAMhE,EAA4BF,EAAM4B,KAAKC,QAAQE,eAAgB/B,EAAM4B,KAAKC,QAAQ4D,YAAa3F,EAAE,MAAO,CAAE8D,MAAO,eAAgBc,QAAS,KAC94BhE,KAAKS,aAAeb,EAAcc,YAClCV,KAAKQ,WAAa,GAClBjB,EAAaiD,YAAY,MACzBxC,KAAKC,gBAAgB6C,KAAK,MAAM,GAC/B1D,EAAE,cAAe,CAAE+D,KAAM,IAAKC,KAAM,OAAQE,MAAO5D,EAAY6D,uBAC5E,GAEJ1D,EAAe6D,MAAQ/D,EAEvB,MAAMqF,EAAa,iHAEnB,MAAMC,EAAU,MACZ,WAAAnF,CAAYC,GACRd,EAAiBe,KAAMD,EAC3B,CACA,MAAA0D,GACI,OAAOrE,EAAE,MAAO,CAAE8F,IAAK,2CAA4ChC,MAAO,kBAC9E,GAEJ+B,EAAQvB,MAAQsB,SAEPnF,qBAAmCoF","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as r,h as o}from"./p-D8cwEAmw.js";import{a as i,I as t}from"./p-DkbFAMha.js";const l=".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}.select-wrapper{position:relative;width:100%;box-sizing:border-box}.select-trigger{width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;padding-right:30px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;min-width:0;}.select-trigger:focus{outline:none;border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.select-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-trigger.input-error{border-color:var(--rebill-color-error) !important}.select-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.select-wrapper.disabled .select-trigger{background-color:var(--rebill-color-background);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.select-icon.rotated{transform:rotateX(180deg)}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-trigger.underlined{width:100%;height:38.33px;padding:10px 14px;padding-right:40px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;min-width:0;border:none}.select-trigger.underlined:focus{border:none;box-shadow:none}.select-dropPosition.open-down{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-dropPosition.open-up{position:absolute;bottom: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-bottom:0.25rem;margin-top:0;max-height:200px;overflow-y:auto;animation:slideUp 0.15s ease-out;box-sizing:border-box;width:100%}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.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)}.search-container{padding:0.75rem;border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.search-input-wrapper{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:0.75rem;color:var(--rebill-color-text-secondary);z-index:1;pointer-events:none}.search-input{width:100%;padding:0.5rem 0.75rem 0.5rem 2.5rem;border:1px solid var(--rebill-color-border);border-radius:0.375rem;font-size:0.875rem;color:var(--rebill-color-text-primary);background-color:var(--rebill-color-background);outline:none;transition:border-color 0.2s ease;box-sizing:border-box}.search-input:focus{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.search-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.clear-search{position:absolute;right:0.75rem;background:none;border:none;cursor:pointer;padding:0.25rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:var(--rebill-color-text-secondary);transition:background-color 0.2s ease}.clear-search:hover{background-color:var(--rebill-color-background-hover);color:var(--rebill-color-text-primary)}.no-results{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);font-style:italic;border-bottom:1px solid var(--rebill-color-border)}.loading-message{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);display:flex;align-items:center;justify-content:center;gap:0.5rem;border-bottom:1px solid var(--rebill-color-border)}.loading-message .spinner{width:14px;height:14px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite}.spinner{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media screen and (max-width: 768px){.select-trigger{font-size:1rem}.select-trigger.placeholder .select-value{font-size:1rem}.select-option{font-size:1rem}.search-input{font-size:1rem}.search-input::placeholder{font-size:1rem}.loading-message{font-size:1rem}.no-results{font-size:1rem}}";const s=class{constructor(o){e(this,o);this.input=r(this,"input")}dropdownRef;triggerRef;searchInputRef;unsubscribeCurrentLocaleStore;label="";options=[];value="";error="";id="";disabled=false;placeholder="Selecciona una opción";variant;arrowIcon="up-down";dropPosition="down";fontSize="14px";backgroundColor="";searchable=false;searchPlaceholder="Search for options...";loading=false;isOpen=false;componentId="";highlightedIndex=-1;searchTerm="";filteredOptions=[];languageUpdateTrigger=0;input;componentWillLoad(){this.filteredOptions=[...this.options];this.componentId=this.id||`select-${Math.random().toString(36).substr(2,9)}`}componentDidLoad(){this.unsubscribeCurrentLocaleStore=i.onChange("currentLocale",(()=>{this.languageUpdateTrigger++}))}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}}componentWillUpdate(){this.filteredOptions=[...this.options];if(this.searchable){this.filterOptions()}}handleFormChange(e){const r=e.detail;if(r&&this.id in r){const e=r[this.id];if(e!==this.value&&typeof e==="string"){this.value=e;this.input.emit({id:this.id,value:this.value})}}}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()}}handleKeyDown(e){if(this.disabled)return;if(this.searchable&&this.searchInputRef&&e.target===this.searchInputRef){return}switch(e.key){case"Enter":case" ":e.preventDefault();if(this.isOpen&&this.highlightedIndex>=0){this.selectOption(this.filteredOptions[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.filteredOptions.length-1)}break;case"ArrowUp":e.preventDefault();if(this.isOpen){this.highlightedIndex=Math.max(this.highlightedIndex-1,0)}break}}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.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}}else{this.searchTerm="";this.filterOptions()}};openDropdown=()=>{if(this.disabled)return;document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}));this.isOpen=true;this.highlightedIndex=this.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}};focusSearchInput=()=>{const e=()=>{if(this.searchInputRef){this.searchInputRef.focus();this.searchInputRef.select()}};e();requestAnimationFrame((()=>{e()}));setTimeout((()=>{e()}),10)};closeDropdown=()=>{this.isOpen=false;this.highlightedIndex=-1;this.searchTerm="";this.filterOptions()};selectOption=e=>{if(this.disabled)return;this.value=e.value;this.closeDropdown();this.input.emit({id:this.id,value:this.value,disabled:this.disabled})};getSelectedOptionLabel=()=>{const e=this.options.find((e=>e.value===this.value));return e?e.label:this.placeholder};getArrowIcon=()=>{if(this.arrowIcon==="up-down")return"chevron-up-down";return"chevron-down"};filterOptions=()=>{if(!this.searchTerm.trim()){this.filteredOptions=[...this.options]}else{this.filteredOptions=this.options.filter((e=>e.label.toLowerCase().includes(this.searchTerm.toLowerCase())))}this.highlightedIndex=-1};handleSearchInput=e=>{const r=e.target;this.searchTerm=r.value;this.filterOptions()};clearSearch=()=>{this.searchTerm="";this.filterOptions()};handleSearchClick=e=>{e.stopPropagation()};render(){const e=this.getSelectedOptionLabel();const r=this.value!=="";return o("div",{key:"794ce4d8dc36df0e5f10fb9c58d91b4dd0dd7651",class:"input-container"},this.label&&o("label",{key:"2e7c268755733936dcaa23d62561348999d4a1ce",class:`input-label ${this.disabled?"disabled":""}`},this.label),o("div",{key:"62952ca2fea093777e288db01ed18738ecae39f1",class:`select-wrapper ${this.disabled?"disabled":""} ${this.isOpen?"open":""}`},o("div",{key:"fa4301a9c4d52b6e877d3f0fd2fd8e07a996c7a1",ref:e=>this.triggerRef=e,class:`input-element select-trigger ${this.error?"input-error":""} ${!r?"placeholder":""} ${this.variant==="underlined"?"underlined":""}`,style:{backgroundColor:this.backgroundColor},onClick:this.toggleDropdown,tabIndex:this.disabled?-1:0,role:"combobox","aria-expanded":this.isOpen.toString(),"aria-haspopup":"listbox","aria-labelledby":this.label?`${this.id}-label`:undefined},o("span",{key:"d431ecfccd07748f0dcd83e566641dec6a1a73ea",class:"select-value",style:{fontSize:this.fontSize},innerHTML:e}),o("div",{key:"e6fc890bba43119c9c9a388d0adbb2121095874e",class:"icon-wrapper"},this.loading?o("div",{class:"spinner"}):o("rebill-icon",{name:this.getArrowIcon(),size:"20px",class:`select-icon ${this.isOpen&&this.arrowIcon==="down"?"rotated":""}`}))),this.isOpen&&o("div",{key:"5048f31812f8b1ae3ef4d2ba5eab857c6094d988",ref:e=>this.dropdownRef=e,class:`select-dropPosition ${this.dropPosition==="up"?"open-up":"open-down"}`,role:"listbox"},this.searchable&&o("div",{key:"9fd1e9461adecea83e83adcf9b76b9afac671500",class:"search-container",onClick:this.handleSearchClick},o("div",{key:"51e372d58b3c3065a66981ea9747bc56b65f8485",class:"search-input-wrapper"},o("rebill-icon",{key:"eab1a245456b8553270a84f86727ea8cea3858c3",name:"search",size:"16px",class:"search-icon"}),o("input",{key:"8fed50c8dc7ed32a7e150ac484f8d168361b2060",ref:e=>this.searchInputRef=e,type:"text",class:"search-input",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:this.handleSearchInput,onClick:this.handleSearchClick,style:{fontSize:this.fontSize}}),this.searchTerm&&o("button",{key:"8c678d6aff239ea039d21ed4bff44cbae8cfeaf3",type:"button",class:"clear-search",onClick:e=>{e.stopPropagation();this.clearSearch()},"aria-label":"Clear search"},o("rebill-icon",{key:"663cfa554151a26e4d296220698afb981350b10d",name:"x",size:"16px"})))),this.loading&&this.filteredOptions.length===0?o("div",{class:"loading-message",style:{fontSize:this.fontSize}},o("div",{class:"spinner"}),t.translate("common.loadingOptions")):this.filteredOptions.length>0?this.filteredOptions.map(((e,r)=>o("div",{class:`select-option ${this.value===e.value?"selected":""} ${this.highlightedIndex===r?"highlighted":""}`,style:{fontSize:this.fontSize},onClick:()=>this.selectOption(e),role:"option","aria-selected":this.value===e.value?"true":"false"},o("span",{innerHTML:e.label})))):o("div",{class:"no-results",style:{fontSize:this.fontSize}},"No se encontraron resultados"))),this.error&&o("span",{key:"c5975d29ae5b9233a1aeaa2e392b38b0db55c2e0",class:"error-message"},this.error))}};s.style=l;export{s as rebill_input_select};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as r,h as o}from"./p-D8cwEAmw.js";import{a as i,I as t}from"./p-DkbFAMha.js";const l=".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}.select-wrapper{position:relative;width:100%;box-sizing:border-box}.select-trigger{width:100%;height:38.33px;border-radius:var(--input-group-inner-border-radius, 8px);border:1.5px solid var(--rebill-color-border);padding:10px 14px;padding-right:30px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;transition:border-color 0.2s;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;box-sizing:border-box;min-width:0;}.select-trigger:focus{outline:none;border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.select-trigger:hover:not(.disabled){border-color:var(--rebill-color-primary)}.select-trigger.input-error{border-color:var(--rebill-color-error) !important}.select-trigger.placeholder .select-value{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.select-wrapper.disabled .select-trigger{background-color:var(--rebill-color-background);color:var(--rebill-color-text-secondary);cursor:not-allowed;opacity:0.7}.select-value{flex:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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}.select-icon.rotated{transform:rotateX(180deg)}.select-wrapper.disabled .select-icon{color:var(--rebill-color-disabled)}.select-trigger.underlined{width:100%;height:38.33px;padding:10px 14px;padding-right:40px;font-size:0.875rem;font-weight:normal;color:var(--rebill-color-text-primary);outline:none;background:var(--rebill-color-background);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none;min-width:0;border:none}.select-trigger.underlined:focus{border:none;box-shadow:none}.select-dropPosition.open-down{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-dropPosition.open-up{position:absolute;bottom: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-bottom:0.25rem;margin-top:0;max-height:200px;overflow-y:auto;animation:slideUp 0.15s ease-out;box-sizing:border-box;width:100%}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.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)}.search-container{padding:0.75rem;border-bottom:1px solid var(--rebill-color-border);background-color:var(--rebill-color-background)}.search-input-wrapper{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:0.75rem;color:var(--rebill-color-text-secondary);z-index:1;pointer-events:none}.search-input{width:100%;padding:0.5rem 0.75rem 0.5rem 2.5rem;border:1px solid var(--rebill-color-border);border-radius:0.375rem;font-size:0.875rem;color:var(--rebill-color-text-primary);background-color:var(--rebill-color-background);outline:none;transition:border-color 0.2s ease;box-sizing:border-box}.search-input:focus{border-color:var(--rebill-color-primary);box-shadow:0 0 0 2px var(--rebill-color-primary-light)}.search-input::placeholder{color:var(--rebill-color-text-secondary-light);font-size:0.875rem}.clear-search{position:absolute;right:0.75rem;background:none;border:none;cursor:pointer;padding:0.25rem;border-radius:0.25rem;display:flex;align-items:center;justify-content:center;color:var(--rebill-color-text-secondary);transition:background-color 0.2s ease}.clear-search:hover{background-color:var(--rebill-color-background-hover);color:var(--rebill-color-text-primary)}.no-results{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);font-style:italic;border-bottom:1px solid var(--rebill-color-border)}.loading-message{padding:0.75rem;text-align:center;color:var(--rebill-color-text-secondary);display:flex;align-items:center;justify-content:center;gap:0.5rem;border-bottom:1px solid var(--rebill-color-border)}.loading-message .spinner{width:14px;height:14px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite}.spinner{width:16px;height:16px;border:2px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--rebill-color-primary, #007bff);animation:spin 1s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media screen and (max-width: 768px){.select-trigger{font-size:1rem}.select-trigger.placeholder .select-value{font-size:1rem}.select-option{font-size:1rem}.search-input{font-size:1rem}.search-input::placeholder{font-size:1rem}.loading-message{font-size:1rem}.no-results{font-size:1rem}}";const s=class{constructor(o){e(this,o);this.input=r(this,"input")}dropdownRef;triggerRef;searchInputRef;unsubscribeCurrentLocaleStore;label="";options=[];value="";error="";id="";disabled=false;placeholder="Selecciona una opción";variant;arrowIcon="up-down";dropPosition="down";fontSize="14px";backgroundColor="";searchable=false;searchPlaceholder="Search for options...";loading=false;isOpen=false;componentId="";highlightedIndex=-1;searchTerm="";filteredOptions=[];languageUpdateTrigger=0;input;componentWillLoad(){this.filteredOptions=[...this.options];this.componentId=this.id||`select-${Math.random().toString(36).substr(2,9)}`}componentDidLoad(){this.unsubscribeCurrentLocaleStore=i.onChange("currentLocale",(()=>{this.languageUpdateTrigger++}))}disconnectedCallback(){if(this.unsubscribeCurrentLocaleStore){this.unsubscribeCurrentLocaleStore()}}componentWillUpdate(){this.filteredOptions=[...this.options];if(this.searchable){this.filterOptions()}}handleFormChange(e){const r=e.detail;if(r&&this.id in r){const e=r[this.id];if(e!==this.value&&typeof e==="string"){this.value=e;this.input.emit({id:this.id,value:this.value})}}}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()}}handleKeyDown(e){if(this.disabled)return;if(this.searchable&&this.searchInputRef&&e.target===this.searchInputRef){return}switch(e.key){case"Enter":case" ":e.preventDefault();if(this.isOpen&&this.highlightedIndex>=0){this.selectOption(this.filteredOptions[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.filteredOptions.length-1)}break;case"ArrowUp":e.preventDefault();if(this.isOpen){this.highlightedIndex=Math.max(this.highlightedIndex-1,0)}break}}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.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}}else{this.searchTerm="";this.filterOptions()}};openDropdown=()=>{if(this.disabled)return;document.dispatchEvent(new CustomEvent("closeAllSelects",{detail:this.componentId}));this.isOpen=true;this.highlightedIndex=this.filteredOptions.findIndex((e=>e.value===this.value));if(this.highlightedIndex===-1){this.highlightedIndex=0}if(this.searchable){this.focusSearchInput()}};focusSearchInput=()=>{const e=()=>{if(this.searchInputRef){this.searchInputRef.focus();this.searchInputRef.select()}};e();requestAnimationFrame((()=>{e()}));setTimeout((()=>{e()}),10)};closeDropdown=()=>{this.isOpen=false;this.highlightedIndex=-1;this.searchTerm="";this.filterOptions()};selectOption=e=>{if(this.disabled)return;this.value=e.value;this.closeDropdown();this.input.emit({id:this.id,value:this.value,disabled:this.disabled})};getSelectedOptionLabel=()=>{const e=this.options.find((e=>e.value===this.value));return e?e.label:this.placeholder};getArrowIcon=()=>{if(this.arrowIcon==="up-down")return"chevron-up-down";return"chevron-down"};filterOptions=()=>{if(!this.searchTerm.trim()){this.filteredOptions=[...this.options]}else{this.filteredOptions=this.options.filter((e=>e.label.toLowerCase().includes(this.searchTerm.toLowerCase())))}this.highlightedIndex=-1};handleSearchInput=e=>{const r=e.target;this.searchTerm=r.value;this.filterOptions()};clearSearch=()=>{this.searchTerm="";this.filterOptions()};handleSearchClick=e=>{e.stopPropagation()};render(){const e=this.getSelectedOptionLabel();const r=this.value!=="";return o("div",{key:"23c4562b47db3e895f706d3fc46f0b4ca3381eb2",class:"input-container"},this.label&&o("label",{key:"5c5aa626f8b85e16dd4623798f517d29145b80b7",class:`input-label ${this.disabled?"disabled":""}`},this.label),o("div",{key:"891a09b90bec6483503c7d24e016e1f018268a9a",class:`select-wrapper ${this.disabled?"disabled":""} ${this.isOpen?"open":""}`},o("div",{key:"6f21d55aad5ab4efab7e857dc4a59bd0fb787986",ref:e=>this.triggerRef=e,class:`input-element select-trigger ${this.error?"input-error":""} ${!r?"placeholder":""} ${this.variant==="underlined"?"underlined":""}`,style:{backgroundColor:this.backgroundColor},onClick:this.toggleDropdown,tabIndex:this.disabled?-1:0,role:"combobox","aria-expanded":this.isOpen.toString(),"aria-haspopup":"listbox","aria-labelledby":this.label?`${this.id}-label`:undefined},o("span",{key:"537ae49362d7b96233f91aeb899059e190199b17",class:"select-value",style:{fontSize:this.fontSize},innerHTML:e}),o("div",{key:"d81cc47b9d93b8f4206ef1a9b6c320d0c91f867b",class:"icon-wrapper"},this.loading?o("div",{class:"spinner"}):o("rebill-icon",{name:this.getArrowIcon(),size:"20px",class:`select-icon ${this.isOpen&&this.arrowIcon==="down"?"rotated":""}`}))),this.isOpen&&o("div",{key:"3d00b0028bdd98d99336bd23d98c5f9f4443ca5c",ref:e=>this.dropdownRef=e,class:`select-dropPosition ${this.dropPosition==="up"?"open-up":"open-down"}`,role:"listbox"},this.searchable&&o("div",{key:"d3b7272792e4083a80a1fb86292b704abc6db660",class:"search-container",onClick:this.handleSearchClick},o("div",{key:"14785ce1256f9e7f5ba6bfc6b2ae6f83f48b7e73",class:"search-input-wrapper"},o("rebill-icon",{key:"b4cd2ef7a511bf046a0aaa85f8010f5f05ff7b46",name:"search",size:"16px",class:"search-icon"}),o("input",{key:"4bfc8b4016b5381679b30bf219d94afa1e273e5e",ref:e=>this.searchInputRef=e,type:"text",class:"search-input",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:this.handleSearchInput,onClick:this.handleSearchClick,style:{fontSize:this.fontSize}}),this.searchTerm&&o("button",{key:"b1c3d31391c32297d9dacd96db6d0db47e752c8b",type:"button",class:"clear-search",onClick:e=>{e.stopPropagation();this.clearSearch()},"aria-label":"Clear search"},o("rebill-icon",{key:"c3b19f8b59672c5ec127d3c669f383233dedbcd5",name:"x",size:"16px"})))),this.loading&&this.filteredOptions.length===0?o("div",{class:"loading-message",style:{fontSize:this.fontSize}},o("div",{class:"spinner"}),t.translate("common.loadingOptions")):this.filteredOptions.length>0?this.filteredOptions.map(((e,r)=>o("div",{class:`select-option ${this.value===e.value?"selected":""} ${this.highlightedIndex===r?"highlighted":""}`,style:{fontSize:this.fontSize},onClick:()=>this.selectOption(e),role:"option","aria-selected":this.value===e.value?"true":"false"},o("span",{innerHTML:e.label})))):o("div",{class:"no-results",style:{fontSize:this.fontSize}},"No se encontraron resultados"))),this.error&&o("span",{key:"cef33371cb5b640b8496e797045ef967f2c7f763",class:"error-message"},this.error))}};s.style=l;export{s as rebill_input_select};
|
|
2
|
+
//# sourceMappingURL=p-0239917e.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as o}from"./p-D8cwEAmw.js";const s=".otp-container{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;margin:0 auto}.otp-input-container{display:flex;align-items:center;gap:16px;margin-top:8px}.otp-fields{display:flex;gap:8px;align-items:center}.otp-field{width:36px;height:36px;border:2px solid #e5e7eb;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);background:white;position:relative}.otp-field.active{border-color:var(--rebill-color-primary-hover);transform:scale(1.02);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-field input{width:100%;height:100%;border:none;text-align:center;font-size:12px;color:var(--rebill-color-text-primary);background:transparent;outline:none;transition:all 0.3s ease;caret-color:transparent}.otp-field input{transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-field input::placeholder{color:var(--rebill-color-text-secondary);transition:opacity 0.3s ease,\n color 0.3s ease}.otp-field input:focus::placeholder{opacity:0;transition:opacity 0.3s ease}.otp-field{transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-separator{font-size:18px;font-weight:500;color:#6b7280;margin:4px;user-select:none;line-height:1;display:flex;align-items:center}.otp-error{color:var(--rebill-color-error);font-size:14px;font-weight:400}.otp-field.error{border-color:var(--rebill-color-error);border-width:1px}";const r=class{constructor(i){t(this,i);this.otpChange=e(this,"otpChange")}get el(){return i(this)}error="";otp="";clearable=false;placeholder="";otpChange;otpValue="";componentWillLoad(){this.otpValue=this.otp}componentWillUpdate(){if(this.otp!==this.otpValue){this.otpValue=this.otp}}handleOtpChange(t){this.otpValue=t;this.otpChange.emit(t)}findFirstEmptyIndex(){for(let t=0;t<6;t++){if(!this.otpValue[t]){return t}}return 5}focusField(t){const e=this.el?.querySelectorAll(".otp-field input");if(e&&e[t]){e[t].focus()}}handleFieldClick=()=>{const t=this.findFirstEmptyIndex();this.focusField(t)};handleInputClick=()=>{this.handleFieldClick()};handleKeyDown=(t,e)=>{if(t.key==="Backspace"){const i=t.target;if(!i.value&&e>0){t.preventDefault();const i=this.otpValue.split("");i[e-1]="";this.handleOtpChange(i.join(""));setTimeout((()=>{this.focusField(e-1)}),0)}else if(i.value){const t=this.otpValue.split("");t[e]="";this.handleOtpChange(t.join(""))}}};handleInput=(t,e)=>{const i=t.target;const o=i.value;if(!/^\d*$/.test(o)){i.value="";return}const s=this.otpValue.split("");s[e]=o;this.handleOtpChange(s.join(""));if(o&&e<5){setTimeout((()=>{this.focusField(e+1)}),0)}};handlePaste=t=>{t.preventDefault();const e=t.clipboardData?.getData("text/plain")||"";const i=e.replace(/\D/g,"");if(i.length>=6){const t=i.substring(0,6);this.handleOtpChange(t);this.focusField(5)}else if(i.length>0){const t=this.otpValue.split("");for(let e=0;e<Math.min(i.length,6);e++){t[e]=i[e]}this.handleOtpChange(t.join(""));const e=Math.min(i.length,5);this.focusField(e)}};render(){return o("div",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,g as i,h as o}from"./p-D8cwEAmw.js";const s=".otp-container{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;margin:0 auto}.otp-input-container{display:flex;align-items:center;gap:16px;margin-top:8px}.otp-fields{display:flex;gap:8px;align-items:center}.otp-field{width:36px;height:36px;border:2px solid #e5e7eb;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);background:white;position:relative}.otp-field.active{border-color:var(--rebill-color-primary-hover);transform:scale(1.02);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-field input{width:100%;height:100%;border:none;text-align:center;font-size:12px;color:var(--rebill-color-text-primary);background:transparent;outline:none;transition:all 0.3s ease;caret-color:transparent}.otp-field input{transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-field input::placeholder{color:var(--rebill-color-text-secondary);transition:opacity 0.3s ease,\n color 0.3s ease}.otp-field input:focus::placeholder{opacity:0;transition:opacity 0.3s ease}.otp-field{transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.otp-separator{font-size:18px;font-weight:500;color:#6b7280;margin:4px;user-select:none;line-height:1;display:flex;align-items:center}.otp-error{color:var(--rebill-color-error);font-size:14px;font-weight:400}.otp-field.error{border-color:var(--rebill-color-error);border-width:1px}";const r=class{constructor(i){t(this,i);this.otpChange=e(this,"otpChange")}get el(){return i(this)}error="";otp="";clearable=false;placeholder="";otpChange;otpValue="";componentWillLoad(){this.otpValue=this.otp}componentWillUpdate(){if(this.otp!==this.otpValue){this.otpValue=this.otp}}handleOtpChange(t){this.otpValue=t;this.otpChange.emit(t)}findFirstEmptyIndex(){for(let t=0;t<6;t++){if(!this.otpValue[t]){return t}}return 5}focusField(t){const e=this.el?.querySelectorAll(".otp-field input");if(e&&e[t]){e[t].focus()}}handleFieldClick=()=>{const t=this.findFirstEmptyIndex();this.focusField(t)};handleInputClick=()=>{this.handleFieldClick()};handleKeyDown=(t,e)=>{if(t.key==="Backspace"){const i=t.target;if(!i.value&&e>0){t.preventDefault();const i=this.otpValue.split("");i[e-1]="";this.handleOtpChange(i.join(""));setTimeout((()=>{this.focusField(e-1)}),0)}else if(i.value){const t=this.otpValue.split("");t[e]="";this.handleOtpChange(t.join(""))}}};handleInput=(t,e)=>{const i=t.target;const o=i.value;if(!/^\d*$/.test(o)){i.value="";return}const s=this.otpValue.split("");s[e]=o;this.handleOtpChange(s.join(""));if(o&&e<5){setTimeout((()=>{this.focusField(e+1)}),0)}};handlePaste=t=>{t.preventDefault();const e=t.clipboardData?.getData("text/plain")||"";const i=e.replace(/\D/g,"");if(i.length>=6){const t=i.substring(0,6);this.handleOtpChange(t);this.focusField(5)}else if(i.length>0){const t=this.otpValue.split("");for(let e=0;e<Math.min(i.length,6);e++){t[e]=i[e]}this.handleOtpChange(t.join(""));const e=Math.min(i.length,5);this.focusField(e)}};render(){return o("div",{key:"22d1a4a0f52f04672bb16a4473d49d396717c251",class:"otp-container"},o("div",{key:"f4ce51dd0fae34b4f0560aeaaaee0e6e9a873077",class:"email-icon"},o("rebill-icon",{key:"a5c3c76e49d5bb4713b182d3ba753b17783afc3f",name:"invite"})),o("div",{key:"37e3942600948b3a7ec10b217919dad9e68c9435",class:"otp-input-container",onClick:this.handleFieldClick},o("div",{key:"4df9d0c3bba7ccfd10da8dc7b412dd3b33c27990",class:"otp-fields"},[0,1,2,3,4,5].map((t=>o("div",{key:t,style:{display:"flex",alignItems:"center"}},o("div",{class:`otp-field ${this.error?"error":""}`},o("input",{type:"text",maxlength:"1",placeholder:this.placeholder,value:this.otpValue[t]||"",onInput:e=>this.handleInput(e,t),onClick:()=>this.handleInputClick(),onKeyDown:e=>this.handleKeyDown(e,t),onPaste:t=>this.handlePaste(t),onFocus:t=>{this.el?.querySelectorAll(".otp-field").forEach((t=>t.classList.remove("active")));t.target.parentElement?.classList.add("active")},onBlur:t=>{t.target.parentElement?.classList.remove("active")}})),t===2&&o("div",{class:"otp-separator"},"-")))))),this.error&&o("div",{key:"386db596c1720b9c6837eb2ff877ddd553e78311",class:"otp-error"},this.error))}};r.style=s;export{r as input_otp};
|
|
2
|
+
//# sourceMappingURL=p-1ac036d7.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as i}from"./p-D8cwEAmw.js";import{C as r,c as d}from"./p-DA598vBj.js";const t=".rebill-vertical-divider{width:var(--divider-thickness, 1px);height:100%;color:var(--divider-color, #c4c8cf);border-left:var(--divider-thickness, 1px) solid var(--divider-color, #c4c8cf);padding:0;background:none;flex-shrink:0}.rebill-vertical-divider[style*='--divider-dashed: 2 2']{border-left-style:dashed;border-left-width:var(--divider-thickness, 1px);border-left-color:var(--divider-color, #c4c8cf)}.rebill-vertical-divider.dashed{border-left-style:dashed}.rebill-vertical-divider.connectorActive{border-left:var(--divider-thickness, 1px) solid var(--divider-color, #0056f6);background:none}.rebill-vertical-divider.with-dot{border-left:var(--divider-thickness, 1px) solid var(--divider-color, #0056f6);background:none;position:relative;}.rebill-vertical-divider.with-dot::after{content:'';position:absolute;bottom:-3px;left:50%;transform:translateX(-65%);width:6px;height:6px;background:var(--divider-color, #0056f6);border-radius:50%}";const o=class{constructor(i){e(this,i)}height;color=r.TIMELINE_CONNECTOR;thickness="1px";dashed=false;connectorActive=false;withDot=false;render(){return i("div",{key:"eb4eb689ee3b202277acf9afe8824b0eaf92eee6",class:`rebill-vertical-divider ${this.dashed?"dashed":""} ${this.connectorActive?"connectorActive":""} ${this.withDot?"with-dot":""}`,style:{"--divider-color":d(this.color),"--divider-thickness":this.thickness,"--divider-dashed":this.dashed?"2 2":"none",height:this.height||(this.connectorActive?"27px":"40px")}})}};o.style=t;export{o as rebill_vertical_divider};
|
|
2
|
+
//# sourceMappingURL=p-1d7e392c.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,h as a}from"./p-D8cwEAmw.js";const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as i,h as a}from"./p-D8cwEAmw.js";const r=".card-carousel-container{display:flex;flex-direction:column;align-items:center;gap:8px;position:relative}.card-carousel{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;min-height:32px}.card-icon{transition:opacity 0.4s ease-in-out;opacity:1}.card-icon.fade-out{opacity:0}.card-icon.fade-in{opacity:1}.card-indicators{display:flex;gap:4px;align-items:center;justify-content:center;margin-top:4px}.indicator{width:6px;height:6px;border-radius:50%;background-color:var(--rebill-color-border, #d9d9d9);cursor:pointer;transition:all 0.2s ease-in-out}.indicator:hover{background-color:var(--rebill-color-primary, #0079be);transform:scale(1.2)}.indicator.active{background-color:var(--rebill-color-primary, #0079be);transform:scale(1.3)}.indicator.active{animation:pulse 2s infinite}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(0, 121, 190, 0.7)}70%{box-shadow:0 0 0 6px rgba(0, 121, 190, 0)}100%{box-shadow:0 0 0 0 rgba(0, 121, 190, 0)}}@media (max-width: 768px){.card-carousel-container{gap:6px}.indicator{width:5px;height:5px}}";const e=class{constructor(a){i(this,a)}interval=3e3;size="32px";color="currentColor";showAllCards=false;currentIndex=0;intervalId=null;cardIcons=["visa","card-master","card-amex","card-discover","card-maestro","card-dinnersClub"];componentWillLoad(){this.startCarousel()}componentWillUnload(){this.stopCarousel()}startCarousel(){this.stopCarousel();this.intervalId=window.setInterval((()=>{this.nextCard()}),this.interval)}stopCarousel(){if(this.intervalId){clearInterval(this.intervalId);this.intervalId=null}}nextCard(){const i=(this.currentIndex+1)%this.cardIcons.length;this.currentIndex=i}handleMouseEnter(){this.stopCarousel()}handleMouseLeave(){this.startCarousel()}render(){const i=this.cardIcons[this.currentIndex];return a("div",{key:"263796cd725fdd510c54b685f0d1430c0653a2c8",class:"card-carousel-container",onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},a("div",{key:"22710173a70058a34850c247774c11611b03a653",class:"card-carousel"},a("rebill-icon",{key:`${i}-${this.currentIndex}`,name:i,size:this.size,color:this.color,class:"card-icon"})),this.showAllCards&&a("div",{key:"b7afaf99ba7e6c6d8708f4d7e736352343701c09",class:"card-indicators"},this.cardIcons.map(((i,r)=>a("div",{key:i,class:`indicator ${r===this.currentIndex?"active":""}`,onClick:()=>{this.currentIndex=r}})))))}};e.style=r;export{e as rebill_card_carousel};
|
|
2
|
+
//# sourceMappingURL=p-2ebb1d54.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,g as i,h as r}from"./p-D8cwEAmw.js";const l=".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}}.input-wrapper{position:relative;display:flex;align-items:center}.input-element{width:100%;box-sizing:border-box}.icon-left,.icon-right{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;transform:translateY(-50%)}.icon-left{left:0.75rem;color:var(--rebill-color-text-secondary-light)}.icon-right{right:0.75rem;cursor:pointer;color:var(--rebill-color-text-secondary-light)}.input-element.input-error:focus{flex-direction:column;box-shadow:0 0 0 2px var(--rebill-color-error-light)}.floating-label{position:relative}.floating-label .input-text__input-label{position:absolute;top:50%;left:0.75rem;transform:translateY(-50%);color:var(--rebill-color-text-secondary-light);transition:all 0.1s ease-in-out;pointer-events:none}.floating-label .input-element::placeholder{color:transparent}.floating-label .input-element:focus~.input-text__input-label,.floating-label .input-element:not(:placeholder-shown)~.input-text__input-label{top:0;font-size:0.62rem;color:var(--rebill-color-text-secondary);background-color:var(--rebill-color-background);padding:0 4px;left:0.75rem}.floating-label.has-left-icon .input-text__input-label{left:2.5rem}.input-element:disabled{color:var(--rebill-color-neutrals-500)}.input-wrapper:has(.input-element:disabled) .icon-left,.input-wrapper:has(.input-element:disabled) .icon-right{color:var(--rebill-color-text-secondary-light) !important}";const o=class{constructor(i){e(this,i);this.input=t(this,"input");this.rightIconClick=t(this,"rightIconClick");this.blur=t(this,"blur")}get el(){return i(this)}inputElement;label="";placeholder="";value="";error="";id="";disabled=false;leftIcon;rightIcon;clearable=false;variant="default";uppercase=false;input;rightIconClick;blur;handleFormChange(e){const t=e.detail;if(t&&this.id in t){this.value=t[this.id]}}onInput=e=>{if(this.disabled)return;const t=e.target;let i=t.value;if(this.id==="email"){i=i.toLowerCase();t.value=i}else if(this.uppercase){i=i.toUpperCase();t.value=i}this.value=i;this.input.emit({id:this.id,value:this.value})};onClear=()=>{if(this.disabled)return;this.value="";this.input.emit({id:this.id,value:this.value})};onRightIconClick=()=>{if(this.disabled)return;this.rightIconClick.emit({id:this.id})};onBlur=()=>{const e=this.value.trim();if(e!==this.value){this.value=e;this.input.emit({id:this.id,value:this.value})}this.blur.emit({id:this.id,value:this.value})};async getInputElement(){return this.inputElement}render(){const e=this.variant==="floating";const t={"input-element":true,"input-error":!!this.error};const i={"input-wrapper":true,"floating-label":e,"has-left-icon":!!this.leftIcon,"has-right-icon":!!this.rightIcon};return r("div",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,g as i,h as r}from"./p-D8cwEAmw.js";const l=".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}}.input-wrapper{position:relative;display:flex;align-items:center}.input-element{width:100%;box-sizing:border-box}.icon-left,.icon-right{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;transform:translateY(-50%)}.icon-left{left:0.75rem;color:var(--rebill-color-text-secondary-light)}.icon-right{right:0.75rem;cursor:pointer;color:var(--rebill-color-text-secondary-light)}.input-element.input-error:focus{flex-direction:column;box-shadow:0 0 0 2px var(--rebill-color-error-light)}.floating-label{position:relative}.floating-label .input-text__input-label{position:absolute;top:50%;left:0.75rem;transform:translateY(-50%);color:var(--rebill-color-text-secondary-light);transition:all 0.1s ease-in-out;pointer-events:none}.floating-label .input-element::placeholder{color:transparent}.floating-label .input-element:focus~.input-text__input-label,.floating-label .input-element:not(:placeholder-shown)~.input-text__input-label{top:0;font-size:0.62rem;color:var(--rebill-color-text-secondary);background-color:var(--rebill-color-background);padding:0 4px;left:0.75rem}.floating-label.has-left-icon .input-text__input-label{left:2.5rem}.input-element:disabled{color:var(--rebill-color-neutrals-500)}.input-wrapper:has(.input-element:disabled) .icon-left,.input-wrapper:has(.input-element:disabled) .icon-right{color:var(--rebill-color-text-secondary-light) !important}";const o=class{constructor(i){e(this,i);this.input=t(this,"input");this.rightIconClick=t(this,"rightIconClick");this.blur=t(this,"blur")}get el(){return i(this)}inputElement;label="";placeholder="";value="";error="";id="";disabled=false;leftIcon;rightIcon;clearable=false;variant="default";uppercase=false;input;rightIconClick;blur;handleFormChange(e){const t=e.detail;if(t&&this.id in t){this.value=t[this.id]}}onInput=e=>{if(this.disabled)return;const t=e.target;let i=t.value;if(this.id==="email"){i=i.toLowerCase();t.value=i}else if(this.uppercase){i=i.toUpperCase();t.value=i}this.value=i;this.input.emit({id:this.id,value:this.value})};onClear=()=>{if(this.disabled)return;this.value="";this.input.emit({id:this.id,value:this.value})};onRightIconClick=()=>{if(this.disabled)return;this.rightIconClick.emit({id:this.id})};onBlur=()=>{const e=this.value.trim();if(e!==this.value){this.value=e;this.input.emit({id:this.id,value:this.value})}this.blur.emit({id:this.id,value:this.value})};async getInputElement(){return this.inputElement}render(){const e=this.variant==="floating";const t={"input-element":true,"input-error":!!this.error};const i={"input-wrapper":true,"floating-label":e,"has-left-icon":!!this.leftIcon,"has-right-icon":!!this.rightIcon};return r("div",{key:"77c9d0980fb2727bbb92cd95352d5dc6a1222ddb",class:"input-container"},!e&&this.label&&r("label",{key:"9e0191ce3584d46d399fba6dc3727d182df0c00a",class:`input-label ${this.disabled?"disabled":""}`},this.label),r("div",{key:"34abdf2bfb4587a110bbba382e5a572921a0bddc",class:i},this.leftIcon&&r("div",{key:"e893a7b7a0e6aa35e5a28acac72642b523be3323",class:"icon-left"},r("rebill-icon",{key:"be6eebaf5ddbea7cf5e6f581a28f289f59bd6dd3",name:this.leftIcon})),r("input",{key:"30d8fa0b19fe4b3723f48b03fbaebc9a854bcf8f",ref:e=>this.inputElement=e,type:"text",class:t,placeholder:e?this.label:this.placeholder,value:this.value,onInput:this.onInput,onBlur:this.onBlur,disabled:this.disabled,style:{paddingLeft:this.leftIcon?"2.5rem":"0.75rem",paddingRight:this.clearable||this.rightIcon?"2.5rem":"0.75rem"}}),e&&r("label",{key:"2b410a985ad150cd33b3f6faff82422046c7509c",class:"input-text__input-label input-label"},this.label),this.clearable&&this.value&&r("div",{key:"c02818e635da077ebef4b607a435874c151ccf37",class:"icon-right",onClick:this.onClear},r("rebill-icon",{key:"05bd2ac74766c544bf83a132651c56eeabb27e54",name:"x"})),this.rightIcon&&!this.clearable&&r("div",{key:"b2c6c967af138d90ae8cf456572bd53117859ad2",class:"icon-right",onClick:this.onRightIconClick},r("rebill-icon",{key:"0a97d6b77588a469d296eade8ee7e5c5a47ce4bb",name:this.rightIcon}))),this.error&&r("span",{key:"93caa9f68e587ec23162fa84758deeef1514d9aa",class:"error-message"},this.error))}};o.style=l;export{o as rebill_input_text};
|
|
2
|
+
//# sourceMappingURL=p-3a5bdb02.entry.js.map
|