@justifi/webcomponents 4.19.0 → 4.19.1-rc-3

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 (224) hide show
  1. package/dist/cjs/{Analytics-ff013cbc.js → Analytics-1ca4e47e.js} +2 -3
  2. package/dist/cjs/{business.service-f63650f5.js → business.service-6bb7ac82.js} +5 -6
  3. package/dist/cjs/{get-payout-csv-f3aee6d0.js → get-payout-csv-1391ff3e.js} +3 -4
  4. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +7 -8
  5. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -5
  6. package/dist/cjs/justifi-business-details.cjs.entry.js +3 -4
  7. package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
  8. package/dist/cjs/justifi-card-form.cjs.entry.js +4 -5
  9. package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
  10. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
  11. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
  12. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +11 -9
  13. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +1 -2
  14. package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -4
  15. package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -6
  16. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  17. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -6
  18. package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -4
  19. package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -4
  20. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -4
  21. package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -3
  22. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -5
  23. package/dist/cjs/{package-cb0f8cb1.js → package-bc2632e4.js} +2 -4
  24. package/dist/cjs/{payment.service-0a64f9cd.js → payment.service-dfcfa19b.js} +2 -3
  25. package/dist/collection/api/services/analytics.service.js +1 -2
  26. package/dist/collection/api/services/business.service.js +5 -6
  27. package/dist/collection/api/services/checkout.service.js +2 -3
  28. package/dist/collection/api/services/insurance.service.js +2 -3
  29. package/dist/collection/api/services/payment.service.js +2 -3
  30. package/dist/collection/api/services/payout.service.js +3 -4
  31. package/dist/collection/api/services/provision.service.js +2 -4
  32. package/dist/collection/api/services/reports.service.js +1 -2
  33. package/dist/collection/components/bank-account-form/bank-account-form.js +3 -4
  34. package/dist/collection/components/business-forms/business-form/business-form.js +2 -3
  35. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -3
  36. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +2 -3
  37. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -3
  38. package/dist/collection/components/card-form/card-form.js +3 -4
  39. package/dist/collection/components/checkout/checkout-core.js +4 -4
  40. package/dist/collection/components/checkout/new-payment-method.js +6 -4
  41. package/dist/collection/components/checkout/payment-method-options.js +3 -4
  42. package/dist/collection/components/checkout/saved-payment-method.js +3 -4
  43. package/dist/collection/components/checkout/sezzle-payment-method.js +3 -4
  44. package/dist/collection/components/payment-form/payment-form.js +3 -4
  45. package/dist/collection/components/refund-form/refund-form.js +2 -3
  46. package/dist/docs.json +8 -8
  47. package/dist/esm/{Analytics-33b8fa8d.js → Analytics-c51439be.js} +2 -3
  48. package/dist/esm/{business.service-74bd1212.js → business.service-f45decfc.js} +5 -6
  49. package/dist/esm/{get-payout-csv-b494abfe.js → get-payout-csv-e784a2ab.js} +3 -4
  50. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +7 -8
  51. package/dist/esm/justifi-bank-account-form.entry.js +4 -5
  52. package/dist/esm/justifi-business-details.entry.js +3 -4
  53. package/dist/esm/justifi-business-form.entry.js +4 -5
  54. package/dist/esm/justifi-card-form.entry.js +4 -5
  55. package/dist/esm/justifi-checkout-core.entry.js +3 -3
  56. package/dist/esm/justifi-checkout.entry.js +4 -5
  57. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
  58. package/dist/esm/justifi-new-payment-method_4.entry.js +11 -9
  59. package/dist/esm/justifi-owner-form_3.entry.js +1 -2
  60. package/dist/esm/justifi-payment-details.entry.js +3 -4
  61. package/dist/esm/justifi-payment-form.entry.js +5 -6
  62. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  63. package/dist/esm/justifi-payment-provisioning.entry.js +5 -6
  64. package/dist/esm/justifi-payments-list.entry.js +3 -4
  65. package/dist/esm/justifi-payout-details.entry.js +3 -4
  66. package/dist/esm/justifi-payouts-list.entry.js +3 -4
  67. package/dist/esm/justifi-refund-form.entry.js +2 -3
  68. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
  69. package/dist/esm/{package-3e407c6d.js → package-09a354e0.js} +2 -4
  70. package/dist/esm/{payment.service-3ca4a492.js → payment.service-dad5153b.js} +2 -3
  71. package/dist/globals.d.ts +2 -0
  72. package/dist/module/Analytics.js +1 -2
  73. package/dist/module/business-bank-account-form-step.js +2 -3
  74. package/dist/module/business-document-upload-form-step.js +2 -3
  75. package/dist/module/business-terms-conditions-form-step.js +2 -3
  76. package/dist/module/business.service.js +5 -6
  77. package/dist/module/checkout-core.js +3 -3
  78. package/dist/module/get-payout-csv.js +3 -4
  79. package/dist/module/justifi-bank-account-form.js +2 -3
  80. package/dist/module/justifi-business-form.js +2 -3
  81. package/dist/module/justifi-card-form.js +2 -3
  82. package/dist/module/justifi-checkout.js +2 -3
  83. package/dist/module/justifi-gross-payment-chart.js +1 -2
  84. package/dist/module/justifi-payment-form.js +3 -4
  85. package/dist/module/justifi-payment-provisioning.js +2 -3
  86. package/dist/module/justifi-refund-form.js +2 -3
  87. package/dist/module/justifi-season-interruption-insurance.js +2 -3
  88. package/dist/module/new-payment-method.js +5 -3
  89. package/dist/module/package.js +2 -4
  90. package/dist/module/payment-method-options.js +2 -3
  91. package/dist/module/payment.service.js +2 -3
  92. package/dist/module/saved-payment-method.js +2 -3
  93. package/dist/module/sezzle-payment-method.js +2 -3
  94. package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
  95. package/dist/webcomponents/index.esm.js +1 -0
  96. package/dist/webcomponents/p-01a404ca.entry.js +44 -0
  97. package/dist/webcomponents/p-03d35880.entry.js +130 -0
  98. package/dist/webcomponents/p-06ff0429.entry.js +65 -0
  99. package/dist/webcomponents/p-08b0fb31.js +41 -1
  100. package/dist/webcomponents/p-14c91ffd.js +20 -1
  101. package/dist/webcomponents/p-1a17ea7d.entry.js +1684 -0
  102. package/dist/webcomponents/p-1ad5995e.js +3599 -1
  103. package/dist/webcomponents/p-1ff8810b.js +29 -1
  104. package/dist/webcomponents/p-21aeb013.entry.js +80 -0
  105. package/dist/webcomponents/p-2338affa.js +213 -1
  106. package/dist/webcomponents/p-258b1ee2.entry.js +149 -0
  107. package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
  108. package/dist/webcomponents/p-29c0b182.js +114 -1
  109. package/dist/webcomponents/p-2b6c9c4f.js +7 -1
  110. package/dist/webcomponents/p-2dabeb5a.js +79 -0
  111. package/dist/webcomponents/p-2eab3c90.js +3052 -1
  112. package/dist/webcomponents/p-33272d05.entry.js +94 -0
  113. package/dist/webcomponents/p-3642ad71.entry.js +145 -0
  114. package/dist/webcomponents/p-387450f6.js +77 -0
  115. package/dist/webcomponents/p-3e9ef4a8.js +28 -0
  116. package/dist/webcomponents/p-3fd13ca3.js +52 -1
  117. package/dist/webcomponents/p-41bc7c5c.entry.js +97 -0
  118. package/dist/webcomponents/p-4d8b45c6.entry.js +98 -0
  119. package/dist/webcomponents/p-525db3e8.js +22 -1
  120. package/dist/webcomponents/p-5482d030.entry.js +21 -0
  121. package/dist/webcomponents/p-56f6ce4c.js +10 -1
  122. package/dist/webcomponents/p-576826b1.entry.js +43 -0
  123. package/dist/webcomponents/p-5968ff8a.js +178 -1
  124. package/dist/webcomponents/p-5bd7b204.entry.js +75 -0
  125. package/dist/webcomponents/p-5cb3f0b2.entry.js +261 -0
  126. package/dist/webcomponents/p-5e70442b.entry.js +74 -0
  127. package/dist/webcomponents/p-5f835b89.entry.js +606 -0
  128. package/dist/webcomponents/p-6078a370.js +244 -1
  129. package/dist/webcomponents/p-68843186.entry.js +73 -0
  130. package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
  131. package/dist/webcomponents/p-7582b554.entry.js +18 -0
  132. package/dist/webcomponents/p-79646550.entry.js +61 -0
  133. package/dist/webcomponents/p-7c76e67c.entry.js +117 -0
  134. package/dist/webcomponents/p-7d85af5c.js +16 -1
  135. package/dist/webcomponents/p-800d31fe.entry.js +162 -0
  136. package/dist/webcomponents/p-8115b2f4.js +28 -1
  137. package/dist/webcomponents/p-83125497.js +4027 -1
  138. package/dist/webcomponents/p-85fc69e5.js +90 -1
  139. package/dist/webcomponents/p-890088fc.entry.js +298 -0
  140. package/dist/webcomponents/p-89887332.js +301 -1
  141. package/dist/webcomponents/p-8df7bde8.js +27 -1
  142. package/dist/webcomponents/p-8eb774df.entry.js +54 -0
  143. package/dist/webcomponents/p-9c9c7dac.js +24 -1
  144. package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
  145. package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
  146. package/dist/webcomponents/p-a5c5821e.entry.js +101 -0
  147. package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
  148. package/dist/webcomponents/p-a6d04afc.js +44 -0
  149. package/dist/webcomponents/p-ac086069.entry.js +58 -0
  150. package/dist/webcomponents/p-af244664.js +126 -1
  151. package/dist/webcomponents/p-b82c146f.entry.js +111 -0
  152. package/dist/webcomponents/p-b8a03a4b.entry.js +131 -0
  153. package/dist/webcomponents/p-ba4bae6f.js +12 -1
  154. package/dist/webcomponents/p-ba5fae28.js +90 -1
  155. package/dist/webcomponents/p-c636f563.entry.js +791 -0
  156. package/dist/webcomponents/p-c86c24d2.entry.js +94 -0
  157. package/dist/webcomponents/p-cb26f708.js +18 -0
  158. package/dist/webcomponents/p-ce733539.entry.js +99 -0
  159. package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
  160. package/dist/webcomponents/p-d5095f6c.entry.js +133 -0
  161. package/dist/webcomponents/p-d89bad72.js +39 -1
  162. package/dist/webcomponents/p-dce846bf.js +27 -1
  163. package/dist/webcomponents/p-df21aaad.js +120 -1
  164. package/dist/webcomponents/p-e1255160.js +3 -1
  165. package/dist/webcomponents/p-e333620e.js +34 -1
  166. package/dist/webcomponents/p-e356f280.entry.js +29 -0
  167. package/dist/webcomponents/p-e3fab0e2.js +43 -1
  168. package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
  169. package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
  170. package/dist/webcomponents/p-fad19d75.js +1638 -2
  171. package/dist/webcomponents/webcomponents.css +362 -4
  172. package/dist/webcomponents/webcomponents.esm.js +20 -1
  173. package/package.json +2 -4
  174. package/dist/cjs/config-ff2dda66.js +0 -15
  175. package/dist/config.js +0 -11
  176. package/dist/esm/config-476c7241.js +0 -13
  177. package/dist/module/config.js +0 -13
  178. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +0 -11
  179. package/dist/webcomponents/p-07109641.entry.js +0 -1
  180. package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
  181. package/dist/webcomponents/p-17e4246f.entry.js +0 -1
  182. package/dist/webcomponents/p-195f92e9.entry.js +0 -1
  183. package/dist/webcomponents/p-1a43e355.entry.js +0 -19
  184. package/dist/webcomponents/p-23014988.entry.js +0 -1
  185. package/dist/webcomponents/p-25dba252.entry.js +0 -1
  186. package/dist/webcomponents/p-27981600.entry.js +0 -1
  187. package/dist/webcomponents/p-301e0493.entry.js +0 -1
  188. package/dist/webcomponents/p-304dd644.entry.js +0 -1
  189. package/dist/webcomponents/p-30a493cd.entry.js +0 -1
  190. package/dist/webcomponents/p-462dc522.entry.js +0 -1
  191. package/dist/webcomponents/p-487b72a8.entry.js +0 -1
  192. package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
  193. package/dist/webcomponents/p-4b4580dd.js +0 -1
  194. package/dist/webcomponents/p-52021fa1.entry.js +0 -1
  195. package/dist/webcomponents/p-53e64f15.entry.js +0 -1
  196. package/dist/webcomponents/p-60a370fc.entry.js +0 -1
  197. package/dist/webcomponents/p-623a4479.entry.js +0 -1
  198. package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
  199. package/dist/webcomponents/p-63acf322.js +0 -1
  200. package/dist/webcomponents/p-6f03b35a.entry.js +0 -1
  201. package/dist/webcomponents/p-75b4daef.js +0 -1
  202. package/dist/webcomponents/p-8603348a.js +0 -1
  203. package/dist/webcomponents/p-8c1e981b.entry.js +0 -1
  204. package/dist/webcomponents/p-8e541a32.entry.js +0 -1
  205. package/dist/webcomponents/p-9279aa49.entry.js +0 -1
  206. package/dist/webcomponents/p-96b42e7d.entry.js +0 -1
  207. package/dist/webcomponents/p-99022846.entry.js +0 -1
  208. package/dist/webcomponents/p-ae263544.js +0 -1
  209. package/dist/webcomponents/p-b16dfd5d.entry.js +0 -1
  210. package/dist/webcomponents/p-bbed6107.entry.js +0 -1
  211. package/dist/webcomponents/p-bc92235c.entry.js +0 -1
  212. package/dist/webcomponents/p-be39c802.entry.js +0 -1
  213. package/dist/webcomponents/p-c4b87db2.entry.js +0 -1
  214. package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
  215. package/dist/webcomponents/p-cd7105dd.entry.js +0 -1
  216. package/dist/webcomponents/p-d101c5db.js +0 -1
  217. package/dist/webcomponents/p-d1fbeae5.entry.js +0 -1
  218. package/dist/webcomponents/p-d8355f91.entry.js +0 -1
  219. package/dist/webcomponents/p-e2c88817.entry.js +0 -1
  220. package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
  221. package/dist/webcomponents/p-e7067ef2.entry.js +0 -1
  222. package/dist/webcomponents/p-f0866375.entry.js +0 -1
  223. package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
  224. package/dist/webcomponents/p-fe33151d.entry.js +0 -1
@@ -0,0 +1,94 @@
1
+ import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
+ import { P as PaymentService } from './p-cb26f708.js';
3
+ import './p-56f6ce4c.js';
4
+ import { P as Payment } from './p-df21aaad.js';
5
+ import './p-e3fab0e2.js';
6
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
7
+ import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
8
+ import { E as ErrorState } from './p-dce846bf.js';
9
+ import { J as JustifiAnalytics } from './p-387450f6.js';
10
+ import './p-29c0b182.js';
11
+ import './p-2dabeb5a.js';
12
+
13
+ const makeGetPayments = ({ id, authToken, service }) => async ({ params, onSuccess, onError }) => {
14
+ var _a, _b;
15
+ try {
16
+ const response = await service.fetchPayments(id, authToken, params);
17
+ if (!response.error) {
18
+ const pagingInfo = Object.assign({}, response.page_info);
19
+ const payments = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.map((dataItem) => new Payment(dataItem))) || [];
20
+ onSuccess({ payments, pagingInfo });
21
+ }
22
+ else {
23
+ const responseError = getErrorMessage(response.error);
24
+ const code = getErrorCode((_b = response.error) === null || _b === void 0 ? void 0 : _b.code);
25
+ return onError({
26
+ error: responseError,
27
+ code,
28
+ severity: ComponentErrorSeverity.ERROR,
29
+ });
30
+ }
31
+ }
32
+ catch (error) {
33
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
34
+ return onError({
35
+ error: error.message || error,
36
+ code,
37
+ severity: ComponentErrorSeverity.ERROR,
38
+ });
39
+ }
40
+ };
41
+
42
+ const PaymentsList = class {
43
+ constructor(hostRef) {
44
+ registerInstance(this, hostRef);
45
+ this.errorEvent = createEvent(this, "error-event", 7);
46
+ this.handleErrorEvent = (event) => {
47
+ this.errorMessage = event.detail.message;
48
+ this.errorEvent.emit(event.detail);
49
+ };
50
+ this.accountId = undefined;
51
+ this.authToken = undefined;
52
+ this.getPayments = undefined;
53
+ this.errorMessage = null;
54
+ }
55
+ componentWillLoad() {
56
+ this.analytics = new JustifiAnalytics(this);
57
+ this.initializeGetPayments();
58
+ }
59
+ disconnectedCallback() {
60
+ this.analytics.cleanup();
61
+ }
62
+ propChanged() {
63
+ this.initializeGetPayments();
64
+ }
65
+ initializeGetPayments() {
66
+ if (this.accountId && this.authToken) {
67
+ this.getPayments = makeGetPayments({
68
+ id: this.accountId,
69
+ authToken: this.authToken,
70
+ service: new PaymentService(),
71
+ });
72
+ }
73
+ else {
74
+ this.errorMessage = 'Account ID and Auth Token are required';
75
+ this.errorEvent.emit({
76
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
77
+ message: this.errorMessage,
78
+ severity: ComponentErrorSeverity.ERROR,
79
+ });
80
+ }
81
+ }
82
+ render() {
83
+ if (this.errorMessage) {
84
+ return ErrorState(this.errorMessage);
85
+ }
86
+ return (h("payments-list-core", { getPayments: this.getPayments, "onError-event": this.handleErrorEvent }));
87
+ }
88
+ static get watchers() { return {
89
+ "accountId": ["propChanged"],
90
+ "authToken": ["propChanged"]
91
+ }; }
92
+ };
93
+
94
+ export { PaymentsList as justifi_payments_list };
@@ -0,0 +1,145 @@
1
+ import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
3
+ import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
4
+ import { A as Api } from './p-29c0b182.js';
5
+ import './p-56f6ce4c.js';
6
+ import './p-df21aaad.js';
7
+ import './p-e3fab0e2.js';
8
+ import { J as JustifiAnalytics } from './p-387450f6.js';
9
+ import './p-2dabeb5a.js';
10
+
11
+ const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSuccess, onError }) => {
12
+ var _a;
13
+ try {
14
+ const response = await service.fetchCheckout(authToken, checkoutId);
15
+ if (!response.error) {
16
+ const checkout = response.data;
17
+ onSuccess({ checkout });
18
+ }
19
+ else {
20
+ const responseError = getErrorMessage(response.error);
21
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
22
+ return onError({
23
+ error: responseError,
24
+ code,
25
+ severity: ComponentErrorSeverity.ERROR,
26
+ });
27
+ }
28
+ }
29
+ catch (error) {
30
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
31
+ return onError({
32
+ error: error.message || error,
33
+ code,
34
+ severity: ComponentErrorSeverity.ERROR,
35
+ });
36
+ }
37
+ };
38
+ const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ payment, onSuccess, onError }) => {
39
+ var _a;
40
+ try {
41
+ const response = await service.complete(authToken, checkoutId, payment);
42
+ if (!response.error) {
43
+ onSuccess(response);
44
+ }
45
+ else {
46
+ const responseError = getErrorMessage(response.error);
47
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
48
+ return onError({
49
+ error: responseError,
50
+ code,
51
+ severity: ComponentErrorSeverity.ERROR,
52
+ });
53
+ }
54
+ }
55
+ catch (error) {
56
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
57
+ return onError({
58
+ error: error.message || error,
59
+ code,
60
+ severity: ComponentErrorSeverity.ERROR,
61
+ });
62
+ }
63
+ };
64
+
65
+ class CheckoutService {
66
+ async fetchCheckout(authToken, checkoutId) {
67
+ const endpoint = `checkouts/${checkoutId}`;
68
+ return Api({ authToken, apiOrigin: undefined }).get(endpoint);
69
+ }
70
+ async complete(authToken, checkoutId, payment) {
71
+ const endpoint = `checkouts/${checkoutId}/complete`;
72
+ const payload = {
73
+ payment_mode: payment.payment_mode,
74
+ };
75
+ if (payment.payment_token) {
76
+ payload.payment_token = payment.payment_token;
77
+ }
78
+ return Api({ authToken, apiOrigin: undefined }).post(endpoint, JSON.stringify(payload));
79
+ }
80
+ }
81
+
82
+ const Checkout = class {
83
+ constructor(hostRef) {
84
+ registerInstance(this, hostRef);
85
+ this.errorEvent = createEvent(this, "error-event", 7);
86
+ this.loadedEvent = createEvent(this, "loaded", 7);
87
+ this.iframeOrigin = undefined;
88
+ this.authToken = undefined;
89
+ this.checkoutId = undefined;
90
+ this.disableCreditCard = undefined;
91
+ this.disableBankAccount = undefined;
92
+ this.disableBnpl = undefined;
93
+ this.disablePaymentMethodGroup = undefined;
94
+ this.getCheckout = undefined;
95
+ this.complete = undefined;
96
+ this.errorMessage = '';
97
+ }
98
+ componentWillLoad() {
99
+ this.analytics = new JustifiAnalytics(this);
100
+ this.initializeGetCheckout();
101
+ }
102
+ disconnectedCallback() {
103
+ this.analytics.cleanup();
104
+ }
105
+ initializeGetCheckout() {
106
+ if (this.authToken && this.checkoutId) {
107
+ this.getCheckout = makeGetCheckout({
108
+ authToken: this.authToken,
109
+ checkoutId: this.checkoutId,
110
+ service: new CheckoutService()
111
+ });
112
+ this.complete = makeCheckoutComplete({
113
+ authToken: this.authToken,
114
+ checkoutId: this.checkoutId,
115
+ service: new CheckoutService()
116
+ });
117
+ }
118
+ else {
119
+ this.errorEvent.emit({
120
+ message: 'auth-token and checkout-id are required',
121
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
122
+ severity: ComponentErrorSeverity.ERROR,
123
+ });
124
+ }
125
+ }
126
+ propChanged() {
127
+ this.initializeGetCheckout();
128
+ }
129
+ async fillBillingForm(fields) {
130
+ this.checkoutCoreRef.fillBillingForm(fields);
131
+ }
132
+ render() {
133
+ return (h("justifi-checkout-core", { key: 'd2f6bfed1be767edcf4ba21cddc503ff5efbec1a', getCheckout: this.getCheckout, authToken: this.authToken, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup, ref: el => {
134
+ if (el) {
135
+ this.checkoutCoreRef = el;
136
+ }
137
+ } }, h("div", { key: '45ac1bea74ca8ef7999211b51fe7791225d61f00', slot: "insurance" }, h("slot", { key: '13e051844cc7cb4aed98076ccd64954b2dd68228', name: "insurance" }))));
138
+ }
139
+ static get watchers() { return {
140
+ "authToken": ["propChanged"],
141
+ "checkoutId": ["propChanged"]
142
+ }; }
143
+ };
144
+
145
+ export { Checkout as justifi_checkout };
@@ -0,0 +1,77 @@
1
+ import { p as packageJson } from './p-2dabeb5a.js';
2
+ import { A as Api } from './p-29c0b182.js';
3
+
4
+ class AnalyticsService {
5
+ async record(body) {
6
+ const endpoint = 'analytics';
7
+ return Api({ apiOrigin: undefined }).post(endpoint, JSON.stringify(body));
8
+ }
9
+ }
10
+
11
+ /**
12
+ * @class JustifiAnalytics
13
+ * @description A class to track analytics for a component
14
+ * @param { component } ComponentInterface - The component to track
15
+ *
16
+ */
17
+ class JustifiAnalytics {
18
+ constructor(component) {
19
+ this.handleCustomEvent = async (data) => {
20
+ // Track the event
21
+ await this.service.record(data);
22
+ };
23
+ this.service = new AnalyticsService();
24
+ this.componentInstance = component;
25
+ this.setUpBasicData();
26
+ this.setupLifecycleTracking();
27
+ this.trackCustomEvents();
28
+ }
29
+ get resourceId() {
30
+ return (this.componentInstance.accountId ||
31
+ this.componentInstance.businessId ||
32
+ this.componentInstance.paymentId ||
33
+ this.componentInstance.payoutId ||
34
+ this.componentInstance.checkoutId);
35
+ }
36
+ setUpBasicData() {
37
+ this.basicData = {
38
+ component_name: this.componentInstance.tagName,
39
+ component_version: packageJson.version,
40
+ client_user_agent: navigator.userAgent,
41
+ // navigator.platform is deprecated, use navigator.userAgent instead
42
+ client_platform: navigator.userAgent,
43
+ client_origin: window.location.origin,
44
+ resource_id: this.resourceId,
45
+ };
46
+ }
47
+ trackCustomEvents() {
48
+ this.eventEmitters = ['submitted', 'error-event'];
49
+ // for each event, add an event listener
50
+ this.eventEmitters.forEach((eventName) => {
51
+ // if this.componentInstance.addEventListener is a function add the event listener
52
+ if (typeof this.componentInstance.addEventListener === 'function') {
53
+ this.componentInstance.addEventListener(eventName, (event) => this.handleCustomEvent({
54
+ event_type: eventName,
55
+ data: Object.assign(Object.assign({}, this.basicData), { error: event.detail }),
56
+ }));
57
+ }
58
+ });
59
+ }
60
+ setupLifecycleTracking() {
61
+ const originalComponentDidLoad = this.componentInstance.componentDidLoad;
62
+ this.componentInstance.componentDidLoad = () => {
63
+ this.service.record({ event_type: 'init', data: this.basicData });
64
+ if (originalComponentDidLoad) {
65
+ return originalComponentDidLoad.apply(this.componentInstance);
66
+ }
67
+ };
68
+ }
69
+ cleanup() {
70
+ // Remove event listeners
71
+ this.eventEmitters.forEach((event) => {
72
+ this.componentInstance.removeEventListener(event, this.handleCustomEvent);
73
+ });
74
+ }
75
+ }
76
+
77
+ export { JustifiAnalytics as J };
@@ -0,0 +1,28 @@
1
+ import { A as Api } from './p-29c0b182.js';
2
+
3
+ class BusinessService {
4
+ async fetchBusiness(businessId, authToken) {
5
+ const endpoint = `entities/business/${businessId}`;
6
+ return Api({ authToken, apiOrigin: undefined }).get(endpoint);
7
+ }
8
+ async patchBusiness(authToken, businessId, payload) {
9
+ const endpoint = `entities/business/${businessId}`;
10
+ return Api({ authToken, apiOrigin: undefined }).patch(endpoint, payload);
11
+ }
12
+ }
13
+ class IdentityService {
14
+ async fetchIdentity(identityId, authToken) {
15
+ const endpoint = `entities/identity/${identityId}`;
16
+ return Api({ authToken, apiOrigin: undefined }).get(endpoint);
17
+ }
18
+ async patchIdentity(authToken, identityId, payload) {
19
+ const endpoint = `entities/identity/${identityId}`;
20
+ return Api({ authToken, apiOrigin: undefined }).patch(endpoint, payload);
21
+ }
22
+ async postIdentity(authToken, payload) {
23
+ const endpoint = `entities/identity`;
24
+ return Api({ authToken, apiOrigin: undefined }).post(endpoint, payload);
25
+ }
26
+ }
27
+
28
+ export { BusinessService as B, IdentityService as I };
@@ -1 +1,52 @@
1
- import{c as e}from"./p-2eab3c90.js";import{h as s,w as n,e as a,d as i,j as r,k as t,m as u,t as _,n as o,r as c,o as b,q as l,u as m,v as p,x as d,y as g}from"./p-89887332.js";const y=c=>{const b=e({legal_name:s.required("Enter legal name"),website_url:n.required("Enter business website url"),email:a.required("Enter business email"),phone:i.required("Enter phone number"),doing_business_as:r.required("Enter doing business as"),classification:t.required("Select business classification"),industry:u.required("Enter a business industry"),tax_id:_.required("Enter tax id, SSN, or EIN"),date_of_incorporation:o.required("Enter date of incorporation")}),l=e({legal_name:s.required("Enter legal name"),website_url:n.nullable(),email:a.nullable(),phone:i.nullable(),doing_business_as:r.nullable(),classification:t.nullable(),industry:u.nullable(),tax_id:_.nullable(),date_of_incorporation:o.nullable()});return c?l:b},v=s=>{const n=e({business_revenue:c.required("Enter business revenue"),business_payment_volume:b.required("Enter business payment volume"),business_when_service_received:l.required("Select when service is received"),business_recurring_payments:m.required("Select recurring payments"),business_recurring_payments_percentage:p,business_seasonal:d.required("Select business seasonal"),business_other_payment_details:g.nullable()}),a=e({business_revenue:c.nullable(),business_payment_volume:b.nullable(),business_when_service_received:l.nullable(),business_recurring_payments:m.nullable(),business_recurring_payments_percentage:p,business_seasonal:d.nullable(),business_other_payment_details:g.nullable()});return s?a:n};export{v as a,y as b}
1
+ import { c as create$3 } from './p-2eab3c90.js';
2
+ import { h as businessNameValidation, w as websiteUrlValidation, e as emailValidation, d as phoneValidation, j as doingBusinessAsValidation, k as businessClassificationValidation, m as industryValidation, t as taxIdValidation, n as dateOfIncorporationValidation, r as revenueValidation, o as paymentVolumeValidation, q as whenServiceReceivedValidation, u as recurringPaymentsValidation, v as recurringPaymentsPercentageValidation, x as seasonalBusinessValidation, y as otherPaymentDetailsValidation } from './p-89887332.js';
3
+
4
+ const businessCoreInfoSchema = (allowOptionalFields) => {
5
+ const schema = create$3({
6
+ legal_name: businessNameValidation.required('Enter legal name'),
7
+ website_url: websiteUrlValidation.required('Enter business website url'),
8
+ email: emailValidation.required('Enter business email'),
9
+ phone: phoneValidation.required('Enter phone number'),
10
+ doing_business_as: doingBusinessAsValidation.required('Enter doing business as'),
11
+ classification: businessClassificationValidation.required('Select business classification'),
12
+ industry: industryValidation.required('Enter a business industry'),
13
+ tax_id: taxIdValidation.required('Enter tax id, SSN, or EIN'),
14
+ date_of_incorporation: dateOfIncorporationValidation.required('Enter date of incorporation'),
15
+ });
16
+ const easySchema = create$3({
17
+ legal_name: businessNameValidation.required('Enter legal name'),
18
+ website_url: websiteUrlValidation.nullable(),
19
+ email: emailValidation.nullable(),
20
+ phone: phoneValidation.nullable(),
21
+ doing_business_as: doingBusinessAsValidation.nullable(),
22
+ classification: businessClassificationValidation.nullable(),
23
+ industry: industryValidation.nullable(),
24
+ tax_id: taxIdValidation.nullable(),
25
+ date_of_incorporation: dateOfIncorporationValidation.nullable(),
26
+ });
27
+ return allowOptionalFields ? easySchema : schema;
28
+ };
29
+
30
+ const additionalQuestionsSchema = (allowOptionalFields) => {
31
+ const schema = create$3({
32
+ business_revenue: revenueValidation.required('Enter business revenue'),
33
+ business_payment_volume: paymentVolumeValidation.required('Enter business payment volume'),
34
+ business_when_service_received: whenServiceReceivedValidation.required('Select when service is received'),
35
+ business_recurring_payments: recurringPaymentsValidation.required('Select recurring payments'),
36
+ business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
37
+ business_seasonal: seasonalBusinessValidation.required('Select business seasonal'),
38
+ business_other_payment_details: otherPaymentDetailsValidation.nullable(),
39
+ });
40
+ const easySchema = create$3({
41
+ business_revenue: revenueValidation.nullable(),
42
+ business_payment_volume: paymentVolumeValidation.nullable(),
43
+ business_when_service_received: whenServiceReceivedValidation.nullable(),
44
+ business_recurring_payments: recurringPaymentsValidation.nullable(),
45
+ business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
46
+ business_seasonal: seasonalBusinessValidation.nullable(),
47
+ business_other_payment_details: otherPaymentDetailsValidation.nullable(),
48
+ });
49
+ return allowOptionalFields ? easySchema : schema;
50
+ };
51
+
52
+ export { additionalQuestionsSchema as a, businessCoreInfoSchema as b };
@@ -0,0 +1,97 @@
1
+ import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
+ import { A as Api } from './p-29c0b182.js';
3
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
4
+ import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
5
+ import { E as ErrorState } from './p-dce846bf.js';
6
+ import { J as JustifiAnalytics } from './p-387450f6.js';
7
+ import './p-2dabeb5a.js';
8
+
9
+ class ReportsService {
10
+ async fetchGrossVolumeChartData(accountId, authToken) {
11
+ const api = Api({ authToken: authToken, apiOrigin: undefined });
12
+ const endpoint = `account/${accountId}/reports/gross_volume`;
13
+ return api.get(endpoint);
14
+ }
15
+ }
16
+
17
+ const makeGetGrossPaymentChartData = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
18
+ var _a;
19
+ try {
20
+ const response = await service.fetchGrossVolumeChartData(id, authToken);
21
+ if (!response.error) {
22
+ onSuccess(response.data);
23
+ }
24
+ else {
25
+ const errorMessage = getErrorMessage(response.error);
26
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
27
+ onError({
28
+ error: errorMessage,
29
+ code,
30
+ severity: ComponentErrorSeverity.ERROR,
31
+ });
32
+ }
33
+ }
34
+ catch (error) {
35
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
36
+ const errorMessage = getErrorMessage(error);
37
+ onError({
38
+ error: errorMessage,
39
+ code,
40
+ severity: ComponentErrorSeverity.ERROR,
41
+ });
42
+ }
43
+ };
44
+
45
+ const GrossPaymentChart = class {
46
+ constructor(hostRef) {
47
+ registerInstance(this, hostRef);
48
+ this.errorEvent = createEvent(this, "error-event", 7);
49
+ this.handleErrorEvent = (event) => {
50
+ this.errorMessage = event.detail.message;
51
+ this.errorEvent.emit(event.detail);
52
+ };
53
+ this.accountId = undefined;
54
+ this.authToken = undefined;
55
+ this.getGrossPayment = undefined;
56
+ this.errorMessage = null;
57
+ }
58
+ componentWillLoad() {
59
+ this.analytics = new JustifiAnalytics(this);
60
+ this.initializeGetGrossPayment();
61
+ }
62
+ disconnectedCallback() {
63
+ this.analytics.cleanup();
64
+ }
65
+ propChanged() {
66
+ this.initializeGetGrossPayment();
67
+ }
68
+ initializeGetGrossPayment() {
69
+ if (this.accountId && this.authToken) {
70
+ this.getGrossPayment = makeGetGrossPaymentChartData({
71
+ id: this.accountId,
72
+ authToken: this.authToken,
73
+ service: new ReportsService(),
74
+ });
75
+ }
76
+ else {
77
+ this.errorMessage = 'Account ID and Auth Token are required';
78
+ this.errorEvent.emit({
79
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
80
+ message: this.errorMessage,
81
+ severity: ComponentErrorSeverity.ERROR,
82
+ });
83
+ }
84
+ }
85
+ render() {
86
+ if (this.errorMessage) {
87
+ return ErrorState(this.errorMessage);
88
+ }
89
+ return (h("gross-payment-chart-core", { getGrossPayment: this.getGrossPayment, "onError-event": this.handleErrorEvent }));
90
+ }
91
+ static get watchers() { return {
92
+ "accountId": ["propChanged"],
93
+ "authToken": ["propChanged"]
94
+ }; }
95
+ };
96
+
97
+ export { GrossPaymentChart as justifi_gross_payment_chart };
@@ -0,0 +1,98 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
2
+ import { t as tableExportedParts } from './p-2b6c9c4f.js';
3
+ import { m as makeGetPayoutCSV, P as PayoutService } from './p-a6d04afc.js';
4
+ import './p-56f6ce4c.js';
5
+ import './p-df21aaad.js';
6
+ import { P as Payout } from './p-e3fab0e2.js';
7
+ import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
8
+ import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
9
+ import { E as ErrorState } from './p-dce846bf.js';
10
+ import { J as JustifiAnalytics } from './p-387450f6.js';
11
+ import './p-29c0b182.js';
12
+ import './p-2dabeb5a.js';
13
+
14
+ const makeGetPayouts = ({ id, authToken, service }) => async ({ params, onSuccess, onError }) => {
15
+ var _a, _b;
16
+ try {
17
+ const response = await service.fetchPayouts(id, authToken, params);
18
+ if (!response.error) {
19
+ const pagingInfo = Object.assign({}, response.page_info);
20
+ const payouts = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.map((dataItem) => new Payout(dataItem))) || [];
21
+ onSuccess({ payouts, pagingInfo });
22
+ }
23
+ else {
24
+ const error = getErrorMessage(response.error);
25
+ const code = getErrorCode((_b = response.error) === null || _b === void 0 ? void 0 : _b.code);
26
+ return onError({
27
+ error,
28
+ code,
29
+ severity: ComponentErrorSeverity.ERROR,
30
+ });
31
+ }
32
+ }
33
+ catch (error) {
34
+ const message = getErrorMessage(error);
35
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
36
+ return onError({
37
+ error: message,
38
+ code,
39
+ severity: ComponentErrorSeverity.ERROR,
40
+ });
41
+ }
42
+ };
43
+
44
+ const PayoutsList = class {
45
+ constructor(hostRef) {
46
+ registerInstance(this, hostRef);
47
+ this.errorEvent = createEvent(this, "error-event", 7);
48
+ this.handleOnError = (event) => {
49
+ this.errorMessage = event.detail.message;
50
+ this.errorEvent.emit(event.detail);
51
+ };
52
+ this.accountId = undefined;
53
+ this.authToken = undefined;
54
+ this.getPayouts = undefined;
55
+ this.getPayoutCSV = undefined;
56
+ this.errorMessage = null;
57
+ }
58
+ componentWillLoad() {
59
+ this.analytics = new JustifiAnalytics(this);
60
+ this.initializeServices();
61
+ }
62
+ disconnectedCallback() {
63
+ this.analytics.cleanup();
64
+ }
65
+ propChanged() {
66
+ this.initializeServices();
67
+ }
68
+ initializeServices() {
69
+ if (this.accountId && this.authToken) {
70
+ const serviceParams = {
71
+ id: this.accountId,
72
+ authToken: this.authToken,
73
+ service: new PayoutService(),
74
+ };
75
+ this.getPayouts = makeGetPayouts(serviceParams);
76
+ this.getPayoutCSV = makeGetPayoutCSV(serviceParams);
77
+ }
78
+ else {
79
+ this.errorMessage = 'Account ID and Auth Token are required';
80
+ this.errorEvent.emit({
81
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
82
+ message: 'Account ID and Auth Token are required',
83
+ });
84
+ }
85
+ }
86
+ render() {
87
+ if (this.errorMessage) {
88
+ return ErrorState(this.errorMessage);
89
+ }
90
+ return (h(Host, { exportedparts: tableExportedParts }, h("payouts-list-core", { getPayouts: this.getPayouts, getPayoutCSV: this.getPayoutCSV, "onError-event": this.handleOnError })));
91
+ }
92
+ static get watchers() { return {
93
+ "accountId": ["propChanged"],
94
+ "authToken": ["propChanged"]
95
+ }; }
96
+ };
97
+
98
+ export { PayoutsList as justifi_payouts_list };
@@ -1 +1,22 @@
1
- const a={US:"(000) 000-0000"},s={US:"00-0000000"},r="000-00-0000",o={WHOLE:{mask:Number,thousandsSeparator:",",normalizeZeros:!0},DECIMAL:{mask:Number,scale:2,thousandsSeparator:",",padFractionalZeros:!0,normalizeZeros:!0,radix:"."}};export{o as C,a as P,r as S,s as T}
1
+ const PHONE_MASKS = {
2
+ US: '(000) 000-0000',
3
+ };
4
+ const TAX_ID_MASKS = { US: '00-0000000' };
5
+ const SSN_MASK = '000-00-0000';
6
+ const CURRENCY_MASK = {
7
+ WHOLE: {
8
+ mask: Number,
9
+ thousandsSeparator: ',',
10
+ normalizeZeros: true,
11
+ },
12
+ DECIMAL: {
13
+ mask: Number,
14
+ scale: 2,
15
+ thousandsSeparator: ',',
16
+ padFractionalZeros: true,
17
+ normalizeZeros: true,
18
+ radix: '.',
19
+ }
20
+ };
21
+
22
+ export { CURRENCY_MASK as C, PHONE_MASKS as P, SSN_MASK as S, TAX_ID_MASKS as T };
@@ -0,0 +1,21 @@
1
+ import { r as registerInstance, h, H as Host } from './p-fad19d75.js';
2
+ import { E as ExtendedPagingDefaults } from './p-56f6ce4c.js';
3
+
4
+ const PaginationMenu = class {
5
+ constructor(hostRef) {
6
+ registerInstance(this, hostRef);
7
+ this.paging = ExtendedPagingDefaults;
8
+ this.params = {};
9
+ }
10
+ render() {
11
+ return (h(Host, { key: '645df5028861aa714a814f908ccace8dcd0986f8', exportparts: `page-arrow,page-button,page-button-disabled,page-button-text` }, h("nav", { key: '6cb86ce01c625db9c31204f63258570f8a5d0a0f', "aria-label": "Table pagination", class: "d-flex justify-content-end gap-3" }, h("ul", { key: '7ffb5771a1c51553d64735721b937e53c699949d', class: "pagination m-0" }, h("li", { key: 'b439c2f7fe81ccdfa29670a6fc04715681ed5ab3', class: `page-item ${this.paging.has_previous ? '' : ' disabled'}` }, h("a", { key: 'dc59152e834a3076f09304f6fcd0195058ebefec', href: "#", class: "page-link", onClick: (e) => {
12
+ e.preventDefault();
13
+ this.paging.handleClickPrevious(this.paging.start_cursor);
14
+ }, part: `page-button${this.paging.has_previous ? '' : ' page-button-disabled'}` }, h("span", { key: 'fc640fb9ae2ca672bfed89d23c5641cb346c673d', class: "me-1", part: "page-arrow" }, "\u00AB"), h("span", { key: 'fb6fcd31ebd4d194b37f53a071537133b8c4d369', part: "page-button-text" }, "Previous"))), h("li", { key: 'b10e12ec7bc4a89cd897e868ec7b303c62599cd3', class: `page-item ${this.paging.has_next ? '' : ' disabled'}` }, h("a", { key: '51f91eb7cfef91dcbcfd9f11522213308bf717b5', href: "#", class: "page-link", onClick: (e) => {
15
+ e.preventDefault();
16
+ this.paging.handleClickNext(this.paging.end_cursor);
17
+ }, part: `page-button${this.paging.has_next ? '' : ' page-button-disabled'}` }, h("span", { key: 'd89f50a44dead676d19b8862a92ba636947fe6b1', part: "page-button-text" }, "Next"), h("span", { key: 'f5dd2ddddef86931d935df56101f1fed8118e4f6', class: "ms-1", part: "page-arrow" }, "\u00BB")))))));
18
+ }
19
+ };
20
+
21
+ export { PaginationMenu as pagination_menu };
@@ -1 +1,10 @@
1
- const e={amount:25,start_cursor:"",end_cursor:"",has_previous:!1,has_next:!1},s=Object.assign(Object.assign({},e),{handleClickNext:()=>{},handleClickPrevious:()=>{}});export{s as E,e as p}
1
+ const pagingDefaults = {
2
+ amount: 25,
3
+ start_cursor: '',
4
+ end_cursor: '',
5
+ has_previous: false,
6
+ has_next: false,
7
+ };
8
+ const ExtendedPagingDefaults = Object.assign(Object.assign({}, pagingDefaults), { handleClickNext: () => { }, handleClickPrevious: () => { } });
9
+
10
+ export { ExtendedPagingDefaults as E, pagingDefaults as p };