@justifi/webcomponents 3.3.5 → 4.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 (95) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/changelog-template.hbs +3 -34
  3. package/dist/cjs/{Payment-5781460e.js → Payment-ac4dea02.js} +1 -1
  4. package/dist/cjs/index.esm-8df4906e.js +2092 -0
  5. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +14 -2104
  7. package/dist/cjs/justifi-business-address.cjs.entry.js +66 -0
  8. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -4
  10. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +14 -14
  11. package/dist/cjs/justifi-payments-list.cjs.entry.js +9 -9
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/select-input_2.cjs.entry.js +2 -4
  14. package/dist/cjs/webcomponents.cjs.js +1 -1
  15. package/dist/collection/api/Api.js +3 -5
  16. package/dist/collection/api/Payment.js +1 -1
  17. package/dist/collection/api/mockData/MockPayments.js +24 -22
  18. package/dist/collection/collection-manifest.json +1 -0
  19. package/dist/collection/components/bank-account-form/bank-account-form.js +8 -4
  20. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +13 -9
  21. package/dist/collection/components/bank-account-form/example.js +54 -0
  22. package/dist/collection/components/billing-form/billing-form-schema.js +1 -4
  23. package/dist/collection/components/billing-form/billing-form.js +7 -2
  24. package/dist/collection/components/billing-form/billing-form.stories.js +4 -4
  25. package/dist/collection/components/billing-form/example.js +26 -0
  26. package/dist/collection/components/billing-form/state-options.js +61 -61
  27. package/dist/collection/components/business-address/business-address-schema.js +13 -0
  28. package/dist/collection/components/business-address/business-address.css +2325 -0
  29. package/dist/collection/components/business-address/business-address.js +99 -0
  30. package/dist/collection/components/card-form/card-form.js +8 -4
  31. package/dist/collection/components/card-form/card-form.stories.js +11 -7
  32. package/dist/collection/components/card-form/example.js +59 -0
  33. package/dist/collection/components/payment-form/example.js +23 -0
  34. package/dist/collection/components/payment-form/payment-form.css +2 -0
  35. package/dist/collection/components/payment-form/payment-form.js +10 -5
  36. package/dist/collection/components/payment-form/payment-form.stories.js +15 -12
  37. package/dist/collection/components/payment-form/payment-method-selector.css +5 -0
  38. package/dist/collection/components/payment-form/payment-method-selector.js +2 -3
  39. package/dist/collection/components/payment-method-form/get-computed-theme.js +1 -1
  40. package/dist/collection/components/payment-method-form/message-event-types.js +1 -1
  41. package/dist/collection/components/payment-method-form/payment-method-form.js +11 -10
  42. package/dist/collection/components/payment-method-form/payment-method-responses.js +1 -0
  43. package/dist/collection/components/payments-list/payments-list.js +4 -4
  44. package/dist/collection/components/select-input/select-input.js +3 -4
  45. package/dist/collection/components/text-input/text-input.js +2 -3
  46. package/dist/collection/utils/utils.js +1 -5
  47. package/dist/components/Payment.js +1 -1
  48. package/dist/components/billing-form.js +4 -2093
  49. package/dist/components/index.d.ts +1 -0
  50. package/dist/components/index.js +1 -0
  51. package/dist/components/justifi-bank-account-form.js +2 -2
  52. package/dist/components/justifi-business-address.d.ts +11 -0
  53. package/dist/components/justifi-business-address.js +96 -0
  54. package/dist/components/justifi-card-form.js +2 -2
  55. package/dist/components/justifi-payment-form.js +3 -3
  56. package/dist/components/justifi-payments-list.js +8 -8
  57. package/dist/components/payment-method-form.js +14 -14
  58. package/dist/components/payment-method-selector.js +3 -4
  59. package/dist/components/select-input2.js +1 -2
  60. package/dist/components/state-options.js +2088 -0
  61. package/dist/components/text-input2.js +1 -2
  62. package/dist/esm/{Payment-3f7570a8.js → Payment-c86e1e84.js} +1 -1
  63. package/dist/esm/index.esm-c6a89005.js +2088 -0
  64. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  65. package/dist/esm/justifi-billing-form_2.entry.js +7 -2097
  66. package/dist/esm/justifi-business-address.entry.js +62 -0
  67. package/dist/esm/justifi-card-form.entry.js +2 -2
  68. package/dist/esm/justifi-payment-form.entry.js +4 -4
  69. package/dist/esm/justifi-payment-method-form.entry.js +14 -14
  70. package/dist/esm/justifi-payments-list.entry.js +9 -9
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/select-input_2.entry.js +2 -4
  73. package/dist/esm/webcomponents.js +1 -1
  74. package/dist/types/components/bank-account-form/bank-account-form.d.ts +7 -6
  75. package/dist/types/components/billing-form/billing-form.d.ts +5 -0
  76. package/dist/types/components/business-address/business-address-schema.d.ts +23 -0
  77. package/dist/types/components/business-address/business-address.d.ts +11 -0
  78. package/dist/types/components/card-form/card-form.d.ts +7 -6
  79. package/dist/types/components/payment-form/payment-form.d.ts +2 -3
  80. package/dist/types/components/payment-method-form/get-computed-theme.d.ts +1 -1
  81. package/dist/types/components/payment-method-form/payment-method-form.d.ts +2 -1
  82. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +46 -0
  83. package/dist/types/components.d.ts +24 -8
  84. package/dist/webcomponents/p-039e3540.entry.js +1 -0
  85. package/dist/webcomponents/{p-64b19598.entry.js → p-11e5bef9.entry.js} +1 -1
  86. package/dist/webcomponents/p-20732337.js +1 -0
  87. package/dist/webcomponents/p-5b5e8351.entry.js +1 -0
  88. package/dist/webcomponents/{p-bf40b1ca.entry.js → p-7747c086.entry.js} +1 -1
  89. package/dist/webcomponents/{p-c3c51a2a.entry.js → p-b061da77.entry.js} +1 -1
  90. package/dist/webcomponents/webcomponents.css +1 -1
  91. package/dist/webcomponents/webcomponents.esm.js +1 -1
  92. package/package.json +7 -4
  93. package/readme.md +7 -3
  94. package/dist/webcomponents/p-2530278e.entry.js +0 -1
  95. /package/dist/webcomponents/{p-21e020a8.js → p-1ca0646b.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -4,41 +4,67 @@ 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
+ #### 4.0.0
8
+
9
+ > 08 May 2023
10
+
11
+ - Changed: `CardForm.tokenize`, `BankAccountForm.tokenize` and `PaymentForm.submitted` will now return the full response from the `payment_methods` endpoint instead of just `errors` or `token`. See the API documentation to see payment method CREATE sample responses: https://developer.justifi.ai/tag/Payment-Methods#operation/CreatePaymentMethod
12
+
13
+ Migration notes:
14
+
15
+ - Errors - instead of getting errors via `data.errors[0]`, which was an error code, you will now need to use `data.error.code`. There is also now a human readable message (`data.error.message`)
16
+ - Success/created payment method - instead of getting the token via `data.token`, it is nested within a full payment method response. In order to get the token you will need to use `data.card.token` or `data.bank_account.token` depending on what payment method type is being tokenized
17
+
7
18
  #### 3.3.5
19
+
8
20
  > 11 May 2023
9
21
 
10
22
  - Add `:active` state to Submit button for `PaymentForm`
11
23
 
12
24
  #### 3.2.5
25
+
13
26
  > 11 May 2023
14
27
 
15
28
  - Add styling and variables for radio buttons and submit button in `PaymentForm`
29
+
16
30
  #### 3.1.5
31
+
17
32
  > 04 May 2023
18
33
 
19
34
  - Add missing dependencies.
20
35
 
21
36
  #### 3.1.4
37
+
22
38
  > 04 May 2023
23
39
 
24
40
  - Fix missing url to show recently added introduction page.
25
41
 
42
+ #### 3.0.4
43
+
44
+ > 08 May 2023
45
+
46
+ - Add Storybook landing page with general info
47
+
26
48
  #### 3.0.3
49
+
27
50
  > 04 May 2023
28
51
 
29
- - Fix unscoped reset styles issue, where bootstrap _reboot.scss was being included in webcomponents.css
52
+ - Fix unscoped reset styles issue, where bootstrap \_reboot.scss was being included in webcomponents.css
30
53
 
31
54
  #### 3.0.2
55
+
32
56
  > 04 May 2023
33
57
 
34
58
  - Fix output pointing to empty file for stencil dist.
35
59
 
36
60
  #### 3.0.1
61
+
37
62
  > 3 May 2023
38
63
 
39
64
  - Fix type error where `contentWindow` is `undefined`
40
65
 
41
66
  #### 3.0.0
67
+
42
68
  > 27 April 2023
43
69
 
44
70
  - Remove `submit` method
@@ -46,18 +72,22 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
46
72
  - Add `submitted` event and emit when form is submitted and a response comes back from payment methods endpoint
47
73
 
48
74
  #### 2.0.2
75
+
49
76
  > 25 April 2023
77
+
50
78
  - Improved documentation for `BankAccountForm`
51
79
  - Improved documentation for `CardForm`
52
80
  - Fix how controls and props are displayed and work for `CardForm`
53
81
 
54
82
  #### 2.0.1
83
+
55
84
  > 24 April 2023
56
85
 
57
86
  - Fix: PaymentForm submit action in storybook
58
87
  - Fix: include input-invalid css parts, and export them
59
88
 
60
89
  #### 2.0.0
90
+
61
91
  > 24 April 2023
62
92
 
63
93
  - Remove prop `styleOverrides` from `CardForm`, `BankAccountForm` and `PaymentMethodForm` components
@@ -65,19 +95,21 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
65
95
  - Add CSS `part` and `exportparts` to `TextInput` and `SelectInput`
66
96
  - Add `exportparts` to `BillingForm` so that `TextInput` and `SelectInput` CSS `exportparts` are forwarded
67
97
 
68
-
69
98
  #### 1.0.0
99
+
70
100
  > 24 April 2023
71
101
 
72
102
  - Fix broken prop controller in Storybook UI for card-form component
73
103
  - rename variable `validationStrategy` and prop `validation-strategy` to `validationMode` and `validation-mode` respectively
74
104
 
75
105
  #### 0.6.1
106
+
76
107
  > 24 April 2023
77
108
 
78
109
  - Remove hardcoded `iframeOrigin` from `PaymentForm` story
79
110
 
80
111
  #### 0.6.0
112
+
81
113
  > 21 April 2023
82
114
 
83
115
  - Add `@stencil/sass` plugin `stencil-library`
@@ -85,26 +117,32 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
85
117
  - Add Bootstrap styling to `TextInput`, `SelectInput`, `BillingForm`, `PaymentForm`, and `PaymentMethodSelector`
86
118
 
87
119
  #### 0.5.0
120
+
88
121
  > 21 April 2023
122
+
89
123
  - Allow `singleLine` to be passed to `CardForm` to render a single-line variant of `CardForm`
90
124
 
91
125
  #### 0.4.0
126
+
92
127
  > 18 April 2023
93
128
 
94
129
  - Allow `legend` to be passed and conditionally rendered for `BillingForm`
95
130
 
96
131
  #### 0.3.2
132
+
97
133
  > 12 April 2023
98
134
 
99
135
  - Add `PaymentForm` component
100
136
  - Allow `iframeOrigin` to be passed to `PaymentForm`, `CardForm`, `BankAccountForm`, and `PaymentMethodForm`
101
137
 
102
138
  #### 0.2.2
139
+
103
140
  > 6 April 2023
104
141
 
105
142
  - Update documentation and documentation examples to use cdn.jsdelivr instead of unpkg
106
143
 
107
144
  #### 0.2.1
145
+
108
146
  > 28 March 2023
109
147
 
110
148
  - Pass component version along to tokenize calls so that it can be used in error reporting
@@ -2,40 +2,9 @@
2
2
  # {{title}}
3
3
  [{{isoDate}}]
4
4
 
5
- {{! lit commits with feature: in message, use feature: or Feature: }}
6
- {{#commit-list
7
- commits
8
- heading='### Features'
9
- message='(feature: )|(Feature: )'
10
- exclude='(fix: )|(Fix: )|(break: )|(Break: )'}}
11
- * {{subject}} ([`{{shorthash}}`]({{href}}))
12
- {{/commit-list}}
13
-
14
- {{! use fix: or Fix: }}
15
- {{#commit-list
16
- commits
17
- heading='### Fixes'
18
- message='(fix: )|(Fix: )'
19
- exclude='(break: )|(Break: )|(Feature: )|(feature: )'}}
20
- * {{subject}} ([`{{shorthash}}`]({{href}}))
21
- {{/commit-list}}
22
-
23
- {{! use add: or Add: }}
24
- {{#commit-list
25
- commits
26
- heading='### Added'
27
- message='(add: )|(Add: )'
28
- exclude='(break: )|(Break: )|(Feature: )|(feature: )'}}
29
- * {{subject}} ([`{{shorthash}}`]({{href}}))
30
- {{/commit-list}}
31
-
32
- {{! user break: or Break: }}
33
- {{#commit-list
34
- commits
35
- heading='### Breaking changes'
36
- message='(break: )|(Break: )'
37
- exclude='(fix: )|(Fix: )|(Feature: )|(feature: )'}}
38
- * {{subject}} ([`{{shorthash}}`]({{href}}))
5
+ {{#commit-list commits heading='### Commits'}}
6
+ - {{subject}} {{#if href}}[`{{shorthash}}`]({{href}}){{/if}}
39
7
  {{/commit-list}}
40
8
 
41
9
  {{/each}}
10
+
@@ -54,7 +54,7 @@ class Payment {
54
54
  this.updated_at = payment.updated_at;
55
55
  }
56
56
  get disputedStatus() {
57
- const lost = this.disputes.some((dispute) => dispute.status === PaymentDisputedStatuses.lost);
57
+ const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);
58
58
  // if a dispute is 'won', we don't show a dispute status, just general status
59
59
  if (!this.disputed) {
60
60
  return null;