@justifi/webcomponents 0.4.0 → 0.6.1
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/CHANGELOG.md +16 -0
- package/dist/cjs/{index-4f2a13d2.js → index-bcfc2d01.js} +0 -25
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +8 -5
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-payment-form.cjs.entry.js +7 -4
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +23 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +5 -5
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/components/billing-form/billing-form.css +1546 -4
- package/dist/collection/components/billing-form/billing-form.js +2 -2
- package/dist/collection/components/card-form/card-form.js +19 -1
- package/dist/collection/components/payment-form/payment-form.css +1553 -0
- package/dist/collection/components/payment-form/payment-form.js +14 -3
- package/dist/collection/components/payment-form/payment-form.stories.js +0 -2
- package/dist/collection/components/payment-form/payment-method-selector.css +1254 -0
- package/dist/collection/components/payment-form/payment-method-selector.js +12 -2
- package/dist/collection/components/payment-method-form/payment-method-form.js +35 -2
- package/dist/collection/components/select-input/select-input.css +1248 -1
- package/dist/collection/components/select-input/select-input.js +2 -2
- package/dist/collection/components/text-input/text-input.css +1248 -1
- package/dist/collection/components/text-input/text-input.js +2 -2
- package/dist/components/billing-form.js +2 -2
- package/dist/components/justifi-card-form.js +3 -1
- package/dist/components/justifi-payment-form.js +8 -4
- package/dist/components/payment-method-form.js +23 -4
- package/dist/components/payment-method-selector.js +5 -2
- package/dist/components/select-input2.js +2 -2
- package/dist/components/text-input2.js +2 -2
- package/dist/esm/{index-3ce5521c.js → index-5676b87a.js} +0 -25
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +8 -5
- package/dist/esm/justifi-card-form.entry.js +3 -2
- package/dist/esm/justifi-payment-form.entry.js +7 -4
- package/dist/esm/justifi-payment-method-form.entry.js +23 -5
- package/dist/esm/justifi-payments-list.entry.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/select-input_2.entry.js +5 -5
- package/dist/esm/webcomponents.js +2 -2
- package/dist/types/components/card-form/card-form.d.ts +1 -0
- package/dist/types/components/payment-method-form/payment-method-form.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/webcomponents/p-165b4840.entry.js +1 -0
- package/dist/webcomponents/p-1c7556c1.entry.js +1 -0
- package/dist/webcomponents/{p-6633de1b.entry.js → p-5aec1d06.entry.js} +1 -1
- package/dist/webcomponents/p-81e20318.entry.js +1 -0
- package/dist/webcomponents/p-8f9a69d2.entry.js +1 -0
- package/dist/webcomponents/p-9a8abfcb.js +2 -0
- package/dist/webcomponents/p-ad6ad202.entry.js +1 -0
- package/dist/webcomponents/{p-6c3a226e.entry.js → p-f25081d7.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +4 -2
- package/dist/webcomponents/p-2e5be95e.entry.js +0 -1
- package/dist/webcomponents/p-68e47ee5.entry.js +0 -1
- package/dist/webcomponents/p-6a9c764f.entry.js +0 -1
- package/dist/webcomponents/p-763a2b4f.entry.js +0 -1
- package/dist/webcomponents/p-92ca574f.entry.js +0 -1
- package/dist/webcomponents/p-9f34a2c1.js +0 -2
|
@@ -12,12 +12,22 @@ export class PaymentMethodSelector {
|
|
|
12
12
|
this.paymentMethodSelected.emit(event.target.value);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h("div",
|
|
16
|
-
return (h("div", null, h("input", { id: paymentMethodType, type: "radio", name: "paymentMethodType", value: paymentMethodType, onChange: (event) => this.onChangeHandler(event), checked: this.selectedPaymentMethodType === paymentMethodType }), h("label", { htmlFor: paymentMethodType }, PaymentMethodLabels[paymentMethodType])));
|
|
15
|
+
return (h("div", { class: "form-check" }, this.paymentMethodTypes.map((paymentMethodType) => {
|
|
16
|
+
return (h("div", null, h("input", { id: paymentMethodType, type: "radio", name: "paymentMethodType", value: paymentMethodType, onChange: (event) => this.onChangeHandler(event), checked: this.selectedPaymentMethodType === paymentMethodType, class: "form-check-input" }), h("label", { htmlFor: paymentMethodType }, PaymentMethodLabels[paymentMethodType])));
|
|
17
17
|
})));
|
|
18
18
|
}
|
|
19
19
|
;
|
|
20
20
|
static get is() { return "justifi-payment-method-selector"; }
|
|
21
|
+
static get originalStyleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["payment-method-selector.scss"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get styleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["payment-method-selector.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
21
31
|
static get properties() {
|
|
22
32
|
return {
|
|
23
33
|
"paymentMethodTypes": {
|
|
@@ -7,6 +7,7 @@ export class PaymentMethodForm {
|
|
|
7
7
|
this.paymentMethodFormValidationStrategy = undefined;
|
|
8
8
|
this.paymentMethodStyleOverrides = undefined;
|
|
9
9
|
this.iframeOrigin = undefined;
|
|
10
|
+
this.singleLine = undefined;
|
|
10
11
|
this.height = 55;
|
|
11
12
|
}
|
|
12
13
|
connectedCallback() {
|
|
@@ -67,14 +68,29 @@ export class PaymentMethodForm {
|
|
|
67
68
|
return this.postMessageWithResponseListener(MessageEventType[this.paymentMethodFormType].validate);
|
|
68
69
|
}
|
|
69
70
|
;
|
|
71
|
+
composeQueryParams(values) {
|
|
72
|
+
const queryParams = values.map((value) => {
|
|
73
|
+
if (value === values[0]) {
|
|
74
|
+
return value = `?${value}`;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return value = `&${value}`;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return queryParams.join('');
|
|
81
|
+
}
|
|
70
82
|
getIframeSrc() {
|
|
71
83
|
const productionIframeOrigin = 'https://js.justifi.ai/v2';
|
|
72
84
|
const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
|
|
73
85
|
let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
|
|
86
|
+
let paramsList = [];
|
|
74
87
|
if (this.paymentMethodFormValidationStrategy) {
|
|
75
|
-
|
|
88
|
+
paramsList.push(`validationMode=${this.paymentMethodFormValidationStrategy}`);
|
|
89
|
+
}
|
|
90
|
+
if (this.singleLine) {
|
|
91
|
+
paramsList.push(`singleLine=${this.singleLine}`);
|
|
76
92
|
}
|
|
77
|
-
return iframeSrc;
|
|
93
|
+
return iframeSrc.concat(this.composeQueryParams(paramsList));
|
|
78
94
|
}
|
|
79
95
|
render() {
|
|
80
96
|
return (h(Host, null, h("iframe", { id: `justifi-payment-method-form-${this.paymentMethodFormType}`, src: this.getIframeSrc(), ref: (el) => this.iframeElement = el, height: this.height })));
|
|
@@ -162,6 +178,23 @@ export class PaymentMethodForm {
|
|
|
162
178
|
},
|
|
163
179
|
"attribute": "iframe-origin",
|
|
164
180
|
"reflect": false
|
|
181
|
+
},
|
|
182
|
+
"singleLine": {
|
|
183
|
+
"type": "boolean",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "boolean",
|
|
187
|
+
"resolved": "boolean",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": false,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": ""
|
|
195
|
+
},
|
|
196
|
+
"attribute": "single-line",
|
|
197
|
+
"reflect": false
|
|
165
198
|
}
|
|
166
199
|
};
|
|
167
200
|
}
|