@justifi/webcomponents 6.12.4 → 6.13.0-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 (209) hide show
  1. package/dist/cjs/{Analytics-BERGweGK.js → Analytics-Be2I_aiS.js} +2 -2
  2. package/dist/cjs/{Plaid-BRSyOOuw.js → Plaid-Aw35bhCX.js} +2 -2
  3. package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +5 -5
  4. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  5. package/dist/cjs/{business.service-Z9OACEQL.js → business.service-CylI3Qrg.js} +1 -1
  6. package/dist/cjs/card-form.cjs.entry.js +2 -2
  7. package/dist/cjs/{check-pkg-version-ByKpJklZ.js → check-pkg-version-BLLLh6v-.js} +1 -1
  8. package/dist/cjs/checkout-actions-8-MUczKw.js +62 -0
  9. package/dist/cjs/{checkout.service-BZOyqXgW.js → checkout.service-BYpinbSR.js} +1 -1
  10. package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
  11. package/dist/cjs/{event-types-AU1B76Vm.js → event-types-DptNnCEP.js} +1 -1
  12. package/dist/cjs/{get-business-aR-C83KX.js → get-business-D10Tmct1.js} +2 -2
  13. package/dist/cjs/{get-payment-details-dwhA02Zl.js → get-payment-details-BB5aa48u.js} +2 -2
  14. package/dist/cjs/{get-subaccounts-B1jmSa2d.js → get-subaccounts-CSD2nAqD.js} +2 -2
  15. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  16. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +10 -64
  17. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +4 -4
  18. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
  19. package/dist/cjs/justifi-business-details.cjs.entry.js +7 -7
  20. package/dist/cjs/justifi-business-form.cjs.entry.js +7 -7
  21. package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
  22. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3141 -0
  23. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  24. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
  25. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -7
  26. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -6
  27. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
  28. package/dist/cjs/justifi-order-terminals.cjs.entry.js +8 -8
  29. package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -7
  30. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -7
  31. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
  32. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
  33. package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -7
  34. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
  35. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +1 -1
  36. package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -8
  37. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +208 -0
  38. package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -7
  39. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
  40. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +5 -5
  42. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  43. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/cjs/{package-B6L3zyfG.js → package-gx36QXN1.js} +1 -1
  46. package/dist/cjs/{payment-provisioning-actions-BiSpysjW.js → payment-provisioning-actions-DimM0KGV.js} +2 -2
  47. package/dist/cjs/{payment.service-ByrgA_QZ.js → payment.service-fy5bXXmA.js} +1 -1
  48. package/dist/cjs/{payout.service-CnQm_BpU.js → payout.service-hp3PTXWI.js} +1 -1
  49. package/dist/cjs/{payouts-status-AuS3Mp0V.js → payouts-status-CF1YT_RL.js} +2 -2
  50. package/dist/cjs/{plaid.service-Dlb8EUR8.js → plaid.service-9PmS4X0g.js} +1 -1
  51. package/dist/cjs/{terminal.service-BdwHQ3Vv.js → terminal.service-D5D76Cnn.js} +1 -1
  52. package/dist/cjs/{utils-FVGp6se3.js → utils-Dcde8Zpt.js} +1 -1
  53. package/dist/cjs/webcomponents.cjs.js +1 -1
  54. package/dist/collection/collection-manifest.json +2 -0
  55. package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +128 -0
  56. package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +349 -0
  57. package/dist/docs.json +283 -1
  58. package/dist/esm/{Analytics-B1bQP71R.js → Analytics-DZWGizAK.js} +2 -2
  59. package/dist/esm/{Plaid-l6nNIjab.js → Plaid-fhlY0CIN.js} +1 -1
  60. package/dist/esm/additional-questions-form-step_14.entry.js +5 -5
  61. package/dist/esm/bank-account-form.entry.js +2 -2
  62. package/dist/esm/{business.service-C31wbMVs.js → business.service-Crs-0Mdy.js} +1 -1
  63. package/dist/esm/card-form.entry.js +2 -2
  64. package/dist/esm/{check-pkg-version-CNwUC4SV.js → check-pkg-version-CVyuA8aH.js} +1 -1
  65. package/dist/esm/checkout-actions-BMnp3uHK.js +59 -0
  66. package/dist/esm/{checkout.service-cVdOGDuI.js → checkout.service-BMAQVmHa.js} +1 -1
  67. package/dist/esm/dispute-notification_2.entry.js +6 -6
  68. package/dist/esm/{event-types-DalU_6SB.js → event-types-CVVB5p_Q.js} +1 -1
  69. package/dist/esm/{get-business-Gg6qn5on.js → get-business-B9ZS1tVq.js} +2 -2
  70. package/dist/esm/{get-payment-details-BiWgSJau.js → get-payment-details-CiR6FrkO.js} +2 -2
  71. package/dist/esm/{get-subaccounts-CkjZeR9U.js → get-subaccounts-VpDr7yN4.js} +2 -2
  72. package/dist/esm/hidden-input_2.entry.js +1 -1
  73. package/dist/esm/justifi-apple-pay_11.entry.js +8 -62
  74. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +4 -4
  75. package/dist/esm/justifi-bank-account-form.entry.js +4 -4
  76. package/dist/esm/justifi-business-details.entry.js +7 -7
  77. package/dist/esm/justifi-business-form.entry.js +7 -7
  78. package/dist/esm/justifi-card-form.entry.js +4 -4
  79. package/dist/esm/justifi-checkout-qr-code.entry.js +3139 -0
  80. package/dist/esm/justifi-checkout.entry.js +4 -4
  81. package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
  82. package/dist/esm/justifi-checkouts-list.entry.js +7 -7
  83. package/dist/esm/justifi-dispute-management.entry.js +6 -6
  84. package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
  85. package/dist/esm/justifi-order-terminals.entry.js +8 -8
  86. package/dist/esm/justifi-payment-details.entry.js +7 -7
  87. package/dist/esm/justifi-payment-provisioning.entry.js +7 -7
  88. package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
  89. package/dist/esm/justifi-payments-list.entry.js +6 -6
  90. package/dist/esm/justifi-payout-details.entry.js +7 -7
  91. package/dist/esm/justifi-payout-transactions-list.entry.js +6 -6
  92. package/dist/esm/justifi-payouts-list-filters.entry.js +1 -1
  93. package/dist/esm/justifi-payouts-list.entry.js +8 -8
  94. package/dist/esm/justifi-qr-terminal.entry.js +206 -0
  95. package/dist/esm/justifi-refund-payment.entry.js +7 -7
  96. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
  97. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
  98. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
  99. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  100. package/dist/esm/justifi-terminals-list.entry.js +7 -7
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/{package-OGt0dCJl.js → package-CZa-hHhJ.js} +1 -1
  103. package/dist/esm/{payment-provisioning-actions-cl5xIYnF.js → payment-provisioning-actions-CcDadiRe.js} +2 -2
  104. package/dist/esm/{payment.service-5_u-UzTY.js → payment.service-BiKQPL4M.js} +1 -1
  105. package/dist/esm/{payout.service-D2zS5y8N.js → payout.service-B9_cyUiU.js} +1 -1
  106. package/dist/esm/{payouts-status-DCjCGTaa.js → payouts-status-xOa5tT66.js} +2 -2
  107. package/dist/esm/{plaid.service-BiJ65YG8.js → plaid.service-bU3qIoKd.js} +1 -1
  108. package/dist/esm/{terminal.service-CIxDfM7V.js → terminal.service-BM6BvevW.js} +1 -1
  109. package/dist/esm/{utils-C1B2hVAB.js → utils-BogmBHgt.js} +1 -1
  110. package/dist/esm/webcomponents.js +1 -1
  111. package/dist/module/Plaid.js +1 -1
  112. package/dist/module/business-bank-account-form-step2.js +1 -1
  113. package/dist/module/checkout-actions.js +59 -0
  114. package/dist/module/get-payment-details.js +1 -1
  115. package/dist/module/justifi-checkout-qr-code.d.ts +11 -0
  116. package/dist/module/justifi-checkout-qr-code.js +6 -0
  117. package/dist/module/justifi-checkout-qr-code2.js +3154 -0
  118. package/dist/module/justifi-checkouts-list.js +1 -1
  119. package/dist/module/justifi-dispute-management.js +1 -1
  120. package/dist/module/justifi-modular-checkout2.js +2 -57
  121. package/dist/module/justifi-order-terminals.js +1 -1
  122. package/dist/module/justifi-payment-details.js +1 -1
  123. package/dist/module/justifi-payment-transactions-list.js +1 -1
  124. package/dist/module/justifi-payments-list.js +1 -1
  125. package/dist/module/justifi-payout-details.js +1 -1
  126. package/dist/module/justifi-payout-transactions-list.js +1 -1
  127. package/dist/module/justifi-payouts-list.js +1 -1
  128. package/dist/module/justifi-qr-terminal.d.ts +11 -0
  129. package/dist/module/justifi-qr-terminal.js +234 -0
  130. package/dist/module/justifi-refund-payment.js +1 -1
  131. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  132. package/dist/module/justifi-terminal-orders-list.js +1 -1
  133. package/dist/module/justifi-terminals-list-filters.js +1 -1
  134. package/dist/module/justifi-terminals-list.js +1 -1
  135. package/dist/module/package.js +1 -1
  136. package/dist/types/api/Checkout.d.ts +1 -2
  137. package/dist/types/components/checkout-qr-code/justifi-checkout-qr-code.d.ts +18 -0
  138. package/dist/types/components/qr-terminal/justifi-qr-terminal.d.ts +42 -0
  139. package/dist/types/components.d.ts +92 -0
  140. package/dist/webcomponents/{p-ea0d7a98.entry.js → p-06e8df55.entry.js} +1 -1
  141. package/dist/webcomponents/{p-daaa2a99.entry.js → p-07f2f1bf.entry.js} +1 -1
  142. package/dist/webcomponents/p-0fb8fb8c.entry.js +1 -0
  143. package/dist/webcomponents/p-10087a53.entry.js +1 -0
  144. package/dist/webcomponents/{p-45c0fb53.entry.js → p-1d7b8c21.entry.js} +1 -1
  145. package/dist/webcomponents/{p-d24240a5.entry.js → p-21c89e22.entry.js} +1 -1
  146. package/dist/webcomponents/{p-d79c5ee4.entry.js → p-2ec7cd88.entry.js} +1 -1
  147. package/dist/webcomponents/p-2qotS5d_.js +1 -0
  148. package/dist/webcomponents/{p-69fdd137.entry.js → p-355a5c8d.entry.js} +1 -1
  149. package/dist/webcomponents/{p-8964f4ca.entry.js → p-37b95a11.entry.js} +1 -1
  150. package/dist/webcomponents/p-37fd1862.entry.js +1 -0
  151. package/dist/webcomponents/{p-c8f3656f.entry.js → p-392f0c1c.entry.js} +1 -1
  152. package/dist/webcomponents/{p-9d021e10.entry.js → p-44cf13ac.entry.js} +1 -1
  153. package/dist/webcomponents/{p-cde76bf8.entry.js → p-55fdab4e.entry.js} +1 -1
  154. package/dist/webcomponents/p-5ccb46ee.entry.js +1 -0
  155. package/dist/webcomponents/{p-8d173a7c.entry.js → p-5f8dfa8d.entry.js} +1 -1
  156. package/dist/webcomponents/{p-07236291.entry.js → p-70cd2808.entry.js} +1 -1
  157. package/dist/webcomponents/{p-3f5e9afb.entry.js → p-769d3d93.entry.js} +1 -1
  158. package/dist/webcomponents/{p-f30069ea.entry.js → p-79bd744e.entry.js} +1 -1
  159. package/dist/webcomponents/{p-49a4123c.entry.js → p-7a4cd292.entry.js} +1 -1
  160. package/dist/webcomponents/p-8d602e60.entry.js +1 -0
  161. package/dist/webcomponents/p-94f14640.entry.js +1 -0
  162. package/dist/webcomponents/p-98f399ec.entry.js +1 -0
  163. package/dist/webcomponents/{p-7119fddd.entry.js → p-9fca25fc.entry.js} +1 -1
  164. package/dist/webcomponents/{p-Ba8jdOkX.js → p-BGvaX-lJ.js} +1 -1
  165. package/dist/webcomponents/{p-NZS8uCtH.js → p-CSgcCWLS.js} +1 -1
  166. package/dist/webcomponents/p-CZa-hHhJ.js +1 -0
  167. package/dist/webcomponents/p-Cg_3KsGO.js +1 -0
  168. package/dist/webcomponents/p-CqPcl9v7.js +1 -0
  169. package/dist/webcomponents/p-CvgL8YaH.js +1 -0
  170. package/dist/webcomponents/{p-oTtn8xDw.js → p-D4E9P7df.js} +1 -1
  171. package/dist/webcomponents/{p-Dk26hk5T.js → p-DD-_8sbs.js} +1 -1
  172. package/dist/webcomponents/{p-mF5zKtkx.js → p-DHFQtPCq.js} +1 -1
  173. package/dist/webcomponents/p-DMqJWUK2.js +1 -0
  174. package/dist/webcomponents/{p-fE5A37L5.js → p-DZAMzLxa.js} +1 -1
  175. package/dist/webcomponents/{p-Cz_7BuGW.js → p-DbOUuBHs.js} +1 -1
  176. package/dist/webcomponents/{p-BxKbnILQ.js → p-Eb1f86_V.js} +1 -1
  177. package/dist/webcomponents/{p-av6jyzyC.js → p-XxG-t-Sl.js} +1 -1
  178. package/dist/webcomponents/{p-7ebed752.entry.js → p-aee2295b.entry.js} +1 -1
  179. package/dist/webcomponents/p-b20b8805.entry.js +1 -0
  180. package/dist/webcomponents/p-bb5de874.entry.js +1 -0
  181. package/dist/webcomponents/p-bd678d4a.entry.js +1 -0
  182. package/dist/webcomponents/{p-f3ff7e00.entry.js → p-c8ee1e4c.entry.js} +1 -1
  183. package/dist/webcomponents/p-ce1dde85.entry.js +1 -0
  184. package/dist/webcomponents/{p-8aa53ef2.entry.js → p-d620d4b4.entry.js} +1 -1
  185. package/dist/webcomponents/{p-ae91fc9b.entry.js → p-dcd600ca.entry.js} +1 -1
  186. package/dist/webcomponents/p-e6b9dfe1.entry.js +1 -0
  187. package/dist/webcomponents/p-eCeOsPHx.js +1 -0
  188. package/dist/webcomponents/{p-BJu1-9kE.js → p-eK8hZOMg.js} +1 -1
  189. package/dist/webcomponents/{p-a1dcdc8b.entry.js → p-ff5c5499.entry.js} +4 -4
  190. package/dist/webcomponents/{p-BXyADlAH.js → p-qju4tNG1.js} +1 -1
  191. package/dist/webcomponents/webcomponents.esm.js +1 -1
  192. package/package.json +16 -14
  193. package/LICENSE +0 -21
  194. package/dist/webcomponents/p-215c6b6b.entry.js +0 -1
  195. package/dist/webcomponents/p-31452258.entry.js +0 -1
  196. package/dist/webcomponents/p-35dd1fc0.entry.js +0 -1
  197. package/dist/webcomponents/p-4ec433f4.entry.js +0 -1
  198. package/dist/webcomponents/p-58b5e08e.entry.js +0 -1
  199. package/dist/webcomponents/p-5G1OMxZz.js +0 -1
  200. package/dist/webcomponents/p-6220a384.entry.js +0 -1
  201. package/dist/webcomponents/p-91aef5bf.entry.js +0 -1
  202. package/dist/webcomponents/p-APOabprT.js +0 -1
  203. package/dist/webcomponents/p-Aacb4jqT.js +0 -1
  204. package/dist/webcomponents/p-Cm9f5fyh.js +0 -1
  205. package/dist/webcomponents/p-OGt0dCJl.js +0 -1
  206. package/dist/webcomponents/p-b272a29d.entry.js +0 -1
  207. package/dist/webcomponents/p-c9fe4f33.entry.js +0 -1
  208. package/dist/webcomponents/p-ef85717f.entry.js +0 -1
  209. package/dist/webcomponents/p-nb_LhbJq.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
2
  import './config-state.js';
3
3
  import './dinero.js';
4
- import { q as Checkout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
4
+ import { r as Checkout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
5
  import { p as pagingDefaults } from './Pagination.js';
6
6
  import './Business.js';
7
7
  import './ApplePay.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { D as Dispute, C as ComponentErrorSeverity, a as ComponentErrorCodes, l as DisputeStatus } from './Plaid.js';
2
+ import { D as Dispute, C as ComponentErrorSeverity, a as ComponentErrorCodes, m as DisputeStatus } from './Plaid.js';
3
3
  import { J as JustifiAnalytics } from './Analytics.js';
4
4
  import { c as checkPkgVersion } from './check-pkg-version.js';
5
5
  import { g as getErrorCode, a as getErrorMessage } from './utils3.js';
@@ -4,71 +4,16 @@ import { J as JustifiAnalytics } from './Analytics.js';
4
4
  import { c as checkPkgVersion } from './check-pkg-version.js';
5
5
  import './config-state.js';
6
6
  import './dinero.js';
7
- import { C as ComponentErrorSeverity, a as ComponentErrorCodes, e as ComponentErrorMessages, I as ICheckoutStatus } from './Plaid.js';
7
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes, d as ComponentErrorMessages, I as ICheckoutStatus } from './Plaid.js';
8
8
  import './Pagination.js';
9
9
  import './Business.js';
10
10
  import './ApplePay.js';
11
- import { g as getErrorCode, a as getErrorMessage } from './utils3.js';
11
+ import { m as makeGetCheckout, a as makeCheckoutComplete } from './checkout-actions.js';
12
12
  import { C as CheckoutService } from './checkout.service.js';
13
13
  import { P as PlaidService } from './plaid.service.js';
14
14
  import { i as insuranceValuesOn, h as hasInsuranceValueChanged, a as insuranceValues } from './insurance-state.js';
15
15
  import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './ModularCheckout.js';
16
16
 
17
- const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSuccess, onError }) => {
18
- var _a;
19
- try {
20
- const response = await service.fetchCheckout(authToken, checkoutId);
21
- if (!response.error) {
22
- const checkout = response.data;
23
- onSuccess({ checkout });
24
- }
25
- else {
26
- const responseError = getErrorMessage(response.error);
27
- const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
28
- return onError({
29
- error: responseError,
30
- code,
31
- severity: ComponentErrorSeverity.ERROR,
32
- });
33
- }
34
- }
35
- catch (error) {
36
- const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
37
- return onError({
38
- error: error.message || error,
39
- code,
40
- severity: ComponentErrorSeverity.ERROR,
41
- });
42
- }
43
- };
44
- const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ payment, onSuccess, onError }) => {
45
- var _a;
46
- try {
47
- const response = await service.complete(authToken, checkoutId, payment);
48
- if (!response.error) {
49
- const checkout = response.data;
50
- onSuccess({ checkout });
51
- }
52
- else {
53
- const responseError = getErrorMessage(response.error);
54
- const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
55
- return onError({
56
- error: responseError,
57
- code,
58
- severity: ComponentErrorSeverity.ERROR,
59
- });
60
- }
61
- }
62
- catch (error) {
63
- const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
64
- return onError({
65
- error: error.message || error,
66
- code,
67
- severity: ComponentErrorSeverity.ERROR,
68
- });
69
- }
70
- };
71
-
72
17
  const JustifiModularCheckout = /*@__PURE__*/ proxyCustomElement(class JustifiModularCheckout extends HTMLElement {
73
18
  constructor(registerHost) {
74
19
  super();
@@ -6,7 +6,7 @@ import './event-types.js';
6
6
  import './justifi-radio-list-item2.js';
7
7
  import { c as checkPkgVersion } from './check-pkg-version.js';
8
8
  import { J as JustifiAnalytics } from './Analytics.js';
9
- import { s as TerminalModel, C as ComponentErrorSeverity, t as TerminalOrder, h as TerminalOrderType, a as ComponentErrorCodes } from './Plaid.js';
9
+ import { t as TerminalModel, C as ComponentErrorSeverity, u as TerminalOrder, i as TerminalOrderType, a as ComponentErrorCodes } from './Plaid.js';
10
10
  import { B as BusinessService } from './business.service.js';
11
11
  import { b as Business } from './Business.js';
12
12
  import { m as makeGetBusiness } from './get-business.js';
@@ -1,7 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
2
  import { P as PaymentService } from './payment.service.js';
3
3
  import { m as makeGetPaymentDetails } from './get-payment-details.js';
4
- import { C as ComponentErrorSeverity, a as ComponentErrorCodes, m as PaymentStatuses, l as DisputeStatus } from './Plaid.js';
4
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes, n as PaymentStatuses, m as DisputeStatus } from './Plaid.js';
5
5
  import { J as JustifiAnalytics } from './Analytics.js';
6
6
  import { c as checkPkgVersion } from './check-pkg-version.js';
7
7
  import './config-state.js';
@@ -1,7 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
2
  import './config-state.js';
3
3
  import './dinero.js';
4
- import { n as PaymentBalanceTransaction, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
4
+ import { o as PaymentBalanceTransaction, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
5
  import { p as pagingDefaults } from './Pagination.js';
6
6
  import './Business.js';
7
7
  import './ApplePay.js';
@@ -2,7 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
2
2
  import { P as PaymentService } from './payment.service.js';
3
3
  import './config-state.js';
4
4
  import './dinero.js';
5
- import { d as Payment, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
+ import { e as Payment, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
6
6
  import { p as pagingDefaults } from './Pagination.js';
7
7
  import './Business.js';
8
8
  import './ApplePay.js';
@@ -2,7 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
2
2
  import { P as PayoutService } from './payout.service.js';
3
3
  import './config-state.js';
4
4
  import './dinero.js';
5
- import { o as Payout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
+ import { p as Payout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
6
6
  import './Pagination.js';
7
7
  import './Business.js';
8
8
  import './ApplePay.js';
@@ -1,7 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
2
  import { c as configState } from './config-state.js';
3
3
  import './dinero.js';
4
- import { p as PayoutBalanceTransaction, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
4
+ import { q as PayoutBalanceTransaction, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
5
5
  import { p as pagingDefaults } from './Pagination.js';
6
6
  import './Business.js';
7
7
  import './ApplePay.js';
@@ -1,5 +1,5 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import { o as Payout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
2
+ import { p as Payout, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
3
3
  import { J as JustifiAnalytics } from './Analytics.js';
4
4
  import { c as checkPkgVersion } from './check-pkg-version.js';
5
5
  import { P as PayoutService } from './payout.service.js';
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface JustifiQrTerminal extends Components.JustifiQrTerminal, HTMLElement {}
4
+ export const JustifiQrTerminal: {
5
+ prototype: JustifiQrTerminal;
6
+ new (): JustifiQrTerminal;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,234 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { m as makeGetCheckout } from './checkout-actions.js';
3
+ import { C as CheckoutService } from './checkout.service.js';
4
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes, I as ICheckoutStatus, d as ComponentErrorMessages, h as CompletionStatuses } from './Plaid.js';
5
+ import { J as JustifiAnalytics } from './Analytics.js';
6
+ import { c as checkPkgVersion } from './check-pkg-version.js';
7
+ import { d as defineCustomElement$2 } from './justifi-checkout-qr-code2.js';
8
+
9
+ const JustifiQrTerminal$1 = /*@__PURE__*/ proxyCustomElement(class JustifiQrTerminal extends HTMLElement {
10
+ constructor(registerHost) {
11
+ super();
12
+ if (registerHost !== false) {
13
+ this.__registerHost();
14
+ }
15
+ this.checkoutCompleted = createEvent(this, "checkout-completed", 7);
16
+ this.checkoutExpired = createEvent(this, "checkout-expired", 7);
17
+ this.errorEvent = createEvent(this, "error-event", 7);
18
+ this.pollIntervalMs = 3000;
19
+ this.pollTimeoutMs = 600000;
20
+ this.terminalState = 'loading';
21
+ this.paymentStatus = '';
22
+ this.errorMessage = '';
23
+ this.pollIntervalHandle = null;
24
+ this.pollTimeoutHandle = null;
25
+ this.failedDismissHandle = null;
26
+ this.seenCompletionCreatedAts = new Set();
27
+ this.inFlight = false;
28
+ }
29
+ componentWillLoad() {
30
+ checkPkgVersion();
31
+ this.analytics = new JustifiAnalytics(this);
32
+ this.initialize();
33
+ }
34
+ disconnectedCallback() {
35
+ var _a;
36
+ this.stopAll();
37
+ (_a = this.analytics) === null || _a === void 0 ? void 0 : _a.cleanup();
38
+ }
39
+ propChanged() {
40
+ this.stopAll();
41
+ this.initialize();
42
+ }
43
+ suppressInnerErrors(event) {
44
+ // Suppress error-event bubbling from inner justifi-checkout-qr-code
45
+ event.stopPropagation();
46
+ }
47
+ get effectivePollInterval() {
48
+ return Math.max(1000, this.pollIntervalMs);
49
+ }
50
+ initialize() {
51
+ if (!this.authToken || !this.checkoutId) {
52
+ this.errorEvent.emit({
53
+ message: 'authToken and checkoutId are required',
54
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
55
+ severity: ComponentErrorSeverity.ERROR,
56
+ });
57
+ return;
58
+ }
59
+ this.terminalState = 'loading';
60
+ this.getCheckout = makeGetCheckout({
61
+ authToken: this.authToken,
62
+ checkoutId: this.checkoutId,
63
+ service: new CheckoutService(),
64
+ });
65
+ this.getCheckout({
66
+ onSuccess: ({ checkout }) => this.handleInitialLoad(checkout),
67
+ onError: ({ error, code, severity }) => {
68
+ this.terminalState = 'error';
69
+ this.errorMessage = error;
70
+ this.errorEvent.emit({ message: error, errorCode: code, severity });
71
+ },
72
+ });
73
+ }
74
+ handleInitialLoad(checkout) {
75
+ var _a;
76
+ switch (checkout.status) {
77
+ case ICheckoutStatus.expired:
78
+ this.terminalState = 'expired';
79
+ this.checkoutExpired.emit({ checkoutId: this.checkoutId });
80
+ this.errorEvent.emit({
81
+ message: ComponentErrorMessages.CHECKOUT_EXPIRED,
82
+ errorCode: ComponentErrorCodes.CHECKOUT_EXPIRED,
83
+ severity: ComponentErrorSeverity.ERROR,
84
+ });
85
+ break;
86
+ case ICheckoutStatus.completed:
87
+ this.terminalState = 'completed';
88
+ this.paymentStatus = this.resolvePaymentStatus(checkout);
89
+ this.checkoutCompleted.emit({ checkoutId: this.checkoutId, paymentStatus: this.paymentStatus });
90
+ break;
91
+ default:
92
+ ((_a = checkout.completions) !== null && _a !== void 0 ? _a : []).forEach((c) => this.seenCompletionCreatedAts.add(c.created_at));
93
+ this.terminalState = 'ready';
94
+ this.startPolling();
95
+ break;
96
+ }
97
+ }
98
+ startPolling() {
99
+ this.pollTimeoutHandle = setTimeout(() => {
100
+ this.stopAll();
101
+ this.terminalState = 'error';
102
+ this.errorMessage = 'Checkout polling timed out';
103
+ this.errorEvent.emit({
104
+ message: 'Checkout polling timed out',
105
+ errorCode: ComponentErrorCodes.FETCH_ERROR,
106
+ severity: ComponentErrorSeverity.ERROR,
107
+ });
108
+ }, this.pollTimeoutMs);
109
+ this.pollIntervalHandle = setInterval(() => this.tick(), this.effectivePollInterval);
110
+ }
111
+ tick() {
112
+ if (this.inFlight)
113
+ return;
114
+ this.inFlight = true;
115
+ this.getCheckout({
116
+ onSuccess: ({ checkout }) => {
117
+ this.inFlight = false;
118
+ this.handlePollResult(checkout);
119
+ },
120
+ onError: ({ error, code, severity }) => {
121
+ this.inFlight = false;
122
+ this.stopAll();
123
+ this.terminalState = 'error';
124
+ this.errorMessage = error;
125
+ this.errorEvent.emit({ message: error, errorCode: code, severity });
126
+ },
127
+ });
128
+ }
129
+ handlePollResult(checkout) {
130
+ var _a;
131
+ const completions = (_a = checkout.completions) !== null && _a !== void 0 ? _a : [];
132
+ const newFailures = completions.filter((c) => !this.seenCompletionCreatedAts.has(c.created_at) && c.payment_status === 'failed');
133
+ newFailures.forEach((c) => this.seenCompletionCreatedAts.add(c.created_at));
134
+ if (newFailures.length > 0) {
135
+ this.terminalState = 'payment-failed';
136
+ if (this.failedDismissHandle)
137
+ clearTimeout(this.failedDismissHandle);
138
+ this.failedDismissHandle = setTimeout(() => {
139
+ if (this.terminalState === 'payment-failed')
140
+ this.terminalState = 'ready';
141
+ }, 3000);
142
+ }
143
+ if (checkout.status === ICheckoutStatus.completed) {
144
+ this.stopAll();
145
+ this.terminalState = 'completed';
146
+ this.paymentStatus = this.resolvePaymentStatus(checkout);
147
+ this.checkoutCompleted.emit({ checkoutId: this.checkoutId, paymentStatus: this.paymentStatus });
148
+ return;
149
+ }
150
+ if (checkout.status === ICheckoutStatus.expired) {
151
+ this.stopAll();
152
+ this.terminalState = 'expired';
153
+ this.checkoutExpired.emit({ checkoutId: this.checkoutId });
154
+ this.errorEvent.emit({
155
+ message: ComponentErrorMessages.CHECKOUT_EXPIRED,
156
+ errorCode: ComponentErrorCodes.CHECKOUT_EXPIRED,
157
+ severity: ComponentErrorSeverity.ERROR,
158
+ });
159
+ }
160
+ }
161
+ resolvePaymentStatus(checkout) {
162
+ var _a, _b;
163
+ const completions = (_a = checkout.completions) !== null && _a !== void 0 ? _a : [];
164
+ const sorted = [...completions].sort((a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime());
165
+ const latestStatus = (_b = sorted[0]) === null || _b === void 0 ? void 0 : _b.payment_status;
166
+ if (latestStatus === CompletionStatuses.succeeded)
167
+ return 'succeeded';
168
+ if (latestStatus == null) {
169
+ return checkout.successful_payment_id ? 'succeeded' : 'pending';
170
+ }
171
+ return 'pending';
172
+ }
173
+ stopAll() {
174
+ if (this.pollIntervalHandle) {
175
+ clearInterval(this.pollIntervalHandle);
176
+ this.pollIntervalHandle = null;
177
+ }
178
+ if (this.pollTimeoutHandle) {
179
+ clearTimeout(this.pollTimeoutHandle);
180
+ this.pollTimeoutHandle = null;
181
+ }
182
+ if (this.failedDismissHandle) {
183
+ clearTimeout(this.failedDismissHandle);
184
+ this.failedDismissHandle = null;
185
+ }
186
+ this.inFlight = false;
187
+ }
188
+ render() {
189
+ if (!this.authToken || !this.checkoutId)
190
+ return null;
191
+ return (h("div", null, this.terminalState === 'loading' && null, (this.terminalState === 'ready' || this.terminalState === 'payment-failed') && (h("div", null, h("justifi-checkout-qr-code", { checkoutId: this.checkoutId }), this.terminalState === 'payment-failed' && (h("p", null, "Payment failed. Please try again.")), this.terminalState === 'ready' && (h("p", null, "Scan to pay")))), this.terminalState === 'completed' && (h("div", null, this.paymentStatus === 'succeeded'
192
+ ? h("p", null, "Payment received")
193
+ : h("p", null, "Payment pending"))), this.terminalState === 'expired' && (h("p", null, "Checkout expired. Please create a new checkout.")), this.terminalState === 'error' && (h("p", null, this.errorMessage))));
194
+ }
195
+ static get watchers() { return {
196
+ "authToken": ["propChanged"],
197
+ "checkoutId": ["propChanged"]
198
+ }; }
199
+ }, [256, "justifi-qr-terminal", {
200
+ "authToken": [1, "auth-token"],
201
+ "checkoutId": [1, "checkout-id"],
202
+ "pollIntervalMs": [2, "poll-interval-ms"],
203
+ "pollTimeoutMs": [2, "poll-timeout-ms"],
204
+ "terminalState": [32],
205
+ "paymentStatus": [32],
206
+ "errorMessage": [32]
207
+ }, [[0, "error-event", "suppressInnerErrors"]], {
208
+ "authToken": ["propChanged"],
209
+ "checkoutId": ["propChanged"]
210
+ }]);
211
+ function defineCustomElement$1() {
212
+ if (typeof customElements === "undefined") {
213
+ return;
214
+ }
215
+ const components = ["justifi-qr-terminal", "justifi-checkout-qr-code"];
216
+ components.forEach(tagName => { switch (tagName) {
217
+ case "justifi-qr-terminal":
218
+ if (!customElements.get(tagName)) {
219
+ customElements.define(tagName, JustifiQrTerminal$1);
220
+ }
221
+ break;
222
+ case "justifi-checkout-qr-code":
223
+ if (!customElements.get(tagName)) {
224
+ defineCustomElement$2();
225
+ }
226
+ break;
227
+ } });
228
+ }
229
+ defineCustomElement$1();
230
+
231
+ const JustifiQrTerminal = JustifiQrTerminal$1;
232
+ const defineCustomElement = defineCustomElement$1;
233
+
234
+ export { JustifiQrTerminal, defineCustomElement };
@@ -2,7 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
2
2
  import { c as create$3, a as create$6, F as FormController } from './form.js';
3
3
  import { b as formatCurrency } from './utils2.js';
4
4
  import './config-state.js';
5
- import { R as RefundReasons, C as ComponentErrorSeverity, a as ComponentErrorCodes, u as RefundPayload } from './Plaid.js';
5
+ import { R as RefundReasons, C as ComponentErrorSeverity, a as ComponentErrorCodes, v as RefundPayload } from './Plaid.js';
6
6
  import './Pagination.js';
7
7
  import './Business.js';
8
8
  import './ApplePay.js';
@@ -8,7 +8,7 @@ import './event-types.js';
8
8
  import './justifi-radio-list-item2.js';
9
9
  import './config-state.js';
10
10
  import { e as convertToUTC, h as convertToLocal } from './utils2.js';
11
- import { T as TerminalOrderStatus, h as TerminalOrderType } from './Plaid.js';
11
+ import { T as TerminalOrderStatus, i as TerminalOrderType } from './Plaid.js';
12
12
  import './Pagination.js';
13
13
  import './Business.js';
14
14
  import './ApplePay.js';
@@ -8,7 +8,7 @@ import { c as checkPkgVersion } from './check-pkg-version.js';
8
8
  import { B as tableHeadCell, ah as getAlternateTableCellPart } from './parts.js';
9
9
  import { h as convertToLocal } from './utils2.js';
10
10
  import './config-state.js';
11
- import { h as TerminalOrderType, t as TerminalOrder, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
11
+ import { i as TerminalOrderType, u as TerminalOrder, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
12
12
  import { p as pagingDefaults } from './Pagination.js';
13
13
  import './Business.js';
14
14
  import './ApplePay.js';
@@ -8,7 +8,7 @@ import './justifi-details2.js';
8
8
  import './event-types.js';
9
9
  import './justifi-radio-list-item2.js';
10
10
  import './config-state.js';
11
- import { i as ITerminalStatus } from './Plaid.js';
11
+ import { j as ITerminalStatus } from './Plaid.js';
12
12
  import './Pagination.js';
13
13
  import './Business.js';
14
14
  import './ApplePay.js';
@@ -1,5 +1,5 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import { r as Terminal, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
2
+ import { s as Terminal, C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
3
3
  import { J as JustifiAnalytics } from './Analytics.js';
4
4
  import { c as checkPkgVersion } from './check-pkg-version.js';
5
5
  import { T as TerminalService } from './terminal.service.js';
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "6.12.4";
2
+ const version = "6.13.0-rc.1";
3
3
  var webcomponentsPackageJson = {
4
4
  name: name,
5
5
  version: version};
@@ -9,7 +9,7 @@ export interface IBnpl {
9
9
  provider_order_id: string;
10
10
  provider_api_version: string;
11
11
  }
12
- interface ICompletion {
12
+ export interface ICompletion {
13
13
  payment_mode?: ICheckoutPaymentMode;
14
14
  payment_token?: string | null;
15
15
  payment_status?: string | null;
@@ -171,4 +171,3 @@ export interface ICheckoutPaymentMethod {
171
171
  address_postal_code_check: string;
172
172
  bin_details: null;
173
173
  }
174
- export {};
@@ -0,0 +1,18 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { ComponentErrorEvent } from '../../api/ComponentEvents';
3
+ import JustifiAnalytics from '../../api/Analytics';
4
+ export declare class JustifiCheckoutQrCode {
5
+ el: HTMLElement;
6
+ checkoutId: string;
7
+ size: number;
8
+ errorEvent: EventEmitter<ComponentErrorEvent>;
9
+ analytics: JustifiAnalytics;
10
+ private qrContainerEl;
11
+ componentWillLoad(): void;
12
+ componentDidLoad(): void;
13
+ disconnectedCallback(): void;
14
+ propChanged(): void;
15
+ private get checkoutUrl();
16
+ private renderQrCode;
17
+ render(): any;
18
+ }
@@ -0,0 +1,42 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { ComponentErrorEvent } from '../../api/ComponentEvents';
3
+ import JustifiAnalytics from '../../api/Analytics';
4
+ type TerminalState = 'loading' | 'ready' | 'payment-failed' | 'completed' | 'expired' | 'error';
5
+ export declare class JustifiQrTerminal {
6
+ authToken: string;
7
+ checkoutId: string;
8
+ pollIntervalMs: number;
9
+ pollTimeoutMs: number;
10
+ terminalState: TerminalState;
11
+ paymentStatus: string;
12
+ errorMessage: string;
13
+ checkoutCompleted: EventEmitter<{
14
+ checkoutId: string;
15
+ paymentStatus: string;
16
+ }>;
17
+ checkoutExpired: EventEmitter<{
18
+ checkoutId: string;
19
+ }>;
20
+ errorEvent: EventEmitter<ComponentErrorEvent>;
21
+ analytics: JustifiAnalytics;
22
+ private pollIntervalHandle;
23
+ private pollTimeoutHandle;
24
+ private failedDismissHandle;
25
+ private seenCompletionCreatedAts;
26
+ private inFlight;
27
+ private getCheckout;
28
+ componentWillLoad(): void;
29
+ disconnectedCallback(): void;
30
+ propChanged(): void;
31
+ suppressInnerErrors(event: CustomEvent): void;
32
+ private get effectivePollInterval();
33
+ private initialize;
34
+ private handleInitialLoad;
35
+ private startPolling;
36
+ private tick;
37
+ private handlePollResult;
38
+ private resolvePaymentStatus;
39
+ private stopAll;
40
+ render(): any;
41
+ }
42
+ export {};