@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.
Files changed (172) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/components/Common/DataView/DataTable/DataTable.js +76 -72
  3. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  4. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
  5. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
  6. package/dist/components/Common/DataView/useDataView.d.ts +2 -0
  7. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
  9. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  10. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
  11. package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
  12. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  13. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
  14. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
  15. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
  16. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
  17. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  18. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  19. package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
  20. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  21. package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  22. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  28. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  29. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  30. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  31. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  32. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  33. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  34. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  35. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  36. package/dist/components/Company/Industry/Context.js +6 -7
  37. package/dist/components/Company/Industry/Context.js.map +1 -1
  38. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  39. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  40. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  41. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  42. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  43. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  44. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  46. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  48. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  49. package/dist/components/Contractor/Address/useAddress.js +5 -6
  50. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  51. package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
  52. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  53. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +14 -11
  54. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
  55. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +0 -2
  56. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -1
  57. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +18 -18
  58. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -1
  59. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
  60. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
  61. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  62. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +140 -140
  63. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  64. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  65. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
  66. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
  67. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  68. package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
  69. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  70. package/dist/components/Employee/Dashboard/Dashboard.js +53 -51
  71. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  72. package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
  73. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  74. package/dist/components/Employee/Dashboard/JobAndPayView.js +383 -357
  75. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  76. package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
  77. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  78. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +36 -36
  79. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  80. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
  81. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
  82. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
  83. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
  84. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
  85. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  86. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
  87. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
  88. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  89. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
  90. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
  91. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  92. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  93. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  94. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  95. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +157 -147
  96. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  97. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
  98. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
  99. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
  100. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
  101. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  102. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
  103. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  104. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
  105. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  106. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  107. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
  108. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
  109. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
  110. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
  111. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
  112. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
  113. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  114. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  115. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
  116. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
  117. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  118. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
  119. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  120. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  121. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  122. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  123. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +5 -1
  124. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  125. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
  126. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
  127. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  128. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  129. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  130. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  131. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +6 -7
  132. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  133. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  134. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +52 -68
  135. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  136. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
  137. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -11
  138. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +137 -163
  139. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  140. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +36 -35
  141. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  142. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
  143. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  144. package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
  145. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  146. package/dist/helpers/federalEin.d.ts +1 -0
  147. package/dist/helpers/federalEin.js.map +1 -1
  148. package/dist/helpers/mask.d.ts +8 -4
  149. package/dist/helpers/mask.js.map +1 -1
  150. package/dist/helpers/rem.d.ts +2 -1
  151. package/dist/helpers/rem.js.map +1 -1
  152. package/dist/hooks/useAsyncError.d.ts +1 -0
  153. package/dist/hooks/useAsyncError.js.map +1 -1
  154. package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
  155. package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
  156. package/dist/i18n/I18n.d.ts +9 -1
  157. package/dist/i18n/I18n.js.map +1 -1
  158. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
  159. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +12 -18
  160. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  161. package/dist/i18n/en/Employee.Compensation.json.js +24 -24
  162. package/dist/i18n/en/Employee.Dashboard.json.js +22 -20
  163. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  164. package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
  165. package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
  166. package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
  167. package/dist/style.css +1 -1
  168. package/dist/types/hooks.d.ts +1 -1
  169. package/dist/types/i18next.d.ts +4 -17
  170. package/dist/types/observability.d.ts +1 -1
  171. package/package.json +30 -27
  172. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
@@ -1,40 +1,40 @@
1
- import { jsxs as r, jsx as e, Fragment as V } from "react/jsx-runtime";
2
- import { useState as I, useRef as ke, useLayoutEffect as Te, useMemo as A } from "react";
3
- import { useTranslation as O, Trans as L } from "react-i18next";
4
- import { useWatch as Pe } from "react-hook-form";
5
- import { getPendingFutureHomeAddress as Ie, formatPendingHomeAddressLine as z } from "./getPendingFutureHomeAddress.js";
6
- import Ae from "../../../../assets/icons/house.svg.js";
7
- import Le from "../../../../assets/icons/pencil.svg.js";
8
- import we from "../../../../assets/icons/trashcan.svg.js";
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 Z } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
11
- import { Flex as s, FlexItem as Fe } from "../../../Common/Flex/Flex.js";
12
- import { Grid as j } from "../../../Common/Grid/Grid.js";
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 Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import { formatDateLongWithYear as E, normalizeToDate as Be, addDays as He } from "../../../../helpers/dateFormatting.js";
17
- import { formatStreetForDisplay as K, getCityStateZip as $ } from "../../../../helpers/formattedStrings.js";
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 Ve } from "../../../Common/DataView/useDataView.js";
20
- import { DataView as Oe } from "../../../Common/DataView/DataView.js";
21
- function q({
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: c
24
+ tHa: d
25
25
  }) {
26
- const y = Y(), { control: w } = m.form.hookFormInternals.formMethods, f = Pe({ control: w, name: "courtesyWithholding" });
27
- return /* @__PURE__ */ r(V, { children: [
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: c("courtesyWithholdingLabel"),
32
- description: /* @__PURE__ */ r(V, { children: [
33
- c("courtesyWithholdingDescription"),
31
+ label: d("courtesyWithholdingLabel"),
32
+ description: /* @__PURE__ */ r(z, { children: [
33
+ d("courtesyWithholdingDescription"),
34
34
  /* @__PURE__ */ e(
35
35
  L,
36
36
  {
37
- t: c,
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: c("withholdingTitle"), status: "warning", children: /* @__PURE__ */ e(L, { t: c, i18nKey: "withholdingNote" }) }) : null
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 dt({
50
+ function ct({
51
51
  editHomeAddressForm: u,
52
52
  createHomeAddressForm: m,
53
- employeeHomeAddresses: c,
53
+ employeeHomeAddresses: d,
54
54
  employeeDisplayName: y,
55
55
  editingHomeAddressUuid: w,
56
56
  onEditAddressTargetChange: f,
57
- onSaved: G,
58
- onConfirmDelete: N,
59
- onBack: _,
60
- isDeletePending: J = !1
57
+ onSaved: _,
58
+ onConfirmDelete: J,
59
+ onBack: X,
60
+ isDeletePending: ee = !1
61
61
  }) {
62
- const { t } = O("Employee.HomeAddress.Management"), { t: o } = O("Employee.HomeAddress"), n = Y(), [l, C] = I(null), [h, S] = I(null), R = ke(null), [k, F] = I(void 0);
63
- Te(() => {
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(R.current ?? void 0);
69
+ F(k.current ?? void 0);
70
70
  };
71
- if (i(), R.current == null) {
72
- const d = requestAnimationFrame(i);
71
+ if (i(), k.current == null) {
72
+ const c = requestAnimationFrame(i);
73
73
  return () => {
74
- cancelAnimationFrame(d);
74
+ cancelAnimationFrame(c);
75
75
  };
76
76
  }
77
77
  }, [l]);
78
78
  const {
79
- data: { homeAddress: g },
80
- status: U,
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: ne,
90
- Street2: oe,
91
- City: re,
92
- State: ae,
93
- Zip: se,
94
- CourtesyWithholding: le
89
+ Street1: re,
90
+ Street2: ae,
91
+ City: se,
92
+ State: le,
93
+ Zip: de,
94
+ CourtesyWithholding: ce,
95
+ EffectiveDate: W
95
96
  }
96
- } = ee, {
97
+ } = ie, {
97
98
  Fields: {
98
- Street1: de,
99
- Street2: ce,
100
- City: ue,
101
- State: me,
102
- Zip: fe,
103
- CourtesyWithholding: he,
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
- } = ie, H = {
107
+ } = oe, V = {
107
108
  [a.REQUIRED]: o("validations.zip"),
108
109
  [a.INVALID_ZIP]: o("validations.zip")
109
- }, ge = {
110
+ }, Q = {
110
111
  [a.REQUIRED]: t("form.startDateRequired")
111
- }, M = A(
112
- () => Ie(p),
113
- [p]
114
- ), Q = A(() => {
115
- if (!(!h || !p))
116
- return p.find((i) => i.uuid === h);
117
- }, [h, p]), pe = A(() => {
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]), b = [...p ?? []].sort((i, d) => {
121
- const v = i.effectiveDate?.toString() ?? "", D = d.effectiveDate?.toString() ?? "";
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
- }), ve = [...b.filter((i) => i.active !== !0)].reverse(), De = (i) => {
124
- const d = b.findIndex((Re) => Re.uuid === i.uuid);
125
- if (d === -1 || d >= b.length - 1) return "—";
126
- const v = b[d + 1]?.effectiveDate;
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 = He(D, -1), be = P.getFullYear(), xe = String(P.getMonth() + 1).padStart(2, "0"), Ee = String(P.getDate()).padStart(2, "0");
131
- return E(`${be}-${xe}-${Ee}`);
132
- }, ye = Ve({
133
- data: ve,
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: K(i) }),
139
- /* @__PURE__ */ e(n.Text, { variant: "supporting", children: $(i) })
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 ? E(i.effectiveDate.toString()) : "—"
145
+ render: (i) => i.effectiveDate ? x(i.effectiveDate.toString()) : "—"
145
146
  },
146
147
  {
147
148
  title: t("columns.endDate"),
148
- render: (i) => De(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(Le, { "aria-hidden": !0 })
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(we, { "aria-hidden": !0 })
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(Ae, { "aria-hidden": !0 }),
177
+ icon: /* @__PURE__ */ e(Le, { "aria-hidden": !0 }),
177
178
  title: t("historyEmptyTitle"),
178
179
  description: t("historyEmptyDescription")
179
180
  }
180
181
  ) })
181
- }), T = () => {
182
- C(null), f(void 0);
183
- }, Ce = async () => {
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 N(h) && S(null);
187
- }, x = l === "edit" ? {
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
- formMethods: m.form.hookFormInternals.formMethods,
194
- isPending: W.isPending
195
- } : null, Se = async () => {
196
- if (!x)
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 x.onSubmit();
199
- i && G(i);
200
- const d = Object.keys(x.formMethods.formState.errors).length > 0;
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: g ? /* @__PURE__ */ e(
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: U.isPending,
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: W.isPending,
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
- g ? /* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, children: [
241
- /* @__PURE__ */ r(Fe, { children: [
242
- /* @__PURE__ */ e(n.Text, { weight: "medium", children: K(g) }),
243
- /* @__PURE__ */ e(n.Text, { weight: "medium", children: $(g) })
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
- g.effectiveDate ? /* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("currentSince", {
246
- date: E(g.effectiveDate.toString())
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
- M ? /* @__PURE__ */ e(n.Alert, { status: "warning", label: t("changePendingTitle"), children: /* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("changePendingDescription", {
250
- possessiveLabel: pe,
251
- newAddress: z(M),
252
- effectiveDate: M.effectiveDate ? E(M.effectiveDate.toString()) : "—",
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(Oe, { label: t("historySectionTitle"), ...ye })
261
+ /* @__PURE__ */ e(ze, { label: t("historySectionTitle"), ...Ce })
261
262
  ] }),
262
- /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: _, children: t("backCta") }) }),
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: T,
268
+ onClose: R,
268
269
  shouldCloseOnBackdropClick: !1,
269
- containerRef: R,
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
- T();
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
- Se();
287
+ Me();
287
288
  },
288
- isLoading: Me,
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(Z, { formHookResult: u, children: /* @__PURE__ */ r(
299
- j,
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
- ne,
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
- oe,
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
- re,
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
- ae,
345
+ le,
336
346
  {
337
347
  label: o("state"),
338
348
  validationMessages: {
339
349
  [a.REQUIRED]: o("validations.state")
340
350
  },
341
- portalContainer: k
351
+ portalContainer: M
342
352
  }
343
353
  ),
344
- /* @__PURE__ */ e(se, { label: o("zip"), validationMessages: H }),
354
+ /* @__PURE__ */ e(de, { label: o("zip"), validationMessages: V }),
345
355
  /* @__PURE__ */ e(
346
- q,
356
+ G,
347
357
  {
348
- CourtesyWithholding: le,
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(Z, { formHookResult: m, children: /* @__PURE__ */ r(
357
- j,
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: ge,
371
- portalContainer: k
380
+ validationMessages: Q,
381
+ portalContainer: M
372
382
  }
373
383
  ) : null,
374
384
  /* @__PURE__ */ e(
375
- de,
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
- ce,
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
- ue,
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
- me,
412
+ he,
403
413
  {
404
414
  label: o("state"),
405
415
  validationMessages: {
406
416
  [a.REQUIRED]: o("validations.state")
407
417
  },
408
- portalContainer: k
418
+ portalContainer: M
409
419
  }
410
420
  ),
411
- /* @__PURE__ */ e(fe, { label: o("zip"), validationMessages: H }),
421
+ /* @__PURE__ */ e(pe, { label: o("zip"), validationMessages: V }),
412
422
  /* @__PURE__ */ e(
413
- q,
423
+ G,
414
424
  {
415
- CourtesyWithholding: he,
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
- Ce();
460
+ Se();
451
461
  },
452
- isLoading: J,
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: Q ? /* @__PURE__ */ e(
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: z(Q)
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
- dt as HomeAddressView
489
+ ct as HomeAddressView
480
490
  };
481
491
  //# sourceMappingURL=HomeAddressView.js.map