@justifi/webcomponents 0.0.11 → 0.0.12
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/{index-68222998.js → index-4f753ffd.js} +32 -1
- package/dist/cjs/justifi-bank-account-form_4.cjs.entry.js +69 -61
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/webcomponents.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/bank-account-form/bank-account-form.js +43 -45
- package/dist/collection/components/card-form/card-form.js +43 -55
- package/dist/collection/components/payment-method-form/message-event-types.js +12 -0
- package/dist/collection/components/payment-method-form/payment-method-form.js +68 -73
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +1 -1
- package/dist/components/justifi-bank-account-form.js +16 -13
- package/dist/components/justifi-card-form.js +16 -16
- package/dist/components/payment-method-form.js +48 -39
- package/dist/esm/{index-e279d85e.js → index-3d88d85c.js} +32 -2
- package/dist/esm/justifi-bank-account-form_4.entry.js +69 -61
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/webcomponents.js +4 -3
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/Payment.d.ts +1 -1
- package/dist/types/components/bank-account-form/bank-account-form.d.ts +10 -5
- package/dist/types/components/card-form/card-form.d.ts +10 -5
- package/dist/types/components/payment-method-form/message-event-types.d.ts +12 -0
- package/dist/types/components/payment-method-form/payment-method-form.d.ts +5 -4
- package/dist/types/components.d.ts +13 -12
- package/dist/types/stencil-public-runtime.d.ts +48 -3
- package/dist/webcomponents/p-8ad58e9a.entry.js +1 -0
- package/dist/webcomponents/p-de108437.js +2 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/loader/index.d.ts +9 -0
- package/package.json +1 -1
- package/dist/collection/components/card-form/card-form.css +0 -3
- package/dist/webcomponents/p-146348d6.js +0 -2
- package/dist/webcomponents/p-a967d55b.entry.js +0 -1
|
@@ -63,6 +63,18 @@ const isComplexType = (o) => {
|
|
|
63
63
|
o = typeof o;
|
|
64
64
|
return o === 'object' || o === 'function';
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
68
|
+
* out of a DOM's head.
|
|
69
|
+
*
|
|
70
|
+
* @param doc The DOM containing the `head` to query against
|
|
71
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
72
|
+
* exists or the tag has no content.
|
|
73
|
+
*/
|
|
74
|
+
function queryNonceMetaTagContent(doc) {
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
77
|
+
}
|
|
66
78
|
/**
|
|
67
79
|
* Production h() function based on Preact by
|
|
68
80
|
* Jason Miller (@developit)
|
|
@@ -71,7 +83,6 @@ const isComplexType = (o) => {
|
|
|
71
83
|
*
|
|
72
84
|
* Modified for Stencil's compiler and vdom
|
|
73
85
|
*/
|
|
74
|
-
// const stack: any[] = [];
|
|
75
86
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
76
87
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
77
88
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -219,6 +230,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
219
230
|
styles.set(scopeId, style);
|
|
220
231
|
};
|
|
221
232
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
233
|
+
var _a;
|
|
222
234
|
let scopeId = getScopeId(cmpMeta);
|
|
223
235
|
const style = styles.get(scopeId);
|
|
224
236
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -238,6 +250,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
238
250
|
styleElm = doc.createElement('style');
|
|
239
251
|
styleElm.innerHTML = style;
|
|
240
252
|
}
|
|
253
|
+
// Apply CSP nonce to the style tag if it exists
|
|
254
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
255
|
+
if (nonce != null) {
|
|
256
|
+
styleElm.setAttribute('nonce', nonce);
|
|
257
|
+
}
|
|
241
258
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
242
259
|
}
|
|
243
260
|
if (appliedStyles) {
|
|
@@ -1158,6 +1175,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1158
1175
|
}
|
|
1159
1176
|
};
|
|
1160
1177
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1178
|
+
var _a;
|
|
1161
1179
|
const endBootstrap = createTime();
|
|
1162
1180
|
const cmpTags = [];
|
|
1163
1181
|
const exclude = options.exclude || [];
|
|
@@ -1237,6 +1255,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1237
1255
|
{
|
|
1238
1256
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1239
1257
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1258
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1259
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1260
|
+
if (nonce != null) {
|
|
1261
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1262
|
+
}
|
|
1240
1263
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1241
1264
|
}
|
|
1242
1265
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1281,6 +1304,13 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1281
1304
|
};
|
|
1282
1305
|
// prettier-ignore
|
|
1283
1306
|
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1307
|
+
/**
|
|
1308
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1309
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1310
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1311
|
+
* @returns void
|
|
1312
|
+
*/
|
|
1313
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1284
1314
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1285
1315
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1286
1316
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1397,3 +1427,4 @@ exports.createEvent = createEvent;
|
|
|
1397
1427
|
exports.h = h;
|
|
1398
1428
|
exports.promiseResolve = promiseResolve;
|
|
1399
1429
|
exports.registerInstance = registerInstance;
|
|
1430
|
+
exports.setNonce = setNonce;
|
|
@@ -2,100 +2,106 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4f753ffd.js');
|
|
6
6
|
|
|
7
7
|
const BankAccountForm = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
this.bankAccountFormReady = index.createEvent(this, "bankAccountFormReady", 7);
|
|
11
|
-
this.bankAccountFormChange = index.createEvent(this, "bankAccountFormChange", 7);
|
|
12
|
-
this.bankAccountFormBlur = index.createEvent(this, "bankAccountFormBlur", 7);
|
|
13
11
|
this.bankAccountFormTokenize = index.createEvent(this, "bankAccountFormTokenize", 7);
|
|
14
|
-
this.
|
|
12
|
+
this.bankAccountFormValidate = index.createEvent(this, "bankAccountFormValidate", 7);
|
|
13
|
+
this.validationStrategy = undefined;
|
|
15
14
|
}
|
|
16
15
|
readyHandler(event) {
|
|
17
16
|
this.bankAccountFormReady.emit(event);
|
|
18
17
|
}
|
|
19
|
-
changeHandler(event) {
|
|
20
|
-
this.bankAccountFormChange.emit(event);
|
|
21
|
-
}
|
|
22
|
-
blurHandler(event) {
|
|
23
|
-
this.bankAccountFormBlur.emit(event);
|
|
24
|
-
}
|
|
25
18
|
tokenizeHandler(event) {
|
|
26
19
|
this.bankAccountFormTokenize.emit(event);
|
|
27
20
|
}
|
|
21
|
+
validateHandler(event) {
|
|
22
|
+
this.bankAccountFormValidate.emit(event);
|
|
23
|
+
}
|
|
28
24
|
async tokenize(...args) {
|
|
29
25
|
if (!this.childRef) {
|
|
30
26
|
throw new Error('Cannot call tokenize');
|
|
31
27
|
}
|
|
32
28
|
return this.childRef.tokenize(...args);
|
|
33
29
|
}
|
|
30
|
+
async validate() {
|
|
31
|
+
if (!this.childRef) {
|
|
32
|
+
throw new Error('Cannot call validate');
|
|
33
|
+
}
|
|
34
|
+
return this.childRef.validate();
|
|
35
|
+
}
|
|
34
36
|
render() {
|
|
35
37
|
return (index.h("justifi-payment-method-form", { ref: el => {
|
|
36
38
|
if (el) {
|
|
37
39
|
this.childRef = el;
|
|
38
40
|
}
|
|
39
|
-
}, "
|
|
41
|
+
}, "payment-method-form-type": "bankAccount", "payment-method-form-ready": this.bankAccountFormReady, "payment-method-form-tokenize": this.bankAccountFormTokenize, "payment-method-form-validation-strategy": this.validationStrategy || 'onSubmit' }));
|
|
40
42
|
}
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
const cardFormCss = "justifi-card-form iframe{height:55px}";
|
|
44
|
-
|
|
45
45
|
const CardForm = class {
|
|
46
46
|
constructor(hostRef) {
|
|
47
47
|
index.registerInstance(this, hostRef);
|
|
48
48
|
this.cardFormReady = index.createEvent(this, "cardFormReady", 7);
|
|
49
|
-
this.cardFormChange = index.createEvent(this, "cardFormChange", 7);
|
|
50
|
-
this.cardFormBlur = index.createEvent(this, "cardFormBlur", 7);
|
|
51
49
|
this.cardFormTokenize = index.createEvent(this, "cardFormTokenize", 7);
|
|
52
|
-
this.
|
|
50
|
+
this.cardFormValidate = index.createEvent(this, "cardFormValidate", 7);
|
|
51
|
+
this.validationStrategy = undefined;
|
|
53
52
|
}
|
|
54
53
|
readyHandler(event) {
|
|
55
54
|
this.cardFormReady.emit(event);
|
|
56
55
|
}
|
|
57
|
-
changeHandler(event) {
|
|
58
|
-
this.cardFormChange.emit(event);
|
|
59
|
-
}
|
|
60
|
-
blurHandler(event) {
|
|
61
|
-
this.cardFormBlur.emit(event);
|
|
62
|
-
}
|
|
63
56
|
tokenizeHandler(event) {
|
|
64
57
|
this.cardFormTokenize.emit(event);
|
|
65
58
|
}
|
|
59
|
+
validateHandler(event) {
|
|
60
|
+
this.cardFormValidate.emit(event);
|
|
61
|
+
}
|
|
66
62
|
async tokenize(...args) {
|
|
67
63
|
if (!this.childRef) {
|
|
68
64
|
throw new Error('Cannot call tokenize');
|
|
69
65
|
}
|
|
70
66
|
return this.childRef.tokenize(...args);
|
|
71
67
|
}
|
|
68
|
+
async validate() {
|
|
69
|
+
if (!this.childRef) {
|
|
70
|
+
throw new Error('Cannot call validate');
|
|
71
|
+
}
|
|
72
|
+
return this.childRef.validate();
|
|
73
|
+
}
|
|
72
74
|
render() {
|
|
73
75
|
return (index.h("justifi-payment-method-form", { ref: el => {
|
|
74
76
|
if (el) {
|
|
75
77
|
this.childRef = el;
|
|
76
78
|
}
|
|
77
|
-
}, "
|
|
79
|
+
}, "payment-method-form-type": "card", "payment-method-form-ready": this.cardFormReady, "payment-method-form-tokenize": this.cardFormTokenize, "payment-method-form-validation-strategy": this.validationStrategy || 'onSubmit' }));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const MessageEventType = {
|
|
84
|
+
card: {
|
|
85
|
+
ready: 'justifi.card.ready',
|
|
86
|
+
tokenize: 'justifi.card.tokenize',
|
|
87
|
+
validate: 'justifi.card.validate',
|
|
88
|
+
},
|
|
89
|
+
bankAccount: {
|
|
90
|
+
ready: 'justifi.bank_account.ready',
|
|
91
|
+
tokenize: 'justifi.bank_account.tokenize',
|
|
92
|
+
validate: 'justifi.bank_account.validate',
|
|
78
93
|
}
|
|
79
94
|
};
|
|
80
|
-
CardForm.style = cardFormCss;
|
|
81
95
|
|
|
82
96
|
const paymentMethodFormCss = ":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";
|
|
83
97
|
|
|
84
|
-
var DispatchedEventTypes;
|
|
85
|
-
(function (DispatchedEventTypes) {
|
|
86
|
-
DispatchedEventTypes["blur"] = "blur";
|
|
87
|
-
DispatchedEventTypes["change"] = "change";
|
|
88
|
-
DispatchedEventTypes["ready"] = "ready";
|
|
89
|
-
DispatchedEventTypes["tokenize"] = "tokenize";
|
|
90
|
-
})(DispatchedEventTypes || (DispatchedEventTypes = {}));
|
|
91
98
|
const PaymentMethodForm = class {
|
|
92
99
|
constructor(hostRef) {
|
|
93
100
|
index.registerInstance(this, hostRef);
|
|
94
101
|
this.paymentMethodFormReady = index.createEvent(this, "paymentMethodFormReady", 7);
|
|
95
|
-
this.paymentMethodFormChange = index.createEvent(this, "paymentMethodFormChange", 7);
|
|
96
|
-
this.paymentMethodFormBlur = index.createEvent(this, "paymentMethodFormBlur", 7);
|
|
97
102
|
this.paymentMethodFormTokenize = index.createEvent(this, "paymentMethodFormTokenize", 7);
|
|
98
|
-
this.
|
|
103
|
+
this.paymentMethodFormType = undefined;
|
|
104
|
+
this.paymentMethodFormValidationStrategy = undefined;
|
|
99
105
|
}
|
|
100
106
|
connectedCallback() {
|
|
101
107
|
window.addEventListener('message', this.dispatchMessageEvent.bind(this));
|
|
@@ -107,43 +113,45 @@ const PaymentMethodForm = class {
|
|
|
107
113
|
const messagePayload = messageEvent.data;
|
|
108
114
|
const messageType = messagePayload.eventType;
|
|
109
115
|
const messageData = messagePayload.data;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this.paymentMethodFormReady.emit(messageData);
|
|
113
|
-
break;
|
|
114
|
-
case DispatchedEventTypes.change:
|
|
115
|
-
this.paymentMethodFormChange.emit(messageData);
|
|
116
|
-
break;
|
|
117
|
-
case DispatchedEventTypes.blur:
|
|
118
|
-
this.paymentMethodFormBlur.emit(messageData);
|
|
119
|
-
break;
|
|
116
|
+
if (messageType === MessageEventType[this.paymentMethodFormType].ready) {
|
|
117
|
+
this.paymentMethodFormReady.emit(messageData);
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
|
-
|
|
123
|
-
if (this.iframeElement && this.iframeElement.contentWindow) {
|
|
124
|
-
this.iframeElement.contentWindow.postMessage({
|
|
125
|
-
eventType: DispatchedEventTypes.tokenize,
|
|
126
|
-
clientKey: clientKey,
|
|
127
|
-
paymentMethodMetadata: paymentMethodMetadata,
|
|
128
|
-
account: account
|
|
129
|
-
}, '*');
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
async tokenize(clientKey, paymentMethodMetadata, account) {
|
|
120
|
+
async postMessageWithResponseListener(eventType, payload) {
|
|
133
121
|
return new Promise((resolve) => {
|
|
134
|
-
const
|
|
135
|
-
if (event.data.eventType !==
|
|
122
|
+
const responseListener = (event) => {
|
|
123
|
+
if (event.data.eventType !== eventType)
|
|
136
124
|
return;
|
|
137
|
-
window.removeEventListener('message',
|
|
125
|
+
window.removeEventListener('message', responseListener);
|
|
138
126
|
resolve(event.data.data);
|
|
139
127
|
};
|
|
140
|
-
window.addEventListener('message',
|
|
141
|
-
this.
|
|
128
|
+
window.addEventListener('message', responseListener);
|
|
129
|
+
this.iframeElement.contentWindow.postMessage(Object.assign({ eventType: eventType }, payload), '*');
|
|
142
130
|
});
|
|
143
131
|
}
|
|
132
|
+
async tokenize(clientKey, paymentMethodMetadata, account) {
|
|
133
|
+
const eventType = MessageEventType[this.paymentMethodFormType].tokenize;
|
|
134
|
+
const payload = {
|
|
135
|
+
clientKey: clientKey,
|
|
136
|
+
paymentMethodMetadata: paymentMethodMetadata,
|
|
137
|
+
account: account
|
|
138
|
+
};
|
|
139
|
+
return this.postMessageWithResponseListener(eventType, payload);
|
|
140
|
+
}
|
|
141
|
+
;
|
|
142
|
+
async validate() {
|
|
143
|
+
return this.postMessageWithResponseListener(MessageEventType[this.paymentMethodFormType].validate);
|
|
144
|
+
}
|
|
144
145
|
;
|
|
146
|
+
getIframeSrc() {
|
|
147
|
+
let iframeSrc = `https://js.justifi.ai/v2/${this.paymentMethodFormType}`;
|
|
148
|
+
if (this.paymentMethodFormValidationStrategy) {
|
|
149
|
+
iframeSrc += `?validationStrategy=${this.paymentMethodFormValidationStrategy}`;
|
|
150
|
+
}
|
|
151
|
+
return iframeSrc;
|
|
152
|
+
}
|
|
145
153
|
render() {
|
|
146
|
-
return (index.h(index.Host, null, index.h("iframe", { id:
|
|
154
|
+
return (index.h(index.Host, null, index.h("iframe", { id: `justifi-payment-method-form-${this.paymentMethodFormType}`, src: this.getIframeSrc(), ref: (el) => this.iframeElement = el })));
|
|
147
155
|
}
|
|
148
156
|
};
|
|
149
157
|
PaymentMethodForm.style = paymentMethodFormCss;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4f753ffd.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,8 +14,9 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["justifi-bank-account-form_4.cjs",[[0,"justifi-bank-account-form",{"
|
|
17
|
+
return index.bootstrapLazy([["justifi-bank-account-form_4.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[1,"validation-strategy"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]],[0,"justifi-card-form",{"validationStrategy":[1,"validation-strategy"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]],[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}],[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1,"payment-method-form-validation-strategy"],"tokenize":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
21
22
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-4f753ffd.js');
|
|
4
6
|
|
|
5
7
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
8
|
+
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
|
|
7
9
|
*/
|
|
8
10
|
const patchBrowser = () => {
|
|
9
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('webcomponents.cjs.js', document.baseURI).href));
|
|
@@ -15,5 +17,7 @@ const patchBrowser = () => {
|
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["justifi-bank-account-form_4.cjs",[[0,"justifi-bank-account-form",{"
|
|
20
|
+
return index.bootstrapLazy([["justifi-bank-account-form_4.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[1,"validation-strategy"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]],[0,"justifi-card-form",{"validationStrategy":[1,"validation-strategy"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]],[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}],[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1,"payment-method-form-validation-strategy"],"tokenize":[64],"validate":[64]}]]]], options);
|
|
19
21
|
});
|
|
22
|
+
|
|
23
|
+
exports.setNonce = index.setNonce;
|
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
export class BankAccountForm {
|
|
3
3
|
constructor() {
|
|
4
|
-
this.
|
|
4
|
+
this.validationStrategy = undefined;
|
|
5
5
|
}
|
|
6
6
|
readyHandler(event) {
|
|
7
7
|
this.bankAccountFormReady.emit(event);
|
|
8
8
|
}
|
|
9
|
-
changeHandler(event) {
|
|
10
|
-
this.bankAccountFormChange.emit(event);
|
|
11
|
-
}
|
|
12
|
-
blurHandler(event) {
|
|
13
|
-
this.bankAccountFormBlur.emit(event);
|
|
14
|
-
}
|
|
15
9
|
tokenizeHandler(event) {
|
|
16
10
|
this.bankAccountFormTokenize.emit(event);
|
|
17
11
|
}
|
|
12
|
+
validateHandler(event) {
|
|
13
|
+
this.bankAccountFormValidate.emit(event);
|
|
14
|
+
}
|
|
18
15
|
async tokenize(...args) {
|
|
19
16
|
if (!this.childRef) {
|
|
20
17
|
throw new Error('Cannot call tokenize');
|
|
21
18
|
}
|
|
22
19
|
return this.childRef.tokenize(...args);
|
|
23
20
|
}
|
|
21
|
+
async validate() {
|
|
22
|
+
if (!this.childRef) {
|
|
23
|
+
throw new Error('Cannot call validate');
|
|
24
|
+
}
|
|
25
|
+
return this.childRef.validate();
|
|
26
|
+
}
|
|
24
27
|
render() {
|
|
25
28
|
return (h("justifi-payment-method-form", { ref: el => {
|
|
26
29
|
if (el) {
|
|
27
30
|
this.childRef = el;
|
|
28
31
|
}
|
|
29
|
-
}, "
|
|
32
|
+
}, "payment-method-form-type": "bankAccount", "payment-method-form-ready": this.bankAccountFormReady, "payment-method-form-tokenize": this.bankAccountFormTokenize, "payment-method-form-validation-strategy": this.validationStrategy || 'onSubmit' }));
|
|
30
33
|
}
|
|
31
34
|
static get is() { return "justifi-bank-account-form"; }
|
|
32
35
|
static get properties() {
|
|
33
36
|
return {
|
|
34
|
-
"
|
|
37
|
+
"validationStrategy": {
|
|
35
38
|
"type": "string",
|
|
36
39
|
"mutable": false,
|
|
37
40
|
"complexType": {
|
|
38
|
-
"original": "
|
|
39
|
-
"resolved": "
|
|
41
|
+
"original": "'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all'",
|
|
42
|
+
"resolved": "\"all\" | \"onBlur\" | \"onChange\" | \"onSubmit\" | \"onTouched\"",
|
|
40
43
|
"references": {}
|
|
41
44
|
},
|
|
42
45
|
"required": false,
|
|
@@ -45,7 +48,7 @@ export class BankAccountForm {
|
|
|
45
48
|
"tags": [],
|
|
46
49
|
"text": ""
|
|
47
50
|
},
|
|
48
|
-
"attribute": "
|
|
51
|
+
"attribute": "validation-strategy",
|
|
49
52
|
"reflect": false
|
|
50
53
|
}
|
|
51
54
|
};
|
|
@@ -67,8 +70,8 @@ export class BankAccountForm {
|
|
|
67
70
|
"references": {}
|
|
68
71
|
}
|
|
69
72
|
}, {
|
|
70
|
-
"method": "
|
|
71
|
-
"name": "
|
|
73
|
+
"method": "bankAccountFormTokenize",
|
|
74
|
+
"name": "bankAccountFormTokenize",
|
|
72
75
|
"bubbles": true,
|
|
73
76
|
"cancelable": true,
|
|
74
77
|
"composed": true,
|
|
@@ -77,13 +80,13 @@ export class BankAccountForm {
|
|
|
77
80
|
"text": ""
|
|
78
81
|
},
|
|
79
82
|
"complexType": {
|
|
80
|
-
"original": "any",
|
|
81
|
-
"resolved": "any",
|
|
83
|
+
"original": "{ data: any }",
|
|
84
|
+
"resolved": "{ data: any; }",
|
|
82
85
|
"references": {}
|
|
83
86
|
}
|
|
84
87
|
}, {
|
|
85
|
-
"method": "
|
|
86
|
-
"name": "
|
|
88
|
+
"method": "bankAccountFormValidate",
|
|
89
|
+
"name": "bankAccountFormValidate",
|
|
87
90
|
"bubbles": true,
|
|
88
91
|
"cancelable": true,
|
|
89
92
|
"composed": true,
|
|
@@ -92,23 +95,8 @@ export class BankAccountForm {
|
|
|
92
95
|
"text": ""
|
|
93
96
|
},
|
|
94
97
|
"complexType": {
|
|
95
|
-
"original": "
|
|
96
|
-
"resolved": "
|
|
97
|
-
"references": {}
|
|
98
|
-
}
|
|
99
|
-
}, {
|
|
100
|
-
"method": "bankAccountFormTokenize",
|
|
101
|
-
"name": "bankAccountFormTokenize",
|
|
102
|
-
"bubbles": true,
|
|
103
|
-
"cancelable": true,
|
|
104
|
-
"composed": true,
|
|
105
|
-
"docs": {
|
|
106
|
-
"tags": [],
|
|
107
|
-
"text": ""
|
|
108
|
-
},
|
|
109
|
-
"complexType": {
|
|
110
|
-
"original": "{ data: any }",
|
|
111
|
-
"resolved": "{ data: any; }",
|
|
98
|
+
"original": "{ data: { isValid: boolean } }",
|
|
99
|
+
"resolved": "{ data: { isValid: boolean; }; }",
|
|
112
100
|
"references": {}
|
|
113
101
|
}
|
|
114
102
|
}];
|
|
@@ -139,6 +127,22 @@ export class BankAccountForm {
|
|
|
139
127
|
"text": "",
|
|
140
128
|
"tags": []
|
|
141
129
|
}
|
|
130
|
+
},
|
|
131
|
+
"validate": {
|
|
132
|
+
"complexType": {
|
|
133
|
+
"signature": "() => Promise<any>",
|
|
134
|
+
"parameters": [],
|
|
135
|
+
"references": {
|
|
136
|
+
"Promise": {
|
|
137
|
+
"location": "global"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"return": "Promise<any>"
|
|
141
|
+
},
|
|
142
|
+
"docs": {
|
|
143
|
+
"text": "",
|
|
144
|
+
"tags": []
|
|
145
|
+
}
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
148
|
}
|
|
@@ -150,20 +154,14 @@ export class BankAccountForm {
|
|
|
150
154
|
"capture": false,
|
|
151
155
|
"passive": false
|
|
152
156
|
}, {
|
|
153
|
-
"name": "
|
|
154
|
-
"method": "
|
|
155
|
-
"target": undefined,
|
|
156
|
-
"capture": false,
|
|
157
|
-
"passive": false
|
|
158
|
-
}, {
|
|
159
|
-
"name": "paymentMethodFormBlur",
|
|
160
|
-
"method": "blurHandler",
|
|
157
|
+
"name": "paymentMethodFormTokenize",
|
|
158
|
+
"method": "tokenizeHandler",
|
|
161
159
|
"target": undefined,
|
|
162
160
|
"capture": false,
|
|
163
161
|
"passive": false
|
|
164
162
|
}, {
|
|
165
|
-
"name": "
|
|
166
|
-
"method": "
|
|
163
|
+
"name": "paymentMethodFormValidate",
|
|
164
|
+
"method": "validateHandler",
|
|
167
165
|
"target": undefined,
|
|
168
166
|
"capture": false,
|
|
169
167
|
"passive": false
|