@gusto/embedded-react-sdk 0.23.0 → 0.24.0
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 +26 -0
- package/dist/components/Common/PayrollLoading/PayrollLoading.d.ts +2 -0
- package/dist/components/Common/PayrollLoading/PayrollLoading.js +19 -0
- package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -0
- package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +5 -0
- package/dist/components/Common/PayrollLoading/index.d.ts +3 -0
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +2 -0
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +6 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +4 -4
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +26 -21
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +8 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +56 -54
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +90 -91
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +33 -31
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +88 -87
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +24 -18
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +77 -51
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +4 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +29 -21
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +5 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +36 -26
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +4 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -60
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +239 -234
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +2 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +25 -15
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +152 -137
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -0
- package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +3 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +26 -18
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.d.ts +2 -0
- package/dist/contexts/GustoProvider/GustoProvider.js +12 -11
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +24 -14
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +5 -5
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createMachine as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { payrollMachine as
|
|
5
|
-
import { SaveAndExitCta as
|
|
6
|
-
import { Flow as
|
|
7
|
-
import { buildBreadcrumbs as
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as n } from "robot3";
|
|
3
|
+
import { useMemo as p } from "react";
|
|
4
|
+
import { payrollMachine as c, payrollFlowBreadcrumbsNodes as i } from "./payrollStateMachine.js";
|
|
5
|
+
import { SaveAndExitCta as u, PayrollLandingContextual as d } from "./PayrollFlowComponents.js";
|
|
6
|
+
import { Flow as s } from "../../Flow/Flow.js";
|
|
7
|
+
import { buildBreadcrumbs as f } from "../../../helpers/breadcrumbHelpers.js";
|
|
8
|
+
const M = ({
|
|
9
|
+
companyId: r,
|
|
10
|
+
onEvent: l,
|
|
11
|
+
withReimbursements: o = !0,
|
|
12
|
+
ConfirmWireDetailsComponent: a
|
|
13
|
+
}) => {
|
|
14
|
+
const e = p(
|
|
15
|
+
() => n("landing", c, (m) => ({
|
|
16
|
+
...m,
|
|
17
|
+
component: d,
|
|
13
18
|
companyId: r,
|
|
14
19
|
progressBarType: null,
|
|
15
|
-
|
|
16
|
-
breadcrumbs: u(i),
|
|
20
|
+
breadcrumbs: f(i),
|
|
17
21
|
currentBreadcrumb: "landing",
|
|
18
|
-
progressBarCta:
|
|
22
|
+
progressBarCta: u,
|
|
23
|
+
withReimbursements: o,
|
|
24
|
+
ConfirmWireDetailsComponent: a
|
|
19
25
|
})),
|
|
20
|
-
[r]
|
|
26
|
+
[r, o, a]
|
|
21
27
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ t(s, { machine: e, onEvent: l });
|
|
23
29
|
};
|
|
24
30
|
export {
|
|
25
|
-
|
|
31
|
+
M as PayrollFlow
|
|
26
32
|
};
|
|
27
33
|
//# sourceMappingURL=PayrollFlow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollFlow.js","sources":["../../../../src/components/Payroll/PayrollFlow/PayrollFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { payrollFlowBreadcrumbsNodes, payrollMachine } from './payrollStateMachine'\nimport type { PayrollFlowProps } from './PayrollFlowComponents'\nimport {\n SaveAndExitCta,\n PayrollLandingContextual,\n type PayrollFlowContextInterface,\n} from './PayrollFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\nexport const PayrollFlow = ({
|
|
1
|
+
{"version":3,"file":"PayrollFlow.js","sources":["../../../../src/components/Payroll/PayrollFlow/PayrollFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { payrollFlowBreadcrumbsNodes, payrollMachine } from './payrollStateMachine'\nimport type { PayrollFlowProps } from './PayrollFlowComponents'\nimport {\n SaveAndExitCta,\n PayrollLandingContextual,\n type PayrollFlowContextInterface,\n} from './PayrollFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport { buildBreadcrumbs } from '@/helpers/breadcrumbHelpers'\n\nexport const PayrollFlow = ({\n companyId,\n onEvent,\n withReimbursements = true,\n ConfirmWireDetailsComponent,\n}: PayrollFlowProps) => {\n const payrollFlow = useMemo(\n () =>\n createMachine('landing', payrollMachine, (initialContext: PayrollFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingContextual,\n companyId,\n progressBarType: null,\n breadcrumbs: buildBreadcrumbs(payrollFlowBreadcrumbsNodes),\n currentBreadcrumb: 'landing',\n progressBarCta: SaveAndExitCta,\n withReimbursements,\n ConfirmWireDetailsComponent,\n })),\n [companyId, withReimbursements, ConfirmWireDetailsComponent],\n )\n return <Flow machine={payrollFlow} onEvent={onEvent} />\n}\n"],"names":["PayrollFlow","companyId","onEvent","withReimbursements","ConfirmWireDetailsComponent","payrollFlow","useMemo","createMachine","payrollMachine","initialContext","PayrollLandingContextual","buildBreadcrumbs","payrollFlowBreadcrumbsNodes","SaveAndExitCta","jsx","Flow"],"mappings":";;;;;;;AAYO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,oBAAAC,IAAqB;AAAA,EACrB,6BAAAC;AACF,MAAwB;AACtB,QAAMC,IAAcC;AAAA,IAClB,MACEC,EAAc,WAAWC,GAAgB,CAACC,OAAiD;AAAA,MACzF,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAT;AAAA,MACA,iBAAiB;AAAA,MACjB,aAAaU,EAAiBC,CAA2B;AAAA,MACzD,mBAAmB;AAAA,MACnB,gBAAgBC;AAAA,MAChB,oBAAAV;AAAA,MACA,6BAAAC;AAAA,IAAA,EACA;AAAA,IACJ,CAACH,GAAWE,GAAoBC,CAA2B;AAAA,EAAA;AAE7D,SAAO,gBAAAU,EAACC,GAAA,EAAK,SAASV,GAAa,SAAAH,EAAA,CAAkB;AACvD;"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype';
|
|
3
|
+
import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
|
|
3
4
|
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
4
5
|
import { BaseComponentInterface } from '../../Base';
|
|
5
6
|
import { BreadcrumbTrail } from '../../Common/FlowBreadcrumbs/FlowBreadcrumbsTypes';
|
|
6
7
|
export interface PayrollFlowProps extends BaseComponentInterface {
|
|
7
8
|
companyId: string;
|
|
9
|
+
withReimbursements?: boolean;
|
|
10
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
8
11
|
}
|
|
9
12
|
export type PayrollFlowAlert = {
|
|
10
13
|
type: 'error' | 'info' | 'success';
|
|
@@ -21,6 +24,8 @@ export interface PayrollFlowContextInterface extends FlowContextInterface {
|
|
|
21
24
|
alerts?: PayrollFlowAlert[];
|
|
22
25
|
breadcrumbs?: BreadcrumbTrail;
|
|
23
26
|
payPeriod?: PayrollPayPeriodType;
|
|
27
|
+
withReimbursements: boolean;
|
|
28
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
24
29
|
}
|
|
25
30
|
export declare function PayrollLandingContextual(): import("react/jsx-runtime").JSX.Element;
|
|
26
31
|
export declare function PayrollConfigurationContextual(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,69 +1,95 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { PayrollLanding as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { PayrollLanding as u } from "../PayrollLanding/PayrollLanding.js";
|
|
4
4
|
import { PayrollConfiguration as c } from "../PayrollConfiguration/PayrollConfiguration.js";
|
|
5
5
|
import { PayrollOverview as y } from "../PayrollOverview/PayrollOverview.js";
|
|
6
|
-
import { PayrollEditEmployee as
|
|
6
|
+
import { PayrollEditEmployee as s } from "../PayrollEditEmployee/PayrollEditEmployee.js";
|
|
7
7
|
import { PayrollReceipts as d } from "../PayrollReceipts/PayrollReceipts.js";
|
|
8
8
|
import { PayrollBlocker as f } from "../PayrollBlocker/PayrollBlocker.js";
|
|
9
|
-
import { useFlow as
|
|
10
|
-
import { ensureRequired as
|
|
11
|
-
import { useComponentContext as
|
|
12
|
-
import { useI18n as
|
|
9
|
+
import { useFlow as i } from "../../Flow/useFlow.js";
|
|
10
|
+
import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
|
|
11
|
+
import { useComponentContext as I } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { useI18n as C } from "../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as v } from "../../../shared/constants.js";
|
|
14
|
-
function
|
|
15
|
-
const { companyId: n, onEvent: o } =
|
|
16
|
-
return /* @__PURE__ */
|
|
14
|
+
function W() {
|
|
15
|
+
const { companyId: n, onEvent: o, withReimbursements: t, ConfirmWireDetailsComponent: e } = i();
|
|
16
|
+
return /* @__PURE__ */ l(
|
|
17
|
+
u,
|
|
18
|
+
{
|
|
19
|
+
onEvent: o,
|
|
20
|
+
companyId: r(n),
|
|
21
|
+
withReimbursements: t,
|
|
22
|
+
ConfirmWireDetailsComponent: e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
17
25
|
}
|
|
18
|
-
function
|
|
19
|
-
const { companyId: n, payrollUuid: o, onEvent:
|
|
20
|
-
return /* @__PURE__ */
|
|
26
|
+
function A() {
|
|
27
|
+
const { companyId: n, payrollUuid: o, onEvent: t, withReimbursements: e } = i();
|
|
28
|
+
return /* @__PURE__ */ l(
|
|
21
29
|
c,
|
|
22
30
|
{
|
|
23
|
-
onEvent:
|
|
24
|
-
companyId:
|
|
25
|
-
payrollId:
|
|
31
|
+
onEvent: t,
|
|
32
|
+
companyId: r(n),
|
|
33
|
+
payrollId: r(o),
|
|
34
|
+
withReimbursements: e
|
|
26
35
|
}
|
|
27
36
|
);
|
|
28
37
|
}
|
|
29
|
-
function
|
|
30
|
-
const {
|
|
31
|
-
|
|
38
|
+
function D() {
|
|
39
|
+
const {
|
|
40
|
+
companyId: n,
|
|
41
|
+
payrollUuid: o,
|
|
42
|
+
onEvent: t,
|
|
43
|
+
alerts: e,
|
|
44
|
+
withReimbursements: m,
|
|
45
|
+
ConfirmWireDetailsComponent: a
|
|
46
|
+
} = i();
|
|
47
|
+
return /* @__PURE__ */ l(
|
|
32
48
|
y,
|
|
33
49
|
{
|
|
34
|
-
onEvent:
|
|
35
|
-
companyId:
|
|
36
|
-
payrollId:
|
|
37
|
-
alerts:
|
|
50
|
+
onEvent: t,
|
|
51
|
+
companyId: r(n),
|
|
52
|
+
payrollId: r(o),
|
|
53
|
+
alerts: e,
|
|
54
|
+
withReimbursements: m,
|
|
55
|
+
ConfirmWireDetailsComponent: a
|
|
38
56
|
}
|
|
39
57
|
);
|
|
40
58
|
}
|
|
41
|
-
function
|
|
42
|
-
const { companyId: n, payrollUuid: o, employeeId:
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
59
|
+
function F() {
|
|
60
|
+
const { companyId: n, payrollUuid: o, employeeId: t, onEvent: e, withReimbursements: m } = i();
|
|
61
|
+
return /* @__PURE__ */ l(
|
|
62
|
+
s,
|
|
45
63
|
{
|
|
46
|
-
onEvent:
|
|
47
|
-
companyId:
|
|
48
|
-
payrollId:
|
|
49
|
-
employeeId: t
|
|
64
|
+
onEvent: e,
|
|
65
|
+
companyId: r(n),
|
|
66
|
+
payrollId: r(o),
|
|
67
|
+
employeeId: r(t),
|
|
68
|
+
withReimbursements: m
|
|
50
69
|
}
|
|
51
70
|
);
|
|
52
71
|
}
|
|
53
|
-
function
|
|
54
|
-
const { payrollUuid: n, onEvent: o } =
|
|
55
|
-
return /* @__PURE__ */
|
|
72
|
+
function K() {
|
|
73
|
+
const { payrollUuid: n, onEvent: o, withReimbursements: t } = i();
|
|
74
|
+
return /* @__PURE__ */ l(
|
|
75
|
+
d,
|
|
76
|
+
{
|
|
77
|
+
onEvent: o,
|
|
78
|
+
payrollId: r(n),
|
|
79
|
+
withReimbursements: t
|
|
80
|
+
}
|
|
81
|
+
);
|
|
56
82
|
}
|
|
57
|
-
function
|
|
58
|
-
const { companyId: n, onEvent: o } =
|
|
59
|
-
return /* @__PURE__ */
|
|
83
|
+
function T() {
|
|
84
|
+
const { companyId: n, onEvent: o } = i();
|
|
85
|
+
return /* @__PURE__ */ l(f, { onEvent: o, companyId: r(n) });
|
|
60
86
|
}
|
|
61
|
-
function
|
|
62
|
-
const { onEvent: n, ctaConfig: o } =
|
|
63
|
-
|
|
64
|
-
const { t: m } =
|
|
65
|
-
return o?.labelKey ? /* @__PURE__ */
|
|
66
|
-
|
|
87
|
+
function _() {
|
|
88
|
+
const { onEvent: n, ctaConfig: o } = i(), { Button: t } = I(), e = o?.namespace || "common";
|
|
89
|
+
C([e]);
|
|
90
|
+
const { t: m } = p(e);
|
|
91
|
+
return o?.labelKey ? /* @__PURE__ */ l(
|
|
92
|
+
t,
|
|
67
93
|
{
|
|
68
94
|
onClick: () => {
|
|
69
95
|
n(v.PAYROLL_EXIT_FLOW);
|
|
@@ -74,12 +100,12 @@ function j() {
|
|
|
74
100
|
) : null;
|
|
75
101
|
}
|
|
76
102
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
103
|
+
T as PayrollBlockerContextual,
|
|
104
|
+
A as PayrollConfigurationContextual,
|
|
105
|
+
F as PayrollEditEmployeeContextual,
|
|
106
|
+
W as PayrollLandingContextual,
|
|
107
|
+
D as PayrollOverviewContextual,
|
|
108
|
+
K as PayrollReceiptsContextual,
|
|
109
|
+
_ as SaveAndExitCta
|
|
84
110
|
};
|
|
85
111
|
//# sourceMappingURL=PayrollFlowComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollFlow/PayrollFlowComponents.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype'\nimport { PayrollLanding } from '../PayrollLanding/PayrollLanding'\nimport { PayrollConfiguration } from '../PayrollConfiguration/PayrollConfiguration'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollEditEmployee } from '../PayrollEditEmployee/PayrollEditEmployee'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport { PayrollBlocker } from '../PayrollBlocker/PayrollBlocker'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { BreadcrumbTrail } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface PayrollFlowProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport type PayrollFlowAlert = {\n type: 'error' | 'info' | 'success'\n title: string\n content?: ReactNode\n onDismiss?: () => void\n}\n\nexport interface PayrollFlowContextInterface extends FlowContextInterface {\n companyId: string\n payrollUuid?: string\n employeeId?: string\n firstName?: string\n lastName?: string\n alerts?: PayrollFlowAlert[]\n breadcrumbs?: BreadcrumbTrail\n payPeriod?: PayrollPayPeriodType\n}\n\nexport function PayrollLandingContextual() {\n const { companyId, onEvent }
|
|
1
|
+
{"version":3,"file":"PayrollFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollFlow/PayrollFlowComponents.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { PayrollPayPeriodType } from '@gusto/embedded-api/models/components/payrollpayperiodtype'\nimport { PayrollLanding } from '../PayrollLanding/PayrollLanding'\nimport { PayrollConfiguration } from '../PayrollConfiguration/PayrollConfiguration'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollEditEmployee } from '../PayrollEditEmployee/PayrollEditEmployee'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport { PayrollBlocker } from '../PayrollBlocker/PayrollBlocker'\nimport type { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { BreadcrumbTrail } from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface PayrollFlowProps extends BaseComponentInterface {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport type PayrollFlowAlert = {\n type: 'error' | 'info' | 'success'\n title: string\n content?: ReactNode\n onDismiss?: () => void\n}\n\nexport interface PayrollFlowContextInterface extends FlowContextInterface {\n companyId: string\n payrollUuid?: string\n employeeId?: string\n firstName?: string\n lastName?: string\n alerts?: PayrollFlowAlert[]\n breadcrumbs?: BreadcrumbTrail\n payPeriod?: PayrollPayPeriodType\n withReimbursements: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport function PayrollLandingContextual() {\n const { companyId, onEvent, withReimbursements, ConfirmWireDetailsComponent } =\n useFlow<PayrollFlowContextInterface>()\n return (\n <PayrollLanding\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n\nexport function PayrollConfigurationContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements } =\n useFlow<PayrollFlowContextInterface>()\n return (\n <PayrollConfiguration\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollOverviewContextual() {\n const {\n companyId,\n payrollUuid,\n onEvent,\n alerts,\n withReimbursements,\n ConfirmWireDetailsComponent,\n } = useFlow<PayrollFlowContextInterface>()\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n alerts={alerts}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n\nexport function PayrollEditEmployeeContextual() {\n const { companyId, payrollUuid, employeeId, onEvent, withReimbursements } =\n useFlow<PayrollFlowContextInterface>()\n return (\n <PayrollEditEmployee\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n employeeId={ensureRequired(employeeId)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollReceiptsContextual() {\n const { payrollUuid, onEvent, withReimbursements } = useFlow<PayrollFlowContextInterface>()\n return (\n <PayrollReceipts\n onEvent={onEvent}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollBlockerContextual() {\n const { companyId, onEvent } = useFlow<PayrollFlowContextInterface>()\n return <PayrollBlocker onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function SaveAndExitCta() {\n const { onEvent, ctaConfig } = useFlow<PayrollFlowContextInterface>()\n const { Button } = useComponentContext()\n const namespace = ctaConfig?.namespace || 'common'\n useI18n([namespace])\n const { t } = useTranslation(namespace)\n\n if (!ctaConfig?.labelKey) return null\n\n return (\n <Button\n onClick={() => {\n onEvent(componentEvents.PAYROLL_EXIT_FLOW)\n }}\n variant=\"secondary\"\n >\n {t(ctaConfig.labelKey as never)}\n </Button>\n )\n}\n"],"names":["PayrollLandingContextual","companyId","onEvent","withReimbursements","ConfirmWireDetailsComponent","useFlow","jsx","PayrollLanding","ensureRequired","PayrollConfigurationContextual","payrollUuid","PayrollConfiguration","PayrollOverviewContextual","alerts","PayrollOverview","PayrollEditEmployeeContextual","employeeId","PayrollEditEmployee","PayrollReceiptsContextual","PayrollReceipts","PayrollBlockerContextual","PayrollBlocker","SaveAndExitCta","ctaConfig","Button","useComponentContext","namespace","useI18n","t","useTranslation","componentEvents"],"mappings":";;;;;;;;;;;;;AA4CO,SAASA,IAA2B;AACzC,QAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,oBAAAC,GAAoB,6BAAAC,EAAA,IAC9CC,EAAA;AACF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAL;AAAA,MACA,WAAWM,EAAeP,CAAS;AAAA,MACnC,oBAAAE;AAAA,MACA,6BAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASK,IAAiC;AAC/C,QAAM,EAAE,WAAAR,GAAW,aAAAS,GAAa,SAAAR,GAAS,oBAAAC,EAAA,IACvCE,EAAA;AACF,SACE,gBAAAC;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,SAAAT;AAAA,MACA,WAAWM,EAAeP,CAAS;AAAA,MACnC,WAAWO,EAAeE,CAAW;AAAA,MACrC,oBAAAP;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASS,IAA4B;AAC1C,QAAM;AAAA,IACJ,WAAAX;AAAA,IACA,aAAAS;AAAA,IACA,SAAAR;AAAA,IACA,QAAAW;AAAA,IACA,oBAAAV;AAAA,IACA,6BAAAC;AAAA,EAAA,IACEC,EAAA;AACJ,SACE,gBAAAC;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,SAAAZ;AAAA,MACA,WAAWM,EAAeP,CAAS;AAAA,MACnC,WAAWO,EAAeE,CAAW;AAAA,MACrC,QAAAG;AAAA,MACA,oBAAAV;AAAA,MACA,6BAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASW,IAAgC;AAC9C,QAAM,EAAE,WAAAd,GAAW,aAAAS,GAAa,YAAAM,GAAY,SAAAd,GAAS,oBAAAC,EAAA,IACnDE,EAAA;AACF,SACE,gBAAAC;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,SAAAf;AAAA,MACA,WAAWM,EAAeP,CAAS;AAAA,MACnC,WAAWO,EAAeE,CAAW;AAAA,MACrC,YAAYF,EAAeQ,CAAU;AAAA,MACrC,oBAAAb;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASe,IAA4B;AAC1C,QAAM,EAAE,aAAAR,GAAa,SAAAR,GAAS,oBAAAC,EAAA,IAAuBE,EAAA;AACrD,SACE,gBAAAC;AAAA,IAACa;AAAA,IAAA;AAAA,MACC,SAAAjB;AAAA,MACA,WAAWM,EAAeE,CAAW;AAAA,MACrC,oBAAAP;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASiB,IAA2B;AACzC,QAAM,EAAE,WAAAnB,GAAW,SAAAC,EAAA,IAAYG,EAAA;AAC/B,2BAAQgB,GAAA,EAAe,SAAAnB,GAAkB,WAAWM,EAAeP,CAAS,GAAG;AACjF;AAEO,SAASqB,IAAiB;AAC/B,QAAM,EAAE,SAAApB,GAAS,WAAAqB,EAAA,IAAclB,EAAA,GACzB,EAAE,QAAAmB,EAAA,IAAWC,EAAA,GACbC,IAAYH,GAAW,aAAa;AAC1C,EAAAI,EAAQ,CAACD,CAAS,CAAC;AACnB,QAAM,EAAE,GAAAE,EAAA,IAAMC,EAAeH,CAAS;AAEtC,SAAKH,GAAW,WAGd,gBAAAjB;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,SAAS,MAAM;AACb,QAAAtB,EAAQ4B,EAAgB,iBAAiB;AAAA,MAC3C;AAAA,MACA,SAAQ;AAAA,MAEP,UAAAF,EAAEL,EAAU,QAAiB;AAAA,IAAA;AAAA,EAAA,IATD;AAYnC;"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
|
|
1
2
|
import { PayrollLandingFlowProps } from './PayrollLandingFlowComponents';
|
|
2
3
|
import { BaseComponentInterface } from '../../Base/Base';
|
|
3
4
|
interface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
|
|
4
5
|
companyId: string;
|
|
6
|
+
withReimbursements?: boolean;
|
|
7
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
5
8
|
}
|
|
6
9
|
export declare function PayrollLanding(props: PayrollLandingProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function PayrollLandingFlow({ companyId, onEvent, dictionary }: PayrollLandingFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function PayrollLandingFlow({ companyId, onEvent, dictionary, withReimbursements, ConfirmWireDetailsComponent, }: PayrollLandingFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as e } from "react";
|
|
3
|
-
import { createMachine as
|
|
4
|
-
import { payrollLandingMachine as
|
|
5
|
-
import { PayrollLandingTabsContextual as
|
|
6
|
-
import { Flow as
|
|
7
|
-
import { BaseComponent as
|
|
8
|
-
import { useComponentDictionary as
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */ r(
|
|
3
|
+
import { createMachine as c } from "robot3";
|
|
4
|
+
import { payrollLandingMachine as p } from "./payrollLandingStateMachine.js";
|
|
5
|
+
import { PayrollLandingTabsContextual as f } from "./PayrollLandingFlowComponents.js";
|
|
6
|
+
import { Flow as u } from "../../Flow/Flow.js";
|
|
7
|
+
import { BaseComponent as y } from "../../Base/Base.js";
|
|
8
|
+
import { useComponentDictionary as d } from "../../../i18n/I18n.js";
|
|
9
|
+
function T(o) {
|
|
10
|
+
return /* @__PURE__ */ r(y, { ...o, children: /* @__PURE__ */ r(g, { ...o }) });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function g({
|
|
13
|
+
companyId: o,
|
|
14
|
+
onEvent: t,
|
|
15
|
+
dictionary: l,
|
|
16
|
+
withReimbursements: n = !0,
|
|
17
|
+
ConfirmWireDetailsComponent: a
|
|
18
|
+
}) {
|
|
19
|
+
d("Payroll.PayrollLanding", l);
|
|
20
|
+
const i = e(
|
|
21
|
+
() => c(
|
|
16
22
|
"tabs",
|
|
17
|
-
|
|
18
|
-
(
|
|
19
|
-
...
|
|
20
|
-
component:
|
|
23
|
+
p,
|
|
24
|
+
(m) => ({
|
|
25
|
+
...m,
|
|
26
|
+
component: f,
|
|
21
27
|
companyId: o,
|
|
22
|
-
selectedTab: "run-payroll"
|
|
28
|
+
selectedTab: "run-payroll",
|
|
29
|
+
withReimbursements: n,
|
|
30
|
+
ConfirmWireDetailsComponent: a
|
|
23
31
|
})
|
|
24
32
|
),
|
|
25
|
-
[o]
|
|
33
|
+
[o, n, a]
|
|
26
34
|
);
|
|
27
|
-
return /* @__PURE__ */ r(
|
|
35
|
+
return /* @__PURE__ */ r(u, { onEvent: t, machine: i });
|
|
28
36
|
}
|
|
29
37
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
T as PayrollLanding,
|
|
39
|
+
g as PayrollLandingFlow
|
|
32
40
|
};
|
|
33
41
|
//# sourceMappingURL=PayrollLanding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { payrollLandingMachine } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n}\n\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nexport function PayrollLandingFlow({
|
|
1
|
+
{"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport type { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport { payrollLandingMachine } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nexport function PayrollLandingFlow({\n companyId,\n onEvent,\n dictionary,\n withReimbursements = true,\n ConfirmWireDetailsComponent,\n}: PayrollLandingFlowProps) {\n useComponentDictionary('Payroll.PayrollLanding', dictionary)\n\n const machine = useMemo(\n () =>\n createMachine(\n 'tabs',\n payrollLandingMachine,\n (initialContext: PayrollLandingFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingTabsContextual,\n companyId,\n selectedTab: 'run-payroll',\n withReimbursements,\n ConfirmWireDetailsComponent,\n }),\n ),\n [companyId, withReimbursements, ConfirmWireDetailsComponent],\n )\n\n return <Flow onEvent={onEvent} machine={machine} />\n}\n"],"names":["PayrollLanding","props","jsx","BaseComponent","PayrollLandingFlow","companyId","onEvent","dictionary","withReimbursements","ConfirmWireDetailsComponent","useComponentDictionary","machine","useMemo","createMachine","payrollLandingMachine","initialContext","PayrollLandingTabsContextual","Flow"],"mappings":";;;;;;;;AAoBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAoB,GAAGH,GAAO,EAAA,CACjC;AAEJ;AAEO,SAASG,EAAmB;AAAA,EACjC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC,IAAqB;AAAA,EACrB,6BAAAC;AACF,GAA4B;AAC1B,EAAAC,EAAuB,0BAA0BH,CAAU;AAE3D,QAAMI,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAwD;AAAA,QACvD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAX;AAAA,QACA,aAAa;AAAA,QACb,oBAAAG;AAAA,QACA,6BAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACJ,GAAWG,GAAoBC,CAA2B;AAAA,EAAA;AAG7D,SAAO,gBAAAP,EAACe,GAAA,EAAK,SAAAX,GAAkB,SAAAK,EAAA,CAAkB;AACnD;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
|
|
1
2
|
import { BaseComponentInterface } from '../../Base/Base';
|
|
2
3
|
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
3
4
|
export interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
|
|
4
5
|
companyId: string;
|
|
6
|
+
withReimbursements?: boolean;
|
|
7
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
5
8
|
}
|
|
6
9
|
export interface PayrollLandingFlowContextInterface extends FlowContextInterface {
|
|
7
10
|
component: (() => React.JSX.Element) | null;
|
|
@@ -9,6 +12,8 @@ export interface PayrollLandingFlowContextInterface extends FlowContextInterface
|
|
|
9
12
|
payrollUuid?: string;
|
|
10
13
|
previousState?: 'tabs' | 'overview';
|
|
11
14
|
selectedTab?: string;
|
|
15
|
+
withReimbursements: boolean;
|
|
16
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
12
17
|
}
|
|
13
18
|
export declare function PayrollLandingTabsContextual(): import("react/jsx-runtime").JSX.Element;
|
|
14
19
|
export declare function PayrollLandingReceiptsContextual(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { PayrollHistory as
|
|
5
|
-
import { PayrollList as
|
|
6
|
-
import { PayrollOverview as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u } from "react";
|
|
3
|
+
import { useTranslation as d } from "react-i18next";
|
|
4
|
+
import { PayrollHistory as f } from "../PayrollHistory/PayrollHistory.js";
|
|
5
|
+
import { PayrollList as b } from "../PayrollList/PayrollList.js";
|
|
6
|
+
import { PayrollOverview as C } from "../PayrollOverview/PayrollOverview.js";
|
|
7
7
|
import { PayrollReceipts as P } from "../PayrollReceipts/PayrollReceipts.js";
|
|
8
8
|
import { ConfirmWireDetails as I } from "../ConfirmWireDetails/ConfirmWireDetails.js";
|
|
9
|
-
import { useFlow as
|
|
9
|
+
import { useFlow as m } from "../../Flow/useFlow.js";
|
|
10
10
|
import { useI18n as x } from "../../../i18n/I18n.js";
|
|
11
11
|
import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import { ensureRequired as n } from "../../../helpers/ensureRequired.js";
|
|
@@ -15,46 +15,56 @@ function U() {
|
|
|
15
15
|
const {
|
|
16
16
|
companyId: o,
|
|
17
17
|
onEvent: r,
|
|
18
|
-
selectedTab:
|
|
19
|
-
|
|
18
|
+
selectedTab: e = "run-payroll",
|
|
19
|
+
ConfirmWireDetailsComponent: l = I
|
|
20
|
+
} = m(), [a, s] = u(e), { Tabs: p } = g();
|
|
20
21
|
x("Payroll.PayrollLanding");
|
|
21
|
-
const { t:
|
|
22
|
+
const { t: i } = d("Payroll.PayrollLanding"), y = [
|
|
22
23
|
{
|
|
23
24
|
id: "run-payroll",
|
|
24
|
-
label:
|
|
25
|
-
content: /* @__PURE__ */ t(
|
|
25
|
+
label: i("tabs.runPayroll"),
|
|
26
|
+
content: /* @__PURE__ */ t(b, { companyId: n(o), onEvent: r })
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
id: "payroll-history",
|
|
29
|
-
label:
|
|
30
|
-
content: /* @__PURE__ */ t(
|
|
30
|
+
label: i("tabs.payrollHistory"),
|
|
31
|
+
content: /* @__PURE__ */ t(f, { companyId: n(o), onEvent: r })
|
|
31
32
|
}
|
|
32
33
|
];
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ t(
|
|
34
|
+
return /* @__PURE__ */ c(v, { flexDirection: "column", gap: 32, children: [
|
|
35
|
+
/* @__PURE__ */ t(l, { companyId: n(o), onEvent: r }),
|
|
35
36
|
/* @__PURE__ */ t(
|
|
36
37
|
p,
|
|
37
38
|
{
|
|
38
|
-
tabs:
|
|
39
|
-
selectedId:
|
|
40
|
-
onSelectionChange:
|
|
41
|
-
"aria-label":
|
|
39
|
+
tabs: y,
|
|
40
|
+
selectedId: a,
|
|
41
|
+
onSelectionChange: s,
|
|
42
|
+
"aria-label": i("aria.tabNavigation")
|
|
42
43
|
}
|
|
43
44
|
)
|
|
44
45
|
] });
|
|
45
46
|
}
|
|
46
47
|
function q() {
|
|
47
|
-
const { payrollUuid: o, onEvent: r } =
|
|
48
|
-
return /* @__PURE__ */ t(
|
|
48
|
+
const { payrollUuid: o, onEvent: r, withReimbursements: e } = m();
|
|
49
|
+
return /* @__PURE__ */ t(
|
|
50
|
+
P,
|
|
51
|
+
{
|
|
52
|
+
onEvent: r,
|
|
53
|
+
payrollId: n(o),
|
|
54
|
+
withReimbursements: e
|
|
55
|
+
}
|
|
56
|
+
);
|
|
49
57
|
}
|
|
50
58
|
function N() {
|
|
51
|
-
const { companyId: o, payrollUuid: r, onEvent: l } =
|
|
59
|
+
const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: l, ConfirmWireDetailsComponent: a } = m();
|
|
52
60
|
return /* @__PURE__ */ t(
|
|
53
|
-
|
|
61
|
+
C,
|
|
54
62
|
{
|
|
55
|
-
onEvent:
|
|
63
|
+
onEvent: e,
|
|
56
64
|
companyId: n(o),
|
|
57
|
-
payrollId: n(r)
|
|
65
|
+
payrollId: n(r),
|
|
66
|
+
withReimbursements: l,
|
|
67
|
+
ConfirmWireDetailsComponent: a
|
|
58
68
|
}
|
|
59
69
|
);
|
|
60
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport {
|
|
1
|
+
{"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport {\n ConfirmWireDetails,\n type ConfirmWireDetailsComponentType,\n} from '../ConfirmWireDetails/ConfirmWireDetails'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport { Flex } from '@/components/Common/Flex/Flex'\n\nexport interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport interface PayrollLandingFlowContextInterface extends FlowContextInterface {\n component: (() => React.JSX.Element) | null\n companyId: string\n payrollUuid?: string\n previousState?: 'tabs' | 'overview'\n selectedTab?: string\n withReimbursements: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport function PayrollLandingTabsContextual() {\n const {\n companyId,\n onEvent,\n selectedTab = 'run-payroll',\n ConfirmWireDetailsComponent = ConfirmWireDetails,\n } = useFlow<PayrollLandingFlowContextInterface>()\n const [currentTab, setCurrentTab] = useState(selectedTab)\n const { Tabs } = useComponentContext()\n\n useI18n('Payroll.PayrollLanding')\n const { t } = useTranslation('Payroll.PayrollLanding')\n\n const tabs = [\n {\n id: 'run-payroll',\n label: t('tabs.runPayroll'),\n content: <PayrollList companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n {\n id: 'payroll-history',\n label: t('tabs.payrollHistory'),\n content: <PayrollHistory companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <ConfirmWireDetailsComponent companyId={ensureRequired(companyId)} onEvent={onEvent} />\n <Tabs\n tabs={tabs}\n selectedId={currentTab}\n onSelectionChange={setCurrentTab}\n aria-label={t('aria.tabNavigation')}\n />\n </Flex>\n )\n}\n\nexport function PayrollLandingReceiptsContextual() {\n const { payrollUuid, onEvent, withReimbursements } = useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollReceipts\n onEvent={onEvent}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollLandingOverviewContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, ConfirmWireDetailsComponent } =\n useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n"],"names":["PayrollLandingTabsContextual","companyId","onEvent","selectedTab","ConfirmWireDetailsComponent","ConfirmWireDetails","useFlow","currentTab","setCurrentTab","useState","Tabs","useComponentContext","useI18n","t","useTranslation","tabs","jsx","PayrollList","ensureRequired","PayrollHistory","jsxs","Flex","PayrollLandingReceiptsContextual","payrollUuid","withReimbursements","PayrollReceipts","PayrollLandingOverviewContextual","PayrollOverview"],"mappings":";;;;;;;;;;;;;AAkCO,SAASA,IAA+B;AAC7C,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,6BAAAC,IAA8BC;AAAA,EAAA,IAC5BC,EAAA,GACE,CAACC,GAAYC,CAAa,IAAIC,EAASN,CAAW,GAClD,EAAE,MAAAO,EAAA,IAASC,EAAA;AAEjB,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAE/CC,IAAO;AAAA,IACX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOF,EAAE,iBAAiB;AAAA,MAC1B,SAAS,gBAAAG,EAACC,GAAA,EAAY,WAAWC,EAAejB,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,IAEhF;AAAA,MACE,IAAI;AAAA,MACJ,OAAOW,EAAE,qBAAqB;AAAA,MAC9B,SAAS,gBAAAG,EAACG,GAAA,EAAe,WAAWD,EAAejB,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,EACnF;AAGF,SACE,gBAAAkB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAL,EAACZ,GAAA,EAA4B,WAAWc,EAAejB,CAAS,GAAG,SAAAC,GAAkB;AAAA,IACrF,gBAAAc;AAAA,MAACN;AAAA,MAAA;AAAA,QACC,MAAAK;AAAA,QACA,YAAYR;AAAA,QACZ,mBAAmBC;AAAA,QACnB,cAAYK,EAAE,oBAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,GACF;AAEJ;AAEO,SAASS,IAAmC;AACjD,QAAM,EAAE,aAAAC,GAAa,SAAArB,GAAS,oBAAAsB,EAAA,IAAuBlB,EAAA;AAErD,SACE,gBAAAU;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,SAAAvB;AAAA,MACA,WAAWgB,EAAeK,CAAW;AAAA,MACrC,oBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASE,IAAmC;AACjD,QAAM,EAAE,WAAAzB,GAAW,aAAAsB,GAAa,SAAArB,GAAS,oBAAAsB,GAAoB,6BAAApB,EAAA,IAC3DE,EAAA;AAEF,SACE,gBAAAU;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,SAAAzB;AAAA,MACA,WAAWgB,EAAejB,CAAS;AAAA,MACnC,WAAWiB,EAAeK,CAAW;AAAA,MACrC,oBAAAC;AAAA,MACA,6BAAApB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { PayrollFlowAlert } from '../PayrollFlow/PayrollFlowComponents';
|
|
2
|
+
import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
|
|
2
3
|
import { BaseComponentInterface } from '../../Base';
|
|
3
4
|
interface PayrollOverviewProps extends BaseComponentInterface<'Payroll.PayrollOverview'> {
|
|
4
5
|
companyId: string;
|
|
5
6
|
payrollId: string;
|
|
6
7
|
alerts?: PayrollFlowAlert[];
|
|
8
|
+
withReimbursements?: boolean;
|
|
9
|
+
ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
|
|
7
10
|
}
|
|
8
11
|
export declare function PayrollOverview(props: PayrollOverviewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const Root: ({ companyId, payrollId, dictionary, onEvent, alerts, }: PayrollOverviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Root: ({ companyId, payrollId, dictionary, onEvent, alerts, withReimbursements, ConfirmWireDetailsComponent, }: PayrollOverviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export {};
|