@justifi/webcomponents 4.19.3-rc → 4.19.3-rc-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.
- package/dist/cjs/{Analytics-57e3b5a8.js → Analytics-adc90fc6.js} +1 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +2 -1
- package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +4 -1
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
- package/dist/cjs/{package-97b9c902.js → package-22d30c5d.js} +1 -1
- package/dist/collection/components/checkout/checkout-core.js +2 -1
- package/dist/collection/components/checkout/new-payment-method.js +4 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-7cb9826b.js → Analytics-a8eb7344.js} +1 -1
- package/dist/esm/justifi-bank-account-form.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +2 -2
- package/dist/esm/justifi-card-form.entry.js +2 -2
- package/dist/esm/justifi-checkout-core.entry.js +2 -1
- package/dist/esm/justifi-checkout.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-new-payment-method_4.entry.js +4 -1
- package/dist/esm/justifi-payment-details.entry.js +2 -2
- package/dist/esm/justifi-payment-form.entry.js +2 -2
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +2 -2
- package/dist/esm/justifi-payout-details.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
- package/dist/esm/{package-93884871.js → package-ccb774a9.js} +1 -1
- package/dist/module/checkout-core.js +2 -1
- package/dist/module/new-payment-method.js +4 -1
- package/dist/module/package.js +1 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-01a404ca.entry.js +44 -0
- package/dist/webcomponents/p-03d35880.entry.js +130 -0
- package/dist/webcomponents/p-06ff0429.entry.js +65 -0
- package/dist/webcomponents/p-08b0fb31.js +41 -1
- package/dist/webcomponents/p-0e1bc91e.js +28 -1
- package/dist/webcomponents/p-10875f3d.entry.js +97 -0
- package/dist/webcomponents/p-14c91ffd.js +20 -1
- package/dist/webcomponents/p-157acba8.entry.js +98 -0
- package/dist/webcomponents/p-15eafa87.js +77 -0
- package/dist/webcomponents/p-18fa0479.entry.js +131 -0
- package/dist/webcomponents/p-1a5120f4.entry.js +145 -0
- package/dist/webcomponents/p-1ad5995e.js +3599 -1
- package/dist/webcomponents/p-1ff8810b.js +29 -1
- package/dist/webcomponents/p-2338affa.js +213 -1
- package/dist/webcomponents/p-24dc023a.entry.js +791 -0
- package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
- package/dist/webcomponents/p-27d87fe2.entry.js +133 -0
- package/dist/webcomponents/p-29c0b182.js +114 -1
- package/dist/webcomponents/p-2b6c9c4f.js +7 -1
- package/dist/webcomponents/p-2e8f4937.js +79 -0
- package/dist/webcomponents/p-2eab3c90.js +3052 -1
- package/dist/webcomponents/p-3395e896.entry.js +74 -0
- package/dist/webcomponents/p-3fd13ca3.js +52 -1
- package/dist/webcomponents/p-47d79529.js +18 -1
- package/dist/webcomponents/p-525db3e8.js +22 -1
- package/dist/webcomponents/p-53ecc8b9.entry.js +261 -0
- package/dist/webcomponents/p-5482d030.entry.js +21 -0
- package/dist/webcomponents/p-56f6ce4c.js +10 -1
- package/dist/webcomponents/p-576826b1.entry.js +43 -0
- package/dist/webcomponents/p-5968ff8a.js +178 -1
- package/dist/webcomponents/p-5f835b89.entry.js +606 -0
- package/dist/webcomponents/p-6078a370.js +244 -1
- package/dist/webcomponents/p-6124b1b3.entry.js +80 -0
- package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
- package/dist/webcomponents/p-7582b554.entry.js +18 -0
- package/dist/webcomponents/p-75fd6367.entry.js +149 -0
- package/dist/webcomponents/p-79646550.entry.js +61 -0
- package/dist/webcomponents/p-7d85af5c.js +16 -1
- package/dist/webcomponents/p-800d31fe.entry.js +162 -0
- package/dist/webcomponents/p-8115b2f4.js +28 -1
- package/dist/webcomponents/p-83125497.js +4027 -1
- package/dist/webcomponents/p-85fc69e5.js +90 -1
- package/dist/webcomponents/p-89887332.js +301 -1
- package/dist/webcomponents/p-8df7bde8.js +27 -1
- package/dist/webcomponents/p-8eb774df.entry.js +54 -0
- package/dist/webcomponents/p-9c9c7dac.js +24 -1
- package/dist/webcomponents/p-9e17630d.entry.js +1684 -0
- package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
- package/dist/webcomponents/p-a4e8573e.entry.js +94 -0
- package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
- package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
- package/dist/webcomponents/p-ab4816e1.entry.js +117 -0
- package/dist/webcomponents/p-ac086069.entry.js +58 -0
- package/dist/webcomponents/p-af244664.js +126 -1
- package/dist/webcomponents/p-b4b8b531.js +44 -1
- package/dist/webcomponents/p-b82c146f.entry.js +111 -0
- package/dist/webcomponents/p-ba4bae6f.js +12 -1
- package/dist/webcomponents/p-ba5fae28.js +90 -1
- package/dist/webcomponents/p-bd66f9d2.entry.js +101 -0
- package/dist/webcomponents/p-cc39384f.entry.js +99 -0
- package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
- package/dist/webcomponents/p-d89bad72.js +39 -1
- package/dist/webcomponents/p-dad3e069.entry.js +298 -0
- package/dist/webcomponents/p-dce846bf.js +27 -1
- package/dist/webcomponents/p-df21aaad.js +120 -1
- package/dist/webcomponents/p-e1255160.js +3 -1
- package/dist/webcomponents/p-e1e7525b.entry.js +73 -0
- package/dist/webcomponents/p-e333620e.js +34 -1
- package/dist/webcomponents/p-e356f280.entry.js +29 -0
- package/dist/webcomponents/p-e3fab0e2.js +43 -1
- package/dist/webcomponents/p-e9a5cb95.entry.js +94 -0
- package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
- package/dist/webcomponents/p-edc37d1f.entry.js +75 -0
- package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
- package/dist/webcomponents/p-fad19d75.js +1638 -2
- package/dist/webcomponents/webcomponents.css +362 -4
- package/dist/webcomponents/webcomponents.esm.js +20 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-03419b17.js +0 -1
- package/dist/webcomponents/p-07109641.entry.js +0 -1
- package/dist/webcomponents/p-0bbe1f1c.entry.js +0 -1
- package/dist/webcomponents/p-0cd89142.entry.js +0 -1
- package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
- package/dist/webcomponents/p-16887e04.entry.js +0 -1
- package/dist/webcomponents/p-17baca7d.entry.js +0 -1
- package/dist/webcomponents/p-17e4246f.entry.js +0 -1
- package/dist/webcomponents/p-1a43e355.entry.js +0 -19
- package/dist/webcomponents/p-1f761d16.entry.js +0 -1
- package/dist/webcomponents/p-276cc368.entry.js +0 -1
- package/dist/webcomponents/p-30a493cd.entry.js +0 -1
- package/dist/webcomponents/p-32211b2f.entry.js +0 -1
- package/dist/webcomponents/p-3352353a.entry.js +0 -1
- package/dist/webcomponents/p-462dc522.entry.js +0 -1
- package/dist/webcomponents/p-487b72a8.entry.js +0 -1
- package/dist/webcomponents/p-4a485cce.js +0 -1
- package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
- package/dist/webcomponents/p-4c849993.entry.js +0 -1
- package/dist/webcomponents/p-52021fa1.entry.js +0 -1
- package/dist/webcomponents/p-53e64f15.entry.js +0 -1
- package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
- package/dist/webcomponents/p-83876625.entry.js +0 -1
- package/dist/webcomponents/p-8e541a32.entry.js +0 -1
- package/dist/webcomponents/p-97272668.entry.js +0 -1
- package/dist/webcomponents/p-b1257354.entry.js +0 -1
- package/dist/webcomponents/p-b29f5084.entry.js +0 -1
- package/dist/webcomponents/p-babd56c3.entry.js +0 -1
- package/dist/webcomponents/p-bbed6107.entry.js +0 -1
- package/dist/webcomponents/p-be39c802.entry.js +0 -1
- package/dist/webcomponents/p-c607f049.entry.js +0 -1
- package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
- package/dist/webcomponents/p-cd37a87e.entry.js +0 -1
- package/dist/webcomponents/p-cff82e78.entry.js +0 -1
- package/dist/webcomponents/p-d8355f91.entry.js +0 -1
- package/dist/webcomponents/p-e2c88817.entry.js +0 -1
- package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
- package/dist/webcomponents/p-f0866375.entry.js +0 -1
- package/dist/webcomponents/p-f117d1d1.entry.js +0 -1
- package/dist/webcomponents/p-f883bf32.entry.js +0 -1
- package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
- package/dist/webcomponents/p-fe33151d.entry.js +0 -1
|
@@ -1 +1,244 @@
|
|
|
1
|
-
const
|
|
1
|
+
const StateOptions = [
|
|
2
|
+
{
|
|
3
|
+
label: 'Choose state',
|
|
4
|
+
value: '',
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
label: 'Alabama',
|
|
8
|
+
value: 'AL',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: 'Alaska',
|
|
12
|
+
value: 'AK',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: 'American Samoa',
|
|
16
|
+
value: 'AS',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'Arizona',
|
|
20
|
+
value: 'AZ',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Arkansas',
|
|
24
|
+
value: 'AR',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'California',
|
|
28
|
+
value: 'CA',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'Colorado',
|
|
32
|
+
value: 'CO',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Connecticut',
|
|
36
|
+
value: 'CT',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: 'Delaware',
|
|
40
|
+
value: 'DE',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'District Of Columbia',
|
|
44
|
+
value: 'DC',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Federated States Of Micronesia',
|
|
48
|
+
value: 'FM',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: 'Florida',
|
|
52
|
+
value: 'FL',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: 'Georgia',
|
|
56
|
+
value: 'GA',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: 'Guam',
|
|
60
|
+
value: 'GU',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: 'Hawaii',
|
|
64
|
+
value: 'HI',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Idaho',
|
|
68
|
+
value: 'ID',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: 'Illinois',
|
|
72
|
+
value: 'IL',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: 'Indiana',
|
|
76
|
+
value: 'IN',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Iowa',
|
|
80
|
+
value: 'IA',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'Kansas',
|
|
84
|
+
value: 'KS',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: 'Kentucky',
|
|
88
|
+
value: 'KY',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: 'Louisiana',
|
|
92
|
+
value: 'LA',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: 'Maine',
|
|
96
|
+
value: 'ME',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'Marshall Islands',
|
|
100
|
+
value: 'MH',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'Maryland',
|
|
104
|
+
value: 'MD',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Massachusetts',
|
|
108
|
+
value: 'MA',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: 'Michigan',
|
|
112
|
+
value: 'MI',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: 'Minnesota',
|
|
116
|
+
value: 'MN',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: 'Mississippi',
|
|
120
|
+
value: 'MS',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: 'Missouri',
|
|
124
|
+
value: 'MO',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: 'Montana',
|
|
128
|
+
value: 'MT',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: 'Nebraska',
|
|
132
|
+
value: 'NE',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: 'Nevada',
|
|
136
|
+
value: 'NV',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: 'New Hampshire',
|
|
140
|
+
value: 'NH',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: 'New Jersey',
|
|
144
|
+
value: 'NJ',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: 'New Mexico',
|
|
148
|
+
value: 'NM',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: 'New York',
|
|
152
|
+
value: 'NY',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: 'North Carolina',
|
|
156
|
+
value: 'NC',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: 'North Dakota',
|
|
160
|
+
value: 'ND',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: 'Northern Mariana Islands',
|
|
164
|
+
value: 'MP',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: 'Ohio',
|
|
168
|
+
value: 'OH',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: 'Oklahoma',
|
|
172
|
+
value: 'OK',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: 'Oregon',
|
|
176
|
+
value: 'OR',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: 'Palau',
|
|
180
|
+
value: 'PW',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
label: 'Pennsylvania',
|
|
184
|
+
value: 'PA',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
label: 'Puerto Rico',
|
|
188
|
+
value: 'PR',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
label: 'Rhode Island',
|
|
192
|
+
value: 'RI',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'South Carolina',
|
|
196
|
+
value: 'SC',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
label: 'South Dakota',
|
|
200
|
+
value: 'SD',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
label: 'Tennessee',
|
|
204
|
+
value: 'TN',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'Texas',
|
|
208
|
+
value: 'TX',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
label: 'Utah',
|
|
212
|
+
value: 'UT',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: 'Vermont',
|
|
216
|
+
value: 'VT',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
label: 'Virgin Islands',
|
|
220
|
+
value: 'VI',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: 'Virginia',
|
|
224
|
+
value: 'VA',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: 'Washington',
|
|
228
|
+
value: 'WA',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
label: 'West Virginia',
|
|
232
|
+
value: 'WV',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
label: 'Wisconsin',
|
|
236
|
+
value: 'WI',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
label: 'Wyoming',
|
|
240
|
+
value: 'WY',
|
|
241
|
+
},
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
export { StateOptions as S };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
|
|
2
|
+
import { E as ErrorState } from './p-dce846bf.js';
|
|
3
|
+
import { B as BusinessService } from './p-0e1bc91e.js';
|
|
4
|
+
import { B as Business } from './p-af244664.js';
|
|
5
|
+
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
|
|
6
|
+
import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
|
|
7
|
+
import { J as JustifiAnalytics } from './p-15eafa87.js';
|
|
8
|
+
import './p-29c0b182.js';
|
|
9
|
+
import './p-1ff8810b.js';
|
|
10
|
+
import './p-6078a370.js';
|
|
11
|
+
import './p-2e8f4937.js';
|
|
12
|
+
|
|
13
|
+
const makeGetBusiness = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
14
|
+
var _a;
|
|
15
|
+
try {
|
|
16
|
+
const response = await service.fetchBusiness(id, authToken);
|
|
17
|
+
if (!response.error) {
|
|
18
|
+
onSuccess({ business: new Business(response.data) });
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const responseError = getErrorMessage(response.error);
|
|
22
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
23
|
+
return onError({
|
|
24
|
+
error: responseError,
|
|
25
|
+
code,
|
|
26
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
32
|
+
return onError({
|
|
33
|
+
error: error.message || error,
|
|
34
|
+
code,
|
|
35
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const BusinessDetails = class {
|
|
41
|
+
constructor(hostRef) {
|
|
42
|
+
registerInstance(this, hostRef);
|
|
43
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
44
|
+
this.businessId = undefined;
|
|
45
|
+
this.authToken = undefined;
|
|
46
|
+
this.errorMessage = undefined;
|
|
47
|
+
this.getBusiness = undefined;
|
|
48
|
+
}
|
|
49
|
+
componentWillLoad() {
|
|
50
|
+
this.analytics = new JustifiAnalytics(this);
|
|
51
|
+
this.initializeGetBusiness();
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
this.analytics.cleanup();
|
|
55
|
+
}
|
|
56
|
+
initializeGetBusiness() {
|
|
57
|
+
if (!this.businessId || !this.authToken) {
|
|
58
|
+
this.errorMessage = 'Invalid business id or auth token';
|
|
59
|
+
this.errorEvent.emit({
|
|
60
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
61
|
+
message: this.errorMessage,
|
|
62
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
63
|
+
});
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.getBusiness = makeGetBusiness({
|
|
67
|
+
id: this.businessId,
|
|
68
|
+
authToken: this.authToken,
|
|
69
|
+
service: new BusinessService(),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
if (this.errorMessage) {
|
|
74
|
+
return h(Host, null, ErrorState(this.errorMessage));
|
|
75
|
+
}
|
|
76
|
+
return (h(Host, null, h("business-details-core", { getBusiness: this.getBusiness })));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { BusinessDetails as justifi_business_details };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { r as registerInstance, h, c as createEvent } from './p-fad19d75.js';
|
|
2
|
+
import { c as create$3, F as FormController } from './p-2eab3c90.js';
|
|
3
|
+
import { i as identityNameValidation, l as lineOneValidation, a as lineTwoValidation, c as cityValidation, s as stateValidation, p as postalValidation } from './p-89887332.js';
|
|
4
|
+
import { S as StateOptions } from './p-6078a370.js';
|
|
5
|
+
import { n as numberOnlyHandler } from './p-8df7bde8.js';
|
|
6
|
+
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
7
|
+
import './p-ba5fae28.js';
|
|
8
|
+
import './p-af244664.js';
|
|
9
|
+
import './p-1ff8810b.js';
|
|
10
|
+
|
|
11
|
+
const BillingFormSchema = create$3({
|
|
12
|
+
name: identityNameValidation.required('Enter full name'),
|
|
13
|
+
address_line1: lineOneValidation.required('Enter street address'),
|
|
14
|
+
address_line2: lineTwoValidation.nullable(),
|
|
15
|
+
address_city: cityValidation.required('Enter city'),
|
|
16
|
+
address_state: stateValidation.required('Select state'),
|
|
17
|
+
address_postal_code: postalValidation.required('Enter postal code'),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const billingFormCss = ":host{display:block}justifi-billing-form{margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}";
|
|
21
|
+
const JustifiBillingFormStyle0 = billingFormCss;
|
|
22
|
+
|
|
23
|
+
const BillingForm = class {
|
|
24
|
+
constructor(hostRef) {
|
|
25
|
+
registerInstance(this, hostRef);
|
|
26
|
+
this.inputHandler = (name, value) => {
|
|
27
|
+
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
28
|
+
};
|
|
29
|
+
this.legend = undefined;
|
|
30
|
+
this.formController = undefined;
|
|
31
|
+
this.billingInfo = undefined;
|
|
32
|
+
this.errors = {};
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.formController = new FormController(BillingFormSchema);
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
this.formController.values.subscribe(values => this.billingInfo = Object.assign({}, values));
|
|
39
|
+
this.formController.errors.subscribe(errors => {
|
|
40
|
+
this.errors = Object.assign({}, errors);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async getValues() {
|
|
44
|
+
return this.formController.values.getValue();
|
|
45
|
+
}
|
|
46
|
+
async fill(fields) {
|
|
47
|
+
this.formController.setInitialValues(fields);
|
|
48
|
+
}
|
|
49
|
+
async validate() {
|
|
50
|
+
let isValid = await this.formController.validate();
|
|
51
|
+
return { isValid: isValid };
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const billingFormDefaultValue = this.formController.getInitialValues();
|
|
55
|
+
return (h(StyledHost, { key: 'b08094d3c44d35cdb3c21b4bc360dbbee19d7d15', exportparts: "label,input,input-invalid" }, h("form", { key: '392538a781ffa2ac299cbc4203bab5efd10e77cc' }, h("fieldset", { key: 'f4b5a5ec9a91e9f50a3847c5eb16635c4f9d569a' }, this.legend && h("legend", { key: 'eb75e22f9df33c13e3851ece784d237b8973e2c5' }, this.legend), h("div", { key: 'd7ffdc1cfeda5568ad003a4d3bbe94765de04605', class: "row gy-3" }, h("div", { key: 'c22f9e7b2f33b5c298bb5f0a5c7bcaa709c231a0', class: "col-12" }, h("form-control-text", { key: 'd6eb4d2f4d1a2a709e0f29bf18b5d9700bd91a13', name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: '8494ee3c14f8923d18d8708077e030c2f141a251', class: "col-12" }, h("form-control-text", { key: '63266eb0e2b2b006a3c914a68703ee1cdf848f83', name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), h("div", { key: '0a19fcf5c172d2539f23e147f39461d84dfd9d37', class: "col-12" }, h("form-control-text", { key: '0e5fae5d65d5ea195de0227d1e4f79cee7c7a0fb', name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), h("div", { key: '13104554e8247cb0534c3dc9e6a16b2f44397795', class: "col-12" }, h("form-control-text", { key: '430e59713ec66ff7a6f735ca24640c27b05cbeee', name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), h("div", { key: '5b81499717f67d5f499f4ebfc585056ef5bd3d56', class: "col-12" }, h("form-control-select", { key: '726c724eda5f25a92bad7e549ff7845ece7b41e1', name: 'address_state', label: 'State', options: StateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), h("div", { key: '5d5a6e0949c5ad93da5bc1837dadf88c2128212d', class: "col-12" }, h("form-control-text", { key: 'ebb4e77126d86011d9a1ed5d118461198b399092', name: 'address_postal_code', label: "ZIP", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength: 5, keyDownHandler: numberOnlyHandler })))))));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
BillingForm.style = JustifiBillingFormStyle0;
|
|
59
|
+
|
|
60
|
+
const SaveNewPaymentMethod = class {
|
|
61
|
+
constructor(hostRef) {
|
|
62
|
+
registerInstance(this, hostRef);
|
|
63
|
+
this.checkboxChanged = createEvent(this, "checkboxChanged", 7);
|
|
64
|
+
this.isChecked = false;
|
|
65
|
+
}
|
|
66
|
+
handleCheckboxChange(event) {
|
|
67
|
+
const target = event.target;
|
|
68
|
+
this.isChecked = target.checked;
|
|
69
|
+
this.checkboxChanged.emit(this.isChecked);
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
return (h("div", { key: 'f22a132a518a98786c8486e08c9a65050f3c5ea0', class: "mt-4 form-check" }, h("input", { key: '6f1392f9dd29a9761f5942b0a40e05a899858ada', type: "checkbox", checked: this.isChecked, onChange: (event) => this.handleCheckboxChange(event), class: "form-check-input" }), h("label", { key: 'e6e5908ba70ece8ea19370a04104d88d17237fc7', class: "form-check-label" }, "Save new payment method")));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { BillingForm as justifi_billing_form, SaveNewPaymentMethod as justifi_save_new_payment_method };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './p-fad19d75.js';
|
|
2
|
+
import { E as ErrorState } from './p-dce846bf.js';
|
|
3
|
+
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
4
|
+
|
|
5
|
+
const Details = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.errorMessage = undefined;
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(StyledHost, { key: '00b10fc4e459688ae06147ef1535f03609ec35e4', exportParts: 'detail-empty-state, detail-metadata-title, detail-metadata, detail-section, detail-section-title, \n detail-section-item-title, detail-section-item-data, detail-head, detail-title, detail-head-info' }, this.errorMessage ?
|
|
12
|
+
ErrorState(this.errorMessage)
|
|
13
|
+
:
|
|
14
|
+
h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' }))));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { Details as justifi_details };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { f as formatCurrency } from './p-83125497.js';
|
|
3
|
+
import { C as ComponentErrorSeverity } from './p-14c91ffd.js';
|
|
4
|
+
import { i as insuranceValuesOn, v as validateInsuranceValues, a as insuranceValues } from './p-2338affa.js';
|
|
5
|
+
import { B as Button } from './p-9c9c7dac.js';
|
|
6
|
+
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
7
|
+
import { S as Skeleton } from './p-08b0fb31.js';
|
|
8
|
+
|
|
9
|
+
class Checkout {
|
|
10
|
+
constructor(data) {
|
|
11
|
+
Object.assign(this, data);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const checkoutCoreCss = ":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}.jfi-checkout-core{color:var(--jfi-body-color)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}*::part(invalid-feedback){color:var(--jfi-error-message-color);font-size:var(--jfi-error-message-font-size);margin:var(--jfi-error-message-margin);line-height:normal}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow);line-height:var(--jfi-submit-button-line-height);text-transform:var(--jfi-submit-button-text-transform)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";
|
|
16
|
+
const JustifiCheckoutCoreStyle0 = checkoutCoreCss;
|
|
17
|
+
|
|
18
|
+
const headerCss = ".jfi-header{color:var(--jfi-header-color);border-bottom:var(--jfi-header-border)}";
|
|
19
|
+
const JustifiCheckoutCoreStyle1 = headerCss;
|
|
20
|
+
|
|
21
|
+
const CheckoutCore = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
registerInstance(this, hostRef);
|
|
24
|
+
this.submitted = createEvent(this, "submitted", 7);
|
|
25
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
26
|
+
this.loaded = createEvent(this, "loaded", 7);
|
|
27
|
+
this.completeCheckout = async (payment) => {
|
|
28
|
+
this.complete({
|
|
29
|
+
payment,
|
|
30
|
+
onSuccess: this.onSubmitted,
|
|
31
|
+
onError: this.onError,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
this.onSubmitted = (data) => {
|
|
35
|
+
this.submitted.emit(data);
|
|
36
|
+
this.renderState = 'success';
|
|
37
|
+
};
|
|
38
|
+
this.onError = ({ error, code, severity }) => {
|
|
39
|
+
this.serverError = error;
|
|
40
|
+
this.errorEvent.emit({
|
|
41
|
+
errorCode: code,
|
|
42
|
+
message: error,
|
|
43
|
+
severity,
|
|
44
|
+
});
|
|
45
|
+
this.renderState = 'error';
|
|
46
|
+
};
|
|
47
|
+
this.iframeOrigin = "";
|
|
48
|
+
this.authToken = undefined;
|
|
49
|
+
this.getCheckout = undefined;
|
|
50
|
+
this.complete = undefined;
|
|
51
|
+
this.checkoutId = undefined;
|
|
52
|
+
this.disableCreditCard = undefined;
|
|
53
|
+
this.disableBankAccount = undefined;
|
|
54
|
+
this.disableBnpl = undefined;
|
|
55
|
+
this.disablePaymentMethodGroup = undefined;
|
|
56
|
+
this.hasLoadedFonts = false;
|
|
57
|
+
this.checkout = undefined;
|
|
58
|
+
this.serverError = undefined;
|
|
59
|
+
this.renderState = 'loading';
|
|
60
|
+
this.creatingNewPaymentMethod = false;
|
|
61
|
+
this.insuranceToggled = false;
|
|
62
|
+
}
|
|
63
|
+
async fillBillingForm(fields) {
|
|
64
|
+
this.paymentMethodOptionsRef.fillBillingForm(fields);
|
|
65
|
+
}
|
|
66
|
+
componentWillLoad() {
|
|
67
|
+
console.log('CheckoutCore: componentWillLoad iframeOrigin', this, this.iframeOrigin);
|
|
68
|
+
if (this.getCheckout) {
|
|
69
|
+
this.fetchData();
|
|
70
|
+
// Refresh the checkout data when insurance is added or removed
|
|
71
|
+
insuranceValuesOn('set', (key) => {
|
|
72
|
+
const value = insuranceValues[key];
|
|
73
|
+
if (value !== undefined) {
|
|
74
|
+
this.insuranceToggled = value;
|
|
75
|
+
this.fetchData();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
fetchData() {
|
|
81
|
+
this.renderState = 'loading';
|
|
82
|
+
this.getCheckout({
|
|
83
|
+
onSuccess: ({ checkout }) => {
|
|
84
|
+
this.checkout = new Checkout(checkout);
|
|
85
|
+
const { status } = this.checkout;
|
|
86
|
+
this.loaded.emit({ checkout_status: status });
|
|
87
|
+
this.renderState = 'success';
|
|
88
|
+
},
|
|
89
|
+
onError: ({ error, code, severity }) => {
|
|
90
|
+
this.serverError = error;
|
|
91
|
+
this.renderState = 'error';
|
|
92
|
+
this.errorEvent.emit({
|
|
93
|
+
errorCode: code,
|
|
94
|
+
message: error,
|
|
95
|
+
severity,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
;
|
|
101
|
+
async submit(event) {
|
|
102
|
+
var _a;
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
this.renderState = 'loading';
|
|
105
|
+
const insuranceValidation = validateInsuranceValues();
|
|
106
|
+
const payload = await this.paymentMethodOptionsRef.resolvePaymentMethod(insuranceValidation);
|
|
107
|
+
if (payload.validationError) {
|
|
108
|
+
this.renderState = 'error';
|
|
109
|
+
}
|
|
110
|
+
else if (payload.error) {
|
|
111
|
+
this.renderState = 'error';
|
|
112
|
+
this.serverError = payload.error.message;
|
|
113
|
+
this.onError({
|
|
114
|
+
code: payload.error.code,
|
|
115
|
+
error: payload.error.message,
|
|
116
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
else if (payload.token) {
|
|
120
|
+
this.completeCheckout({ payment_mode: 'ecom', payment_token: payload.token });
|
|
121
|
+
}
|
|
122
|
+
else if (((_a = payload.bnpl) === null || _a === void 0 ? void 0 : _a.status) === 'success') {
|
|
123
|
+
this.completeCheckout({ payment_mode: 'bnpl' });
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.renderState = 'error';
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
get isLoading() {
|
|
130
|
+
return this.renderState === 'loading';
|
|
131
|
+
}
|
|
132
|
+
get isError() {
|
|
133
|
+
return this.renderState === 'error';
|
|
134
|
+
}
|
|
135
|
+
get paymentType() {
|
|
136
|
+
var _a, _b, _c, _d, _e;
|
|
137
|
+
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { variant: "rounded", height: "300px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": !this.disableCreditCard, "show-ach": !this.disableBankAccount, "show-bnpl": !this.disableBnpl, paymentMethodGroupId: (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_method_group_id, "show-saved-payment-methods": !this.disablePaymentMethodGroup, bnpl: (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.bnpl, authToken: this.authToken, "account-id": (_c = this.checkout) === null || _c === void 0 ? void 0 : _c.account_id, savedPaymentMethods: ((_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_methods) || [], paymentAmount: (_e = this.checkout) === null || _e === void 0 ? void 0 : _e.payment_amount, insuranceToggled: this.insuranceToggled }))));
|
|
138
|
+
}
|
|
139
|
+
get summary() {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return (h(StyledHost, { key: '991ae6970e426028ace0d1e8327119bc197639b0' }, h("div", { key: '1e57ee21429b494240e644235a2d5815ced99d43', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '70023ce10dea6ff8d5bd8e30c7d474f774682c65', class: "col-12" }, h("h2", { key: '8b09b03c1998e4d60e174fefb3d196e48d50b84a', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: 'e3bbdaaaf010451a31fe9c60bdf81e89bdd142f2', class: "col-12" }, h("slot", { key: '442a01184960f42b5e1f6694798633d3e7219bf5', name: "insurance" })), h("div", { key: '716e26e3dc675e9d72a3a992b1cb212ce48ffb1a', class: "col-12 mt-4" }, h("h2", { key: '762cfc8549b20d16583d0fd8748bde8035042c00', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'f07d716a87f3e2bd44471f7e93f7af5f5d20440e', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '1156291dd748b90d64a08916ffb98c3123132175', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: 'a5bd142a1c72c5abb29338a2cf24c180119d4ea7', class: "col-12" }, h("div", { key: '5a94ed9d54fd3dd24cfe3e34c23ee3c4995eca6d', class: "d-flex justify-content-end" }, h(Button, { key: '7fce3940d8fe562aa7c23e38201b5d2924157288', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
CheckoutCore.style = JustifiCheckoutCoreStyle0 + JustifiCheckoutCoreStyle1;
|
|
148
|
+
|
|
149
|
+
export { CheckoutCore as justifi_checkout_core };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
|
|
2
|
+
import { I as IMask } from './p-1ad5995e.js';
|
|
3
|
+
import { C as CURRENCY_MASK } from './p-525db3e8.js';
|
|
4
|
+
|
|
5
|
+
const MonetaryInput = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
9
|
+
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
10
|
+
this.imask = null;
|
|
11
|
+
this.initializeIMask = () => {
|
|
12
|
+
if (!this.textInput)
|
|
13
|
+
return;
|
|
14
|
+
this.imask = IMask(this.textInput, this.maskOptions);
|
|
15
|
+
this.imask.on('accept', () => {
|
|
16
|
+
const rawValue = this.imask.unmaskedValue;
|
|
17
|
+
this.inputHandler(this.name, rawValue);
|
|
18
|
+
this.formControlInput.emit({ name: this.name, value: rawValue });
|
|
19
|
+
});
|
|
20
|
+
this.textInput.addEventListener('blur', () => this.formControlBlur.emit());
|
|
21
|
+
};
|
|
22
|
+
this.handleFormControlInput = (event) => {
|
|
23
|
+
const target = event.target;
|
|
24
|
+
const name = target.getAttribute('name');
|
|
25
|
+
const rawValue = this.imask.unmaskedValue;
|
|
26
|
+
this.formControlInput.emit({ name: name, value: rawValue });
|
|
27
|
+
};
|
|
28
|
+
this.updateInput = (newValue) => {
|
|
29
|
+
if (this.imask) {
|
|
30
|
+
this.imask.value = String(newValue);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.label = undefined;
|
|
34
|
+
this.name = undefined;
|
|
35
|
+
this.helpText = undefined;
|
|
36
|
+
this.errorText = undefined;
|
|
37
|
+
this.defaultValue = undefined;
|
|
38
|
+
this.inputHandler = undefined;
|
|
39
|
+
this.maskOptions = CURRENCY_MASK.DECIMAL;
|
|
40
|
+
this.disabled = undefined;
|
|
41
|
+
}
|
|
42
|
+
handleDefaultValueChange(newValue) {
|
|
43
|
+
this.updateInput(newValue);
|
|
44
|
+
}
|
|
45
|
+
componentDidLoad() {
|
|
46
|
+
this.initializeIMask();
|
|
47
|
+
this.updateInput(this.defaultValue);
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
var _a;
|
|
51
|
+
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return (h(Host, { key: '8797b3aa5c6a30f472d51e2b9437b6158b0566fc', exportparts: "label,input,input-group-input,input-group-text,input-invalid" }, h("div", { key: '0d3e068cf104aec3f6250f5cd6c00a9342928fe8', class: "form-group d-flex flex-column" }, h("label", { key: '0e86db7c0d981bdae74c51dd75bf5579d07b4793', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("div", { key: '8fc773de3995bb37e6fa00b34d8d9e2deaef4bbd', class: "input-group" }, h("span", { key: '83860eac764be9eeea31302d60525fb56af9dc1d', class: "input-group-text", part: "input-group-text" }, "$"), h("input", { key: 'b8c655c0b8eeb6ec328eeaed651773c293aa3100', ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input input-group-input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control monetary is-invalid' : 'form-control monetary', type: "text", disabled: this.disabled })), h("form-control-help-text", { key: 'b3f142b9c67a792a96b597bdaf91fd3abe1b7ce3', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'daefe97a15bde309c397a506de6cda9a0376323b', errorText: this.errorText, name: this.name }))));
|
|
55
|
+
}
|
|
56
|
+
static get watchers() { return {
|
|
57
|
+
"defaultValue": ["handleDefaultValueChange"]
|
|
58
|
+
}; }
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { MonetaryInput as form_control_monetary };
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{d as
|
|
1
|
+
import { d as deconstructDate } from './p-1ff8810b.js';
|
|
2
|
+
|
|
3
|
+
const updateFormValues = (formController, newValues) => {
|
|
4
|
+
formController.setValues(Object.assign(Object.assign({}, formController.values.getValue()), newValues));
|
|
5
|
+
};
|
|
6
|
+
const updateAddressFormValues = (formController, newValues) => {
|
|
7
|
+
updateFormValues(formController, {
|
|
8
|
+
address: Object.assign(Object.assign({}, formController.values.getValue().address), newValues),
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const updateDateOfBirthFormValues = (event, formController) => {
|
|
12
|
+
const dob_values = deconstructDate(event.detail);
|
|
13
|
+
updateFormValues(formController, Object.assign(Object.assign({}, formController.values.getValue()), { dob_day: dob_values.dob_day, dob_month: dob_values.dob_month, dob_year: dob_values.dob_year }));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { updateAddressFormValues as a, updateDateOfBirthFormValues as b, updateFormValues as u };
|