@justifi/webcomponents 4.0.5 → 4.2.0-rc.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 (268) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/Api-11362403.js +111 -0
  3. package/dist/cjs/Api-11362403.js.map +1 -0
  4. package/dist/cjs/Payment-ac4dea02.js +2 -0
  5. package/dist/cjs/Payment-ac4dea02.js.map +1 -0
  6. package/dist/cjs/{index-051b6dd0.js → index-34312a38.js} +185 -21
  7. package/dist/cjs/index-34312a38.js.map +1 -0
  8. package/dist/cjs/index.cjs.js +2 -0
  9. package/dist/cjs/index.cjs.js.map +1 -0
  10. package/dist/cjs/{index.esm-8df4906e.js → index.esm-bcf90c56.js} +2 -244
  11. package/dist/cjs/index.esm-bcf90c56.js.map +1 -0
  12. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +12 -1
  13. package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -0
  14. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +8 -5
  15. package/dist/cjs/justifi-billing-form_2.cjs.entry.js.map +1 -0
  16. package/dist/cjs/justifi-business-address.cjs.entry.js +7 -4
  17. package/dist/cjs/justifi-business-address.cjs.entry.js.map +1 -0
  18. package/dist/cjs/justifi-business-info.cjs.entry.js +174 -0
  19. package/dist/cjs/justifi-business-info.cjs.entry.js.map +1 -0
  20. package/dist/cjs/justifi-card-form.cjs.entry.js +12 -1
  21. package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -0
  22. package/dist/cjs/justifi-payment-form.cjs.entry.js +10 -4
  23. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -0
  24. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +15 -7
  25. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -0
  26. package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -108
  27. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -0
  28. package/dist/cjs/loader.cjs.js +6 -3
  29. package/dist/cjs/loader.cjs.js.map +1 -0
  30. package/dist/cjs/select-input_2.cjs.entry.js +5 -3
  31. package/dist/cjs/select-input_2.cjs.entry.js.map +1 -0
  32. package/dist/cjs/state-options-efeaa587.js +248 -0
  33. package/dist/cjs/state-options-efeaa587.js.map +1 -0
  34. package/dist/cjs/webcomponents.cjs.js +12 -3
  35. package/dist/cjs/webcomponents.cjs.js.map +1 -0
  36. package/dist/collection/api/Api.js +2 -1
  37. package/dist/collection/api/Api.js.map +1 -0
  38. package/dist/collection/api/Pagination.js +1 -0
  39. package/dist/collection/api/Pagination.js.map +1 -0
  40. package/dist/collection/api/Payment.js +1 -0
  41. package/dist/collection/api/Payment.js.map +1 -0
  42. package/dist/collection/api/index.js +1 -0
  43. package/dist/collection/api/index.js.map +1 -0
  44. package/dist/collection/api/mockData/MockPayments.js +1 -0
  45. package/dist/collection/api/mockData/MockPayments.js.map +1 -0
  46. package/dist/collection/collection-manifest.json +4 -3
  47. package/dist/collection/components/bank-account-form/bank-account-form.js +26 -0
  48. package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -0
  49. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +11 -1
  50. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -0
  51. package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js +14 -0
  52. package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js.map +1 -0
  53. package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js +48 -0
  54. package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js.map +1 -0
  55. package/dist/collection/components/billing-form/billing-form-schema.js +1 -0
  56. package/dist/collection/components/billing-form/billing-form-schema.js.map +1 -0
  57. package/dist/collection/components/billing-form/billing-form.css +337 -0
  58. package/dist/collection/components/billing-form/billing-form.js +1 -0
  59. package/dist/collection/components/billing-form/billing-form.js.map +1 -0
  60. package/dist/collection/components/billing-form/billing-form.stories.js +1 -0
  61. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -0
  62. package/dist/collection/components/billing-form/state-options.js +1 -0
  63. package/dist/collection/components/billing-form/state-options.js.map +1 -0
  64. package/dist/collection/components/billing-form/test/billing-form.spec.js +31 -0
  65. package/dist/collection/components/billing-form/test/billing-form.spec.js.map +1 -0
  66. package/dist/collection/components/business-address/business-address-schema.js +1 -0
  67. package/dist/collection/components/business-address/business-address-schema.js.map +1 -0
  68. package/dist/collection/components/business-address/business-address.css +337 -0
  69. package/dist/collection/components/business-address/business-address.js +1 -0
  70. package/dist/collection/components/business-address/business-address.js.map +1 -0
  71. package/dist/collection/components/business-address/test/business-address.e2e.js +10 -0
  72. package/dist/collection/components/business-address/test/business-address.e2e.js.map +1 -0
  73. package/dist/collection/components/business-address/test/business-address.spec.js +18 -0
  74. package/dist/collection/components/business-address/test/business-address.spec.js.map +1 -0
  75. package/dist/collection/components/business-info/business-info-schema.js +94 -0
  76. package/dist/collection/components/business-info/business-info-schema.js.map +1 -0
  77. package/dist/collection/components/business-info/business-info.css +2274 -0
  78. package/dist/collection/components/business-info/business-info.js +168 -0
  79. package/dist/collection/components/business-info/business-info.js.map +1 -0
  80. package/dist/collection/components/card-form/card-form.js +26 -0
  81. package/dist/collection/components/card-form/card-form.js.map +1 -0
  82. package/dist/collection/components/card-form/card-form.stories.js +11 -1
  83. package/dist/collection/components/card-form/card-form.stories.js.map +1 -0
  84. package/dist/collection/components/card-form/test/card-form.e2e.js +14 -0
  85. package/dist/collection/components/card-form/test/card-form.e2e.js.map +1 -0
  86. package/dist/collection/components/card-form/test/card-form.spec.js +56 -0
  87. package/dist/collection/components/card-form/test/card-form.spec.js.map +1 -0
  88. package/dist/collection/components/payment-form/payment-form.css +412 -0
  89. package/dist/collection/components/payment-form/payment-form.js +8 -2
  90. package/dist/collection/components/payment-form/payment-form.js.map +1 -0
  91. package/dist/collection/components/payment-form/payment-form.stories.js +3 -1
  92. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -0
  93. package/dist/collection/components/payment-form/payment-method-selector.css +337 -0
  94. package/dist/collection/components/payment-form/payment-method-selector.js +1 -0
  95. package/dist/collection/components/payment-form/payment-method-selector.js.map +1 -0
  96. package/dist/collection/components/payment-form/test/payment-form.e2e.js +23 -0
  97. package/dist/collection/components/payment-form/test/payment-form.e2e.js.map +1 -0
  98. package/dist/collection/components/payment-form/test/payment-form.spec.js +182 -0
  99. package/dist/collection/components/payment-form/test/payment-form.spec.js.map +1 -0
  100. package/dist/collection/components/payment-form/tokenize.js +1 -0
  101. package/dist/collection/components/payment-form/tokenize.js.map +1 -0
  102. package/dist/collection/components/payment-method-form/get-computed-theme.js +1 -0
  103. package/dist/collection/components/payment-method-form/get-computed-theme.js.map +1 -0
  104. package/dist/collection/components/payment-method-form/message-event-types.js +1 -0
  105. package/dist/collection/components/payment-method-form/message-event-types.js.map +1 -0
  106. package/dist/collection/components/payment-method-form/payment-method-form.js +21 -2
  107. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -0
  108. package/dist/collection/components/payment-method-form/payment-method-responses.js +1 -0
  109. package/dist/collection/components/payment-method-form/payment-method-responses.js.map +1 -0
  110. package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js +22 -0
  111. package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js.map +1 -0
  112. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +83 -0
  113. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -0
  114. package/dist/collection/components/payment-method-form/theme.js +1 -0
  115. package/dist/collection/components/payment-method-form/theme.js.map +1 -0
  116. package/dist/collection/components/payments-list/payments-list.js +1 -0
  117. package/dist/collection/components/payments-list/payments-list.js.map +1 -0
  118. package/dist/collection/components/payments-list/test/payments-list.spec.js +21 -0
  119. package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -0
  120. package/dist/collection/components/select-input/select-input.css +337 -0
  121. package/dist/collection/components/select-input/select-input.js +1 -0
  122. package/dist/collection/components/select-input/select-input.js.map +1 -0
  123. package/dist/collection/components/select-input/test/select-input.spec.js +36 -0
  124. package/dist/collection/components/select-input/test/select-input.spec.js.map +1 -0
  125. package/dist/collection/components/text-input/test/text-input.spec.js +19 -0
  126. package/dist/collection/components/text-input/test/text-input.spec.js.map +1 -0
  127. package/dist/collection/components/text-input/text-input.css +337 -0
  128. package/dist/collection/components/text-input/text-input.js +1 -0
  129. package/dist/collection/components/text-input/text-input.js.map +1 -0
  130. package/dist/collection/index.js +1 -0
  131. package/dist/collection/index.js.map +1 -0
  132. package/dist/collection/utils/utils.js +1 -0
  133. package/dist/collection/utils/utils.js.map +1 -0
  134. package/dist/components/Api.js +109 -0
  135. package/dist/components/Api.js.map +1 -0
  136. package/dist/components/Payment.js +2 -0
  137. package/dist/components/Payment.js.map +1 -0
  138. package/dist/components/billing-form.js +6 -3
  139. package/dist/components/billing-form.js.map +1 -0
  140. package/dist/components/index.d.ts +9 -13
  141. package/dist/{esm/index.esm-c6a89005.js → components/index.esm.js} +3 -244
  142. package/dist/components/index.esm.js.map +1 -0
  143. package/dist/components/index.js +3 -11
  144. package/dist/components/index.js.map +1 -0
  145. package/dist/components/justifi-bank-account-form.js +14 -2
  146. package/dist/components/justifi-bank-account-form.js.map +1 -0
  147. package/dist/components/justifi-billing-form.js +2 -0
  148. package/dist/components/justifi-billing-form.js.map +1 -0
  149. package/dist/components/justifi-business-address.js +6 -3
  150. package/dist/components/justifi-business-address.js.map +1 -0
  151. package/dist/components/justifi-business-info.d.ts +11 -0
  152. package/dist/components/justifi-business-info.js +207 -0
  153. package/dist/components/justifi-business-info.js.map +1 -0
  154. package/dist/components/justifi-card-form.js +14 -2
  155. package/dist/components/justifi-card-form.js.map +1 -0
  156. package/dist/components/justifi-payment-form.js +11 -4
  157. package/dist/components/justifi-payment-form.js.map +1 -0
  158. package/dist/components/justifi-payment-method-form.js +2 -0
  159. package/dist/components/justifi-payment-method-form.js.map +1 -0
  160. package/dist/components/justifi-payment-method-selector.js +2 -0
  161. package/dist/components/justifi-payment-method-selector.js.map +1 -0
  162. package/dist/components/justifi-payments-list.js +4 -107
  163. package/dist/components/justifi-payments-list.js.map +1 -0
  164. package/dist/components/payment-method-form.js +17 -8
  165. package/dist/components/payment-method-form.js.map +1 -0
  166. package/dist/components/payment-method-selector.js +4 -2
  167. package/dist/components/payment-method-selector.js.map +1 -0
  168. package/dist/components/select-input.js +2 -0
  169. package/dist/components/select-input.js.map +1 -0
  170. package/dist/components/select-input2.js +4 -2
  171. package/dist/components/select-input2.js.map +1 -0
  172. package/dist/components/state-options.js +3 -1845
  173. package/dist/components/state-options.js.map +1 -0
  174. package/dist/components/text-input.js +2 -0
  175. package/dist/components/text-input.js.map +1 -0
  176. package/dist/components/text-input2.js +4 -2
  177. package/dist/components/text-input2.js.map +1 -0
  178. package/dist/esm/Api-a07f0057.js +109 -0
  179. package/dist/esm/Api-a07f0057.js.map +1 -0
  180. package/dist/esm/Payment-c86e1e84.js +2 -0
  181. package/dist/esm/Payment-c86e1e84.js.map +1 -0
  182. package/dist/esm/{index-605b421a.js → index-044f93fc.js} +185 -22
  183. package/dist/esm/index-044f93fc.js.map +1 -0
  184. package/dist/esm/index.esm-5624a5ed.js +1847 -0
  185. package/dist/esm/index.esm-5624a5ed.js.map +1 -0
  186. package/dist/esm/index.js +2 -0
  187. package/dist/esm/index.js.map +1 -0
  188. package/dist/esm/justifi-bank-account-form.entry.js +12 -1
  189. package/dist/esm/justifi-bank-account-form.entry.js.map +1 -0
  190. package/dist/esm/justifi-billing-form_2.entry.js +7 -4
  191. package/dist/esm/justifi-billing-form_2.entry.js.map +1 -0
  192. package/dist/esm/justifi-business-address.entry.js +6 -3
  193. package/dist/esm/justifi-business-address.entry.js.map +1 -0
  194. package/dist/esm/justifi-business-info.entry.js +170 -0
  195. package/dist/esm/justifi-business-info.entry.js.map +1 -0
  196. package/dist/esm/justifi-card-form.entry.js +12 -1
  197. package/dist/esm/justifi-card-form.entry.js.map +1 -0
  198. package/dist/esm/justifi-payment-form.entry.js +10 -4
  199. package/dist/esm/justifi-payment-form.entry.js.map +1 -0
  200. package/dist/esm/justifi-payment-method-form.entry.js +15 -7
  201. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -0
  202. package/dist/esm/justifi-payments-list.entry.js +4 -107
  203. package/dist/esm/justifi-payments-list.entry.js.map +1 -0
  204. package/dist/esm/loader.js +6 -3
  205. package/dist/esm/loader.js.map +1 -0
  206. package/dist/esm/polyfills/css-shim.js +1 -1
  207. package/dist/esm/select-input_2.entry.js +5 -3
  208. package/dist/esm/select-input_2.entry.js.map +1 -0
  209. package/dist/esm/state-options-188acc34.js +246 -0
  210. package/dist/esm/state-options-188acc34.js.map +1 -0
  211. package/dist/esm/webcomponents.js +9 -3
  212. package/dist/esm/webcomponents.js.map +1 -0
  213. package/dist/types/api/Api.d.ts +1 -1
  214. package/dist/types/api/Payment.d.ts +1 -1
  215. package/dist/types/components/bank-account-form/bank-account-form.d.ts +4 -0
  216. package/dist/types/components/business-info/business-info-schema.d.ts +42 -0
  217. package/dist/types/components/business-info/business-info.d.ts +20 -0
  218. package/dist/types/components/card-form/card-form.d.ts +4 -0
  219. package/dist/types/components/payment-form/payment-form.d.ts +1 -0
  220. package/dist/types/components/payment-method-form/payment-method-form.d.ts +1 -0
  221. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +1 -1
  222. package/dist/types/components.d.ts +72 -0
  223. package/dist/types/stencil-public-runtime.d.ts +72 -15
  224. package/dist/webcomponents/index.esm.js +2 -0
  225. package/dist/webcomponents/index.esm.js.map +1 -0
  226. package/dist/webcomponents/p-0969db8f.entry.js +2 -0
  227. package/dist/webcomponents/p-0969db8f.entry.js.map +1 -0
  228. package/dist/webcomponents/p-0ea23153.js +2 -0
  229. package/dist/webcomponents/p-0ea23153.js.map +1 -0
  230. package/dist/webcomponents/p-1ca0646b.js +2 -1
  231. package/dist/webcomponents/p-1ca0646b.js.map +1 -0
  232. package/dist/webcomponents/p-1f151d49.js +2 -0
  233. package/dist/webcomponents/p-1f151d49.js.map +1 -0
  234. package/dist/webcomponents/p-255b1284.entry.js +2 -0
  235. package/dist/webcomponents/p-255b1284.entry.js.map +1 -0
  236. package/dist/webcomponents/p-3aa91155.js +3 -0
  237. package/dist/webcomponents/p-3aa91155.js.map +1 -0
  238. package/dist/webcomponents/p-4ef14106.entry.js +2 -0
  239. package/dist/webcomponents/p-4ef14106.entry.js.map +1 -0
  240. package/dist/webcomponents/p-90c0d9e1.entry.js +2 -0
  241. package/dist/webcomponents/p-90c0d9e1.entry.js.map +1 -0
  242. package/dist/webcomponents/p-bd5352d6.entry.js +2 -0
  243. package/dist/webcomponents/p-bd5352d6.entry.js.map +1 -0
  244. package/dist/webcomponents/p-c903cc5a.entry.js +2 -0
  245. package/dist/webcomponents/p-c903cc5a.entry.js.map +1 -0
  246. package/dist/webcomponents/p-d87b0711.entry.js +2 -0
  247. package/dist/webcomponents/p-d87b0711.entry.js.map +1 -0
  248. package/dist/webcomponents/p-dbf7100f.entry.js +2 -0
  249. package/dist/webcomponents/p-dbf7100f.entry.js.map +1 -0
  250. package/dist/webcomponents/p-e0054bc3.js +2 -0
  251. package/dist/webcomponents/p-e0054bc3.js.map +1 -0
  252. package/dist/webcomponents/p-f30d1567.entry.js +2 -0
  253. package/dist/webcomponents/p-f30d1567.entry.js.map +1 -0
  254. package/dist/webcomponents/webcomponents.css +1 -1
  255. package/dist/webcomponents/webcomponents.esm.js +2 -1
  256. package/dist/webcomponents/webcomponents.esm.js.map +1 -0
  257. package/loader/index.d.ts +9 -0
  258. package/package.json +9 -5
  259. package/dist/webcomponents/p-039e3540.entry.js +0 -1
  260. package/dist/webcomponents/p-11e5bef9.entry.js +0 -1
  261. package/dist/webcomponents/p-20732337.js +0 -1
  262. package/dist/webcomponents/p-24409e8e.entry.js +0 -1
  263. package/dist/webcomponents/p-4a406704.js +0 -2
  264. package/dist/webcomponents/p-5774e36e.entry.js +0 -1
  265. package/dist/webcomponents/p-5b5e8351.entry.js +0 -1
  266. package/dist/webcomponents/p-5b68fa52.entry.js +0 -1
  267. package/dist/webcomponents/p-7747c086.entry.js +0 -1
  268. package/dist/webcomponents/p-bc35e124.entry.js +0 -1
@@ -0,0 +1,19 @@
1
+ import { newSpecPage } from '@stencil/core/testing';
2
+ import { TextInput } from '../text-input';
3
+ describe('text-input', () => {
4
+ it('renders', async () => {
5
+ const page = await newSpecPage({
6
+ components: [TextInput],
7
+ html: `<text-input></text-input>`,
8
+ });
9
+ expect(page.root).toEqualHtml(`
10
+ <text-input>
11
+ <mock:shadow-root>
12
+ <label></label>
13
+ <input type="text">
14
+ </mock:shadow-root>
15
+ </text-input>
16
+ `);
17
+ });
18
+ });
19
+ //# sourceMappingURL=text-input.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input.spec.js","sourceRoot":"","sources":["../../../../../src/components/text-input/test/text-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;KAO7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { TextInput } from '../text-input';\n\ndescribe('text-input', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input></text-input>`,\n });\n expect(page.root).toEqualHtml(`\n <text-input>\n <mock:shadow-root>\n <label></label>\n <input type=\"text\">\n </mock:shadow-root>\n </text-input>\n `);\n });\n});\n"]}
@@ -67,6 +67,343 @@
67
67
  --bs-highlight-bg: #fff3cd;
68
68
  }
69
69
 
70
+ .spinner-grow,
71
+ .spinner-border {
72
+ display: inline-block;
73
+ width: var(--bs-spinner-width);
74
+ height: var(--bs-spinner-height);
75
+ vertical-align: var(--bs-spinner-vertical-align);
76
+ border-radius: 50%;
77
+ animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);
78
+ }
79
+
80
+ @keyframes spinner-border {
81
+ to {
82
+ transform: rotate(360deg) /* rtl:ignore */;
83
+ }
84
+ }
85
+ .spinner-border {
86
+ --bs-spinner-width: 2rem;
87
+ --bs-spinner-height: 2rem;
88
+ --bs-spinner-vertical-align: -0.125em;
89
+ --bs-spinner-border-width: 0.25em;
90
+ --bs-spinner-animation-speed: 0.75s;
91
+ --bs-spinner-animation-name: spinner-border;
92
+ border: var(--bs-spinner-border-width) solid currentcolor;
93
+ border-right-color: transparent;
94
+ }
95
+
96
+ .spinner-border-sm {
97
+ --bs-spinner-width: 1rem;
98
+ --bs-spinner-height: 1rem;
99
+ --bs-spinner-border-width: 0.2em;
100
+ }
101
+
102
+ @keyframes spinner-grow {
103
+ 0% {
104
+ transform: scale(0);
105
+ }
106
+ 50% {
107
+ opacity: 1;
108
+ transform: none;
109
+ }
110
+ }
111
+ .spinner-grow {
112
+ --bs-spinner-width: 2rem;
113
+ --bs-spinner-height: 2rem;
114
+ --bs-spinner-vertical-align: -0.125em;
115
+ --bs-spinner-animation-speed: 0.75s;
116
+ --bs-spinner-animation-name: spinner-grow;
117
+ background-color: currentcolor;
118
+ opacity: 0;
119
+ }
120
+
121
+ .spinner-grow-sm {
122
+ --bs-spinner-width: 1rem;
123
+ --bs-spinner-height: 1rem;
124
+ }
125
+
126
+ @media (prefers-reduced-motion: reduce) {
127
+ .spinner-border,
128
+ .spinner-grow {
129
+ --bs-spinner-animation-speed: 1.5s;
130
+ }
131
+ }
132
+ .clearfix::after {
133
+ display: block;
134
+ clear: both;
135
+ content: "";
136
+ }
137
+
138
+ .text-bg-primary {
139
+ color: #fff !important;
140
+ background-color: RGBA(13, 110, 253, var(--bs-bg-opacity, 1)) !important;
141
+ }
142
+
143
+ .text-bg-secondary {
144
+ color: #fff !important;
145
+ background-color: RGBA(108, 117, 125, var(--bs-bg-opacity, 1)) !important;
146
+ }
147
+
148
+ .text-bg-success {
149
+ color: #fff !important;
150
+ background-color: RGBA(25, 135, 84, var(--bs-bg-opacity, 1)) !important;
151
+ }
152
+
153
+ .text-bg-info {
154
+ color: #000 !important;
155
+ background-color: RGBA(13, 202, 240, var(--bs-bg-opacity, 1)) !important;
156
+ }
157
+
158
+ .text-bg-warning {
159
+ color: #000 !important;
160
+ background-color: RGBA(255, 193, 7, var(--bs-bg-opacity, 1)) !important;
161
+ }
162
+
163
+ .text-bg-danger {
164
+ color: #fff !important;
165
+ background-color: RGBA(220, 53, 69, var(--bs-bg-opacity, 1)) !important;
166
+ }
167
+
168
+ .text-bg-light {
169
+ color: #000 !important;
170
+ background-color: RGBA(248, 249, 250, var(--bs-bg-opacity, 1)) !important;
171
+ }
172
+
173
+ .text-bg-dark {
174
+ color: #fff !important;
175
+ background-color: RGBA(33, 37, 41, var(--bs-bg-opacity, 1)) !important;
176
+ }
177
+
178
+ .link-primary {
179
+ color: #0d6efd !important;
180
+ }
181
+ .link-primary:hover, .link-primary:focus {
182
+ color: #0a58ca !important;
183
+ }
184
+
185
+ .link-secondary {
186
+ color: #6c757d !important;
187
+ }
188
+ .link-secondary:hover, .link-secondary:focus {
189
+ color: #565e64 !important;
190
+ }
191
+
192
+ .link-success {
193
+ color: #198754 !important;
194
+ }
195
+ .link-success:hover, .link-success:focus {
196
+ color: #146c43 !important;
197
+ }
198
+
199
+ .link-info {
200
+ color: #0dcaf0 !important;
201
+ }
202
+ .link-info:hover, .link-info:focus {
203
+ color: #3dd5f3 !important;
204
+ }
205
+
206
+ .link-warning {
207
+ color: #ffc107 !important;
208
+ }
209
+ .link-warning:hover, .link-warning:focus {
210
+ color: #ffcd39 !important;
211
+ }
212
+
213
+ .link-danger {
214
+ color: #dc3545 !important;
215
+ }
216
+ .link-danger:hover, .link-danger:focus {
217
+ color: #b02a37 !important;
218
+ }
219
+
220
+ .link-light {
221
+ color: #f8f9fa !important;
222
+ }
223
+ .link-light:hover, .link-light:focus {
224
+ color: #f9fafb !important;
225
+ }
226
+
227
+ .link-dark {
228
+ color: #212529 !important;
229
+ }
230
+ .link-dark:hover, .link-dark:focus {
231
+ color: #1a1e21 !important;
232
+ }
233
+
234
+ .ratio {
235
+ position: relative;
236
+ width: 100%;
237
+ }
238
+ .ratio::before {
239
+ display: block;
240
+ padding-top: var(--bs-aspect-ratio);
241
+ content: "";
242
+ }
243
+ .ratio > * {
244
+ position: absolute;
245
+ top: 0;
246
+ left: 0;
247
+ width: 100%;
248
+ height: 100%;
249
+ }
250
+
251
+ .ratio-1x1 {
252
+ --bs-aspect-ratio: 100%;
253
+ }
254
+
255
+ .ratio-4x3 {
256
+ --bs-aspect-ratio: 75%;
257
+ }
258
+
259
+ .ratio-16x9 {
260
+ --bs-aspect-ratio: 56.25%;
261
+ }
262
+
263
+ .ratio-21x9 {
264
+ --bs-aspect-ratio: 42.8571428571%;
265
+ }
266
+
267
+ .fixed-top {
268
+ position: fixed;
269
+ top: 0;
270
+ right: 0;
271
+ left: 0;
272
+ z-index: 1030;
273
+ }
274
+
275
+ .fixed-bottom {
276
+ position: fixed;
277
+ right: 0;
278
+ bottom: 0;
279
+ left: 0;
280
+ z-index: 1030;
281
+ }
282
+
283
+ .sticky-top {
284
+ position: sticky;
285
+ top: 0;
286
+ z-index: 1020;
287
+ }
288
+
289
+ .sticky-bottom {
290
+ position: sticky;
291
+ bottom: 0;
292
+ z-index: 1020;
293
+ }
294
+
295
+ @media (min-width: 576px) {
296
+ .sticky-sm-top {
297
+ position: sticky;
298
+ top: 0;
299
+ z-index: 1020;
300
+ }
301
+ .sticky-sm-bottom {
302
+ position: sticky;
303
+ bottom: 0;
304
+ z-index: 1020;
305
+ }
306
+ }
307
+ @media (min-width: 768px) {
308
+ .sticky-md-top {
309
+ position: sticky;
310
+ top: 0;
311
+ z-index: 1020;
312
+ }
313
+ .sticky-md-bottom {
314
+ position: sticky;
315
+ bottom: 0;
316
+ z-index: 1020;
317
+ }
318
+ }
319
+ @media (min-width: 992px) {
320
+ .sticky-lg-top {
321
+ position: sticky;
322
+ top: 0;
323
+ z-index: 1020;
324
+ }
325
+ .sticky-lg-bottom {
326
+ position: sticky;
327
+ bottom: 0;
328
+ z-index: 1020;
329
+ }
330
+ }
331
+ @media (min-width: 1200px) {
332
+ .sticky-xl-top {
333
+ position: sticky;
334
+ top: 0;
335
+ z-index: 1020;
336
+ }
337
+ .sticky-xl-bottom {
338
+ position: sticky;
339
+ bottom: 0;
340
+ z-index: 1020;
341
+ }
342
+ }
343
+ @media (min-width: 1400px) {
344
+ .sticky-xxl-top {
345
+ position: sticky;
346
+ top: 0;
347
+ z-index: 1020;
348
+ }
349
+ .sticky-xxl-bottom {
350
+ position: sticky;
351
+ bottom: 0;
352
+ z-index: 1020;
353
+ }
354
+ }
355
+ .hstack {
356
+ display: flex;
357
+ flex-direction: row;
358
+ align-items: center;
359
+ align-self: stretch;
360
+ }
361
+
362
+ .vstack {
363
+ display: flex;
364
+ flex: 1 1 auto;
365
+ flex-direction: column;
366
+ align-self: stretch;
367
+ }
368
+
369
+ .visually-hidden,
370
+ .visually-hidden-focusable:not(:focus):not(:focus-within) {
371
+ position: absolute !important;
372
+ width: 1px !important;
373
+ height: 1px !important;
374
+ padding: 0 !important;
375
+ margin: -1px !important;
376
+ overflow: hidden !important;
377
+ clip: rect(0, 0, 0, 0) !important;
378
+ white-space: nowrap !important;
379
+ border: 0 !important;
380
+ }
381
+
382
+ .stretched-link::after {
383
+ position: absolute;
384
+ top: 0;
385
+ right: 0;
386
+ bottom: 0;
387
+ left: 0;
388
+ z-index: 1;
389
+ content: "";
390
+ }
391
+
392
+ .text-truncate {
393
+ overflow: hidden;
394
+ text-overflow: ellipsis;
395
+ white-space: nowrap;
396
+ }
397
+
398
+ .vr {
399
+ display: inline-block;
400
+ align-self: stretch;
401
+ width: 1px;
402
+ min-height: 1em;
403
+ background-color: currentcolor;
404
+ opacity: 0.25;
405
+ }
406
+
70
407
  *,
71
408
  *::before,
72
409
  *::after {
@@ -123,3 +123,4 @@ export class TextInput {
123
123
  }];
124
124
  }
125
125
  }
126
+ //# sourceMappingURL=text-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../../src/components/text-input/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,SAAS;;;;;;yBAMK,EAAE;;EAE3B,OAAO,CAAC,KAAK;IACX,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;EACpE,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,WAAW,EAAC,2BAA2B;MAC3C,aAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,IACnC,IAAI,CAAC,KAAK,CACL;MACR,aACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EACrC,KAAK,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,YAAY,EAC9C,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,GAC9D;MACD,IAAI,CAAC,KAAK,IAAI,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Event, Prop, State, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'text-input',\n styleUrl: 'text-input.scss',\n shadow: true,\n})\nexport class TextInput {\n @Prop() name: string;\n @Prop() label: string;\n @Prop() defaultValue: string;\n @Prop() error: string;\n @Event() fieldReceivedInput: EventEmitter<{ name: string; value: string }>;\n @State() internalValue = '';\n\n onInput(event) {\n const target = event.target;\n const name = target.getAttribute('name');\n this.fieldReceivedInput.emit({ name: name, value: target.value });\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\">\n {this.label}\n </label>\n <input\n name={this.name}\n type=\"text\"\n onInput={event => this.onInput(event)}\n value={this.internalValue || this.defaultValue}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
@@ -1 +1,2 @@
1
1
  export * from './components';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './components';\n"]}
@@ -27,3 +27,4 @@ export function formatTimeSeconds(dateString) {
27
27
  const date = new Date(dateString);
28
28
  return format(date, 'h:mm:ssaaa');
29
29
  }
30
+ //# sourceMappingURL=utils.js.map
@@ -0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I,CAAC,UAAU,CAAC,CAAC;EAClC,OAAO,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { format } from 'date-fns';\nimport Dinero from 'dinero.js';\n\nexport function formatCurrency(amount: number, withSymbol = true): string {\n if (!amount) amount = 0;\n\n function format(amount: number): string {\n const formattedString = withSymbol ? '$0,0.00' : '0,0.00';\n return Dinero({ amount: amount, currency: 'USD' }).toFormat(formattedString);\n }\n\n return amount < 0 ? `(${format(-amount)})` : format(amount);\n}\n\nexport function formatDate(dateString: string | Date): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'MMM d, yyyy');\n}\n\nexport function formatTime(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mmaaa');\n}\n\nexport function formatTimeSeconds(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mm:ssaaa');\n}\n"]}
@@ -0,0 +1,109 @@
1
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
2
+ // require the crypto API and do not support built-in fallback to lower quality random number
3
+ // generators (like Math.random()).
4
+ let getRandomValues;
5
+ const rnds8 = new Uint8Array(16);
6
+ function rng() {
7
+ // lazy load so that environments that need to polyfill have a chance to do so
8
+ if (!getRandomValues) {
9
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
10
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
11
+
12
+ if (!getRandomValues) {
13
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
14
+ }
15
+ }
16
+
17
+ return getRandomValues(rnds8);
18
+ }
19
+
20
+ /**
21
+ * Convert array of 16 byte values to UUID string format of the form:
22
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
23
+ */
24
+
25
+ const byteToHex = [];
26
+
27
+ for (let i = 0; i < 256; ++i) {
28
+ byteToHex.push((i + 0x100).toString(16).slice(1));
29
+ }
30
+
31
+ function unsafeStringify(arr, offset = 0) {
32
+ // Note: Be careful editing this code! It's been tuned for performance
33
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
34
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
35
+ }
36
+
37
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
38
+ const native = {
39
+ randomUUID
40
+ };
41
+
42
+ function v4(options, buf, offset) {
43
+ if (native.randomUUID && !buf && !options) {
44
+ return native.randomUUID();
45
+ }
46
+
47
+ options = options || {};
48
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
49
+
50
+ rnds[6] = rnds[6] & 0x0f | 0x40;
51
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
52
+
53
+ if (buf) {
54
+ offset = offset || 0;
55
+
56
+ for (let i = 0; i < 16; ++i) {
57
+ buf[offset + i] = rnds[i];
58
+ }
59
+
60
+ return buf;
61
+ }
62
+
63
+ return unsafeStringify(rnds);
64
+ }
65
+
66
+ const Api = (authToken) => {
67
+ const apiOrigin = 'https://justifi.ai';
68
+ async function getAuthorizationHeader() {
69
+ return {
70
+ 'Authorization': `Bearer ${authToken}`,
71
+ 'Idempotency-Key': v4(),
72
+ 'Content-Type': 'application/json',
73
+ };
74
+ }
75
+ async function makeRequest(endpoint, method, params, body, signal) {
76
+ const url = `${apiOrigin}/v1/${endpoint}`;
77
+ const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;
78
+ const response = await fetch(requestUrl, {
79
+ method: method,
80
+ headers: await getAuthorizationHeader(),
81
+ body: body,
82
+ signal: signal,
83
+ });
84
+ if (response) {
85
+ return response.status === 204 ? {} : response.json();
86
+ }
87
+ handleError(requestUrl);
88
+ }
89
+ async function get(endpoint, params, signal) {
90
+ return makeRequest(endpoint, 'GET', params, null, signal);
91
+ }
92
+ async function post(endpoint, body, params, signal) {
93
+ return makeRequest(endpoint, 'POST', params, body, signal);
94
+ }
95
+ async function patch(endpoint, body, params, signal) {
96
+ return makeRequest(endpoint, 'PATCH', params, body, signal);
97
+ }
98
+ async function destroy(endpoint, params, signal) {
99
+ return makeRequest(endpoint, 'DELETE', params, null, signal);
100
+ }
101
+ return { get, post, patch, destroy };
102
+ };
103
+ function handleError(requestUrl) {
104
+ console.error(`Error fetching from ${requestUrl}`);
105
+ }
106
+
107
+ export { Api as A };
108
+
109
+ //# sourceMappingURL=Api.js.map
@@ -0,0 +1 @@
1
+ {"file":"Api.js","mappings":"AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrH;AACA,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC,CAAC;AAClI,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC;;AChBA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,EAAE,C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AAW,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC7D;EAED,eAAe,OAAO,CAAC,QAAgB,EAAE,MAAY,EAAE,MAAoB;IACzE,OAAO,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC9D;EAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACvC,EAAE;AAEF,SAAS,WAAW,CAAC,UAAkB;EACrC,OAAO,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;AACrD;;;;","names":["uuidv4"],"sources":["./node_modules/uuid/dist/esm-browser/rng.js","./node_modules/uuid/dist/esm-browser/stringify.js","./node_modules/uuid/dist/esm-browser/native.js","./node_modules/uuid/dist/esm-browser/v4.js","./src/api/Api.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\nimport { IPagination } from './Pagination';\n\nexport interface IApiResponse<T> {\n data: T;\n error?: IErrorObject | IServerError;\n page_info?: IPagination;\n errors?: string[];\n id: number;\n type: string;\n}\n\nexport type IServerError = string;\n\nexport interface IErrorObject {\n message: string;\n code: string;\n param?: string;\n}\n\nexport interface IApiResponseCollection<T> extends IApiResponse<T> {\n page_info: IPagination;\n}\n\nconst Api = (authToken: string) => {\n const apiOrigin = 'https://justifi.ai';\n\n async function getAuthorizationHeader() {\n return {\n 'Authorization': `Bearer ${authToken}`,\n 'Idempotency-Key': uuidv4(),\n 'Content-Type': 'application/json',\n };\n }\n\n async function makeRequest(endpoint: string, method: string, params?: any, body?: any, signal?: AbortSignal) {\n const url = `${apiOrigin}/v1/${endpoint}`;\n const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;\n const response = await fetch(requestUrl, {\n method: method,\n headers: await getAuthorizationHeader(),\n body: body,\n signal: signal,\n });\n\n if (response) {\n return response.status === 204 ? {} : response.json();\n }\n handleError(requestUrl);\n }\n\n async function get(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'GET', params, null, signal);\n }\n\n async function post(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'POST', params, body, signal);\n }\n\n async function patch(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'PATCH', params, body, signal);\n }\n\n async function destroy(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'DELETE', params, null, signal);\n }\n\n return { get, post, patch, destroy };\n};\n\nfunction handleError(requestUrl: string): void {\n console.error(`Error fetching from ${requestUrl}`);\n}\n\nexport default Api;\n"],"version":3}
@@ -67,3 +67,5 @@ class Payment {
67
67
  }
68
68
 
69
69
  export { PaymentMethodTypes as P, Payment as a };
70
+
71
+ //# sourceMappingURL=Payment.js.map
@@ -0,0 +1 @@
1
+ {"file":"Payment.js","mappings":"AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;IAEW;A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I,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACrC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IACnD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACjC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAC7C,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IACnD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACrC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;GACtC;EAED,IAAI,cAAc;IAChB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,uBAAuB,CAAC,IAAI,CAAC,CAAC;;IAE5F,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;MAClB,OAAO,IAAI,CAAC;KACb;SAAM,IAAI,IAAI,EAAE;MACf,OAAO,uBAAuB,CAAC,IAAI,CAAC;KACrC;SAAM;MACL,OAAO,uBAAuB,CAAC,IAAI,CAAC;KACrC;GACF;;;;;","names":[],"sources":["./src/api/Payment.ts"],"sourcesContent":["export enum CaptureStrategy {\n automatic = 'automatic',\n manual = 'manual',\n}\n\nexport enum PaymentMethodTypes {\n card = 'card',\n bankAccount = 'bankAccount',\n}\n\nexport enum PaymentStatuses {\n pending = 'pending',\n authorized = 'authorized',\n succeeded = 'succeeded',\n failed = 'failed',\n disputed = 'disputed',\n fully_refunded = 'fully_refunded',\n partially_refunded = 'partially_refunded',\n}\n\nexport enum PaymentDisputedStatuses {\n // if a dispute is 'won', we don't show a dispute status, just general status\n lost = 'lost',\n open = 'open',\n}\n\nexport interface IPaymentMethod {\n card?: ICard;\n}\n\nexport type CardBrand = 'american_express' | 'diners_club' | 'discover' | 'jcb' | 'mastercard' | 'china_unionpay' | 'visa' | 'unknown';\n\nexport interface ICard {\n id: string;\n acct_last_four: string;\n name: string;\n brand: CardBrand;\n token: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface IDispute {\n amount_cents: number;\n created_at: string;\n currency: string;\n gateway_ref_id: string;\n id: string;\n payment_id: string;\n reason: null;\n status: string;\n updated_at: string;\n}\n\nexport interface IPayment {\n id: string;\n account_id: string;\n amount: number;\n amount_disputed: number;\n amount_refundable: number;\n amount_refunded: number;\n balance: number;\n captured: boolean;\n capture_strategy: CaptureStrategy;\n currency: 'usd';\n description: string;\n disputed: boolean;\n disputes: IDispute[];\n error_code: string | null;\n error_description: string | null;\n fee_amount: number;\n is_test: boolean;\n metadata: Object | null;\n payment_method: IPaymentMethod;\n payment_intent_id: string | null;\n refunded: boolean;\n status: PaymentStatuses;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payment implements IPayment {\n public id: string;\n public account_id: string;\n public amount: number;\n public amount_disputed: number;\n public amount_refundable: number;\n public amount_refunded: number;\n public balance: number;\n public captured: boolean;\n public capture_strategy: CaptureStrategy;\n public currency: 'usd';\n public description: string;\n public disputed: boolean;\n public disputes: IDispute[];\n public error_code: string | null;\n public error_description: string | null;\n public fee_amount: number;\n public is_test: boolean;\n public metadata: Object | null;\n public payment_method: IPaymentMethod;\n public payment_intent_id: string | null;\n public refunded: boolean;\n public status: PaymentStatuses;\n public created_at: string;\n public updated_at: string;\n\n constructor(payment: IPayment) {\n this.id = payment.id;\n this.account_id = payment.account_id;\n this.amount = payment.amount;\n this.amount_disputed = payment.amount_disputed;\n this.amount_refundable = payment.amount_refundable;\n this.amount_refunded = payment.amount_refunded;\n this.balance = payment.balance;\n this.captured = payment.captured;\n this.capture_strategy = payment.capture_strategy;\n this.currency = payment.currency;\n this.description = payment.description;\n this.disputed = payment.disputed;\n this.disputes = payment.disputes;\n this.error_code = payment.error_code;\n this.error_description = payment.error_description;\n this.fee_amount = payment.fee_amount;\n this.is_test = payment.is_test;\n this.metadata = payment.metadata;\n this.payment_method = payment.payment_method;\n this.payment_intent_id = payment.payment_intent_id;\n this.refunded = payment.refunded;\n this.status = payment.status;\n this.created_at = payment.created_at;\n this.updated_at = payment.updated_at;\n }\n\n get disputedStatus(): PaymentDisputedStatuses | null {\n const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);\n // if a dispute is 'won', we don't show a dispute status, just general status\n if (!this.disputed) {\n return null;\n } else if (lost) {\n return PaymentDisputedStatuses.lost;\n } else {\n return PaymentDisputedStatuses.open;\n }\n }\n}\n"],"version":3}