@justifi/webcomponents 6.12.4 → 6.12.6-rc.1

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 (336) hide show
  1. package/dist/cjs/{Analytics-BERGweGK.js → Analytics-CexlbLRl.js} +4 -4
  2. package/dist/cjs/{Plaid-BRSyOOuw.js → Plaid-KasiL5mp.js} +14 -19
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  4. package/dist/cjs/{additional-questions-form-step_14.cjs.entry.js → additional-questions-form-step_15.cjs.entry.js} +379 -169
  5. package/dist/cjs/additional-questions_5.cjs.entry.js +7 -7
  6. package/dist/cjs/additional-statement_8.cjs.entry.js +1 -1
  7. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +7 -7
  8. package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +21 -0
  9. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  10. package/dist/cjs/{business-form-options-D_nM7NDk.js → business-form-options-CnlrfbQ6.js} +51 -0
  11. package/dist/cjs/{business-identity-schema-DI9XFbaD.js → business-identity-schema-CC1wOwXd.js} +11 -7
  12. package/dist/cjs/{business.service-Z9OACEQL.js → business.service-BBovho58.js} +1 -1
  13. package/dist/cjs/card-form.cjs.entry.js +2 -2
  14. package/dist/cjs/{check-pkg-version-ByKpJklZ.js → check-pkg-version-jeIQGJ8A.js} +1 -1
  15. package/dist/cjs/{checkout.service-BZOyqXgW.js → checkout.service-C0M9hmsL.js} +1 -1
  16. package/dist/cjs/{country-config-D7fss2oF.js → country-config-Ck-eEeZZ.js} +3 -0
  17. package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
  18. package/dist/cjs/{event-types-AU1B76Vm.js → event-types-DDNVjmfR.js} +1 -1
  19. package/dist/cjs/form-address-fields_3.cjs.entry.js +1 -1
  20. package/dist/cjs/form-control-number_2.cjs.entry.js +5 -4
  21. package/dist/cjs/{get-business-aR-C83KX.js → get-business-Ggw-UjXj.js} +2 -2
  22. package/dist/cjs/{get-payment-details-dwhA02Zl.js → get-payment-details-BVKRwME1.js} +2 -2
  23. package/dist/cjs/{get-subaccounts-B1jmSa2d.js → get-subaccounts-RRmcS9xU.js} +2 -2
  24. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  25. package/dist/cjs/{index.esm-C1ZPG85l.js → index.esm-BNETBIV_.js} +0 -18
  26. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +8 -8
  27. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
  28. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
  29. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  30. package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
  32. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
  33. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  34. package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
  35. package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
  36. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
  37. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -8
  38. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
  39. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
  40. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -9
  41. package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -8
  42. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
  43. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
  44. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
  45. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
  46. package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
  47. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
  48. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  49. package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -9
  50. package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
  51. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  52. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
  53. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  54. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
  56. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
  57. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
  58. package/dist/cjs/loader.cjs.js +1 -1
  59. package/dist/cjs/{package-B6L3zyfG.js → package-CDegPd7E.js} +1 -1
  60. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  61. package/dist/cjs/{payment-provisioning-actions-BiSpysjW.js → payment-provisioning-actions-Cn8bgHKu.js} +2 -2
  62. package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +3 -2
  63. package/dist/cjs/{payment.service-ByrgA_QZ.js → payment.service-CbIxt30x.js} +1 -1
  64. package/dist/cjs/{payout.service-CnQm_BpU.js → payout.service-DVMvsdAf.js} +1 -1
  65. package/dist/cjs/{payouts-status-AuS3Mp0V.js → payouts-status-CzS2CLGW.js} +2 -2
  66. package/dist/cjs/{plaid.service-Dlb8EUR8.js → plaid.service-DNT_DX6z.js} +1 -1
  67. package/dist/cjs/{schema-validations-_yWWnnaG.js → schema-validations-DackMxv7.js} +23 -9
  68. package/dist/cjs/styled-host-Ch0-dxF-.js +11 -0
  69. package/dist/cjs/{terminal.service-BdwHQ3Vv.js → terminal.service-BBHixg-d.js} +1 -1
  70. package/dist/cjs/{utils-FVGp6se3.js → utils-kDsk4nqH.js} +1 -1
  71. package/dist/cjs/webcomponents.cjs.js +1 -1
  72. package/dist/collection/api/Analytics.js +2 -2
  73. package/dist/collection/api/Document.js +14 -7
  74. package/dist/collection/collection-manifest.json +2 -0
  75. package/dist/collection/components/business-details/owner-details/owner-details.js +1 -1
  76. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  77. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +5 -3
  78. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +4 -2
  79. package/dist/collection/components/business-forms/owner-form/owner-form.js +46 -1
  80. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
  81. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +6 -114
  82. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  83. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +9 -0
  84. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +4 -2
  85. package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +435 -0
  86. package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-list.js +52 -0
  87. package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +72 -0
  88. package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +1 -1
  89. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +3 -2
  90. package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +10 -38
  91. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  92. package/dist/collection/components/business-forms/schemas/business-identity-schema.js +7 -3
  93. package/dist/collection/components/business-forms/schemas/schema-validations.js +10 -7
  94. package/dist/collection/components/business-forms/utils/business-form-options.js +50 -0
  95. package/dist/collection/components/business-forms/utils/country-config.js +2 -0
  96. package/dist/collection/components/checkout/billing-form/billing-form-full.js +2 -2
  97. package/dist/collection/components/checkout/billing-form/billing-form-schema.js +1 -1
  98. package/dist/collection/ui-components/form/form-control-file.js +1 -1
  99. package/dist/collection/utils/checkout-billing-state-options.js +12 -0
  100. package/dist/docs.json +496 -64
  101. package/dist/esm/{Analytics-B1bQP71R.js → Analytics-5J6H0ALl.js} +4 -4
  102. package/dist/esm/{Plaid-l6nNIjab.js → Plaid-BM3JUIG5.js} +15 -19
  103. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  104. package/dist/esm/{additional-questions-form-step_14.entry.js → additional-questions-form-step_15.entry.js} +378 -169
  105. package/dist/esm/additional-questions_5.entry.js +8 -8
  106. package/dist/esm/additional-statement_8.entry.js +1 -1
  107. package/dist/esm/bank-account-billing-form-simple_4.entry.js +7 -7
  108. package/dist/esm/bank-account-document-form-inputs.entry.js +19 -0
  109. package/dist/esm/bank-account-form.entry.js +2 -2
  110. package/dist/esm/{business-form-options-DRalxlqN.js → business-form-options-DXjZp4Rl.js} +51 -1
  111. package/dist/esm/{business-identity-schema-D-Nk9aGV.js → business-identity-schema-D8L_UfWl.js} +11 -7
  112. package/dist/esm/{business.service-C31wbMVs.js → business.service-C4BD3pf7.js} +1 -1
  113. package/dist/esm/card-form.entry.js +2 -2
  114. package/dist/esm/{check-pkg-version-CNwUC4SV.js → check-pkg-version-C7cHTIM0.js} +1 -1
  115. package/dist/esm/{checkout.service-cVdOGDuI.js → checkout.service-DmWeKNQs.js} +1 -1
  116. package/dist/esm/{country-config-B_fuF6JU.js → country-config-BW2dUoTJ.js} +3 -1
  117. package/dist/esm/dispute-notification_2.entry.js +6 -6
  118. package/dist/esm/{event-types-DalU_6SB.js → event-types-eIqsrwmW.js} +1 -1
  119. package/dist/esm/form-address-fields_3.entry.js +1 -1
  120. package/dist/esm/form-control-number_2.entry.js +5 -4
  121. package/dist/esm/{get-business-Gg6qn5on.js → get-business-DtFHdc37.js} +2 -2
  122. package/dist/esm/{get-payment-details-BiWgSJau.js → get-payment-details-26GxiYgv.js} +2 -2
  123. package/dist/esm/{get-subaccounts-CkjZeR9U.js → get-subaccounts-xkGMPstt.js} +2 -2
  124. package/dist/esm/hidden-input_2.entry.js +1 -1
  125. package/dist/esm/{index.esm-CgNcFueq.js → index.esm-KCSohgHx.js} +1 -18
  126. package/dist/esm/justifi-apple-pay_11.entry.js +8 -8
  127. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -5
  128. package/dist/esm/justifi-bank-account-form.entry.js +5 -5
  129. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  130. package/dist/esm/justifi-billing-form.entry.js +1 -1
  131. package/dist/esm/justifi-business-details.entry.js +8 -8
  132. package/dist/esm/justifi-business-form.entry.js +13 -13
  133. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  134. package/dist/esm/justifi-card-form.entry.js +5 -5
  135. package/dist/esm/justifi-checkout.entry.js +5 -5
  136. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  137. package/dist/esm/justifi-checkouts-list.entry.js +8 -8
  138. package/dist/esm/justifi-dispute-management.entry.js +7 -7
  139. package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
  140. package/dist/esm/justifi-order-terminals.entry.js +9 -9
  141. package/dist/esm/justifi-payment-details.entry.js +8 -8
  142. package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
  143. package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
  144. package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
  145. package/dist/esm/justifi-payments-list.entry.js +7 -7
  146. package/dist/esm/justifi-payout-details.entry.js +8 -8
  147. package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
  148. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  149. package/dist/esm/justifi-payouts-list.entry.js +9 -9
  150. package/dist/esm/justifi-refund-payment.entry.js +9 -9
  151. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  152. package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
  153. package/dist/esm/justifi-skeleton.entry.js +1 -1
  154. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
  155. package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
  156. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  157. package/dist/esm/justifi-terminals-list.entry.js +8 -8
  158. package/dist/esm/loader.js +1 -1
  159. package/dist/esm/{package-OGt0dCJl.js → package-8R9xLun-.js} +1 -1
  160. package/dist/esm/payment-method-option.entry.js +1 -1
  161. package/dist/esm/{payment-provisioning-actions-cl5xIYnF.js → payment-provisioning-actions-fWdNDUdq.js} +2 -2
  162. package/dist/esm/payment-provisioning-form-buttons_2.entry.js +3 -2
  163. package/dist/esm/{payment.service-5_u-UzTY.js → payment.service-CWR7jF-K.js} +1 -1
  164. package/dist/esm/{payout.service-D2zS5y8N.js → payout.service-CFU362cH.js} +1 -1
  165. package/dist/esm/{payouts-status-DCjCGTaa.js → payouts-status-D2G7FKu1.js} +2 -2
  166. package/dist/esm/{plaid.service-BiJ65YG8.js → plaid.service-0hd1i5Ga.js} +1 -1
  167. package/dist/esm/{schema-validations-u9_XnlUL.js → schema-validations-CjqWFLKt.js} +23 -10
  168. package/dist/esm/styled-host-D84RBv1W.js +9 -0
  169. package/dist/esm/{terminal.service-CIxDfM7V.js → terminal.service-Dr6dERcJ.js} +1 -1
  170. package/dist/esm/{utils-C1B2hVAB.js → utils-q7KOrlSX.js} +1 -1
  171. package/dist/esm/webcomponents.js +1 -1
  172. package/dist/module/Analytics.js +2 -2
  173. package/dist/module/Plaid.js +15 -19
  174. package/dist/module/additional-questions-form-step2.js +11 -5
  175. package/dist/module/bank-account-document-form-inputs.js +55 -1
  176. package/dist/module/billing-form-full2.js +2 -2
  177. package/dist/module/billing-form-schema.js +1 -1
  178. package/dist/module/business-address-schema.js +1 -1
  179. package/dist/module/business-bank-account-form-step2.js +25 -178
  180. package/dist/module/business-core-info-form-step2.js +2 -2
  181. package/dist/module/business-core-info-schema.js +2 -2
  182. package/dist/module/business-core-info2.js +3 -3
  183. package/dist/module/business-documents-on-file2.js +1 -1
  184. package/dist/module/business-form-options.js +51 -1
  185. package/dist/module/business-identity-schema.js +8 -4
  186. package/dist/module/business-owners-form-step2.js +9 -0
  187. package/dist/module/business-representative-form-inputs2.js +5 -3
  188. package/dist/module/business-representative2.js +6 -5
  189. package/dist/module/button.js +1 -1
  190. package/dist/module/country-config.js +3 -1
  191. package/dist/module/document-upload-form-step.d.ts +11 -0
  192. package/dist/module/document-upload-form-step.js +6 -0
  193. package/dist/module/document-upload-form-step2.js +397 -0
  194. package/dist/module/document-upload-list.d.ts +11 -0
  195. package/dist/module/document-upload-list.js +6 -0
  196. package/dist/module/document-upload-list2.js +46 -0
  197. package/dist/module/form-control-number2.js +1 -1
  198. package/dist/module/form-control-textarea2.js +1 -1
  199. package/dist/module/form.js +1 -18
  200. package/dist/module/hidden-input2.js +1 -1
  201. package/dist/module/iframe-input2.js +1 -1
  202. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  203. package/dist/module/justifi-checkouts-list.js +2 -2
  204. package/dist/module/justifi-dispute-management.js +1 -1
  205. package/dist/module/justifi-modular-checkout2.js +1 -1
  206. package/dist/module/justifi-order-terminals.js +2 -2
  207. package/dist/module/justifi-payment-details.js +1 -1
  208. package/dist/module/justifi-payment-provisioning.js +33 -27
  209. package/dist/module/justifi-payment-transactions-list.js +2 -2
  210. package/dist/module/justifi-payments-list.js +1 -1
  211. package/dist/module/justifi-payout-details.js +1 -1
  212. package/dist/module/justifi-payout-transactions-list.js +2 -2
  213. package/dist/module/justifi-payouts-list-filters.js +1 -1
  214. package/dist/module/justifi-payouts-list.js +2 -2
  215. package/dist/module/justifi-refund-payment.js +1 -1
  216. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  217. package/dist/module/justifi-terminal-orders-list.js +2 -2
  218. package/dist/module/justifi-terminals-list-filters.js +1 -1
  219. package/dist/module/justifi-terminals-list.js +2 -2
  220. package/dist/module/owner-details2.js +1 -1
  221. package/dist/module/owner-form-inputs2.js +5 -3
  222. package/dist/module/owner-form2.js +10 -1
  223. package/dist/module/package.js +1 -1
  224. package/dist/module/parts.js +1 -1
  225. package/dist/module/payment-provisioning-actions.js +1 -1
  226. package/dist/module/payment-provisioning-form-steps2.js +35 -28
  227. package/dist/module/plaid-verification2.js +1 -1
  228. package/dist/module/schema-validations.js +21 -8
  229. package/dist/module/skeleton.js +1 -1
  230. package/dist/module/styled-host.js +1 -1
  231. package/dist/module/table.js +1 -1
  232. package/dist/module/terminal-quantity-selector2.js +1 -1
  233. package/dist/types/api/Document.d.ts +15 -2
  234. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +2 -0
  235. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +1 -12
  236. package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.d.ts +44 -0
  237. package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-list.d.ts +6 -0
  238. package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +44 -0
  239. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +1 -0
  240. package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +4 -4
  241. package/dist/types/components/business-forms/utils/business-form-options.d.ts +1 -0
  242. package/dist/types/components.d.ts +67 -0
  243. package/dist/types/utils/checkout-billing-state-options.d.ts +9 -0
  244. package/dist/webcomponents/{p-oTtn8xDw.js → p--RbNhyet.js} +1 -1
  245. package/dist/webcomponents/{p-49a4123c.entry.js → p-04d6d725.entry.js} +1 -1
  246. package/dist/webcomponents/{p-7119fddd.entry.js → p-086f7eea.entry.js} +1 -1
  247. package/dist/webcomponents/{p-ca87c609.entry.js → p-0a4fcb15.entry.js} +1 -1
  248. package/dist/webcomponents/{p-b0b6083f.entry.js → p-0b169fac.entry.js} +1 -1
  249. package/dist/webcomponents/{p-f1b9cbf0.entry.js → p-0e4cda77.entry.js} +1 -1
  250. package/dist/webcomponents/{p-b62ff001.entry.js → p-1e34c488.entry.js} +1 -1
  251. package/dist/webcomponents/{p-d24240a5.entry.js → p-29b82954.entry.js} +1 -1
  252. package/dist/webcomponents/{p-c8f3656f.entry.js → p-2e063c5d.entry.js} +1 -1
  253. package/dist/webcomponents/p-37676092.entry.js +1 -0
  254. package/dist/webcomponents/{p-31452258.entry.js → p-3960e6b7.entry.js} +1 -1
  255. package/dist/webcomponents/{p-cde76bf8.entry.js → p-3bcac405.entry.js} +1 -1
  256. package/dist/webcomponents/{p-c4767c7b.entry.js → p-3e10a0de.entry.js} +1 -1
  257. package/dist/webcomponents/{p-8964f4ca.entry.js → p-48a866ae.entry.js} +1 -1
  258. package/dist/webcomponents/{p-a80f69a9.entry.js → p-4b14b7e7.entry.js} +1 -1
  259. package/dist/webcomponents/p-54ee2a30.entry.js +1 -0
  260. package/dist/webcomponents/{p-a1dcdc8b.entry.js → p-562447ad.entry.js} +4 -4
  261. package/dist/webcomponents/{p-3f5e9afb.entry.js → p-58adef16.entry.js} +1 -1
  262. package/dist/webcomponents/{p-3d6b9434.entry.js → p-5ec9634c.entry.js} +1 -1
  263. package/dist/webcomponents/{p-ea0d7a98.entry.js → p-5f071ee0.entry.js} +1 -1
  264. package/dist/webcomponents/{p-4ec433f4.entry.js → p-6b21947c.entry.js} +1 -1
  265. package/dist/webcomponents/{p-383b8317.entry.js → p-80fdd013.entry.js} +1 -1
  266. package/dist/webcomponents/{p-f3ff7e00.entry.js → p-85c0abdb.entry.js} +1 -1
  267. package/dist/webcomponents/{p-0708cb76.entry.js → p-86eb32d8.entry.js} +1 -1
  268. package/dist/webcomponents/p-8R9xLun-.js +1 -0
  269. package/dist/webcomponents/{p-ae91fc9b.entry.js → p-8db8d7e7.entry.js} +1 -1
  270. package/dist/webcomponents/{p-91aef5bf.entry.js → p-8ed1bc07.entry.js} +1 -1
  271. package/dist/webcomponents/p-92d8a14b.entry.js +1 -0
  272. package/dist/webcomponents/{p-b272a29d.entry.js → p-92e7ce54.entry.js} +1 -1
  273. package/dist/webcomponents/{p-9153c121.entry.js → p-947950cc.entry.js} +1 -1
  274. package/dist/webcomponents/{p-6220a384.entry.js → p-9ce2a98a.entry.js} +1 -1
  275. package/dist/webcomponents/p-B1yVkh15.js +1 -0
  276. package/dist/webcomponents/{p-Bt4GjEWL.js → p-BBSnDYJw.js} +1 -1
  277. package/dist/webcomponents/{p-av6jyzyC.js → p-BSyTbuZy.js} +1 -1
  278. package/dist/webcomponents/{p-APOabprT.js → p-BrFax4_P.js} +1 -1
  279. package/dist/webcomponents/p-BzXQDB0t.js +1 -0
  280. package/dist/webcomponents/{p-BxKbnILQ.js → p-C-zuQNNP.js} +1 -1
  281. package/dist/webcomponents/{p-Cm9f5fyh.js → p-CDu7TeCZ.js} +1 -1
  282. package/dist/webcomponents/{p-BJu1-9kE.js → p-CL8LyqRI.js} +1 -1
  283. package/dist/webcomponents/p-CeW0EPHy.js +1 -0
  284. package/dist/webcomponents/{p-fE5A37L5.js → p-Cz0yhyYu.js} +1 -1
  285. package/dist/webcomponents/p-D9ZHVy-j.js +1 -0
  286. package/dist/webcomponents/{p-DwoT0UoX.js → p-D9sqTVmd.js} +1 -1
  287. package/dist/webcomponents/p-DV4n8kZd.js +1 -0
  288. package/dist/webcomponents/{p-Dk26hk5T.js → p-DdeBubpX.js} +1 -1
  289. package/dist/webcomponents/{p-mF5zKtkx.js → p-DvnFba1A.js} +1 -1
  290. package/dist/webcomponents/p-DzEdYT8R.js +1 -0
  291. package/dist/webcomponents/{p-NZS8uCtH.js → p-Dzv0P2Ly.js} +1 -1
  292. package/dist/webcomponents/{p-215c6b6b.entry.js → p-a2ed63df.entry.js} +1 -1
  293. package/dist/webcomponents/{p-a7a1b168.entry.js → p-a3b48ba3.entry.js} +1 -1
  294. package/dist/webcomponents/p-a4520dba.entry.js +1 -0
  295. package/dist/webcomponents/{p-7ebed752.entry.js → p-a5ad9183.entry.js} +1 -1
  296. package/dist/webcomponents/{p-8d173a7c.entry.js → p-a7e0ab9b.entry.js} +1 -1
  297. package/dist/webcomponents/p-a9976353.entry.js +1 -0
  298. package/dist/webcomponents/{p-d79c5ee4.entry.js → p-b17ce21d.entry.js} +1 -1
  299. package/dist/webcomponents/{p-45c0fb53.entry.js → p-ba2ab989.entry.js} +1 -1
  300. package/dist/webcomponents/{p-c9fe4f33.entry.js → p-c1b48216.entry.js} +1 -1
  301. package/dist/webcomponents/{p-07236291.entry.js → p-c2e09203.entry.js} +1 -1
  302. package/dist/webcomponents/{p-9d021e10.entry.js → p-c3cc4ad6.entry.js} +1 -1
  303. package/dist/webcomponents/p-c9599fc7.entry.js +1 -0
  304. package/dist/webcomponents/{p-58b5e08e.entry.js → p-ca1c2048.entry.js} +1 -1
  305. package/dist/webcomponents/p-cab840bd.entry.js +1 -0
  306. package/dist/webcomponents/p-cc558e25.entry.js +1 -0
  307. package/dist/webcomponents/{p-BXyADlAH.js → p-czJ2qSU1.js} +1 -1
  308. package/dist/webcomponents/p-de1ccbea.entry.js +1 -0
  309. package/dist/webcomponents/{p-8aa53ef2.entry.js → p-e0e6c2df.entry.js} +1 -1
  310. package/dist/webcomponents/p-n_pmf4AT.js +1 -0
  311. package/dist/webcomponents/p-vUN_uvAi.js +1 -0
  312. package/dist/webcomponents/{p-Ba8jdOkX.js → p-xWuaNtJy.js} +1 -1
  313. package/dist/webcomponents/webcomponents.esm.js +1 -1
  314. package/package.json +15 -15
  315. package/readme.md +7 -14
  316. package/LICENSE +0 -21
  317. package/dist/cjs/styled-host-DAi5SuFa.js +0 -11
  318. package/dist/esm/styled-host-D6byRazK.js +0 -9
  319. package/dist/module/bank-account-document-form-inputs2.js +0 -57
  320. package/dist/webcomponents/p-35dd1fc0.entry.js +0 -1
  321. package/dist/webcomponents/p-5G1OMxZz.js +0 -1
  322. package/dist/webcomponents/p-69fdd137.entry.js +0 -1
  323. package/dist/webcomponents/p-6RTf1SXX.js +0 -1
  324. package/dist/webcomponents/p-9fc7714d.entry.js +0 -1
  325. package/dist/webcomponents/p-Aacb4jqT.js +0 -1
  326. package/dist/webcomponents/p-BqNNwq6C.js +0 -1
  327. package/dist/webcomponents/p-Cz_7BuGW.js +0 -1
  328. package/dist/webcomponents/p-DyucNSA4.js +0 -1
  329. package/dist/webcomponents/p-KXLYEe1D.js +0 -1
  330. package/dist/webcomponents/p-OGt0dCJl.js +0 -1
  331. package/dist/webcomponents/p-b341efd6.entry.js +0 -1
  332. package/dist/webcomponents/p-daaa2a99.entry.js +0 -1
  333. package/dist/webcomponents/p-e4cb7c21.entry.js +0 -1
  334. package/dist/webcomponents/p-ef85717f.entry.js +0 -1
  335. package/dist/webcomponents/p-f30069ea.entry.js +0 -1
  336. package/dist/webcomponents/p-nb_LhbJq.js +0 -1
@@ -1,8 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { P as PHONE_MASKS, I as IDENTITY_MASKS } from './form-input-masks.js';
3
- import { d as deconstructDate } from './Business.js';
4
- import { h as heading2, l as label, c as inputDisabled, E as buttonSecondary } from './parts.js';
3
+ import { d as deconstructDate, a as CountryCode } from './Business.js';
4
+ import { h as heading2, l as label, c as inputDisabled, A as buttonSecondary } from './parts.js';
5
5
  import { c as countryLabels } from './country-config.js';
6
+ import { d as businessTitleOptions } from './business-form-options.js';
6
7
  import { d as defineCustomElement$8 } from './custom-popper2.js';
7
8
  import { d as defineCustomElement$7 } from './form-address-fields2.js';
8
9
  import { d as defineCustomElement$6 } from './form-control-date2.js';
@@ -36,7 +37,7 @@ const BusinessRepresentative = /*@__PURE__*/ proxyCustomElement(class BusinessRe
36
37
  var _a;
37
38
  const label = countryLabels[this.country].idNumberLabel;
38
39
  const labelOptional = countryLabels[this.country].idNumberLabelOptional;
39
- return ((_a = this.representative) === null || _a === void 0 ? void 0 : _a.ssn_last4) ? labelOptional : label;
40
+ return (((_a = this.representative) === null || _a === void 0 ? void 0 : _a.ssn_last4) || this.country === CountryCode.CAN) ? labelOptional : label;
40
41
  }
41
42
  componentDidLoad() {
42
43
  this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors.representative)));
@@ -45,11 +46,11 @@ const BusinessRepresentative = /*@__PURE__*/ proxyCustomElement(class BusinessRe
45
46
  render() {
46
47
  var _a, _b;
47
48
  const representativeDefaultValue = this.formController.getInitialValues().representative;
48
- return (h(Host, { key: 'c12be1414101467b72170c101cb3d7792f0fafe0' }, h("fieldset", { key: '821c9982121243de546bfe95094402379e704659' }, h("legend", { key: '48d43758a4d62dcd977eeb9703bae8ac153b9bf4', part: heading2 }, "Representative"), h("div", { key: '458edb00ebc0817623cd0fe70b8221c178cac168', class: "row gy-3" }, h("div", { key: '5d6b3fc92d7c6fb6bf729881bf26198ea796cbfa', class: "col-12 col-md-8" }, h("form-control-text", { key: '73eb60a383a45664050dd53bbc8b22b1e54ec22f', name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: 'fa4b8c69dc03d7ffeecf98badd5cda52edc370e5', class: "col-12 col-md-4" }, h("form-control-text", { key: '3cc743bd85400c30741b6c05c3c098badce49a58', name: "title", label: "Title", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '83daa42529e73c5b946830dded92d0d48c95b251', class: "col-12 col-md-6" }, h("form-control-text", { key: '046a7537d6a2c5ab90d0069f91cc75f42a925e27', name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '9de7ac978409f7d5b6064cbeaa30771a6002fa5b', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '05bd882e8d76b6bc1dbc44fc4e1951d14d6d2649', name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: 'b511c08db58c2442746a497c7d784cd0605e9f17', class: "col-12 col-md-4" }, h("form-control-date", { key: '46be9d7a916f72c583b0d47a528e6e3d2443ac83', name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { key: 'ae69c549fdf91314f4be3fa2d922c73bc19253ed', class: "col-12 col-md-8" }, (!((_a = this.representative) === null || _a === void 0 ? void 0 : _a.ssn_last4) || this.isEditingIdentification) ? (h("form-control-number-masked", { name: "identification_number", label: this.identificationNumberLabel, defaultValue: this.isEditingIdentification ? '' : representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: IDENTITY_MASKS[this.country], helpText: countryLabels[this.country].identityHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, this.identificationNumberLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.representative) === null || _b === void 0 ? void 0 : _b.ssn_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
49
+ return (h(Host, { key: '9045242989e4d43d1e7b0770d0c5421005db78fa' }, h("fieldset", { key: '6643f8bd8e81bbc64ae8a0e9bcf317e16f91bab9' }, h("legend", { key: '20b897584a059ad98c109a37a3ea74c8be4b407c', part: heading2 }, "Representative"), h("div", { key: '37da5bfb73a7606c6180c151761aaf13dcc819c4', class: "row gy-3" }, h("div", { key: '8d76accd442d9fda35ae4d3e1c47b65e17f098a0', class: "col-12 col-md-8" }, h("form-control-text", { key: '2eadd087eac463e851192d8ee1c30390a29ee8b2', name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: 'f495a8cb3c6a0e9b4a00aac3e8c77f66da84b9e2', class: "col-12 col-md-4" }, h("form-control-select", { key: '4b7669b96b7df9a387cf3c4f9638ea9ada9f37ee', name: "title", label: "Title", options: businessTitleOptions, defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '3e10f464a7e26a9518b4ce6d37c6f4a968514f98', class: "col-12 col-md-6" }, h("form-control-text", { key: 'a0d51c6999295428bfdcb43ef4b0ec15194eb077', name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: 'a8e1a4c8e4fa5a50d436c18e41a5b77f23bc53cf', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: 'a72115bf51fc97a25add717c208e820c7e9e5495', name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: 'db04f552f1757b6ac4e10539e4a148f399a75192', class: "col-12 col-md-4" }, h("form-control-date", { key: 'cb07a2cc4e6fc242d643f9caea01db380a9ff366', name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { key: '95348511ba3b1582053f754249b15efe4d707252', class: "col-12 col-md-8" }, (!((_a = this.representative) === null || _a === void 0 ? void 0 : _a.ssn_last4) || this.isEditingIdentification) ? (h("form-control-number-masked", { name: "identification_number", label: this.identificationNumberLabel, defaultValue: this.isEditingIdentification ? '' : representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: IDENTITY_MASKS[this.country], helpText: countryLabels[this.country].identityHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, this.identificationNumberLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.representative) === null || _b === void 0 ? void 0 : _b.ssn_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
49
50
  this.isEditingIdentification = true;
50
51
  // Clear last4 and current value to force validation
51
52
  this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { representative: Object.assign(Object.assign({}, this.formController.values.getValue().representative), { ssn_last4: null, identification_number: '' }) }));
52
- } }, "Change"))))), h("div", { key: 'dc7a74fe3641cfb03e682a6170c04efbd15b41d0', class: "col-12" }, h("identity-address-form", { key: '3756996788014f46ecfda29a3e5f9212b749a5d8', errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate, country: this.country }))))));
53
+ } }, "Change"))))), h("div", { key: '57dcdaad0ec89f94d82236bfc8e093b68b7ec478', class: "col-12" }, h("identity-address-form", { key: '0ea02562077d352c5d3a1d0903dee1e8b69fa6f1', errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate, country: this.country }))))));
53
54
  }
54
55
  }, [256, "business-representative", {
55
56
  "formController": [16],
@@ -1,5 +1,5 @@
1
1
  import { h } from '@stencil/core/internal/client';
2
- import { a3 as buttonOutlineSecondary, a4 as buttonOutlinePrimary, a1 as buttonLink, a5 as buttonDark, a6 as buttonLight, a7 as buttonInfo, a8 as buttonWarning, a9 as buttonDanger, aa as buttonSuccess, E as buttonSecondary, D as buttonPrimary, ab as buttonLoading } from './parts.js';
2
+ import { a3 as buttonOutlineSecondary, a4 as buttonOutlinePrimary, a1 as buttonLink, a5 as buttonDark, a6 as buttonLight, a7 as buttonInfo, a8 as buttonWarning, a9 as buttonDanger, aa as buttonSuccess, A as buttonSecondary, z as buttonPrimary, ab as buttonLoading } from './parts.js';
3
3
 
4
4
  const ButtonSpinner = () => (h("div", { class: "spinner-border spinner-border-sm", role: "status", part: "button-spinner" }, h("span", { class: "visually-hidden" }, "Loading...")));
5
5
 
@@ -28,6 +28,7 @@ const countryLabels = {
28
28
  idNumberLabelOptional: 'SSN (optional)',
29
29
  identityHelpText: 'Enter your full Social Security Number. It is required for Federal OFAC check.',
30
30
  taxIdLabel: 'Tax ID (EIN or SSN)',
31
+ taxIdLabelOptional: '',
31
32
  taxIdHelpText: "Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes.",
32
33
  },
33
34
  CAN: {
@@ -37,6 +38,7 @@ const countryLabels = {
37
38
  idNumberLabelOptional: 'SIN (optional)',
38
39
  identityHelpText: 'Enter your full Social Insurance Number.',
39
40
  taxIdLabel: 'Business Number (BN)',
41
+ taxIdLabelOptional: 'Business Number (BN) (optional)',
40
42
  taxIdHelpText: 'Business Numbers (BN) are nine digits. Enter value without spaces or dashes.',
41
43
  },
42
44
  };
@@ -61,4 +63,4 @@ const countryValidation = {
61
63
  },
62
64
  };
63
65
 
64
- export { countryOptions as a, countryValidation as b, countryLabels as c };
66
+ export { ProvinceOptions as P, countryOptions as a, countryValidation as b, countryLabels as c };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DocumentUploadFormStep extends Components.DocumentUploadFormStep, HTMLElement {}
4
+ export const DocumentUploadFormStep: {
5
+ prototype: DocumentUploadFormStep;
6
+ new (): DocumentUploadFormStep;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { D as DocumentUploadFormStep$1, d as defineCustomElement$1 } from './document-upload-form-step2.js';
2
+
3
+ const DocumentUploadFormStep = DocumentUploadFormStep$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { DocumentUploadFormStep, defineCustomElement };
@@ -0,0 +1,397 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import './config-state.js';
3
+ import './dinero.js';
4
+ import { e as EntityDocument, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
+ import './Pagination.js';
6
+ import { a as CountryCode } from './Business.js';
7
+ import './ApplePay.js';
8
+ import { m as makeGetBusiness, e as makePostDocumentRecord } from './payment-provisioning-actions.js';
9
+ import { B as BusinessService, D as DocumentRecordService } from './business.service.js';
10
+ import { B as BusinessFormStep } from './event-types2.js';
11
+ import { h as heading2 } from './parts.js';
12
+ import { P as PaymentProvisioningLoading } from './payment-provisioning-loading.js';
13
+ import { d as defineCustomElement$6 } from './business-documents-on-file2.js';
14
+ import { d as defineCustomElement$5 } from './custom-popper2.js';
15
+ import { d as defineCustomElement$4 } from './document-upload-list2.js';
16
+ import { d as defineCustomElement$3 } from './form-control-file2.js';
17
+ import { d as defineCustomElement$2 } from './form-control-select2.js';
18
+ import { d as defineCustomElement$1 } from './form-control-tooltip2.js';
19
+
20
+ const businessDocumentOptions = [
21
+ { label: 'Select a document type', value: '' },
22
+ { label: 'Articles of Incorporation', value: 'articles_of_incorporation' },
23
+ { label: 'Business Registration', value: 'business_registration' },
24
+ ];
25
+ const financialDocumentOptions = [
26
+ { label: 'Select a document type', value: '' },
27
+ { label: 'Voided Check', value: 'voided_check' },
28
+ { label: 'Bank Statement', value: 'bank_statement' },
29
+ ];
30
+ const personalDocGroup1Options = [
31
+ { label: 'Select a document type', value: '' },
32
+ { label: 'Canadian Passport', value: 'passport' },
33
+ { label: 'Canadian Driver\'s License', value: 'driver_license' },
34
+ { label: 'Canadian Government Issued ID Card', value: 'government_id' },
35
+ { label: 'Permanent Resident Card', value: 'resident_card' },
36
+ { label: 'Certificate of Indian Status', value: 'status_card' },
37
+ { label: 'US State Issued Driver\'s License', value: 'driver_license' },
38
+ ];
39
+ const personalDocGroup2Options = [
40
+ { label: 'Select a document type', value: '' },
41
+ { label: 'Nexus Card (Photo ID)', value: 'nexus_card' },
42
+ { label: 'Canadian Citizenship/Naturalization Card or Certificate', value: 'citizenship_card' },
43
+ { label: 'Foreign Passport', value: 'foreign_passport' },
44
+ { label: 'Canadian Birth Certificate', value: 'birth_certificate' },
45
+ { label: 'Social Insurance Number (SIN) Card', value: 'sin_card' },
46
+ { label: 'Social Security Number (SSN) Card', value: 'ssn_card' },
47
+ ];
48
+ const staticCategories = [
49
+ {
50
+ label: 'Business Document',
51
+ value: 'business_document',
52
+ docTypeOptions: businessDocumentOptions,
53
+ },
54
+ {
55
+ label: 'Financial Document',
56
+ value: 'financial_document',
57
+ docTypeOptions: financialDocumentOptions,
58
+ },
59
+ ];
60
+ function buildOwnerCategories(owners) {
61
+ const group1Opts = personalDocGroup1Options.filter(o => o.value !== '');
62
+ const group2Opts = personalDocGroup2Options.filter(o => o.value !== '');
63
+ return owners.map(owner => ({
64
+ label: `${owner.name} - Identity Document`,
65
+ value: `personal_${owner.id}`,
66
+ identityId: owner.id,
67
+ docTypeOptions: [
68
+ { label: 'Select a document type', value: '' },
69
+ { label: '── Group 1 ──', value: '_group1_header' },
70
+ ...group1Opts,
71
+ { label: '── Group 2 ──', value: '_group2_header' },
72
+ ...group2Opts,
73
+ ],
74
+ }));
75
+ }
76
+ const financialOnlyCategories = [
77
+ {
78
+ label: 'Financial Document',
79
+ value: 'financial_document',
80
+ docTypeOptions: financialDocumentOptions,
81
+ },
82
+ ];
83
+ function buildAllCategories(owners, country) {
84
+ if (country === CountryCode.USA) {
85
+ return financialOnlyCategories;
86
+ }
87
+ return [...staticCategories, ...buildOwnerCategories(owners)];
88
+ }
89
+ const personalDocGroup1Types = new Set(personalDocGroup1Options.filter(o => o.value).map(o => o.value));
90
+ const personalDocGroup2Types = new Set(personalDocGroup2Options.filter(o => o.value).map(o => o.value));
91
+
92
+ const DocumentUploadFormStep = /*@__PURE__*/ proxyCustomElement(class DocumentUploadFormStep extends HTMLElement {
93
+ constructor(registerHost) {
94
+ super();
95
+ if (registerHost !== false) {
96
+ this.__registerHost();
97
+ }
98
+ this.errorEvent = createEvent(this, "error-event", 7);
99
+ this.stepCompleteEvent = createEvent(this, "complete-form-step-event", 7);
100
+ this.formLoading = createEvent(this, "formLoading", 7);
101
+ this.owners = [];
102
+ this.existingDocuments = [];
103
+ this.selectedCategory = '';
104
+ this.selectedDocType = '';
105
+ this.uploadQueue = [];
106
+ this.isLoading = false;
107
+ this.errors = {};
108
+ this.fileInputKey = 0;
109
+ this.categories = [];
110
+ this.getData = () => {
111
+ this.isLoading = true;
112
+ this.getBusiness({
113
+ onSuccess: (response) => {
114
+ const { owners, documents } = response.data;
115
+ this.owners = owners || [];
116
+ this.existingDocuments = documents || [];
117
+ this.categories = buildAllCategories(this.owners, this.country);
118
+ },
119
+ onError: ({ error, code, severity }) => {
120
+ this.errorEvent.emit({
121
+ message: error,
122
+ errorCode: code,
123
+ severity: severity,
124
+ });
125
+ },
126
+ final: () => {
127
+ this.isLoading = false;
128
+ }
129
+ });
130
+ };
131
+ this.handleCategoryChange = (_name, value) => {
132
+ this.selectedCategory = value;
133
+ this.selectedDocType = '';
134
+ };
135
+ this.handleDocTypeChange = (_name, value) => {
136
+ if (value.startsWith('_') && value.endsWith('_header'))
137
+ return;
138
+ this.selectedDocType = value;
139
+ };
140
+ this.handleFileSelected = async (e) => {
141
+ const fileList = Array.from(e.detail.fileList);
142
+ const category = this.categories.find(c => c.value === this.selectedCategory);
143
+ if (!category)
144
+ return;
145
+ const docTypeOption = category.docTypeOptions.find(o => o.value === this.selectedDocType);
146
+ const docTypeLabel = (docTypeOption === null || docTypeOption === void 0 ? void 0 : docTypeOption.label) || this.selectedDocType;
147
+ const newEntries = fileList.map(file => ({
148
+ categoryLabel: category.label,
149
+ categoryValue: category.value,
150
+ docTypeLabel,
151
+ docTypeValue: this.selectedDocType,
152
+ fileName: file.name,
153
+ file,
154
+ identityId: category.identityId,
155
+ status: 'uploading',
156
+ }));
157
+ const startIndex = this.uploadQueue.length;
158
+ this.uploadQueue = [...this.uploadQueue, ...newEntries];
159
+ this.selectedCategory = '';
160
+ this.selectedDocType = '';
161
+ this.fileInputKey++;
162
+ await Promise.all(newEntries.map(async (entry, i) => {
163
+ const index = startIndex + i;
164
+ try {
165
+ const docData = new EntityDocument({ file: entry.file, document_type: entry.docTypeValue }, this.businessId, entry.identityId);
166
+ const recordCreated = await this.postDocumentRecordData(docData);
167
+ if (!recordCreated) {
168
+ this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
169
+ return;
170
+ }
171
+ const uploaded = await this.uploadDocument(docData);
172
+ this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: uploaded ? 'uploaded' : 'error' }) : e);
173
+ }
174
+ catch (_a) {
175
+ this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
176
+ }
177
+ }));
178
+ };
179
+ this.postDocumentRecordData = async (docData) => {
180
+ const payload = docData.record_data;
181
+ return new Promise((resolve) => {
182
+ this.postDocumentRecord({
183
+ payload,
184
+ onSuccess: (response) => {
185
+ resolve(this.handleDocRecordResponse(docData, response));
186
+ },
187
+ onError: ({ error, code, severity }) => {
188
+ this.errorEvent.emit({
189
+ message: error,
190
+ errorCode: code,
191
+ severity: severity,
192
+ });
193
+ resolve(false);
194
+ },
195
+ });
196
+ });
197
+ };
198
+ this.handleDocRecordResponse = (docData, response) => {
199
+ if (response.error) {
200
+ this.errorEvent.emit({
201
+ errorCode: ComponentErrorCodes.POST_ERROR,
202
+ message: response.error.message,
203
+ severity: ComponentErrorSeverity.ERROR,
204
+ data: response.error,
205
+ });
206
+ return false;
207
+ }
208
+ else {
209
+ docData.setPresignedUrl(response.data.presigned_url);
210
+ return true;
211
+ }
212
+ };
213
+ this.uploadDocument = async (docData) => {
214
+ if (!docData.presigned_url) {
215
+ throw new Error('Presigned URL is not set');
216
+ }
217
+ const fileData = await docData.getFileData();
218
+ const response = await fetch(docData.presigned_url, {
219
+ method: 'PUT',
220
+ body: fileData,
221
+ });
222
+ if (!response.ok) {
223
+ this.errorEvent.emit({
224
+ errorCode: ComponentErrorCodes.POST_ERROR,
225
+ message: 'Failed to upload document',
226
+ severity: ComponentErrorSeverity.ERROR,
227
+ });
228
+ return false;
229
+ }
230
+ return true;
231
+ };
232
+ }
233
+ propChanged() {
234
+ this.initializeApi();
235
+ }
236
+ watchHandler(newValue) {
237
+ this.formLoading.emit(newValue);
238
+ }
239
+ async validateAndSubmit({ onSuccess }) {
240
+ const validationErrors = this.validate();
241
+ if (Object.keys(validationErrors).length > 0) {
242
+ this.errors = validationErrors;
243
+ return;
244
+ }
245
+ this.errors = {};
246
+ this.stepCompleteEvent.emit({ response: null, formStep: BusinessFormStep.documentUpload });
247
+ onSuccess();
248
+ }
249
+ componentWillLoad() {
250
+ this.initializeApi();
251
+ if (this.getBusiness) {
252
+ this.getData();
253
+ }
254
+ }
255
+ initializeApi() {
256
+ if (this.authToken && this.businessId) {
257
+ this.getBusiness = makeGetBusiness({
258
+ authToken: this.authToken,
259
+ businessId: this.businessId,
260
+ service: new BusinessService()
261
+ });
262
+ this.postDocumentRecord = makePostDocumentRecord({
263
+ authToken: this.authToken,
264
+ service: new DocumentRecordService()
265
+ });
266
+ }
267
+ else {
268
+ this.errorEvent.emit({
269
+ message: 'Missing required props',
270
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
271
+ severity: ComponentErrorSeverity.ERROR,
272
+ });
273
+ }
274
+ }
275
+ get categoryOptions() {
276
+ return [
277
+ { label: 'Select a category', value: '' },
278
+ ...this.categories.map(c => ({ label: c.label, value: c.value })),
279
+ ];
280
+ }
281
+ get docTypeOptions() {
282
+ if (!this.selectedCategory) {
283
+ return [{ label: 'Select a category first', value: '' }];
284
+ }
285
+ const category = this.categories.find(c => c.value === this.selectedCategory);
286
+ return (category === null || category === void 0 ? void 0 : category.docTypeOptions) || [{ label: 'Select a category first', value: '' }];
287
+ }
288
+ validate() {
289
+ if (this.allowOptionalFields)
290
+ return {};
291
+ const errors = {};
292
+ const financialDocTypes = ['voided_check', 'bank_statement'];
293
+ const hasExistingDoc = (types) => this.existingDocuments.some(doc => types.includes(doc.document_type));
294
+ const hasUploadedDoc = (categoryValue) => this.uploadQueue.some(entry => entry.categoryValue === categoryValue && entry.status === 'uploaded');
295
+ if (!hasUploadedDoc('financial_document') && !hasExistingDoc(financialDocTypes)) {
296
+ errors['financial_document'] = 'Please upload a financial document';
297
+ }
298
+ if (this.country === CountryCode.CAN) {
299
+ const businessDocTypes = ['articles_of_incorporation', 'business_registration'];
300
+ if (!hasUploadedDoc('business_document') && !hasExistingDoc(businessDocTypes)) {
301
+ errors['business_document'] = 'Please upload a business document';
302
+ }
303
+ for (const owner of this.owners) {
304
+ const ownerCategoryValue = `personal_${owner.id}`;
305
+ const ownerDocs = this.uploadQueue.filter(entry => entry.categoryValue === ownerCategoryValue && entry.status === 'uploaded');
306
+ const hasGroup1 = ownerDocs.some(d => personalDocGroup1Types.has(d.docTypeValue));
307
+ const hasGroup2 = ownerDocs.some(d => personalDocGroup2Types.has(d.docTypeValue));
308
+ if (!hasGroup1) {
309
+ errors[`personal_group1_${owner.id}`] =
310
+ `Please upload a Group 1 identity document for ${owner.name}`;
311
+ }
312
+ if (!hasGroup2) {
313
+ errors[`personal_group2_${owner.id}`] =
314
+ `Please upload a Group 2 identity document for ${owner.name}`;
315
+ }
316
+ }
317
+ }
318
+ return errors;
319
+ }
320
+ render() {
321
+ if (this.isLoading) {
322
+ return h(PaymentProvisioningLoading, null);
323
+ }
324
+ return (h("form", null, h("fieldset", null, h("legend", { class: "mb-0", part: heading2 }, "Document Uploads"), h("hr", { class: "mt-2" }), h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading })), h("fieldset", { class: "mt-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Add Document"), h("form-control-tooltip", { helpText: "Upload documents one at a time. Select the category and type, then choose a file. For identity documents, two documents from different groups are required per owner." })), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_category", label: "Document Category", options: this.categoryOptions, defaultValue: this.selectedCategory, inputHandler: this.handleCategoryChange })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_type", label: "Document Type", options: this.docTypeOptions, defaultValue: this.selectedDocType, inputHandler: this.handleDocTypeChange, disabled: !this.selectedCategory })), h("div", { class: "col-12" }, h("form-control-file", { key: this.fileInputKey, name: "document_file", label: "Upload Document", documentType: this.selectedDocType, onFileSelected: this.handleFileSelected, disabled: !this.selectedDocType, multiple: false })))), h("document-upload-list", { documents: this.uploadQueue }), Object.keys(this.errors).length > 0 && (h("div", { class: "alert alert-danger mt-3" }, h("ul", { class: "mb-0" }, Object.values(this.errors).map(err => h("li", null, err)))))));
325
+ }
326
+ static get watchers() { return {
327
+ "authToken": ["propChanged"],
328
+ "businessId": ["propChanged"],
329
+ "isLoading": ["watchHandler"]
330
+ }; }
331
+ }, [256, "document-upload-form-step", {
332
+ "authToken": [1, "auth-token"],
333
+ "businessId": [1, "business-id"],
334
+ "allowOptionalFields": [4, "allow-optional-fields"],
335
+ "country": [1],
336
+ "owners": [32],
337
+ "existingDocuments": [32],
338
+ "selectedCategory": [32],
339
+ "selectedDocType": [32],
340
+ "uploadQueue": [32],
341
+ "isLoading": [32],
342
+ "errors": [32],
343
+ "fileInputKey": [32],
344
+ "getBusiness": [32],
345
+ "postDocumentRecord": [32],
346
+ "validateAndSubmit": [64]
347
+ }, undefined, {
348
+ "authToken": ["propChanged"],
349
+ "businessId": ["propChanged"],
350
+ "isLoading": ["watchHandler"]
351
+ }]);
352
+ function defineCustomElement() {
353
+ if (typeof customElements === "undefined") {
354
+ return;
355
+ }
356
+ const components = ["document-upload-form-step", "business-documents-on-file", "custom-popper", "document-upload-list", "form-control-file", "form-control-select", "form-control-tooltip"];
357
+ components.forEach(tagName => { switch (tagName) {
358
+ case "document-upload-form-step":
359
+ if (!customElements.get(tagName)) {
360
+ customElements.define(tagName, DocumentUploadFormStep);
361
+ }
362
+ break;
363
+ case "business-documents-on-file":
364
+ if (!customElements.get(tagName)) {
365
+ defineCustomElement$6();
366
+ }
367
+ break;
368
+ case "custom-popper":
369
+ if (!customElements.get(tagName)) {
370
+ defineCustomElement$5();
371
+ }
372
+ break;
373
+ case "document-upload-list":
374
+ if (!customElements.get(tagName)) {
375
+ defineCustomElement$4();
376
+ }
377
+ break;
378
+ case "form-control-file":
379
+ if (!customElements.get(tagName)) {
380
+ defineCustomElement$3();
381
+ }
382
+ break;
383
+ case "form-control-select":
384
+ if (!customElements.get(tagName)) {
385
+ defineCustomElement$2();
386
+ }
387
+ break;
388
+ case "form-control-tooltip":
389
+ if (!customElements.get(tagName)) {
390
+ defineCustomElement$1();
391
+ }
392
+ break;
393
+ } });
394
+ }
395
+ defineCustomElement();
396
+
397
+ export { DocumentUploadFormStep as D, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DocumentUploadList extends Components.DocumentUploadList, HTMLElement {}
4
+ export const DocumentUploadList: {
5
+ prototype: DocumentUploadList;
6
+ new (): DocumentUploadList;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { D as DocumentUploadList$1, d as defineCustomElement$1 } from './document-upload-list2.js';
2
+
3
+ const DocumentUploadList = DocumentUploadList$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { DocumentUploadList, defineCustomElement };
@@ -0,0 +1,46 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { B as card, h as heading2, C as table, D as tableHeadCell, E as tableCell } from './parts.js';
3
+
4
+ const DocumentUploadList = /*@__PURE__*/ proxyCustomElement(class DocumentUploadList extends HTMLElement {
5
+ constructor(registerHost) {
6
+ super();
7
+ if (registerHost !== false) {
8
+ this.__registerHost();
9
+ }
10
+ this.documents = [];
11
+ }
12
+ renderStatus(status) {
13
+ switch (status) {
14
+ case 'uploading':
15
+ return h("span", { class: "badge bg-info" }, "Uploading...");
16
+ case 'uploaded':
17
+ return h("span", { class: "badge bg-success" }, "Uploaded");
18
+ case 'error':
19
+ return h("span", { class: "badge bg-danger" }, "Error");
20
+ }
21
+ }
22
+ render() {
23
+ if (!this.documents.length) {
24
+ return null;
25
+ }
26
+ return (h("div", { class: "mt-4" }, h("div", { class: "card", part: card }, h("div", { class: "card-body" }, h("h5", { class: "card-title", part: heading2 }, "Uploaded Documents"), h("div", { class: "table-responsive" }, h("table", { class: "table table-sm table-borderless", part: table }, h("thead", null, h("tr", null, h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Category"), h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Document Type"), h("th", { style: { width: '30%' }, part: tableHeadCell, scope: "col" }, "File Name"), h("th", { style: { width: '20%' }, part: tableHeadCell, scope: "col" }, "Status"))), h("tbody", null, this.documents.map((doc, index) => (h("tr", { class: index === 0 ? 'border-bottom border-top' : 'border-bottom' }, h("td", { part: tableCell }, doc.categoryLabel), h("td", { part: tableCell }, doc.docTypeLabel), h("td", { part: tableCell }, doc.fileName), h("td", { part: tableCell }, this.renderStatus(doc.status))))))))))));
27
+ }
28
+ }, [256, "document-upload-list", {
29
+ "documents": [16]
30
+ }]);
31
+ function defineCustomElement() {
32
+ if (typeof customElements === "undefined") {
33
+ return;
34
+ }
35
+ const components = ["document-upload-list"];
36
+ components.forEach(tagName => { switch (tagName) {
37
+ case "document-upload-list":
38
+ if (!customElements.get(tagName)) {
39
+ customElements.define(tagName, DocumentUploadList);
40
+ }
41
+ break;
42
+ } });
43
+ }
44
+ defineCustomElement();
45
+
46
+ export { DocumentUploadList as D, defineCustomElement as d };
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { w as inputInvalidAndFocused, d as inputFocused, b as inputInvalid, e as input, l as label } from './parts.js';
2
+ import { v as inputInvalidAndFocused, d as inputFocused, b as inputInvalid, e as input, l as label } from './parts.js';
3
3
  import { F as FormControlHelpText } from './form-control-help-text2.js';
4
4
  import { F as FormControlErrorText } from './form-control-error-text.js';
5
5
  import './justifi-details2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { w as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, c as inputDisabled, e as input, l as label } from './parts.js';
2
+ import { v as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, c as inputDisabled, e as input, l as label } from './parts.js';
3
3
  import { d as defineCustomElement$1 } from './form-control-help-text3.js';
4
4
 
5
5
  const FormControlTextarea = /*@__PURE__*/ proxyCustomElement(class FormControlTextarea extends HTMLElement {
@@ -1539,23 +1539,6 @@ for (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At
1539
1539
  for (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;
1540
1540
  for (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;
1541
1541
 
1542
- const returnsTrue = () => true;
1543
- function create$8(spec) {
1544
- return new MixedSchema(spec);
1545
- }
1546
- class MixedSchema extends Schema {
1547
- constructor(spec) {
1548
- super(typeof spec === 'function' ? {
1549
- type: 'mixed',
1550
- check: spec
1551
- } : Object.assign({
1552
- type: 'mixed',
1553
- check: returnsTrue
1554
- }, spec));
1555
- }
1556
- }
1557
- create$8.prototype = MixedSchema.prototype;
1558
-
1559
1542
  function create$7() {
1560
1543
  return new BooleanSchema();
1561
1544
  }
@@ -11941,4 +11924,4 @@ class FormController {
11941
11924
  }
11942
11925
  }
11943
11926
 
11944
- export { FormController as F, create$6 as a, create$7 as b, create$3 as c, create$8 as d };
11927
+ export { FormController as F, create$6 as a, create$7 as b, create$3 as c };
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { i as iframeInputStylesSet } from './iframe-input-styles-state.js';
3
- import { w as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, e as input } from './parts.js';
3
+ import { v as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, e as input } from './parts.js';
4
4
 
5
5
  const HiddenInput = /*@__PURE__*/ proxyCustomElement(class HiddenInput extends HTMLElement {
6
6
  constructor(registerHost) {
@@ -3,7 +3,7 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.js';
3
3
  import { F as FormControlErrorText } from './form-control-error-text.js';
4
4
  import { w as webcomponentsPackageJson } from './package.js';
5
5
  import { a as iframeInputStyles } from './iframe-input-styles-state.js';
6
- import { w as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, e as input, l as label } from './parts.js';
6
+ import { v as inputInvalidAndFocused, b as inputInvalid, d as inputFocused, e as input, l as label } from './parts.js';
7
7
 
8
8
  var iframeResizer = {exports: {}};
9
9
 
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
2
2
  import { l as lodashExports } from './lodash.js';
3
3
  import './config-state.js';
4
4
  import { e as convertToUTC, h as convertToLocal } from './utils2.js';
5
- import { I as ICheckoutStatus, f as ICheckoutPaymentModeParam } from './Plaid.js';
5
+ import { I as ICheckoutStatus, g as ICheckoutPaymentModeParam } from './Plaid.js';
6
6
  import './Pagination.js';
7
7
  import './Business.js';
8
8
  import './ApplePay.js';