rebill-web-components-sdk 1.8.33 → 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 +2 -2
- 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 +1 -1
- package/dist/collection/components/renewal/rebill-renewal.js.map +1 -1
- package/dist/collection/components/renewal/renewal-success-page/renewal-success-page.js +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 +47 -41
- 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 +2 -2
- 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-6334b899.entry.js → p-e242be38.entry.js} +2 -2
- 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-6334b899.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-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
|
@@ -13,6 +13,10 @@ var ACTION_STATUS;
|
|
|
13
13
|
export class DiscountCoupon {
|
|
14
14
|
el;
|
|
15
15
|
hideLabel = false;
|
|
16
|
+
displayMode = 'editable';
|
|
17
|
+
readonlyCouponCode;
|
|
18
|
+
readonlyDiscountAmount;
|
|
19
|
+
readonlyCurrency;
|
|
16
20
|
couponCode = '';
|
|
17
21
|
actionStatus = ACTION_STATUS.NOT_APPLIED;
|
|
18
22
|
isLoading = false;
|
|
@@ -25,6 +29,9 @@ export class DiscountCoupon {
|
|
|
25
29
|
this.unsubscribeCurrentLocaleStore = SessionStore.onChange('currentLocale', () => {
|
|
26
30
|
this.currentLocale = sessionState.currentLocale;
|
|
27
31
|
});
|
|
32
|
+
if (this.readonlyCouponCode) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
28
35
|
if (sessionState.data.pricing.discountCouponCode &&
|
|
29
36
|
sessionState.data.pricing.discountAmount > 0) {
|
|
30
37
|
this.actionStatus = ACTION_STATUS.APPLIED;
|
|
@@ -37,6 +44,9 @@ export class DiscountCoupon {
|
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
componentDidUpdate() {
|
|
47
|
+
if (this.readonlyCouponCode) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
40
50
|
if (this.actionStatus === ACTION_STATUS.EDITING && this.inputRef) {
|
|
41
51
|
setTimeout(async () => {
|
|
42
52
|
const inputElement = await this.inputRef.getInputElement();
|
|
@@ -47,6 +57,8 @@ export class DiscountCoupon {
|
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
async onApplyCoupon() {
|
|
60
|
+
if (this.readonlyCouponCode)
|
|
61
|
+
return;
|
|
50
62
|
const sessionId = sessionState.data.sessionId;
|
|
51
63
|
if (!sessionId) {
|
|
52
64
|
return;
|
|
@@ -81,15 +93,26 @@ export class DiscountCoupon {
|
|
|
81
93
|
}
|
|
82
94
|
}
|
|
83
95
|
onCancelCoupon() {
|
|
96
|
+
if (this.readonlyCouponCode)
|
|
97
|
+
return;
|
|
84
98
|
this.actionStatus = ACTION_STATUS.NOT_APPLIED;
|
|
85
99
|
this.couponCode = '';
|
|
86
100
|
this.isError = false;
|
|
87
101
|
}
|
|
102
|
+
renderReadonlyView() {
|
|
103
|
+
if (!this.readonlyCouponCode && this.readonlyDiscountAmount) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
return (h("div", { class: "coupon-chip coupon-chip--readonly" }, h("rebill-icon", { name: "tag-sale", size: "16px" }), h("div", { class: "coupon-content" }, h("rebill-typography", { variant: "overline", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, this.readonlyCouponCode), this.readonlyDiscountAmount && (h("rebill-typography", { variant: "overline", color: COLORS_ENUM.GREEN }, "-$", formatAmountWithoutCurrency(this.readonlyDiscountAmount, this.readonlyCurrency))))));
|
|
107
|
+
}
|
|
88
108
|
render() {
|
|
89
|
-
|
|
109
|
+
if (this.readonlyCouponCode) {
|
|
110
|
+
return this.renderReadonlyView();
|
|
111
|
+
}
|
|
112
|
+
return (h("div", null, h("div", { class: "summary-row", style: {
|
|
90
113
|
alignItems: this.actionStatus === ACTION_STATUS.EDITING ? 'flex-start' : 'center',
|
|
91
114
|
display: 'flex',
|
|
92
|
-
} }, !this.hideLabel && (h("rebill-typography", {
|
|
115
|
+
} }, !this.hideLabel && (h("rebill-typography", { variant: "body2", style: { marginTop: this.actionStatus === ACTION_STATUS.EDITING ? '7px' : '0px' } }, I18nService.translate('discountCoupons.discount'))), this.actionStatus === ACTION_STATUS.NOT_APPLIED && (h("rebill-button", { variant: "filled", size: "small", theme: "primary-dark", onClick: () => (this.actionStatus = ACTION_STATUS.EDITING) }, I18nService.translate('discountCoupons.addDiscount'))), this.actionStatus === ACTION_STATUS.EDITING && (h("div", { class: "summary-row", style: { alignItems: 'flex-start', display: 'flex' } }, h("rebill-input-text", { ref: el => (this.inputRef = el), id: "discountCoupon", value: this.couponCode, placeholder: I18nService.translate('discountCoupons.addDiscount'), disabled: this.isLoading, error: this.isError ? I18nService.translate('discountCoupons.error') : '', clearable: true, uppercase: true, onInput: e => {
|
|
93
116
|
e.stopPropagation();
|
|
94
117
|
if (e.detail && e.detail.value !== undefined) {
|
|
95
118
|
this.couponCode = e.detail.value;
|
|
@@ -98,12 +121,12 @@ export class DiscountCoupon {
|
|
|
98
121
|
if (!this.couponCode.trim()) {
|
|
99
122
|
this.onCancelCoupon();
|
|
100
123
|
}
|
|
101
|
-
} }), h("rebill-button", {
|
|
124
|
+
} }), h("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 === ACTION_STATUS.EDITING ? '3px' : '0px' } }, I18nService.translate('discountCoupons.apply')))), this.actionStatus === ACTION_STATUS.APPLIED && (h("div", { class: "coupon-chip" }, h("rebill-icon", { name: "tag-sale", size: "16px" }), h("div", { class: "coupon-content", onClick: () => (this.actionStatus = ACTION_STATUS.EDITING) }, h("rebill-typography", { variant: "overline", color: COLORS_ENUM.PRIMARY_DARK_TEXT }, sessionState.data.pricing.discountCouponCode), h("rebill-typography", { variant: "overline", color: COLORS_ENUM.GREEN }, "-$", formatAmountWithoutCurrency(sessionState.data.pricing.discountAmount, sessionState.data.pricing.currency))), h("div", { class: "coupon-close", onClick: () => {
|
|
102
125
|
this.actionStatus = ACTION_STATUS.NOT_APPLIED;
|
|
103
126
|
this.couponCode = '';
|
|
104
127
|
SessionStore.setDiscount(null);
|
|
105
128
|
this.discountApplied.emit(false);
|
|
106
|
-
} }, h("rebill-icon", {
|
|
129
|
+
} }, h("rebill-icon", { name: "x", size: "20px", color: COLORS_ENUM.PRIMARY_DARK_TEXT })))))));
|
|
107
130
|
}
|
|
108
131
|
static get is() { return "discount-coupon"; }
|
|
109
132
|
static get originalStyleUrls() {
|
|
@@ -137,6 +160,83 @@ export class DiscountCoupon {
|
|
|
137
160
|
"reflect": false,
|
|
138
161
|
"attribute": "hide-label",
|
|
139
162
|
"defaultValue": "false"
|
|
163
|
+
},
|
|
164
|
+
"displayMode": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "'editable' | 'readonly'",
|
|
169
|
+
"resolved": "\"editable\" | \"readonly\"",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": ""
|
|
177
|
+
},
|
|
178
|
+
"getter": false,
|
|
179
|
+
"setter": false,
|
|
180
|
+
"reflect": false,
|
|
181
|
+
"attribute": "display-mode",
|
|
182
|
+
"defaultValue": "'editable'"
|
|
183
|
+
},
|
|
184
|
+
"readonlyCouponCode": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "string",
|
|
189
|
+
"resolved": "string",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": true,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": ""
|
|
197
|
+
},
|
|
198
|
+
"getter": false,
|
|
199
|
+
"setter": false,
|
|
200
|
+
"reflect": false,
|
|
201
|
+
"attribute": "readonly-coupon-code"
|
|
202
|
+
},
|
|
203
|
+
"readonlyDiscountAmount": {
|
|
204
|
+
"type": "number",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "number",
|
|
208
|
+
"resolved": "number",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": true,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": ""
|
|
216
|
+
},
|
|
217
|
+
"getter": false,
|
|
218
|
+
"setter": false,
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"attribute": "readonly-discount-amount"
|
|
221
|
+
},
|
|
222
|
+
"readonlyCurrency": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "string",
|
|
227
|
+
"resolved": "string",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": true,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": ""
|
|
235
|
+
},
|
|
236
|
+
"getter": false,
|
|
237
|
+
"setter": false,
|
|
238
|
+
"reflect": false,
|
|
239
|
+
"attribute": "readonly-currency"
|
|
140
240
|
}
|
|
141
241
|
};
|
|
142
242
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount-coupon.js","sourceRoot":"","sources":["../../../../src/components/checkout/discount-coupon/discount-coupon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,IAAK,aAIJ;AAJD,WAAK,aAAa;IAChB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,4CAA2B,CAAA;AAC7B,CAAC,EAJI,aAAa,KAAb,aAAa,QAIjB;AAOD,MAAM,OAAO,cAAc;IACd,EAAE,CAAc;IACnB,SAAS,GAAY,KAAK,CAAC;IAC1B,UAAU,GAAW,EAAE,CAAC;IACxB,YAAY,GAAkB,aAAa,CAAC,WAAW,CAAC;IACxD,SAAS,GAAY,KAAK,CAAC;IAC3B,OAAO,GAAY,KAAK,CAAC;IACzB,aAAa,GAAW,YAAY,CAAC,aAAa,CAAC;IACnD,eAAe,CAAwB;IACxC,QAAQ,CAA6B;IACrC,6BAA6B,CAAc;IAEnD,iBAAiB;QACf,IAAI,CAAC,6BAA6B,GAAG,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,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AY,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EACxC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CACnC,CACiB,CAChB;oBACN,4DACE,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC;4BAC9C,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;4BACrB,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;4BAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBACnC,CAAC;wBAED,oEAAa,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,GAAI,CACtE,CACF,CACP,CACG,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 @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 (\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.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 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 this.actionStatus = ACTION_STATUS.NOT_APPLIED;\n this.couponCode = '';\n this.isError = false;\n }\n\n render() {\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"]}
|
|
1
|
+
{"version":3,"file":"discount-coupon.js","sourceRoot":"","sources":["../../../../src/components/checkout/discount-coupon/discount-coupon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,IAAK,aAIJ;AAJD,WAAK,aAAa;IAChB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,4CAA2B,CAAA;AAC7B,CAAC,EAJI,aAAa,KAAb,aAAa,QAIjB;AAOD,MAAM,OAAO,cAAc;IACd,EAAE,CAAc;IACnB,SAAS,GAAY,KAAK,CAAC;IAC3B,WAAW,GAA4B,UAAU,CAAC;IAClD,kBAAkB,CAAU;IAC5B,sBAAsB,CAAU;IAChC,gBAAgB,CAAU;IACzB,UAAU,GAAW,EAAE,CAAC;IACxB,YAAY,GAAkB,aAAa,CAAC,WAAW,CAAC;IACxD,SAAS,GAAY,KAAK,CAAC;IAC3B,OAAO,GAAY,KAAK,CAAC;IACzB,aAAa,GAAW,YAAY,CAAC,aAAa,CAAC;IACnD,eAAe,CAAwB;IACxC,QAAQ,CAA6B;IACrC,6BAA6B,C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C9C,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;4BACrB,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;4BAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBACnC,CAAC;wBAED,mBAAa,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,GAAI,CACtE,CACF,CACP,CACG,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -94,17 +94,17 @@ export class Otp {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
render() {
|
|
97
|
-
return (h("div", { key: '
|
|
97
|
+
return (h("div", { key: 'a60f4778e7b8c9d12db4f91f1052efb529421f61', class: "otp__otp-container" }, h("div", { key: '27f07a33bb7f89884e9f7c7451dde4d45ec70fa0', class: "otp__user-information" }, h("div", { key: 'dff426cbad1d5104cb190b577b62ace1f80c0397', class: "otp__otp-description-container" }, h("rebill-typography", { key: '46056e3d98013ec69b2f94ce09453741393a84d5', variant: "body2", class: "otp__otp-description" }, I18nService.translate('otp.description')), h("rebill-typography", { key: '1ce410c937cc81a6d3d94ba9ba324463c17d2e1a', variant: "subtitle-bold", class: "otp__otp-description-digits" }, ' ', h("strong", { key: '5cb7f9fc7dc6bcb884719bc6dfb36d46d67e7c3b' }, I18nService.translate('otp.descriptionDigits')), ' '), h("rebill-typography", { key: '08374eda7ff4ae8deadfec171a086d31c4c9160d', variant: "body2", class: "otp__otp-description-email" }, I18nService.translate('otp.descriptionEmail'))), h("rebill-typography", { key: '3bca7a94df9819bd9a235c0963b2190a0f7dcb2f', variant: "body2", class: "otp__otp-email-line" }, sessionState.data.userInformation.email, ' ', !sessionState.data.prefilledData?.email && (h("span", { key: '53ac959b54950773538dbce0c236bbd2a75fa906', class: "otp__change-email", onClick: () => {
|
|
98
98
|
this.otpValue = '';
|
|
99
99
|
this.error = false;
|
|
100
100
|
this.returnForm.emit(false);
|
|
101
|
-
} }, I18nService.translate('otp.change'))))), h("input-otp", { key: '
|
|
101
|
+
} }, I18nService.translate('otp.change'))))), h("input-otp", { key: '53416598d254b6f42b1771136d43f8ac612f3b43', otp: this.otpValue, onOtpChange: event => this.handleOtpChange(event.detail), error: this.error ? I18nService.translate('otp.error') : '' }), this.isVerifying && (h("div", { key: '41c766a5e21c9d810dca97de5c720450df6924af', class: "otp__verifying-container" }, h("rebill-typography", { key: '93ba72b7c85cb622f8fd3d1b1175817a736c7ede', variant: "subtitle2", color: COLORS_ENUM.PRIMARY }, I18nService.translate('otp.verifyingCode')), h("div", { key: 'd8b11cf317c4d8cbbb3f840fe8c411738c8f095c', class: "otp__spinner" }))), h("rebill-button", { key: 'c07d1abbce11ca0a2f1f139d9b93c6808c85bfd0', type: "button", variant: "outline", theme: this.isTimerRunning ? 'secondary' : 'primary', disabled: this.isTimerRunning, onClick: this.handleResendCode, size: "small", style: { height: '24px', marginBottom: '8px' } }, this.isTimerRunning
|
|
102
102
|
? `${I18nService.translate('otp.resendCodeIn')} (${this.timer.getFormattedTime()})`
|
|
103
|
-
: I18nService.translate('otp.resendCode')), this.codeResent && (h("div", { key: '
|
|
103
|
+
: I18nService.translate('otp.resendCode')), this.codeResent && (h("div", { key: '04892ba96af1f0cc56e8a662b4e758f8539d8181', class: "otp__code-resent-container" }, h("rebill-typography", { key: 'd5406c0cb371a85f796bb33950db186703aa2a96', variant: "subtitle2", color: COLORS_ENUM.GREEN }, h("rebill-icon", { key: 'd125a0363f9b5b584638b148e285323d57c507ee', name: "check-radio" }), I18nService.translate('otp.codeResent')))), h("rebill-alert", { key: '00f6d0350530b1ec22027a91dcafa7bd6de2887d', class: "otp__rebill-alert", type: "secure", variant: "variant-info", message: I18nService.translate('otp.infoMessage'), icon: "circle-info", alertTitle: I18nService.translate('otp.infoTitle'), colorIcon: COLORS_ENUM.PRIMARY_DARK_LIGHT }), h("div", { key: '9a8c49f2d07459f11f447a430c5addf11da5d68c', class: "otp__alternative" }, h("rebill-typography", { key: 'aa6421edade435a60f2086666aadee7059c4381b', variant: "body2", color: COLORS_ENUM.PRIMARY_DARK }, "o")), h("div", { key: 'cd8efa383a62cc1362e50dd854812bf80c3a930c', class: "otp__guest-options" }, h("rebill-button", { key: '95db9dfa82140c9de4fcf22d513f8401779d0bb5', type: "button", variant: "outline", theme: "secondary", size: "medium", onClick: () => {
|
|
104
104
|
this.otpValue = '';
|
|
105
105
|
this.error = false;
|
|
106
106
|
this.returnForm.emit(false);
|
|
107
|
-
} }, I18nService.translate('otp.continueAsGuest')), h("rebill-alert", { key: '
|
|
107
|
+
} }, I18nService.translate('otp.continueAsGuest')), h("rebill-alert", { key: 'd1f56385971910aed328b740498945e05d6a91ac', type: "secure", variant: "variant-secure", icon: "lock-outline", message: I18nService.translate('otp.secureMessage') }))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "otp-component"; }
|
|
110
110
|
static get originalStyleUrls() {
|
|
@@ -9,9 +9,9 @@ export class CardFieldsWrapper {
|
|
|
9
9
|
showDocument;
|
|
10
10
|
customCSS;
|
|
11
11
|
render() {
|
|
12
|
-
return (h("div", { key: '
|
|
12
|
+
return (h("div", { key: '5f1248723599b981c30f9a54124b5a94a5f53dad', style: { display: 'flex', flexDirection: 'column', gap: '16px' } }, h("card-iframe", { key: '8bfe7e4a7b26c30bf1de8c4d937690a429429f3a', customCSS: this.customCSS }), !renewalState.isInitialized &&
|
|
13
13
|
sessionState.data?.itemInformation?.type !== SESSION_ITEM_TYPE_ENUM.PLAN &&
|
|
14
|
-
sessionState.data.cardInformation?.installments?.installments.length > 0 && (h("rebill-installments", { key: '
|
|
14
|
+
sessionState.data.cardInformation?.installments?.installments.length > 0 && (h("rebill-installments", { key: 'd95b4b20414db198f5483cb1dc1ac070e0204009', error: this.installmentsError })), this.showDocument && (h("card-identification", { key: '11d048b3a791db2061befd07a4b33a039e03de24', documentTypeError: this.documentTypeError, documentNumberError: this.documentNumberError }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "card-fields-wrapper"; }
|
|
17
17
|
static get properties() {
|
|
@@ -62,7 +62,7 @@ export class Identification {
|
|
|
62
62
|
label: documentType.value,
|
|
63
63
|
value: documentType.value,
|
|
64
64
|
}));
|
|
65
|
-
return (h(h.Fragment, null, h("rebill-input-combo", { key: '
|
|
65
|
+
return (h(h.Fragment, null, h("rebill-input-combo", { key: '075b874873f297d3e2e72e54625db2d5cc49c619', "select-id": "documentType", "input-id": "documentNumber", "on-input": this.handleInputChange, "select-placeholder": I18nService.translate('document.typePlaceholder'), "input-placeholder": I18nService.translate('document.numberPlaceholder'), error: I18nService.translate(error), options: options, disabled: this.disabled })));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "card-identification"; }
|
|
68
68
|
static get properties() {
|
package/dist/collection/components/checkout/payment-method-selector/card-fields/iframe/CardIframe.js
CHANGED
|
@@ -326,12 +326,12 @@ export class CardIframe {
|
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
328
|
render() {
|
|
329
|
-
return (h("div", { key: '
|
|
329
|
+
return (h("div", { key: '21cee6426b31b15e214272bed3b893a89cfebdc3', style: {
|
|
330
330
|
width: '100%',
|
|
331
331
|
height: this.iframeHeight,
|
|
332
332
|
position: 'relative',
|
|
333
333
|
overflow: 'hidden',
|
|
334
|
-
} }, !this.iframeLoaded && h("card-skeleton", { key: '
|
|
334
|
+
} }, !this.iframeLoaded && h("card-skeleton", { key: '66bbb20d750975f5e6a15a72c55f21ac209c9a10' }), h("iframe", { key: '8f9c689ea04b5b88511cbcc69b792454460b2a48', ref: el => (this.iframeRef = el), src: this.getIframeURL(), style: {
|
|
335
335
|
width: '100%',
|
|
336
336
|
height: '100%',
|
|
337
337
|
border: 'none',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class CardSkeleton {
|
|
3
3
|
render() {
|
|
4
|
-
return (h("div", { key: '
|
|
4
|
+
return (h("div", { key: '76c432f43c597f9ff92b949c16d70b1b6840e378', class: "iframe-skeleton" }, h("div", { key: '9c77a9eeda10a23004890c934f30f8d25be7fbf1', class: "input-skeleton" }), h("div", { key: 'd26032fe4bbb41dd0107e9fa5d8bd041da401351', class: "input-skeleton" })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "card-skeleton"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -40,11 +40,11 @@ export class Installments {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h("div", { key: '
|
|
43
|
+
return (h("div", { key: 'a7e2147789a5664d4b5857c86652c85f78a88872' }, h("rebill-input-select", { key: this.isDisabled.toString(), id: "installments", variant: "outlined", value: this.value, options: sessionState.data.cardInformation?.installments?.installments.map(installment => ({
|
|
44
44
|
label: getInstallmentLabel(installment.installment, getRecalculatedInstallmentAmount(installment.installmentAmount), sessionState.data.pricing?.currency, installment.cft, installment.model),
|
|
45
45
|
value: installment?.installment?.toString(),
|
|
46
46
|
})) || [], loading: sessionState.data.fetchingInstallments, placeholder: this.placeholder, disabled: this.isDisabled, "on-input": this.handleInstallments, error: I18nService.translate(this.error) }), sessionState.data.cardInformation?.installments?.installments.find(installment => installment.installment ===
|
|
47
|
-
sessionState.data.cardInformation?.installments?.selectedInstallment?.installment)?.model === ENUM_INSTALLMENT_MODEL.CUSTOMER_FINANCED && (h("rebill-typography", { key: '
|
|
47
|
+
sessionState.data.cardInformation?.installments?.selectedInstallment?.installment)?.model === ENUM_INSTALLMENT_MODEL.CUSTOMER_FINANCED && (h("rebill-typography", { key: '77b18f5f22cf47c79a6a2f30655117f4aaa60987', variant: "italic", color: COLORS_ENUM.SECONDARY }, I18nService.translate('installments.interest')))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "rebill-installments"; }
|
|
50
50
|
static get originalStyleUrls() {
|
|
@@ -23,7 +23,7 @@ export class RebillFooter {
|
|
|
23
23
|
SessionStore.changeLanguage(event.detail.value);
|
|
24
24
|
};
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: '2bf71ea419e16951f8ba3e1d9a74d460ea234271', class: "rebill-footer__footer-content" }, h("div", { key: '5d475f95f2e99d14bcb5ac94807403b47c746955', class: "terms-and-conditions" }, !isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) && (h("rebill-typography", { key: 'e32913e5ff5be1045650d32607319fc704eb08fd', variant: "subtitle3", color: COLORS_ENUM.SECONDARY, class: "footer-powered" }, I18nService.translate('footer.poweredBy'))), h("rebill-icon", { key: '98445973ff58f009ef8530ee5b85b82cee2ebbf5', name: "rebill-logo", color: COLORS_ENUM.SECONDARY }), h("rebill-icon", { key: '2a3e9923ff4587db6d7f98f60c7a63b435cbe041', name: "rebill", color: COLORS_ENUM.SECONDARY }), h("rebill-typography", { key: 'a13ace0f701b6039a142cef96784940fedc57a42', variant: "subtitle3", color: COLORS_ENUM.SECONDARY, class: "footer-separator" }, "|"), h("rebill-typography", { key: 'bf4d69c5b8b2fedf56c6acb21a406e823bc12778', variant: "subtitle3", color: COLORS_ENUM.SECONDARY, class: "footer-link" }, h("a", { key: 'a17ff0764546610bd2d1bb14a44e54b947794a8f', href: "https://www.rebill.com/terminos-y-condiciones-usuarios-finales", target: "_blank" }, I18nService.translate('footer.termsAndConditions')))), h("div", { key: '76611d3afd818621460a0ca43ded9da3ee69bbc6', class: "language-selector" }, h("rebill-icon", { key: 'ea078f2e51059969e8a94a6f13239d214ef8b26a', name: "world" }), h("rebill-input-select", { key: 'ff844420ba1b8d754c0d75c80993203bd5931486', id: "language-selector", variant: "underlined", backgroundColor: isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP)
|
|
27
27
|
? ''
|
|
28
28
|
: 'var(--rebill-color-background-left)', options: [
|
|
29
29
|
{ label: 'EN', value: LOCALES_ENUM.EN },
|
|
@@ -56,7 +56,7 @@ export class UserInformationPhone {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'f5a7cde227c1bd554c5010b50704f3fb6b6502d9' }, h("div", { key: '4f9c6dfb9105d29d0b7d7368e333b8ecf6951fba' }, h("rebill-input-phone", { key: '23e25f0cf70d3fedf4f94fa5ff8041e77402b732', disabled: this.disabled, validationErrorId: "isValidPhoneNumber", phoneNumberId: "phoneNumber", countryCodeId: "countryCodePhoneNumber", placeholder: I18nService.translate('userInformation.phoneNumberPlaceholder'), "initial-country": this.countryCode?.toLowerCase() || 'ar', error: this.error, required: true, searchable: true, searchPlaceholder: I18nService.translate('userInformation.searchCountriesPlaceholder') }))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "user-information-phone"; }
|
|
62
62
|
static get originalStyleUrls() {
|
|
@@ -77,15 +77,15 @@ export class UserInformation {
|
|
|
77
77
|
} }, inputs)) : null;
|
|
78
78
|
}
|
|
79
79
|
render() {
|
|
80
|
-
const customerExistsButton = (h("div", { key: '
|
|
80
|
+
const customerExistsButton = (h("div", { key: 'd8dc2e7c9eb4eda6f95ccd4d5472c068730cdfd5', class: "customer-exists" }, h("rebill-button", { key: '1b7ae09782e0fcbcb98f2fb6f140b5a9113092c7', style: {
|
|
81
81
|
visibility: this.customerExists ? 'visible' : 'hidden',
|
|
82
82
|
opacity: this.customerExists ? '1' : '0',
|
|
83
83
|
transition: 'opacity 0.3s ease-in-out',
|
|
84
|
-
}, variant: "text", size: "small", onClick: () => this.handleRebillAccountClick(), icon: "lock" }, I18nService.translate('userInformation.rebillAccount'), h("rebill-icon", { key: '
|
|
84
|
+
}, variant: "text", size: "small", onClick: () => this.handleRebillAccountClick(), icon: "lock" }, I18nService.translate('userInformation.rebillAccount'), h("rebill-icon", { key: '697b2e05137658b4f427bce9533d2506ce5ee87f', name: "arrow-right" }))));
|
|
85
85
|
const hasPrefilledEmail = sessionState.data.prefilledData.email;
|
|
86
86
|
const hasPrefilledName = sessionState.data.prefilledData.fullName;
|
|
87
87
|
const hasAnyPrefilled = hasPrefilledEmail || hasPrefilledName;
|
|
88
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '94cb7e47341a7bd014a69b172e9cf807349d4a59' }, customerExistsButton, hasAnyPrefilled && (h("rebill-card", { key: 'd69d87bbd3733b0be65251b2eaf8f974933ebf1b', cardTitle: I18nService.translate('userInformation.personalInformation'), cardLabels: this.getCardLabels() })), this.renderInputs()));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "user-information"; }
|
|
91
91
|
static get originalStyleUrls() {
|
|
@@ -445,7 +445,7 @@ export class RebillRenewal {
|
|
|
445
445
|
if (!renewalState.isInitialized) {
|
|
446
446
|
return h("div", { class: "loading" }, I18nService.translate('renewal.loading'));
|
|
447
447
|
}
|
|
448
|
-
const renderRenewalSummary = props => (h("renewal-summary", { totalAmount: renewalState.data.price.amount, currency: renewalState.data.price.currency, subscriptionTitle: renewalState.data.subscription.name[0]?.text || 'Subscription', subscriptionAmount: renewalState.data.subscription.amount, nextChargeDate: renewalState.data.subscription.nextChargeDate, frequency: renewalState.data.subscription.frequency, ...props }));
|
|
448
|
+
const renderRenewalSummary = props => (h("renewal-summary", { totalAmount: renewalState.data.price.amount, currency: renewalState.data.price.currency, subscriptionTitle: renewalState.data.subscription.name[0]?.text || 'Subscription', subscriptionAmount: renewalState.data.subscription.amount, nextChargeDate: renewalState.data.subscription.nextChargeDate, frequency: renewalState.data.subscription.frequency, couponCode: renewalState.data.price.couponCode, discountAmount: renewalState.data.price.discountedAmount, discountPercentage: renewalState.data.price.discountPercentage, ...props }));
|
|
449
449
|
return (h(h.Fragment, null, h("rebill-processing-payment", { style: { display: this.isCardSubmitting ? 'block' : 'none' } }), this.isCardSuccess ? (h("renewal-success-page", { typePaymentMethod: this.currentPaymentMethod, paymentDate: this.getPaymentDate(), referenceNumber: this.getReferenceNumber(), cardLastFour: renewalState.data.subscription.cardLastFour, country: renewalState.data.price.country, paymentMethodName: PaymentMethodMapper.mapToAPMPaymentMethod(this.currentPaymentMethod, renewalState.data?.price?.country), bank: renewalState.form?.selectedBankId || '' })) : (h("rebill-checkout-form", { style: { display: this.isCardSubmitting || this.isCardSuccess ? 'none' : 'block' }, validationSchema: this.validationSchema, initialData: this.initialData, onSubmit: (args) => this.handleSubmit(args), renderForm: ({ submit, formData, errors }) => (h("div", { class: "rebill-checkout-renewal" }, h("div", { class: "left-section" }, h("div", { class: "left-section-container" }, h("organization-logo", { organization: renewalState.data.organization }), h("div", { class: "checkout-form-section" }, h("user-information-static", { userInfo: {
|
|
450
450
|
customerName: renewalState.data.subscription.customerName,
|
|
451
451
|
customerEmail: renewalState.data.subscription.customerEmail,
|