@justifi/webcomponents 2.0.1 → 2.0.2

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.
Files changed (27) hide show
  1. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +7 -0
  2. package/dist/cjs/justifi-card-form.cjs.entry.js +8 -1
  3. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/webcomponents.cjs.js +1 -1
  6. package/dist/collection/components/bank-account-form/bank-account-form.js +32 -11
  7. package/dist/collection/components/card-form/card-form.js +37 -15
  8. package/dist/collection/components/card-form/card-form.stories.js +16 -49
  9. package/dist/components/justifi-bank-account-form.js +8 -0
  10. package/dist/components/justifi-card-form.js +9 -1
  11. package/dist/components/payment-method-form.js +1 -1
  12. package/dist/esm/justifi-bank-account-form.entry.js +7 -0
  13. package/dist/esm/justifi-card-form.entry.js +8 -1
  14. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/webcomponents.js +1 -1
  17. package/dist/types/components/bank-account-form/bank-account-form.d.ts +30 -1
  18. package/dist/types/components/card-form/card-form.d.ts +32 -1
  19. package/dist/types/components/card-form/card-form.stories.d.ts +2 -22
  20. package/dist/types/components.d.ts +73 -1
  21. package/dist/webcomponents/p-632dab44.entry.js +1 -0
  22. package/dist/webcomponents/p-af8d98bb.entry.js +1 -0
  23. package/dist/webcomponents/{p-e3de1db1.entry.js → p-f7aa93bc.entry.js} +1 -1
  24. package/dist/webcomponents/webcomponents.esm.js +1 -1
  25. package/package.json +2 -2
  26. package/dist/webcomponents/p-3d53bd97.entry.js +0 -1
  27. package/dist/webcomponents/p-884b845d.entry.js +0 -1
@@ -13,6 +13,7 @@ const BankAccountForm = class {
13
13
  this.validationMode = undefined;
14
14
  this.styleOverrides = undefined;
15
15
  this.iframeOrigin = undefined;
16
+ this.internalStyleOverrides = undefined;
16
17
  }
17
18
  readyHandler(event) {
18
19
  this.bankAccountFormReady.emit(event);
@@ -23,12 +24,18 @@ const BankAccountForm = class {
23
24
  validateHandler(event) {
24
25
  this.bankAccountFormValidate.emit(event);
25
26
  }
27
+ /**
28
+ * Makes a tokenization request to the iframe
29
+ */
26
30
  async tokenize(...args) {
27
31
  if (!this.childRef) {
28
32
  throw new Error('Cannot call tokenize');
29
33
  }
30
34
  return this.childRef.tokenize(...args);
31
35
  }
36
+ /**
37
+ * Runs a validation on the form and shows errors if any
38
+ */
32
39
  async validate() {
33
40
  if (!this.childRef) {
34
41
  throw new Error('Cannot call validate');
@@ -12,7 +12,8 @@ const CardForm = class {
12
12
  this.cardFormValidate = index.createEvent(this, "cardFormValidate", 7);
13
13
  this.validationMode = undefined;
14
14
  this.iframeOrigin = undefined;
15
- this.singleLine = undefined;
15
+ this.singleLine = false;
16
+ this.internalStyleOverrides = undefined;
16
17
  }
17
18
  readyHandler(event) {
18
19
  this.cardFormReady.emit(event);
@@ -23,12 +24,18 @@ const CardForm = class {
23
24
  validateHandler(event) {
24
25
  this.cardFormValidate.emit(event);
25
26
  }
27
+ /**
28
+ * Makes a tokenization request to the iframe
29
+ */
26
30
  async tokenize(...args) {
27
31
  if (!this.childRef) {
28
32
  throw new Error('Cannot call tokenize');
29
33
  }
30
34
  return this.childRef.tokenize(...args);
31
35
  }
36
+ /**
37
+ * Runs a validation on the form and shows errors if any
38
+ */
32
39
  async validate() {
33
40
  if (!this.childRef) {
34
41
  throw new Error('Cannot call validate');
@@ -22,7 +22,7 @@ const MessageEventType = {
22
22
  };
23
23
 
24
24
  const name = "@justifi/webcomponents";
25
- const version = "2.0.1";
25
+ const version = "2.0.2";
26
26
  const description = "JustiFi Web Components";
27
27
  const main = "dist/index.cjs.js";
28
28
  const module$1 = "dist/index.js";
@@ -14,7 +14,7 @@ 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-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
17
+ return index.bootstrapLazy([["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
18
+ return index.bootstrapLazy([["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
19
19
  });
@@ -4,6 +4,7 @@ export class BankAccountForm {
4
4
  this.validationMode = undefined;
5
5
  this.styleOverrides = undefined;
6
6
  this.iframeOrigin = undefined;
7
+ this.internalStyleOverrides = undefined;
7
8
  }
8
9
  readyHandler(event) {
9
10
  this.bankAccountFormReady.emit(event);
@@ -14,12 +15,18 @@ export class BankAccountForm {
14
15
  validateHandler(event) {
15
16
  this.bankAccountFormValidate.emit(event);
16
17
  }
18
+ /**
19
+ * Makes a tokenization request to the iframe
20
+ */
17
21
  async tokenize(...args) {
18
22
  if (!this.childRef) {
19
23
  throw new Error('Cannot call tokenize');
20
24
  }
21
25
  return this.childRef.tokenize(...args);
22
26
  }
27
+ /**
28
+ * Runs a validation on the form and shows errors if any
29
+ */
23
30
  async validate() {
24
31
  if (!this.childRef) {
25
32
  throw new Error('Cannot call validate');
@@ -48,7 +55,7 @@ export class BankAccountForm {
48
55
  "optional": false,
49
56
  "docs": {
50
57
  "tags": [],
51
- "text": ""
58
+ "text": "When to trigger validation of the form."
52
59
  },
53
60
  "attribute": "validation-mode",
54
61
  "reflect": false
@@ -65,7 +72,7 @@ export class BankAccountForm {
65
72
  "optional": true,
66
73
  "docs": {
67
74
  "tags": [],
68
- "text": ""
75
+ "text": "JSON formatted styles"
69
76
  },
70
77
  "attribute": "style-overrides",
71
78
  "reflect": false
@@ -82,13 +89,18 @@ export class BankAccountForm {
82
89
  "optional": true,
83
90
  "docs": {
84
91
  "tags": [],
85
- "text": ""
92
+ "text": "URL for the rendered iFrame. End-users need not use this."
86
93
  },
87
94
  "attribute": "iframe-origin",
88
95
  "reflect": false
89
96
  }
90
97
  };
91
98
  }
99
+ static get states() {
100
+ return {
101
+ "internalStyleOverrides": {}
102
+ };
103
+ }
92
104
  static get events() {
93
105
  return [{
94
106
  "method": "bankAccountFormReady",
@@ -97,8 +109,11 @@ export class BankAccountForm {
97
109
  "cancelable": true,
98
110
  "composed": true,
99
111
  "docs": {
100
- "tags": [],
101
- "text": ""
112
+ "tags": [{
113
+ "name": "event",
114
+ "text": "justifi-bank-account-form#bankAccountFormReady"
115
+ }],
116
+ "text": "Triggered when iframe has loaded"
102
117
  },
103
118
  "complexType": {
104
119
  "original": "any",
@@ -112,8 +127,11 @@ export class BankAccountForm {
112
127
  "cancelable": true,
113
128
  "composed": true,
114
129
  "docs": {
115
- "tags": [],
116
- "text": ""
130
+ "tags": [{
131
+ "name": "event",
132
+ "text": "justifi-bank-account-form#bankAccountFormTokenize"
133
+ }],
134
+ "text": "Triggered when the tokenize method is called on the component"
117
135
  },
118
136
  "complexType": {
119
137
  "original": "{ data: any }",
@@ -127,8 +145,11 @@ export class BankAccountForm {
127
145
  "cancelable": true,
128
146
  "composed": true,
129
147
  "docs": {
130
- "tags": [],
131
- "text": ""
148
+ "tags": [{
149
+ "name": "event",
150
+ "text": "justifi-bank-account-form#bankAccountFormValidate"
151
+ }],
152
+ "text": "Triggered when the validate method is called on the component"
132
153
  },
133
154
  "complexType": {
134
155
  "original": "{ data: { isValid: boolean } }",
@@ -160,7 +181,7 @@ export class BankAccountForm {
160
181
  "return": "Promise<any>"
161
182
  },
162
183
  "docs": {
163
- "text": "",
184
+ "text": "Makes a tokenization request to the iframe",
164
185
  "tags": []
165
186
  }
166
187
  },
@@ -176,7 +197,7 @@ export class BankAccountForm {
176
197
  "return": "Promise<any>"
177
198
  },
178
199
  "docs": {
179
- "text": "",
200
+ "text": "Runs a validation on the form and shows errors if any",
180
201
  "tags": []
181
202
  }
182
203
  }
@@ -3,7 +3,8 @@ export class CardForm {
3
3
  constructor() {
4
4
  this.validationMode = undefined;
5
5
  this.iframeOrigin = undefined;
6
- this.singleLine = undefined;
6
+ this.singleLine = false;
7
+ this.internalStyleOverrides = undefined;
7
8
  }
8
9
  readyHandler(event) {
9
10
  this.cardFormReady.emit(event);
@@ -14,12 +15,18 @@ export class CardForm {
14
15
  validateHandler(event) {
15
16
  this.cardFormValidate.emit(event);
16
17
  }
18
+ /**
19
+ * Makes a tokenization request to the iframe
20
+ */
17
21
  async tokenize(...args) {
18
22
  if (!this.childRef) {
19
23
  throw new Error('Cannot call tokenize');
20
24
  }
21
25
  return this.childRef.tokenize(...args);
22
26
  }
27
+ /**
28
+ * Runs a validation on the form and shows errors if any
29
+ */
23
30
  async validate() {
24
31
  if (!this.childRef) {
25
32
  throw new Error('Cannot call validate');
@@ -48,7 +55,7 @@ export class CardForm {
48
55
  "optional": false,
49
56
  "docs": {
50
57
  "tags": [],
51
- "text": ""
58
+ "text": "When to trigger validation of the form."
52
59
  },
53
60
  "attribute": "validation-mode",
54
61
  "reflect": false
@@ -65,7 +72,7 @@ export class CardForm {
65
72
  "optional": true,
66
73
  "docs": {
67
74
  "tags": [],
68
- "text": ""
75
+ "text": "URL for the rendered iFrame. End-users need not use this."
69
76
  },
70
77
  "attribute": "iframe-origin",
71
78
  "reflect": false
@@ -82,13 +89,19 @@ export class CardForm {
82
89
  "optional": false,
83
90
  "docs": {
84
91
  "tags": [],
85
- "text": ""
92
+ "text": "Boolean indicating if the Card Form should render in a single line"
86
93
  },
87
94
  "attribute": "single-line",
88
- "reflect": false
95
+ "reflect": false,
96
+ "defaultValue": "false"
89
97
  }
90
98
  };
91
99
  }
100
+ static get states() {
101
+ return {
102
+ "internalStyleOverrides": {}
103
+ };
104
+ }
92
105
  static get events() {
93
106
  return [{
94
107
  "method": "cardFormReady",
@@ -97,8 +110,11 @@ export class CardForm {
97
110
  "cancelable": true,
98
111
  "composed": true,
99
112
  "docs": {
100
- "tags": [],
101
- "text": ""
113
+ "tags": [{
114
+ "name": "event",
115
+ "text": "justifi-card-form#cardFormReady"
116
+ }],
117
+ "text": "Triggered when iframe has loaded"
102
118
  },
103
119
  "complexType": {
104
120
  "original": "any",
@@ -112,8 +128,11 @@ export class CardForm {
112
128
  "cancelable": true,
113
129
  "composed": true,
114
130
  "docs": {
115
- "tags": [],
116
- "text": ""
131
+ "tags": [{
132
+ "name": "event",
133
+ "text": "justifi-card-form#cardFormTokenize"
134
+ }],
135
+ "text": "Triggered when the tokenize method is called on the component"
117
136
  },
118
137
  "complexType": {
119
138
  "original": "{ data: any }",
@@ -127,8 +146,11 @@ export class CardForm {
127
146
  "cancelable": true,
128
147
  "composed": true,
129
148
  "docs": {
130
- "tags": [],
131
- "text": ""
149
+ "tags": [{
150
+ "name": "event",
151
+ "text": "justifi-card-form#cardFormTokenize"
152
+ }],
153
+ "text": "Triggered when the validate method is called on the component"
132
154
  },
133
155
  "complexType": {
134
156
  "original": "{ data: { isValid: boolean } }",
@@ -160,23 +182,23 @@ export class CardForm {
160
182
  "return": "Promise<any>"
161
183
  },
162
184
  "docs": {
163
- "text": "",
185
+ "text": "Makes a tokenization request to the iframe",
164
186
  "tags": []
165
187
  }
166
188
  },
167
189
  "validate": {
168
190
  "complexType": {
169
- "signature": "() => Promise<any>",
191
+ "signature": "() => Promise<{ isValid: boolean; }>",
170
192
  "parameters": [],
171
193
  "references": {
172
194
  "Promise": {
173
195
  "location": "global"
174
196
  }
175
197
  },
176
- "return": "Promise<any>"
198
+ "return": "Promise<{ isValid: boolean; }>"
177
199
  },
178
200
  "docs": {
179
- "text": "",
201
+ "text": "Runs a validation on the form and shows errors if any",
180
202
  "tags": []
181
203
  }
182
204
  }
@@ -1,37 +1,17 @@
1
1
  import { userEvent, within } from '@storybook/testing-library';
2
2
  import { expect } from '@storybook/jest';
3
+ const isDev = process.env.NODE_ENV === 'development';
3
4
  export default {
4
5
  title: 'Components/CardForm',
5
- component: 'justifi-payment-method-form',
6
+ component: 'justifi-card-form',
6
7
  argTypes: {
7
- iframeOrigin: {
8
+ 'iframe-origin': {
8
9
  control: 'text',
9
10
  table: {
10
- category: 'Props'
11
+ disable: isDev ? false : true,
12
+ category: 'props',
11
13
  }
12
14
  },
13
- singleLine: {
14
- control: 'boolean',
15
- table: {
16
- category: 'Props'
17
- }
18
- },
19
- validationMode: {
20
- control: { type: 'select' },
21
- options: ['onSubmit', 'onBlur', 'onChange', 'onTouched', 'all'],
22
- table: {
23
- category: 'Props'
24
- }
25
- }
26
- },
27
- parameters: {
28
- actions: {
29
- handles: [
30
- 'cardFormReady',
31
- 'cardFormValidate',
32
- 'cardFormTokenize'
33
- ],
34
- },
35
15
  },
36
16
  decorators: [
37
17
  (story) => `
@@ -68,27 +48,28 @@ const FormButtons = `
68
48
  }
69
49
  .button-bar button {
70
50
  margin-right: 10px;
51
+ border-radius: 3px;
52
+ border: 1px solid black;
71
53
  }
72
54
  </style>
73
55
  <div class="button-bar">
74
56
  <button id="validate-btn">Validate</button>
75
57
  <button id="tokenize-btn">Tokenize</button>
76
- </div>
77
- `;
58
+ </div>`;
78
59
  const Template = (args) => {
79
60
  const includeButtons = true;
80
61
  return (`
81
62
  <div>
82
63
  <style>
83
64
  :root {
84
- ${args.cssVariables}
65
+ ${args['css-variables'] || ''}
85
66
  }
86
67
  </style>
87
- <justifi-card-form
88
- data-testid="card-form-iframe"
89
- validation-mode='${args.validationMode || 'onSubmit'}'
90
- iframe-origin='${args.iframeOrigin || ''}'
91
- single-line='${args.singleLine}'
68
+ <justifi-card-form
69
+ data-testid="card-form-iframe"
70
+ validation-mode='${args['validation-mode'] || 'onSubmit'}'
71
+ iframe-origin='${args['iframe-origin'] || ''}'
72
+ single-line='${args['single-line']}'
92
73
  />
93
74
  </div>
94
75
  ${includeButtons ? FormButtons : ''}
@@ -96,23 +77,9 @@ const Template = (args) => {
96
77
  };
97
78
  export const Basic = Template.bind({});
98
79
  Basic.args = {
99
- iframeOrigin: '',
100
- singleLine: false,
101
- validationMode: 'onSubmit'
80
+ 'validation-mode': 'onSubmit',
81
+ 'single-line': false,
102
82
  };
103
- export const Embedded = Template.bind({});
104
- Embedded.decorators = [
105
- (story) => `
106
- <style>
107
- #wrapper {
108
- background-color: #aaaaaa;
109
- }
110
- </style>
111
- <div id="wrapper" style="width: 50%;">
112
- ${story()}
113
- </div>
114
- `,
115
- ];
116
83
  export const Styled = Template.bind({});
117
84
  Styled.args = {
118
85
  cssVariables: (`
@@ -11,6 +11,7 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
11
11
  this.validationMode = undefined;
12
12
  this.styleOverrides = undefined;
13
13
  this.iframeOrigin = undefined;
14
+ this.internalStyleOverrides = undefined;
14
15
  }
15
16
  readyHandler(event) {
16
17
  this.bankAccountFormReady.emit(event);
@@ -21,12 +22,18 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
21
22
  validateHandler(event) {
22
23
  this.bankAccountFormValidate.emit(event);
23
24
  }
25
+ /**
26
+ * Makes a tokenization request to the iframe
27
+ */
24
28
  async tokenize(...args) {
25
29
  if (!this.childRef) {
26
30
  throw new Error('Cannot call tokenize');
27
31
  }
28
32
  return this.childRef.tokenize(...args);
29
33
  }
34
+ /**
35
+ * Runs a validation on the form and shows errors if any
36
+ */
30
37
  async validate() {
31
38
  if (!this.childRef) {
32
39
  throw new Error('Cannot call validate');
@@ -44,6 +51,7 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
44
51
  "validationMode": [1025, "validation-mode"],
45
52
  "styleOverrides": [1025, "style-overrides"],
46
53
  "iframeOrigin": [1025, "iframe-origin"],
54
+ "internalStyleOverrides": [32],
47
55
  "tokenize": [64],
48
56
  "validate": [64]
49
57
  }, [[0, "paymentMethodFormReady", "readyHandler"], [0, "paymentMethodFormTokenize", "tokenizeHandler"], [0, "paymentMethodFormValidate", "validateHandler"]]]);
@@ -10,7 +10,8 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10
10
  this.cardFormValidate = createEvent(this, "cardFormValidate", 7);
11
11
  this.validationMode = undefined;
12
12
  this.iframeOrigin = undefined;
13
- this.singleLine = undefined;
13
+ this.singleLine = false;
14
+ this.internalStyleOverrides = undefined;
14
15
  }
15
16
  readyHandler(event) {
16
17
  this.cardFormReady.emit(event);
@@ -21,12 +22,18 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
22
  validateHandler(event) {
22
23
  this.cardFormValidate.emit(event);
23
24
  }
25
+ /**
26
+ * Makes a tokenization request to the iframe
27
+ */
24
28
  async tokenize(...args) {
25
29
  if (!this.childRef) {
26
30
  throw new Error('Cannot call tokenize');
27
31
  }
28
32
  return this.childRef.tokenize(...args);
29
33
  }
34
+ /**
35
+ * Runs a validation on the form and shows errors if any
36
+ */
30
37
  async validate() {
31
38
  if (!this.childRef) {
32
39
  throw new Error('Cannot call validate');
@@ -44,6 +51,7 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
44
51
  "validationMode": [1025, "validation-mode"],
45
52
  "iframeOrigin": [1025, "iframe-origin"],
46
53
  "singleLine": [4, "single-line"],
54
+ "internalStyleOverrides": [32],
47
55
  "tokenize": [64],
48
56
  "validate": [64]
49
57
  }, [[0, "paymentMethodFormReady", "readyHandler"], [0, "paymentMethodFormTokenize", "tokenizeHandler"], [0, "paymentMethodFormValidate", "validateHandler"]]]);
@@ -18,7 +18,7 @@ const MessageEventType = {
18
18
  };
19
19
 
20
20
  const name = "@justifi/webcomponents";
21
- const version = "2.0.1";
21
+ const version = "2.0.2";
22
22
  const description = "JustiFi Web Components";
23
23
  const main = "dist/index.cjs.js";
24
24
  const module = "dist/index.js";
@@ -9,6 +9,7 @@ const BankAccountForm = class {
9
9
  this.validationMode = undefined;
10
10
  this.styleOverrides = undefined;
11
11
  this.iframeOrigin = undefined;
12
+ this.internalStyleOverrides = undefined;
12
13
  }
13
14
  readyHandler(event) {
14
15
  this.bankAccountFormReady.emit(event);
@@ -19,12 +20,18 @@ const BankAccountForm = class {
19
20
  validateHandler(event) {
20
21
  this.bankAccountFormValidate.emit(event);
21
22
  }
23
+ /**
24
+ * Makes a tokenization request to the iframe
25
+ */
22
26
  async tokenize(...args) {
23
27
  if (!this.childRef) {
24
28
  throw new Error('Cannot call tokenize');
25
29
  }
26
30
  return this.childRef.tokenize(...args);
27
31
  }
32
+ /**
33
+ * Runs a validation on the form and shows errors if any
34
+ */
28
35
  async validate() {
29
36
  if (!this.childRef) {
30
37
  throw new Error('Cannot call validate');
@@ -8,7 +8,8 @@ const CardForm = class {
8
8
  this.cardFormValidate = createEvent(this, "cardFormValidate", 7);
9
9
  this.validationMode = undefined;
10
10
  this.iframeOrigin = undefined;
11
- this.singleLine = undefined;
11
+ this.singleLine = false;
12
+ this.internalStyleOverrides = undefined;
12
13
  }
13
14
  readyHandler(event) {
14
15
  this.cardFormReady.emit(event);
@@ -19,12 +20,18 @@ const CardForm = class {
19
20
  validateHandler(event) {
20
21
  this.cardFormValidate.emit(event);
21
22
  }
23
+ /**
24
+ * Makes a tokenization request to the iframe
25
+ */
22
26
  async tokenize(...args) {
23
27
  if (!this.childRef) {
24
28
  throw new Error('Cannot call tokenize');
25
29
  }
26
30
  return this.childRef.tokenize(...args);
27
31
  }
32
+ /**
33
+ * Runs a validation on the form and shows errors if any
34
+ */
28
35
  async validate() {
29
36
  if (!this.childRef) {
30
37
  throw new Error('Cannot call validate');
@@ -18,7 +18,7 @@ const MessageEventType = {
18
18
  };
19
19
 
20
20
  const name = "@justifi/webcomponents";
21
- const version = "2.0.1";
21
+ const version = "2.0.2";
22
22
  const description = "JustiFi Web Components";
23
23
  const main = "dist/index.cjs.js";
24
24
  const module = "dist/index.js";
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["justifi-payment-form",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
13
+ return bootstrapLazy([["justifi-payment-form",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["justifi-payment-form",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
16
+ return bootstrapLazy([["justifi-payment-form",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
17
17
  });
@@ -1,12 +1,35 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { Theme } from '../payment-method-form/theme';
2
3
  export declare class BankAccountForm {
4
+ /**
5
+ * When to trigger validation of the form.
6
+ */
3
7
  validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
8
+ /**
9
+ * JSON formatted styles
10
+ */
4
11
  styleOverrides?: string;
12
+ /**
13
+ * URL for the rendered iFrame. End-users need not use this.
14
+ */
5
15
  iframeOrigin?: string;
6
- bankAccountFormReady: EventEmitter;
16
+ internalStyleOverrides: Theme;
17
+ /**
18
+ * Triggered when iframe has loaded
19
+ * @event justifi-bank-account-form#bankAccountFormReady
20
+ */
21
+ bankAccountFormReady: EventEmitter<any>;
22
+ /**
23
+ * Triggered when the tokenize method is called on the component
24
+ * @event justifi-bank-account-form#bankAccountFormTokenize
25
+ */
7
26
  bankAccountFormTokenize: EventEmitter<{
8
27
  data: any;
9
28
  }>;
29
+ /**
30
+ * Triggered when the validate method is called on the component
31
+ * @event justifi-bank-account-form#bankAccountFormValidate
32
+ */
10
33
  bankAccountFormValidate: EventEmitter<{
11
34
  data: {
12
35
  isValid: boolean;
@@ -20,7 +43,13 @@ export declare class BankAccountForm {
20
43
  data: any;
21
44
  }): void;
22
45
  private childRef?;
46
+ /**
47
+ * Makes a tokenization request to the iframe
48
+ */
23
49
  tokenize(...args: Parameters<HTMLJustifiPaymentMethodFormElement['tokenize']>): Promise<any>;
50
+ /**
51
+ * Runs a validation on the form and shows errors if any
52
+ */
24
53
  validate(): Promise<any>;
25
54
  render(): any;
26
55
  }
@@ -1,12 +1,35 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { Theme } from '../payment-method-form/theme';
2
3
  export declare class CardForm {
4
+ /**
5
+ * When to trigger validation of the form.
6
+ */
3
7
  validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
8
+ /**
9
+ * URL for the rendered iFrame. End-users need not use this.
10
+ */
4
11
  iframeOrigin?: string;
12
+ /**
13
+ * Boolean indicating if the Card Form should render in a single line
14
+ */
5
15
  singleLine: boolean;
16
+ internalStyleOverrides: Theme;
17
+ /**
18
+ * Triggered when iframe has loaded
19
+ * @event justifi-card-form#cardFormReady
20
+ */
6
21
  cardFormReady: EventEmitter;
22
+ /**
23
+ * Triggered when the tokenize method is called on the component
24
+ * @event justifi-card-form#cardFormTokenize
25
+ */
7
26
  cardFormTokenize: EventEmitter<{
8
27
  data: any;
9
28
  }>;
29
+ /**
30
+ * Triggered when the validate method is called on the component
31
+ * @event justifi-card-form#cardFormTokenize
32
+ */
10
33
  cardFormValidate: EventEmitter<{
11
34
  data: {
12
35
  isValid: boolean;
@@ -20,7 +43,15 @@ export declare class CardForm {
20
43
  data: any;
21
44
  }): void;
22
45
  private childRef?;
46
+ /**
47
+ * Makes a tokenization request to the iframe
48
+ */
23
49
  tokenize(...args: Parameters<HTMLJustifiPaymentMethodFormElement['tokenize']>): Promise<any>;
24
- validate(): Promise<any>;
50
+ /**
51
+ * Runs a validation on the form and shows errors if any
52
+ */
53
+ validate(): Promise<{
54
+ isValid: boolean;
55
+ }>;
25
56
  render(): any;
26
57
  }
@@ -2,37 +2,17 @@ declare const _default: {
2
2
  title: string;
3
3
  component: string;
4
4
  argTypes: {
5
- iframeOrigin: {
5
+ 'iframe-origin': {
6
6
  control: string;
7
7
  table: {
8
+ disable: boolean;
8
9
  category: string;
9
10
  };
10
11
  };
11
- singleLine: {
12
- control: string;
13
- table: {
14
- category: string;
15
- };
16
- };
17
- validationMode: {
18
- control: {
19
- type: string;
20
- };
21
- options: string[];
22
- table: {
23
- category: string;
24
- };
25
- };
26
- };
27
- parameters: {
28
- actions: {
29
- handles: string[];
30
- };
31
12
  };
32
13
  decorators: ((story: any) => string)[];
33
14
  };
34
15
  export default _default;
35
16
  export declare const Basic: any;
36
- export declare const Embedded: any;
37
17
  export declare const Styled: any;
38
18
  export declare const Completed: any;
@@ -10,10 +10,25 @@ import { ValidationError } from "yup";
10
10
  import { PaymentMethodTypes } from "./api";
11
11
  export namespace Components {
12
12
  interface JustifiBankAccountForm {
13
+ /**
14
+ * URL for the rendered iFrame. End-users need not use this.
15
+ */
13
16
  "iframeOrigin"?: string;
17
+ /**
18
+ * JSON formatted styles
19
+ */
14
20
  "styleOverrides"?: string;
21
+ /**
22
+ * Makes a tokenization request to the iframe
23
+ */
15
24
  "tokenize": (clientId: string, paymentMethodMetadata: any, account?: string) => Promise<any>;
25
+ /**
26
+ * Runs a validation on the form and shows errors if any
27
+ */
16
28
  "validate": () => Promise<any>;
29
+ /**
30
+ * When to trigger validation of the form.
31
+ */
17
32
  "validationMode": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
18
33
  }
19
34
  interface JustifiBillingForm {
@@ -23,10 +38,25 @@ export namespace Components {
23
38
  "validate": () => Promise<{ isValid: boolean; }>;
24
39
  }
25
40
  interface JustifiCardForm {
41
+ /**
42
+ * URL for the rendered iFrame. End-users need not use this.
43
+ */
26
44
  "iframeOrigin"?: string;
45
+ /**
46
+ * Boolean indicating if the Card Form should render in a single line
47
+ */
27
48
  "singleLine": boolean;
49
+ /**
50
+ * Makes a tokenization request to the iframe
51
+ */
28
52
  "tokenize": (clientId: string, paymentMethodMetadata: any, account?: string) => Promise<any>;
29
- "validate": () => Promise<any>;
53
+ /**
54
+ * Runs a validation on the form and shows errors if any
55
+ */
56
+ "validate": () => Promise<{ isValid: boolean; }>;
57
+ /**
58
+ * When to trigger validation of the form.
59
+ */
30
60
  "validationMode": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
31
61
  }
32
62
  interface JustifiPaymentForm {
@@ -159,22 +189,64 @@ declare global {
159
189
  }
160
190
  declare namespace LocalJSX {
161
191
  interface JustifiBankAccountForm {
192
+ /**
193
+ * URL for the rendered iFrame. End-users need not use this.
194
+ */
162
195
  "iframeOrigin"?: string;
196
+ /**
197
+ * Triggered when iframe has loaded
198
+ * @event justifi-bank-account-form#bankAccountFormReady
199
+ */
163
200
  "onBankAccountFormReady"?: (event: JustifiBankAccountFormCustomEvent<any>) => void;
201
+ /**
202
+ * Triggered when the tokenize method is called on the component
203
+ * @event justifi-bank-account-form#bankAccountFormTokenize
204
+ */
164
205
  "onBankAccountFormTokenize"?: (event: JustifiBankAccountFormCustomEvent<{ data: any }>) => void;
206
+ /**
207
+ * Triggered when the validate method is called on the component
208
+ * @event justifi-bank-account-form#bankAccountFormValidate
209
+ */
165
210
  "onBankAccountFormValidate"?: (event: JustifiBankAccountFormCustomEvent<{ data: { isValid: boolean } }>) => void;
211
+ /**
212
+ * JSON formatted styles
213
+ */
166
214
  "styleOverrides"?: string;
215
+ /**
216
+ * When to trigger validation of the form.
217
+ */
167
218
  "validationMode"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
168
219
  }
169
220
  interface JustifiBillingForm {
170
221
  "legend"?: string;
171
222
  }
172
223
  interface JustifiCardForm {
224
+ /**
225
+ * URL for the rendered iFrame. End-users need not use this.
226
+ */
173
227
  "iframeOrigin"?: string;
228
+ /**
229
+ * Triggered when iframe has loaded
230
+ * @event justifi-card-form#cardFormReady
231
+ */
174
232
  "onCardFormReady"?: (event: JustifiCardFormCustomEvent<any>) => void;
233
+ /**
234
+ * Triggered when the tokenize method is called on the component
235
+ * @event justifi-card-form#cardFormTokenize
236
+ */
175
237
  "onCardFormTokenize"?: (event: JustifiCardFormCustomEvent<{ data: any }>) => void;
238
+ /**
239
+ * Triggered when the validate method is called on the component
240
+ * @event justifi-card-form#cardFormTokenize
241
+ */
176
242
  "onCardFormValidate"?: (event: JustifiCardFormCustomEvent<{ data: { isValid: boolean } }>) => void;
243
+ /**
244
+ * Boolean indicating if the Card Form should render in a single line
245
+ */
177
246
  "singleLine"?: boolean;
247
+ /**
248
+ * When to trigger validation of the form.
249
+ */
178
250
  "validationMode"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
179
251
  }
180
252
  interface JustifiPaymentForm {
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as o}from"./p-48c17d38.js";const e=class{constructor(o){t(this,o),this.bankAccountFormReady=i(this,"bankAccountFormReady",7),this.bankAccountFormTokenize=i(this,"bankAccountFormTokenize",7),this.bankAccountFormValidate=i(this,"bankAccountFormValidate",7),this.validationMode=void 0,this.styleOverrides=void 0,this.iframeOrigin=void 0,this.internalStyleOverrides=void 0}readyHandler(t){this.bankAccountFormReady.emit(t)}tokenizeHandler(t){this.bankAccountFormTokenize.emit(t)}validateHandler(t){this.bankAccountFormValidate.emit(t)}async tokenize(...t){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...t)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}render(){return o("justifi-payment-method-form",{ref:t=>{t&&(this.childRef=t)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"bankAccount","payment-method-form-ready":this.bankAccountFormReady,"payment-method-form-tokenize":this.bankAccountFormTokenize,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{e as justifi_bank_account_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e}from"./p-48c17d38.js";const r=class{constructor(e){t(this,e),this.cardFormReady=i(this,"cardFormReady",7),this.cardFormTokenize=i(this,"cardFormTokenize",7),this.cardFormValidate=i(this,"cardFormValidate",7),this.validationMode=void 0,this.iframeOrigin=void 0,this.singleLine=!1,this.internalStyleOverrides=void 0}readyHandler(t){this.cardFormReady.emit(t)}tokenizeHandler(t){this.cardFormTokenize.emit(t)}validateHandler(t){this.cardFormValidate.emit(t)}async tokenize(...t){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...t)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}render(){return e("justifi-payment-method-form",{ref:t=>{t&&(this.childRef=t)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"card","single-line":this.singleLine,"payment-method-form-ready":this.cardFormReady,"payment-method-form-tokenize":this.cardFormTokenize,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{r as justifi_card_form}
@@ -1 +1 @@
1
- import{r as o,c as r,h as t,H as i}from"./p-48c17d38.js";const e={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}},s=class{constructor(t){o(this,t),this.paymentMethodFormReady=r(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=r(this,"paymentMethodFormTokenize",7),this.computedTheme=(()=>{const o=getComputedStyle(document.body);return{layout:{padding:o.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:o.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:o.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:o.getPropertyValue("--jfi-form-control-background-color"),borderColor:o.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:o.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:o.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:o.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:o.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:o.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:o.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:o.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:o.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:o.getPropertyValue("--jfi-form-control-border-style"),boxShadow:o.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:o.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:o.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:o.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:o.getPropertyValue("--jfi-form-control-color"),colorFocus:o.getPropertyValue("--jfi-form-control-color-focus"),fontSize:o.getPropertyValue("--jfi-form-control-font-size"),fontWeight:o.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:o.getPropertyValue("--jfi-form-control-line-height"),margin:o.getPropertyValue("--jfi-form-control-margin"),padding:o.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:o.getPropertyValue("--jfi-form-label-color"),fontFamily:o.getPropertyValue("--jfi-form-label-font-family"),fontSize:o.getPropertyValue("--jfi-form-label-font-size"),fontWeight:o.getPropertyValue("--jfi-form-label-font-weight"),margin:o.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:o.getPropertyValue("--jfi-error-message-color"),margin:o.getPropertyValue("--jfi-error-message-margin"),fontSize:o.getPropertyValue("--jfi-error-message-font-size")}}})(),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0,this.height=55}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}componentShouldUpdate(){this.sendStyleOverrides()}sendStyleOverrides(){this.computedTheme&&this.postMessage(e[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}dispatchMessageEvent(o){const r=o.data,t=r.eventType,i=r.data;t===e[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(i),t===e[this.paymentMethodFormType].resize&&(this.height=i.height)}postMessage(o,r){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:o},r),"*")}async postMessageWithResponseListener(o,r){return new Promise((t=>{const i=r=>{r.data.eventType===o&&(window.removeEventListener("message",i),t(r.data.data))};window.addEventListener("message",i),this.postMessage(o,r)}))}async tokenize(o,r,t){return this.postMessageWithResponseListener(e[this.paymentMethodFormType].tokenize,{clientId:o,componentVersion:"2.0.1",paymentMethodMetadata:r,account:t})}async validate(){return this.postMessageWithResponseListener(e[this.paymentMethodFormType].validate)}composeQueryParams(o){return o.map((r=>r===o[0]?`?${r}`:`&${r}`)).join("")}getIframeSrc(){let o=`${this.iframeOrigin||"https://js.justifi.ai/v2"}/${this.paymentMethodFormType}`,r=[];return this.paymentMethodFormValidationMode&&r.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&r.push(`singleLine=${this.singleLine}`),o.concat(this.composeQueryParams(r))}render(){return t(i,null,t("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:o=>this.iframeElement=o,height:this.height}))}};s.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";export{s as justifi_payment_method_form}
1
+ import{r as o,c as r,h as t,H as i}from"./p-48c17d38.js";const e={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}},s=class{constructor(t){o(this,t),this.paymentMethodFormReady=r(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=r(this,"paymentMethodFormTokenize",7),this.computedTheme=(()=>{const o=getComputedStyle(document.body);return{layout:{padding:o.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:o.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:o.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:o.getPropertyValue("--jfi-form-control-background-color"),borderColor:o.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:o.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:o.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:o.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:o.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:o.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:o.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:o.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:o.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:o.getPropertyValue("--jfi-form-control-border-style"),boxShadow:o.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:o.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:o.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:o.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:o.getPropertyValue("--jfi-form-control-color"),colorFocus:o.getPropertyValue("--jfi-form-control-color-focus"),fontSize:o.getPropertyValue("--jfi-form-control-font-size"),fontWeight:o.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:o.getPropertyValue("--jfi-form-control-line-height"),margin:o.getPropertyValue("--jfi-form-control-margin"),padding:o.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:o.getPropertyValue("--jfi-form-label-color"),fontFamily:o.getPropertyValue("--jfi-form-label-font-family"),fontSize:o.getPropertyValue("--jfi-form-label-font-size"),fontWeight:o.getPropertyValue("--jfi-form-label-font-weight"),margin:o.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:o.getPropertyValue("--jfi-error-message-color"),margin:o.getPropertyValue("--jfi-error-message-margin"),fontSize:o.getPropertyValue("--jfi-error-message-font-size")}}})(),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0,this.height=55}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}componentShouldUpdate(){this.sendStyleOverrides()}sendStyleOverrides(){this.computedTheme&&this.postMessage(e[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}dispatchMessageEvent(o){const r=o.data,t=r.eventType,i=r.data;t===e[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(i),t===e[this.paymentMethodFormType].resize&&(this.height=i.height)}postMessage(o,r){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:o},r),"*")}async postMessageWithResponseListener(o,r){return new Promise((t=>{const i=r=>{r.data.eventType===o&&(window.removeEventListener("message",i),t(r.data.data))};window.addEventListener("message",i),this.postMessage(o,r)}))}async tokenize(o,r,t){return this.postMessageWithResponseListener(e[this.paymentMethodFormType].tokenize,{clientId:o,componentVersion:"2.0.2",paymentMethodMetadata:r,account:t})}async validate(){return this.postMessageWithResponseListener(e[this.paymentMethodFormType].validate)}composeQueryParams(o){return o.map((r=>r===o[0]?`?${r}`:`&${r}`)).join("")}getIframeSrc(){let o=`${this.iframeOrigin||"https://js.justifi.ai/v2"}/${this.paymentMethodFormType}`,r=[];return this.paymentMethodFormValidationMode&&r.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&r.push(`singleLine=${this.singleLine}`),o.concat(this.composeQueryParams(r))}render(){return t(i,null,t("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:o=>this.iframeElement=o,height:this.height}))}};s.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";export{s as justifi_payment_method_form}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-48c17d38.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-33fa7295",[[1,"justifi-payment-form",{bankAccount:[4,"bank-account"],card:[4],iframeOrigin:[1,"iframe-origin"],selectedPaymentMethodType:[32],allowedPaymentMethodTypes:[32],fillBillingForm:[64],submit:[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["p-3d53bd97",[[0,"justifi-bank-account-form",{validationMode:[1025,"validation-mode"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-884b845d",[[0,"justifi-card-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-57d070c8",[[1,"justifi-payments-list",{accountId:[1,"account-id"],auth:[16],payments:[32]}]]],["p-5301972d",[[1,"select-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],options:[16],internalValue:[32]}],[1,"text-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],internalValue:[32]}]]],["p-388b2c5f",[[1,"justifi-billing-form",{legend:[1],billingFields:[32],billingFieldsErrors:[32],fill:[64],validate:[64],getValues:[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{paymentMethodTypes:[16],selectedPaymentMethodType:[1,"selected-payment-method-type"]}]]],["p-e3de1db1",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationMode:[1025,"payment-method-form-validation-mode"],iframeOrigin:[1,"iframe-origin"],singleLine:[4,"single-line"],height:[32],tokenize:[64],validate:[64]}]]]],e)));
1
+ import{p as e,b as t}from"./p-48c17d38.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-33fa7295",[[1,"justifi-payment-form",{bankAccount:[4,"bank-account"],card:[4],iframeOrigin:[1,"iframe-origin"],selectedPaymentMethodType:[32],allowedPaymentMethodTypes:[32],fillBillingForm:[64],submit:[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["p-632dab44",[[0,"justifi-bank-account-form",{validationMode:[1025,"validation-mode"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-af8d98bb",[[0,"justifi-card-form",{validationMode:[1025,"validation-mode"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-57d070c8",[[1,"justifi-payments-list",{accountId:[1,"account-id"],auth:[16],payments:[32]}]]],["p-5301972d",[[1,"select-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],options:[16],internalValue:[32]}],[1,"text-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],internalValue:[32]}]]],["p-388b2c5f",[[1,"justifi-billing-form",{legend:[1],billingFields:[32],billingFieldsErrors:[32],fill:[64],validate:[64],getValues:[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{paymentMethodTypes:[16],selectedPaymentMethodType:[1,"selected-payment-method-type"]}]]],["p-f7aa93bc",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationMode:[1025,"payment-method-form-validation-mode"],iframeOrigin:[1,"iframe-origin"],singleLine:[4,"single-line"],height:[32],tokenize:[64],validate:[64]}]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justifi/webcomponents",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "JustiFi Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -69,4 +69,4 @@
69
69
  "storybook": "^7.0.4"
70
70
  },
71
71
  "license": "MIT"
72
- }
72
+ }
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as o}from"./p-48c17d38.js";const e=class{constructor(o){t(this,o),this.bankAccountFormReady=i(this,"bankAccountFormReady",7),this.bankAccountFormTokenize=i(this,"bankAccountFormTokenize",7),this.bankAccountFormValidate=i(this,"bankAccountFormValidate",7),this.validationMode=void 0,this.styleOverrides=void 0,this.iframeOrigin=void 0}readyHandler(t){this.bankAccountFormReady.emit(t)}tokenizeHandler(t){this.bankAccountFormTokenize.emit(t)}validateHandler(t){this.bankAccountFormValidate.emit(t)}async tokenize(...t){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...t)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}render(){return o("justifi-payment-method-form",{ref:t=>{t&&(this.childRef=t)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"bankAccount","payment-method-form-ready":this.bankAccountFormReady,"payment-method-form-tokenize":this.bankAccountFormTokenize,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{e as justifi_bank_account_form}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e}from"./p-48c17d38.js";const r=class{constructor(e){t(this,e),this.cardFormReady=i(this,"cardFormReady",7),this.cardFormTokenize=i(this,"cardFormTokenize",7),this.cardFormValidate=i(this,"cardFormValidate",7),this.validationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}readyHandler(t){this.cardFormReady.emit(t)}tokenizeHandler(t){this.cardFormTokenize.emit(t)}validateHandler(t){this.cardFormValidate.emit(t)}async tokenize(...t){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...t)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}render(){return e("justifi-payment-method-form",{ref:t=>{t&&(this.childRef=t)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"card","single-line":this.singleLine,"payment-method-form-ready":this.cardFormReady,"payment-method-form-tokenize":this.cardFormTokenize,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{r as justifi_card_form}