@justifi/webcomponents 4.2.2 → 4.5.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 (603) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Api-11362403.js → Api-d2df6e84.js} +17 -4
  3. package/dist/cjs/Api-d2df6e84.js.map +1 -0
  4. package/dist/cjs/{Payment-ac4dea02.js → Payout-4906a445.js} +44 -1
  5. package/dist/cjs/Payout-4906a445.js.map +1 -0
  6. package/dist/cjs/business-form-schema-725ec6f5.js +150 -0
  7. package/dist/cjs/business-form-schema-725ec6f5.js.map +1 -0
  8. package/dist/cjs/form-control-datepart_2.cjs.entry.js +107 -0
  9. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -0
  10. package/dist/cjs/form-control-monetary.cjs.entry.js +65 -0
  11. package/dist/cjs/form-control-monetary.cjs.entry.js.map +1 -0
  12. package/dist/cjs/form-control-number_3.cjs.entry.js +148 -0
  13. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -0
  14. package/dist/cjs/form-control-select.cjs.entry.js +47 -0
  15. package/dist/cjs/form-control-select.cjs.entry.js.map +1 -0
  16. package/dist/cjs/{index-34312a38.js → index-4ffc90c0.js} +145 -20
  17. package/dist/cjs/index-4ffc90c0.js.map +1 -0
  18. package/dist/cjs/index-5a880722.js +3233 -0
  19. package/dist/cjs/index-5a880722.js.map +1 -0
  20. package/dist/cjs/{index.esm-bcf90c56.js → index.esm-84a0a7a8.js} +283 -14
  21. package/dist/cjs/index.esm-84a0a7a8.js.map +1 -0
  22. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +396 -0
  23. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +1 -0
  24. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +8 -3
  25. package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -1
  26. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +5 -5
  27. package/dist/cjs/justifi-billing-form_2.cjs.entry.js.map +1 -1
  28. package/dist/cjs/justifi-business-form.cjs.entry.js +833 -0
  29. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -0
  30. package/dist/cjs/justifi-business-list.cjs.entry.js +189 -0
  31. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -0
  32. package/dist/cjs/justifi-card-form.cjs.entry.js +8 -3
  33. package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -1
  34. package/dist/cjs/justifi-details.cjs.entry.js +30 -0
  35. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -0
  36. package/dist/cjs/justifi-payment-details.cjs.entry.js +63 -0
  37. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -0
  38. package/dist/cjs/justifi-payment-form.cjs.entry.js +25 -7
  39. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +26 -19
  41. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  42. package/dist/cjs/justifi-payments-list.cjs.entry.js +78 -4039
  43. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  44. package/dist/cjs/justifi-payout-details.cjs.entry.js +61 -0
  45. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -0
  46. package/dist/cjs/justifi-payouts-list.cjs.entry.js +123 -0
  47. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -0
  48. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +156 -0
  49. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -0
  50. package/dist/cjs/justifi-table.cjs.entry.js +68 -0
  51. package/dist/cjs/justifi-table.cjs.entry.js.map +1 -0
  52. package/dist/cjs/loader.cjs.js +3 -12
  53. package/dist/cjs/loader.cjs.js.map +1 -1
  54. package/dist/cjs/select-input_2.cjs.entry.js +6 -6
  55. package/dist/cjs/select-input_2.cjs.entry.js.map +1 -1
  56. package/dist/cjs/{state-options-efeaa587.js → state-options-83b52cd1.js} +1 -1
  57. package/dist/{esm/state-options-188acc34.js.map → cjs/state-options-83b52cd1.js.map} +1 -1
  58. package/dist/cjs/table-utils-617126e5.js +13 -0
  59. package/dist/cjs/table-utils-617126e5.js.map +1 -0
  60. package/dist/cjs/utils-0fd61dbd.js +3918 -0
  61. package/dist/cjs/utils-0fd61dbd.js.map +1 -0
  62. package/dist/cjs/utils-a5b5bfdf.js +35 -0
  63. package/dist/cjs/utils-a5b5bfdf.js.map +1 -0
  64. package/dist/cjs/webcomponents.cjs.js +3 -6
  65. package/dist/cjs/webcomponents.cjs.js.map +1 -1
  66. package/dist/collection/api/Api.js +17 -4
  67. package/dist/collection/api/Api.js.map +1 -1
  68. package/dist/collection/api/Business.js +50 -0
  69. package/dist/collection/api/Business.js.map +1 -0
  70. package/dist/collection/api/Payment.js.map +1 -1
  71. package/dist/collection/api/Payout.js +42 -0
  72. package/dist/collection/api/Payout.js.map +1 -0
  73. package/dist/collection/api/Proceed.js +42 -0
  74. package/dist/collection/api/Proceed.js.map +1 -0
  75. package/dist/collection/api/index.js +1 -0
  76. package/dist/collection/api/index.js.map +1 -1
  77. package/dist/collection/api/mockData/MockPayments.js +1 -1
  78. package/dist/collection/api/shared.js +2 -0
  79. package/dist/collection/api/shared.js.map +1 -0
  80. package/dist/collection/collection-manifest.json +30 -12
  81. package/dist/collection/components/bank-account-form/bank-account-form.js +38 -10
  82. package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -1
  83. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -0
  84. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  85. package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js +1 -1
  86. package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js +3 -3
  87. package/dist/collection/components/billing-form/billing-form-schema.js +1 -1
  88. package/dist/collection/components/billing-form/billing-form.css +212 -39
  89. package/dist/collection/components/billing-form/billing-form.js +16 -10
  90. package/dist/collection/components/billing-form/billing-form.js.map +1 -1
  91. package/dist/collection/components/billing-form/test/billing-form.spec.js +51 -24
  92. package/dist/collection/components/billing-form/test/billing-form.spec.js.map +1 -1
  93. package/dist/collection/components/business-form/additional-questions/additional-questions.js +59 -0
  94. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -0
  95. package/dist/collection/components/{business-address/business-address-schema.js → business-form/business-address/business-address-form-schema.js} +2 -2
  96. package/dist/collection/components/business-form/business-address/business-address-form-schema.js.map +1 -0
  97. package/dist/collection/components/business-form/business-address/business-address-form.css +2532 -0
  98. package/dist/collection/components/business-form/business-address/business-address-form.js +98 -0
  99. package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -0
  100. package/dist/collection/components/business-form/business-address/test/business-address.e2e.js +10 -0
  101. package/dist/collection/components/business-form/business-address/test/business-address.e2e.js.map +1 -0
  102. package/dist/collection/components/business-form/business-address/test/business-address.spec.js +76 -0
  103. package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -0
  104. package/dist/collection/components/business-form/business-form-schema.js +160 -0
  105. package/dist/collection/components/business-form/business-form-schema.js.map +1 -0
  106. package/dist/collection/components/business-form/business-form.css +7772 -0
  107. package/dist/collection/components/business-form/business-form.js +153 -0
  108. package/dist/collection/components/business-form/business-form.js.map +1 -0
  109. package/dist/collection/components/business-form/business-form.stories.js +115 -0
  110. package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
  111. package/dist/collection/components/{business-info/business-info.css → business-form/business-generic-info/business-generic-info.css} +745 -530
  112. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +72 -0
  113. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -0
  114. package/dist/collection/components/business-form/business-owners/business-owners.css +7772 -0
  115. package/dist/collection/components/business-form/business-owners/business-owners.js +131 -0
  116. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -0
  117. package/dist/collection/components/business-form/business-representative/business-representative-schema.js +2 -0
  118. package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -0
  119. package/dist/collection/components/business-form/business-representative/business-representative.css +2489 -0
  120. package/dist/collection/components/business-form/business-representative/business-representative.js +71 -0
  121. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -0
  122. package/dist/collection/components/business-form/test/business-form.spec.js +44 -0
  123. package/dist/collection/components/business-form/test/business-form.spec.js.map +1 -0
  124. package/dist/collection/components/business-list/business-list.css +576 -0
  125. package/dist/collection/components/business-list/business-list.js +209 -0
  126. package/dist/collection/components/business-list/business-list.js.map +1 -0
  127. package/dist/collection/components/business-list/business-list.stories.js +68 -0
  128. package/dist/collection/components/business-list/business-list.stories.js.map +1 -0
  129. package/dist/collection/components/business-list/example.js +12 -0
  130. package/dist/collection/components/card-form/card-form.js +38 -10
  131. package/dist/collection/components/card-form/card-form.js.map +1 -1
  132. package/dist/collection/components/card-form/card-form.stories.js +5 -2
  133. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  134. package/dist/collection/components/card-form/test/card-form.e2e.js +1 -1
  135. package/dist/collection/components/card-form/test/card-form.spec.js +3 -3
  136. package/dist/collection/components/details/details.css +7983 -0
  137. package/dist/collection/components/details/details.js +66 -0
  138. package/dist/collection/components/details/details.js.map +1 -0
  139. package/dist/collection/components/details/utils.js +10 -0
  140. package/dist/collection/components/details/utils.js.map +1 -0
  141. package/dist/collection/components/form/form-control-datepart.js +233 -0
  142. package/dist/collection/components/form/form-control-datepart.js.map +1 -0
  143. package/dist/collection/components/form/form-control-monetary.js +186 -0
  144. package/dist/collection/components/form/form-control-monetary.js.map +1 -0
  145. package/dist/collection/components/form/form-control-number-masked.js +217 -0
  146. package/dist/collection/components/form/form-control-number-masked.js.map +1 -0
  147. package/dist/collection/components/form/form-control-number.css +1818 -0
  148. package/dist/collection/components/form/form-control-number.js +194 -0
  149. package/dist/collection/components/form/form-control-number.js.map +1 -0
  150. package/dist/collection/components/{business-address/business-address.css → form/form-control-select.css} +350 -1212
  151. package/dist/collection/components/form/form-control-select.js +200 -0
  152. package/dist/collection/components/form/form-control-select.js.map +1 -0
  153. package/dist/collection/components/form/form-control-text.css +1801 -0
  154. package/dist/collection/components/form/form-control-text.js +194 -0
  155. package/dist/collection/components/form/form-control-text.js.map +1 -0
  156. package/dist/collection/components/form/form.js +93 -0
  157. package/dist/collection/components/form/form.js.map +1 -0
  158. package/dist/collection/components/legal-address-form/legal-address-form-schema.js +11 -0
  159. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +1 -0
  160. package/dist/collection/components/legal-address-form/legal-address-form.css +2489 -0
  161. package/dist/collection/components/legal-address-form/legal-address-form.js +90 -0
  162. package/dist/collection/components/legal-address-form/legal-address-form.js.map +1 -0
  163. package/dist/collection/components/payment-details/example.js +12 -0
  164. package/dist/collection/components/payment-details/payment-details.css +7983 -0
  165. package/dist/collection/components/payment-details/payment-details.js +129 -0
  166. package/dist/collection/components/payment-details/payment-details.js.map +1 -0
  167. package/dist/collection/components/payment-details/payment-details.stories.js +47 -0
  168. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -0
  169. package/dist/collection/components/payment-form/payment-form.css +220 -45
  170. package/dist/collection/components/payment-form/payment-form.js +47 -7
  171. package/dist/collection/components/payment-form/payment-form.js.map +1 -1
  172. package/dist/collection/components/payment-form/payment-form.stories.js +3 -2
  173. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
  174. package/dist/collection/components/payment-form/payment-method-selector.css +348 -145
  175. package/dist/collection/components/payment-form/payment-method-selector.js +5 -3
  176. package/dist/collection/components/payment-form/payment-method-selector.js.map +1 -1
  177. package/dist/collection/components/payment-form/test/payment-form.e2e.js +1 -1
  178. package/dist/collection/components/payment-form/test/payment-form.spec.js +4 -3
  179. package/dist/collection/components/payment-form/test/payment-form.spec.js.map +1 -1
  180. package/dist/collection/components/payment-method-form/get-computed-theme.js +2 -0
  181. package/dist/collection/components/payment-method-form/get-computed-theme.js.map +1 -1
  182. package/dist/collection/components/payment-method-form/payment-method-form.js +19 -11
  183. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  184. package/dist/collection/components/payment-method-form/test/payment-method-form.e2e.js +1 -1
  185. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +3 -3
  186. package/dist/collection/components/payment-method-form/theme.js.map +1 -1
  187. package/dist/collection/components/payments-list/example.js +12 -0
  188. package/dist/collection/components/payments-list/payments-list.css +574 -1
  189. package/dist/collection/components/payments-list/payments-list.js +130 -27
  190. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  191. package/dist/collection/components/payments-list/payments-list.stories.js +78 -0
  192. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -0
  193. package/dist/collection/components/payments-list/test/payments-list.spec.js +31 -18
  194. package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
  195. package/dist/collection/components/payout-details/example.js +12 -0
  196. package/dist/collection/components/payout-details/payout-details.css +7983 -0
  197. package/dist/collection/components/payout-details/payout-details.js +126 -0
  198. package/dist/collection/components/payout-details/payout-details.js.map +1 -0
  199. package/dist/collection/components/payout-details/payout-details.stories.js +47 -0
  200. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -0
  201. package/dist/collection/components/payouts-list/example.js +12 -0
  202. package/dist/collection/components/payouts-list/payouts-list.css +576 -0
  203. package/dist/collection/components/payouts-list/payouts-list.js +215 -0
  204. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -0
  205. package/dist/collection/components/payouts-list/payouts-list.stories.js +69 -0
  206. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -0
  207. package/dist/collection/components/proceeds-list/example.js +12 -0
  208. package/dist/collection/components/proceeds-list/proceeds-list.css +576 -0
  209. package/dist/collection/components/proceeds-list/proceeds-list.js +207 -0
  210. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -0
  211. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +69 -0
  212. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -0
  213. package/dist/collection/components/select-input/select-input.css +344 -141
  214. package/dist/collection/components/select-input/select-input.js +5 -4
  215. package/dist/collection/components/select-input/select-input.js.map +1 -1
  216. package/dist/collection/components/select-input/test/select-input.spec.js +72 -28
  217. package/dist/collection/components/select-input/test/select-input.spec.js.map +1 -1
  218. package/dist/collection/components/table/table-utils.js +8 -0
  219. package/dist/collection/components/table/table-utils.js.map +1 -0
  220. package/dist/collection/components/table/table.css +8077 -0
  221. package/dist/collection/components/table/table.js +215 -0
  222. package/dist/collection/components/table/table.js.map +1 -0
  223. package/dist/collection/components/table/test/table.spec.js +59 -0
  224. package/dist/collection/components/table/test/table.spec.js.map +1 -0
  225. package/dist/collection/components/text-input/test/text-input.spec.js +47 -5
  226. package/dist/collection/components/text-input/test/text-input.spec.js.map +1 -1
  227. package/dist/collection/components/text-input/text-input.css +344 -141
  228. package/dist/collection/components/text-input/text-input.js +2 -2
  229. package/dist/collection/components/text-input/text-input.js.map +1 -1
  230. package/dist/collection/utils/country-options.js +202 -0
  231. package/dist/collection/utils/country-options.js.map +1 -0
  232. package/dist/collection/utils/phone-masks.js +4 -0
  233. package/dist/collection/utils/phone-masks.js.map +1 -0
  234. package/dist/collection/utils/utils.js +47 -2
  235. package/dist/collection/utils/utils.js.map +1 -1
  236. package/dist/components/Api.js +16 -3
  237. package/dist/components/Api.js.map +1 -1
  238. package/dist/{esm/Payment-c86e1e84.js → components/Payout.js} +44 -2
  239. package/dist/components/Payout.js.map +1 -0
  240. package/dist/components/additional-questions.js +51 -0
  241. package/dist/components/additional-questions.js.map +1 -0
  242. package/dist/components/billing-form.js +2 -2
  243. package/dist/components/billing-form.js.map +1 -1
  244. package/dist/components/business-address-form.js +71 -0
  245. package/dist/components/business-address-form.js.map +1 -0
  246. package/dist/components/business-generic-info.js +216 -0
  247. package/dist/components/business-generic-info.js.map +1 -0
  248. package/dist/components/business-owners.js +118 -0
  249. package/dist/components/business-owners.js.map +1 -0
  250. package/dist/components/business-representative.js +91 -0
  251. package/dist/components/business-representative.js.map +1 -0
  252. package/dist/components/details.js +66 -0
  253. package/dist/components/details.js.map +1 -0
  254. package/dist/components/{justifi-business-info.d.ts → form-control-datepart.d.ts} +4 -4
  255. package/dist/components/form-control-datepart.js +8 -0
  256. package/dist/components/form-control-datepart.js.map +1 -0
  257. package/dist/components/form-control-datepart2.js +97 -0
  258. package/dist/components/form-control-datepart2.js.map +1 -0
  259. package/dist/components/form-control-monetary.d.ts +11 -0
  260. package/dist/components/form-control-monetary.js +8 -0
  261. package/dist/components/form-control-monetary.js.map +1 -0
  262. package/dist/components/form-control-monetary2.js +82 -0
  263. package/dist/components/form-control-monetary2.js.map +1 -0
  264. package/dist/components/form-control-number-masked.d.ts +11 -0
  265. package/dist/components/form-control-number-masked.js +8 -0
  266. package/dist/components/form-control-number-masked.js.map +1 -0
  267. package/dist/components/form-control-number-masked2.js +81 -0
  268. package/dist/components/form-control-number-masked2.js.map +1 -0
  269. package/dist/components/form-control-number.d.ts +11 -0
  270. package/dist/components/form-control-number.js +8 -0
  271. package/dist/components/form-control-number.js.map +1 -0
  272. package/dist/components/form-control-number2.js +70 -0
  273. package/dist/components/form-control-number2.js.map +1 -0
  274. package/dist/components/form-control-select.d.ts +11 -0
  275. package/dist/components/form-control-select.js +8 -0
  276. package/dist/components/form-control-select.js.map +1 -0
  277. package/dist/components/form-control-select2.js +66 -0
  278. package/dist/components/form-control-select2.js.map +1 -0
  279. package/dist/components/form-control-text.d.ts +11 -0
  280. package/dist/components/form-control-text.js +8 -0
  281. package/dist/components/form-control-text.js.map +1 -0
  282. package/dist/components/form-control-text2.js +70 -0
  283. package/dist/components/form-control-text2.js.map +1 -0
  284. package/dist/components/index.d.ts +6 -0
  285. package/dist/components/index.esm.js +281 -14
  286. package/dist/components/index.esm.js.map +1 -1
  287. package/dist/components/index.js +1 -1
  288. package/dist/components/index2.js +3231 -0
  289. package/dist/components/index2.js.map +1 -0
  290. package/dist/components/justifi-additional-questions.d.ts +11 -0
  291. package/dist/components/justifi-additional-questions.js +8 -0
  292. package/dist/components/justifi-additional-questions.js.map +1 -0
  293. package/dist/components/justifi-bank-account-form.js +7 -2
  294. package/dist/components/justifi-bank-account-form.js.map +1 -1
  295. package/dist/components/justifi-business-address-form.d.ts +11 -0
  296. package/dist/components/justifi-business-address-form.js +8 -0
  297. package/dist/components/justifi-business-address-form.js.map +1 -0
  298. package/dist/components/justifi-business-form.d.ts +11 -0
  299. package/dist/components/justifi-business-form.js +920 -0
  300. package/dist/components/justifi-business-form.js.map +1 -0
  301. package/dist/components/justifi-business-generic-info.d.ts +11 -0
  302. package/dist/components/justifi-business-generic-info.js +8 -0
  303. package/dist/components/justifi-business-generic-info.js.map +1 -0
  304. package/dist/components/justifi-business-list.d.ts +11 -0
  305. package/dist/components/justifi-business-list.js +215 -0
  306. package/dist/components/justifi-business-list.js.map +1 -0
  307. package/dist/components/justifi-business-owners.d.ts +11 -0
  308. package/dist/components/justifi-business-owners.js +8 -0
  309. package/dist/components/justifi-business-owners.js.map +1 -0
  310. package/dist/components/justifi-business-representative.d.ts +11 -0
  311. package/dist/components/justifi-business-representative.js +8 -0
  312. package/dist/components/justifi-business-representative.js.map +1 -0
  313. package/dist/components/justifi-card-form.js +7 -2
  314. package/dist/components/justifi-card-form.js.map +1 -1
  315. package/dist/components/justifi-details.d.ts +11 -0
  316. package/dist/components/justifi-details.js +8 -0
  317. package/dist/components/justifi-details.js.map +1 -0
  318. package/dist/components/justifi-legal-address-form.d.ts +11 -0
  319. package/dist/components/justifi-legal-address-form.js +8 -0
  320. package/dist/components/justifi-legal-address-form.js.map +1 -0
  321. package/dist/components/justifi-payment-details.d.ts +11 -0
  322. package/dist/components/justifi-payment-details.js +88 -0
  323. package/dist/components/justifi-payment-details.js.map +1 -0
  324. package/dist/components/justifi-payment-form.js +24 -4
  325. package/dist/components/justifi-payment-form.js.map +1 -1
  326. package/dist/components/justifi-payments-list.js +88 -4041
  327. package/dist/components/justifi-payments-list.js.map +1 -1
  328. package/dist/components/justifi-payout-details.d.ts +11 -0
  329. package/dist/components/justifi-payout-details.js +86 -0
  330. package/dist/components/justifi-payout-details.js.map +1 -0
  331. package/dist/components/justifi-payouts-list.d.ts +11 -0
  332. package/dist/components/justifi-payouts-list.js +149 -0
  333. package/dist/components/justifi-payouts-list.js.map +1 -0
  334. package/dist/components/justifi-proceeds-list.d.ts +11 -0
  335. package/dist/components/justifi-proceeds-list.js +182 -0
  336. package/dist/components/justifi-proceeds-list.js.map +1 -0
  337. package/dist/components/justifi-table.d.ts +11 -0
  338. package/dist/components/justifi-table.js +8 -0
  339. package/dist/components/justifi-table.js.map +1 -0
  340. package/dist/components/legal-address-form.js +271 -0
  341. package/dist/components/legal-address-form.js.map +1 -0
  342. package/dist/components/payment-method-form.js +25 -18
  343. package/dist/components/payment-method-form.js.map +1 -1
  344. package/dist/components/payment-method-selector.js +1 -1
  345. package/dist/components/payment-method-selector.js.map +1 -1
  346. package/dist/components/phone-masks.js +7 -0
  347. package/dist/components/phone-masks.js.map +1 -0
  348. package/dist/components/select-input2.js +3 -3
  349. package/dist/components/select-input2.js.map +1 -1
  350. package/dist/components/state-options.js.map +1 -1
  351. package/dist/components/table.js +94 -0
  352. package/dist/components/table.js.map +1 -0
  353. package/dist/components/text-input2.js +2 -2
  354. package/dist/components/text-input2.js.map +1 -1
  355. package/dist/components/utils.js +3911 -0
  356. package/dist/components/utils.js.map +1 -0
  357. package/dist/esm/{Api-a07f0057.js → Api-a95f17ac.js} +17 -4
  358. package/dist/esm/Api-a95f17ac.js.map +1 -0
  359. package/dist/{components/Payment.js → esm/Payout-9a1f2859.js} +44 -2
  360. package/dist/esm/Payout-9a1f2859.js.map +1 -0
  361. package/dist/esm/business-form-schema-5885d3d6.js +146 -0
  362. package/dist/esm/business-form-schema-5885d3d6.js.map +1 -0
  363. package/dist/esm/form-control-datepart_2.entry.js +102 -0
  364. package/dist/esm/form-control-datepart_2.entry.js.map +1 -0
  365. package/dist/esm/form-control-monetary.entry.js +61 -0
  366. package/dist/esm/form-control-monetary.entry.js.map +1 -0
  367. package/dist/esm/form-control-number_3.entry.js +142 -0
  368. package/dist/esm/form-control-number_3.entry.js.map +1 -0
  369. package/dist/esm/form-control-select.entry.js +43 -0
  370. package/dist/esm/form-control-select.entry.js.map +1 -0
  371. package/dist/esm/index-5ed53c20.js +3231 -0
  372. package/dist/esm/index-5ed53c20.js.map +1 -0
  373. package/dist/esm/{index-044f93fc.js → index-609a2c67.js} +145 -21
  374. package/dist/esm/index-609a2c67.js.map +1 -0
  375. package/dist/esm/{index.esm-5624a5ed.js → index.esm-89fe6af9.js} +282 -15
  376. package/dist/esm/index.esm-89fe6af9.js.map +1 -0
  377. package/dist/esm/justifi-additional-questions_5.entry.js +388 -0
  378. package/dist/esm/justifi-additional-questions_5.entry.js.map +1 -0
  379. package/dist/esm/justifi-bank-account-form.entry.js +8 -3
  380. package/dist/esm/justifi-bank-account-form.entry.js.map +1 -1
  381. package/dist/esm/justifi-billing-form_2.entry.js +5 -5
  382. package/dist/esm/justifi-billing-form_2.entry.js.map +1 -1
  383. package/dist/esm/justifi-business-form.entry.js +829 -0
  384. package/dist/esm/justifi-business-form.entry.js.map +1 -0
  385. package/dist/esm/justifi-business-list.entry.js +185 -0
  386. package/dist/esm/justifi-business-list.entry.js.map +1 -0
  387. package/dist/esm/justifi-card-form.entry.js +8 -3
  388. package/dist/esm/justifi-card-form.entry.js.map +1 -1
  389. package/dist/esm/justifi-details.entry.js +26 -0
  390. package/dist/esm/justifi-details.entry.js.map +1 -0
  391. package/dist/esm/justifi-payment-details.entry.js +59 -0
  392. package/dist/esm/justifi-payment-details.entry.js.map +1 -0
  393. package/dist/esm/justifi-payment-form.entry.js +22 -4
  394. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  395. package/dist/esm/justifi-payment-method-form.entry.js +26 -19
  396. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  397. package/dist/esm/justifi-payments-list.entry.js +78 -4039
  398. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  399. package/dist/esm/justifi-payout-details.entry.js +57 -0
  400. package/dist/esm/justifi-payout-details.entry.js.map +1 -0
  401. package/dist/esm/justifi-payouts-list.entry.js +119 -0
  402. package/dist/esm/justifi-payouts-list.entry.js.map +1 -0
  403. package/dist/esm/justifi-proceeds-list.entry.js +152 -0
  404. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -0
  405. package/dist/esm/justifi-table.entry.js +64 -0
  406. package/dist/esm/justifi-table.entry.js.map +1 -0
  407. package/dist/esm/loader.js +4 -13
  408. package/dist/esm/loader.js.map +1 -1
  409. package/dist/esm/select-input_2.entry.js +6 -6
  410. package/dist/esm/select-input_2.entry.js.map +1 -1
  411. package/dist/esm/{state-options-188acc34.js → state-options-ece00aa2.js} +1 -1
  412. package/dist/esm/state-options-ece00aa2.js.map +1 -0
  413. package/dist/esm/table-utils-6cdcaa8c.js +11 -0
  414. package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
  415. package/dist/esm/utils-ad0bbe03.js +3911 -0
  416. package/dist/esm/utils-ad0bbe03.js.map +1 -0
  417. package/dist/esm/utils-cdf0b984.js +28 -0
  418. package/dist/esm/utils-cdf0b984.js.map +1 -0
  419. package/dist/esm/webcomponents.js +4 -7
  420. package/dist/esm/webcomponents.js.map +1 -1
  421. package/dist/types/api/Api.d.ts +1 -1
  422. package/dist/types/api/Business.d.ts +133 -0
  423. package/dist/types/api/Payment.d.ts +1 -0
  424. package/dist/types/api/Payout.d.ts +60 -0
  425. package/dist/types/api/Proceed.d.ts +60 -0
  426. package/dist/types/api/index.d.ts +1 -0
  427. package/dist/types/api/shared.d.ts +11 -0
  428. package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
  429. package/dist/types/components/business-form/business-address/business-address-form.d.ts +9 -0
  430. package/dist/types/components/business-form/business-form-schema.d.ts +119 -0
  431. package/dist/types/components/business-form/business-form.d.ts +19 -0
  432. package/dist/types/components/business-form/business-form.stories.d.ts +21 -0
  433. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +15 -0
  434. package/dist/types/components/business-form/business-owners/business-owners.d.ts +33 -0
  435. package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +15 -0
  436. package/dist/types/components/business-form/business-representative/business-representative.d.ts +11 -0
  437. package/dist/types/components/business-list/business-list.d.ts +35 -0
  438. package/dist/types/components/business-list/business-list.stories.d.ts +9 -0
  439. package/dist/types/components/details/details.d.ts +7 -0
  440. package/dist/types/components/details/utils.d.ts +19 -0
  441. package/dist/types/components/form/form-control-datepart.d.ts +19 -0
  442. package/dist/types/components/form/form-control-monetary.d.ts +17 -0
  443. package/dist/types/components/form/form-control-number-masked.d.ts +19 -0
  444. package/dist/types/components/form/form-control-number.d.ts +18 -0
  445. package/dist/types/components/form/form-control-select.d.ts +21 -0
  446. package/dist/types/components/form/form-control-text.d.ts +18 -0
  447. package/dist/types/components/form/form.d.ts +22 -0
  448. package/dist/types/components/legal-address-form/legal-address-form-schema.d.ts +17 -0
  449. package/dist/types/components/legal-address-form/legal-address-form.d.ts +16 -0
  450. package/dist/types/components/payment-details/payment-details.d.ts +28 -0
  451. package/dist/types/components/payment-details/payment-details.stories.d.ts +8 -0
  452. package/dist/types/components/payment-form/payment-form.d.ts +2 -0
  453. package/dist/types/components/payment-method-form/theme.d.ts +2 -0
  454. package/dist/types/components/payments-list/payments-list.d.ts +30 -5
  455. package/dist/types/components/payments-list/payments-list.stories.d.ts +10 -0
  456. package/dist/types/components/payout-details/payout-details.d.ts +28 -0
  457. package/dist/types/components/payout-details/payout-details.stories.d.ts +8 -0
  458. package/dist/types/components/payouts-list/payouts-list.d.ts +37 -0
  459. package/dist/types/components/payouts-list/payouts-list.stories.d.ts +9 -0
  460. package/dist/types/components/proceeds-list/proceeds-list.d.ts +37 -0
  461. package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +9 -0
  462. package/dist/types/components/table/table-utils.d.ts +14 -0
  463. package/dist/types/components/table/table.d.ts +28 -0
  464. package/dist/types/components.d.ts +964 -28
  465. package/dist/types/stencil-public-runtime.d.ts +16 -2
  466. package/dist/types/utils/country-options.d.ts +5 -0
  467. package/dist/types/utils/phone-masks.d.ts +3 -0
  468. package/dist/types/utils/utils.d.ts +3 -0
  469. package/dist/webcomponents/p-0237a6bc.entry.js +2 -0
  470. package/dist/webcomponents/p-0237a6bc.entry.js.map +1 -0
  471. package/dist/webcomponents/p-0d6e9f76.entry.js +2 -0
  472. package/dist/webcomponents/p-0d6e9f76.entry.js.map +1 -0
  473. package/dist/webcomponents/p-126146d4.js +2 -0
  474. package/dist/webcomponents/p-126146d4.js.map +1 -0
  475. package/dist/webcomponents/p-239564c6.entry.js +2 -0
  476. package/dist/webcomponents/p-239564c6.entry.js.map +1 -0
  477. package/dist/webcomponents/p-27b15fe8.entry.js +2 -0
  478. package/dist/webcomponents/p-27b15fe8.entry.js.map +1 -0
  479. package/dist/webcomponents/p-2c2cde2d.js +2 -0
  480. package/dist/webcomponents/p-2c2cde2d.js.map +1 -0
  481. package/dist/webcomponents/p-308b6784.js +3 -0
  482. package/dist/webcomponents/p-308b6784.js.map +1 -0
  483. package/dist/webcomponents/p-391b8f1d.entry.js +2 -0
  484. package/dist/webcomponents/p-391b8f1d.entry.js.map +1 -0
  485. package/dist/webcomponents/p-439fc294.entry.js +2 -0
  486. package/dist/webcomponents/p-439fc294.entry.js.map +1 -0
  487. package/dist/webcomponents/{p-0ea23153.js → p-47bc59b5.js} +1 -1
  488. package/dist/webcomponents/p-47bc59b5.js.map +1 -0
  489. package/dist/webcomponents/p-66f010e5.entry.js +2 -0
  490. package/dist/webcomponents/p-66f010e5.entry.js.map +1 -0
  491. package/dist/webcomponents/p-7abb092c.entry.js +2 -0
  492. package/dist/webcomponents/p-7abb092c.entry.js.map +1 -0
  493. package/dist/webcomponents/p-7e3bbe32.entry.js +2 -0
  494. package/dist/webcomponents/p-7e3bbe32.entry.js.map +1 -0
  495. package/dist/webcomponents/p-86464cab.entry.js +2 -0
  496. package/dist/webcomponents/p-86464cab.entry.js.map +1 -0
  497. package/dist/webcomponents/p-8f421dc6.js +2 -0
  498. package/dist/webcomponents/p-8f421dc6.js.map +1 -0
  499. package/dist/webcomponents/p-9346ae33.js +2 -0
  500. package/dist/webcomponents/p-9346ae33.js.map +1 -0
  501. package/dist/webcomponents/p-ab0756ff.js +2 -0
  502. package/dist/webcomponents/p-ab0756ff.js.map +1 -0
  503. package/dist/webcomponents/p-b042bf80.entry.js +2 -0
  504. package/dist/webcomponents/p-b042bf80.entry.js.map +1 -0
  505. package/dist/webcomponents/p-b967262f.entry.js +2 -0
  506. package/dist/webcomponents/p-b967262f.entry.js.map +1 -0
  507. package/dist/webcomponents/p-bf9c2be2.entry.js +2 -0
  508. package/dist/webcomponents/p-bf9c2be2.entry.js.map +1 -0
  509. package/dist/webcomponents/p-c18d876e.entry.js +2 -0
  510. package/dist/webcomponents/p-c18d876e.entry.js.map +1 -0
  511. package/dist/webcomponents/p-c1e4288d.entry.js +2 -0
  512. package/dist/webcomponents/p-c1e4288d.entry.js.map +1 -0
  513. package/dist/webcomponents/p-c46241ba.js +2 -0
  514. package/dist/webcomponents/p-c46241ba.js.map +1 -0
  515. package/dist/webcomponents/p-ccb0e1c5.js +2 -0
  516. package/dist/webcomponents/p-ccb0e1c5.js.map +1 -0
  517. package/dist/webcomponents/p-d1bbf409.entry.js +2 -0
  518. package/dist/webcomponents/p-d1bbf409.entry.js.map +1 -0
  519. package/dist/webcomponents/p-e26d7eea.entry.js +2 -0
  520. package/dist/webcomponents/p-e26d7eea.entry.js.map +1 -0
  521. package/dist/webcomponents/p-e77d8c6e.entry.js +2 -0
  522. package/dist/webcomponents/p-e77d8c6e.entry.js.map +1 -0
  523. package/dist/webcomponents/p-f0acb27e.entry.js +2 -0
  524. package/dist/webcomponents/p-f0acb27e.entry.js.map +1 -0
  525. package/dist/webcomponents/p-f8d49acb.entry.js +2 -0
  526. package/dist/webcomponents/p-f8d49acb.entry.js.map +1 -0
  527. package/dist/webcomponents/p-f9e127a5.js +2 -0
  528. package/dist/webcomponents/p-f9e127a5.js.map +1 -0
  529. package/dist/webcomponents/webcomponents.css +1 -1
  530. package/dist/webcomponents/webcomponents.esm.js +1 -1
  531. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  532. package/loader/index.d.ts +1 -1
  533. package/package.json +16 -16
  534. package/CHANGELOG.md +0 -208
  535. package/changelog-template.hbs +0 -10
  536. package/dist/cjs/Api-11362403.js.map +0 -1
  537. package/dist/cjs/Payment-ac4dea02.js.map +0 -1
  538. package/dist/cjs/index-34312a38.js.map +0 -1
  539. package/dist/cjs/index.esm-bcf90c56.js.map +0 -1
  540. package/dist/cjs/justifi-business-address.cjs.entry.js +0 -69
  541. package/dist/cjs/justifi-business-address.cjs.entry.js.map +0 -1
  542. package/dist/cjs/justifi-business-info.cjs.entry.js +0 -174
  543. package/dist/cjs/justifi-business-info.cjs.entry.js.map +0 -1
  544. package/dist/cjs/state-options-efeaa587.js.map +0 -1
  545. package/dist/collection/components/business-address/business-address-schema.js.map +0 -1
  546. package/dist/collection/components/business-address/business-address.js +0 -100
  547. package/dist/collection/components/business-address/business-address.js.map +0 -1
  548. package/dist/collection/components/business-address/test/business-address.e2e.js +0 -10
  549. package/dist/collection/components/business-address/test/business-address.e2e.js.map +0 -1
  550. package/dist/collection/components/business-address/test/business-address.spec.js +0 -18
  551. package/dist/collection/components/business-address/test/business-address.spec.js.map +0 -1
  552. package/dist/collection/components/business-info/business-info-schema.js +0 -94
  553. package/dist/collection/components/business-info/business-info-schema.js.map +0 -1
  554. package/dist/collection/components/business-info/business-info.js +0 -168
  555. package/dist/collection/components/business-info/business-info.js.map +0 -1
  556. package/dist/components/Payment.js.map +0 -1
  557. package/dist/components/justifi-business-address.d.ts +0 -11
  558. package/dist/components/justifi-business-address.js +0 -99
  559. package/dist/components/justifi-business-address.js.map +0 -1
  560. package/dist/components/justifi-business-info.js +0 -207
  561. package/dist/components/justifi-business-info.js.map +0 -1
  562. package/dist/esm/Api-a07f0057.js.map +0 -1
  563. package/dist/esm/Payment-c86e1e84.js.map +0 -1
  564. package/dist/esm/index-044f93fc.js.map +0 -1
  565. package/dist/esm/index.esm-5624a5ed.js.map +0 -1
  566. package/dist/esm/justifi-business-address.entry.js +0 -65
  567. package/dist/esm/justifi-business-address.entry.js.map +0 -1
  568. package/dist/esm/justifi-business-info.entry.js +0 -170
  569. package/dist/esm/justifi-business-info.entry.js.map +0 -1
  570. package/dist/esm/polyfills/css-shim.js +0 -1
  571. package/dist/types/components/bank-account-form/bank-account-form.d.ts +0 -56
  572. package/dist/types/components/business-address/business-address.d.ts +0 -11
  573. package/dist/types/components/business-info/business-info-schema.d.ts +0 -42
  574. package/dist/types/components/business-info/business-info.d.ts +0 -20
  575. package/dist/types/components/card-form/card-form.d.ts +0 -62
  576. package/dist/webcomponents/p-0969db8f.entry.js +0 -2
  577. package/dist/webcomponents/p-0969db8f.entry.js.map +0 -1
  578. package/dist/webcomponents/p-0ea23153.js.map +0 -1
  579. package/dist/webcomponents/p-1ca0646b.js +0 -2
  580. package/dist/webcomponents/p-1ca0646b.js.map +0 -1
  581. package/dist/webcomponents/p-1f151d49.js +0 -2
  582. package/dist/webcomponents/p-1f151d49.js.map +0 -1
  583. package/dist/webcomponents/p-255b1284.entry.js +0 -2
  584. package/dist/webcomponents/p-255b1284.entry.js.map +0 -1
  585. package/dist/webcomponents/p-3aa91155.js +0 -3
  586. package/dist/webcomponents/p-3aa91155.js.map +0 -1
  587. package/dist/webcomponents/p-4ecc9860.entry.js +0 -2
  588. package/dist/webcomponents/p-4ecc9860.entry.js.map +0 -1
  589. package/dist/webcomponents/p-90c0d9e1.entry.js +0 -2
  590. package/dist/webcomponents/p-90c0d9e1.entry.js.map +0 -1
  591. package/dist/webcomponents/p-bd5352d6.entry.js +0 -2
  592. package/dist/webcomponents/p-bd5352d6.entry.js.map +0 -1
  593. package/dist/webcomponents/p-c903cc5a.entry.js +0 -2
  594. package/dist/webcomponents/p-c903cc5a.entry.js.map +0 -1
  595. package/dist/webcomponents/p-d87b0711.entry.js +0 -2
  596. package/dist/webcomponents/p-d87b0711.entry.js.map +0 -1
  597. package/dist/webcomponents/p-dbf7100f.entry.js +0 -2
  598. package/dist/webcomponents/p-dbf7100f.entry.js.map +0 -1
  599. package/dist/webcomponents/p-e0054bc3.js +0 -2
  600. package/dist/webcomponents/p-e0054bc3.js.map +0 -1
  601. package/dist/webcomponents/p-f30d1567.entry.js +0 -2
  602. package/dist/webcomponents/p-f30d1567.entry.js.map +0 -1
  603. /package/dist/types/components/{business-address/business-address-schema.d.ts → business-form/business-address/business-address-form-schema.d.ts} +0 -0
@@ -0,0 +1,209 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { Api } from "../../api";
3
+ import { pagingDefaults } from "../table/table-utils";
4
+ import { Business } from "../../api/Business";
5
+ import { formatDate } from "../../utils/utils";
6
+ /**
7
+ * @exportedPart table-head: Table head
8
+ * @exportedPart table-head-row: Head row
9
+ * @exportedPart table-head-cell: Individual head cell
10
+ * @exportedPart table-body: Body of the table
11
+ * @exportedPart table-row: Row of the table
12
+ * @exportedPart table-cell: Individual cell of the table
13
+ * @exportedPart loading-state-cell: Row for loading state
14
+ * @exportedPart loading-state-spinner: Spinner element for loading state
15
+ * @exportedPart error-state: Row for Error state
16
+ * @exportedPart empty-state: Row for Emtpy state
17
+ * @exportedPart pagination-bar: Pagination bar
18
+ * @exportedPart arrow: Both paging buttons
19
+ * @exportedPart arrow-left: Previous page button
20
+ * @exportedPart arrow-right: Next page button
21
+ * @exportedPart arrow-disabled: Disabled state for paging buttons
22
+ */
23
+ export class BusinessList {
24
+ constructor() {
25
+ this.onPageChange = (direction) => {
26
+ return () => {
27
+ this.fetchData(direction);
28
+ };
29
+ };
30
+ this.mapProductStatusToBadge = (status) => {
31
+ return status && 'bg-success' || 'bg-secondary';
32
+ };
33
+ this.mapBusinessType = (type) => {
34
+ switch (type) {
35
+ case 'individual':
36
+ return 'Individual';
37
+ case 'non_profit':
38
+ return 'Non Profit';
39
+ case 'for_profit':
40
+ return 'For Profit';
41
+ case 'government_entity':
42
+ return 'Government Entity';
43
+ }
44
+ };
45
+ this.mapBusinessStructure = (type) => {
46
+ switch (type) {
47
+ case 'sole_proprietorship':
48
+ return 'Sole Proprietorship';
49
+ case 'single_llc':
50
+ return 'Single LLC';
51
+ case 'multi_llc':
52
+ return 'Multi LLC';
53
+ case 'private_partnership':
54
+ return 'Private Partnership';
55
+ case 'private_corporation':
56
+ return 'Private Corporation';
57
+ case 'unincorporated_association':
58
+ return 'Unincorporated Association';
59
+ case 'public_partnership':
60
+ return 'Public Partnership';
61
+ case 'public_corporation':
62
+ return 'Public Corporation';
63
+ case 'incorporated':
64
+ return 'Incorporated';
65
+ case 'unincorporated':
66
+ return 'Unincorporated';
67
+ case 'government_unit':
68
+ return 'Government Unit';
69
+ case 'government_instrumentality':
70
+ return 'Government Instrumentality';
71
+ case 'tax_exempt_government_instrumentality':
72
+ return 'Tax Exempt Government Instrumentality';
73
+ }
74
+ };
75
+ this.accountId = undefined;
76
+ this.authToken = undefined;
77
+ this.businesses = [];
78
+ this.loading = true;
79
+ this.errorMessage = undefined;
80
+ this.paging = pagingDefaults;
81
+ }
82
+ updateOnPropChange() {
83
+ this.fetchData();
84
+ }
85
+ connectedCallback() {
86
+ this.fetchData();
87
+ }
88
+ async fetchData(direction) {
89
+ var _a;
90
+ if (!this.accountId || !this.authToken) {
91
+ this.errorMessage = "Can not fetch any data without an AccountID and an AuthToken";
92
+ this.loading = false;
93
+ return;
94
+ }
95
+ this.loading = true;
96
+ const endpoint = `entities/business`;
97
+ const response = await Api(this.authToken, process.env.ENTITIES_API_ORIGIN).get(endpoint, {
98
+ account_id: this.accountId,
99
+ paging: this.paging,
100
+ direction: direction
101
+ });
102
+ if (!response.error) {
103
+ this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
104
+ const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Business(dataItem));
105
+ this.businesses = data;
106
+ }
107
+ else {
108
+ this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;
109
+ }
110
+ this.loading = false;
111
+ }
112
+ render() {
113
+ return (h(Host, null, h("justifi-table", { columnData: [
114
+ ['Legal Name', 'The name associated with this Business'],
115
+ ['Business Type', 'The business type'],
116
+ ['Business Structure', 'The business structure'],
117
+ ['Tax ID', 'The tax ID associated with this business'],
118
+ ['Industry', 'The industry this business participates in'],
119
+ ['Product Ready', 'List of our products that are used by this business'],
120
+ ['Created at', 'Date this business was created'],
121
+ ], rowData: this.businesses.map((business) => ([
122
+ business.legal_name,
123
+ this.mapBusinessType(business.business_type),
124
+ this.mapBusinessStructure(business.business_structure),
125
+ business.tax_id,
126
+ business.industry,
127
+ {
128
+ type: 'inner',
129
+ value: `
130
+ <div class="d-flex flex-nowrap gap-1">
131
+ <span class="badge ${this.mapProductStatusToBadge(business.product_categories.credit)}">Credit</span>
132
+ <span class="badge ${this.mapProductStatusToBadge(business.product_categories.insurance)}">Insurance</span>
133
+ <span class="badge ${this.mapProductStatusToBadge(business.product_categories.lending)}">Lending</span>
134
+ <span class="badge ${this.mapProductStatusToBadge(business.product_categories.payment)}">Payment</span>
135
+ </div>
136
+ `
137
+ },
138
+ formatDate(business.created_at),
139
+ ])), loading: this.loading, "error-message": this.errorMessage, paging: Object.assign(Object.assign({}, this.paging), { onPrev: this.onPageChange('prev'), onNext: this.onPageChange('next') }) })));
140
+ }
141
+ static get is() { return "justifi-business-list"; }
142
+ static get encapsulation() { return "shadow"; }
143
+ static get originalStyleUrls() {
144
+ return {
145
+ "$": ["business-list.scss"]
146
+ };
147
+ }
148
+ static get styleUrls() {
149
+ return {
150
+ "$": ["business-list.css"]
151
+ };
152
+ }
153
+ static get properties() {
154
+ return {
155
+ "accountId": {
156
+ "type": "string",
157
+ "mutable": false,
158
+ "complexType": {
159
+ "original": "string",
160
+ "resolved": "string",
161
+ "references": {}
162
+ },
163
+ "required": false,
164
+ "optional": false,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": ""
168
+ },
169
+ "attribute": "account-id",
170
+ "reflect": false
171
+ },
172
+ "authToken": {
173
+ "type": "string",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "string",
177
+ "resolved": "string",
178
+ "references": {}
179
+ },
180
+ "required": false,
181
+ "optional": false,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": ""
185
+ },
186
+ "attribute": "auth-token",
187
+ "reflect": false
188
+ }
189
+ };
190
+ }
191
+ static get states() {
192
+ return {
193
+ "businesses": {},
194
+ "loading": {},
195
+ "errorMessage": {},
196
+ "paging": {}
197
+ };
198
+ }
199
+ static get watchers() {
200
+ return [{
201
+ "propName": "accountId",
202
+ "methodName": "updateOnPropChange"
203
+ }, {
204
+ "propName": "authToken",
205
+ "methodName": "updateOnPropChange"
206
+ }];
207
+ }
208
+ }
209
+ //# sourceMappingURL=business-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-list.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAA0B,MAAM,WAAW,CAAC;AACxD,OAAO,EAAc,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;;EAgBE;AAOF,MAAM,OAAO,YAAY;;IAkBvB,iBAAY,GAAG,CAAC,SAAiB,EAAE,EAAE;MACnC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;MAC5B,CAAC,CAAA;IACH,CAAC,CAAA;IAED,4BAAuB,GAAG,CAAC,MAAe,EAAE,EAAE;MAC5C,OAAO,MAAM,IAAI,YAAY,IAAI,cAAc,CAAC;IAClD,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C,CAAC;UACtD,CAAC,UAAU,EAAE,4CAA4C,CAAC;UAC1D,CAAC,eAAe,EAAE,qDAAqD,CAAC;UACxE,CAAC,YAAY,EAAE,gCAAgC,CAAC;SACjD,EACD,OAAO,EACL,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAChC;UACE,QAAQ,CAAC,UAAU;UACnB,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC;UAC5C,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,kBAAkB,CAAC;UACtD,QAAQ,CAAC,MAAM;UACf,QAAQ,CAAC,QAAQ;UACjB;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;;2CAEkB,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC;2CAChE,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,SAAS,CAAC;2CACnE,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC;2CACjE,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC;;mBAEzF;WACF;UACD,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;SAChC,CACF,CAAC,EAEJ,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACjC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAEnC,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { Api, IApiResponseCollection } from '../../api';\nimport { PagingInfo, pagingDefaults } from '../table/table-utils';\nimport { Business } from '../../api/Business';\nimport { formatDate } from '../../utils/utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart arrow-disabled: Disabled state for paging buttons\n*/\n@Component({\n tag: 'justifi-business-list',\n styleUrl: 'business-list.scss',\n shadow: true,\n})\n\nexport class BusinessList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() businesses: Business[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n\n @Watch('accountId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n onPageChange = (direction: string) => {\n return () => {\n this.fetchData(direction);\n }\n }\n\n mapProductStatusToBadge = (status: boolean) => {\n return status && 'bg-success' || 'bg-secondary';\n }\n\n mapBusinessType = (type: string) => {\n switch (type) {\n case 'individual':\n return 'Individual'\n case 'non_profit':\n return 'Non Profit'\n case 'for_profit':\n return 'For Profit'\n case 'government_entity':\n return 'Government Entity'\n }\n }\n\n mapBusinessStructure = (type: string) => {\n switch (type) {\n case 'sole_proprietorship':\n return 'Sole Proprietorship'\n case 'single_llc':\n return 'Single LLC'\n case 'multi_llc':\n return 'Multi LLC'\n case 'private_partnership':\n return 'Private Partnership'\n case 'private_corporation':\n return 'Private Corporation'\n case 'unincorporated_association':\n return 'Unincorporated Association'\n case 'public_partnership':\n return 'Public Partnership'\n case 'public_corporation':\n return 'Public Corporation'\n case 'incorporated':\n return 'Incorporated'\n case 'unincorporated':\n return 'Unincorporated'\n case 'government_unit':\n return 'Government Unit'\n case 'government_instrumentality':\n return 'Government Instrumentality'\n case 'tax_exempt_government_instrumentality':\n return 'Tax Exempt Government Instrumentality'\n }\n }\n\n async fetchData(direction?: string): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `entities/business`;\n\n const response: IApiResponseCollection<Business[]> = await Api(this.authToken, process.env.ENTITIES_API_ORIGIN).get(endpoint, {\n account_id: this.accountId,\n paging: this.paging,\n direction: direction\n });\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Business(dataItem));\n this.businesses = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n columnData={[\n ['Legal Name', 'The name associated with this Business'],\n ['Business Type', 'The business type'],\n ['Business Structure', 'The business structure'],\n ['Tax ID', 'The tax ID associated with this business'],\n ['Industry', 'The industry this business participates in'],\n ['Product Ready', 'List of our products that are used by this business'],\n ['Created at', 'Date this business was created'],\n ]}\n rowData={\n this.businesses.map((business) => (\n [\n business.legal_name,\n this.mapBusinessType(business.business_type),\n this.mapBusinessStructure(business.business_structure),\n business.tax_id,\n business.industry,\n {\n type: 'inner',\n value: `\n <div class=\"d-flex flex-nowrap gap-1\">\n <span class=\"badge ${this.mapProductStatusToBadge(business.product_categories.credit)}\">Credit</span>\n <span class=\"badge ${this.mapProductStatusToBadge(business.product_categories.insurance)}\">Insurance</span>\n <span class=\"badge ${this.mapProductStatusToBadge(business.product_categories.lending)}\">Lending</span>\n <span class=\"badge ${this.mapProductStatusToBadge(business.product_categories.payment)}\">Payment</span>\n </div>\n `\n },\n formatDate(business.created_at),\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n paging={{\n ...this.paging,\n onPrev: this.onPageChange('prev'),\n onNext: this.onPageChange('next')\n }}\n />\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,68 @@
1
+ export default {
2
+ title: 'dev/Components/BusinessList',
3
+ component: 'justifi-business-list',
4
+ parameters: {}
5
+ };
6
+ class BusinessListArgs {
7
+ constructor(args) {
8
+ this['auth-token'] = args['auth-token'] || '';
9
+ this['account-id'] = args['account-id'] || '';
10
+ }
11
+ }
12
+ const Template = (args) => {
13
+ return (`
14
+ <justifi-business-list
15
+ data-testid="justifi-business-list"
16
+ auth-token="${args['auth-token']}"
17
+ account-id="${args['account-id']}"
18
+ />
19
+ `);
20
+ };
21
+ export const Basic = Template.bind({});
22
+ Basic.args = new BusinessListArgs({});
23
+ export const Styled = Template.bind({});
24
+ Styled.args = new BusinessListArgs({});
25
+ Styled.decorators = [
26
+ (Story) => `
27
+ ${Story()}
28
+ <style>
29
+ justifi-business-list::part(table-head-cell) {
30
+ background-color: #F4F4F6;
31
+ }
32
+ justifi-business-list::part(pagination-bar) {
33
+ background-color: #F4F4F6;
34
+ }
35
+ justifi-business-list::part(arrow) {
36
+ --bs-btn-disabled-bg: #212529;
37
+ --bs-btn-disabled-border-color: #212529;
38
+ --bs-btn-bg: #212529;
39
+ --bs-btn-border-color: #212529;
40
+ --bs-btn-hover-bg: #fccc32;
41
+ --bs-btn-hover-border-color: #fccc32;
42
+ }
43
+ justifi-business-list::part(error-state) {
44
+ color: red;
45
+ background-color: #EEEEF5;
46
+ }
47
+ justifi-business-list::part(loading-state-cell) {
48
+ background-color: #EEEEF5;
49
+ }
50
+ justifi-business-list::part(table-row) {
51
+ background-color: #EEEEF5;
52
+ }
53
+ justifi-business-list::part(table-row-even) {
54
+ background-color: #F4F4F6;
55
+ }
56
+ </style>
57
+ `
58
+ ];
59
+ export const Contained = Template.bind({});
60
+ Contained.decorators = [
61
+ (Story) => `
62
+ <div style="position: relative; width: 900px; height: 300px; overflow-x: hidden;">
63
+ ${Story()}
64
+ </div>
65
+ `
66
+ ];
67
+ Contained.args = new BusinessListArgs({});
68
+ //# sourceMappingURL=business-list.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-list.stories.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;EAChD,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,UAAU,GAAG;EACrB,CAAC,KAAK,EAAE,EAAE,CAAC;;QAEL,KAAK,EAAE;;GAEZ;CACF,CAAA;AACD,SAAS,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["export default {\n title: 'dev/Components/BusinessList',\n component: 'justifi-business-list',\n parameters: {}\n};\n\nclass BusinessListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['account-id'] = args['account-id'] || '';\n }\n}\n\nconst Template = (args: BusinessListArgs) => {\n return (`\n <justifi-business-list\n data-testid=\"justifi-business-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-business-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-business-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-business-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n\nexport const Contained = Template.bind({});\nContained.decorators = [\n (Story) => `\n <div style=\"position: relative; width: 900px; height: 300px; overflow-x: hidden;\">\n ${Story()}\n </div>\n `\n]\nContained.args = new BusinessListArgs({});\n"]}
@@ -0,0 +1,12 @@
1
+ import { head } from '../../../storybook-pages/example-parts';
2
+
3
+ export default `<!DOCTYPE html>
4
+ <html dir="ltr" lang="en">
5
+
6
+ ${head('justifi-business-list')}
7
+
8
+ <body>
9
+ <justifi-business-list></justifi-business-list>
10
+ </body>
11
+
12
+ </html>`;
@@ -1,4 +1,4 @@
1
- import { h } from '@stencil/core';
1
+ import { h } from "@stencil/core";
2
2
  export class CardForm {
3
3
  constructor() {
4
4
  this.validationMode = undefined;
@@ -7,12 +7,16 @@ export class CardForm {
7
7
  this.internalStyleOverrides = undefined;
8
8
  }
9
9
  readyHandler(event) {
10
+ console.warn(`The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'`);
10
11
  this.cardFormReady.emit(event);
12
+ this.ready.emit(event);
11
13
  }
12
14
  tokenizeHandler(event) {
15
+ console.warn(`The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
13
16
  this.cardFormTokenize.emit(event);
14
17
  }
15
18
  validateHandler(event) {
19
+ console.warn(`The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
16
20
  this.cardFormValidate.emit(event);
17
21
  }
18
22
  /**
@@ -34,8 +38,8 @@ export class CardForm {
34
38
  return this.childRef.validate();
35
39
  }
36
40
  /**
37
- * Manually resizes the iframe to fit the contents of the iframe
38
- */
41
+ * Manually resizes the iframe to fit the contents of the iframe
42
+ */
39
43
  async resize() {
40
44
  if (!this.childRef) {
41
45
  throw new Error('Cannot call validate');
@@ -130,6 +134,24 @@ export class CardForm {
130
134
  "resolved": "any",
131
135
  "references": {}
132
136
  }
137
+ }, {
138
+ "method": "ready",
139
+ "name": "ready",
140
+ "bubbles": true,
141
+ "cancelable": true,
142
+ "composed": true,
143
+ "docs": {
144
+ "tags": [{
145
+ "name": "event",
146
+ "text": "justifi-card-form#ready"
147
+ }],
148
+ "text": "Triggered when iframe has loaded"
149
+ },
150
+ "complexType": {
151
+ "original": "any",
152
+ "resolved": "any",
153
+ "references": {}
154
+ }
133
155
  }, {
134
156
  "method": "cardFormTokenize",
135
157
  "name": "cardFormTokenize",
@@ -172,24 +194,28 @@ export class CardForm {
172
194
  return {
173
195
  "tokenize": {
174
196
  "complexType": {
175
- "signature": "(clientId: string, paymentMethodMetadata: any, account?: string) => Promise<CreatePaymentMethodResponse>",
197
+ "signature": "(...args: Parameters<HTMLJustifiPaymentMethodFormElement['tokenize']>) => Promise<CreatePaymentMethodResponse>",
176
198
  "parameters": [{
177
199
  "tags": [],
178
200
  "text": ""
179
201
  }],
180
202
  "references": {
181
203
  "Promise": {
182
- "location": "global"
204
+ "location": "global",
205
+ "id": "global::Promise"
183
206
  },
184
207
  "CreatePaymentMethodResponse": {
185
208
  "location": "import",
186
- "path": "../payment-method-form/payment-method-responses"
209
+ "path": "../payment-method-form/payment-method-responses",
210
+ "id": "src/components/payment-method-form/payment-method-responses.ts::CreatePaymentMethodResponse"
187
211
  },
188
212
  "Parameters": {
189
- "location": "global"
213
+ "location": "global",
214
+ "id": "global::Parameters"
190
215
  },
191
216
  "HTMLJustifiPaymentMethodFormElement": {
192
- "location": "global"
217
+ "location": "global",
218
+ "id": "global::HTMLJustifiPaymentMethodFormElement"
193
219
  }
194
220
  },
195
221
  "return": "Promise<CreatePaymentMethodResponse>"
@@ -205,7 +231,8 @@ export class CardForm {
205
231
  "parameters": [],
206
232
  "references": {
207
233
  "Promise": {
208
- "location": "global"
234
+ "location": "global",
235
+ "id": "global::Promise"
209
236
  }
210
237
  },
211
238
  "return": "Promise<{ isValid: boolean; }>"
@@ -221,7 +248,8 @@ export class CardForm {
221
248
  "parameters": [],
222
249
  "references": {
223
250
  "Promise": {
224
- "location": "global"
251
+ "location": "global",
252
+ "id": "global::Promise"
225
253
  }
226
254
  },
227
255
  "return": "Promise<void>"
@@ -1 +1 @@
1
- {"version":3,"file":"card-form.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAg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M,iBAClB,IAAI,CAAC,UAAU,+BACD,IAAI,CAAC,aAAa,kCACf,IAAI,CAAC,gBAAgB,yCACd,IAAI,CAAC,cAAc,IAAI,UAAU,GACtE,CACH,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, Prop, h, EventEmitter, Method, Listen, State } from '@stencil/core';\nimport { CreatePaymentMethodResponse } from '../payment-method-form/payment-method-responses';\nimport { Theme } from '../payment-method-form/theme';\n\n@Component({\n tag: 'justifi-card-form',\n shadow: false,\n})\nexport class CardForm {\n /**\n * When to trigger validation of the form.\n */\n @Prop({ mutable: true }) validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n\n /**\n * URL for the rendered iFrame. End-users need not use this.\n */\n @Prop({ mutable: true }) iframeOrigin?: string;\n\n /**\n * Boolean indicating if the Card Form should render in a single line\n */\n @Prop() singleLine: boolean = false;\n @State() internalStyleOverrides: Theme;\n\n /**\n * Triggered when iframe has loaded\n * @event justifi-card-form#cardFormReady\n */\n\n @Event() cardFormReady: EventEmitter;\n\n /**\n * Triggered when the tokenize method is called on the component\n * @event justifi-card-form#cardFormTokenize\n */\n @Event() cardFormTokenize: EventEmitter<{ data: any }>;\n\n /**\n * Triggered when the validate method is called on the component\n * @event justifi-card-form#cardFormTokenize\n */\n @Event() cardFormValidate: EventEmitter<{ data: { isValid: boolean } }>;\n\n @Listen('paymentMethodFormReady')\n readyHandler(event: CustomEvent) {\n this.cardFormReady.emit(event);\n }\n\n @Listen('paymentMethodFormTokenize')\n tokenizeHandler(event: { data: any }) {\n this.cardFormTokenize.emit(event);\n }\n\n @Listen('paymentMethodFormValidate')\n validateHandler(event: { data: any }) {\n this.cardFormValidate.emit(event);\n }\n\n private childRef?: HTMLJustifiPaymentMethodFormElement;\n\n /**\n * Makes a tokenization request to the iframe\n */\n @Method()\n async tokenize(...args: Parameters<HTMLJustifiPaymentMethodFormElement['tokenize']>): Promise<CreatePaymentMethodResponse> {\n if (!this.childRef) {\n throw new Error('Cannot call tokenize');\n }\n return this.childRef.tokenize(...args);\n }\n\n /**\n * Runs a validation on the form and shows errors if any\n */\n @Method()\n async validate(): Promise<{ isValid: boolean }> {\n if (!this.childRef) {\n throw new Error('Cannot call validate');\n }\n return this.childRef.validate();\n }\n\n /**\n * Manually resizes the iframe to fit the contents of the iframe\n */\n @Method()\n async resize(): Promise<void> {\n if (!this.childRef) {\n throw new Error('Cannot call validate');\n }\n return this.childRef.resize();\n }\n\n render() {\n return (\n <justifi-payment-method-form\n ref={el => {\n if (el) {\n this.childRef = el;\n }\n }}\n iframe-origin={this.iframeOrigin}\n payment-method-form-type=\"card\"\n single-line={this.singleLine}\n payment-method-form-ready={this.cardFormReady}\n payment-method-form-tokenize={this.cardFormTokenize}\n payment-method-form-validation-mode={this.validationMode || 'onSubmit'}\n />\n );\n }\n}\n"]}
1
+ {"version":3,"file":"card-form.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAgB,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ/F,MAAM,OAAO,QAAQ;;;;sBAcW,KAAK;;;EA+BnC,YAAY,CAAC,KAAkB;IAC7B,OAAO,CAAC,IAAI,CAAC,kGAAkG,CAAC,CAAC;IACjH,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;EACzB,CAAC;EAGD,eAAe,C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H,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, Prop, h, EventEmitter, Method, Listen, State } from '@stencil/core';\nimport { CreatePaymentMethodResponse } from '../payment-method-form/payment-method-responses';\nimport { Theme } from '../payment-method-form/theme';\n\n@Component({\n tag: 'justifi-card-form',\n shadow: false,\n})\nexport class CardForm {\n /**\n * When to trigger validation of the form.\n */\n @Prop({ mutable: true }) validationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n\n /**\n * URL for the rendered iFrame. End-users need not use this.\n */\n @Prop({ mutable: true }) iframeOrigin?: string;\n\n /**\n * Boolean indicating if the Card Form should render in a single line\n */\n @Prop() singleLine: boolean = false;\n\n @State() internalStyleOverrides: Theme;\n\n /**\n * Triggered when iframe has loaded\n * @event justifi-card-form#cardFormReady\n */\n\n @Event() cardFormReady: EventEmitter;\n\n /**\n * Triggered when iframe has loaded\n * @event justifi-card-form#ready\n */\n\n @Event() ready: EventEmitter;\n\n /**\n * Triggered when the tokenize method is called on the component\n * @event justifi-card-form#cardFormTokenize\n */\n @Event() cardFormTokenize: EventEmitter<{ data: any }>;\n\n /**\n * Triggered when the validate method is called on the component\n * @event justifi-card-form#cardFormTokenize\n */\n @Event() cardFormValidate: EventEmitter<{ data: { isValid: boolean } }>;\n\n @Listen('paymentMethodFormReady')\n readyHandler(event: CustomEvent) {\n console.warn(`The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'`);\n this.cardFormReady.emit(event);\n this.ready.emit(event);\n }\n\n @Listen('paymentMethodFormTokenize')\n tokenizeHandler(event: { data: any }) {\n console.warn(\n `The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`,\n );\n this.cardFormTokenize.emit(event);\n }\n\n @Listen('paymentMethodFormValidate')\n validateHandler(event: { data: any }) {\n console.warn(\n `The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`,\n );\n this.cardFormValidate.emit(event);\n }\n\n private childRef?: HTMLJustifiPaymentMethodFormElement;\n\n /**\n * Makes a tokenization request to the iframe\n */\n @Method()\n async tokenize(...args: Parameters<HTMLJustifiPaymentMethodFormElement['tokenize']>): Promise<CreatePaymentMethodResponse> {\n if (!this.childRef) {\n throw new Error('Cannot call tokenize');\n }\n return this.childRef.tokenize(...args);\n }\n\n /**\n * Runs a validation on the form and shows errors if any\n */\n @Method()\n async validate(): Promise<{ isValid: boolean }> {\n if (!this.childRef) {\n throw new Error('Cannot call validate');\n }\n return this.childRef.validate();\n }\n\n /**\n * Manually resizes the iframe to fit the contents of the iframe\n */\n @Method()\n async resize(): Promise<void> {\n if (!this.childRef) {\n throw new Error('Cannot call validate');\n }\n return this.childRef.resize();\n }\n\n render() {\n return (\n <justifi-payment-method-form\n ref={el => {\n if (el) {\n this.childRef = el;\n }\n }}\n iframe-origin={this.iframeOrigin}\n payment-method-form-type=\"card\"\n single-line={this.singleLine}\n payment-method-form-ready={this.cardFormReady}\n payment-method-form-tokenize={this.cardFormTokenize}\n payment-method-form-validation-mode={this.validationMode || 'onSubmit'}\n />\n );\n }\n}\n"]}
@@ -95,11 +95,13 @@ SingleLine.args = {
95
95
  'single-line': true,
96
96
  };
97
97
  const styledVariables = `
98
+ --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';
99
+ --jfi-layout-font-family: Agdasima;
98
100
  --jfi-layout-padding: 4px;
99
101
  --jfi-layout-form-control-spacing-x: .5rem;
100
102
  --jfi-layout-form-control-spacing-y: 1rem;
101
- --jfi-form-label-font-weight: 700;
102
- --jfi-form-label-font-family: sans-serif;
103
+ --jfi-form-label-font-weight: 100;
104
+ --jfi-form-label-font-family: Inter;
103
105
  --jfi-form-label-margin: 0 0 .5rem 0;
104
106
  --jfi-form-control-background-color: #F4F4F6;
105
107
  --jfi-form-control-background-color-hover: #EEEEF5;
@@ -129,6 +131,7 @@ const styledVariables = `
129
131
  `;
130
132
  export const Styled = Template.bind({});
131
133
  Styled.args = {
134
+ 'single-line': false,
132
135
  'css-variables': styledVariables,
133
136
  };
134
137
  //# sourceMappingURL=card-form.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAOA,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAErD,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;QAC7B,QAAQ,EAAE,OAAO;OAClB;KACF;GACF;EACD,UAAU,EAAE;IACV,KAAK,CAAC,EAAE,CAAC;QACL,KAAK,EAAE;gBACC,SAAS,EAAE;KACtB;GACF;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACzE,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;EACxC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,iBAAiB,EAAE,EAAE;EAC5F,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;EACjF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MAAM,cAAc,GAAG,IAAI,CAAC;EAE5B,OAAO;;;;UAIC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;;;;;2BAKV,IAAI,CAAC,iBAAiB,CAAC,IAAI,UAAU;yBACvC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;uBAC7B,IAAI,CAAC,aAAa,CAAC;;;MAGpC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;GACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,iBAAiB,EAAE,UAAU;EAC7B,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;EAChB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["interface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nconst isDev = process.env.NODE_ENV === 'development';\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'iframe-origin': {\n control: 'text',\n table: {\n disable: isDev ? false : true,\n category: 'props',\n },\n },\n },\n decorators: [\n story => `\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${args['iframe-origin'] || ''}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: sans-serif;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'css-variables': styledVariables,\n};\n"]}
1
+ {"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAOA,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAErD,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;QAC7B,QAAQ,EA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CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,KAAK;EACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["interface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nconst isDev = process.env.NODE_ENV === 'development';\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'iframe-origin': {\n control: 'text',\n table: {\n disable: isDev ? false : true,\n category: 'props',\n },\n },\n },\n decorators: [\n story => `\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${args['iframe-origin'] || ''}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { newE2EPage } from '@stencil/core/testing';
1
+ import { newE2EPage } from "@stencil/core/testing";
2
2
  describe('justifi-card-form', () => {
3
3
  it('should emit "cardFormReady" event when "paymentMethodFormReady" event is fired', async () => {
4
4
  const page = await newE2EPage();
@@ -1,6 +1,6 @@
1
- import { newSpecPage } from '@stencil/core/testing';
2
- import { CardForm } from '../card-form';
3
- import { PaymentMethodForm } from '../../payment-method-form/payment-method-form';
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { CardForm } from "../card-form";
3
+ import { PaymentMethodForm } from "../../payment-method-form/payment-method-form";
4
4
  describe('justifi-card-form', () => {
5
5
  it('should pass validationMode prop to justifi-payment-method-form', async () => {
6
6
  const page = await newSpecPage({