@gusto/embedded-react-sdk 0.46.2 → 0.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js +76 -72
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
- package/dist/components/Common/DataView/useDataView.d.ts +2 -0
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
- package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- 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/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- 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/shared/usePayScheduleForm/fields.js +5 -5
- 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 +33 -34
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +14 -11
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +0 -2
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +18 -18
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +140 -140
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +53 -51
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +383 -357
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +36 -36
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +157 -147
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +5 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +6 -7
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +52 -68
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -11
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +137 -163
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +36 -35
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/federalEin.d.ts +1 -0
- package/dist/helpers/federalEin.js.map +1 -1
- package/dist/helpers/mask.d.ts +8 -4
- package/dist/helpers/mask.js.map +1 -1
- package/dist/helpers/rem.d.ts +2 -1
- package/dist/helpers/rem.js.map +1 -1
- package/dist/hooks/useAsyncError.d.ts +1 -0
- package/dist/hooks/useAsyncError.js.map +1 -1
- package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
- package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
- package/dist/i18n/I18n.d.ts +9 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +12 -18
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +24 -24
- package/dist/i18n/en/Employee.Dashboard.json.js +22 -20
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
- package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/i18next.d.ts +4 -17
- package/dist/types/observability.d.ts +1 -1
- package/package.json +30 -27
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as
|
|
2
|
-
import { useState as I, useRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useWatch as
|
|
5
|
-
import { getPendingFutureHomeAddress as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useRef as Te, useLayoutEffect as Pe, useMemo as A } from "react";
|
|
3
|
+
import { useTranslation as Z, Trans as L } from "react-i18next";
|
|
4
|
+
import { useWatch as Ie } from "react-hook-form";
|
|
5
|
+
import { getPendingFutureHomeAddress as Ae, formatPendingHomeAddressLine as j } from "./getPendingFutureHomeAddress.js";
|
|
6
|
+
import Le from "../../../../assets/icons/house.svg.js";
|
|
7
|
+
import we from "../../../../assets/icons/pencil.svg.js";
|
|
8
|
+
import Fe from "../../../../assets/icons/trashcan.svg.js";
|
|
9
9
|
import { HomeAddressErrorCodes as a } from "../../Profile/shared/useHomeAddressForm/homeAddressSchema.js";
|
|
10
|
-
import { SDKFormProvider as
|
|
11
|
-
import { Flex as s, FlexItem as
|
|
12
|
-
import { Grid as
|
|
10
|
+
import { SDKFormProvider as K } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
|
|
11
|
+
import { Flex as s, FlexItem as He } from "../../../Common/Flex/Flex.js";
|
|
12
|
+
import { Grid as $ } from "../../../Common/Grid/Grid.js";
|
|
13
13
|
import { EmptyData as Ue } from "../../../Common/EmptyData/EmptyData.js";
|
|
14
14
|
import { ActionsLayout as We } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
15
|
-
import { useComponentContext as
|
|
16
|
-
import { formatDateLongWithYear as
|
|
17
|
-
import { formatStreetForDisplay as
|
|
15
|
+
import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
16
|
+
import { formatDateLongWithYear as x, normalizeToDate as Be, addDays as Ve } from "../../../../helpers/dateFormatting.js";
|
|
17
|
+
import { formatStreetForDisplay as q, getCityStateZip as Y } from "../../../../helpers/formattedStrings.js";
|
|
18
18
|
import { HamburgerMenu as Qe } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
19
|
-
import { useDataView as
|
|
20
|
-
import { DataView as
|
|
21
|
-
function
|
|
19
|
+
import { useDataView as Oe } from "../../../Common/DataView/useDataView.js";
|
|
20
|
+
import { DataView as ze } from "../../../Common/DataView/DataView.js";
|
|
21
|
+
function G({
|
|
22
22
|
CourtesyWithholding: u,
|
|
23
23
|
formHook: m,
|
|
24
|
-
tHa:
|
|
24
|
+
tHa: d
|
|
25
25
|
}) {
|
|
26
|
-
const y =
|
|
27
|
-
return /* @__PURE__ */ r(
|
|
26
|
+
const y = N(), { control: w } = m.form.hookFormInternals.formMethods, f = Ie({ control: w, name: "courtesyWithholding" });
|
|
27
|
+
return /* @__PURE__ */ r(z, { children: [
|
|
28
28
|
/* @__PURE__ */ e(
|
|
29
29
|
u,
|
|
30
30
|
{
|
|
31
|
-
label:
|
|
32
|
-
description: /* @__PURE__ */ r(
|
|
33
|
-
|
|
31
|
+
label: d("courtesyWithholdingLabel"),
|
|
32
|
+
description: /* @__PURE__ */ r(z, { children: [
|
|
33
|
+
d("courtesyWithholdingDescription"),
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
35
|
L,
|
|
36
36
|
{
|
|
37
|
-
t:
|
|
37
|
+
t: d,
|
|
38
38
|
i18nKey: "learnMoreCta",
|
|
39
39
|
components: {
|
|
40
40
|
LearnMoreLink: /* @__PURE__ */ e(y.Link, {})
|
|
@@ -44,108 +44,109 @@ function q({
|
|
|
44
44
|
] })
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
f ? /* @__PURE__ */ e(y.Alert, { label:
|
|
47
|
+
f ? /* @__PURE__ */ e(y.Alert, { label: d("withholdingTitle"), status: "warning", children: /* @__PURE__ */ e(L, { t: d, i18nKey: "withholdingNote" }) }) : null
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ct({
|
|
51
51
|
editHomeAddressForm: u,
|
|
52
52
|
createHomeAddressForm: m,
|
|
53
|
-
employeeHomeAddresses:
|
|
53
|
+
employeeHomeAddresses: d,
|
|
54
54
|
employeeDisplayName: y,
|
|
55
55
|
editingHomeAddressUuid: w,
|
|
56
56
|
onEditAddressTargetChange: f,
|
|
57
|
-
onSaved:
|
|
58
|
-
onConfirmDelete:
|
|
59
|
-
onBack:
|
|
60
|
-
isDeletePending:
|
|
57
|
+
onSaved: _,
|
|
58
|
+
onConfirmDelete: J,
|
|
59
|
+
onBack: X,
|
|
60
|
+
isDeletePending: ee = !1
|
|
61
61
|
}) {
|
|
62
|
-
const { t } =
|
|
63
|
-
|
|
62
|
+
const { t } = Z("Employee.HomeAddress.Management"), { t: o } = Z("Employee.HomeAddress"), n = N(), [l, C] = I(null), [h, S] = I(null), k = Te(null), [M, F] = I(void 0);
|
|
63
|
+
Pe(() => {
|
|
64
64
|
if (!l) {
|
|
65
65
|
F(void 0);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const i = () => {
|
|
69
|
-
F(
|
|
69
|
+
F(k.current ?? void 0);
|
|
70
70
|
};
|
|
71
|
-
if (i(),
|
|
72
|
-
const
|
|
71
|
+
if (i(), k.current == null) {
|
|
72
|
+
const c = requestAnimationFrame(i);
|
|
73
73
|
return () => {
|
|
74
|
-
cancelAnimationFrame(
|
|
74
|
+
cancelAnimationFrame(c);
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
}, [l]);
|
|
78
78
|
const {
|
|
79
|
-
data: { homeAddress:
|
|
80
|
-
status:
|
|
81
|
-
actions: { onSubmit: X },
|
|
82
|
-
form: ee
|
|
83
|
-
} = u, p = c, {
|
|
84
|
-
status: W,
|
|
79
|
+
data: { homeAddress: p },
|
|
80
|
+
status: H,
|
|
85
81
|
actions: { onSubmit: te },
|
|
86
82
|
form: ie
|
|
83
|
+
} = u, g = d, {
|
|
84
|
+
status: U,
|
|
85
|
+
actions: { onSubmit: ne },
|
|
86
|
+
form: oe
|
|
87
87
|
} = m, {
|
|
88
88
|
Fields: {
|
|
89
|
-
Street1:
|
|
90
|
-
Street2:
|
|
91
|
-
City:
|
|
92
|
-
State:
|
|
93
|
-
Zip:
|
|
94
|
-
CourtesyWithholding:
|
|
89
|
+
Street1: re,
|
|
90
|
+
Street2: ae,
|
|
91
|
+
City: se,
|
|
92
|
+
State: le,
|
|
93
|
+
Zip: de,
|
|
94
|
+
CourtesyWithholding: ce,
|
|
95
|
+
EffectiveDate: W
|
|
95
96
|
}
|
|
96
|
-
} =
|
|
97
|
+
} = ie, {
|
|
97
98
|
Fields: {
|
|
98
|
-
Street1:
|
|
99
|
-
Street2:
|
|
100
|
-
City:
|
|
101
|
-
State:
|
|
102
|
-
Zip:
|
|
103
|
-
CourtesyWithholding:
|
|
99
|
+
Street1: ue,
|
|
100
|
+
Street2: me,
|
|
101
|
+
City: fe,
|
|
102
|
+
State: he,
|
|
103
|
+
Zip: pe,
|
|
104
|
+
CourtesyWithholding: ge,
|
|
104
105
|
EffectiveDate: B
|
|
105
106
|
}
|
|
106
|
-
} =
|
|
107
|
+
} = oe, V = {
|
|
107
108
|
[a.REQUIRED]: o("validations.zip"),
|
|
108
109
|
[a.INVALID_ZIP]: o("validations.zip")
|
|
109
|
-
},
|
|
110
|
+
}, Q = {
|
|
110
111
|
[a.REQUIRED]: t("form.startDateRequired")
|
|
111
|
-
},
|
|
112
|
-
() =>
|
|
113
|
-
[
|
|
114
|
-
),
|
|
115
|
-
if (!(!h || !
|
|
116
|
-
return
|
|
117
|
-
}, [h,
|
|
112
|
+
}, b = A(
|
|
113
|
+
() => Ae(g),
|
|
114
|
+
[g]
|
|
115
|
+
), O = A(() => {
|
|
116
|
+
if (!(!h || !g))
|
|
117
|
+
return g.find((i) => i.uuid === h);
|
|
118
|
+
}, [h, g]), ve = A(() => {
|
|
118
119
|
const i = y.trim();
|
|
119
120
|
return i ? `${i}'s` : t("changePendingPossessiveFallback");
|
|
120
|
-
}, [y, t]),
|
|
121
|
-
const v = i.effectiveDate?.toString() ?? "", D =
|
|
121
|
+
}, [y, t]), E = [...g ?? []].sort((i, c) => {
|
|
122
|
+
const v = i.effectiveDate?.toString() ?? "", D = c.effectiveDate?.toString() ?? "";
|
|
122
123
|
return !v && !D ? 0 : v ? D ? v.localeCompare(D) : -1 : 1;
|
|
123
|
-
}),
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
const v =
|
|
124
|
+
}), De = [...E.filter((i) => i.active !== !0)].reverse(), ye = (i) => {
|
|
125
|
+
const c = E.findIndex((Re) => Re.uuid === i.uuid);
|
|
126
|
+
if (c === -1 || c >= E.length - 1) return "—";
|
|
127
|
+
const v = E[c + 1]?.effectiveDate;
|
|
127
128
|
if (!v) return "—";
|
|
128
129
|
const D = Be(v.toString());
|
|
129
130
|
if (!D) return "—";
|
|
130
|
-
const P =
|
|
131
|
-
return
|
|
132
|
-
},
|
|
133
|
-
data:
|
|
131
|
+
const P = Ve(D, -1), Ee = P.getFullYear(), xe = String(P.getMonth() + 1).padStart(2, "0"), ke = String(P.getDate()).padStart(2, "0");
|
|
132
|
+
return x(`${Ee}-${xe}-${ke}`);
|
|
133
|
+
}, Ce = Oe({
|
|
134
|
+
data: De,
|
|
134
135
|
columns: [
|
|
135
136
|
{
|
|
136
137
|
title: t("columns.address"),
|
|
137
138
|
render: (i) => /* @__PURE__ */ r(s, { flexDirection: "column", gap: 0, children: [
|
|
138
|
-
/* @__PURE__ */ e(n.Text, { weight: "medium", children:
|
|
139
|
-
/* @__PURE__ */ e(n.Text, { variant: "supporting", children:
|
|
139
|
+
/* @__PURE__ */ e(n.Text, { weight: "medium", children: q(i) }),
|
|
140
|
+
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: Y(i) })
|
|
140
141
|
] })
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
title: t("columns.startDate"),
|
|
144
|
-
render: (i) => i.effectiveDate ?
|
|
145
|
+
render: (i) => i.effectiveDate ? x(i.effectiveDate.toString()) : "—"
|
|
145
146
|
},
|
|
146
147
|
{
|
|
147
148
|
title: t("columns.endDate"),
|
|
148
|
-
render: (i) =>
|
|
149
|
+
render: (i) => ye(i)
|
|
149
150
|
}
|
|
150
151
|
],
|
|
151
152
|
itemMenu: (i) => /* @__PURE__ */ e(
|
|
@@ -158,14 +159,14 @@ function dt({
|
|
|
158
159
|
onClick: () => {
|
|
159
160
|
f(i.uuid), C("edit");
|
|
160
161
|
},
|
|
161
|
-
icon: /* @__PURE__ */ e(
|
|
162
|
+
icon: /* @__PURE__ */ e(we, { "aria-hidden": !0 })
|
|
162
163
|
},
|
|
163
164
|
{
|
|
164
165
|
label: t("rowDelete"),
|
|
165
166
|
onClick: () => {
|
|
166
167
|
i.active !== !0 && S(i.uuid);
|
|
167
168
|
},
|
|
168
|
-
icon: /* @__PURE__ */ e(
|
|
169
|
+
icon: /* @__PURE__ */ e(Fe, { "aria-hidden": !0 })
|
|
169
170
|
}
|
|
170
171
|
]
|
|
171
172
|
}
|
|
@@ -173,33 +174,33 @@ function dt({
|
|
|
173
174
|
emptyState: () => /* @__PURE__ */ e("div", { "data-testid": "home-address-history-empty", children: /* @__PURE__ */ e(
|
|
174
175
|
Ue,
|
|
175
176
|
{
|
|
176
|
-
icon: /* @__PURE__ */ e(
|
|
177
|
+
icon: /* @__PURE__ */ e(Le, { "aria-hidden": !0 }),
|
|
177
178
|
title: t("historyEmptyTitle"),
|
|
178
179
|
description: t("historyEmptyDescription")
|
|
179
180
|
}
|
|
180
181
|
) })
|
|
181
|
-
}),
|
|
182
|
-
C(null), f(void 0)
|
|
183
|
-
|
|
182
|
+
}), R = () => {
|
|
183
|
+
C(null), f(void 0), u.form.hookFormInternals.formMethods.reset(void 0, {
|
|
184
|
+
keepDirtyValues: !1
|
|
185
|
+
}), m.form.hookFormInternals.formMethods.reset(void 0, {
|
|
186
|
+
keepDirtyValues: !1
|
|
187
|
+
});
|
|
188
|
+
}, Se = async () => {
|
|
184
189
|
if (!h)
|
|
185
190
|
return;
|
|
186
|
-
await
|
|
187
|
-
},
|
|
188
|
-
onSubmit: X,
|
|
189
|
-
formMethods: u.form.hookFormInternals.formMethods,
|
|
190
|
-
isPending: U.isPending
|
|
191
|
-
} : l === "create" ? {
|
|
191
|
+
await J(h) && S(null);
|
|
192
|
+
}, T = l === "edit" ? {
|
|
192
193
|
onSubmit: te,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
isPending: H.isPending
|
|
195
|
+
} : l === "create" ? {
|
|
196
|
+
onSubmit: ne,
|
|
197
|
+
isPending: U.isPending
|
|
198
|
+
} : null, Me = async () => {
|
|
199
|
+
if (!T)
|
|
197
200
|
return;
|
|
198
|
-
const i = await
|
|
199
|
-
i &&
|
|
200
|
-
|
|
201
|
-
(i || !d) && T();
|
|
202
|
-
}, Me = x?.isPending ?? !1;
|
|
201
|
+
const i = await T.onSubmit();
|
|
202
|
+
i && (_(i), R());
|
|
203
|
+
}, be = T?.isPending ?? !1;
|
|
203
204
|
return /* @__PURE__ */ r(s, { flexDirection: "column", gap: 24, children: [
|
|
204
205
|
/* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, alignItems: "flex-start", children: [
|
|
205
206
|
/* @__PURE__ */ e(n.Heading, { as: "h1", styledAs: "h2", children: t("title") }),
|
|
@@ -212,14 +213,14 @@ function dt({
|
|
|
212
213
|
n.BoxHeader,
|
|
213
214
|
{
|
|
214
215
|
title: t("currentSectionTitle"),
|
|
215
|
-
action:
|
|
216
|
+
action: p ? /* @__PURE__ */ e(
|
|
216
217
|
n.Button,
|
|
217
218
|
{
|
|
218
219
|
variant: "secondary",
|
|
219
220
|
onClick: () => {
|
|
220
221
|
f(void 0), C("edit");
|
|
221
222
|
},
|
|
222
|
-
isLoading:
|
|
223
|
+
isLoading: H.isPending,
|
|
223
224
|
children: t("editCta")
|
|
224
225
|
}
|
|
225
226
|
) : void 0
|
|
@@ -232,24 +233,24 @@ function dt({
|
|
|
232
233
|
onClick: () => {
|
|
233
234
|
f(void 0), C("create");
|
|
234
235
|
},
|
|
235
|
-
isLoading:
|
|
236
|
+
isLoading: U.isPending,
|
|
236
237
|
children: t("changeCta")
|
|
237
238
|
}
|
|
238
239
|
),
|
|
239
240
|
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
|
|
240
|
-
|
|
241
|
-
/* @__PURE__ */ r(
|
|
242
|
-
/* @__PURE__ */ e(n.Text, { weight: "medium", children:
|
|
243
|
-
/* @__PURE__ */ e(n.Text, { weight: "medium", children:
|
|
241
|
+
p ? /* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, children: [
|
|
242
|
+
/* @__PURE__ */ r(He, { children: [
|
|
243
|
+
/* @__PURE__ */ e(n.Text, { weight: "medium", children: q(p) }),
|
|
244
|
+
/* @__PURE__ */ e(n.Text, { weight: "medium", children: Y(p) })
|
|
244
245
|
] }),
|
|
245
|
-
|
|
246
|
-
date:
|
|
246
|
+
p.effectiveDate ? /* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("currentSince", {
|
|
247
|
+
date: x(p.effectiveDate.toString())
|
|
247
248
|
}) }) : null
|
|
248
249
|
] }) : /* @__PURE__ */ e(n.Text, { children: o("formTitle") }),
|
|
249
|
-
|
|
250
|
-
possessiveLabel:
|
|
251
|
-
newAddress:
|
|
252
|
-
effectiveDate:
|
|
250
|
+
b ? /* @__PURE__ */ e(n.Alert, { status: "warning", label: t("changePendingTitle"), children: /* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("changePendingDescription", {
|
|
251
|
+
possessiveLabel: ve,
|
|
252
|
+
newAddress: j(b),
|
|
253
|
+
effectiveDate: b.effectiveDate ? x(b.effectiveDate.toString()) : "—",
|
|
253
254
|
interpolation: { escapeValue: !1 }
|
|
254
255
|
}) }) }) : null
|
|
255
256
|
] })
|
|
@@ -257,23 +258,23 @@ function dt({
|
|
|
257
258
|
),
|
|
258
259
|
/* @__PURE__ */ r(s, { flexDirection: "column", gap: 12, children: [
|
|
259
260
|
/* @__PURE__ */ e(n.Heading, { as: "h2", styledAs: "h4", children: t("historySectionTitle") }),
|
|
260
|
-
/* @__PURE__ */ e(
|
|
261
|
+
/* @__PURE__ */ e(ze, { label: t("historySectionTitle"), ...Ce })
|
|
261
262
|
] }),
|
|
262
|
-
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick:
|
|
263
|
+
/* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: X, children: t("backCta") }) }),
|
|
263
264
|
/* @__PURE__ */ e(
|
|
264
265
|
n.Modal,
|
|
265
266
|
{
|
|
266
267
|
isOpen: l !== null,
|
|
267
|
-
onClose:
|
|
268
|
+
onClose: R,
|
|
268
269
|
shouldCloseOnBackdropClick: !1,
|
|
269
|
-
containerRef:
|
|
270
|
+
containerRef: k,
|
|
270
271
|
footer: /* @__PURE__ */ r(s, { flexDirection: "row", gap: 12, justifyContent: "flex-end", children: [
|
|
271
272
|
/* @__PURE__ */ e(
|
|
272
273
|
n.Button,
|
|
273
274
|
{
|
|
274
275
|
variant: "secondary",
|
|
275
276
|
onClick: () => {
|
|
276
|
-
|
|
277
|
+
R();
|
|
277
278
|
},
|
|
278
279
|
children: t("cancelCta")
|
|
279
280
|
}
|
|
@@ -283,9 +284,9 @@ function dt({
|
|
|
283
284
|
{
|
|
284
285
|
variant: "primary",
|
|
285
286
|
onClick: () => {
|
|
286
|
-
|
|
287
|
+
Me();
|
|
287
288
|
},
|
|
288
|
-
isLoading:
|
|
289
|
+
isLoading: be,
|
|
289
290
|
children: t("submitCta")
|
|
290
291
|
}
|
|
291
292
|
)
|
|
@@ -295,8 +296,8 @@ function dt({
|
|
|
295
296
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t(l === "edit" ? "editModalTitle" : "createModalTitle") }),
|
|
296
297
|
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: t(l === "edit" ? "editModalDescription" : "createModalDescription") })
|
|
297
298
|
] }),
|
|
298
|
-
l === "edit" ? /* @__PURE__ */ e(
|
|
299
|
-
|
|
299
|
+
l === "edit" ? /* @__PURE__ */ e(K, { formHookResult: u, children: /* @__PURE__ */ r(
|
|
300
|
+
$,
|
|
300
301
|
{
|
|
301
302
|
gridTemplateColumns: {
|
|
302
303
|
base: "1fr",
|
|
@@ -304,8 +305,17 @@ function dt({
|
|
|
304
305
|
},
|
|
305
306
|
gap: 20,
|
|
306
307
|
children: [
|
|
308
|
+
W ? /* @__PURE__ */ e(
|
|
309
|
+
W,
|
|
310
|
+
{
|
|
311
|
+
label: t("columns.startDate"),
|
|
312
|
+
description: t("startDateHelper"),
|
|
313
|
+
validationMessages: Q,
|
|
314
|
+
portalContainer: M
|
|
315
|
+
}
|
|
316
|
+
) : null,
|
|
307
317
|
/* @__PURE__ */ e(
|
|
308
|
-
|
|
318
|
+
re,
|
|
309
319
|
{
|
|
310
320
|
label: o("street1"),
|
|
311
321
|
validationMessages: {
|
|
@@ -314,7 +324,7 @@ function dt({
|
|
|
314
324
|
}
|
|
315
325
|
),
|
|
316
326
|
/* @__PURE__ */ e(
|
|
317
|
-
|
|
327
|
+
ae,
|
|
318
328
|
{
|
|
319
329
|
label: o("street2"),
|
|
320
330
|
validationMessages: {
|
|
@@ -323,7 +333,7 @@ function dt({
|
|
|
323
333
|
}
|
|
324
334
|
),
|
|
325
335
|
/* @__PURE__ */ e(
|
|
326
|
-
|
|
336
|
+
se,
|
|
327
337
|
{
|
|
328
338
|
label: o("city"),
|
|
329
339
|
validationMessages: {
|
|
@@ -332,20 +342,20 @@ function dt({
|
|
|
332
342
|
}
|
|
333
343
|
),
|
|
334
344
|
/* @__PURE__ */ e(
|
|
335
|
-
|
|
345
|
+
le,
|
|
336
346
|
{
|
|
337
347
|
label: o("state"),
|
|
338
348
|
validationMessages: {
|
|
339
349
|
[a.REQUIRED]: o("validations.state")
|
|
340
350
|
},
|
|
341
|
-
portalContainer:
|
|
351
|
+
portalContainer: M
|
|
342
352
|
}
|
|
343
353
|
),
|
|
344
|
-
/* @__PURE__ */ e(
|
|
354
|
+
/* @__PURE__ */ e(de, { label: o("zip"), validationMessages: V }),
|
|
345
355
|
/* @__PURE__ */ e(
|
|
346
|
-
|
|
356
|
+
G,
|
|
347
357
|
{
|
|
348
|
-
CourtesyWithholding:
|
|
358
|
+
CourtesyWithholding: ce,
|
|
349
359
|
formHook: u,
|
|
350
360
|
tHa: o
|
|
351
361
|
}
|
|
@@ -353,8 +363,8 @@ function dt({
|
|
|
353
363
|
]
|
|
354
364
|
}
|
|
355
365
|
) }) : null,
|
|
356
|
-
l === "create" ? /* @__PURE__ */ e(
|
|
357
|
-
|
|
366
|
+
l === "create" ? /* @__PURE__ */ e(K, { formHookResult: m, children: /* @__PURE__ */ r(
|
|
367
|
+
$,
|
|
358
368
|
{
|
|
359
369
|
gridTemplateColumns: {
|
|
360
370
|
base: "1fr",
|
|
@@ -367,12 +377,12 @@ function dt({
|
|
|
367
377
|
{
|
|
368
378
|
label: t("columns.startDate"),
|
|
369
379
|
description: t("startDateHelper"),
|
|
370
|
-
validationMessages:
|
|
371
|
-
portalContainer:
|
|
380
|
+
validationMessages: Q,
|
|
381
|
+
portalContainer: M
|
|
372
382
|
}
|
|
373
383
|
) : null,
|
|
374
384
|
/* @__PURE__ */ e(
|
|
375
|
-
|
|
385
|
+
ue,
|
|
376
386
|
{
|
|
377
387
|
label: o("street1"),
|
|
378
388
|
validationMessages: {
|
|
@@ -381,7 +391,7 @@ function dt({
|
|
|
381
391
|
}
|
|
382
392
|
),
|
|
383
393
|
/* @__PURE__ */ e(
|
|
384
|
-
|
|
394
|
+
me,
|
|
385
395
|
{
|
|
386
396
|
label: o("street2"),
|
|
387
397
|
validationMessages: {
|
|
@@ -390,7 +400,7 @@ function dt({
|
|
|
390
400
|
}
|
|
391
401
|
),
|
|
392
402
|
/* @__PURE__ */ e(
|
|
393
|
-
|
|
403
|
+
fe,
|
|
394
404
|
{
|
|
395
405
|
label: o("city"),
|
|
396
406
|
validationMessages: {
|
|
@@ -399,20 +409,20 @@ function dt({
|
|
|
399
409
|
}
|
|
400
410
|
),
|
|
401
411
|
/* @__PURE__ */ e(
|
|
402
|
-
|
|
412
|
+
he,
|
|
403
413
|
{
|
|
404
414
|
label: o("state"),
|
|
405
415
|
validationMessages: {
|
|
406
416
|
[a.REQUIRED]: o("validations.state")
|
|
407
417
|
},
|
|
408
|
-
portalContainer:
|
|
418
|
+
portalContainer: M
|
|
409
419
|
}
|
|
410
420
|
),
|
|
411
|
-
/* @__PURE__ */ e(
|
|
421
|
+
/* @__PURE__ */ e(pe, { label: o("zip"), validationMessages: V }),
|
|
412
422
|
/* @__PURE__ */ e(
|
|
413
|
-
|
|
423
|
+
G,
|
|
414
424
|
{
|
|
415
|
-
CourtesyWithholding:
|
|
425
|
+
CourtesyWithholding: ge,
|
|
416
426
|
formHook: m,
|
|
417
427
|
tHa: o
|
|
418
428
|
}
|
|
@@ -447,22 +457,22 @@ function dt({
|
|
|
447
457
|
{
|
|
448
458
|
variant: "error",
|
|
449
459
|
onClick: () => {
|
|
450
|
-
|
|
460
|
+
Se();
|
|
451
461
|
},
|
|
452
|
-
isLoading:
|
|
462
|
+
isLoading: ee,
|
|
453
463
|
children: t("deleteModalConfirmCta")
|
|
454
464
|
}
|
|
455
465
|
)
|
|
456
466
|
] }),
|
|
457
467
|
children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
|
|
458
468
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: t("deleteModalTitle") }),
|
|
459
|
-
/* @__PURE__ */ e(n.Text, { variant: "supporting", children:
|
|
469
|
+
/* @__PURE__ */ e(n.Text, { variant: "supporting", children: O ? /* @__PURE__ */ e(
|
|
460
470
|
L,
|
|
461
471
|
{
|
|
462
472
|
t,
|
|
463
473
|
i18nKey: "deleteModalDescription",
|
|
464
474
|
values: {
|
|
465
|
-
address:
|
|
475
|
+
address: j(O)
|
|
466
476
|
},
|
|
467
477
|
components: {
|
|
468
478
|
strong: /* @__PURE__ */ e(n.Text, { weight: "medium", as: "span" })
|
|
@@ -476,6 +486,6 @@ function dt({
|
|
|
476
486
|
] });
|
|
477
487
|
}
|
|
478
488
|
export {
|
|
479
|
-
|
|
489
|
+
ct as HomeAddressView
|
|
480
490
|
};
|
|
481
491
|
//# sourceMappingURL=HomeAddressView.js.map
|