@justifi/webcomponents 4.0.0 → 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 (91) hide show
  1. package/CHANGELOG.md +26 -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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +5 -8
  42. package/dist/collection/components/payments-list/payments-list.js +4 -4
  43. package/dist/collection/components/select-input/select-input.js +3 -4
  44. package/dist/collection/components/text-input/text-input.js +2 -3
  45. package/dist/collection/utils/utils.js +1 -5
  46. package/dist/components/Payment.js +1 -1
  47. package/dist/components/billing-form.js +4 -2093
  48. package/dist/components/index.d.ts +1 -0
  49. package/dist/components/index.js +1 -0
  50. package/dist/components/justifi-bank-account-form.js +2 -2
  51. package/dist/components/justifi-business-address.d.ts +11 -0
  52. package/dist/components/justifi-business-address.js +96 -0
  53. package/dist/components/justifi-card-form.js +2 -2
  54. package/dist/components/justifi-payment-form.js +3 -3
  55. package/dist/components/justifi-payments-list.js +8 -8
  56. package/dist/components/payment-method-form.js +14 -14
  57. package/dist/components/payment-method-selector.js +3 -4
  58. package/dist/components/select-input2.js +1 -2
  59. package/dist/components/state-options.js +2088 -0
  60. package/dist/components/text-input2.js +1 -2
  61. package/dist/esm/{Payment-3f7570a8.js → Payment-c86e1e84.js} +1 -1
  62. package/dist/esm/index.esm-c6a89005.js +2088 -0
  63. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  64. package/dist/esm/justifi-billing-form_2.entry.js +7 -2097
  65. package/dist/esm/justifi-business-address.entry.js +62 -0
  66. package/dist/esm/justifi-card-form.entry.js +2 -2
  67. package/dist/esm/justifi-payment-form.entry.js +4 -4
  68. package/dist/esm/justifi-payment-method-form.entry.js +14 -14
  69. package/dist/esm/justifi-payments-list.entry.js +9 -9
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/esm/select-input_2.entry.js +2 -4
  72. package/dist/esm/webcomponents.js +1 -1
  73. package/dist/types/components/bank-account-form/bank-account-form.d.ts +5 -5
  74. package/dist/types/components/billing-form/billing-form.d.ts +5 -0
  75. package/dist/types/components/business-address/business-address-schema.d.ts +23 -0
  76. package/dist/types/components/business-address/business-address.d.ts +11 -0
  77. package/dist/types/components/card-form/card-form.d.ts +5 -5
  78. package/dist/types/components/payment-method-form/get-computed-theme.d.ts +1 -1
  79. package/dist/types/components.d.ts +19 -4
  80. package/dist/webcomponents/p-039e3540.entry.js +1 -0
  81. package/dist/webcomponents/{p-64b19598.entry.js → p-11e5bef9.entry.js} +1 -1
  82. package/dist/webcomponents/p-20732337.js +1 -0
  83. package/dist/webcomponents/p-5b5e8351.entry.js +1 -0
  84. package/dist/webcomponents/{p-bf40b1ca.entry.js → p-7747c086.entry.js} +1 -1
  85. package/dist/webcomponents/{p-48bd3d00.entry.js → p-b061da77.entry.js} +1 -1
  86. package/dist/webcomponents/webcomponents.css +1 -1
  87. package/dist/webcomponents/webcomponents.esm.js +1 -1
  88. package/package.json +8 -5
  89. package/readme.md +7 -3
  90. package/dist/webcomponents/p-2530278e.entry.js +0 -1
  91. /package/dist/webcomponents/{p-21e020a8.js → p-1ca0646b.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,54 +5,66 @@ All notable changes to this project will be documented in this file. Dates are d
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
7
  #### 4.0.0
8
+
8
9
  > 08 May 2023
9
10
 
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
11
12
 
12
13
  Migration notes:
14
+
13
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`)
14
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
15
17
 
16
18
  #### 3.3.5
19
+
17
20
  > 11 May 2023
18
21
 
19
22
  - Add `:active` state to Submit button for `PaymentForm`
20
23
 
21
24
  #### 3.2.5
25
+
22
26
  > 11 May 2023
23
27
 
24
28
  - Add styling and variables for radio buttons and submit button in `PaymentForm`
29
+
25
30
  #### 3.1.5
31
+
26
32
  > 04 May 2023
27
33
 
28
34
  - Add missing dependencies.
29
35
 
30
36
  #### 3.1.4
37
+
31
38
  > 04 May 2023
32
39
 
33
40
  - Fix missing url to show recently added introduction page.
34
41
 
35
42
  #### 3.0.4
43
+
36
44
  > 08 May 2023
37
45
 
38
46
  - Add Storybook landing page with general info
39
47
 
40
48
  #### 3.0.3
49
+
41
50
  > 04 May 2023
42
51
 
43
- - 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
44
53
 
45
54
  #### 3.0.2
55
+
46
56
  > 04 May 2023
47
57
 
48
58
  - Fix output pointing to empty file for stencil dist.
49
59
 
50
60
  #### 3.0.1
61
+
51
62
  > 3 May 2023
52
63
 
53
64
  - Fix type error where `contentWindow` is `undefined`
54
65
 
55
66
  #### 3.0.0
67
+
56
68
  > 27 April 2023
57
69
 
58
70
  - Remove `submit` method
@@ -60,18 +72,22 @@ Migration notes:
60
72
  - Add `submitted` event and emit when form is submitted and a response comes back from payment methods endpoint
61
73
 
62
74
  #### 2.0.2
75
+
63
76
  > 25 April 2023
77
+
64
78
  - Improved documentation for `BankAccountForm`
65
79
  - Improved documentation for `CardForm`
66
80
  - Fix how controls and props are displayed and work for `CardForm`
67
81
 
68
82
  #### 2.0.1
83
+
69
84
  > 24 April 2023
70
85
 
71
86
  - Fix: PaymentForm submit action in storybook
72
87
  - Fix: include input-invalid css parts, and export them
73
88
 
74
89
  #### 2.0.0
90
+
75
91
  > 24 April 2023
76
92
 
77
93
  - Remove prop `styleOverrides` from `CardForm`, `BankAccountForm` and `PaymentMethodForm` components
@@ -79,19 +95,21 @@ Migration notes:
79
95
  - Add CSS `part` and `exportparts` to `TextInput` and `SelectInput`
80
96
  - Add `exportparts` to `BillingForm` so that `TextInput` and `SelectInput` CSS `exportparts` are forwarded
81
97
 
82
-
83
98
  #### 1.0.0
99
+
84
100
  > 24 April 2023
85
101
 
86
102
  - Fix broken prop controller in Storybook UI for card-form component
87
103
  - rename variable `validationStrategy` and prop `validation-strategy` to `validationMode` and `validation-mode` respectively
88
104
 
89
105
  #### 0.6.1
106
+
90
107
  > 24 April 2023
91
108
 
92
109
  - Remove hardcoded `iframeOrigin` from `PaymentForm` story
93
110
 
94
111
  #### 0.6.0
112
+
95
113
  > 21 April 2023
96
114
 
97
115
  - Add `@stencil/sass` plugin `stencil-library`
@@ -99,26 +117,32 @@ Migration notes:
99
117
  - Add Bootstrap styling to `TextInput`, `SelectInput`, `BillingForm`, `PaymentForm`, and `PaymentMethodSelector`
100
118
 
101
119
  #### 0.5.0
120
+
102
121
  > 21 April 2023
122
+
103
123
  - Allow `singleLine` to be passed to `CardForm` to render a single-line variant of `CardForm`
104
124
 
105
125
  #### 0.4.0
126
+
106
127
  > 18 April 2023
107
128
 
108
129
  - Allow `legend` to be passed and conditionally rendered for `BillingForm`
109
130
 
110
131
  #### 0.3.2
132
+
111
133
  > 12 April 2023
112
134
 
113
135
  - Add `PaymentForm` component
114
136
  - Allow `iframeOrigin` to be passed to `PaymentForm`, `CardForm`, `BankAccountForm`, and `PaymentMethodForm`
115
137
 
116
138
  #### 0.2.2
139
+
117
140
  > 6 April 2023
118
141
 
119
142
  - Update documentation and documentation examples to use cdn.jsdelivr instead of unpkg
120
143
 
121
144
  #### 0.2.1
145
+
122
146
  > 28 March 2023
123
147
 
124
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;