@justifi/webcomponents 0.5.0 → 1.0.0

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 (32) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  3. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +4 -4
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/webcomponents.cjs.js +1 -1
  7. package/dist/collection/components/bank-account-form/bank-account-form.js +4 -4
  8. package/dist/collection/components/card-form/card-form.js +4 -4
  9. package/dist/collection/components/card-form/card-form.stories.js +44 -5
  10. package/dist/collection/components/payment-form/payment-form.stories.js +0 -2
  11. package/dist/collection/components/payment-method-form/payment-method-form.js +5 -5
  12. package/dist/components/justifi-bank-account-form.js +3 -3
  13. package/dist/components/justifi-card-form.js +3 -3
  14. package/dist/components/payment-method-form.js +5 -5
  15. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  16. package/dist/esm/justifi-card-form.entry.js +2 -2
  17. package/dist/esm/justifi-payment-method-form.entry.js +4 -4
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/webcomponents.js +1 -1
  20. package/dist/types/components/bank-account-form/bank-account-form.d.ts +1 -1
  21. package/dist/types/components/card-form/card-form.d.ts +1 -1
  22. package/dist/types/components/card-form/card-form.stories.d.ts +29 -0
  23. package/dist/types/components/payment-method-form/payment-method-form.d.ts +1 -1
  24. package/dist/types/components.d.ts +6 -6
  25. package/dist/webcomponents/p-72eafd07.entry.js +1 -0
  26. package/dist/webcomponents/p-a9df9278.entry.js +1 -0
  27. package/dist/webcomponents/p-d71908ff.entry.js +1 -0
  28. package/dist/webcomponents/webcomponents.esm.js +1 -1
  29. package/package.json +2 -2
  30. package/dist/webcomponents/p-1c7556c1.entry.js +0 -1
  31. package/dist/webcomponents/p-1e59f98e.entry.js +0 -1
  32. package/dist/webcomponents/p-5aec1d06.entry.js +0 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### 1.0.0
8
+ > 24 April 2023
9
+
10
+ - Fix broken prop controller in Storybook UI for card-form component
11
+ - rename variable `validationStrategy` and prop `validation-strategy` to `validationMode` and `validation-mode` respectively
12
+
13
+ #### 0.6.1
14
+ > 24 April 2023
15
+
16
+ - Remove hardcoded `iframeOrigin` from `PaymentForm` story
17
+
7
18
  #### 0.6.0
8
19
  > 21 April 2023
9
20
 
@@ -10,7 +10,7 @@ const BankAccountForm = class {
10
10
  this.bankAccountFormReady = index.createEvent(this, "bankAccountFormReady", 7);
11
11
  this.bankAccountFormTokenize = index.createEvent(this, "bankAccountFormTokenize", 7);
12
12
  this.bankAccountFormValidate = index.createEvent(this, "bankAccountFormValidate", 7);
13
- this.validationStrategy = undefined;
13
+ this.validationMode = undefined;
14
14
  this.styleOverrides = undefined;
15
15
  this.iframeOrigin = undefined;
16
16
  this.internalStyleOverrides = undefined;
@@ -50,7 +50,7 @@ const BankAccountForm = class {
50
50
  if (el) {
51
51
  this.childRef = el;
52
52
  }
53
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
53
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
54
54
  }
55
55
  static get watchers() { return {
56
56
  "styleOverrides": ["parseStyleOverrides"]
@@ -10,7 +10,7 @@ const CardForm = class {
10
10
  this.cardFormReady = index.createEvent(this, "cardFormReady", 7);
11
11
  this.cardFormTokenize = index.createEvent(this, "cardFormTokenize", 7);
12
12
  this.cardFormValidate = index.createEvent(this, "cardFormValidate", 7);
13
- this.validationStrategy = undefined;
13
+ this.validationMode = undefined;
14
14
  this.styleOverrides = undefined;
15
15
  this.iframeOrigin = undefined;
16
16
  this.singleLine = undefined;
@@ -51,7 +51,7 @@ const CardForm = class {
51
51
  if (el) {
52
52
  this.childRef = el;
53
53
  }
54
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
54
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
55
55
  }
56
56
  static get watchers() { return {
57
57
  "styleOverrides": ["parseStyleOverrides"]
@@ -22,7 +22,7 @@ const MessageEventType = {
22
22
  };
23
23
 
24
24
  const name = "@justifi/webcomponents";
25
- const version = "0.5.0";
25
+ const version = "1.0.0";
26
26
  const description = "JustiFi Web Components";
27
27
  const main = "dist/index.cjs.js";
28
28
  const module$1 = "dist/index.js";
@@ -118,7 +118,7 @@ const PaymentMethodForm = class {
118
118
  this.paymentMethodFormReady = index.createEvent(this, "paymentMethodFormReady", 7);
119
119
  this.paymentMethodFormTokenize = index.createEvent(this, "paymentMethodFormTokenize", 7);
120
120
  this.paymentMethodFormType = undefined;
121
- this.paymentMethodFormValidationStrategy = undefined;
121
+ this.paymentMethodFormValidationMode = undefined;
122
122
  this.paymentMethodStyleOverrides = undefined;
123
123
  this.iframeOrigin = undefined;
124
124
  this.singleLine = undefined;
@@ -198,8 +198,8 @@ const PaymentMethodForm = class {
198
198
  const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
199
199
  let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
200
200
  let paramsList = [];
201
- if (this.paymentMethodFormValidationStrategy) {
202
- paramsList.push(`validationMode=${this.paymentMethodFormValidationStrategy}`);
201
+ if (this.paymentMethodFormValidationMode) {
202
+ paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);
203
203
  }
204
204
  if (this.singleLine) {
205
205
  paramsList.push(`singleLine=${this.singleLine}`);
@@ -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",{"validationStrategy":[1025,"validation-strategy"],"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",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"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"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodStyleOverrides":[16],"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",{"validationStrategy":[1025,"validation-strategy"],"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",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"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"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
19
19
  });
@@ -1,7 +1,7 @@
1
1
  import { h } from '@stencil/core';
2
2
  export class BankAccountForm {
3
3
  constructor() {
4
- this.validationStrategy = undefined;
4
+ this.validationMode = undefined;
5
5
  this.styleOverrides = undefined;
6
6
  this.iframeOrigin = undefined;
7
7
  this.internalStyleOverrides = undefined;
@@ -41,12 +41,12 @@ export class BankAccountForm {
41
41
  if (el) {
42
42
  this.childRef = el;
43
43
  }
44
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
44
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
45
45
  }
46
46
  static get is() { return "justifi-bank-account-form"; }
47
47
  static get properties() {
48
48
  return {
49
- "validationStrategy": {
49
+ "validationMode": {
50
50
  "type": "string",
51
51
  "mutable": true,
52
52
  "complexType": {
@@ -60,7 +60,7 @@ export class BankAccountForm {
60
60
  "tags": [],
61
61
  "text": ""
62
62
  },
63
- "attribute": "validation-strategy",
63
+ "attribute": "validation-mode",
64
64
  "reflect": false
65
65
  },
66
66
  "styleOverrides": {
@@ -1,7 +1,7 @@
1
1
  import { h } from '@stencil/core';
2
2
  export class CardForm {
3
3
  constructor() {
4
- this.validationStrategy = undefined;
4
+ this.validationMode = undefined;
5
5
  this.styleOverrides = undefined;
6
6
  this.iframeOrigin = undefined;
7
7
  this.singleLine = undefined;
@@ -42,12 +42,12 @@ export class CardForm {
42
42
  if (el) {
43
43
  this.childRef = el;
44
44
  }
45
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
45
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
46
46
  }
47
47
  static get is() { return "justifi-card-form"; }
48
48
  static get properties() {
49
49
  return {
50
- "validationStrategy": {
50
+ "validationMode": {
51
51
  "type": "string",
52
52
  "mutable": true,
53
53
  "complexType": {
@@ -61,7 +61,7 @@ export class CardForm {
61
61
  "tags": [],
62
62
  "text": ""
63
63
  },
64
- "attribute": "validation-strategy",
64
+ "attribute": "validation-mode",
65
65
  "reflect": false
66
66
  },
67
67
  "styleOverrides": {
@@ -2,7 +2,34 @@ import { userEvent, within } from '@storybook/testing-library';
2
2
  import { expect } from '@storybook/jest';
3
3
  export default {
4
4
  title: 'Components/CardForm',
5
- component: 'justifi-card-form',
5
+ component: 'justifi-payment-method-form',
6
+ argTypes: {
7
+ iframeOrigin: {
8
+ control: 'text',
9
+ table: {
10
+ category: 'Props'
11
+ }
12
+ },
13
+ singleLine: {
14
+ control: 'boolean',
15
+ table: {
16
+ category: 'Props'
17
+ }
18
+ },
19
+ styleOverrides: {
20
+ control: 'object',
21
+ table: {
22
+ category: 'Props'
23
+ }
24
+ },
25
+ validationMode: {
26
+ control: { type: 'select' },
27
+ options: ['onSubmit', 'onBlur', 'onChange', 'onTouched', 'all'],
28
+ table: {
29
+ category: 'Props'
30
+ }
31
+ }
32
+ },
6
33
  parameters: {
7
34
  actions: {
8
35
  handles: [
@@ -91,16 +118,28 @@ const storyStyleOverrides = {
91
118
  "fontSize": ".875rem"
92
119
  }
93
120
  };
94
- const Template = ({ includeButtons = true, styleOverrides }) => {
95
- const parsedStyleOverrides = styleOverrides ? JSON.stringify(styleOverrides) : null;
121
+ const Template = (args) => {
122
+ const parsedStyleOverrides = args.styleOverrides ? JSON.stringify(args.styleOverrides) : null;
123
+ const includeButtons = true;
96
124
  return (`
97
125
  <div>
98
- <justifi-card-form data-testid="card-form-iframe" style-overrides='${parsedStyleOverrides || ''}' />
126
+ <justifi-card-form
127
+ data-testid="card-form-iframe"
128
+ validation-mode='${args.validationMode || 'onSubmit'}'
129
+ style-overrides='${parsedStyleOverrides || ''}'
130
+ iframe-origin='${args.iframeOrigin}'
131
+ single-line='${args.singleLine}'
132
+ />
99
133
  </div>
100
134
  ${includeButtons ? FormButtons : ''}
101
135
  `);
102
136
  };
103
137
  export const Basic = Template.bind({});
138
+ Basic.args = {
139
+ iframeOrigin: '',
140
+ singleLine: false,
141
+ validationMode: 'onSubmit'
142
+ };
104
143
  export const Embedded = Template.bind({});
105
144
  Embedded.decorators = [
106
145
  (story) => `
@@ -116,7 +155,7 @@ Embedded.decorators = [
116
155
  ];
117
156
  export const Styled = Template.bind({});
118
157
  Styled.args = {
119
- styleOverrides: storyStyleOverrides
158
+ styleOverrides: storyStyleOverrides,
120
159
  };
121
160
  export const Completed = Template.bind({});
122
161
  Completed.play = async ({ canvasElement, step }) => {
@@ -13,8 +13,6 @@ const Template = (args) => {
13
13
  const paymentForm = document.querySelector('justifi-payment-form');
14
14
  const submitButton = document.querySelector('#submit-button');
15
15
 
16
- paymentForm.iframeOrigin = 'http://localhost:3003/v2';
17
-
18
16
  submitButton?.addEventListener('click', async () => {
19
17
  const tokenizeResponse = await paymentForm.submit({
20
18
  clientId: '${args.clientId}',
@@ -4,7 +4,7 @@ import packageJson from '../../../package.json';
4
4
  export class PaymentMethodForm {
5
5
  constructor() {
6
6
  this.paymentMethodFormType = undefined;
7
- this.paymentMethodFormValidationStrategy = undefined;
7
+ this.paymentMethodFormValidationMode = undefined;
8
8
  this.paymentMethodStyleOverrides = undefined;
9
9
  this.iframeOrigin = undefined;
10
10
  this.singleLine = undefined;
@@ -84,8 +84,8 @@ export class PaymentMethodForm {
84
84
  const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
85
85
  let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
86
86
  let paramsList = [];
87
- if (this.paymentMethodFormValidationStrategy) {
88
- paramsList.push(`validationMode=${this.paymentMethodFormValidationStrategy}`);
87
+ if (this.paymentMethodFormValidationMode) {
88
+ paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);
89
89
  }
90
90
  if (this.singleLine) {
91
91
  paramsList.push(`singleLine=${this.singleLine}`);
@@ -125,7 +125,7 @@ export class PaymentMethodForm {
125
125
  "attribute": "payment-method-form-type",
126
126
  "reflect": false
127
127
  },
128
- "paymentMethodFormValidationStrategy": {
128
+ "paymentMethodFormValidationMode": {
129
129
  "type": "string",
130
130
  "mutable": true,
131
131
  "complexType": {
@@ -139,7 +139,7 @@ export class PaymentMethodForm {
139
139
  "tags": [],
140
140
  "text": ""
141
141
  },
142
- "attribute": "payment-method-form-validation-strategy",
142
+ "attribute": "payment-method-form-validation-mode",
143
143
  "reflect": false
144
144
  },
145
145
  "paymentMethodStyleOverrides": {
@@ -8,7 +8,7 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
8
8
  this.bankAccountFormReady = createEvent(this, "bankAccountFormReady", 7);
9
9
  this.bankAccountFormTokenize = createEvent(this, "bankAccountFormTokenize", 7);
10
10
  this.bankAccountFormValidate = createEvent(this, "bankAccountFormValidate", 7);
11
- this.validationStrategy = undefined;
11
+ this.validationMode = undefined;
12
12
  this.styleOverrides = undefined;
13
13
  this.iframeOrigin = undefined;
14
14
  this.internalStyleOverrides = undefined;
@@ -48,13 +48,13 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
48
48
  if (el) {
49
49
  this.childRef = el;
50
50
  }
51
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
51
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
52
52
  }
53
53
  static get watchers() { return {
54
54
  "styleOverrides": ["parseStyleOverrides"]
55
55
  }; }
56
56
  }, [0, "justifi-bank-account-form", {
57
- "validationStrategy": [1025, "validation-strategy"],
57
+ "validationMode": [1025, "validation-mode"],
58
58
  "styleOverrides": [1025, "style-overrides"],
59
59
  "iframeOrigin": [1025, "iframe-origin"],
60
60
  "internalStyleOverrides": [32],
@@ -8,7 +8,7 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
8
8
  this.cardFormReady = createEvent(this, "cardFormReady", 7);
9
9
  this.cardFormTokenize = createEvent(this, "cardFormTokenize", 7);
10
10
  this.cardFormValidate = createEvent(this, "cardFormValidate", 7);
11
- this.validationStrategy = undefined;
11
+ this.validationMode = undefined;
12
12
  this.styleOverrides = undefined;
13
13
  this.iframeOrigin = undefined;
14
14
  this.singleLine = undefined;
@@ -49,13 +49,13 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
49
49
  if (el) {
50
50
  this.childRef = el;
51
51
  }
52
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
52
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
53
53
  }
54
54
  static get watchers() { return {
55
55
  "styleOverrides": ["parseStyleOverrides"]
56
56
  }; }
57
57
  }, [0, "justifi-card-form", {
58
- "validationStrategy": [1025, "validation-strategy"],
58
+ "validationMode": [1025, "validation-mode"],
59
59
  "styleOverrides": [1025, "style-overrides"],
60
60
  "iframeOrigin": [1025, "iframe-origin"],
61
61
  "singleLine": [4, "single-line"],
@@ -18,7 +18,7 @@ const MessageEventType = {
18
18
  };
19
19
 
20
20
  const name = "@justifi/webcomponents";
21
- const version = "0.5.0";
21
+ const version = "1.0.0";
22
22
  const description = "JustiFi Web Components";
23
23
  const main = "dist/index.cjs.js";
24
24
  const module = "dist/index.js";
@@ -115,7 +115,7 @@ const PaymentMethodForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
115
115
  this.paymentMethodFormReady = createEvent(this, "paymentMethodFormReady", 7);
116
116
  this.paymentMethodFormTokenize = createEvent(this, "paymentMethodFormTokenize", 7);
117
117
  this.paymentMethodFormType = undefined;
118
- this.paymentMethodFormValidationStrategy = undefined;
118
+ this.paymentMethodFormValidationMode = undefined;
119
119
  this.paymentMethodStyleOverrides = undefined;
120
120
  this.iframeOrigin = undefined;
121
121
  this.singleLine = undefined;
@@ -195,8 +195,8 @@ const PaymentMethodForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
195
195
  const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
196
196
  let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
197
197
  let paramsList = [];
198
- if (this.paymentMethodFormValidationStrategy) {
199
- paramsList.push(`validationMode=${this.paymentMethodFormValidationStrategy}`);
198
+ if (this.paymentMethodFormValidationMode) {
199
+ paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);
200
200
  }
201
201
  if (this.singleLine) {
202
202
  paramsList.push(`singleLine=${this.singleLine}`);
@@ -212,7 +212,7 @@ const PaymentMethodForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
212
212
  static get style() { return paymentMethodFormCss; }
213
213
  }, [0, "justifi-payment-method-form", {
214
214
  "paymentMethodFormType": [1, "payment-method-form-type"],
215
- "paymentMethodFormValidationStrategy": [1025, "payment-method-form-validation-strategy"],
215
+ "paymentMethodFormValidationMode": [1025, "payment-method-form-validation-mode"],
216
216
  "paymentMethodStyleOverrides": [16],
217
217
  "iframeOrigin": [1, "iframe-origin"],
218
218
  "singleLine": [4, "single-line"],
@@ -6,7 +6,7 @@ const BankAccountForm = class {
6
6
  this.bankAccountFormReady = createEvent(this, "bankAccountFormReady", 7);
7
7
  this.bankAccountFormTokenize = createEvent(this, "bankAccountFormTokenize", 7);
8
8
  this.bankAccountFormValidate = createEvent(this, "bankAccountFormValidate", 7);
9
- this.validationStrategy = undefined;
9
+ this.validationMode = undefined;
10
10
  this.styleOverrides = undefined;
11
11
  this.iframeOrigin = undefined;
12
12
  this.internalStyleOverrides = undefined;
@@ -46,7 +46,7 @@ const BankAccountForm = class {
46
46
  if (el) {
47
47
  this.childRef = el;
48
48
  }
49
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
49
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
50
50
  }
51
51
  static get watchers() { return {
52
52
  "styleOverrides": ["parseStyleOverrides"]
@@ -6,7 +6,7 @@ const CardForm = class {
6
6
  this.cardFormReady = createEvent(this, "cardFormReady", 7);
7
7
  this.cardFormTokenize = createEvent(this, "cardFormTokenize", 7);
8
8
  this.cardFormValidate = createEvent(this, "cardFormValidate", 7);
9
- this.validationStrategy = undefined;
9
+ this.validationMode = undefined;
10
10
  this.styleOverrides = undefined;
11
11
  this.iframeOrigin = undefined;
12
12
  this.singleLine = undefined;
@@ -47,7 +47,7 @@ const CardForm = class {
47
47
  if (el) {
48
48
  this.childRef = el;
49
49
  }
50
- }, "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-strategy": this.validationStrategy || 'onSubmit', paymentMethodStyleOverrides: this.internalStyleOverrides }));
50
+ }, "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', paymentMethodStyleOverrides: this.internalStyleOverrides }));
51
51
  }
52
52
  static get watchers() { return {
53
53
  "styleOverrides": ["parseStyleOverrides"]
@@ -18,7 +18,7 @@ const MessageEventType = {
18
18
  };
19
19
 
20
20
  const name = "@justifi/webcomponents";
21
- const version = "0.5.0";
21
+ const version = "1.0.0";
22
22
  const description = "JustiFi Web Components";
23
23
  const main = "dist/index.cjs.js";
24
24
  const module = "dist/index.js";
@@ -114,7 +114,7 @@ const PaymentMethodForm = class {
114
114
  this.paymentMethodFormReady = createEvent(this, "paymentMethodFormReady", 7);
115
115
  this.paymentMethodFormTokenize = createEvent(this, "paymentMethodFormTokenize", 7);
116
116
  this.paymentMethodFormType = undefined;
117
- this.paymentMethodFormValidationStrategy = undefined;
117
+ this.paymentMethodFormValidationMode = undefined;
118
118
  this.paymentMethodStyleOverrides = undefined;
119
119
  this.iframeOrigin = undefined;
120
120
  this.singleLine = undefined;
@@ -194,8 +194,8 @@ const PaymentMethodForm = class {
194
194
  const iframeOrigin = this.iframeOrigin || productionIframeOrigin;
195
195
  let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;
196
196
  let paramsList = [];
197
- if (this.paymentMethodFormValidationStrategy) {
198
- paramsList.push(`validationMode=${this.paymentMethodFormValidationStrategy}`);
197
+ if (this.paymentMethodFormValidationMode) {
198
+ paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);
199
199
  }
200
200
  if (this.singleLine) {
201
201
  paramsList.push(`singleLine=${this.singleLine}`);
@@ -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",{"validationStrategy":[1025,"validation-strategy"],"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",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"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"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodStyleOverrides":[16],"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",{"validationStrategy":[1025,"validation-strategy"],"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",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"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"],"styleOverrides":[1025,"style-overrides"],"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"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
17
17
  });
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { Theme } from '../payment-method-form/theme';
3
3
  export declare class BankAccountForm {
4
- validationStrategy: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
4
+ validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
5
5
  styleOverrides?: string;
6
6
  iframeOrigin?: string;
7
7
  internalStyleOverrides: Theme;
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { Theme } from '../payment-method-form/theme';
3
3
  export declare class CardForm {
4
- validationStrategy: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
4
+ validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
5
5
  styleOverrides?: string;
6
6
  iframeOrigin?: string;
7
7
  singleLine: boolean;
@@ -1,6 +1,35 @@
1
1
  declare const _default: {
2
2
  title: string;
3
3
  component: string;
4
+ argTypes: {
5
+ iframeOrigin: {
6
+ control: string;
7
+ table: {
8
+ category: string;
9
+ };
10
+ };
11
+ singleLine: {
12
+ control: string;
13
+ table: {
14
+ category: string;
15
+ };
16
+ };
17
+ styleOverrides: {
18
+ control: string;
19
+ table: {
20
+ category: string;
21
+ };
22
+ };
23
+ validationMode: {
24
+ control: {
25
+ type: string;
26
+ };
27
+ options: string[];
28
+ table: {
29
+ category: string;
30
+ };
31
+ };
32
+ };
4
33
  parameters: {
5
34
  actions: {
6
35
  handles: string[];
@@ -2,7 +2,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { Theme } from './theme';
3
3
  export declare class PaymentMethodForm {
4
4
  paymentMethodFormType: 'card' | 'bankAccount';
5
- paymentMethodFormValidationStrategy: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
5
+ paymentMethodFormValidationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
6
6
  paymentMethodStyleOverrides: Theme | undefined;
7
7
  iframeOrigin?: string;
8
8
  singleLine: boolean;
@@ -15,7 +15,7 @@ export namespace Components {
15
15
  "styleOverrides"?: string;
16
16
  "tokenize": (clientId: string, paymentMethodMetadata: any, account?: string) => Promise<any>;
17
17
  "validate": () => Promise<any>;
18
- "validationStrategy": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
18
+ "validationMode": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
19
19
  }
20
20
  interface JustifiBillingForm {
21
21
  "fill": (fields: BillingFormFields) => Promise<void>;
@@ -29,7 +29,7 @@ export namespace Components {
29
29
  "styleOverrides"?: string;
30
30
  "tokenize": (clientId: string, paymentMethodMetadata: any, account?: string) => Promise<any>;
31
31
  "validate": () => Promise<any>;
32
- "validationStrategy": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
32
+ "validationMode": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
33
33
  }
34
34
  interface JustifiPaymentForm {
35
35
  "bankAccount"?: boolean;
@@ -41,7 +41,7 @@ export namespace Components {
41
41
  interface JustifiPaymentMethodForm {
42
42
  "iframeOrigin"?: string;
43
43
  "paymentMethodFormType": 'card' | 'bankAccount';
44
- "paymentMethodFormValidationStrategy": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
44
+ "paymentMethodFormValidationMode": 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
45
45
  "paymentMethodStyleOverrides": Theme | undefined;
46
46
  "singleLine": boolean;
47
47
  "tokenize": (clientId: string, paymentMethodMetadata: any, account?: string) => Promise<any>;
@@ -167,7 +167,7 @@ declare namespace LocalJSX {
167
167
  "onBankAccountFormTokenize"?: (event: JustifiBankAccountFormCustomEvent<{ data: any }>) => void;
168
168
  "onBankAccountFormValidate"?: (event: JustifiBankAccountFormCustomEvent<{ data: { isValid: boolean } }>) => void;
169
169
  "styleOverrides"?: string;
170
- "validationStrategy"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
170
+ "validationMode"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
171
171
  }
172
172
  interface JustifiBillingForm {
173
173
  "legend"?: string;
@@ -179,7 +179,7 @@ declare namespace LocalJSX {
179
179
  "onCardFormValidate"?: (event: JustifiCardFormCustomEvent<{ data: { isValid: boolean } }>) => void;
180
180
  "singleLine"?: boolean;
181
181
  "styleOverrides"?: string;
182
- "validationStrategy"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
182
+ "validationMode"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
183
183
  }
184
184
  interface JustifiPaymentForm {
185
185
  "bankAccount"?: boolean;
@@ -191,7 +191,7 @@ declare namespace LocalJSX {
191
191
  "onPaymentMethodFormReady"?: (event: JustifiPaymentMethodFormCustomEvent<any>) => void;
192
192
  "onPaymentMethodFormTokenize"?: (event: JustifiPaymentMethodFormCustomEvent<{ data: any }>) => void;
193
193
  "paymentMethodFormType"?: 'card' | 'bankAccount';
194
- "paymentMethodFormValidationStrategy"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
194
+ "paymentMethodFormValidationMode"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
195
195
  "paymentMethodStyleOverrides"?: Theme | undefined;
196
196
  "singleLine"?: boolean;
197
197
  }
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./p-9a8abfcb.js";const r=class{constructor(i){t(this,i),this.bankAccountFormReady=e(this,"bankAccountFormReady",7),this.bankAccountFormTokenize=e(this,"bankAccountFormTokenize",7),this.bankAccountFormValidate=e(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)}componentWillLoad(){this.parseStyleOverrides()}parseStyleOverrides(){if(this.styleOverrides){const t=JSON.parse(this.styleOverrides);this.internalStyleOverrides=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 i("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",paymentMethodStyleOverrides:this.internalStyleOverrides})}static get watchers(){return{styleOverrides:["parseStyleOverrides"]}}};export{r as justifi_bank_account_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e}from"./p-9a8abfcb.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.styleOverrides=void 0,this.iframeOrigin=void 0,this.singleLine=void 0,this.internalStyleOverrides=void 0}readyHandler(t){this.cardFormReady.emit(t)}tokenizeHandler(t){this.cardFormTokenize.emit(t)}validateHandler(t){this.cardFormValidate.emit(t)}componentWillLoad(){this.parseStyleOverrides()}parseStyleOverrides(){if(this.styleOverrides){const t=JSON.parse(this.styleOverrides);this.internalStyleOverrides=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",paymentMethodStyleOverrides:this.internalStyleOverrides})}static get watchers(){return{styleOverrides:["parseStyleOverrides"]}}};export{r as justifi_card_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s}from"./p-9a8abfcb.js";const a={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"}},r=class{constructor(i){t(this,i),this.paymentMethodFormReady=e(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=e(this,"paymentMethodFormTokenize",7),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.paymentMethodStyleOverrides=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.paymentMethodStyleOverrides&&this.postMessage(a[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.paymentMethodStyleOverrides})}dispatchMessageEvent(t){const e=t.data,i=e.eventType,s=e.data;i===a[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(s),i===a[this.paymentMethodFormType].resize&&(this.height=s.height)}postMessage(t,e){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:t},e),"*")}async postMessageWithResponseListener(t,e){return new Promise((i=>{const s=e=>{e.data.eventType===t&&(window.removeEventListener("message",s),i(e.data.data))};window.addEventListener("message",s),this.postMessage(t,e)}))}async tokenize(t,e,i){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].tokenize,{clientId:t,componentVersion:"1.0.0",paymentMethodMetadata:e,account:i})}async validate(){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].validate)}composeQueryParams(t){return t.map((e=>e===t[0]?`?${e}`:`&${e}`)).join("")}getIframeSrc(){let t=`${this.iframeOrigin||"https://js.justifi.ai/v2"}/${this.paymentMethodFormType}`,e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),t.concat(this.composeQueryParams(e))}render(){return i(s,null,i("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:t=>this.iframeElement=t,height:this.height}))}static get watchers(){return{paymentMethodStyleOverrides:["sendStyleOverrides"]}}};r.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";export{r as justifi_payment_method_form}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-9a8abfcb.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-81e20318",[[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-5aec1d06",[[0,"justifi-bank-account-form",{validationStrategy:[1025,"validation-strategy"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-1c7556c1",[[0,"justifi-card-form",{validationStrategy:[1025,"validation-strategy"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-f25081d7",[[1,"justifi-payments-list",{accountId:[1,"account-id"],auth:[16],payments:[32]}]]],["p-ad6ad202",[[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-8f9a69d2",[[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-1e59f98e",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationStrategy:[1025,"payment-method-form-validation-strategy"],paymentMethodStyleOverrides:[16],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-9a8abfcb.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-81e20318",[[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-72eafd07",[[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-a9df9278",[[0,"justifi-card-form",{validationMode:[1025,"validation-mode"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],singleLine:[4,"single-line"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-f25081d7",[[1,"justifi-payments-list",{accountId:[1,"account-id"],auth:[16],payments:[32]}]]],["p-ad6ad202",[[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-8f9a69d2",[[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-d71908ff",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationMode:[1025,"payment-method-form-validation-mode"],paymentMethodStyleOverrides:[16],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": "0.5.0",
3
+ "version": "1.0.0",
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 e}from"./p-9a8abfcb.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.validationStrategy=void 0,this.styleOverrides=void 0,this.iframeOrigin=void 0,this.singleLine=void 0,this.internalStyleOverrides=void 0}readyHandler(t){this.cardFormReady.emit(t)}tokenizeHandler(t){this.cardFormTokenize.emit(t)}validateHandler(t){this.cardFormValidate.emit(t)}componentWillLoad(){this.parseStyleOverrides()}parseStyleOverrides(){if(this.styleOverrides){const t=JSON.parse(this.styleOverrides);this.internalStyleOverrides=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-strategy":this.validationStrategy||"onSubmit",paymentMethodStyleOverrides:this.internalStyleOverrides})}static get watchers(){return{styleOverrides:["parseStyleOverrides"]}}};export{r as justifi_card_form}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,H as s}from"./p-9a8abfcb.js";const a={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"}},r=class{constructor(i){t(this,i),this.paymentMethodFormReady=e(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=e(this,"paymentMethodFormTokenize",7),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationStrategy=void 0,this.paymentMethodStyleOverrides=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.paymentMethodStyleOverrides&&this.postMessage(a[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.paymentMethodStyleOverrides})}dispatchMessageEvent(t){const e=t.data,i=e.eventType,s=e.data;i===a[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(s),i===a[this.paymentMethodFormType].resize&&(this.height=s.height)}postMessage(t,e){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:t},e),"*")}async postMessageWithResponseListener(t,e){return new Promise((i=>{const s=e=>{e.data.eventType===t&&(window.removeEventListener("message",s),i(e.data.data))};window.addEventListener("message",s),this.postMessage(t,e)}))}async tokenize(t,e,i){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].tokenize,{clientId:t,componentVersion:"0.5.0",paymentMethodMetadata:e,account:i})}async validate(){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].validate)}composeQueryParams(t){return t.map((e=>e===t[0]?`?${e}`:`&${e}`)).join("")}getIframeSrc(){let t=`${this.iframeOrigin||"https://js.justifi.ai/v2"}/${this.paymentMethodFormType}`,e=[];return this.paymentMethodFormValidationStrategy&&e.push(`validationMode=${this.paymentMethodFormValidationStrategy}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),t.concat(this.composeQueryParams(e))}render(){return i(s,null,i("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:t=>this.iframeElement=t,height:this.height}))}static get watchers(){return{paymentMethodStyleOverrides:["sendStyleOverrides"]}}};r.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";export{r as justifi_payment_method_form}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-9a8abfcb.js";const r=class{constructor(i){t(this,i),this.bankAccountFormReady=e(this,"bankAccountFormReady",7),this.bankAccountFormTokenize=e(this,"bankAccountFormTokenize",7),this.bankAccountFormValidate=e(this,"bankAccountFormValidate",7),this.validationStrategy=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)}componentWillLoad(){this.parseStyleOverrides()}parseStyleOverrides(){if(this.styleOverrides){const t=JSON.parse(this.styleOverrides);this.internalStyleOverrides=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 i("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-strategy":this.validationStrategy||"onSubmit",paymentMethodStyleOverrides:this.internalStyleOverrides})}static get watchers(){return{styleOverrides:["parseStyleOverrides"]}}};export{r as justifi_bank_account_form}