@gusto/embedded-react-sdk 0.56.4 → 0.56.6
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/CHANGELOG.md +25 -0
- package/dist/components/Common/DocumentEmbed/DocumentEmbed.js +18 -0
- package/dist/components/Common/DocumentEmbed/DocumentEmbed.js.map +1 -0
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +35 -29
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.js +39 -0
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialogPresentation.js +54 -0
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialogPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.js +56 -0
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PaySchedule.js +54 -39
- package/dist/components/Company/PaySchedule/management/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +48 -32
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +8 -8
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js +74 -32
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +4 -3
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js +64 -61
- package/dist/components/Contractor/ContractorList/management/ManagementContractorList.js.map +1 -1
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +133 -134
- package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
- package/dist/components/Contractor/ContractorListFlow/ContractorListFlow.js.map +1 -1
- package/dist/components/Contractor/ContractorListFlow/ContractorListFlowComponents.js +22 -9
- package/dist/components/Contractor/ContractorListFlow/ContractorListFlowComponents.js.map +1 -1
- package/dist/components/Contractor/ContractorListFlow/contractorListStateMachine.js +51 -20
- package/dist/components/Contractor/ContractorListFlow/contractorListStateMachine.js.map +1 -1
- package/dist/components/Contractor/Dismissal/Dismissal.js +77 -0
- package/dist/components/Contractor/Dismissal/Dismissal.js.map +1 -0
- package/dist/components/Contractor/Dismissal/DismissalPresentation.js +57 -0
- package/dist/components/Contractor/Dismissal/DismissalPresentation.js.map +1 -0
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js +44 -0
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +17 -14
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +45 -41
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/exports/contractorManagement.js +56 -54
- package/dist/components/Contractor/exports/contractorManagement.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +27 -16
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +25 -17
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +6 -5
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +201 -196
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js +55 -52
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js +38 -29
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +63 -62
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +25 -18
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js +72 -68
- package/dist/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/i18n/I18n.js +2 -0
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.Management.AutoPilotDialog.json.js +22 -0
- package/dist/i18n/en/Company.Management.AutoPilotDialog.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Dismissal.json.js +20 -0
- package/dist/i18n/en/Contractor.Dismissal.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +38 -38
- package/dist/i18n/en/Payroll.UNSTABLE_PayrollEditEmployee.json.js +31 -31
- package/dist/i18n/en/common.json.js +37 -35
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/dist/shared/constants.js +19 -15
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Common/DocumentEmbed/DocumentEmbed.d.ts +3 -0
- package/dist/src/components/Common/DocumentEmbed/DocumentEmbedTypes.d.ts +25 -0
- package/dist/src/components/Common/DocumentEmbed/index.d.ts +2 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.d.ts +11 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialogPresentation.d.ts +17 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/index.d.ts +1 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.d.ts +22 -0
- package/dist/src/components/Company/PaySchedule/management/PaySchedule.d.ts +17 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +2 -0
- package/dist/src/components/Company/PaySchedule/management/index.d.ts +1 -1
- package/dist/src/components/Company/exports/companyManagement.d.ts +1 -1
- package/dist/src/components/Contractor/ContractorList/management/ManagementContractorList.d.ts +2 -0
- package/dist/src/components/Contractor/ContractorList/management/ManagementContractorListView.d.ts +3 -1
- package/dist/src/components/Contractor/ContractorListFlow/ContractorListFlow.d.ts +6 -4
- package/dist/src/components/Contractor/ContractorListFlow/ContractorListFlowComponents.d.ts +2 -0
- package/dist/src/components/Contractor/ContractorListFlow/contractorListStateMachine.d.ts +1 -0
- package/dist/src/components/Contractor/ContractorListFlow/contractorListStateMachine.test.d.ts +1 -0
- package/dist/src/components/Contractor/Dismissal/Dismissal.d.ts +45 -0
- package/dist/src/components/Contractor/Dismissal/DismissalPresentation.d.ts +17 -0
- package/dist/src/components/Contractor/Dismissal/useDismissal/useDismissal.d.ts +41 -0
- package/dist/src/components/Contractor/Dismissal/useDismissal/useDismissal.test.d.ts +1 -0
- package/dist/src/components/Contractor/exports/contractorManagement.d.ts +1 -0
- package/dist/src/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +1 -1
- package/dist/src/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +6 -0
- package/dist/src/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.test.d.ts +1 -0
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeSchema.d.ts +19 -0
- package/dist/src/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/src/contexts/ComponentAdapter/useComponentContext.d.ts +5 -2
- package/dist/src/i18n/en/common.json.d.ts +3 -0
- package/dist/src/i18n/types.d.ts +128 -0
- package/dist/src/shared/constants.d.ts +8 -0
- package/docs/guides/endpoint-inventory.json +30 -1
- package/package.json +1 -1
package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js
CHANGED
|
@@ -1,111 +1,115 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { getContractorDisplayName as
|
|
2
|
+
import { useTranslation as k, Trans as T } from "react-i18next";
|
|
3
|
+
import { useMemo as N } from "react";
|
|
4
|
+
import { getContractorDisplayName as F } from "../../shared/helpers.js";
|
|
5
5
|
import { getContractorPaymentTotalAmount as A } from "../shared/paymentAmounts.js";
|
|
6
6
|
import l from "./PaymentStatementPresentation.module.scss.js";
|
|
7
|
-
import { Flex as
|
|
7
|
+
import { Flex as c } from "../../../Common/Flex/Flex.js";
|
|
8
8
|
import { useComponentContext as H } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
9
|
import { useI18n as j } from "../../../../i18n/I18n.js";
|
|
10
|
-
import { formatHoursDisplay as
|
|
11
|
-
import
|
|
12
|
-
import { useDateFormatter as
|
|
13
|
-
import { addressInline as
|
|
14
|
-
import
|
|
10
|
+
import { formatHoursDisplay as M } from "../../../Payroll/helpers.js";
|
|
11
|
+
import y from "../../../../hooks/useNumberFormatter.js";
|
|
12
|
+
import { useDateFormatter as O } from "../../../../hooks/useDateFormatter.js";
|
|
13
|
+
import { addressInline as U, formatPhoneNumber as B } from "../../../../helpers/formattedStrings.js";
|
|
14
|
+
import K from "../../../../assets/icons/receipt-check.svg.js";
|
|
15
15
|
import { DataView as V } from "../../../Common/DataView/DataView.js";
|
|
16
16
|
const oe = ({
|
|
17
17
|
className: v,
|
|
18
18
|
payment: o,
|
|
19
|
-
contractor:
|
|
20
|
-
checkDate:
|
|
19
|
+
contractor: x,
|
|
20
|
+
checkDate: C,
|
|
21
21
|
paymentReceipt: t
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
23
|
+
const d = H(), { Text: s, Heading: h, Link: I } = d;
|
|
24
24
|
j("Contractor.Payments.PaymentStatement");
|
|
25
|
-
const { t: r } =
|
|
25
|
+
const { t: r } = k("Contractor.Payments.PaymentStatement"), i = y("currency"), { formatLongWithYear: m } = O(), f = F(x), b = o.wageType === "Hourly", u = Number(o.hours || 0), p = Number(o.hourlyRate || 0), g = Number(o.bonus || 0), D = Number(o.reimbursement || 0), P = !!(t && o.status === "Funded" && o.paymentMethod === "Direct Deposit"), w = t?.totals?.companyDebit || "0", z = N(() => t ? [
|
|
26
|
+
{
|
|
27
|
+
label: r("receipt.receiptId"),
|
|
28
|
+
value: t.contractorPaymentUuid || ""
|
|
29
|
+
},
|
|
26
30
|
{
|
|
27
31
|
label: r("receipt.from"),
|
|
28
32
|
value: t.nameOfSender || ""
|
|
29
33
|
},
|
|
30
34
|
{
|
|
31
35
|
label: r("receipt.to"),
|
|
32
|
-
value:
|
|
36
|
+
value: t.nameOfRecipient || ""
|
|
33
37
|
},
|
|
34
38
|
{
|
|
35
39
|
label: r("receipt.debitDate"),
|
|
36
|
-
value: t.debitDate ?
|
|
40
|
+
value: t.debitDate ? m(String(t.debitDate)) : ""
|
|
37
41
|
}
|
|
38
|
-
] : [], [t,
|
|
42
|
+
] : [], [t, r, m]), S = N(() => {
|
|
39
43
|
const n = [
|
|
40
44
|
{
|
|
41
45
|
label: o.paymentMethod || "",
|
|
42
46
|
amount: i(A(o))
|
|
43
47
|
}
|
|
44
48
|
];
|
|
45
|
-
return
|
|
49
|
+
return b && u > 0 ? n.push({
|
|
46
50
|
label: r("hoursLabel"),
|
|
47
51
|
amount: r("hoursAmount", {
|
|
48
|
-
hours:
|
|
49
|
-
rate: i(
|
|
52
|
+
hours: M(u),
|
|
53
|
+
rate: i(p)
|
|
50
54
|
})
|
|
51
55
|
}) : n.push({
|
|
52
56
|
label: r("wageLabel"),
|
|
53
57
|
amount: i(Number(o.wage || 0))
|
|
54
58
|
}), n.push({
|
|
55
59
|
label: r("bonus"),
|
|
56
|
-
amount: i(
|
|
60
|
+
amount: i(g)
|
|
57
61
|
}), n.push({
|
|
58
62
|
label: r("reimbursement"),
|
|
59
|
-
amount: i(
|
|
63
|
+
amount: i(D)
|
|
60
64
|
}), n;
|
|
61
|
-
}, [o,
|
|
62
|
-
return /* @__PURE__ */ a(
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
/* @__PURE__ */ e(s, { variant: "supporting", children:
|
|
65
|
+
}, [o, b, u, p, g, D, r, i]);
|
|
66
|
+
return /* @__PURE__ */ a(c, { className: v, flexDirection: "column", gap: 32, children: [
|
|
67
|
+
/* @__PURE__ */ e(c, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ a(c, { flexDirection: "column", gap: 8, children: [
|
|
68
|
+
/* @__PURE__ */ e(h, { as: "h2", children: r("title", { contractorName: f }) }),
|
|
69
|
+
/* @__PURE__ */ e(s, { variant: "supporting", children: m(C) })
|
|
66
70
|
] }) }),
|
|
67
|
-
|
|
68
|
-
/* @__PURE__ */ a(
|
|
69
|
-
/* @__PURE__ */ e("div", { className: l.receiptIcon, "aria-hidden": !0, children: /* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ a(
|
|
71
|
+
P && /* @__PURE__ */ e("div", { className: l.receiptCard, children: /* @__PURE__ */ a(c, { flexDirection: "column", gap: 24, children: [
|
|
72
|
+
/* @__PURE__ */ a(c, { flexDirection: "column", alignItems: "center", gap: 16, children: [
|
|
73
|
+
/* @__PURE__ */ e("div", { className: l.receiptIcon, "aria-hidden": !0, children: /* @__PURE__ */ e(K, { className: l.checkmarkIcon }) }),
|
|
74
|
+
/* @__PURE__ */ a(c, { flexDirection: "column", alignItems: "center", gap: 8, children: [
|
|
71
75
|
/* @__PURE__ */ e(s, { size: "sm", variant: "supporting", children: r("receipt.totalLabel") }),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
76
|
+
/* @__PURE__ */ e(h, { as: "h1", styledAs: "h2", className: l.totalAmount, children: i(Number(w)) })
|
|
73
77
|
] })
|
|
74
78
|
] }),
|
|
75
79
|
/* @__PURE__ */ e(
|
|
76
|
-
|
|
80
|
+
d.DescriptionList,
|
|
77
81
|
{
|
|
78
82
|
layout: "horizontal",
|
|
79
83
|
showSeparators: !1,
|
|
80
|
-
items:
|
|
84
|
+
items: z.map(({ label: n, value: L }) => ({
|
|
81
85
|
term: /* @__PURE__ */ e(s, { size: "sm", variant: "supporting", children: n }),
|
|
82
|
-
description: /* @__PURE__ */ e(s, { size: "sm", children:
|
|
86
|
+
description: /* @__PURE__ */ e(s, { size: "sm", children: L })
|
|
83
87
|
}))
|
|
84
88
|
}
|
|
85
89
|
),
|
|
86
90
|
/* @__PURE__ */ e("hr", {}),
|
|
87
|
-
/* @__PURE__ */ a(
|
|
91
|
+
/* @__PURE__ */ a(c, { flexDirection: "column", alignItems: "center", gap: 12, children: [
|
|
88
92
|
/* @__PURE__ */ e(s, { size: "sm", variant: "supporting", className: l.disclaimer, children: /* @__PURE__ */ e(
|
|
89
|
-
|
|
93
|
+
T,
|
|
90
94
|
{
|
|
91
95
|
i18nKey: "receipt.disclaimer",
|
|
92
96
|
t: r,
|
|
93
97
|
components: {
|
|
94
|
-
licensesLink: /* @__PURE__ */ e(
|
|
98
|
+
licensesLink: /* @__PURE__ */ e(I, { href: t?.licenseUri || "", target: "_blank" })
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
) }),
|
|
98
102
|
/* @__PURE__ */ e("hr", {}),
|
|
99
103
|
/* @__PURE__ */ e(s, { size: "sm", variant: "supporting", className: l.companyInfo, children: t?.licensee?.name || "" }),
|
|
100
104
|
/* @__PURE__ */ a(s, { size: "sm", variant: "supporting", className: l.address, children: [
|
|
101
|
-
|
|
105
|
+
U({
|
|
102
106
|
street1: t?.licensee?.address || "",
|
|
103
107
|
city: t?.licensee?.city || "",
|
|
104
108
|
state: t?.licensee?.state || "",
|
|
105
109
|
zip: t?.licensee?.postalCode || ""
|
|
106
110
|
}),
|
|
107
111
|
" | ",
|
|
108
|
-
|
|
112
|
+
B(t?.licensee?.phoneNumber)
|
|
109
113
|
] })
|
|
110
114
|
] })
|
|
111
115
|
] }) }),
|
|
@@ -123,8 +127,8 @@ const oe = ({
|
|
|
123
127
|
render: ({ amount: n }) => n || ""
|
|
124
128
|
}
|
|
125
129
|
],
|
|
126
|
-
data:
|
|
127
|
-
label: r("title", { contractorName:
|
|
130
|
+
data: S,
|
|
131
|
+
label: r("title", { contractorName: f })
|
|
128
132
|
}
|
|
129
133
|
)
|
|
130
134
|
] });
|
package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentStatementPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { ContractorPaymentForGroup } from '@gusto/embedded-api/models/components/contractorpaymentforgroup'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useMemo } from 'react'\nimport type { ContractorPaymentReceipt } from '@gusto/embedded-api/models/components/contractorpaymentreceipt'\nimport { getContractorDisplayName } from '../../shared/helpers'\nimport { getContractorPaymentTotalAmount } from '../shared/paymentAmounts'\nimport styles from './PaymentStatementPresentation.module.scss'\nimport { DataView, Flex } from '@/components/Common'\nimport type { DescriptionListItem } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { addressInline, formatPhoneNumber } from '@/helpers/formattedStrings'\nimport ReceiptCheck from '@/assets/icons/receipt-check.svg?react'\n\ninterface PaymentStatementPresentationProps {\n /** CSS class name applied to the root element. */\n className?: string\n payment: ContractorPaymentForGroup\n contractor: Contractor\n paymentReceipt?: ContractorPaymentReceipt\n checkDate: string\n}\n\ntype PaymentStatementRow = {\n label: string\n amount: string | null\n}\n\n/** @internal */\nexport const PaymentStatementPresentation = ({\n className,\n payment,\n contractor,\n checkDate,\n paymentReceipt,\n}: PaymentStatementPresentationProps) => {\n const Components = useComponentContext()\n const { Text, Heading, Link } = Components\n useI18n('Contractor.Payments.PaymentStatement')\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n const currencyFormatter = useNumberFormatter('currency')\n const { formatLongWithYear } = useDateFormatter()\n\n const contractorName = getContractorDisplayName(contractor)\n const isHourly = payment.wageType === 'Hourly'\n const hours = Number(payment.hours || 0)\n const hourlyRate = Number(payment.hourlyRate || 0)\n const bonus = Number(payment.bonus || 0)\n const reimbursement = Number(payment.reimbursement || 0)\n\n const shouldShowReceipt = Boolean(\n paymentReceipt && payment.status === 'Funded' && payment.paymentMethod === 'Direct Deposit',\n )\n\n const receiptTotal = paymentReceipt?.totals?.companyDebit || '0'\n\n const receiptDetailsConfig = useMemo(() => {\n if (!paymentReceipt) return []\n\n return [\n {\n label: t('receipt.from'),\n value: paymentReceipt.nameOfSender || '',\n },\n {\n label: t('receipt.to'),\n value: getContractorDisplayName(contractor),\n },\n {\n label: t('receipt.debitDate'),\n value: paymentReceipt.debitDate ? formatLongWithYear(String(paymentReceipt.debitDate)) : '',\n },\n ]\n }, [paymentReceipt, contractor, t, formatLongWithYear])\n\n const statementRows = useMemo<PaymentStatementRow[]>(() => {\n const rows: PaymentStatementRow[] = [\n {\n label: payment.paymentMethod || '',\n amount: currencyFormatter(getContractorPaymentTotalAmount(payment)),\n },\n ]\n\n if (isHourly && hours > 0) {\n rows.push({\n label: t('hoursLabel'),\n amount: t('hoursAmount', {\n hours: formatHoursDisplay(hours),\n rate: currencyFormatter(hourlyRate),\n }),\n })\n } else {\n rows.push({\n label: t('wageLabel'),\n amount: currencyFormatter(Number(payment.wage || 0)),\n })\n }\n\n rows.push({\n label: t('bonus'),\n amount: currencyFormatter(bonus),\n })\n\n rows.push({\n label: t('reimbursement'),\n amount: currencyFormatter(reimbursement),\n })\n\n return rows\n }, [payment, isHourly, hours, hourlyRate, bonus, reimbursement, t, currencyFormatter])\n\n return (\n <Flex className={className} flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h2\">{t('title', { contractorName })}</Heading>\n <Text variant=\"supporting\">{formatLongWithYear(checkDate)}</Text>\n </Flex>\n </Flex>\n\n {shouldShowReceipt && (\n <div className={styles.receiptCard}>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={16}>\n <div className={styles.receiptIcon} aria-hidden>\n <ReceiptCheck className={styles.checkmarkIcon} />\n </div>\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <Text size=\"sm\" variant=\"supporting\">\n {t('receipt.totalLabel')}\n </Text>\n <Heading as=\"h1\" styledAs=\"h2\" className={styles.totalAmount}>\n {currencyFormatter(Number(receiptTotal))}\n </Heading>\n </Flex>\n </Flex>\n\n <Components.DescriptionList\n layout=\"horizontal\"\n showSeparators={false}\n items={receiptDetailsConfig.map(({ label, value }): DescriptionListItem => ({\n term: (\n <Text size=\"sm\" variant=\"supporting\">\n {label}\n </Text>\n ),\n description: <Text size=\"sm\">{value}</Text>,\n }))}\n />\n <hr />\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={12}>\n <Text size=\"sm\" variant=\"supporting\" className={styles.disclaimer}>\n <Trans\n i18nKey=\"receipt.disclaimer\"\n t={t}\n components={{\n licensesLink: <Link href={paymentReceipt?.licenseUri || ''} target=\"_blank\" />,\n }}\n />\n </Text>\n <hr />\n\n <Text size=\"sm\" variant=\"supporting\" className={styles.companyInfo}>\n {paymentReceipt?.licensee?.name || ''}\n </Text>\n <Text size=\"sm\" variant=\"supporting\" className={styles.address}>\n {addressInline({\n street1: paymentReceipt?.licensee?.address || '',\n city: paymentReceipt?.licensee?.city || '',\n state: paymentReceipt?.licensee?.state || '',\n zip: paymentReceipt?.licensee?.postalCode || '',\n country: '',\n uuid: '',\n })}\n {' | '}\n {formatPhoneNumber(paymentReceipt?.licensee?.phoneNumber)}\n </Text>\n </Flex>\n </Flex>\n </div>\n )}\n\n <DataView\n columns={[\n {\n title: t('debitedColumn'),\n render: ({ label }) => label,\n },\n {\n title: t('amountColumn'),\n justify: 'end',\n render: ({ amount }) => amount || '',\n },\n ]}\n data={statementRows}\n label={t('title', { contractorName })}\n />\n </Flex>\n )\n}\n"],"names":["PaymentStatementPresentation","className","payment","contractor","checkDate","paymentReceipt","Components","useComponentContext","Text","Heading","Link","useI18n","t","useTranslation","currencyFormatter","useNumberFormatter","formatLongWithYear","useDateFormatter","contractorName","getContractorDisplayName","isHourly","hours","hourlyRate","bonus","reimbursement","shouldShowReceipt","receiptTotal","receiptDetailsConfig","useMemo","statementRows","rows","getContractorPaymentTotalAmount","formatHoursDisplay","Flex","jsx","styles","jsxs","ReceiptCheck","label","value","Trans","addressInline","formatPhoneNumber","DataView","amount"],"mappings":";;;;;;;;;;;;;;;AAiCO,MAAMA,KAA+B,CAAC;AAAA,EAC3C,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA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AA,QAAA,GAEJ;AAAA,0BACC,MAAA,EAAG;AAAA,QAEJ,gBAAA6B,EAAC1B,GAAA,EAAK,MAAK,MAAK,SAAQ,cAAa,WAAW2B,EAAO,aACpD,UAAA9B,GAAgB,UAAU,QAAQ,IACrC;AAAA,QACA,gBAAA+B,EAAC5B,KAAK,MAAK,MAAK,SAAQ,cAAa,WAAW2B,EAAO,SACpD,UAAA;AAAA,UAAAM,EAAc;AAAA,YACb,SAASpC,GAAgB,UAAU,WAAW;AAAA,YAC9C,MAAMA,GAAgB,UAAU,QAAQ;AAAA,YACxC,OAAOA,GAAgB,UAAU,SAAS;AAAA,YAC1C,KAAKA,GAAgB,UAAU,cAAc;AAAA,UAG/C,CAAC;AAAA,UACA;AAAA,UACAqC,EAAkBrC,GAAgB,UAAU,WAAW;AAAA,QAAA,EAAA,CAC1D;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,IAGF,gBAAA6B;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,UACP;AAAA,YACE,OAAO/B,EAAE,eAAe;AAAA,YACxB,QAAQ,CAAC,EAAE,OAAA0B,QAAYA;AAAA,UAAA;AAAA,UAEzB;AAAA,YACE,OAAO1B,EAAE,cAAc;AAAA,YACvB,SAAS;AAAA,YACT,QAAQ,CAAC,EAAE,QAAAgC,EAAA,MAAaA,KAAU;AAAA,UAAA;AAAA,QACpC;AAAA,QAEF,MAAMf;AAAA,QACN,OAAOjB,EAAE,SAAS,EAAE,gBAAAM,GAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACtC,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"PaymentStatementPresentation.js","sources":["../../../../../src/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport type { ContractorPaymentForGroup } from '@gusto/embedded-api/models/components/contractorpaymentforgroup'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useMemo } from 'react'\nimport type { ContractorPaymentReceipt } from '@gusto/embedded-api/models/components/contractorpaymentreceipt'\nimport { getContractorDisplayName } from '../../shared/helpers'\nimport { getContractorPaymentTotalAmount } from '../shared/paymentAmounts'\nimport styles from './PaymentStatementPresentation.module.scss'\nimport { DataView, Flex } from '@/components/Common'\nimport type { DescriptionListItem } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { addressInline, formatPhoneNumber } from '@/helpers/formattedStrings'\nimport ReceiptCheck from '@/assets/icons/receipt-check.svg?react'\n\ninterface PaymentStatementPresentationProps {\n /** CSS class name applied to the root element. */\n className?: string\n payment: ContractorPaymentForGroup\n contractor: Contractor\n paymentReceipt?: ContractorPaymentReceipt\n checkDate: string\n}\n\ntype PaymentStatementRow = {\n label: string\n amount: string | null\n}\n\n/** @internal */\nexport const PaymentStatementPresentation = ({\n className,\n payment,\n contractor,\n checkDate,\n paymentReceipt,\n}: PaymentStatementPresentationProps) => {\n const Components = useComponentContext()\n const { Text, Heading, Link } = Components\n useI18n('Contractor.Payments.PaymentStatement')\n const { t } = useTranslation('Contractor.Payments.PaymentStatement')\n const currencyFormatter = useNumberFormatter('currency')\n const { formatLongWithYear } = useDateFormatter()\n\n const contractorName = getContractorDisplayName(contractor)\n const isHourly = payment.wageType === 'Hourly'\n const hours = Number(payment.hours || 0)\n const hourlyRate = Number(payment.hourlyRate || 0)\n const bonus = Number(payment.bonus || 0)\n const reimbursement = Number(payment.reimbursement || 0)\n\n const shouldShowReceipt = Boolean(\n paymentReceipt && payment.status === 'Funded' && payment.paymentMethod === 'Direct Deposit',\n )\n\n const receiptTotal = paymentReceipt?.totals?.companyDebit || '0'\n\n const receiptDetailsConfig = useMemo(() => {\n if (!paymentReceipt) return []\n\n return [\n {\n label: t('receipt.receiptId'),\n value: paymentReceipt.contractorPaymentUuid || '',\n },\n {\n label: t('receipt.from'),\n value: paymentReceipt.nameOfSender || '',\n },\n {\n label: t('receipt.to'),\n value: paymentReceipt.nameOfRecipient || '',\n },\n {\n label: t('receipt.debitDate'),\n value: paymentReceipt.debitDate ? formatLongWithYear(String(paymentReceipt.debitDate)) : '',\n },\n ]\n }, [paymentReceipt, t, formatLongWithYear])\n\n const statementRows = useMemo<PaymentStatementRow[]>(() => {\n const rows: PaymentStatementRow[] = [\n {\n label: payment.paymentMethod || '',\n amount: currencyFormatter(getContractorPaymentTotalAmount(payment)),\n },\n ]\n\n if (isHourly && hours > 0) {\n rows.push({\n label: t('hoursLabel'),\n amount: t('hoursAmount', {\n hours: formatHoursDisplay(hours),\n rate: currencyFormatter(hourlyRate),\n }),\n })\n } else {\n rows.push({\n label: t('wageLabel'),\n amount: currencyFormatter(Number(payment.wage || 0)),\n })\n }\n\n rows.push({\n label: t('bonus'),\n amount: currencyFormatter(bonus),\n })\n\n rows.push({\n label: t('reimbursement'),\n amount: currencyFormatter(reimbursement),\n })\n\n return rows\n }, [payment, isHourly, hours, hourlyRate, bonus, reimbursement, t, currencyFormatter])\n\n return (\n <Flex className={className} flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={16}>\n <Flex flexDirection=\"column\" gap={8}>\n <Heading as=\"h2\">{t('title', { contractorName })}</Heading>\n <Text variant=\"supporting\">{formatLongWithYear(checkDate)}</Text>\n </Flex>\n </Flex>\n\n {shouldShowReceipt && (\n <div className={styles.receiptCard}>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={16}>\n <div className={styles.receiptIcon} aria-hidden>\n <ReceiptCheck className={styles.checkmarkIcon} />\n </div>\n\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={8}>\n <Text size=\"sm\" variant=\"supporting\">\n {t('receipt.totalLabel')}\n </Text>\n <Heading as=\"h1\" styledAs=\"h2\" className={styles.totalAmount}>\n {currencyFormatter(Number(receiptTotal))}\n </Heading>\n </Flex>\n </Flex>\n\n <Components.DescriptionList\n layout=\"horizontal\"\n showSeparators={false}\n items={receiptDetailsConfig.map(({ label, value }): DescriptionListItem => ({\n term: (\n <Text size=\"sm\" variant=\"supporting\">\n {label}\n </Text>\n ),\n description: <Text size=\"sm\">{value}</Text>,\n }))}\n />\n <hr />\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={12}>\n <Text size=\"sm\" variant=\"supporting\" className={styles.disclaimer}>\n <Trans\n i18nKey=\"receipt.disclaimer\"\n t={t}\n components={{\n licensesLink: <Link href={paymentReceipt?.licenseUri || ''} target=\"_blank\" />,\n }}\n />\n </Text>\n <hr />\n\n <Text size=\"sm\" variant=\"supporting\" className={styles.companyInfo}>\n {paymentReceipt?.licensee?.name || ''}\n </Text>\n <Text size=\"sm\" variant=\"supporting\" className={styles.address}>\n {addressInline({\n street1: paymentReceipt?.licensee?.address || '',\n city: paymentReceipt?.licensee?.city || '',\n state: paymentReceipt?.licensee?.state || '',\n zip: paymentReceipt?.licensee?.postalCode || '',\n country: '',\n uuid: '',\n })}\n {' | '}\n {formatPhoneNumber(paymentReceipt?.licensee?.phoneNumber)}\n </Text>\n </Flex>\n </Flex>\n </div>\n )}\n\n <DataView\n columns={[\n {\n title: t('debitedColumn'),\n render: ({ label }) => label,\n },\n {\n title: t('amountColumn'),\n justify: 'end',\n render: ({ amount }) => amount || '',\n },\n ]}\n data={statementRows}\n label={t('title', { contractorName })}\n />\n </Flex>\n )\n}\n"],"names":["PaymentStatementPresentation","className","payment","contractor","checkDate","paymentReceipt","Components","useComponentContext","Text","Heading","Link","useI18n","t","useTranslation","currencyFormatter","useNumberFormatter","formatLongWithYear","useDateFormatter","contractorName","getContractorDisplayName","isHourly","hours","hourlyRate","bonus","reimbursement","shouldShowReceipt","receiptTotal","receiptDetailsConfig","useMemo","statementRows","rows","getContractorPaymentTotalAmount","formatHoursDisplay","Flex","jsx","styles","jsxs","ReceiptCheck","label","value","Trans","addressInline","formatPhoneNumber","DataView","amount"],"mappings":";;;;;;;;;;;;;;;AAiCO,MAAMA,KAA+B,CAAC;AAAA,EAC3C,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AACF,MAAyC;AACvC,QAAMC,IAAaC,EAAA,GACb,EAAE,MAAAC,GAAM,SAAAC,GAAS,MAAAC,EAAA,IAASJ;AAChC,EAAAK,EAAQ,sCAAsC;AAC9C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sCAAsC,GAC7DC,IAAoBC,EAAmB,UAAU,GACjD,EAAE,oBAAAC,EAAA,IAAuBC,EAAA,GAEzBC,IAAiBC,EAAyBhB,CAAU,GACpDiB,IAAWlB,EAAQ,aAAa,UAChCmB,IAAQ,OAAOnB,EAAQ,SAAS,CAAC,GACjCoB,IAAa,OAAOpB,EAAQ,cAAc,CAAC,GAC3CqB,IAAQ,OAAOrB,EAAQ,SAAS,CAAC,GACjCsB,IAAgB,OAAOtB,EAAQ,iBAAiB,CAAC,GAEjDuB,IAAoB,GACxBpB,KAAkBH,EAAQ,WAAW,YAAYA,EAAQ,kBAAkB,mBAGvEwB,IAAerB,GAAgB,QAAQ,gBAAgB,KAEvDsB,IAAuBC,EAAQ,MAC9BvB,IAEE;AAAA,IACL;AAAA,MACE,OAAOO,EAAE,mBAAmB;AAAA,MAC5B,OAAOP,EAAe,yBAAyB;AAAA,IAAA;AAAA,IAEjD;AAAA,MACE,OAAOO,EAAE,cAAc;AAAA,MACvB,OAAOP,EAAe,gBAAgB;AAAA,IAAA;AAAA,IAExC;AAAA,MACE,OAAOO,EAAE,YAAY;AAAA,MACrB,OAAOP,EAAe,mBAAmB;AAAA,IAAA;AAAA,IAE3C;AAAA,MACE,OAAOO,EAAE,mBAAmB;AAAA,MAC5B,OAAOP,EAAe,YAAYW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gBAAAM,GAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACtC,GACF;AAEJ;"}
|
|
@@ -1,59 +1,61 @@
|
|
|
1
1
|
import { ManagementContractorList as t } from "../ContractorList/management/ManagementContractorList.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
2
|
+
import { Dismissal as m } from "../Dismissal/Dismissal.js";
|
|
3
|
+
import { PaymentsList as f } from "../Payments/PaymentsList/PaymentsList.js";
|
|
4
|
+
import { CreatePayment as x } from "../Payments/CreatePayment/CreatePayment.js";
|
|
5
|
+
import { PaymentHistory as s } from "../Payments/PaymentHistory/PaymentHistory.js";
|
|
6
|
+
import { PaymentStatement as d } from "../Payments/PaymentStatement/PaymentStatement.js";
|
|
7
|
+
import { Address as P } from "../Address/management/Address.js";
|
|
8
|
+
import { AddressCard as l } from "../Address/management/AddressCard/AddressCard.js";
|
|
9
|
+
import { AddressEditForm as c } from "../Address/management/AddressEditForm.js";
|
|
10
|
+
import { Compensation as h } from "../Compensation/management/Compensation.js";
|
|
11
|
+
import { CompensationCard as E } from "../Compensation/management/CompensationCard/CompensationCard.js";
|
|
12
|
+
import { CompensationEditForm as L } from "../Compensation/management/CompensationEditForm.js";
|
|
13
|
+
import { ContractorListFlow as u } from "../ContractorListFlow/ContractorListFlow.js";
|
|
14
|
+
import { CreateHistoricalPayment as S } from "../Payments/CreateHistoricalPayment/CreateHistoricalPayment.js";
|
|
15
|
+
import { CreatePaymentFlow as g } from "../Payments/CreatePaymentFlow/CreatePaymentFlow.js";
|
|
16
|
+
import { Dashboard as j } from "../Dashboard/Dashboard.js";
|
|
17
|
+
import { DashboardFlow as q } from "../Dashboard/DashboardFlow.js";
|
|
18
|
+
import { DocumentsCard as z } from "../Documents/management/DocumentsCard/DocumentsCard.js";
|
|
19
|
+
import { HistoricalPaymentFlow as G } from "../Payments/HistoricalPaymentFlow/HistoricalPaymentFlow.js";
|
|
20
|
+
import { HistoricalPaymentSummary as J } from "../Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js";
|
|
21
|
+
import { PaymentFlow as N } from "../Payments/PaymentFlow/PaymentFlow.js";
|
|
22
|
+
import { PaymentMethod as Q } from "../PaymentMethod/management/PaymentMethod.js";
|
|
23
|
+
import { PaymentMethodCard as T } from "../PaymentMethod/management/PaymentMethodCard/PaymentMethodCard.js";
|
|
24
|
+
import { PaymentMethodEditForm as W } from "../PaymentMethod/management/PaymentMethodEditForm.js";
|
|
25
|
+
import { PaymentSummary as Y } from "../Payments/PaymentSummary/PaymentSummary.js";
|
|
26
|
+
import { Profile as _ } from "../Profile/management/Profile.js";
|
|
27
|
+
import { ProfileCard as oo } from "../Profile/management/ProfileCard/ProfileCard.js";
|
|
28
|
+
import { ProfileEditForm as to } from "../Profile/management/ProfileEditForm.js";
|
|
29
|
+
import { ViewPaymentFlow as mo } from "../Payments/ViewPaymentFlow/ViewPaymentFlow.js";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
P as Address,
|
|
32
|
+
l as AddressCard,
|
|
33
|
+
c as AddressEditForm,
|
|
34
|
+
h as Compensation,
|
|
35
|
+
E as CompensationCard,
|
|
36
|
+
L as CompensationEditForm,
|
|
36
37
|
t as ContractorList,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
z as
|
|
45
|
-
G as
|
|
46
|
-
J as
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Q as
|
|
50
|
-
T as
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
_ as
|
|
56
|
-
oo as
|
|
57
|
-
to as
|
|
38
|
+
u as ContractorListFlow,
|
|
39
|
+
S as CreateHistoricalPayment,
|
|
40
|
+
x as CreatePayment,
|
|
41
|
+
g as CreatePaymentFlow,
|
|
42
|
+
j as Dashboard,
|
|
43
|
+
q as DashboardFlow,
|
|
44
|
+
m as Dismissal,
|
|
45
|
+
z as DocumentsCard,
|
|
46
|
+
G as HistoricalPaymentFlow,
|
|
47
|
+
J as HistoricalPaymentSummary,
|
|
48
|
+
N as PaymentFlow,
|
|
49
|
+
s as PaymentHistory,
|
|
50
|
+
Q as PaymentMethod,
|
|
51
|
+
T as PaymentMethodCard,
|
|
52
|
+
W as PaymentMethodEditForm,
|
|
53
|
+
d as PaymentStatement,
|
|
54
|
+
Y as PaymentSummary,
|
|
55
|
+
f as PaymentsList,
|
|
56
|
+
_ as Profile,
|
|
57
|
+
oo as ProfileCard,
|
|
58
|
+
to as ProfileEditForm,
|
|
59
|
+
mo as ViewPaymentFlow
|
|
58
60
|
};
|
|
59
61
|
//# sourceMappingURL=contractorManagement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractorManagement.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contractorManagement.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js
CHANGED
|
@@ -11,10 +11,11 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerror";
|
|
|
11
11
|
import "@gusto/embedded-api/models/errors/httpclienterrors";
|
|
12
12
|
import "../../../../../../shared/constants.js";
|
|
13
13
|
import "../../../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import "../../../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [a, f] = t("DocumentListContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
f as DocumentListProvider,
|
|
19
|
+
a as useDocumentList
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../../../src/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createMachine as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { employeeListStateMachine as
|
|
5
|
-
import { EmployeeListContextual as
|
|
6
|
-
import { Flow as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as n } from "robot3";
|
|
3
|
+
import { useMemo as s } from "react";
|
|
4
|
+
import { employeeListStateMachine as l } from "./employeeListStateMachine.js";
|
|
5
|
+
import { EmployeeListContextual as c } from "./EmployeeListFlowComponents.js";
|
|
6
|
+
import { Flow as f } from "../../Flow/Flow.js";
|
|
7
|
+
const w = ({
|
|
8
|
+
companyId: o,
|
|
9
|
+
onEvent: t,
|
|
10
|
+
isSelfOnboardingEnabled: e,
|
|
11
|
+
withEmployeeI9: m
|
|
12
|
+
}) => {
|
|
13
|
+
const r = s(
|
|
14
|
+
() => n(
|
|
10
15
|
"list",
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
...
|
|
14
|
-
component:
|
|
15
|
-
companyId: o
|
|
16
|
+
l,
|
|
17
|
+
(i) => ({
|
|
18
|
+
...i,
|
|
19
|
+
component: c,
|
|
20
|
+
companyId: o,
|
|
21
|
+
isSelfOnboardingEnabled: e,
|
|
22
|
+
withEmployeeI9: m
|
|
16
23
|
})
|
|
17
24
|
),
|
|
25
|
+
// `isSelfOnboardingEnabled`/`withEmployeeI9` are intentionally omitted: they only
|
|
26
|
+
// seed the initial context once, and reacting to a later change would discard the
|
|
27
|
+
// machine's current navigation state (see Compensation.tsx for the same pattern).
|
|
28
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
29
|
[o]
|
|
19
30
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ p(f, { machine: r, onEvent: t });
|
|
21
32
|
};
|
|
22
33
|
export {
|
|
23
|
-
|
|
34
|
+
w as EmployeeListFlow
|
|
24
35
|
};
|
|
25
36
|
//# sourceMappingURL=EmployeeListFlow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeListFlow.js","sources":["../../../../src/components/Employee/EmployeeListFlow/EmployeeListFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { employeeListStateMachine } from './employeeListStateMachine'\nimport {\n EmployeeListContextual,\n type EmployeeListFlowContextInterface,\n type EmployeeListFlowProps,\n} from './EmployeeListFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\n\n/**\n * Hub for viewing and managing all employees, including onboarding new ones.\n *\n * @remarks\n * Drop-in entry point for managing all employees in a company. Begins on the\n * management employee list and routes into {@link DashboardFlow},\n * {@link TerminationFlow}, or {@link EmployeeOnboarding.OnboardingExecutionFlow | OnboardingExecutionFlow} based on the\n * action the admin invokes on a row (or the \"Add employee\" CTA). A \"Back to\n * employees\" header is added to each sub-flow so the admin can return to the\n * list at any time.\n *\n * The flow forwards every event emitted by its blocks to `onEvent`;\n * see the events table on each block for the full set of events and\n * payloads observable from this flow.\n *\n * @components\n * - {@link EmployeeList}\n * - {@link DashboardFlow}\n * - {@link TerminationFlow}\n * - {@link EmployeeOnboarding.OnboardingExecutionFlow | OnboardingExecutionFlow}\n *\n * @param props - See {@link EmployeeListFlowProps}.\n * @returns The employee list workflow with internal navigation to the dashboard, termination, and onboarding flows.\n * @public\n * @group Flow components\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { EmployeeManagement } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <EmployeeManagement.EmployeeListFlow\n * companyId=\"a007e1ab-3595-43c2-ab4b-af7a5af2e365\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport const EmployeeListFlow = ({
|
|
1
|
+
{"version":3,"file":"EmployeeListFlow.js","sources":["../../../../src/components/Employee/EmployeeListFlow/EmployeeListFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { employeeListStateMachine } from './employeeListStateMachine'\nimport {\n EmployeeListContextual,\n type EmployeeListFlowContextInterface,\n type EmployeeListFlowProps,\n} from './EmployeeListFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\n\n/**\n * Hub for viewing and managing all employees, including onboarding new ones.\n *\n * @remarks\n * Drop-in entry point for managing all employees in a company. Begins on the\n * management employee list and routes into {@link DashboardFlow},\n * {@link TerminationFlow}, or {@link EmployeeOnboarding.OnboardingExecutionFlow | OnboardingExecutionFlow} based on the\n * action the admin invokes on a row (or the \"Add employee\" CTA). A \"Back to\n * employees\" header is added to each sub-flow so the admin can return to the\n * list at any time.\n *\n * The flow forwards every event emitted by its blocks to `onEvent`;\n * see the events table on each block for the full set of events and\n * payloads observable from this flow.\n *\n * @components\n * - {@link EmployeeList}\n * - {@link DashboardFlow}\n * - {@link TerminationFlow}\n * - {@link EmployeeOnboarding.OnboardingExecutionFlow | OnboardingExecutionFlow}\n *\n * @param props - See {@link EmployeeListFlowProps}.\n * @returns The employee list workflow with internal navigation to the dashboard, termination, and onboarding flows.\n * @public\n * @group Flow components\n *\n * @example\n * ```tsx title=\"App.tsx\"\n * import { EmployeeManagement } from '@gusto/embedded-react-sdk'\n *\n * function MyApp() {\n * return (\n * <EmployeeManagement.EmployeeListFlow\n * companyId=\"a007e1ab-3595-43c2-ab4b-af7a5af2e365\"\n * onEvent={() => {}}\n * />\n * )\n * }\n * ```\n */\nexport const EmployeeListFlow = ({\n companyId,\n onEvent,\n isSelfOnboardingEnabled,\n withEmployeeI9,\n}: EmployeeListFlowProps) => {\n const machine = useMemo(\n () =>\n createMachine(\n 'list',\n employeeListStateMachine,\n (initialContext: EmployeeListFlowContextInterface) => ({\n ...initialContext,\n component: EmployeeListContextual,\n companyId,\n isSelfOnboardingEnabled,\n withEmployeeI9,\n }),\n ),\n // `isSelfOnboardingEnabled`/`withEmployeeI9` are intentionally omitted: they only\n // seed the initial context once, and reacting to a later change would discard the\n // machine's current navigation state (see Compensation.tsx for the same pattern).\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [companyId],\n )\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["EmployeeListFlow","companyId","onEvent","isSelfOnboardingEnabled","withEmployeeI9","machine","useMemo","createMachine","employeeListStateMachine","initialContext","EmployeeListContextual","jsx","Flow"],"mappings":";;;;;;AAkDO,MAAMA,IAAmB,CAAC;AAAA,EAC/B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,gBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAsD;AAAA,QACrD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAT;AAAA,QACA,yBAAAE;AAAA,QACA,gBAAAC;AAAA,MAAA;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAMJ,CAACH,CAAS;AAAA,EAAA;AAEZ,SAAO,gBAAAU,EAACC,GAAA,EAAK,SAAAP,GAAkB,SAAAH,EAAA,CAAkB;AACnD;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { ManagementEmployeeList as
|
|
3
|
-
import { TerminationFlow as
|
|
4
|
-
import { OnboardingExecutionFlow as
|
|
2
|
+
import { ManagementEmployeeList as a } from "../EmployeeList/management/ManagementEmployeeList.js";
|
|
3
|
+
import { TerminationFlow as p } from "../Terminations/TerminationFlow/TerminationFlow.js";
|
|
4
|
+
import { OnboardingExecutionFlow as l } from "../OnboardingExecutionFlow/OnboardingExecutionFlow.js";
|
|
5
5
|
import { useFlow as r } from "../../Flow/useFlow.js";
|
|
6
6
|
import { ensureRequired as e } from "../../../helpers/ensureRequired.js";
|
|
7
|
-
import { DashboardFlow as
|
|
8
|
-
function
|
|
7
|
+
import { DashboardFlow as d } from "../Dashboard/DashboardFlow.js";
|
|
8
|
+
function w() {
|
|
9
9
|
const { companyId: o, onEvent: n } = r();
|
|
10
|
-
return /* @__PURE__ */ t(
|
|
10
|
+
return /* @__PURE__ */ t(a, { companyId: e(o), onEvent: n });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function x() {
|
|
13
13
|
const { employeeId: o, onEvent: n } = r();
|
|
14
|
-
return /* @__PURE__ */ t(
|
|
14
|
+
return /* @__PURE__ */ t(d, { employeeId: e(o), onEvent: n });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function F() {
|
|
17
17
|
const { companyId: o, employeeId: n, onEvent: m } = r();
|
|
18
18
|
return /* @__PURE__ */ t(
|
|
19
|
-
|
|
19
|
+
p,
|
|
20
20
|
{
|
|
21
21
|
companyId: e(o),
|
|
22
22
|
employeeId: e(n),
|
|
@@ -24,14 +24,22 @@ function w() {
|
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const { companyId: o, onEvent: n } = r();
|
|
29
|
-
return /* @__PURE__ */ t(
|
|
27
|
+
function b() {
|
|
28
|
+
const { companyId: o, onEvent: n, isSelfOnboardingEnabled: m, withEmployeeI9: i } = r();
|
|
29
|
+
return /* @__PURE__ */ t(
|
|
30
|
+
l,
|
|
31
|
+
{
|
|
32
|
+
companyId: e(o),
|
|
33
|
+
onEvent: n,
|
|
34
|
+
isSelfOnboardingEnabled: m,
|
|
35
|
+
withEmployeeI9: i
|
|
36
|
+
}
|
|
37
|
+
);
|
|
30
38
|
}
|
|
31
39
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
x as DashboardFlowContextual,
|
|
41
|
+
w as EmployeeListContextual,
|
|
42
|
+
b as OnboardingExecutionFlowContextual,
|
|
43
|
+
F as TerminationFlowContextual
|
|
36
44
|
};
|
|
37
45
|
//# sourceMappingURL=EmployeeListFlowComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeListFlowComponents.js","sources":["../../../../src/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.tsx"],"sourcesContent":["import { ManagementEmployeeList } from '../EmployeeList/management/ManagementEmployeeList'\nimport { DashboardFlow } from '../Dashboard'\nimport { TerminationFlow } from '../Terminations/TerminationFlow/TerminationFlow'\nimport { OnboardingExecutionFlow } from '../OnboardingExecutionFlow/OnboardingExecutionFlow'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeListFlow}.\n *\n * @public\n */\nexport interface EmployeeListFlowProps extends BaseComponentInterface<never> {\n /** The associated company identifier. */\n companyId: string\n}\n\n/** @internal */\nexport interface EmployeeListFlowContextInterface extends FlowContextInterface {\n companyId: string\n employeeId?: string\n}\n\n/** @internal */\nexport function EmployeeListContextual() {\n const { companyId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return <ManagementEmployeeList companyId={ensureRequired(companyId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function DashboardFlowContextual() {\n const { employeeId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return <DashboardFlow employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function TerminationFlowContextual() {\n const { companyId, employeeId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return (\n <TerminationFlow\n companyId={ensureRequired(companyId)}\n employeeId={ensureRequired(employeeId)}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function OnboardingExecutionFlowContextual() {\n const { companyId, onEvent }
|
|
1
|
+
{"version":3,"file":"EmployeeListFlowComponents.js","sources":["../../../../src/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.tsx"],"sourcesContent":["import { ManagementEmployeeList } from '../EmployeeList/management/ManagementEmployeeList'\nimport { DashboardFlow } from '../Dashboard'\nimport { TerminationFlow } from '../Terminations/TerminationFlow/TerminationFlow'\nimport { OnboardingExecutionFlow } from '../OnboardingExecutionFlow/OnboardingExecutionFlow'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\n/**\n * Props for {@link EmployeeListFlow}.\n *\n * @public\n */\nexport interface EmployeeListFlowProps extends BaseComponentInterface<never> {\n /** The associated company identifier. */\n companyId: string\n /** When true, presents the self-onboarding toggle in the onboarding flow. Defaults to `true`. */\n isSelfOnboardingEnabled?: boolean\n /** When true, enables the Employee Documents step in the onboarding flow, allowing the admin to configure I-9 document requirements. Defaults to `false`. */\n withEmployeeI9?: boolean\n}\n\n/** @internal */\nexport interface EmployeeListFlowContextInterface extends FlowContextInterface {\n companyId: string\n employeeId?: string\n isSelfOnboardingEnabled?: boolean\n withEmployeeI9?: boolean\n}\n\n/** @internal */\nexport function EmployeeListContextual() {\n const { companyId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return <ManagementEmployeeList companyId={ensureRequired(companyId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function DashboardFlowContextual() {\n const { employeeId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return <DashboardFlow employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\n/** @internal */\nexport function TerminationFlowContextual() {\n const { companyId, employeeId, onEvent } = useFlow<EmployeeListFlowContextInterface>()\n return (\n <TerminationFlow\n companyId={ensureRequired(companyId)}\n employeeId={ensureRequired(employeeId)}\n onEvent={onEvent}\n />\n )\n}\n\n/** @internal */\nexport function OnboardingExecutionFlowContextual() {\n const { companyId, onEvent, isSelfOnboardingEnabled, withEmployeeI9 } =\n useFlow<EmployeeListFlowContextInterface>()\n return (\n <OnboardingExecutionFlow\n companyId={ensureRequired(companyId)}\n onEvent={onEvent}\n isSelfOnboardingEnabled={isSelfOnboardingEnabled}\n withEmployeeI9={withEmployeeI9}\n />\n )\n}\n"],"names":["EmployeeListContextual","companyId","onEvent","useFlow","ManagementEmployeeList","ensureRequired","DashboardFlowContextual","employeeId","DashboardFlow","TerminationFlowContextual","jsx","TerminationFlow","OnboardingExecutionFlowContextual","isSelfOnboardingEnabled","withEmployeeI9","OnboardingExecutionFlow"],"mappings":";;;;;;;AA+BO,SAASA,IAAyB;AACvC,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAuB,WAAWC,EAAeJ,CAAS,GAAG,SAAAC,GAAkB;AACzF;AAGO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAC,GAAY,SAAAL,EAAA,IAAYC,EAAA;AAChC,2BAAQK,GAAA,EAAc,YAAYH,EAAeE,CAAU,GAAG,SAAAL,GAAkB;AAClF;AAGO,SAASO,IAA4B;AAC1C,QAAM,EAAE,WAAAR,GAAW,YAAAM,GAAY,SAAAL,EAAA,IAAYC,EAAA;AAC3C,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWN,EAAeJ,CAAS;AAAA,MACnC,YAAYI,EAAeE,CAAU;AAAA,MACrC,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;AAGO,SAASU,IAAoC;AAClD,QAAM,EAAE,WAAAX,GAAW,SAAAC,GAAS,yBAAAW,GAAyB,gBAAAC,EAAA,IACnDX,EAAA;AACF,SACE,gBAAAO;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,WAAWV,EAAeJ,CAAS;AAAA,MACnC,SAAAC;AAAA,MACA,yBAAAW;AAAA,MACA,gBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { state as i, transition as e, reduce as r } from "robot3";
|
|
2
|
-
import { ConfirmWireDetailsFormContextual as
|
|
2
|
+
import { ConfirmWireDetailsFormContextual as a, WireInstructionsContextual as I } from "./ConfirmWireDetailsComponents.js";
|
|
3
3
|
import { payrollWireEvents as o } from "../../../shared/constants.js";
|
|
4
|
-
const
|
|
4
|
+
const R = {
|
|
5
5
|
banner: i(
|
|
6
6
|
e(
|
|
7
7
|
o.PAYROLL_WIRE_START_TRANSFER,
|
|
8
8
|
"wireInstructions",
|
|
9
9
|
r((n) => ({
|
|
10
10
|
...n,
|
|
11
|
-
component:
|
|
11
|
+
component: I,
|
|
12
|
+
confirmationAlert: void 0
|
|
12
13
|
}))
|
|
13
14
|
)
|
|
14
15
|
),
|
|
@@ -29,7 +30,7 @@ const m = {
|
|
|
29
30
|
r(
|
|
30
31
|
(n, t) => ({
|
|
31
32
|
...n,
|
|
32
|
-
component:
|
|
33
|
+
component: a,
|
|
33
34
|
selectedWireInId: t.payload.selectedWireInId
|
|
34
35
|
})
|
|
35
36
|
)
|
|
@@ -66,6 +67,6 @@ const m = {
|
|
|
66
67
|
final: i()
|
|
67
68
|
};
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
R as confirmWireDetailsMachine
|
|
70
71
|
};
|
|
71
72
|
//# sourceMappingURL=confirmWireDetailsStateMachine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirmWireDetailsStateMachine.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.tsx"],"sourcesContent":["import { state, transition, reduce } from 'robot3'\nimport type { ConfirmationAlert } from './types'\nimport type { ConfirmWireDetailsContextInterface } from './ConfirmWireDetailsComponents'\nimport {\n WireInstructionsContextual,\n ConfirmWireDetailsFormContextual,\n} from './ConfirmWireDetailsComponents'\nimport { payrollWireEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n/**\n * Payload shapes for each wire-confirmation state machine event.\n *\n * @internal\n */\nexport type EventPayloads = {\n /** Wire-in request selected within the instructions screen. */\n [payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT]: {\n selectedWireInId: string\n }\n /** Banner button pressed to begin the wire transfer flow. */\n [payrollWireEvents.PAYROLL_WIRE_START_TRANSFER]: undefined\n /** Instructions screen completed; advances to the confirmation form. */\n [payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE]: {\n selectedWireInId: string\n }\n /** Confirmation form submitted; carries the alert to surface on the banner. */\n [payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: {\n confirmationAlert: ConfirmationAlert\n }\n /** Confirmation form cancelled. */\n [payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL]: undefined\n}\n\n/** @internal */\nexport const confirmWireDetailsMachine = {\n banner: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_START_TRANSFER,\n 'wireInstructions',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: WireInstructionsContextual,\n })),\n ),\n ),\n wireInstructions: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT,\n 'wireInstructions',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT\n >,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n selectedWireInId: ev.payload.selectedWireInId,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE,\n 'confirmForm',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE\n >,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: ConfirmWireDetailsFormContextual,\n selectedWireInId: ev.payload.selectedWireInId,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n })),\n ),\n ),\n confirmForm: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_DONE,\n 'banner',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<EventPayloads, typeof payrollWireEvents.PAYROLL_WIRE_FORM_DONE>,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: null,\n confirmationAlert: ev.payload.confirmationAlert,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: null,\n })),\n ),\n ),\n final: state<MachineTransition>(),\n}\n"],"names":["confirmWireDetailsMachine","state","transition","payrollWireEvents","reduce","ctx","WireInstructionsContextual","ev","ConfirmWireDetailsFormContextual"],"mappings":";;;AAmCO,MAAMA,IAA4B;AAAA,EACvC,QAAQC;AAAA,IACNC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAiF;AAAA,QACvF,GAAGA;AAAA,QACH,WAAWC;AAAA,MAAA,
|
|
1
|
+
{"version":3,"file":"confirmWireDetailsStateMachine.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.tsx"],"sourcesContent":["import { state, transition, reduce } from 'robot3'\nimport type { ConfirmationAlert } from './types'\nimport type { ConfirmWireDetailsContextInterface } from './ConfirmWireDetailsComponents'\nimport {\n WireInstructionsContextual,\n ConfirmWireDetailsFormContextual,\n} from './ConfirmWireDetailsComponents'\nimport { payrollWireEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n/**\n * Payload shapes for each wire-confirmation state machine event.\n *\n * @internal\n */\nexport type EventPayloads = {\n /** Wire-in request selected within the instructions screen. */\n [payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT]: {\n selectedWireInId: string\n }\n /** Banner button pressed to begin the wire transfer flow. */\n [payrollWireEvents.PAYROLL_WIRE_START_TRANSFER]: undefined\n /** Instructions screen completed; advances to the confirmation form. */\n [payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE]: {\n selectedWireInId: string\n }\n /** Confirmation form submitted; carries the alert to surface on the banner. */\n [payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: {\n confirmationAlert: ConfirmationAlert\n }\n /** Confirmation form cancelled. */\n [payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL]: undefined\n}\n\n/** @internal */\nexport const confirmWireDetailsMachine = {\n banner: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_START_TRANSFER,\n 'wireInstructions',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: WireInstructionsContextual,\n confirmationAlert: undefined,\n })),\n ),\n ),\n wireInstructions: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT,\n 'wireInstructions',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_SELECT\n >,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n selectedWireInId: ev.payload.selectedWireInId,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE,\n 'confirmForm',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE\n >,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: ConfirmWireDetailsFormContextual,\n selectedWireInId: ev.payload.selectedWireInId,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n })),\n ),\n ),\n confirmForm: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_DONE,\n 'banner',\n reduce(\n (\n ctx: ConfirmWireDetailsContextInterface,\n ev: MachineEventType<EventPayloads, typeof payrollWireEvents.PAYROLL_WIRE_FORM_DONE>,\n ): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: null,\n confirmationAlert: ev.payload.confirmationAlert,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce((ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: null,\n })),\n ),\n ),\n final: state<MachineTransition>(),\n}\n"],"names":["confirmWireDetailsMachine","state","transition","payrollWireEvents","reduce","ctx","WireInstructionsContextual","ev","ConfirmWireDetailsFormContextual"],"mappings":";;;AAmCO,MAAMA,IAA4B;AAAA,EACvC,QAAQC;AAAA,IACNC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAiF;AAAA,QACvF,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,mBAAmB;AAAA,MAAA,EACnB;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,kBAAkBL;AAAA,IAChBC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OAIwC;AAAA,UACxC,GAAGF;AAAA,UACH,kBAAkBE,EAAG,QAAQ;AAAA,QAAA;AAAA,MAC/B;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OAIwC;AAAA,UACxC,GAAGF;AAAA,UACH,WAAWG;AAAA,UACX,kBAAkBD,EAAG,QAAQ;AAAA,QAAA;AAAA,MAC/B;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAiF;AAAA,QACvF,GAAGA;AAAA,MAAA,EACH;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,aAAaJ;AAAA,IACXC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OACwC;AAAA,UACxC,GAAGF;AAAA,UACH,WAAW;AAAA,UACX,mBAAmBE,EAAG,QAAQ;AAAA,QAAA;AAAA,MAChC;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAiF;AAAA,QACvF,GAAGA;AAAA,QACH,WAAW;AAAA,MAAA,EACX;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,OAAOJ,EAAA;AACT;"}
|