@justifi/webcomponents 4.19.3-rc → 4.19.3-rc-2
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.
- package/dist/cjs/{Analytics-57e3b5a8.js → Analytics-adc90fc6.js} +1 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +2 -1
- package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +4 -1
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
- package/dist/cjs/{package-97b9c902.js → package-22d30c5d.js} +1 -1
- package/dist/collection/components/checkout/checkout-core.js +2 -1
- package/dist/collection/components/checkout/new-payment-method.js +4 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-7cb9826b.js → Analytics-a8eb7344.js} +1 -1
- package/dist/esm/justifi-bank-account-form.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +2 -2
- package/dist/esm/justifi-card-form.entry.js +2 -2
- package/dist/esm/justifi-checkout-core.entry.js +2 -1
- package/dist/esm/justifi-checkout.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-new-payment-method_4.entry.js +4 -1
- package/dist/esm/justifi-payment-details.entry.js +2 -2
- package/dist/esm/justifi-payment-form.entry.js +2 -2
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +2 -2
- package/dist/esm/justifi-payout-details.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
- package/dist/esm/{package-93884871.js → package-ccb774a9.js} +1 -1
- package/dist/module/checkout-core.js +2 -1
- package/dist/module/new-payment-method.js +4 -1
- package/dist/module/package.js +1 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-01a404ca.entry.js +44 -0
- package/dist/webcomponents/p-03d35880.entry.js +130 -0
- package/dist/webcomponents/p-06ff0429.entry.js +65 -0
- package/dist/webcomponents/p-08b0fb31.js +41 -1
- package/dist/webcomponents/p-0e1bc91e.js +28 -1
- package/dist/webcomponents/p-10875f3d.entry.js +97 -0
- package/dist/webcomponents/p-14c91ffd.js +20 -1
- package/dist/webcomponents/p-157acba8.entry.js +98 -0
- package/dist/webcomponents/p-15eafa87.js +77 -0
- package/dist/webcomponents/p-18fa0479.entry.js +131 -0
- package/dist/webcomponents/p-1a5120f4.entry.js +145 -0
- package/dist/webcomponents/p-1ad5995e.js +3599 -1
- package/dist/webcomponents/p-1ff8810b.js +29 -1
- package/dist/webcomponents/p-2338affa.js +213 -1
- package/dist/webcomponents/p-24dc023a.entry.js +791 -0
- package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
- package/dist/webcomponents/p-27d87fe2.entry.js +133 -0
- package/dist/webcomponents/p-29c0b182.js +114 -1
- package/dist/webcomponents/p-2b6c9c4f.js +7 -1
- package/dist/webcomponents/p-2e8f4937.js +79 -0
- package/dist/webcomponents/p-2eab3c90.js +3052 -1
- package/dist/webcomponents/p-3395e896.entry.js +74 -0
- package/dist/webcomponents/p-3fd13ca3.js +52 -1
- package/dist/webcomponents/p-47d79529.js +18 -1
- package/dist/webcomponents/p-525db3e8.js +22 -1
- package/dist/webcomponents/p-53ecc8b9.entry.js +261 -0
- package/dist/webcomponents/p-5482d030.entry.js +21 -0
- package/dist/webcomponents/p-56f6ce4c.js +10 -1
- package/dist/webcomponents/p-576826b1.entry.js +43 -0
- package/dist/webcomponents/p-5968ff8a.js +178 -1
- package/dist/webcomponents/p-5f835b89.entry.js +606 -0
- package/dist/webcomponents/p-6078a370.js +244 -1
- package/dist/webcomponents/p-6124b1b3.entry.js +80 -0
- package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
- package/dist/webcomponents/p-7582b554.entry.js +18 -0
- package/dist/webcomponents/p-75fd6367.entry.js +149 -0
- package/dist/webcomponents/p-79646550.entry.js +61 -0
- package/dist/webcomponents/p-7d85af5c.js +16 -1
- package/dist/webcomponents/p-800d31fe.entry.js +162 -0
- package/dist/webcomponents/p-8115b2f4.js +28 -1
- package/dist/webcomponents/p-83125497.js +4027 -1
- package/dist/webcomponents/p-85fc69e5.js +90 -1
- package/dist/webcomponents/p-89887332.js +301 -1
- package/dist/webcomponents/p-8df7bde8.js +27 -1
- package/dist/webcomponents/p-8eb774df.entry.js +54 -0
- package/dist/webcomponents/p-9c9c7dac.js +24 -1
- package/dist/webcomponents/p-9e17630d.entry.js +1684 -0
- package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
- package/dist/webcomponents/p-a4e8573e.entry.js +94 -0
- package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
- package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
- package/dist/webcomponents/p-ab4816e1.entry.js +117 -0
- package/dist/webcomponents/p-ac086069.entry.js +58 -0
- package/dist/webcomponents/p-af244664.js +126 -1
- package/dist/webcomponents/p-b4b8b531.js +44 -1
- package/dist/webcomponents/p-b82c146f.entry.js +111 -0
- package/dist/webcomponents/p-ba4bae6f.js +12 -1
- package/dist/webcomponents/p-ba5fae28.js +90 -1
- package/dist/webcomponents/p-bd66f9d2.entry.js +101 -0
- package/dist/webcomponents/p-cc39384f.entry.js +99 -0
- package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
- package/dist/webcomponents/p-d89bad72.js +39 -1
- package/dist/webcomponents/p-dad3e069.entry.js +298 -0
- package/dist/webcomponents/p-dce846bf.js +27 -1
- package/dist/webcomponents/p-df21aaad.js +120 -1
- package/dist/webcomponents/p-e1255160.js +3 -1
- package/dist/webcomponents/p-e1e7525b.entry.js +73 -0
- package/dist/webcomponents/p-e333620e.js +34 -1
- package/dist/webcomponents/p-e356f280.entry.js +29 -0
- package/dist/webcomponents/p-e3fab0e2.js +43 -1
- package/dist/webcomponents/p-e9a5cb95.entry.js +94 -0
- package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
- package/dist/webcomponents/p-edc37d1f.entry.js +75 -0
- package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
- package/dist/webcomponents/p-fad19d75.js +1638 -2
- package/dist/webcomponents/webcomponents.css +362 -4
- package/dist/webcomponents/webcomponents.esm.js +20 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-03419b17.js +0 -1
- package/dist/webcomponents/p-07109641.entry.js +0 -1
- package/dist/webcomponents/p-0bbe1f1c.entry.js +0 -1
- package/dist/webcomponents/p-0cd89142.entry.js +0 -1
- package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
- package/dist/webcomponents/p-16887e04.entry.js +0 -1
- package/dist/webcomponents/p-17baca7d.entry.js +0 -1
- package/dist/webcomponents/p-17e4246f.entry.js +0 -1
- package/dist/webcomponents/p-1a43e355.entry.js +0 -19
- package/dist/webcomponents/p-1f761d16.entry.js +0 -1
- package/dist/webcomponents/p-276cc368.entry.js +0 -1
- package/dist/webcomponents/p-30a493cd.entry.js +0 -1
- package/dist/webcomponents/p-32211b2f.entry.js +0 -1
- package/dist/webcomponents/p-3352353a.entry.js +0 -1
- package/dist/webcomponents/p-462dc522.entry.js +0 -1
- package/dist/webcomponents/p-487b72a8.entry.js +0 -1
- package/dist/webcomponents/p-4a485cce.js +0 -1
- package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
- package/dist/webcomponents/p-4c849993.entry.js +0 -1
- package/dist/webcomponents/p-52021fa1.entry.js +0 -1
- package/dist/webcomponents/p-53e64f15.entry.js +0 -1
- package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
- package/dist/webcomponents/p-83876625.entry.js +0 -1
- package/dist/webcomponents/p-8e541a32.entry.js +0 -1
- package/dist/webcomponents/p-97272668.entry.js +0 -1
- package/dist/webcomponents/p-b1257354.entry.js +0 -1
- package/dist/webcomponents/p-b29f5084.entry.js +0 -1
- package/dist/webcomponents/p-babd56c3.entry.js +0 -1
- package/dist/webcomponents/p-bbed6107.entry.js +0 -1
- package/dist/webcomponents/p-be39c802.entry.js +0 -1
- package/dist/webcomponents/p-c607f049.entry.js +0 -1
- package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
- package/dist/webcomponents/p-cd37a87e.entry.js +0 -1
- package/dist/webcomponents/p-cff82e78.entry.js +0 -1
- package/dist/webcomponents/p-d8355f91.entry.js +0 -1
- package/dist/webcomponents/p-e2c88817.entry.js +0 -1
- package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
- package/dist/webcomponents/p-f0866375.entry.js +0 -1
- package/dist/webcomponents/p-f117d1d1.entry.js +0 -1
- package/dist/webcomponents/p-f883bf32.entry.js +0 -1
- package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
- package/dist/webcomponents/p-fe33151d.entry.js +0 -1
|
@@ -1 +1,90 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import { a as BusinessClassification } from './p-af244664.js';
|
|
2
|
+
|
|
3
|
+
const businessClassificationOptions = [
|
|
4
|
+
{
|
|
5
|
+
label: 'Choose business classification',
|
|
6
|
+
value: '',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
label: 'Sole Proprietor',
|
|
10
|
+
value: BusinessClassification.sole_proprietor,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: 'Partnership',
|
|
14
|
+
value: BusinessClassification.partnership,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: 'Corporation',
|
|
18
|
+
value: BusinessClassification.corporation,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'Public Company',
|
|
22
|
+
value: BusinessClassification.public_company,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: 'Limited',
|
|
26
|
+
value: BusinessClassification.limited,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'Non Profit',
|
|
30
|
+
value: BusinessClassification.non_profit,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: 'Government',
|
|
34
|
+
value: BusinessClassification.government,
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
const businessServiceReceivedOptions = [
|
|
38
|
+
{
|
|
39
|
+
label: 'Within 7 days',
|
|
40
|
+
value: 'Within 7 days',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Within 30 days',
|
|
44
|
+
value: 'Within 30 days',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Within 90 days',
|
|
48
|
+
value: 'Within 90 days',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: 'Within 120 days',
|
|
52
|
+
value: 'Within 120 days',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: 'More than 120 days',
|
|
56
|
+
value: 'More than 120 days',
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
const recurringPaymentsOptions = [
|
|
60
|
+
{
|
|
61
|
+
label: 'Yes',
|
|
62
|
+
value: 'Yes',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'No',
|
|
66
|
+
value: 'No',
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
const seasonalBusinessOptions = [
|
|
70
|
+
{
|
|
71
|
+
label: 'Yes. The majority of the business revenue is generated in 3-6 months.',
|
|
72
|
+
value: 'Yes',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: 'No. The business revenue is generated evenly throughout the year.',
|
|
76
|
+
value: 'No',
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
const bankAccountTypeOptions = [
|
|
80
|
+
{
|
|
81
|
+
label: 'Checking',
|
|
82
|
+
value: 'checking',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Savings',
|
|
86
|
+
value: 'savings',
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
export { businessServiceReceivedOptions as a, businessClassificationOptions as b, bankAccountTypeOptions as c, recurringPaymentsOptions as r, seasonalBusinessOptions as s };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { c as create$3, d as create$5, F as FormController } from './p-2eab3c90.js';
|
|
3
|
+
import { A as Api } from './p-29c0b182.js';
|
|
4
|
+
import './p-56f6ce4c.js';
|
|
5
|
+
import './p-df21aaad.js';
|
|
6
|
+
import './p-e3fab0e2.js';
|
|
7
|
+
import { C as CURRENCY_MASK } from './p-525db3e8.js';
|
|
8
|
+
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
9
|
+
|
|
10
|
+
const RefundFormSchema = create$3().shape({
|
|
11
|
+
amount: create$5()
|
|
12
|
+
.required('Amount is required')
|
|
13
|
+
.typeError('Amount must be a number')
|
|
14
|
+
.positive('Amount must be positive')
|
|
15
|
+
.test('amount', 'Refund amount cannot be more than the original payment amount', function (value) {
|
|
16
|
+
return value <= this.options.context.amount;
|
|
17
|
+
})
|
|
18
|
+
.nullable(),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const refundFormCss = ":host{display:block}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}.btn{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.btn:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.btn:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}";
|
|
22
|
+
const JustifiRefundFormStyle0 = refundFormCss;
|
|
23
|
+
|
|
24
|
+
const RefundForm = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
registerInstance(this, hostRef);
|
|
27
|
+
this.submitted = createEvent(this, "submitted", 7);
|
|
28
|
+
this.authToken = undefined;
|
|
29
|
+
this.paymentId = undefined;
|
|
30
|
+
this.amount = 0;
|
|
31
|
+
this.submitButtonText = 'Submit';
|
|
32
|
+
this.withButton = undefined;
|
|
33
|
+
this.refundInfoText = undefined;
|
|
34
|
+
this.errors = {};
|
|
35
|
+
this.isSubmitting = false;
|
|
36
|
+
}
|
|
37
|
+
componentWillLoad() {
|
|
38
|
+
this.formController = new FormController(RefundFormSchema);
|
|
39
|
+
this.formController.setInitialValues({
|
|
40
|
+
amount: this.amount,
|
|
41
|
+
message: '',
|
|
42
|
+
});
|
|
43
|
+
this.initializeApi();
|
|
44
|
+
}
|
|
45
|
+
componentDidLoad() {
|
|
46
|
+
this.formController.errors.subscribe(errors => {
|
|
47
|
+
this.errors = Object.assign({}, errors);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Handles the form submission.
|
|
52
|
+
* Prevents the default form action, validates the form, and emits the 'submitted' event.
|
|
53
|
+
*/
|
|
54
|
+
async handleSubmit(event) {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
this.formController.validateAndSubmit(this.submitRefund.bind(this), {
|
|
57
|
+
amount: this.amount,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Submits the refund request to the API.
|
|
62
|
+
*/
|
|
63
|
+
async submitRefund() {
|
|
64
|
+
this.isSubmitting = true;
|
|
65
|
+
const refundFields = this.formController.values.getValue();
|
|
66
|
+
try {
|
|
67
|
+
await this.api.post(`payments/${this.paymentId}/refunds`, refundFields);
|
|
68
|
+
this.submitted.emit(refundFields);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.error('Error submitting refund:', error);
|
|
72
|
+
this.submitted.emit(error);
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
this.isSubmitting = false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Handles input changes, updating the refundFields state.
|
|
80
|
+
*/
|
|
81
|
+
handleInput(field, value) {
|
|
82
|
+
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [field]: value }));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Initializes the API with the given authentication token.
|
|
86
|
+
* Logs a warning if the auth token is missing.
|
|
87
|
+
*/
|
|
88
|
+
initializeApi() {
|
|
89
|
+
if (!this.authToken) {
|
|
90
|
+
console.warn('Warning: Missing auth-token.');
|
|
91
|
+
}
|
|
92
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: "" });
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
var _a;
|
|
96
|
+
return (h(StyledHost, { key: '8d31f1a9bf936c9e11f8eca1dc55e614b9fa5939' }, h("h1", { key: 'be589740535ee8a5ab6d4af7151d7ae026f08002' }, "Refund"), this.refundInfoText && (h("div", { key: 'b1d40507dec53bac422f99a3d62678c78c0c2038', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: 'cc76014eef0d826bec5ec09355dc5fc747fd2070', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: 'c2efa0f2acdf3faaa6e2974d0535f48799e3cbbd', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '68220114781378f6507651414c87532171bebb31', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: '075545e9837316fe160760e0dba9a5104654dd2b', class: "form-group" }, h("form-control-monetary", { key: 'c8ff8a822d2b74b2f80b33cd6cd2b42ceebbff11', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '92093284e763466be5138ea6d788145d5d47bd87', class: "form-group" }, h("form-control-text", { key: 'ddf9e221d43d84ad7436261c5755e673224aa82e', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: '58abbbabce09d82da4032ef0e08e6cfac1433153', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '3e703ef633e0d45ba70425dc6d58bcd2d590ce1b', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
RefundForm.style = JustifiRefundFormStyle0;
|
|
100
|
+
|
|
101
|
+
export { RefundForm as justifi_refund_form };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { m as makeGetPayoutCSV, P as PayoutService } from './p-b4b8b531.js';
|
|
3
|
+
import './p-56f6ce4c.js';
|
|
4
|
+
import './p-df21aaad.js';
|
|
5
|
+
import { P as Payout } from './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-15eafa87.js';
|
|
10
|
+
import './p-29c0b182.js';
|
|
11
|
+
import './p-2e8f4937.js';
|
|
12
|
+
|
|
13
|
+
const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
14
|
+
var _a;
|
|
15
|
+
try {
|
|
16
|
+
const response = await service.fetchPayout(id, authToken);
|
|
17
|
+
if (!response.error) {
|
|
18
|
+
const payout = new Payout(response.data);
|
|
19
|
+
onSuccess(payout);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const errorMessage = getErrorMessage(response.error);
|
|
23
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
24
|
+
onError({
|
|
25
|
+
error: errorMessage,
|
|
26
|
+
code,
|
|
27
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const errorMessage = getErrorMessage(error);
|
|
33
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
34
|
+
onError({
|
|
35
|
+
error: errorMessage,
|
|
36
|
+
code,
|
|
37
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const PayoutDetails = 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.payoutId = undefined;
|
|
51
|
+
this.authToken = undefined;
|
|
52
|
+
this.getPayout = undefined;
|
|
53
|
+
this.getPayoutCSV = undefined;
|
|
54
|
+
this.errorMessage = null;
|
|
55
|
+
}
|
|
56
|
+
componentWillLoad() {
|
|
57
|
+
this.analytics = new JustifiAnalytics(this);
|
|
58
|
+
this.initializeServices();
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
this.analytics.cleanup();
|
|
62
|
+
}
|
|
63
|
+
propChanged() {
|
|
64
|
+
this.initializeServices();
|
|
65
|
+
}
|
|
66
|
+
initializeServices() {
|
|
67
|
+
if (this.payoutId && this.authToken) {
|
|
68
|
+
this.getPayout = makeGetPayoutDetails({
|
|
69
|
+
id: this.payoutId,
|
|
70
|
+
authToken: this.authToken,
|
|
71
|
+
service: new PayoutService()
|
|
72
|
+
});
|
|
73
|
+
this.getPayoutCSV = makeGetPayoutCSV({
|
|
74
|
+
authToken: this.authToken,
|
|
75
|
+
service: new PayoutService()
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.errorMessage = 'Failed to load payout details. payoutId or authToken is not provided.';
|
|
80
|
+
this.errorEvent.emit({
|
|
81
|
+
message: this.errorMessage,
|
|
82
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
83
|
+
severity: ComponentErrorSeverity.ERROR
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
if (this.errorMessage) {
|
|
89
|
+
return ErrorState(this.errorMessage);
|
|
90
|
+
}
|
|
91
|
+
return (h("payout-details-core", { getPayout: this.getPayout, getPayoutCSV: this.getPayoutCSV, "onError-event": this.handleErrorEvent }));
|
|
92
|
+
}
|
|
93
|
+
static get watchers() { return {
|
|
94
|
+
"payoutId": ["propChanged"],
|
|
95
|
+
"authToken": ["propChanged"]
|
|
96
|
+
}; }
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { PayoutDetails as justifi_payout_details };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './p-fad19d75.js';
|
|
2
|
+
import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './p-7d85af5c.js';
|
|
3
|
+
import { P as PHONE_MASKS, S as SSN_MASK } from './p-525db3e8.js';
|
|
4
|
+
import './p-1ff8810b.js';
|
|
5
|
+
import './p-6078a370.js';
|
|
6
|
+
|
|
7
|
+
const RepresentativeFormInputs = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.inputHandler = (name, value) => {
|
|
11
|
+
updateFormValues(this.formController, { [name]: value });
|
|
12
|
+
};
|
|
13
|
+
this.onAddressFormUpdate = (values) => {
|
|
14
|
+
updateAddressFormValues(this.formController, Object.assign(Object.assign({}, this.formController.values.getValue().address), values));
|
|
15
|
+
};
|
|
16
|
+
this.representativeDefaultValue = undefined;
|
|
17
|
+
this.errors = undefined;
|
|
18
|
+
this.formController = undefined;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
22
|
+
return (h("form", { key: '8b46b3b30681c7e7f30395a2cac575a7bd7ac998' }, h("fieldset", { key: 'e6b8f2ebca22c295fd6897c0e8862200171c2b4d' }, h("legend", { key: '8f8f52240f5ccc3f5d43507681dc970b4260bb1b' }, "Representative"), h("hr", { key: '8b07c69a514534ab731e7c01b6ee4c7a0e59e06e' }), h("div", { key: '79f44ba9dcbcf9d010aed92e332f686ca7127285', class: 'row gy-3' }, h("div", { key: '2a1aeb5ddee1dafc40e108cfb2e9ed6f4d8bc183', class: 'col-12 col-md-8' }, h("form-control-text", { key: '6e089f2d4f734da266e94b38ec1435dc3f461d5f', name: 'name', label: 'Full Name', defaultValue: (_a = this.representativeDefaultValue) === null || _a === void 0 ? void 0 : _a.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: 'c86421e524752e017180aef58e01229bf751e941', class: 'col-12 col-md-4' }, h("form-control-text", { key: 'ad8105f6d9a46397eb481666c19468376716544c', name: 'title', label: 'Title', defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '7775905e46c00337a98ab668c8453e14d27bfc4d', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'e810f2395101a1e48d8d3ff66617ac82d0ec90b3', name: 'email', label: 'Email Address', defaultValue: (_c = this.representativeDefaultValue) === null || _c === void 0 ? void 0 : _c.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '66a91e85d1902e32668407e684774820c02dce67', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: 'aad97ca95c5b2ec728ea00916a46ff4b84661b96', name: 'phone', label: 'Phone Number', defaultValue: (_d = this.representativeDefaultValue) === null || _d === void 0 ? void 0 : _d.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: '3cd56ea0ac1e472e905c8113f6335868c39882f1', class: 'col-12 col-md-4' }, h("form-control-date", { key: '2f6d505220cacc08a80029ada089370f3841d9ed', name: 'dob_full', label: 'Birth Date', defaultValue: (_e = this.representativeDefaultValue) === null || _e === void 0 ? void 0 : _e.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController) })), h("div", { key: 'cf2df0af006a50d3533b798607025b4d6ee82ca0', class: 'col-12 col-md-8' }, h("form-control-number-masked", { key: '033e4264a1466d300891b2328c0bfaced7acb04d', name: 'identification_number', label: 'SSN', defaultValue: (_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { key: '2dc7be12d65203da4d4e0bdd995256a7bdc5bf37', class: 'col-12' }, h("justifi-identity-address-form", { key: '47916ab24bf990be3541b72bfa2dc46cccca5a31', errors: this.errors.address, defaultValues: (_g = this.representativeDefaultValue) === null || _g === void 0 ? void 0 : _g.address, handleFormUpdate: this.onAddressFormUpdate }))))));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { RepresentativeFormInputs as justifi_business_representative_form_inputs };
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
var
|
|
1
|
+
var BusinessFormStep;
|
|
2
|
+
(function (BusinessFormStep) {
|
|
3
|
+
BusinessFormStep["coreInfo"] = "coreInfo";
|
|
4
|
+
BusinessFormStep["legalAddress"] = "legalAddress";
|
|
5
|
+
BusinessFormStep["additionalQuestions"] = "additionalQuestions";
|
|
6
|
+
BusinessFormStep["representative"] = "representative";
|
|
7
|
+
BusinessFormStep["owners"] = "owners";
|
|
8
|
+
BusinessFormStep["bankAccount"] = "bankAccount";
|
|
9
|
+
BusinessFormStep["documentUpload"] = "documentUpload";
|
|
10
|
+
BusinessFormStep["termsAndConditions"] = "termsAndConditions";
|
|
11
|
+
})(BusinessFormStep || (BusinessFormStep = {}));
|
|
12
|
+
var BusinessFormServerErrors;
|
|
13
|
+
(function (BusinessFormServerErrors) {
|
|
14
|
+
BusinessFormServerErrors["fetchData"] = "Error retrieving business data";
|
|
15
|
+
BusinessFormServerErrors["patchData"] = "Error updating business data";
|
|
16
|
+
})(BusinessFormServerErrors || (BusinessFormServerErrors = {}));
|
|
17
|
+
var BusinessFormClickActions;
|
|
18
|
+
(function (BusinessFormClickActions) {
|
|
19
|
+
BusinessFormClickActions["nextStep"] = "nextStep";
|
|
20
|
+
BusinessFormClickActions["previousStep"] = "previousStep";
|
|
21
|
+
BusinessFormClickActions["submit"] = "submit";
|
|
22
|
+
BusinessFormClickActions["removeOwner"] = "removeOwner";
|
|
23
|
+
BusinessFormClickActions["addOwner"] = "addOwner";
|
|
24
|
+
BusinessFormClickActions["addOwnerForm"] = "addOwnerForm";
|
|
25
|
+
BusinessFormClickActions["updateOwner"] = "updateOwner";
|
|
26
|
+
})(BusinessFormClickActions || (BusinessFormClickActions = {}));
|
|
27
|
+
var OwnerFormServerErrors;
|
|
28
|
+
(function (OwnerFormServerErrors) {
|
|
29
|
+
OwnerFormServerErrors["fetchData"] = "Error retrieving owner data";
|
|
30
|
+
OwnerFormServerErrors["patchData"] = "Error updating owner data";
|
|
31
|
+
OwnerFormServerErrors["postData"] = "Error adding owner data";
|
|
32
|
+
})(OwnerFormServerErrors || (OwnerFormServerErrors = {}));
|
|
33
|
+
var DocumentFormServerErrors;
|
|
34
|
+
(function (DocumentFormServerErrors) {
|
|
35
|
+
DocumentFormServerErrors["fetchData"] = "Error retrieving document data";
|
|
36
|
+
DocumentFormServerErrors["sendData"] = "Error uploading document data";
|
|
37
|
+
})(DocumentFormServerErrors || (DocumentFormServerErrors = {}));
|
|
38
|
+
|
|
39
|
+
export { BusinessFormServerErrors as B, BusinessFormClickActions as a, BusinessFormStep as b };
|