rebill-web-components-sdk 1.8.23 → 1.8.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/apm-checkout_19.cjs.entry.js +1 -1
- package/dist/cjs/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.cjs.js.map +1 -1
- package/dist/cjs/card-identification_5.cjs.entry.js +1 -1
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.cjs.js.map +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +1 -1
- package/dist/cjs/rebill-container.rebill-input-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-container_2.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-select.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-select.entry.cjs.js.map +1 -1
- package/dist/cjs/rebill-input-text.cjs.entry.js +1 -1
- package/dist/cjs/rebill-input-text.entry.cjs.js.map +1 -1
- package/dist/collection/components/shared/inputs/input-checkbox/input-checkbox.css +11 -0
- package/dist/collection/components/shared/inputs/input-combo/input-combo.css +30 -0
- package/dist/collection/components/shared/inputs/input-phone/input-phone.css +39 -1
- package/dist/collection/components/shared/inputs/input-select/input-select.css +42 -0
- package/dist/collection/components/shared/inputs/input-text/input-text.css +11 -0
- package/dist/collection/components/shared/modal-overlay/modal-overlay.css +11 -4
- package/dist/components/card-fields-wrapper.js +1 -1
- package/dist/components/card-identification.js +1 -1
- package/dist/components/discount-coupon.js +1 -1
- package/dist/components/{p-Mgbx0b10.js → p--RloWBLk.js} +3 -3
- package/dist/components/{p-Mgbx0b10.js.map → p--RloWBLk.js.map} +1 -1
- package/dist/components/{p-B8GIr65u.js → p--gCxFWo3.js} +7 -7
- package/dist/components/{p-B8GIr65u.js.map → p--gCxFWo3.js.map} +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-DVmistTq.js → p-BIHeH7ht.js} +3 -3
- package/dist/components/{p-DVmistTq.js.map → p-BIHeH7ht.js.map} +1 -1
- package/dist/components/{p-DStRg6vz.js → p-BJHx0OQj.js} +3 -3
- package/dist/components/{p-DStRg6vz.js.map → p-BJHx0OQj.js.map} +1 -1
- package/dist/components/{p-BgJ9ZORq.js → p-BZj9nSOY.js} +3 -3
- package/dist/components/{p-BgJ9ZORq.js.map → p-BZj9nSOY.js.map} +1 -1
- package/dist/components/{p-c9SkZ__E.js → p-Bb1L1oJK.js} +3 -3
- package/dist/components/{p-c9SkZ__E.js.map → p-Bb1L1oJK.js.map} +1 -1
- package/dist/components/{p-zU9a56AF.js → p-BeNxLLvH.js} +3 -3
- package/dist/components/{p-zU9a56AF.js.map → p-BeNxLLvH.js.map} +1 -1
- package/dist/components/{p-D9Eow84L.js → p-BnUMlZY9.js} +4 -4
- package/dist/components/{p-D9Eow84L.js.map → p-BnUMlZY9.js.map} +1 -1
- package/dist/components/{p-CWdTbodL.js → p-Bw7Jq0SL.js} +3 -3
- package/dist/components/{p-CWdTbodL.js.map → p-Bw7Jq0SL.js.map} +1 -1
- package/dist/components/{p-DTjDV-2m.js → p-BxXWkB7L.js} +6 -6
- package/dist/components/{p-DTjDV-2m.js.map → p-BxXWkB7L.js.map} +1 -1
- package/dist/components/{p-8eukGNL9.js → p-C2gtk16s.js} +3 -3
- package/dist/components/{p-8eukGNL9.js.map → p-C2gtk16s.js.map} +1 -1
- package/dist/components/{p-D2wX2Bnk.js → p-C4TcKKa8.js} +4 -4
- package/dist/components/{p-D2wX2Bnk.js.map → p-C4TcKKa8.js.map} +1 -1
- package/dist/components/{p-CHUzEc6D.js → p-C8lHS2ZV.js} +5 -5
- package/dist/components/{p-CHUzEc6D.js.map → p-C8lHS2ZV.js.map} +1 -1
- package/dist/components/{p-DQIG3sUQ.js → p-CH8Qt-7B.js} +3 -3
- package/dist/components/{p-DQIG3sUQ.js.map → p-CH8Qt-7B.js.map} +1 -1
- package/dist/components/{p-CN4bVlrI.js → p-CK6dlS5z.js} +5 -5
- package/dist/components/{p-CN4bVlrI.js.map → p-CK6dlS5z.js.map} +1 -1
- package/dist/components/{p-DgIW2T8E.js → p-CVQ9SnQp.js} +6 -6
- package/dist/components/{p-DgIW2T8E.js.map → p-CVQ9SnQp.js.map} +1 -1
- package/dist/components/{p-6aqJA2NI.js → p-CYC_SbCo.js} +3 -3
- package/dist/components/{p-6aqJA2NI.js.map → p-CYC_SbCo.js.map} +1 -1
- package/dist/components/{p-y5rBN7LS.js → p-Coc_KFqp.js} +4 -4
- package/dist/components/{p-y5rBN7LS.js.map → p-Coc_KFqp.js.map} +1 -1
- package/dist/components/{p-ti0gvUO5.js → p-CpCPsj5Y.js} +3 -3
- package/dist/components/{p-ti0gvUO5.js.map → p-CpCPsj5Y.js.map} +1 -1
- package/dist/components/{p-DuW9_9Co.js → p-Cqrdj1mj.js} +3 -3
- package/dist/components/{p-DuW9_9Co.js.map → p-Cqrdj1mj.js.map} +1 -1
- package/dist/components/{p-B9fIqz0z.js → p-DSnJHRr3.js} +3 -3
- package/dist/components/{p-B9fIqz0z.js.map → p-DSnJHRr3.js.map} +1 -1
- package/dist/components/{p-BpkqlhjE.js → p-DUxs56Lj.js} +3 -3
- package/dist/components/{p-BpkqlhjE.js.map → p-DUxs56Lj.js.map} +1 -1
- package/dist/components/{p-DLh7v0Ng.js → p-Dzeq5BdH.js} +5 -5
- package/dist/components/{p-DLh7v0Ng.js.map → p-Dzeq5BdH.js.map} +1 -1
- package/dist/components/payment-method-selector.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-bank-selector.js +1 -1
- package/dist/components/rebill-checkout-single-column.js +1 -1
- package/dist/components/rebill-checkout.js +21 -21
- package/dist/components/rebill-footer.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-modal-overlay.js +1 -1
- package/dist/components/rebill-processing-payment.js +1 -1
- package/dist/components/rebill-renewal.js +17 -17
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/renewal-success-page.js +1 -1
- package/dist/components/root-component.js +3 -3
- 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 +1 -1
- package/dist/esm/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.js.map +1 -1
- package/dist/esm/card-identification_5.entry.js +1 -1
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.js.map +1 -1
- package/dist/esm/otp-component_7.entry.js +1 -1
- package/dist/esm/rebill-container.rebill-input-checkbox.entry.js.map +1 -1
- package/dist/esm/rebill-container_2.entry.js +1 -1
- package/dist/esm/rebill-input-select.entry.js +1 -1
- package/dist/esm/rebill-input-select.entry.js.map +1 -1
- package/dist/esm/rebill-input-text.entry.js +1 -1
- package/dist/esm/rebill-input-text.entry.js.map +1 -1
- package/dist/rebill-web-components-sdk/card-identification.card-iframe.card-skeleton.rebill-input-combo.rebill-installments.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/otp-component.rebill-modal-overlay.rebill-mode-sandbox.rebill-mode-sandbox-mobile.rebill-summary.success-page.user-information.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js → p-1bbc702a.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-fc6b9d89.entry.js.map → p-1bbc702a.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-2354c848.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-33238246.entry.js.map → p-2354c848.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-61e86126.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-c7c48b15.entry.js.map → p-61e86126.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-7d0e00c6.entry.js → p-7b33865e.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-7d0e00c6.entry.js.map → p-7b33865e.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/p-ca2882ea.entry.js +2 -0
- package/dist/rebill-web-components-sdk/{p-a758a555.entry.js.map → p-ca2882ea.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js → p-f3afcd86.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-d7eaf879.entry.js.map → p-f3afcd86.entry.js.map} +1 -1
- package/dist/rebill-web-components-sdk/rebill-container.rebill-input-checkbox.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-input-select.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-input-text.entry.esm.js.map +1 -1
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/rebill-web-components-sdk/p-33238246.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-a758a555.entry.js +0 -2
- package/dist/rebill-web-components-sdk/p-c7c48b15.entry.js +0 -2
|
@@ -3,7 +3,7 @@ import { a as api } from './p-Dh-yfb0D.js';
|
|
|
3
3
|
import { I as I18nService, s as state, d as instance, a as SessionStore } from './p-DEZl2gyc.js';
|
|
4
4
|
import { r as renewalState, o as onChange, R as RenewalStore } from './p-sQnamRZC.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-BSay3C61.js';
|
|
6
|
-
import { d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-DSnJHRr3.js';
|
|
7
7
|
|
|
8
8
|
const Identification = /*@__PURE__*/ proxyCustomElement(class Identification extends H {
|
|
9
9
|
constructor(registerHost) {
|
|
@@ -105,6 +105,6 @@ function defineCustomElement() {
|
|
|
105
105
|
defineCustomElement();
|
|
106
106
|
|
|
107
107
|
export { Identification as I, defineCustomElement as d };
|
|
108
|
-
//# sourceMappingURL=p-
|
|
108
|
+
//# sourceMappingURL=p-CH8Qt-7B.js.map
|
|
109
109
|
|
|
110
|
-
//# sourceMappingURL=p-
|
|
110
|
+
//# sourceMappingURL=p-CH8Qt-7B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CH8Qt-7B.js","mappings":";;;;;;;MAWa,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;;;;;;;IAChB,aAAa,GAAmB,EAAE;IAClC,OAAO,GAAW,EAAE;AACpB,IAAA,eAAe,GAAW,WAAW,CAAC,kBAAkB,EAAE;IAC3D,iBAAiB,GAAW,EAAE;IAC9B,mBAAmB,GAAW,EAAE;IAChC,QAAQ,GAAa,KAAK;IAElC,iBAAiB,GAAG,YAAW;AAC7B,QAAA,MAAM,cAAc,GAAG,YAAY,CAAC;AAClC,cAAE,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE;cAC1BC,KAAY,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;QAExC,IAAI,cAAc,IAAI,cAAc,KAAK,IAAI,CAAC,OAAO,EAAE;AACrD,YAAA,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;AAChE,gBAAA,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI;AAClC,gBAAA,IAAI,CAAC,OAAO,GAAG,cAAc;;YAC7B,OAAO,KAAK,EAAE;AACd,gBAAA,OAAO,CAAC,KAAK,CAAC,+BAA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YAAY,CAAC,KAAK;AAC1B,SAAA,CAAC,CAAC;AAEH,QAAA,QACE,CAAA,CAAA,CAAA,CAAA,QAAA,EAAA,IAAA,EACE,CAAA,CAAA,oBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,WAAA,EACY,cAAc,EACf,UAAA,EAAA,gBAAgB,cACf,IAAI,CAAC,iBAAiB,EACZ,oBAAA,EAAA,WAAW,CAAC,SAAS,CAAC,0BAA0B,CAAC,EAAA,mBAAA,EAClD,WAAW,CAAC,SAAS,CAAC,4BAA4B,CAAC,EACtE,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,EACnC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState","i18n"],"sources":["src/components/checkout/payment-method-selector/card-fields/identification/identification.tsx"],"sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { api, DocumentType } from '../../../../../api';\nimport i18n from '../../../../../i18n/i18n.config';\nimport { I18nService } from '../../../../../i18n/i18n.service';\nimport { onChange, renewalState, RenewalStore } from '../../../../../store/renewal.store';\nimport { sessionState, SessionStore } from '../../../../../store/session.store';\n\n@Component({\n tag: 'card-identification',\n shadow: false,\n})\nexport class Identification {\n @State() documentTypes: DocumentType[] = [];\n @State() country: string = '';\n @State() currentLanguage: string = I18nService.getCurrentLanguage();\n @Prop() documentTypeError: string = '';\n @Prop() documentNumberError: string = '';\n @Prop() disabled?: boolean = false;\n\n loadDocumentTypes = async () => {\n const currentCountry = renewalState.isInitialized\n ? renewalState.data?.price?.country\n : sessionState?.data?.pricing?.country;\n\n if (currentCountry && currentCountry !== this.country) {\n try {\n const response = await api.data.getDocumentTypes(currentCountry);\n this.documentTypes = response.data;\n this.country = currentCountry;\n } catch (error) {\n console.error('Error loading document types:', error);\n }\n }\n };\n\n async componentWillLoad() {\n i18n.on('languageChanged', this.handleLanguageChange);\n\n SessionStore.onChange('data', () => {\n if (!renewalState.isInitialized) {\n this.loadDocumentTypes();\n }\n });\n\n onChange('data', () => {\n if (renewalState.isInitialized) {\n this.loadDocumentTypes();\n }\n });\n\n await this.loadDocumentTypes();\n }\n\n handleInputChange = (event: CustomEvent) => {\n const { id, value } = event.detail;\n\n if (renewalState.isInitialized) {\n RenewalStore.setUserIdentification({ [id]: value });\n } else {\n SessionStore.setUserInformation({ [id]: value });\n }\n };\n\n disconnectedCallback() {\n i18n.off('languageChanged', this.handleLanguageChange);\n }\n\n private handleLanguageChange = () => {\n this.currentLanguage = I18nService.getCurrentLanguage();\n };\n\n render() {\n // Determinar qué error mostrar (priorizar documentTypeError si ambos están presentes)\n const error = this.documentTypeError || this.documentNumberError;\n\n const options = this.documentTypes.map(documentType => ({\n label: documentType.value,\n value: documentType.value,\n }));\n\n return (\n <>\n <rebill-input-combo\n select-id=\"documentType\"\n input-id=\"documentNumber\"\n on-input={this.handleInputChange}\n select-placeholder={I18nService.translate('document.typePlaceholder')}\n input-placeholder={I18nService.translate('document.numberPlaceholder')}\n error={I18nService.translate(error)}\n options={options}\n disabled={this.disabled}\n />\n </>\n );\n }\n}\n"],"version":3}
|
|
@@ -8,10 +8,10 @@ import { P as PDFGenerator } from './p-B2Y8mssv.js';
|
|
|
8
8
|
import { d as defineCustomElement$8 } from './p-B48kVXFC.js';
|
|
9
9
|
import { d as defineCustomElement$7 } from './p-B49WDo0h.js';
|
|
10
10
|
import { d as defineCustomElement$6 } from './p-N5kDm5Y3.js';
|
|
11
|
-
import { d as defineCustomElement$5 } from './p-
|
|
12
|
-
import { d as defineCustomElement$4 } from './p-
|
|
11
|
+
import { d as defineCustomElement$5 } from './p-C4TcKKa8.js';
|
|
12
|
+
import { d as defineCustomElement$4 } from './p-BIHeH7ht.js';
|
|
13
13
|
import { d as defineCustomElement$3 } from './p-BSay3C61.js';
|
|
14
|
-
import { d as defineCustomElement$2 } from './p-
|
|
14
|
+
import { d as defineCustomElement$2 } from './p-Bw7Jq0SL.js';
|
|
15
15
|
import { d as defineCustomElement$1 } from './p-C_txMekS.js';
|
|
16
16
|
import { f as formatDateTime } from './p-Cc4jud6r.js';
|
|
17
17
|
|
|
@@ -290,6 +290,6 @@ function defineCustomElement() {
|
|
|
290
290
|
defineCustomElement();
|
|
291
291
|
|
|
292
292
|
export { RenewalSuccessPage as R, defineCustomElement as d };
|
|
293
|
-
//# sourceMappingURL=p-
|
|
293
|
+
//# sourceMappingURL=p-CK6dlS5z.js.map
|
|
294
294
|
|
|
295
|
-
//# sourceMappingURL=p-
|
|
295
|
+
//# sourceMappingURL=p-CK6dlS5z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-CN4bVlrI.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,iBAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAAC,CAAA,CAAA;;;;;;;;AACrB,IAAA,iBAAiB,GAAwB,mBAAmB,CAAC,IAAI;IACjE,OAAO,GAAY,EAAE;IACrB,IAAI,GAAY,EAAE;IAClB,iBAAiB,GAAY,EAAE;IAC/B,YAAY,GAAY,EAAE;IAC1B,WAAW,GAAW,EAAE;IACxB,eAAe,GAAW,EAAE;IAC5B,eAAe,GAAY,CAAC;IAC5B,QAAQ,GAAY,CAAC;IACrB,UAAU,GAAY,CAAC;IACtB,aAAa,GAAW,IAAI;AAC5B,IAAA,UAAU,GAAoB,eAAe,CAAC,OAAO;AAErD,IAAA,eAAe;IACf,cAAc,GAAW,CAAC;IAC1B,eAAe,GAAY,IAAI;IAC/B,mBAAmB,GAAY,KAAK;IACrC,cAAc,GAAW,IAAI;AAC7B,IAAA,gBAAgB;AAChB,IAAA,eAAe;AACf,IAAA,eAAe;AACf,IAAA,qBAAqB;AAErB,IAAA,qBAAqB,GAAG,CAAC,KAAa,KAAY;AACxD,QAAA,IAA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,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EACrB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAAA,EAElC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,CAAC,EAAC,gMAAgM,EAClM,MAAM,EAAC,cAAc,EAAA,gBAAA,EACN,OAAO,EAAA,iBAAA,EACN,OAAO,EAAA,CACvB,CACE,EACN,CAAA,CAAA,eAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAA,EAEnC,CAAA,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAmB,OAAO,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,EACvE,EAAA,WAAW,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAC3B,CACN,CACZ,EAGN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAmB,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,OAAO,EAAC,kBAAkB,EAAC,KAAK,EAAE,WAAW,CAAC,SAAS,EACvE,EAAA,WAAW,CAAC,SAAS,CAAC,gCAAgC,CAAC,CACtC,CAChB,CACF,CACF,CACwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: this.getFormattedSubtotal(),\n total: this.getFormattedTotal(),\n currency: (renewalState.data.price.currency as any) || ' ',\n discountAmount: this.getFormattedDiscountAmount(),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: this.getFormattedSubtotal(this.planAmount),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getFormattedDiscountAmount = () => {\n // Para renewal, no hay descuentos por defecto\n return undefined;\n };\n\n private getFormattedSubtotal = (planAmount: number = 0 || null) => {\n return formatAmount(\n planAmount || renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n );\n };\n\n private getFormattedTotal = () => {\n if (this.trialPeriodDays > 0) {\n return formatAmount(0, renewalState.data.price.currency as any);\n }\n return formatAmount(renewalState.data.price.amount, renewalState.data.price.currency as any);\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedSubtotal()}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedTotal()}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-CK6dlS5z.js","mappings":";;;;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,u3HAAu3H;;MCgBx4H,kBAAkB,iBAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAA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C,KAAK,EAAE,WAAW,CAAC,iBAAiB,EACvE,EAAA,WAAW,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAC3B,CACN,CACZ,EAGN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAmB,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,OAAO,EAAC,kBAAkB,EAAC,KAAK,EAAE,WAAW,CAAC,SAAS,EACvE,EAAA,WAAW,CAAC,SAAS,CAAC,gCAAgC,CAAC,CACtC,CAChB,CACF,CACF,CACwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/renewal/renewal-success-page/renewal-success-page.css?tag=renewal-success-page","src/components/renewal/renewal-success-page/renewal-success-page.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n/* Success View Styles */\n.renewal-success-page__success-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n\n/* Eliminar márgenes del h3 en el componente de éxito */\n.renewal-success-page__success-content rebill-typography[variant='h3'] {\n margin: 0 !important;\n padding: 0 !important;\n}\n\n.renewal-success-page__success-icon {\n display: flex;\n justify-content: center;\n margin: 0.5rem 0;\n}\n\n/* Info Cards */\n.renewal-success-page__info-card {\n padding: 24px;\n gap: 16px;\n width: 100%;\n max-width: 450px;\n border: 1px solid #ebedef;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.renewal-success-page__card-row {\n display: flex;\n justify-content: space-between;\n align-items: start;\n min-height: 20px;\n gap: 15%;\n}\n\n.renewal-success-page__card-row:last-of-type {\n margin-bottom: 0;\n}\n\n.renewal-success-page__card-value {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.renewal-success-page__payment-method-display {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon {\n display: inline-block;\n flex-shrink: 0;\n margin-right: 8px;\n vertical-align: middle;\n}\n\n.renewal-success-page__payment-method-display rebill-card-icon svg {\n display: block;\n}\n\n.renewal-success-page__payment-method-display rebill-icon {\n display: inline-block;\n vertical-align: middle;\n margin-right: 8px;\n}\n\n.renewal-success-page__payment-method-display rebill-icon div {\n display: block;\n}\n\n.renewal-success-page__card-divider {\n height: 1px;\n background: #e5e7eb;\n}\n\n.renewal-success-page__download-container {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 2px;\n text-decoration: none;\n cursor: pointer;\n}\n\n.renewal-success-page__contact-info {\n text-align: left;\n}\n\n.renewal-success-page__reference-number {\n word-break: break-all;\n overflow-wrap: break-word;\n hyphens: auto;\n max-width: 100%;\n text-align: right;\n}\n\n.renewal-success-page__total-amount-container {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n flex-direction: row;\n}\n\n/* Responsive Styles */\n@media (max-width: 1024px) {\n .renewal-success-page__success-content {\n max-width: 100%;\n gap: 1.5rem;\n margin-left: 16px;\n margin-right: 16px;\n }\n\n .renewal-success-page__info-card {\n width: 100%;\n max-width: 100%;\n padding: 12px;\n }\n}\n\n@media (max-width: 767px) {\n .renewal-success-page__info-card {\n padding: 12px;\n }\n}\n","import { Component, Event, EventEmitter, getAssetPath, h, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { PAYMENT_METHOD_ENUM } from '../../../models/enums/payment-methods.enum';\nimport { renewalState } from '../../../store/renewal.store';\nimport { formatDateTime } from '../../../utils';\nimport { BREAKPOINT_ENUM, getBreakpoint, isBreakpointBelow } from '../../../utils/breakpoint';\nimport { COLORS_ENUM } from '../../../utils/color-class-mapper';\nimport { getCountryPaymentMethods } from '../../../utils/countries-payment-methods';\nimport { formatAmount } from '../../../utils/currency-formatter';\nimport { PDFGenerator } from '../../../utils/pdf-generator';\n\n@Component({\n tag: 'renewal-success-page',\n styleUrl: 'renewal-success-page.css',\n shadow: false,\n})\nexport class RenewalSuccessPage {\n @Prop() typePaymentMethod: PAYMENT_METHOD_ENUM = PAYMENT_METHOD_ENUM.CARD;\n @Prop() country?: string = '';\n @Prop() bank?: string = '';\n @Prop() paymentMethodName?: string = '';\n @Prop() cardLastFour?: string = '';\n @Prop() paymentDate: string = '';\n @Prop() referenceNumber: string = '';\n @Prop() trialPeriodDays?: number = 0;\n @Prop() debitDay?: number = 0;\n @Prop() planAmount?: number = 0;\n @State() currentLocale: string = 'es';\n @State() breakpoint: BREAKPOINT_ENUM = BREAKPOINT_ENUM.DESKTOP;\n\n @Event() successRedirect: EventEmitter<any>;\n @State() loaderProgress: number = 0;\n @State() isLoadingLottie: boolean = true;\n @State() showRedirectMessage: boolean = false;\n @Prop() timeToRedirect: number = 3000;\n private progressInterval?: number;\n private lottieContainer?: HTMLElement;\n private lottieAnimation?: any;\n private successDisplayTimeout?: number;\n\n private applyStartCaseToBrand = (brand: string): string => {\n if (!brand) return '';\n\n return brand\n .toLowerCase()\n .split(/[\\s-]+/)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n };\n\n private getPaymentMethodConfig(method: PAYMENT_METHOD_ENUM) {\n const countryPaymentMethods = this.country ? getCountryPaymentMethods(this.country) : null;\n\n const countrySpecificMethod = countryPaymentMethods?.find(pm => pm.type === method);\n\n // Default configurations (fallback)\n const defaultConfigs = {\n [PAYMENT_METHOD_ENUM.CARD]: {\n key: PAYMENT_METHOD_ENUM.CARD,\n label: I18nService.translate('paymentMethods.card'),\n icons: ['card'],\n },\n [PAYMENT_METHOD_ENUM.CASH]: {\n key: PAYMENT_METHOD_ENUM.CASH,\n label: I18nService.translate('paymentMethods.cash'),\n icons: ['pago-facil'],\n },\n [PAYMENT_METHOD_ENUM.BANK_TRANSFER]: {\n key: PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n label: I18nService.translate('paymentMethods.bank_transfer'),\n icons: ['plus'],\n },\n };\n\n const defaultConfig = defaultConfigs[method];\n\n // If we have country-specific icons, use them; otherwise use defaults\n return {\n ...defaultConfig,\n icons: countrySpecificMethod?.icons || defaultConfig.icons,\n };\n }\n\n private getPaymentDate = (): string => {\n // Usar el parámetro paymentDate que viene del renewal principal\n return this.paymentDate || '';\n };\n\n componentWillLoad() {\n this.breakpoint = getBreakpoint(window.innerWidth);\n\n // Para renewal, no hay redirect por defecto, pero podríamos agregarlo si es necesario\n if (this.showRedirectMessage) {\n this.successDisplayTimeout = window.setTimeout(() => {\n this.showRedirectMessage = true;\n this.loadLottieAnimation();\n }, 1500);\n\n setTimeout(() => {\n // Aquí podrías agregar lógica de redirect si es necesaria\n this.stopLoaderAnimation();\n }, this.timeToRedirect);\n }\n }\n\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n if (!this.showRedirectMessage) {\n this.loadLottieAnimation();\n }\n }\n\n disconnectedCallback() {\n if (this.successDisplayTimeout) {\n clearTimeout(this.successDisplayTimeout);\n }\n window.removeEventListener('resize', this.handleResize);\n this.stopLoaderAnimation();\n }\n\n private handleResize = () => {\n this.breakpoint = getBreakpoint(window.innerWidth);\n };\n\n private loadLottieAnimation = async () => {\n try {\n const lottie = await import('lottie-web');\n const animationData = await fetch(getAssetPath(`./assets/loader-redirect1.json`));\n const animationJson = await animationData.json();\n\n if (this.lottieContainer) {\n this.lottieAnimation = lottie.default.loadAnimation({\n container: this.lottieContainer,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n animationData: animationJson,\n });\n } else {\n this.startLoaderAnimation();\n }\n } catch (error) {\n this.startLoaderAnimation();\n }\n };\n\n private startLoaderAnimation = () => {\n const duration = 3000;\n const interval = 50;\n const increment = (interval / duration) * 100;\n\n this.progressInterval = window.setInterval(() => {\n this.loaderProgress = Math.min(this.loaderProgress + increment, 100);\n if (this.loaderProgress >= 100) {\n this.stopLoaderAnimation();\n }\n }, interval);\n };\n\n private stopLoaderAnimation = () => {\n if (this.progressInterval) {\n clearInterval(this.progressInterval);\n this.progressInterval = undefined;\n }\n if (this.lottieAnimation) {\n this.lottieAnimation.destroy();\n this.lottieAnimation = undefined;\n }\n };\n\n private handleDownloadReceipt = async () => {\n try {\n await PDFGenerator.generateAndDownloadReceipt({\n paymentMethod:\n this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD\n ? this.textPaymentMethodCard()\n : this.paymentMethodName,\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && { bank: this.bank }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardBrand: this.applyStartCaseToBrand(renewalState.data.cardInformation?.brand || ''),\n }),\n ...(this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && {\n cardLastFour: this.cardLastFour ?? renewalState.data.cardInformation?.lastFour,\n }),\n paymentDate:\n formatDateTime(this.getPaymentDate()) || formatDateTime(new Date().toISOString()),\n email: renewalState.data.subscription.customerEmail || '',\n referenceNumber: this.referenceNumber,\n productTitle: renewalState.data.subscription.name[0]?.text || 'Subscription',\n subtotal: this.getFormattedSubtotal(),\n total: this.getFormattedTotal(),\n currency: (renewalState.data.price.currency as any) || ' ',\n discountAmount: this.getFormattedDiscountAmount(),\n trialPeriodDays: this.trialPeriodDays,\n debitDay: this.debitDay,\n planAmount: this.getFormattedSubtotal(this.planAmount),\n isBankTransfer: this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER,\n });\n } catch (error) {\n console.error('Error downloading receipt:', error);\n }\n };\n\n private getFormattedDiscountAmount = () => {\n // Para renewal, no hay descuentos por defecto\n return undefined;\n };\n\n private getFormattedSubtotal = (planAmount: number = 0 || null) => {\n return formatAmount(\n planAmount || renewalState.data.price.amount,\n renewalState.data.price.currency as any,\n );\n };\n\n private getFormattedTotal = () => {\n if (this.trialPeriodDays > 0) {\n return formatAmount(0, renewalState.data.price.currency as any);\n }\n return formatAmount(renewalState.data.price.amount, renewalState.data.price.currency as any);\n };\n\n private textPaymentMethodCard = () => {\n const cardBrand = renewalState.data?.cardInformation?.brand;\n const cardLastFour = this.cardLastFour || renewalState.data?.cardInformation?.lastFour;\n\n const formattedBrand = this.applyStartCaseToBrand(cardBrand || '');\n return cardBrand && cardLastFour ? `${formattedBrand} - ${cardLastFour}` : formattedBrand;\n };\n\n render() {\n return (\n <rebill-checkout-single-column>\n <div class=\"renewal-success-page__success-content\">\n <rebill-typography variant=\"h3\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.successTitle')}\n </rebill-typography>\n\n <div class=\"renewal-success-page__success-icon\">\n <svg\n width={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n height={isBreakpointBelow(this.breakpoint, BREAKPOINT_ENUM.DESKTOP) ? '64' : '96'}\n viewBox=\"0 0 96 96\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M7.99219 47.998C7.99219 25.9067 25.9008 7.99805 47.9922 7.99805C70.0836 7.99805 87.9922 25.9067 87.9922 47.998C87.9922 70.0894 70.0836 87.998 47.9922 87.998C25.9008 87.998 7.99219 70.0894 7.99219 47.998ZM61.5401 39.2645C62.2396 38.4096 62.1136 37.1496 61.2587 36.4501C60.4038 35.7507 59.1437 35.8767 58.4443 36.7316L41.8437 57.0211L35.4064 50.5838C34.6254 49.8028 33.359 49.8028 32.578 50.5838C31.7969 51.3649 31.7969 52.6312 32.578 53.4123L40.578 61.4123C40.9775 61.8118 41.5275 62.0237 42.0918 61.9956C42.6562 61.9674 43.1823 61.7019 43.5401 61.2645L61.5401 39.2645Z\"\n fill=\"#35B093\"\n />\n </svg>\n </div>\n\n {/* Payment Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentMethod')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-value\">\n <div class=\"renewal-success-page__payment-method-display\">\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.CARD && (\n <>\n <rebill-card-icon\n card-brand={renewalState.data?.cardInformation?.brand || ''}\n />\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.textPaymentMethodCard()}\n </rebill-typography>\n </>\n )}\n {this.typePaymentMethod === PAYMENT_METHOD_ENUM.BANK_TRANSFER && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>\n {this.getPaymentMethodConfig(PAYMENT_METHOD_ENUM.BANK_TRANSFER).icons.map(\n iconName => {\n return <rebill-icon name={iconName} size=\"24px\" />;\n },\n )}\n </div>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('paymentMethods.bank_transfer')}\n </rebill-typography>\n </div>\n )}\n </div>\n </div>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentDate')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {formatDateTime(this.paymentDate || this.getPaymentDate()) || ''}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentEmail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.customerEmail}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.paymentReference')}\n </rebill-typography>\n <rebill-typography\n variant=\"body2\"\n color={COLORS_ENUM.PRIMARY_DARK_TEXT}\n class=\"renewal-success-page__reference-number\"\n >\n {this.referenceNumber || ''}\n </rebill-typography>\n </div>\n </div>\n\n {/* Purchase Details Card */}\n <div class=\"renewal-success-page__info-card\">\n <rebill-typography variant=\"subtitle-bold\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.purchaseDetails')}\n </rebill-typography>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseDetail')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {renewalState.data.subscription.name[0]?.text || 'Subscription'}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseSubtotal')}\n </rebill-typography>\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedSubtotal()}\n </rebill-typography>\n </div>\n <div class=\"renewal-success-page__card-row\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.purchaseMontoTotal')}\n </rebill-typography>\n <div class=\"renewal-success-page__total-amount-container\">\n <rebill-typography variant=\"body2\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {this.getFormattedTotal()}\n </rebill-typography>\n </div>\n </div>\n <div class=\"renewal-success-page__card-divider\"></div>\n <div class=\"renewal-success-page__download-container\">\n <svg\n class=\"download-icon\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.498 9.83333V12.1667C13.498 12.903 12.9011 13.5 12.1647 13.5H3.83138C3.095 13.5 2.49805 12.903 2.49805 12.1667V9.83333M7.99804 10V2.5M7.99804 10L5.66471 7.66667M7.99804 10L10.3314 7.66667\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <rebill-button\n type=\"button\"\n variant=\"download\"\n size=\"small\"\n onClick={this.handleDownloadReceipt}\n >\n <rebill-typography variant=\"overline\" color={COLORS_ENUM.PRIMARY_DARK_TEXT}>\n {I18nService.translate('processing.download')}\n </rebill-typography>\n </rebill-button>\n </div>\n\n {/* Contact Info */}\n <div class=\"renewal-success-page__contact-info\">\n <rebill-typography variant=\"information-text\" color={COLORS_ENUM.SECONDARY}>\n {I18nService.translate('processing.downloadDescription')}\n </rebill-typography>\n </div>\n </div>\n </div>\n </rebill-checkout-single-column>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
2
2
|
import { a as api } from './p-Dh-yfb0D.js';
|
|
3
3
|
import { I as I18nService, o as onChange, s as state, a as SessionStore } from './p-DEZl2gyc.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
|
5
|
-
import { d as defineCustomElement$5 } from './p
|
|
4
|
+
import { d as defineCustomElement$6 } from './p-Coc_KFqp.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './p--RloWBLk.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './p-BSay3C61.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './p-
|
|
8
|
-
import { d as defineCustomElement$2 } from './p-
|
|
7
|
+
import { d as defineCustomElement$3 } from './p-Bw7Jq0SL.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-BJHx0OQj.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './p-C_txMekS.js';
|
|
10
10
|
|
|
11
11
|
const addressCss = ":root{--rebill-color-primary:#3b82f6;--rebill-color-primary-light:rgba(59, 130, 246, 0.1);--rebill-color-primary-hover:#2563eb;--rebill-color-primary-dark:#001131;--rebill-color-primary-dark-text:#000000;--rebill-color-primary-dark-hover:#001c4a;--rebill-color-primary-dark-light:rgba(0, 17, 49, 0.1);--rebill-color-error:#ef4444;--rebill-color-error-background:#fef2f2;--rebill-color-error-light:rgba(239, 68, 68, 0.1);--rebill-color-error-dark:#6f101b;--rebill-color-background:#ffffff;--rebill-color-background-left:#fafafa;--rebill-color-background-right:#f4f5f6;--rebill-color-background-secondary:#f7f8fa;--rebill-color-border:#ebedef;--rebill-color-timeline-connector:#c4c8cf;--rebill-color-neutrals-700:#58616e;--rebill-color-neutrals-500:#9ca3af;--rebill-color-border-primary:#e4e4e7;--rebill-color-text-primary:#3b4049;--rebill-color-text-secondary:#6b7280;--rebill-color-grey-700:#7d7d7d;--rebill-color-text-secondary-light:#a1a1aa;--rebill-color-text-on-primary:#ffffff;--rebill-color-disabled:#9ca3af;--rebill-color-shadow:rgba(0, 0, 0, 0.1);--rebill-color-green:#10b981;--rebill-color-green-text:#257c67;--rebill-color-green-light:rgba(183, 233, 221, 0.15);--rebill-color-green-light-2:rgba(183, 233, 221, 1);--rebill-color-info-background:#d5e4ff;--rebill-color-info-border:#0156f6;--rebill-color-info-text:#172b85;--rebill-color-background-secondary-light:#f7f8fa;--rebill-breakpoint-mobile:768px;--rebill-breakpoint-tablet:1024px;--rebill-breakpoint-desktop:1025px;--rebill-color-orange:#ff9400;--rebill-color-black:#1e2025;--rebill-color-grey-300:#3b4049;--rebill-color-grey-100:#aeaeae}.qr-container,.qr-image,.qr-image svg,.qr-image img,[class*='qr-'],[class*='success'],[class*='receipt']{transition:none !important;animation:none !important;will-change:auto !important}button:active,button:focus,button:hover{isolation:isolate}:host{display:block}.billing-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.address-container{display:flex;flex-direction:column;gap:16px;width:100%}.state-zip-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.state-zip-row rebill-input-select,.state-zip-row rebill-input-text{flex:1}.search-input-container{margin-top:8px}.manual-entry-link-wrapper{margin-top:8px;text-align:left}.manual-entry-link{background:none;border:none;color:var(--rebill-color-primary);cursor:pointer;text-decoration:underline;font-size:14px;padding:4px 8px;transition:color 0.2s ease;text-decoration:none}.manual-entry-link:hover{text-decoration:underline;text-decoration-color:var(--rebill-color-text-secondary)}.same-as-shipping-section{margin:24px 0;padding:16px 0}.shipping-address-section{margin-top:24px;padding-top:24px}";
|
|
@@ -254,6 +254,6 @@ function defineCustomElement() {
|
|
|
254
254
|
defineCustomElement();
|
|
255
255
|
|
|
256
256
|
export { Address as A, defineCustomElement as d };
|
|
257
|
-
//# sourceMappingURL=p-
|
|
257
|
+
//# sourceMappingURL=p-CVQ9SnQp.js.map
|
|
258
258
|
|
|
259
|
-
//# sourceMappingURL=p-
|
|
259
|
+
//# sourceMappingURL=p-CVQ9SnQp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DgIW2T8E.js","mappings":";;;;;;;;;;AAAA,MAAM,UAAU,GAAG,opFAAopF;;MCW1pF,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEsB,WAAW,GAAsB,QAAQ;IACxE,0BAA0B,GAAuC,EAAE;IACnE,gBAAgB,GAAY,KAAK;IAClC,QAAQ,GAAY,KAAK;IAEzB,cAAc,GAAuC,EAAE;IAEvD,MAAM,GAMH,IAAI;AAEP,IAAA,uBAAuB;AAEvB,IAAA,cAAc,CAAC,QAA4B,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ;AAAE,YAAA,OAAO,EAAE;AACxB,QAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;AAC3E,YAAA,OAAO,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC;;AAExC,QAAA,OAAO,QAAQ;;AAGR,IAAA,cAAc;IAQvB,gBAAgB,GAAA;QACd,IAAI,CAAC,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAA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C3B,CAAA,CAAA,uBAAA,EAAA,EACE,iBAAiB,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,EAC5D,sBAAsB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EACtD,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,CACE;;AAIV,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM;AAE/D,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACG,IAAI,CAAC,mBAAmB,EAAE,EAC3B,CACE,CAAA,qBAAA,EAAA,EAAA,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAC7C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACrE,iBAAiB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAA,CACjD,CACE;;IAIV,MAAM,GAAA;AACJ,QAAA,QACE,8DAEG,IAAI,CAAC,iBAAiB,EAAE,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState"],"sources":["src/components/checkout/address/address.css?tag=rebill-address","src/components/checkout/address/address.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n:host {\n display: block;\n}\n\n.billing-header-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n}\n\n.address-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n}\n\n.state-zip-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n.state-zip-row rebill-input-select,\n.state-zip-row rebill-input-text {\n flex: 1;\n}\n\n.search-input-container {\n margin-top: 8px;\n}\n\n.manual-entry-link-wrapper {\n margin-top: 8px;\n text-align: left;\n}\n\n.manual-entry-link {\n background: none;\n border: none;\n color: var(--rebill-color-primary);\n cursor: pointer;\n text-decoration: underline;\n font-size: 14px;\n padding: 4px 8px;\n transition: color 0.2s ease;\n text-decoration: none;\n}\n\n.manual-entry-link:hover {\n text-decoration: underline;\n text-decoration-color: var(--rebill-color-text-secondary);\n}\n\n.same-as-shipping-section {\n margin: 24px 0;\n padding: 16px 0;\n}\n\n.shipping-address-section {\n margin-top: 24px;\n padding-top: 24px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { onChange, sessionState, SessionStore } from '../../../store/session.store';\nimport { AddressComponents } from '../../../utils';\n\n@Component({\n tag: 'rebill-address',\n styleUrl: 'address.css',\n shadow: false,\n})\nexport class Address {\n @Element() el: HTMLElement;\n @Prop({ mutable: true, reflect: true }) billingView: 'search' | 'form' = 'search';\n @State() currentBillingStateOptions: { label: string; value: string }[] = [];\n @State() isLoadingAddress: boolean = false;\n @Prop() disabled: boolean = false;\n\n @Prop() countryOptions: { label: string; value: string }[] = [];\n\n @Prop() errors?: {\n 'billing-country': string;\n 'billing-state': string;\n 'billing-address': string;\n 'billing-city': string;\n 'billing-zip': string;\n } | null = null;\n\n private unsubscribeAddressStore?: () => void;\n\n private translateError(errorKey: string | undefined): string {\n if (!errorKey) return '';\n if (errorKey.includes('validation.') || errorKey.includes('paymentErrors.')) {\n return I18nService.translate(errorKey);\n }\n return errorKey;\n }\n\n @Event() addressUpdated: EventEmitter<{\n country: string;\n state: string;\n address: string;\n city: string;\n zip: string;\n }>;\n\n componentDidLoad() {\n this.unsubscribeAddressStore = onChange('data', () => {\n const billingAddress = sessionState.data.userInformation.address?.billingAddress;\n\n if (billingAddress) {\n const addressData: AddressComponents = {\n country: billingAddress.country || '',\n state: billingAddress.state || '',\n address: billingAddress.address || '',\n city: billingAddress.city || '',\n zip: billingAddress.zip || '',\n };\n\n this.emitInputEventsForAddress(addressData);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribeAddressStore) {\n this.unsubscribeAddressStore();\n }\n }\n\n private async handleAddressSelected(address: AddressComponents) {\n this.isLoadingAddress = true;\n\n // Normalize text function for handling accents and special characters\n const normalizeText = (text: string) => {\n return text\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '') // Remove accents\n .replace(/\\./g, '') // Remove dots\n .replace(/\\s+/g, ' ') // Normalize spaces\n .trim();\n };\n this.billingView = 'form';\n\n if (address.country) {\n await this.loadStatesForCountry(address.country);\n\n // Compare Google state with API states\n if (address.state && this.currentBillingStateOptions.length > 0) {\n const exactMatch = this.currentBillingStateOptions.find(\n option => option.value.toLowerCase() === address.state.toLowerCase(),\n );\n\n const partialMatch = this.currentBillingStateOptions.find(\n option =>\n option.value.toLowerCase().includes(address.state.toLowerCase()) ||\n address.state.toLowerCase().includes(option.value.toLowerCase()),\n );\n\n // Try to find matches with common variations\n const normalizedGoogleState = normalizeText(address.state)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const normalizedMatch = this.currentBillingStateOptions.find(option => {\n const normalizedOption = normalizeText(option.value)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const matches =\n normalizedOption === normalizedGoogleState ||\n normalizedOption.startsWith(normalizedGoogleState + ' ') ||\n normalizedGoogleState.startsWith(normalizedOption + ' ');\n return matches;\n });\n\n if (exactMatch) {\n address.state = exactMatch.value;\n } else if (normalizedMatch) {\n address.state = normalizedMatch.value;\n } else if (partialMatch) {\n address.state = partialMatch.value;\n } else {\n address.state = undefined;\n }\n }\n }\n SessionStore.setBillingAddress(address);\n\n this.addressUpdated.emit({\n country: address.country || '',\n address: address.address || '',\n city: address.city || '',\n state: address.state || undefined,\n zip: address.zip || '',\n });\n\n // Use requestAnimationFrame to ensure the form is rendered with the new state options\n // before emitting events. This ensures the state field can be properly populated.\n requestAnimationFrame(() => {\n this.emitInputEventsForAddress(address);\n setTimeout(() => {\n this.isLoadingAddress = false;\n }, 500);\n });\n }\n\n private emitInputEventsForAddress(address: AddressComponents) {\n // Emit input events for each address field that has a value\n // This mimics user input to properly clear validation errors\n const fields = [\n { id: `billing-country`, value: address.country },\n { id: `billing-address`, value: address.address },\n { id: `billing-city`, value: address.city },\n { id: `billing-state`, value: address.state },\n { id: `billing-zip`, value: address.zip },\n ];\n\n fields.forEach(field => {\n if (field.value) {\n this.emitInputEvent(field.id, field.value);\n }\n });\n }\n\n private emitInputEvent(id: string, value: string) {\n if (value) {\n // Create and dispatch a custom input event that the form component can listen to\n const inputEvent = new CustomEvent('input', {\n detail: { id, value },\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(inputEvent);\n }\n }\n\n private async loadStatesForCountry(countryCode: string) {\n try {\n const response = await api.data.getStates(countryCode);\n const statesResponse = response.data;\n const stateOptions =\n statesResponse && statesResponse.states\n ? statesResponse.states.map(state => ({ label: state, value: state }))\n : [];\n\n this.currentBillingStateOptions = stateOptions;\n } catch (error) {\n this.currentBillingStateOptions = [];\n }\n }\n\n private handleManualEntry = () => {\n this.billingView = 'form';\n };\n\n private handleSearchEntry = () => {\n this.billingView = 'search';\n };\n\n private async handleInput(field: string, value: string) {\n if (value === undefined) return;\n SessionStore.setBillingAddress({ [field]: value } as any);\n // Emit input event to form to sync with form data\n this.emitInputEvent(`billing-${field}`, value);\n\n // If country changes, load states for the new country\n if (field === 'country') {\n await this.loadStatesForCountry(value);\n // Clear the current state selection since the country changed\n SessionStore.setBillingAddress({ state: '' } as any);\n }\n }\n\n private renderAddressHeader() {\n return (\n <div class=\"billing-header-row\">\n <rebill-typography variant=\"body2\">\n {I18nService.translate('billingAddress.title')}\n </rebill-typography>\n </div>\n );\n }\n\n private renderAddressForm() {\n if (this.billingView === 'search') {\n const addressError =\n this.translateError(this.errors?.['billing-address']) ||\n this.translateError(this.errors?.['billing-country']) ||\n this.translateError(this.errors?.['billing-state']) ||\n this.translateError(this.errors?.['billing-city']) ||\n this.translateError(this.errors?.['billing-zip']) ||\n '';\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-search\n onAddressSelected={e => this.handleAddressSelected(e.detail)}\n onManualEntryRequested={() => this.handleManualEntry()}\n error={addressError}\n disabled={this.disabled}\n />\n </div>\n );\n }\n\n const errorsToShow = this.isLoadingAddress ? null : this.errors;\n\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-form\n countryOptions={this.countryOptions}\n stateOptions={this.currentBillingStateOptions}\n errors={errorsToShow}\n disabled={this.disabled}\n onFieldChanged={e => this.handleInput(e.detail.field, e.detail.value)}\n onSearchRequested={() => this.handleSearchEntry()}\n />\n </div>\n );\n }\n\n render() {\n return (\n <div>\n {/* Billing Address */}\n {this.renderAddressForm()}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-CVQ9SnQp.js","mappings":";;;;;;;;;;AAAA,MAAM,UAAU,GAAG,opFAAopF;;MCW1pF,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEsB,WAAW,GAAsB,QAAQ;IACxE,0BAA0B,GAAuC,EAAE;IACnE,gBAAgB,GAAY,KAAK;IAClC,QAAQ,GAAY,KAAK;IAEzB,cAAc,GAAuC,EAAE;IAEvD,MAAM,GAMH,IAAI;AAEP,IAAA,uBAAuB;AAEvB,IAAA,cAAc,CAAC,QAA4B,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ;AAAE,YAAA,OAAO,EAAE;AACxB,QAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;AAC3E,YAAA,OAAO,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AAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,CAAC;AACjD,gBAAA,EAAE;YACJ,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACG,IAAI,CAAC,mBAAmB,EAAE,EAC3B,CAAA,CAAA,uBAAA,EAAA,EACE,iBAAiB,EAAE,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,EAC5D,sBAAsB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EACtD,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,CACE;;AAIV,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM;AAE/D,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,IAAA,EACG,IAAI,CAAC,mBAAmB,EAAE,EAC3B,CACE,CAAA,qBAAA,EAAA,EAAA,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAC7C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACrE,iBAAiB,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAA,CACjD,CACE;;IAIV,MAAM,GAAA;AACJ,QAAA,QACE,8DAEG,IAAI,CAAC,iBAAiB,EAAE,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","sessionState"],"sources":["src/components/checkout/address/address.css?tag=rebill-address","src/components/checkout/address/address.tsx"],"sourcesContent":["@import '../../../styles/variables.css';\n\n:host {\n display: block;\n}\n\n.billing-header-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n}\n\n.address-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n}\n\n.state-zip-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n.state-zip-row rebill-input-select,\n.state-zip-row rebill-input-text {\n flex: 1;\n}\n\n.search-input-container {\n margin-top: 8px;\n}\n\n.manual-entry-link-wrapper {\n margin-top: 8px;\n text-align: left;\n}\n\n.manual-entry-link {\n background: none;\n border: none;\n color: var(--rebill-color-primary);\n cursor: pointer;\n text-decoration: underline;\n font-size: 14px;\n padding: 4px 8px;\n transition: color 0.2s ease;\n text-decoration: none;\n}\n\n.manual-entry-link:hover {\n text-decoration: underline;\n text-decoration-color: var(--rebill-color-text-secondary);\n}\n\n.same-as-shipping-section {\n margin: 24px 0;\n padding: 16px 0;\n}\n\n.shipping-address-section {\n margin-top: 24px;\n padding-top: 24px;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State } from '@stencil/core';\nimport { api } from '../../../api';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { onChange, sessionState, SessionStore } from '../../../store/session.store';\nimport { AddressComponents } from '../../../utils';\n\n@Component({\n tag: 'rebill-address',\n styleUrl: 'address.css',\n shadow: false,\n})\nexport class Address {\n @Element() el: HTMLElement;\n @Prop({ mutable: true, reflect: true }) billingView: 'search' | 'form' = 'search';\n @State() currentBillingStateOptions: { label: string; value: string }[] = [];\n @State() isLoadingAddress: boolean = false;\n @Prop() disabled: boolean = false;\n\n @Prop() countryOptions: { label: string; value: string }[] = [];\n\n @Prop() errors?: {\n 'billing-country': string;\n 'billing-state': string;\n 'billing-address': string;\n 'billing-city': string;\n 'billing-zip': string;\n } | null = null;\n\n private unsubscribeAddressStore?: () => void;\n\n private translateError(errorKey: string | undefined): string {\n if (!errorKey) return '';\n if (errorKey.includes('validation.') || errorKey.includes('paymentErrors.')) {\n return I18nService.translate(errorKey);\n }\n return errorKey;\n }\n\n @Event() addressUpdated: EventEmitter<{\n country: string;\n state: string;\n address: string;\n city: string;\n zip: string;\n }>;\n\n componentDidLoad() {\n this.unsubscribeAddressStore = onChange('data', () => {\n const billingAddress = sessionState.data.userInformation.address?.billingAddress;\n\n if (billingAddress) {\n const addressData: AddressComponents = {\n country: billingAddress.country || '',\n state: billingAddress.state || '',\n address: billingAddress.address || '',\n city: billingAddress.city || '',\n zip: billingAddress.zip || '',\n };\n\n this.emitInputEventsForAddress(addressData);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribeAddressStore) {\n this.unsubscribeAddressStore();\n }\n }\n\n private async handleAddressSelected(address: AddressComponents) {\n this.isLoadingAddress = true;\n\n // Normalize text function for handling accents and special characters\n const normalizeText = (text: string) => {\n return text\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '') // Remove accents\n .replace(/\\./g, '') // Remove dots\n .replace(/\\s+/g, ' ') // Normalize spaces\n .trim();\n };\n this.billingView = 'form';\n\n if (address.country) {\n await this.loadStatesForCountry(address.country);\n\n // Compare Google state with API states\n if (address.state && this.currentBillingStateOptions.length > 0) {\n const exactMatch = this.currentBillingStateOptions.find(\n option => option.value.toLowerCase() === address.state.toLowerCase(),\n );\n\n const partialMatch = this.currentBillingStateOptions.find(\n option =>\n option.value.toLowerCase().includes(address.state.toLowerCase()) ||\n address.state.toLowerCase().includes(option.value.toLowerCase()),\n );\n\n // Try to find matches with common variations\n const normalizedGoogleState = normalizeText(address.state)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const normalizedMatch = this.currentBillingStateOptions.find(option => {\n const normalizedOption = normalizeText(option.value)\n .replace('ciudad de ', '')\n .replace('estado de ', '')\n .replace('provincia de ', '');\n\n const matches =\n normalizedOption === normalizedGoogleState ||\n normalizedOption.startsWith(normalizedGoogleState + ' ') ||\n normalizedGoogleState.startsWith(normalizedOption + ' ');\n return matches;\n });\n\n if (exactMatch) {\n address.state = exactMatch.value;\n } else if (normalizedMatch) {\n address.state = normalizedMatch.value;\n } else if (partialMatch) {\n address.state = partialMatch.value;\n } else {\n address.state = undefined;\n }\n }\n }\n SessionStore.setBillingAddress(address);\n\n this.addressUpdated.emit({\n country: address.country || '',\n address: address.address || '',\n city: address.city || '',\n state: address.state || undefined,\n zip: address.zip || '',\n });\n\n // Use requestAnimationFrame to ensure the form is rendered with the new state options\n // before emitting events. This ensures the state field can be properly populated.\n requestAnimationFrame(() => {\n this.emitInputEventsForAddress(address);\n setTimeout(() => {\n this.isLoadingAddress = false;\n }, 500);\n });\n }\n\n private emitInputEventsForAddress(address: AddressComponents) {\n // Emit input events for each address field that has a value\n // This mimics user input to properly clear validation errors\n const fields = [\n { id: `billing-country`, value: address.country },\n { id: `billing-address`, value: address.address },\n { id: `billing-city`, value: address.city },\n { id: `billing-state`, value: address.state },\n { id: `billing-zip`, value: address.zip },\n ];\n\n fields.forEach(field => {\n if (field.value) {\n this.emitInputEvent(field.id, field.value);\n }\n });\n }\n\n private emitInputEvent(id: string, value: string) {\n if (value) {\n // Create and dispatch a custom input event that the form component can listen to\n const inputEvent = new CustomEvent('input', {\n detail: { id, value },\n bubbles: true,\n composed: true,\n });\n this.el.dispatchEvent(inputEvent);\n }\n }\n\n private async loadStatesForCountry(countryCode: string) {\n try {\n const response = await api.data.getStates(countryCode);\n const statesResponse = response.data;\n const stateOptions =\n statesResponse && statesResponse.states\n ? statesResponse.states.map(state => ({ label: state, value: state }))\n : [];\n\n this.currentBillingStateOptions = stateOptions;\n } catch (error) {\n this.currentBillingStateOptions = [];\n }\n }\n\n private handleManualEntry = () => {\n this.billingView = 'form';\n };\n\n private handleSearchEntry = () => {\n this.billingView = 'search';\n };\n\n private async handleInput(field: string, value: string) {\n if (value === undefined) return;\n SessionStore.setBillingAddress({ [field]: value } as any);\n // Emit input event to form to sync with form data\n this.emitInputEvent(`billing-${field}`, value);\n\n // If country changes, load states for the new country\n if (field === 'country') {\n await this.loadStatesForCountry(value);\n // Clear the current state selection since the country changed\n SessionStore.setBillingAddress({ state: '' } as any);\n }\n }\n\n private renderAddressHeader() {\n return (\n <div class=\"billing-header-row\">\n <rebill-typography variant=\"body2\">\n {I18nService.translate('billingAddress.title')}\n </rebill-typography>\n </div>\n );\n }\n\n private renderAddressForm() {\n if (this.billingView === 'search') {\n const addressError =\n this.translateError(this.errors?.['billing-address']) ||\n this.translateError(this.errors?.['billing-country']) ||\n this.translateError(this.errors?.['billing-state']) ||\n this.translateError(this.errors?.['billing-city']) ||\n this.translateError(this.errors?.['billing-zip']) ||\n '';\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-search\n onAddressSelected={e => this.handleAddressSelected(e.detail)}\n onManualEntryRequested={() => this.handleManualEntry()}\n error={addressError}\n disabled={this.disabled}\n />\n </div>\n );\n }\n\n const errorsToShow = this.isLoadingAddress ? null : this.errors;\n\n return (\n <div>\n {this.renderAddressHeader()}\n <rebill-address-form\n countryOptions={this.countryOptions}\n stateOptions={this.currentBillingStateOptions}\n errors={errorsToShow}\n disabled={this.disabled}\n onFieldChanged={e => this.handleInput(e.detail.field, e.detail.value)}\n onSearchRequested={() => this.handleSearchEntry()}\n />\n </div>\n );\n }\n\n render() {\n return (\n <div>\n {/* Billing Address */}\n {this.renderAddressForm()}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, H, h, Host } from './p-8BpuJ_V5.js';
|
|
2
2
|
import { a as SessionStore, I as I18nService } from './p-DEZl2gyc.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-BSay3C61.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-DUxs56Lj.js';
|
|
5
5
|
|
|
6
6
|
const userInformationCss = ":host{display:block}.inputs-container{display:flex;flex-direction:column;gap:16px;width:100%}.customer-exists{display:flex;justify-content:flex-end;margin-bottom:16px}";
|
|
7
7
|
|
|
@@ -101,6 +101,6 @@ function defineCustomElement() {
|
|
|
101
101
|
defineCustomElement();
|
|
102
102
|
|
|
103
103
|
export { UserInformationPhone as U, defineCustomElement as d };
|
|
104
|
-
//# sourceMappingURL=p-
|
|
104
|
+
//# sourceMappingURL=p-CYC_SbCo.js.map
|
|
105
105
|
|
|
106
|
-
//# sourceMappingURL=p-
|
|
106
|
+
//# sourceMappingURL=p-CYC_SbCo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CYC_SbCo.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,yKAAyK;;MCSvL,oBAAoB,iBAAAA,kBAAA,CAAA,MAAA,oBAAA,SAAAC,CAAA,CAAA;;;;;;;IACvB,KAAK,GAAkB,IAAI;IAC3B,WAAW,GAAmB,IAAI;IACjC,qBAAqB,GAAW,CAAC;IAClC,QAAQ,GAAY,KAAK;AAEzB,IAAA,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CrC,gBAAgB,GAAA;QACd,IAAI,CAAC,6BAA6B,GAAG,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAK;YAC/E,IAAI,CAAC,qBAAqB,EAAE;AAC9B,SAAC,CAAC;;IAGJ,oBAAoB,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,6BAA6B,EAAE;YACtC,IAAI,CAAC,6BAA6B,EAAE;;;IAIxC,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAA,CAAA,oBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,iBAAiB,EAAC,oBAAoB,EACtC,aAAa,EAAC,aAAa,EAC3B,aAAa,EAAC,wBAAwB,EACtC,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,wCAAwC,CAAC,EAC3D,iBAAA,EAAA,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,IAAI,EACxD,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,IAAI,EAChB,iBAAiB,EAAE,WAAW,CAAC,SAAS,CAAC,4CAA4C,CAAC,EAAA,CACtF,CACE,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkout/user-information/user-information.css?tag=user-information-phone","src/components/checkout/user-information/user-information-phone.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.inputs-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n}\n.customer-exists {\n display: flex;\n justify-content: flex-end;\n margin-bottom: 16px;\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { I18nService } from '../../../i18n/i18n.service';\nimport { SessionStore } from '../../../store/session.store';\n\n@Component({\n tag: 'user-information-phone',\n styleUrl: 'user-information.css',\n shadow: false,\n})\nexport class UserInformationPhone {\n @Prop() error: string | null = null;\n @Prop() countryCode?: string | null = null;\n @State() languageUpdateTrigger: number = 0;\n @Prop() disabled: boolean = false;\n\n private unsubscribeCurrentLocaleStore?: () => void;\n\n // @Listen('phoneInput')\n // handleInputChange(event: CustomEvent<{ id: string; value: string }>) {\n // if (!event.detail) return;\n\n // const { id, value } = event.detail;\n // if (id === 'phoneNumber') {\n // SessionStore.setUserPhoneNumber({\n // number: value,\n // countryCode: this.userInformationPhone.countryCode,\n // });\n // } else if (id === 'countryCodePhoneNumber') {\n // SessionStore.setUserPhoneNumber({\n // number: this.userInformationPhone.phoneNumber.number,\n // countryCode: value,\n // });\n // } else {\n // SessionStore.setUserInformation({ [id]: value });\n // }\n\n // // Don't stop propagation - let the form handle the event too\n // }\n\n // @Listen('blurPhone')\n // handleBlurPhone(event: CustomEvent<{ id: string; value: string }>) {\n // if (!event.detail) return; // Ignore native input events or malformed events\n\n // const { id, value } = event.detail;\n // if (id === 'phoneNumber') {\n // SessionStore.setUserPhoneNumber({\n // number: value,\n // countryCode: this.userInformationPhone.countryCode,\n // });\n // } else if (id === 'countryCodePhoneNumber') {\n // SessionStore.setUserPhoneNumber({\n // number: this.userInformationPhone.phoneNumber.number,\n // countryCode: value,\n // });\n // } else {\n // SessionStore.setUserInformation({ [id]: value });\n // }\n\n // // Don't stop propagation - let the form handle the event too\n // }\n\n componentDidLoad() {\n this.unsubscribeCurrentLocaleStore = SessionStore.onChange('currentLocale', () => {\n this.languageUpdateTrigger++;\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribeCurrentLocaleStore) {\n this.unsubscribeCurrentLocaleStore();\n }\n }\n\n render() {\n return (\n <Host>\n <div>\n <rebill-input-phone\n disabled={this.disabled}\n validationErrorId=\"isValidPhoneNumber\"\n phoneNumberId=\"phoneNumber\"\n countryCodeId=\"countryCodePhoneNumber\"\n placeholder={I18nService.translate('userInformation.phoneNumberPlaceholder')}\n initial-country={this.countryCode?.toLowerCase() || 'ar'}\n error={this.error}\n required={true}\n searchable={true}\n searchPlaceholder={I18nService.translate('userInformation.searchCountriesPlaceholder')}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,8 +2,8 @@ import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
|
2
2
|
import { I as I18nService } from './p-DEZl2gyc.js';
|
|
3
3
|
import { C as COLORS_ENUM } from './p-DA598vBj.js';
|
|
4
4
|
import { d as defineCustomElement$4 } from './p-BSay3C61.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './p-
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-
|
|
5
|
+
import { d as defineCustomElement$3 } from './p-Bw7Jq0SL.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-BJHx0OQj.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './p-C_txMekS.js';
|
|
8
8
|
|
|
9
9
|
const addressFormCss = ":host{display:block}.address-form-container{width:100%;margin-bottom:24px}.address-container{display:flex;flex-direction:column;gap:16px}.search-link-wrapper{text-decoration:underline;color:var(--rebill-color-text-secondary);margin-top:8px}@media (min-width: 1025px){.state-zip-row{grid-template-columns:1fr 1fr !important}}.state-zip-row{display:grid;gap:16px}.search-link-wrapper{display:flex;justify-content:flex-start;margin-top:8px}.search-link{background:none;border:none;color:var(--rebill-color-primary);cursor:pointer;font-size:14px;padding:4px 0;text-decoration:none}.search-link:hover{text-decoration:underline;text-decoration-color:var(--rebill-color-text-secondary)}";
|
|
@@ -86,6 +86,6 @@ function defineCustomElement() {
|
|
|
86
86
|
defineCustomElement();
|
|
87
87
|
|
|
88
88
|
export { AddressForm as A, defineCustomElement as d };
|
|
89
|
-
//# sourceMappingURL=p-
|
|
89
|
+
//# sourceMappingURL=p-Coc_KFqp.js.map
|
|
90
90
|
|
|
91
|
-
//# sourceMappingURL=p-
|
|
91
|
+
//# sourceMappingURL=p-Coc_KFqp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-Coc_KFqp.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,yqBAAyqB;;MCQnrB,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;;;;;;;;;IACd,WAAW,GAA2B,SAAS;IAC/C,cAAc,GAAuC,EAAE;IACvD,YAAY,GAAuC,EAAE;IACrD,MAAM,GAAmC,IAAI;IAC7C,QAAQ,GAAY,KAAK;AAExB,IAAA,YAAY;AACZ,IAAA,eAAe;AAEhB,IAAA,cAAc,CAAC,QAA4B,EAAA;AACjD,QAAA,IAAI,CAAC,QAAQ;AAAE,YAAA,OAAO,EAAE;AACxB,QAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;AAC3E,YAAA,OA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,EAAE,IAAI,CAAC,QAAQ,EAAA,CACvB,CACE,CACF,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,qBAAqB,EAAA,EAC9B,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EACzE,CAAA,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,WAAW,CAAC,SAAS,EAC5B,KAAK,EAAC,aAAa,EAAA,EAElB,WAAW,CAAC,SAAS,CACpB,GAAG,cAAc,CAAA,kBAAA,CAAoB,EACrC,0BAA0B,CAC3B,CACiB,CACb,CACL,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/checkout/address/address-form/address-form.css?tag=rebill-address-form","src/components/checkout/address/address-form/address-form.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.address-form-container {\n width: 100%;\n margin-bottom: 24px;\n}\n\n.address-container {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.search-link-wrapper {\n text-decoration: underline;\n color: var(--rebill-color-text-secondary);\n margin-top: 8px;\n}\n\n@media (min-width: 1025px) {\n .state-zip-row {\n grid-template-columns: 1fr 1fr !important;\n }\n}\n\n.state-zip-row {\n display: grid;\n gap: 16px;\n}\n\n.search-link-wrapper {\n display: flex;\n justify-content: flex-start;\n margin-top: 8px;\n}\n\n.search-link {\n background: none;\n border: none;\n color: var(--rebill-color-primary);\n cursor: pointer;\n font-size: 14px;\n padding: 4px 0;\n text-decoration: none;\n}\n\n.search-link:hover {\n text-decoration: underline;\n text-decoration-color: var(--rebill-color-text-secondary);\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { I18nService } from '../../../../i18n/i18n.service';\nimport { COLORS_ENUM } from '../../../../utils/color-class-mapper';\n@Component({\n tag: 'rebill-address-form',\n styleUrl: 'address-form.css',\n shadow: false,\n})\nexport class AddressForm {\n @Prop() addressType: 'billing' | 'shipping' = 'billing';\n @Prop() countryOptions: { label: string; value: string }[] = [];\n @Prop() stateOptions: { label: string; value: string }[] = [];\n @Prop() errors?: Record<string, string> | null = null;\n @Prop() disabled: boolean = false;\n\n @Event() fieldChanged: EventEmitter<{ field: string; value: string }>;\n @Event() searchRequested: EventEmitter<void>;\n\n private translateError(errorKey: string | undefined): string {\n if (!errorKey) return '';\n if (errorKey.includes('validation.') || errorKey.includes('paymentErrors.')) {\n return I18nService.translate(errorKey);\n }\n return errorKey;\n }\n\n private handleInput = (field: string, value: string) => {\n this.fieldChanged.emit({ field, value });\n };\n\n private handleSearchRequest = () => {\n this.searchRequested.emit();\n };\n\n render() {\n const translationKey = this.addressType === 'shipping' ? 'shippingAddress' : 'billingAddress';\n\n return (\n <div class=\"address-form-container\">\n <div class=\"address-container\">\n <rebill-input-select\n error={this.translateError(this.errors?.[`${this.addressType}-country`])}\n id={`${this.addressType}-country`}\n options={this.countryOptions}\n placeholder={I18nService.translate(`${translationKey}.countryPlaceholder`)}\n onInput={e => this.handleInput('country', (e as CustomEvent).detail.value)}\n searchable={true}\n searchPlaceholder={I18nService.translate(`search.searchCountries`)}\n disabled={this.disabled}\n />\n <rebill-input-text\n error={this.translateError(this.errors?.[`${this.addressType}-address`])}\n id={`${this.addressType}-address`}\n placeholder={I18nService.translate(`${translationKey}.addressPlaceholder`)}\n variant=\"floating\"\n label={I18nService.translate(`${translationKey}.addressPlaceholder`)}\n onInput={e => this.handleInput('address', (e as CustomEvent).detail.value)}\n disabled={this.disabled}\n />\n <rebill-input-text\n error={this.translateError(this.errors?.[`${this.addressType}-city`])}\n id={`${this.addressType}-city`}\n placeholder={I18nService.translate(`${translationKey}.cityPlaceholder`)}\n variant=\"floating\"\n label={I18nService.translate(`${translationKey}.cityPlaceholder`)}\n onInput={e => this.handleInput('city', (e as CustomEvent).detail.value)}\n disabled={this.disabled}\n />\n <div class=\"state-zip-row\">\n <rebill-input-select\n error={this.translateError(this.errors?.[`${this.addressType}-state`])}\n id={`${this.addressType}-state`}\n options={this.stateOptions}\n placeholder={I18nService.translate(`${translationKey}.statePlaceholder`)}\n disabled={this.disabled || this.stateOptions.length === 0}\n onInput={e => this.handleInput('state', (e as CustomEvent).detail.value)}\n searchable={true}\n searchPlaceholder={I18nService.translate(`${translationKey}.searchStates`)}\n />\n <rebill-input-text\n error={this.translateError(this.errors?.[`${this.addressType}-zip`])}\n id={`${this.addressType}-zip`}\n placeholder={I18nService.translate(`${translationKey}.zipPlaceholder`)}\n variant=\"floating\"\n label={I18nService.translate(`${translationKey}.zipPlaceholder`)}\n onInput={e => this.handleInput('zip', (e as CustomEvent).detail.value)}\n disabled={this.disabled}\n />\n </div>\n </div>\n <div class=\"search-link-wrapper\">\n <button class=\"search-link\" type=\"button\" onClick={this.handleSearchRequest}>\n <rebill-typography\n variant=\"subtitle2\"\n color={COLORS_ENUM.SECONDARY}\n class=\"footer-link\"\n >\n {I18nService.translate(\n `${translationKey}.searchPlaceholder`,\n 'Search for an address...',\n )}\n </rebill-typography>\n </button>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
2
2
|
|
|
3
|
-
const inputCheckboxCss = ".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}.checkbox-container{display:flex;flex-direction:column;gap:0.25rem}.checkbox-label{display:flex;align-items:center;cursor:pointer}.checkbox-label.disabled{cursor:not-allowed !important;opacity:1}.checkbox-element{appearance:none;width:16px;height:16px;border:1.5px solid var(--rebill-color-border-primary);border-radius:4px;background:var(--rebill-color-background);margin-right:10px;display:flex;align-items:center;justify-content:center;transition:border-color 0.15s,\n box-shadow 0.15s;position:relative;cursor:pointer}.checkbox-element:disabled{border-color:var(--rebill-color-disabled);cursor:not-allowed}.checkbox-element:checked{background-color:var(--rebill-color-primary);border-color:var(--rebill-color-primary)}.checkbox-element:checked:disabled{background-color:var(--rebill-color-disabled);border-color:var(--rebill-color-disabled)}.checkbox-element:checked::after{content:'';display:block;position:absolute;left:4.5px;top:1.5px;width:2.5px;height:7px;border:solid var(--rebill-color-background);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}.checkbox-element:disabled:checked::after{border-color:var(--rebill-color-background)}.checkbox-error{border-color:var(--rebill-color-error) !important}.label-text{user-select:none;font-weight:400}";
|
|
3
|
+
const inputCheckboxCss = ".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}}.checkbox-container{display:flex;flex-direction:column;gap:0.25rem}.checkbox-label{display:flex;align-items:center;cursor:pointer}.checkbox-label.disabled{cursor:not-allowed !important;opacity:1}.checkbox-element{appearance:none;width:16px;height:16px;border:1.5px solid var(--rebill-color-border-primary);border-radius:4px;background:var(--rebill-color-background);margin-right:10px;display:flex;align-items:center;justify-content:center;transition:border-color 0.15s,\n box-shadow 0.15s;position:relative;cursor:pointer}.checkbox-element:disabled{border-color:var(--rebill-color-disabled);cursor:not-allowed}.checkbox-element:checked{background-color:var(--rebill-color-primary);border-color:var(--rebill-color-primary)}.checkbox-element:checked:disabled{background-color:var(--rebill-color-disabled);border-color:var(--rebill-color-disabled)}.checkbox-element:checked::after{content:'';display:block;position:absolute;left:4.5px;top:1.5px;width:2.5px;height:7px;border:solid var(--rebill-color-background);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}.checkbox-element:disabled:checked::after{border-color:var(--rebill-color-background)}.checkbox-error{border-color:var(--rebill-color-error) !important}.label-text{user-select:none;font-weight:400}";
|
|
4
4
|
|
|
5
5
|
const InputCheckbox = /*@__PURE__*/ proxyCustomElement(class InputCheckbox extends H {
|
|
6
6
|
constructor(registerHost) {
|
|
@@ -62,6 +62,6 @@ function defineCustomElement() {
|
|
|
62
62
|
defineCustomElement();
|
|
63
63
|
|
|
64
64
|
export { InputCheckbox as I, defineCustomElement as d };
|
|
65
|
-
//# sourceMappingURL=p-
|
|
65
|
+
//# sourceMappingURL=p-CpCPsj5Y.js.map
|
|
66
66
|
|
|
67
|
-
//# sourceMappingURL=p-
|
|
67
|
+
//# sourceMappingURL=p-CpCPsj5Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CpCPsj5Y.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,+mFAA+mF;;MCO3nF,aAAa,iBAAAA,kBAAA,CAAA,MAAA,aAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEhB,KAAK,GAAW,EAAE;;IAEc,OAAO,GAAY,KAAK;;IAExD,KAAK,GAAW,EAAE;;IAElB,EAAE,GAAW,EAAE;;IAEf,QAAQ,GAAY,KAAK;;AAExB,IAAA,KAAK;AAGd,IAAA,gBAAgB,CAAC,KAAkB,EAAA;AACjC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM;QAC7B,IAAI,QAAQ,IAAI,IAAI,CAAC,EAAE,IAAI,QAAQ,EAAE;YACnC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;;;AAI5B,IAAA,gBAAgB,GAAG,CAAC,KAAY,KAAI;QAC1C,IAAI,IAAI,CAAC,QAAQ;YAAE;AACnB,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA0B;AACjD,QAAA,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO;AAC/B,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;AACvD,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAO,KAAK,EAAE,CAAA,2BAAA,EAA8B,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,EAAA,EAC3E,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,CAAA,iBAAA,EAAoB,IAAI,CAAC,KAAK,GAAG,gBAAgB,GAAG,EAAE,CAAE,CAAA,EAC/D,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,CAAA,EACF,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,EAAE,IAAI,CAAC,KAAK,CAAQ,CACtC,EACP,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,eAAe,EAAE,EAAA,IAAI,CAAC,KAAK,CAAQ,CAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/shared/inputs/input-checkbox/input-checkbox.css?tag=rebill-input-checkbox","src/components/shared/inputs/input-checkbox/input-checkbox.tsx"],"sourcesContent":["@import '../shared-input.css';\n\n.checkbox-container {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.checkbox-label {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.checkbox-label.disabled {\n cursor: not-allowed !important;\n opacity: 1;\n}\n\n.checkbox-element {\n appearance: none;\n width: 16px;\n height: 16px;\n border: 1.5px solid var(--rebill-color-border-primary);\n border-radius: 4px;\n background: var(--rebill-color-background);\n margin-right: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n border-color 0.15s,\n box-shadow 0.15s;\n position: relative;\n cursor: pointer;\n}\n\n.checkbox-element:disabled {\n border-color: var(--rebill-color-disabled);\n cursor: not-allowed;\n}\n\n.checkbox-element:checked {\n background-color: var(--rebill-color-primary);\n border-color: var(--rebill-color-primary);\n}\n\n.checkbox-element:checked:disabled {\n background-color: var(--rebill-color-disabled);\n border-color: var(--rebill-color-disabled);\n}\n\n.checkbox-element:checked::after {\n content: '';\n display: block;\n position: absolute;\n left: 4.5px;\n top: 1.5px;\n width: 2.5px;\n height: 7px;\n border: solid var(--rebill-color-background);\n border-width: 0 1.5px 1.5px 0;\n transform: rotate(45deg);\n}\n\n.checkbox-element:disabled:checked::after {\n border-color: var(--rebill-color-background);\n}\n\n.checkbox-error {\n border-color: var(--rebill-color-error) !important;\n}\n\n.label-text {\n user-select: none;\n font-weight: 400;\n}\n","import { Component, Event, EventEmitter, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'rebill-input-checkbox',\n styleUrl: 'input-checkbox.css',\n shadow: false,\n})\nexport class InputCheckbox {\n /** Etiqueta que se muestra a la derecha del checkbox */\n @Prop() label: string = '';\n /** Estado del checkbox */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n /** Mensaje de error */\n @Prop() error: string = '';\n /** ID del checkbox */\n @Prop() id: string = '';\n /** Estado deshabilitado */\n @Prop() disabled: boolean = false;\n /** Evento al cambiar el valor */\n @Event() input: EventEmitter<{ id: string; value: boolean }>;\n\n @Listen('change', { target: 'document' })\n handleFormChange(event: CustomEvent) {\n const formData = event.detail;\n if (formData && this.id in formData) {\n this.checked = formData[this.id];\n }\n }\n\n private onCheckboxChange = (event: Event) => {\n if (this.disabled) return;\n const checkbox = event.target as HTMLInputElement;\n this.checked = checkbox.checked;\n this.input.emit({ id: this.id, value: this.checked });\n };\n\n render() {\n return (\n <div class=\"checkbox-container input-container\">\n <label class={`checkbox-label input-label ${this.disabled ? 'disabled' : ''}`}>\n <input\n id={this.id}\n type=\"checkbox\"\n class={`checkbox-element ${this.error ? 'checkbox-error' : ''}`}\n checked={this.checked}\n onChange={this.onCheckboxChange}\n disabled={this.disabled}\n />\n <span class=\"label-text\">{this.label}</span>\n </label>\n {this.error && <span class=\"error-message\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { s as state, a as SessionStore, I as I18nService, g as formatAmountWitho
|
|
|
4
4
|
import { C as COLORS_ENUM } from './p-DA598vBj.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-B49WDo0h.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-BSay3C61.js';
|
|
7
|
-
import { d as defineCustomElement$2 } from './p-
|
|
7
|
+
import { d as defineCustomElement$2 } from './p-BJHx0OQj.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './p-C_txMekS.js';
|
|
9
9
|
|
|
10
10
|
const discountCouponCss = ".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-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}";
|
|
@@ -162,6 +162,6 @@ function defineCustomElement() {
|
|
|
162
162
|
defineCustomElement();
|
|
163
163
|
|
|
164
164
|
export { DiscountCoupon as D, defineCustomElement as d };
|
|
165
|
-
//# sourceMappingURL=p-
|
|
165
|
+
//# sourceMappingURL=p-Cqrdj1mj.js.map
|
|
166
166
|
|
|
167
|
-
//# sourceMappingURL=p-
|
|
167
|
+
//# sourceMappingURL=p-Cqrdj1mj.js.map
|