rebill-web-components-sdk 1.8.36 → 1.8.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/apm-checkout_19.cjs.entry.js +2 -2
- package/dist/cjs/card-identification_5.cjs.entry.js +2 -2
- package/dist/cjs/{config-ClgjQet_.js → config-Wx7Bi6_T.js} +3 -3
- package/dist/cjs/config-Wx7Bi6_T.js.map +1 -0
- package/dist/cjs/discount-coupon_2.cjs.entry.js +2 -2
- package/dist/cjs/index-C-VTnc0I.js.map +1 -1
- package/dist/cjs/{index-BCzOaoSU.js → index-D4-MOr9h.js} +3 -3
- package/dist/cjs/{index-BCzOaoSU.js.map → index-D4-MOr9h.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/otp-component_7.cjs.entry.js +2 -2
- package/dist/cjs/rebill-checkout.cjs.entry.js +2 -2
- package/dist/cjs/rebill-renewal.cjs.entry.js +2 -2
- package/dist/collection/api/config.js +1 -1
- package/dist/collection/api/config.js.map +1 -1
- package/dist/components/apm-checkout.js +1 -1
- package/dist/components/card-fields-wrapper.js +1 -1
- package/dist/components/card-identification.js +1 -1
- package/dist/components/card-iframe.js +1 -1
- package/dist/components/discount-coupon.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/otp-component.js +1 -1
- package/dist/components/{p-BjaEn-3m.js → p-2qMho_xL.js} +3 -3
- package/dist/{esm/config-BuNv9JwG.js.map → components/p-2qMho_xL.js.map} +1 -1
- package/dist/components/p-8BpuJ_V5.js.map +1 -1
- package/dist/components/{p-DvgE3hKC.js → p-B-3lImmb.js} +3 -3
- package/dist/components/{p-DvgE3hKC.js.map → p-B-3lImmb.js.map} +1 -1
- package/dist/components/{p-D5TXI2Hb.js → p-BD1NqdR9.js} +3 -3
- package/dist/components/{p-D5TXI2Hb.js.map → p-BD1NqdR9.js.map} +1 -1
- package/dist/components/{p-VskO2WrV.js → p-Be6Svr7E.js} +3 -3
- package/dist/components/{p-VskO2WrV.js.map → p-Be6Svr7E.js.map} +1 -1
- package/dist/components/{p-DDVDLDRI.js → p-Bel0mbz7.js} +3 -3
- package/dist/components/{p-DDVDLDRI.js.map → p-Bel0mbz7.js.map} +1 -1
- package/dist/components/{p-CmKAtNPq.js → p-BlD-dFYd.js} +3 -3
- package/dist/components/{p-CmKAtNPq.js.map → p-BlD-dFYd.js.map} +1 -1
- package/dist/components/{p-Dk10IZbR.js → p-CQS1pU-N.js} +3 -3
- package/dist/components/{p-Dk10IZbR.js.map → p-CQS1pU-N.js.map} +1 -1
- package/dist/components/{p-B4_i6BFO.js → p-CyKDtSI2.js} +3 -3
- package/dist/components/{p-B4_i6BFO.js.map → p-CyKDtSI2.js.map} +1 -1
- package/dist/components/{p-Bln3wBD6.js → p-DZRApK5D.js} +5 -5
- package/dist/components/{p-Bln3wBD6.js.map → p-DZRApK5D.js.map} +1 -1
- package/dist/components/{p-DPpE0kdy.js → p-D_lNAXr_.js} +4 -4
- package/dist/components/{p-DPpE0kdy.js.map → p-D_lNAXr_.js.map} +1 -1
- package/dist/components/{p-OSC_8G2_.js → p-c7IoEGtU.js} +3 -3
- package/dist/components/{p-OSC_8G2_.js.map → p-c7IoEGtU.js.map} +1 -1
- package/dist/components/{p-Dh-yfb0D.js → p-hdBb2rTT.js} +3 -3
- package/dist/components/{p-Dh-yfb0D.js.map → p-hdBb2rTT.js.map} +1 -1
- package/dist/components/{p-BJUr_-ZO.js → p-kh0HdPk5.js} +3 -3
- package/dist/components/{p-BJUr_-ZO.js.map → p-kh0HdPk5.js.map} +1 -1
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/rebill-address.js +1 -1
- package/dist/components/rebill-checkout.js +11 -11
- package/dist/components/rebill-renewal.js +9 -9
- package/dist/components/rebill-summary.js +1 -1
- package/dist/components/renewal-summary.js +1 -1
- package/dist/components/user-information.js +1 -1
- package/dist/esm/apm-checkout_19.entry.js +2 -2
- package/dist/esm/card-identification_5.entry.js +2 -2
- package/dist/esm/{config-BuNv9JwG.js → config-CnVJ8ACO.js} +3 -3
- package/dist/{cjs/config-ClgjQet_.js.map → esm/config-CnVJ8ACO.js.map} +1 -1
- package/dist/esm/discount-coupon_2.entry.js +2 -2
- package/dist/esm/{index-BOj-Hiz8.js → index-8R_YGXw4.js} +3 -3
- package/dist/esm/{index-BOj-Hiz8.js.map → index-8R_YGXw4.js.map} +1 -1
- package/dist/esm/index-D8cwEAmw.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/otp-component_7.entry.js +2 -2
- package/dist/esm/rebill-checkout.entry.js +2 -2
- package/dist/esm/rebill-renewal.entry.js +2 -2
- package/dist/rebill-web-components-sdk/index.esm.js +1 -1
- package/dist/rebill-web-components-sdk/{p-28d04513.entry.js → p-2ddabd39.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-736d2bdc.entry.js → p-3d02e7e9.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-9b146258.entry.js → p-405ab8da.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-D339jHg4.js → p-B5khCLtC.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-D339jHg4.js.map → p-B5khCLtC.js.map} +1 -1
- package/dist/rebill-web-components-sdk/{p-CTo1s54i.js → p-D2_UL7f8.js} +4 -4
- package/dist/rebill-web-components-sdk/{p-CTo1s54i.js.map → p-D2_UL7f8.js.map} +1 -1
- package/dist/rebill-web-components-sdk/p-D8cwEAmw.js.map +1 -1
- package/dist/rebill-web-components-sdk/{p-392fb691.entry.js → p-b8613f04.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-852bb04c.entry.js → p-d016b0d6.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/{p-8bf5ce94.entry.js → p-ee460f6c.entry.js} +2 -2
- package/dist/rebill-web-components-sdk/rebill-web-components-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-BjaEn-3m.js.map +0 -1
- /package/dist/rebill-web-components-sdk/{p-28d04513.entry.js.map → p-2ddabd39.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-736d2bdc.entry.js.map → p-3d02e7e9.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-9b146258.entry.js.map → p-405ab8da.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-392fb691.entry.js.map → p-b8613f04.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-852bb04c.entry.js.map → p-d016b0d6.entry.js.map} +0 -0
- /package/dist/rebill-web-components-sdk/{p-8bf5ce94.entry.js.map → p-ee460f6c.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, H, h } from './p-8BpuJ_V5.js';
|
|
2
|
-
import { a as api } from './p-
|
|
2
|
+
import { a as api } from './p-hdBb2rTT.js';
|
|
3
3
|
import { I as I18nService, s as state, e as instance, a as SessionStore } from './p-CMzpQU2o.js';
|
|
4
4
|
import { r as renewalState, o as onChange, R as RenewalStore } from './p-b0Xc3sbS.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-CWY-g0zG.js';
|
|
@@ -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-kh0HdPk5.js.map
|
|
109
109
|
|
|
110
|
-
//# sourceMappingURL=p-
|
|
110
|
+
//# sourceMappingURL=p-kh0HdPk5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-kh0HdPk5.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,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AAqB,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;;aAC9C;YACL,YAAY,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;;AAEpD,KAAC;IAED,oBAAoB,GAAA;QAClBA,QAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,oBAAoB,CAAC;;IAGhD,oBAAoB,GAAG,MAAK;AAClC,QAAA,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,kBAAkB,EAAE;AACzD,KAAC;IAED,MAAM,GAAA;;QAEJ,MAAM,KAAK,GAAG,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,mBAAmB;AAEhE,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,KAAK;YACtD,KAAK,EAAE,YAAY,CAAC,KAAK;YACzB,KAAK,EAAE,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}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PaymentMethodSelector$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { P as PaymentMethodSelector$1, d as defineCustomElement$1 } from './p-DZRApK5D.js';
|
|
2
2
|
|
|
3
3
|
const PaymentMethodSelector = PaymentMethodSelector$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
2
2
|
import { c as create$6 } from './p-MMCcKmy_.js';
|
|
3
|
-
import { a as api } from './p-
|
|
3
|
+
import { a as api } from './p-hdBb2rTT.js';
|
|
4
4
|
import { m as mapRequiredFields, g as generateIdempotencyKey, P as PaymentMessageE, C as CheckoutStatusE, i as isFieldRequired, a as PaymentErrorMapper, b as getFieldValues } from './p-C2yQpf2S.js';
|
|
5
|
-
import { P as PaymentMethodMapper, S as STATUS_REQ_CHECKOUT_APM, d as defineCustomElement$P } from './p-
|
|
5
|
+
import { P as PaymentMethodMapper, S as STATUS_REQ_CHECKOUT_APM, d as defineCustomElement$P } from './p-c7IoEGtU.js';
|
|
6
6
|
import { d as defineCustomElement$D } from './p-CSB54QIT.js';
|
|
7
7
|
import { d as defineCustomElement$e } from './p-BZUoWYrL.js';
|
|
8
|
-
import { d as defineCustomElement$d } from './p-
|
|
8
|
+
import { d as defineCustomElement$d } from './p-Be6Svr7E.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-8UiRDnGO.js';
|
|
10
10
|
import { d as defineCustomElement$F } from './p-TtP-m545.js';
|
|
11
11
|
import { s as state, S as SESSION_TYPE_ENUM, I as I18nService, a as SessionStore, i as initializeI18nWithSessionLanguage, P as PAYMENT_METHOD_ENUM, o as onChange, b as SESSION_ITEM_TYPE_ENUM } from './p-CMzpQU2o.js';
|
|
@@ -14,17 +14,17 @@ import { G as GoogleMapsService, d as defineCustomElement$y } from './p-D8ihKDeQ
|
|
|
14
14
|
import { d as defineCustomElement$g } from './p-DGmiVli7.js';
|
|
15
15
|
import { d as defineCustomElement$O } from './p-G5Zi8QzX.js';
|
|
16
16
|
import { d as defineCustomElement$N } from './p-Biim1QOc.js';
|
|
17
|
-
import { d as defineCustomElement$M } from './p-
|
|
18
|
-
import { d as defineCustomElement$L } from './p-
|
|
19
|
-
import { d as defineCustomElement$K } from './p-
|
|
17
|
+
import { d as defineCustomElement$M } from './p-D_lNAXr_.js';
|
|
18
|
+
import { d as defineCustomElement$L } from './p-kh0HdPk5.js';
|
|
19
|
+
import { d as defineCustomElement$K } from './p-Bel0mbz7.js';
|
|
20
20
|
import { d as defineCustomElement$J } from './p-C0LGxeng.js';
|
|
21
21
|
import { d as defineCustomElement$I } from './p-xnPPdPin.js';
|
|
22
|
-
import { d as defineCustomElement$H } from './p-
|
|
22
|
+
import { d as defineCustomElement$H } from './p-BD1NqdR9.js';
|
|
23
23
|
import { d as defineCustomElement$G } from './p-C43pkqJD.js';
|
|
24
|
-
import { d as defineCustomElement$E } from './p-
|
|
25
|
-
import { d as defineCustomElement$C } from './p-
|
|
24
|
+
import { d as defineCustomElement$E } from './p-CQS1pU-N.js';
|
|
25
|
+
import { d as defineCustomElement$C } from './p-DZRApK5D.js';
|
|
26
26
|
import { d as defineCustomElement$B } from './p-Das5VDOT.js';
|
|
27
|
-
import { d as defineCustomElement$A } from './p-
|
|
27
|
+
import { d as defineCustomElement$A } from './p-CyKDtSI2.js';
|
|
28
28
|
import { d as defineCustomElement$z } from './p-tPSCwC9B.js';
|
|
29
29
|
import { d as defineCustomElement$x } from './p-Dl_1nkw6.js';
|
|
30
30
|
import { d as defineCustomElement$w } from './p-Bn38rJ-O.js';
|
|
@@ -52,7 +52,7 @@ import { d as defineCustomElement$8 } from './p-u4VMRkxg.js';
|
|
|
52
52
|
import { d as defineCustomElement$7 } from './p-RwYDKm3Q.js';
|
|
53
53
|
import { d as defineCustomElement$6 } from './p-BtfQJQXV.js';
|
|
54
54
|
import { d as defineCustomElement$5 } from './p-Db7dntOn.js';
|
|
55
|
-
import { d as defineCustomElement$4 } from './p-
|
|
55
|
+
import { d as defineCustomElement$4 } from './p-B-3lImmb.js';
|
|
56
56
|
import { d as defineCustomElement$3 } from './p-C9vLIn6X.js';
|
|
57
57
|
|
|
58
58
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, H, createEvent, h } from './p-8BpuJ_V5.js';
|
|
2
2
|
import { c as create$6 } from './p-MMCcKmy_.js';
|
|
3
|
-
import { a as api } from './p-
|
|
3
|
+
import { a as api } from './p-hdBb2rTT.js';
|
|
4
4
|
import { m as mapRequiredFields, i as isFieldRequired, g as generateIdempotencyKey, C as CheckoutStatusE, a as PaymentErrorMapper, b as getFieldValues } from './p-C2yQpf2S.js';
|
|
5
|
-
import { P as PaymentMethodMapper, a as PaymentMethodNameE, d as defineCustomElement$F } from './p-
|
|
5
|
+
import { P as PaymentMethodMapper, a as PaymentMethodNameE, d as defineCustomElement$F } from './p-c7IoEGtU.js';
|
|
6
6
|
import { d as defineCustomElement$a } from './p-BZUoWYrL.js';
|
|
7
7
|
import { P as PAYMENT_METHOD_ENUM, I as I18nService } from './p-CMzpQU2o.js';
|
|
8
8
|
import { r as renewalState, R as RenewalStore, o as onChange } from './p-b0Xc3sbS.js';
|
|
@@ -11,17 +11,17 @@ import { C as COLORS_ENUM } from './p-DA598vBj.js';
|
|
|
11
11
|
import { G as GoogleMapsService, d as defineCustomElement$q } from './p-D8ihKDeQ.js';
|
|
12
12
|
import { d as defineCustomElement$E } from './p-G5Zi8QzX.js';
|
|
13
13
|
import { d as defineCustomElement$D } from './p-Biim1QOc.js';
|
|
14
|
-
import { d as defineCustomElement$C } from './p-
|
|
15
|
-
import { d as defineCustomElement$B } from './p-
|
|
16
|
-
import { d as defineCustomElement$A } from './p-
|
|
14
|
+
import { d as defineCustomElement$C } from './p-D_lNAXr_.js';
|
|
15
|
+
import { d as defineCustomElement$B } from './p-kh0HdPk5.js';
|
|
16
|
+
import { d as defineCustomElement$A } from './p-Bel0mbz7.js';
|
|
17
17
|
import { d as defineCustomElement$z } from './p-C0LGxeng.js';
|
|
18
18
|
import { d as defineCustomElement$y } from './p-xnPPdPin.js';
|
|
19
|
-
import { d as defineCustomElement$x } from './p-
|
|
19
|
+
import { d as defineCustomElement$x } from './p-BD1NqdR9.js';
|
|
20
20
|
import { d as defineCustomElement$w } from './p-TtP-m545.js';
|
|
21
21
|
import { d as defineCustomElement$v } from './p-CSB54QIT.js';
|
|
22
|
-
import { d as defineCustomElement$u } from './p-
|
|
22
|
+
import { d as defineCustomElement$u } from './p-DZRApK5D.js';
|
|
23
23
|
import { d as defineCustomElement$t } from './p-Das5VDOT.js';
|
|
24
|
-
import { d as defineCustomElement$s } from './p-
|
|
24
|
+
import { d as defineCustomElement$s } from './p-CyKDtSI2.js';
|
|
25
25
|
import { d as defineCustomElement$r } from './p-tPSCwC9B.js';
|
|
26
26
|
import { d as defineCustomElement$p } from './p-Dl_1nkw6.js';
|
|
27
27
|
import { d as defineCustomElement$o } from './p-Bn38rJ-O.js';
|
|
@@ -41,7 +41,7 @@ import { d as defineCustomElement$b } from './p-Bntc6BWp.js';
|
|
|
41
41
|
import { d as defineCustomElement$9 } from './p-C_txMekS.js';
|
|
42
42
|
import { d as defineCustomElement$8 } from './p-u4VMRkxg.js';
|
|
43
43
|
import { d as defineCustomElement$7 } from './p-BSCSd_ch.js';
|
|
44
|
-
import { d as defineCustomElement$6 } from './p-
|
|
44
|
+
import { d as defineCustomElement$6 } from './p-BlD-dFYd.js';
|
|
45
45
|
import { d as defineCustomElement$5 } from './p-RwYDKm3Q.js';
|
|
46
46
|
import { d as defineCustomElement$4 } from './p-BtfQJQXV.js';
|
|
47
47
|
import { d as defineCustomElement$3 } from './p-C9vLIn6X.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UserInformation$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { U as UserInformation$1, d as defineCustomElement$1 } from './p-B-3lImmb.js';
|
|
2
2
|
|
|
3
3
|
const UserInformation = UserInformation$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-D8cwEAmw.js';
|
|
2
|
-
import { a as api } from './index-
|
|
2
|
+
import { a as api } from './index-8R_YGXw4.js';
|
|
3
3
|
import { I as I18nService, P as PAYMENT_METHOD_ENUM, e as instance, s as state, b as SESSION_ITEM_TYPE_ENUM, a as SessionStore, g as formatAmountWithoutCurrency, o as onChange, C as COUNTRIES } from './i18n.service-D2TBhbJY.js';
|
|
4
4
|
import { S as STATUS_REQ_CHECKOUT_APM } from './status-req-checkout-apm.enum-vsLqF4hk.js';
|
|
5
5
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
@@ -11,7 +11,7 @@ import { c as create$6, V as ValidationError } from './index.esm-CRUbzQx9.js';
|
|
|
11
11
|
import { g as getAssetURL } from './assets-C5OYI4I6.js';
|
|
12
12
|
import { B as BREAKPOINT_ENUM, g as getBreakpoint } from './breakpoint-Do_vNuMa.js';
|
|
13
13
|
import './_commonjsHelpers-E-ZsRS8r.js';
|
|
14
|
-
import './config-
|
|
14
|
+
import './config-CnVJ8ACO.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Gets the checkout request status by request ID
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, c as createEvent, g as getElement } from './index-D8cwEAmw.js';
|
|
2
|
-
import { a as api } from './index-
|
|
2
|
+
import { a as api } from './index-8R_YGXw4.js';
|
|
3
3
|
import { I as I18nService, s as state, e as instance, a as SessionStore, o as onChange$1 } from './i18n.service-D2TBhbJY.js';
|
|
4
4
|
import { r as renewalState, o as onChange, R as RenewalStore } from './renewal.store-jTjLDpeh.js';
|
|
5
|
-
import { g as getAPIConfig } from './config-
|
|
5
|
+
import { g as getAPIConfig } from './config-CnVJ8ACO.js';
|
|
6
6
|
import { c as getInstallmentDisabledPlaceholderByCurrency, d as getInstallmentPlaceholderByCurrency, E as ENUM_INSTALLMENT_MODEL, e as getInstallmentLabel, b as getRecalculatedInstallmentAmount } from './installment-utils-BFqd8XjG.js';
|
|
7
7
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
8
8
|
import './_commonjsHelpers-E-ZsRS8r.js';
|
|
@@ -90,7 +90,7 @@ const API_ENDPOINTS = {
|
|
|
90
90
|
requestStatus: (checkoutRequestId) => `sessions/checkout/request/${checkoutRequestId}`,
|
|
91
91
|
},
|
|
92
92
|
discountCoupon: {
|
|
93
|
-
apply: (sessionId, couponCode, quantity = 1) => `/sessions/${sessionId}/price?couponCode=${couponCode}&quantity=${quantity}`,
|
|
93
|
+
apply: (sessionId, couponCode, quantity = 1) => `/sessions/${sessionId}/price?couponCode=${encodeURIComponent(couponCode)}&quantity=${quantity}`,
|
|
94
94
|
},
|
|
95
95
|
cards: {
|
|
96
96
|
bff: '/cards/bff',
|
|
@@ -108,6 +108,6 @@ const API_ENDPOINTS = {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
export { API_ENDPOINTS as A, getCurrentEnvironment as a, isDebugMode as b, getAPIConfig as g, initializeSDK as i };
|
|
111
|
-
//# sourceMappingURL=config-
|
|
111
|
+
//# sourceMappingURL=config-CnVJ8ACO.js.map
|
|
112
112
|
|
|
113
|
-
//# sourceMappingURL=config-
|
|
113
|
+
//# sourceMappingURL=config-CnVJ8ACO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-CnVJ8ACO.js","sources":["src/api/config.ts"],"sourcesContent":["import { Env } from '@stencil/core';\n\n// Re-export CDN configuration\nexport { CDN_ASSETS_URL, CDN_BASE_URL, getPackageVersion } from '../config/cdn';\n\nexport type Environment = 'development' | 'staging' | 'production';\n\nexport interface APIConfig {\n baseURL: string;\n iframeURL: string;\n timeout: number;\n}\n\nexport const API_CONFIG: Record<Environment, APIConfig> = {\n development: {\n baseURL: 'http://localhost:3014/v3',\n iframeURL: 'http://localhost:5173/',\n timeout: 30000,\n },\n staging: {\n baseURL: 'https://api.rebill.dev/v3',\n iframeURL: 'https://sdk-iframe.rebill.dev/v3-1/index.html',\n timeout: 30000,\n },\n production: {\n baseURL: 'https://api.rebill.com/v3',\n iframeURL: 'https://sdk-iframe.rebill.to/v3-1/index.html',\n timeout: 30000,\n },\n};\n\n// Global configuration interface for host applications\nexport interface RebillSDKConfig {\n environment?: Environment;\n debug?: boolean;\n assetsUrl?: string; // Custom assets URL for local serving (e.g., \"/sdk/\"). Defaults to CDN if not provided.\n}\n\n// Global configuration storage\nlet globalConfig: RebillSDKConfig = {};\n\n/**\n * Initialize the SDK with configuration from the host application\n * This should be called before using any SDK functionality\n */\nexport const initializeSDK = (config: RebillSDKConfig = {}) => {\n globalConfig = {\n environment: 'production', // default to production\n debug: false,\n ...config,\n };\n\n if (globalConfig.debug) {\n console.log('🔧 Rebill SDK initialized with config:', globalConfig);\n }\n\n // Note: We don't set globalThis.REBILL_ENV to avoid interfering with StencilJS internal configuration\n // The SDK will use globalConfig.environment directly in getAPIConfig()\n};\n\n/**\n * Get the current API configuration\n * Priority: 1. Global config, 2. globalThis.REBILL_ENV, 3. Stencil Env, 4. production\n */\nexport const getAPIConfig = (): APIConfig => {\n const env =\n globalConfig.environment ||\n (globalThis as any)?.REBILL_ENV ||\n (Env as any)?.REBILL_ENV ||\n 'production'; // Default to production\n\n const validEnvironments: Environment[] = ['development', 'staging', 'production'];\n\n if (!validEnvironments.includes(env as Environment)) {\n console.warn(\n `⚠️ Invalid environment \"${env}\". Using \"production\" as fallback. Valid environments: ${validEnvironments.join(', ')}`,\n );\n return API_CONFIG.production;\n }\n\n const config = API_CONFIG[env as Environment];\n\n if (globalConfig.debug || env === 'development') {\n console.log(`🔧 SDK Config: Using ${env} environment`);\n console.log(`📍 API URL: ${config.baseURL}`);\n console.log(`🖼️ iFrame URL: ${config.iframeURL}`);\n }\n\n return config;\n};\n\n/**\n * Get current environment\n */\nexport const getCurrentEnvironment = (): Environment => {\n return (\n globalConfig.environment ||\n (globalThis as any)?.REBILL_ENV ||\n (Env as any)?.REBILL_ENV ||\n 'production'\n );\n};\n\n/**\n * Check if SDK is in debug mode\n */\nexport const isDebugMode = (): boolean => {\n return globalConfig.debug || false; // Only debug if explicitly enabled\n};\n\nexport const API_ENDPOINTS = {\n auth: {\n login: '/auth/login',\n register: '/auth/register',\n logout: '/auth/logout',\n },\n users: {\n profile: '/users/profile',\n update: '/users/update',\n },\n data: {\n countries: '/data/countries',\n states: (countryCode: string) => `/data/states/${countryCode}`,\n countryCodes: (countryCode: string) => `/data/country-codes/${countryCode}`,\n documentTypes: (countryCode: string) => `/data/identifications/${countryCode}`,\n },\n sessions: {\n updatePaymentMethod: '/sessions/current/payment-method',\n SDK: '/sessions/sdk',\n },\n checkout: {\n apmRequest: '/sessions/checkout/request',\n cardRequest: '/sessions/checkout',\n requiredFields: '/preview/checkout-fields',\n requestStatus: (checkoutRequestId: string) => `sessions/checkout/request/${checkoutRequestId}`,\n },\n discountCoupon: {\n apply: (sessionId: string, couponCode: string, quantity: number = 1) =>\n `/sessions/${sessionId}/price?couponCode=${encodeURIComponent(couponCode)}&quantity=${quantity}`,\n },\n cards: {\n bff: '/cards/bff',\n },\n fingerPrint: {\n get: (uuid: string) => `/decidir/fingerprint/${uuid}`,\n },\n customers: {\n exists: '/customers/bff/exists',\n },\n otp: {\n generate: '/otp',\n verify: '/otp/verify-code',\n },\n} as const;\n"],"names":[],"mappings":";;AAaO,MAAM,UAAU,GAAmC;AACxD,IAAA,WAAW,EAAE;AACX,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,SAAS,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B,EAAE,UAAkB,EAAE,QAAA,GAAmB,CAAC,KACjE,CAAA,UAAA,EAAa,SAAS,CAAqB,kBAAA,EAAA,kBAAkB,CAAC,UAAU,CAAC,CAAa,UAAA,EAAA,QAAQ,CAAE,CAAA;AACnG,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,EAAE,YAAY;AAClB,KAAA;AACD,IAAA,WAAW,EAAE;QACX,GAAG,EAAE,CAAC,IAAY,KAAK,CAAA,qBAAA,EAAwB,IAAI,CAAE,CAAA;AACtD,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,MAAM,EAAE,uBAAuB;AAChC,KAAA;AACD,IAAA,GAAG,EAAE;AACH,QAAA,QAAQ,EAAE,MAAM;AAChB,QAAA,MAAM,EAAE,kBAAkB;AAC3B,KAAA;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-D8cwEAmw.js';
|
|
2
|
-
import { a as api } from './index-
|
|
2
|
+
import { a as api } from './index-8R_YGXw4.js';
|
|
3
3
|
import { s as state, a as SessionStore, g as formatAmountWithoutCurrency, I as I18nService } from './i18n.service-D2TBhbJY.js';
|
|
4
4
|
import { C as COLORS_ENUM } from './color-class-mapper-DA598vBj.js';
|
|
5
5
|
import './_commonjsHelpers-E-ZsRS8r.js';
|
|
6
|
-
import './config-
|
|
6
|
+
import './config-CnVJ8ACO.js';
|
|
7
7
|
|
|
8
8
|
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-chip--readonly{cursor:default}.coupon-icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;vertical-align:middle}.coupon-close{cursor:pointer}.coupon-content{display:flex;flex-direction:row;align-items:flex-start;gap:4px}";
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-E-ZsRS8r.js';
|
|
2
|
-
import { A as API_ENDPOINTS, g as getAPIConfig } from './config-
|
|
2
|
+
import { A as API_ENDPOINTS, g as getAPIConfig } from './config-CnVJ8ACO.js';
|
|
3
3
|
|
|
4
4
|
/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
5
5
|
|
|
@@ -21428,6 +21428,6 @@ const apiClient = new APIClient(getAPIConfig());
|
|
|
21428
21428
|
const api = new API(apiClient);
|
|
21429
21429
|
|
|
21430
21430
|
export { api as a };
|
|
21431
|
-
//# sourceMappingURL=index-
|
|
21431
|
+
//# sourceMappingURL=index-8R_YGXw4.js.map
|
|
21432
21432
|
|
|
21433
|
-
//# sourceMappingURL=index-
|
|
21433
|
+
//# sourceMappingURL=index-8R_YGXw4.js.map
|