@gusto/embedded-react-sdk 0.45.0 → 0.46.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataTable/DataTable.js +51 -50
  7. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  8. package/dist/components/Common/DataView/DataView.d.ts +1 -0
  9. package/dist/components/Common/DataView/DataView.js.map +1 -1
  10. package/dist/components/Common/DataView/useDataView.d.ts +8 -1
  11. package/dist/components/Common/DataView/useDataView.js +20 -17
  12. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +20 -4
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +20 -4
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +22 -6
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  19. package/dist/components/Company/BankAccount/BankAccountForm/context.js +20 -4
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +20 -4
  22. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  23. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +28 -12
  25. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  26. package/dist/components/Company/Industry/Context.js +23 -7
  27. package/dist/components/Company/Industry/Context.js.map +1 -1
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +20 -4
  29. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  30. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +20 -4
  31. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  32. package/dist/components/Company/OnboardingOverview/context.js +20 -4
  33. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  34. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  35. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +20 -4
  36. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  37. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +20 -4
  38. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  39. package/dist/components/Contractor/Address/useAddress.js +22 -6
  40. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  41. package/dist/components/Contractor/Profile/useContractorProfile.js +52 -42
  42. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  43. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
  44. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
  45. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
  46. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
  47. package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
  48. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.d.ts +11 -0
  49. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +85 -0
  50. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -0
  51. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js +8 -0
  52. package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  53. package/dist/components/Employee/Compensation/management/EditCompensation/index.d.ts +3 -0
  54. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
  55. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +81 -0
  56. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
  57. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
  58. package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
  59. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
  60. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
  61. package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
  62. package/dist/components/Employee/Compensation/management/index.d.ts +6 -0
  63. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
  64. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
  65. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
  66. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
  67. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
  68. package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
  69. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
  70. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
  71. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  72. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  74. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
  75. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +212 -187
  76. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  77. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  78. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
  79. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +22 -17
  80. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  81. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +12 -2
  82. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +115 -110
  83. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  84. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +8 -3
  85. package/dist/components/Employee/Dashboard/BasicDetailsView.js +108 -84
  86. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  87. package/dist/components/Employee/Dashboard/Dashboard.d.ts +2 -0
  88. package/dist/components/Employee/Dashboard/Dashboard.js +86 -68
  89. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  90. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +8 -4
  91. package/dist/components/Employee/Dashboard/DashboardComponents.js +147 -93
  92. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  93. package/dist/components/Employee/Dashboard/DocumentsView.js +18 -11
  94. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  95. package/dist/components/Employee/Dashboard/JobAndPayView.js +304 -264
  96. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  97. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +10 -0
  98. package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -0
  99. package/dist/components/Employee/Dashboard/TaxesView.d.ts +7 -2
  100. package/dist/components/Employee/Dashboard/TaxesView.js +68 -54
  101. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  102. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +152 -142
  103. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  104. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
  105. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +13 -12
  106. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
  107. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +12 -5
  108. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +21 -21
  109. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  110. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +13 -3
  111. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +53 -55
  112. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +10 -4
  114. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +10 -12
  115. package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +10 -3
  117. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +19 -14
  118. package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -1
  119. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  120. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  121. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +20 -4
  122. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  123. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  124. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
  125. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
  126. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
  127. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
  128. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
  129. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
  130. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
  131. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
  132. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
  133. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
  134. package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
  135. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
  136. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
  137. package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
  138. package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
  139. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  140. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
  141. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
  142. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
  143. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +86 -83
  144. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  145. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  146. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  147. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  148. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  149. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  150. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  151. package/dist/components/Employee/Taxes/useTaxes.js +20 -4
  152. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  153. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
  154. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
  155. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
  156. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +92 -89
  157. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  158. package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
  159. package/dist/components/Employee/exports/employeeManagement.js +18 -16
  160. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  161. package/dist/components/Employee/index.d.ts +2 -0
  162. package/dist/components/Employee/index.js +32 -30
  163. package/dist/components/Employee/index.js.map +1 -1
  164. package/dist/components/Flow/FlowHeader.js +34 -31
  165. package/dist/components/Flow/FlowHeader.js.map +1 -1
  166. package/dist/components/Flow/useFlow.d.ts +12 -0
  167. package/dist/components/Flow/useFlow.js.map +1 -1
  168. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +34 -26
  169. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  170. package/dist/components/Payroll/usePreparedPayrollData.js +36 -22
  171. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  172. package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
  173. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  174. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
  175. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  176. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +52 -40
  177. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  178. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
  179. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  180. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
  181. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  182. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
  183. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  184. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  185. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
  186. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  187. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  188. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -124
  189. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  190. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  191. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +72 -87
  192. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  193. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +1 -6
  194. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +160 -220
  195. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  196. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
  197. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +77 -54
  198. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  199. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
  200. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
  201. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  202. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
  203. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  204. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
  205. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
  206. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  207. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
  208. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +10 -10
  209. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
  210. package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
  211. package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
  212. package/dist/i18n/en/Employee.Compensation.json.js +68 -56
  213. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  214. package/dist/i18n/en/Employee.Dashboard.json.js +26 -24
  215. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  216. package/dist/i18n/en/Employee.DocumentManager.json.js +1 -1
  217. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
  218. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
  219. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
  220. package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
  221. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
  222. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
  223. package/dist/i18n/en/common.json.d.ts +21 -0
  224. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
  225. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  226. package/dist/partner-hook-utils/types.d.ts +4 -0
  227. package/dist/shared/constants.d.ts +4 -0
  228. package/dist/shared/constants.js +20 -18
  229. package/dist/shared/constants.js.map +1 -1
  230. package/dist/style.css +1 -1
  231. package/dist/types/i18next.d.ts +45 -11
  232. package/docs/reference/endpoint-inventory.json +24 -8
  233. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import "./types/i18next.d.ts"
2
+ export { EmployeeListFlow } from './EmployeeListFlow';
3
+ export type { EmployeeListFlowProps } from './EmployeeListFlowComponents';
@@ -1,12 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
+ import { SelectHookField as t } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
2
3
  import { NumberInputHookField as o } from "../../../../../partner-hook-utils/form/fields/NumberInputHookField.js";
3
- import { RadioGroupHookField as t } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
4
- import { SelectHookField as r } from "../../../../../partner-hook-utils/form/fields/SelectHookField.js";
4
+ import { RadioGroupHookField as r } from "../../../../../partner-hook-utils/form/fields/RadioGroupHookField.js";
5
5
  function d(n) {
6
- return /* @__PURE__ */ e(r, { ...n, name: "filingStatus" });
6
+ return /* @__PURE__ */ e(t, { ...n, name: "filingStatus" });
7
7
  }
8
8
  function a(n) {
9
- return /* @__PURE__ */ e(t, { ...n, name: "twoJobs" });
9
+ return /* @__PURE__ */ e(r, { ...n, name: "twoJobs" });
10
10
  }
11
11
  function f(n) {
12
12
  return /* @__PURE__ */ e(o, { ...n, name: "dependentsAmount", format: "currency", min: 0 });
@@ -1,20 +1,20 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { HomeAddressView as i } from "./HomeAddressView.js";
3
3
  import { useHomeAddressManagement as A, isUseHomeAddressManagementSuccess as H } from "./useHomeAddressManagement.js";
4
4
  import { BaseBoundaries as p, BaseLayout as m } from "../../../Base/Base.js";
5
- import { useI18n as l, useComponentDictionary as g } from "../../../../i18n/I18n.js";
5
+ import { useI18n as l, useComponentDictionary as c } from "../../../../i18n/I18n.js";
6
6
  import { componentEvents as a } from "../../../../shared/constants.js";
7
- function E({ employeeId: d, onEvent: o, dictionary: n }) {
8
- l(["Employee.HomeAddress.Management", "Employee.HomeAddress"]), g("Employee.HomeAddress.Management", n);
9
- const e = A({ employeeId: d, onEvent: o });
7
+ function g({ employeeId: d, onEvent: r, dictionary: n }) {
8
+ l(["Employee.HomeAddress.Management", "Employee.HomeAddress"]), c("Employee.HomeAddress.Management", n);
9
+ const e = A({ employeeId: d, onEvent: r });
10
10
  if (e.isLoading)
11
- return /* @__PURE__ */ r(m, { isLoading: !0, error: e.errorHandling.errors });
11
+ return /* @__PURE__ */ o(m, { isLoading: !0, error: e.errorHandling.errors });
12
12
  if (!H(e))
13
- return /* @__PURE__ */ r(m, { error: e.errorHandling.errors });
13
+ return /* @__PURE__ */ o(m, { error: e.errorHandling.errors });
14
14
  const t = (s) => {
15
- s.mode === "create" ? o(a.EMPLOYEE_HOME_ADDRESS_CREATED, s.data) : o(a.EMPLOYEE_HOME_ADDRESS_UPDATED, s.data);
15
+ s.mode === "create" ? r(a.EMPLOYEE_HOME_ADDRESS_CREATED, s.data) : r(a.EMPLOYEE_HOME_ADDRESS_UPDATED, s.data);
16
16
  };
17
- return /* @__PURE__ */ r(m, { error: e.errorHandling.errors, children: /* @__PURE__ */ r(
17
+ return /* @__PURE__ */ o(m, { error: e.errorHandling.errors, children: /* @__PURE__ */ o(
18
18
  i,
19
19
  {
20
20
  editHomeAddressForm: e.data.editHomeAddressForm,
@@ -25,20 +25,23 @@ function E({ employeeId: d, onEvent: o, dictionary: n }) {
25
25
  onEditAddressTargetChange: e.actions.setEditAddressTarget,
26
26
  onSaved: t,
27
27
  onConfirmDelete: e.actions.confirmDeleteHomeAddress,
28
+ onBack: () => {
29
+ r(a.CANCEL);
30
+ },
28
31
  isDeletePending: e.status.isDeletePending
29
32
  }
30
33
  ) });
31
34
  }
32
35
  function S({
33
36
  FallbackComponent: d,
34
- ...o
37
+ ...r
35
38
  }) {
36
- return /* @__PURE__ */ r(
39
+ return /* @__PURE__ */ o(
37
40
  p,
38
41
  {
39
42
  componentName: "Employee.HomeAddress.Management",
40
43
  FallbackComponent: d,
41
- children: /* @__PURE__ */ r(E, { ...o })
44
+ children: /* @__PURE__ */ o(g, { ...r })
42
45
  }
43
46
  );
44
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HomeAddress.js","sources":["../../../../../src/components/Employee/HomeAddress/management/HomeAddress.tsx"],"sourcesContent":["import type { EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { HomeAddressView } from './HomeAddressView'\nimport {\n isUseHomeAddressManagementSuccess,\n useHomeAddressManagement,\n} from './useHomeAddressManagement'\nimport {\n BaseBoundaries,\n BaseLayout,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { HookSubmitResult } from '@/partner-hook-utils/types'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface HomeAddressProps extends CommonComponentInterface<'Employee.HomeAddress.Management'> {\n employeeId: string\n onEvent: BaseComponentInterface['onEvent']\n}\n\nfunction HomeAddressRoot({ employeeId, onEvent, dictionary }: HomeAddressProps) {\n useI18n(['Employee.HomeAddress.Management', 'Employee.HomeAddress'])\n useComponentDictionary('Employee.HomeAddress.Management', dictionary)\n\n const management = useHomeAddressManagement({ employeeId, onEvent })\n\n if (management.isLoading) {\n return <BaseLayout isLoading error={management.errorHandling.errors} />\n }\n\n if (!isUseHomeAddressManagementSuccess(management)) {\n return <BaseLayout error={management.errorHandling.errors} />\n }\n\n const handleSaved = (result: HookSubmitResult<EmployeeAddress>) => {\n if (result.mode === 'create') {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS_CREATED, result.data)\n } else {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS_UPDATED, result.data)\n }\n }\n\n return (\n <BaseLayout error={management.errorHandling.errors}>\n <HomeAddressView\n editHomeAddressForm={management.data.editHomeAddressForm}\n createHomeAddressForm={management.data.createHomeAddressForm}\n employeeHomeAddresses={management.data.employeeHomeAddresses}\n employeeDisplayName={management.data.employeeDisplayName}\n editingHomeAddressUuid={management.data.editingHomeAddressUuid}\n onEditAddressTargetChange={management.actions.setEditAddressTarget}\n onSaved={handleSaved}\n onConfirmDelete={management.actions.confirmDeleteHomeAddress}\n isDeletePending={management.status.isDeletePending}\n />\n </BaseLayout>\n )\n}\n\nexport function HomeAddress({\n FallbackComponent,\n ...props\n}: HomeAddressProps & BaseComponentInterface) {\n return (\n <BaseBoundaries\n componentName=\"Employee.HomeAddress.Management\"\n FallbackComponent={FallbackComponent}\n >\n <HomeAddressRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["HomeAddressRoot","employeeId","onEvent","dictionary","useI18n","useComponentDictionary","management","useHomeAddressManagement","BaseLayout","isUseHomeAddressManagementSuccess","jsx","handleSaved","result","componentEvents","HomeAddressView","HomeAddress","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;AAqBA,SAASA,EAAgB,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,KAAgC;AAC9E,EAAAC,EAAQ,CAAC,mCAAmC,sBAAsB,CAAC,GACnEC,EAAuB,mCAAmCF,CAAU;AAEpE,QAAMG,IAAaC,EAAyB,EAAE,YAAAN,GAAY,SAAAC,GAAS;AAEnE,MAAII,EAAW;AACb,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAW,cAAc,QAAQ;AAGvE,MAAI,CAACG,EAAkCH,CAAU;AAC/C,WAAO,gBAAAI,EAACF,GAAA,EAAW,OAAOF,EAAW,cAAc,QAAQ;AAG7D,QAAMK,IAAc,CAACC,MAA8C;AACjE,IAAIA,EAAO,SAAS,WAClBV,EAAQW,EAAgB,+BAA+BD,EAAO,IAAI,IAElEV,EAAQW,EAAgB,+BAA+BD,EAAO,IAAI;AAAA,EAEtE;AAEA,SACE,gBAAAF,EAACF,GAAA,EAAW,OAAOF,EAAW,cAAc,QAC1C,UAAA,gBAAAI;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,qBAAqBR,EAAW,KAAK;AAAA,MACrC,uBAAuBA,EAAW,KAAK;AAAA,MACvC,uBAAuBA,EAAW,KAAK;AAAA,MACvC,qBAAqBA,EAAW,KAAK;AAAA,MACrC,wBAAwBA,EAAW,KAAK;AAAA,MACxC,2BAA2BA,EAAW,QAAQ;AAAA,MAC9C,SAASK;AAAA,MACT,iBAAiBL,EAAW,QAAQ;AAAA,MACpC,iBAAiBA,EAAW,OAAO;AAAA,IAAA;AAAA,EAAA,GAEvC;AAEJ;AAEO,SAASS,EAAY;AAAA,EAC1B,mBAAAC;AAAA,EACA,GAAGC;AACL,GAA8C;AAC5C,SACE,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAF;AAAA,MAEA,UAAA,gBAAAN,EAACV,GAAA,EAAiB,GAAGiB,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
1
+ {"version":3,"file":"HomeAddress.js","sources":["../../../../../src/components/Employee/HomeAddress/management/HomeAddress.tsx"],"sourcesContent":["import type { EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { HomeAddressView } from './HomeAddressView'\nimport {\n isUseHomeAddressManagementSuccess,\n useHomeAddressManagement,\n} from './useHomeAddressManagement'\nimport {\n BaseBoundaries,\n BaseLayout,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport type { HookSubmitResult } from '@/partner-hook-utils/types'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface HomeAddressProps extends CommonComponentInterface<'Employee.HomeAddress.Management'> {\n employeeId: string\n onEvent: BaseComponentInterface['onEvent']\n}\n\nfunction HomeAddressRoot({ employeeId, onEvent, dictionary }: HomeAddressProps) {\n useI18n(['Employee.HomeAddress.Management', 'Employee.HomeAddress'])\n useComponentDictionary('Employee.HomeAddress.Management', dictionary)\n\n const management = useHomeAddressManagement({ employeeId, onEvent })\n\n if (management.isLoading) {\n return <BaseLayout isLoading error={management.errorHandling.errors} />\n }\n\n if (!isUseHomeAddressManagementSuccess(management)) {\n return <BaseLayout error={management.errorHandling.errors} />\n }\n\n const handleSaved = (result: HookSubmitResult<EmployeeAddress>) => {\n if (result.mode === 'create') {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS_CREATED, result.data)\n } else {\n onEvent(componentEvents.EMPLOYEE_HOME_ADDRESS_UPDATED, result.data)\n }\n }\n\n return (\n <BaseLayout error={management.errorHandling.errors}>\n <HomeAddressView\n editHomeAddressForm={management.data.editHomeAddressForm}\n createHomeAddressForm={management.data.createHomeAddressForm}\n employeeHomeAddresses={management.data.employeeHomeAddresses}\n employeeDisplayName={management.data.employeeDisplayName}\n editingHomeAddressUuid={management.data.editingHomeAddressUuid}\n onEditAddressTargetChange={management.actions.setEditAddressTarget}\n onSaved={handleSaved}\n onConfirmDelete={management.actions.confirmDeleteHomeAddress}\n onBack={() => {\n onEvent(componentEvents.CANCEL)\n }}\n isDeletePending={management.status.isDeletePending}\n />\n </BaseLayout>\n )\n}\n\nexport function HomeAddress({\n FallbackComponent,\n ...props\n}: HomeAddressProps & BaseComponentInterface) {\n return (\n <BaseBoundaries\n componentName=\"Employee.HomeAddress.Management\"\n FallbackComponent={FallbackComponent}\n >\n <HomeAddressRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["HomeAddressRoot","employeeId","onEvent","dictionary","useI18n","useComponentDictionary","management","useHomeAddressManagement","BaseLayout","isUseHomeAddressManagementSuccess","jsx","handleSaved","result","componentEvents","HomeAddressView","HomeAddress","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;AAqBA,SAASA,EAAgB,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,KAAgC;AAC9E,EAAAC,EAAQ,CAAC,mCAAmC,sBAAsB,CAAC,GACnEC,EAAuB,mCAAmCF,CAAU;AAEpE,QAAMG,IAAaC,EAAyB,EAAE,YAAAN,GAAY,SAAAC,GAAS;AAEnE,MAAII,EAAW;AACb,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAW,cAAc,QAAQ;AAGvE,MAAI,CAACG,EAAkCH,CAAU;AAC/C,WAAO,gBAAAI,EAACF,GAAA,EAAW,OAAOF,EAAW,cAAc,QAAQ;AAG7D,QAAMK,IAAc,CAACC,MAA8C;AACjE,IAAIA,EAAO,SAAS,WAClBV,EAAQW,EAAgB,+BAA+BD,EAAO,IAAI,IAElEV,EAAQW,EAAgB,+BAA+BD,EAAO,IAAI;AAAA,EAEtE;AAEA,SACE,gBAAAF,EAACF,GAAA,EAAW,OAAOF,EAAW,cAAc,QAC1C,UAAA,gBAAAI;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,qBAAqBR,EAAW,KAAK;AAAA,MACrC,uBAAuBA,EAAW,KAAK;AAAA,MACvC,uBAAuBA,EAAW,KAAK;AAAA,MACvC,qBAAqBA,EAAW,KAAK;AAAA,MACrC,wBAAwBA,EAAW,KAAK;AAAA,MACxC,2BAA2BA,EAAW,QAAQ;AAAA,MAC9C,SAASK;AAAA,MACT,iBAAiBL,EAAW,QAAQ;AAAA,MACpC,QAAQ,MAAM;AACZ,QAAAJ,EAAQW,EAAgB,MAAM;AAAA,MAChC;AAAA,MACA,iBAAiBP,EAAW,OAAO;AAAA,IAAA;AAAA,EAAA,GAEvC;AAEJ;AAEO,SAASS,EAAY;AAAA,EAC1B,mBAAAC;AAAA,EACA,GAAGC;AACL,GAA8C;AAC5C,SACE,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,mBAAAF;AAAA,MAEA,UAAA,gBAAAN,EAACV,GAAA,EAAiB,GAAGiB,EAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
@@ -13,6 +13,7 @@ export interface HomeAddressViewProps {
13
13
  onEditAddressTargetChange: (homeAddressUuid: string | undefined) => void;
14
14
  onSaved: (result: HookSubmitResult<EmployeeAddress>) => void;
15
15
  onConfirmDelete: (homeAddressUuid: string) => Promise<boolean>;
16
+ onBack: () => void;
16
17
  isDeletePending?: boolean;
17
18
  }
18
- export declare function HomeAddressView({ editHomeAddressForm, createHomeAddressForm, employeeHomeAddresses, employeeDisplayName, editingHomeAddressUuid, onEditAddressTargetChange, onSaved, onConfirmDelete, isDeletePending, }: HomeAddressViewProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function HomeAddressView({ editHomeAddressForm, createHomeAddressForm, employeeHomeAddresses, employeeDisplayName, editingHomeAddressUuid, onEditAddressTargetChange, onSaved, onConfirmDelete, onBack, isDeletePending, }: HomeAddressViewProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,29 @@
1
1
  import { jsxs as r, jsx as e, Fragment as V } from "react/jsx-runtime";
2
- import { useState as I, useRef as Re, useLayoutEffect as ke, useMemo as A } from "react";
3
- import { useTranslation as O, Trans as w } from "react-i18next";
4
- import { useWatch as Te } from "react-hook-form";
5
- import { getPendingFutureHomeAddress as Pe, formatPendingHomeAddressLine as z } from "./getPendingFutureHomeAddress.js";
6
- import Ie from "../../../../assets/icons/house.svg.js";
7
- import Ae from "../../../../assets/icons/pencil.svg.js";
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
8
  import we from "../../../../assets/icons/trashcan.svg.js";
9
9
  import { HomeAddressErrorCodes as a } from "../../Profile/shared/useHomeAddressForm/homeAddressSchema.js";
10
10
  import { SDKFormProvider as Z } from "../../../../partner-hook-utils/form/SDKFormProvider.js";
11
- import { Flex as s, FlexItem as Le } from "../../../Common/Flex/Flex.js";
11
+ import { Flex as s, FlexItem as Fe } from "../../../Common/Flex/Flex.js";
12
12
  import { Grid as j } from "../../../Common/Grid/Grid.js";
13
- import { EmptyData as Fe } from "../../../Common/EmptyData/EmptyData.js";
13
+ import { EmptyData as Ue } from "../../../Common/EmptyData/EmptyData.js";
14
+ import { ActionsLayout as We } from "../../../Common/ActionsLayout/ActionsLayout.js";
14
15
  import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
15
- import { formatDateLongWithYear as E, normalizeToDate as Ue, addDays as We } from "../../../../helpers/dateFormatting.js";
16
+ import { formatDateLongWithYear as E, normalizeToDate as Be, addDays as He } from "../../../../helpers/dateFormatting.js";
16
17
  import { formatStreetForDisplay as K, getCityStateZip as $ } from "../../../../helpers/formattedStrings.js";
17
- import { HamburgerMenu as He } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
18
- import { useDataView as Be } from "../../../Common/DataView/useDataView.js";
19
- import { DataView as Qe } from "../../../Common/DataView/DataView.js";
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";
20
21
  function q({
21
22
  CourtesyWithholding: u,
22
23
  formHook: m,
23
24
  tHa: c
24
25
  }) {
25
- const y = Y(), { control: L } = m.form.hookFormInternals.formMethods, f = Te({ control: L, name: "courtesyWithholding" });
26
+ const y = Y(), { control: w } = m.form.hookFormInternals.formMethods, f = Pe({ control: w, name: "courtesyWithholding" });
26
27
  return /* @__PURE__ */ r(V, { children: [
27
28
  /* @__PURE__ */ e(
28
29
  u,
@@ -31,7 +32,7 @@ function q({
31
32
  description: /* @__PURE__ */ r(V, { children: [
32
33
  c("courtesyWithholdingDescription"),
33
34
  /* @__PURE__ */ e(
34
- w,
35
+ L,
35
36
  {
36
37
  t: c,
37
38
  i18nKey: "learnMoreCta",
@@ -43,22 +44,23 @@ function q({
43
44
  ] })
44
45
  }
45
46
  ),
46
- f ? /* @__PURE__ */ e(y.Alert, { label: c("withholdingTitle"), status: "warning", children: /* @__PURE__ */ e(w, { t: c, i18nKey: "withholdingNote" }) }) : null
47
+ f ? /* @__PURE__ */ e(y.Alert, { label: c("withholdingTitle"), status: "warning", children: /* @__PURE__ */ e(L, { t: c, i18nKey: "withholdingNote" }) }) : null
47
48
  ] });
48
49
  }
49
- function at({
50
+ function dt({
50
51
  editHomeAddressForm: u,
51
52
  createHomeAddressForm: m,
52
53
  employeeHomeAddresses: c,
53
54
  employeeDisplayName: y,
54
- editingHomeAddressUuid: L,
55
+ editingHomeAddressUuid: w,
55
56
  onEditAddressTargetChange: f,
56
57
  onSaved: G,
57
58
  onConfirmDelete: N,
58
- isDeletePending: _ = !1
59
+ onBack: _,
60
+ isDeletePending: J = !1
59
61
  }) {
60
- const { t } = O("Employee.HomeAddress.Management"), { t: o } = O("Employee.HomeAddress"), n = Y(), [l, C] = I(null), [h, S] = I(null), R = Re(null), [k, F] = I(void 0);
61
- ke(() => {
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
64
  if (!l) {
63
65
  F(void 0);
64
66
  return;
@@ -76,59 +78,59 @@ function at({
76
78
  const {
77
79
  data: { homeAddress: g },
78
80
  status: U,
79
- actions: { onSubmit: J },
80
- form: X
81
+ actions: { onSubmit: X },
82
+ form: ee
81
83
  } = u, p = c, {
82
84
  status: W,
83
- actions: { onSubmit: ee },
84
- form: te
85
+ actions: { onSubmit: te },
86
+ form: ie
85
87
  } = m, {
86
88
  Fields: {
87
- Street1: ie,
88
- Street2: ne,
89
- City: oe,
90
- State: re,
91
- Zip: ae,
92
- CourtesyWithholding: se
89
+ Street1: ne,
90
+ Street2: oe,
91
+ City: re,
92
+ State: ae,
93
+ Zip: se,
94
+ CourtesyWithholding: le
93
95
  }
94
- } = X, {
96
+ } = ee, {
95
97
  Fields: {
96
- Street1: le,
97
- Street2: de,
98
- City: ce,
99
- State: ue,
100
- Zip: me,
101
- CourtesyWithholding: fe,
102
- EffectiveDate: H
98
+ Street1: de,
99
+ Street2: ce,
100
+ City: ue,
101
+ State: me,
102
+ Zip: fe,
103
+ CourtesyWithholding: he,
104
+ EffectiveDate: B
103
105
  }
104
- } = te, B = {
106
+ } = ie, H = {
105
107
  [a.REQUIRED]: o("validations.zip"),
106
108
  [a.INVALID_ZIP]: o("validations.zip")
107
- }, he = {
109
+ }, ge = {
108
110
  [a.REQUIRED]: t("form.startDateRequired")
109
111
  }, M = A(
110
- () => Pe(p),
112
+ () => Ie(p),
111
113
  [p]
112
114
  ), Q = A(() => {
113
115
  if (!(!h || !p))
114
116
  return p.find((i) => i.uuid === h);
115
- }, [h, p]), ge = A(() => {
117
+ }, [h, p]), pe = A(() => {
116
118
  const i = y.trim();
117
119
  return i ? `${i}'s` : t("changePendingPossessiveFallback");
118
120
  }, [y, t]), b = [...p ?? []].sort((i, d) => {
119
121
  const v = i.effectiveDate?.toString() ?? "", D = d.effectiveDate?.toString() ?? "";
120
122
  return !v && !D ? 0 : v ? D ? v.localeCompare(D) : -1 : 1;
121
- }), pe = [...b.filter((i) => i.active !== !0)].reverse(), ve = (i) => {
122
- const d = b.findIndex((Ee) => Ee.uuid === i.uuid);
123
+ }), ve = [...b.filter((i) => i.active !== !0)].reverse(), De = (i) => {
124
+ const d = b.findIndex((Re) => Re.uuid === i.uuid);
123
125
  if (d === -1 || d >= b.length - 1) return "—";
124
126
  const v = b[d + 1]?.effectiveDate;
125
127
  if (!v) return "—";
126
- const D = Ue(v.toString());
128
+ const D = Be(v.toString());
127
129
  if (!D) return "—";
128
- const P = We(D, -1), Me = P.getFullYear(), be = String(P.getMonth() + 1).padStart(2, "0"), xe = String(P.getDate()).padStart(2, "0");
129
- return E(`${Me}-${be}-${xe}`);
130
- }, De = Be({
131
- data: pe,
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,
132
134
  columns: [
133
135
  {
134
136
  title: t("columns.address"),
@@ -143,11 +145,11 @@ function at({
143
145
  },
144
146
  {
145
147
  title: t("columns.endDate"),
146
- render: (i) => ve(i)
148
+ render: (i) => De(i)
147
149
  }
148
150
  ],
149
151
  itemMenu: (i) => /* @__PURE__ */ e(
150
- He,
152
+ Qe,
151
153
  {
152
154
  triggerLabel: t("rowMenuAriaLabel"),
153
155
  items: [
@@ -156,7 +158,7 @@ function at({
156
158
  onClick: () => {
157
159
  f(i.uuid), C("edit");
158
160
  },
159
- icon: /* @__PURE__ */ e(Ae, { "aria-hidden": !0 })
161
+ icon: /* @__PURE__ */ e(Le, { "aria-hidden": !0 })
160
162
  },
161
163
  {
162
164
  label: t("rowDelete"),
@@ -169,35 +171,35 @@ function at({
169
171
  }
170
172
  ),
171
173
  emptyState: () => /* @__PURE__ */ e("div", { "data-testid": "home-address-history-empty", children: /* @__PURE__ */ e(
172
- Fe,
174
+ Ue,
173
175
  {
174
- icon: /* @__PURE__ */ e(Ie, { "aria-hidden": !0 }),
176
+ icon: /* @__PURE__ */ e(Ae, { "aria-hidden": !0 }),
175
177
  title: t("historyEmptyTitle"),
176
178
  description: t("historyEmptyDescription")
177
179
  }
178
180
  ) })
179
181
  }), T = () => {
180
182
  C(null), f(void 0);
181
- }, ye = async () => {
183
+ }, Ce = async () => {
182
184
  if (!h)
183
185
  return;
184
186
  await N(h) && S(null);
185
187
  }, x = l === "edit" ? {
186
- onSubmit: J,
188
+ onSubmit: X,
187
189
  formMethods: u.form.hookFormInternals.formMethods,
188
190
  isPending: U.isPending
189
191
  } : l === "create" ? {
190
- onSubmit: ee,
192
+ onSubmit: te,
191
193
  formMethods: m.form.hookFormInternals.formMethods,
192
194
  isPending: W.isPending
193
- } : null, Ce = async () => {
195
+ } : null, Se = async () => {
194
196
  if (!x)
195
197
  return;
196
198
  const i = await x.onSubmit();
197
199
  i && G(i);
198
200
  const d = Object.keys(x.formMethods.formState.errors).length > 0;
199
201
  (i || !d) && T();
200
- }, Se = x?.isPending ?? !1;
202
+ }, Me = x?.isPending ?? !1;
201
203
  return /* @__PURE__ */ r(s, { flexDirection: "column", gap: 24, children: [
202
204
  /* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, alignItems: "flex-start", children: [
203
205
  /* @__PURE__ */ e(n.Heading, { as: "h1", styledAs: "h2", children: t("title") }),
@@ -236,7 +238,7 @@ function at({
236
238
  ),
237
239
  children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
238
240
  g ? /* @__PURE__ */ r(s, { flexDirection: "column", gap: 4, children: [
239
- /* @__PURE__ */ r(Le, { children: [
241
+ /* @__PURE__ */ r(Fe, { children: [
240
242
  /* @__PURE__ */ e(n.Text, { weight: "medium", children: K(g) }),
241
243
  /* @__PURE__ */ e(n.Text, { weight: "medium", children: $(g) })
242
244
  ] }),
@@ -245,7 +247,7 @@ function at({
245
247
  }) }) : null
246
248
  ] }) : /* @__PURE__ */ e(n.Text, { children: o("formTitle") }),
247
249
  M ? /* @__PURE__ */ e(n.Alert, { status: "warning", label: t("changePendingTitle"), children: /* @__PURE__ */ e(n.Text, { variant: "supporting", children: t("changePendingDescription", {
248
- possessiveLabel: ge,
250
+ possessiveLabel: pe,
249
251
  newAddress: z(M),
250
252
  effectiveDate: M.effectiveDate ? E(M.effectiveDate.toString()) : "—",
251
253
  interpolation: { escapeValue: !1 }
@@ -255,8 +257,9 @@ function at({
255
257
  ),
256
258
  /* @__PURE__ */ r(s, { flexDirection: "column", gap: 12, children: [
257
259
  /* @__PURE__ */ e(n.Heading, { as: "h2", styledAs: "h4", children: t("historySectionTitle") }),
258
- /* @__PURE__ */ e(Qe, { label: t("historySectionTitle"), ...De })
260
+ /* @__PURE__ */ e(Oe, { label: t("historySectionTitle"), ...ye })
259
261
  ] }),
262
+ /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(n.Button, { variant: "secondary", onClick: _, children: t("backCta") }) }),
260
263
  /* @__PURE__ */ e(
261
264
  n.Modal,
262
265
  {
@@ -280,9 +283,9 @@ function at({
280
283
  {
281
284
  variant: "primary",
282
285
  onClick: () => {
283
- Ce();
286
+ Se();
284
287
  },
285
- isLoading: Se,
288
+ isLoading: Me,
286
289
  children: t("submitCta")
287
290
  }
288
291
  )
@@ -302,7 +305,7 @@ function at({
302
305
  gap: 20,
303
306
  children: [
304
307
  /* @__PURE__ */ e(
305
- ie,
308
+ ne,
306
309
  {
307
310
  label: o("street1"),
308
311
  validationMessages: {
@@ -311,7 +314,7 @@ function at({
311
314
  }
312
315
  ),
313
316
  /* @__PURE__ */ e(
314
- ne,
317
+ oe,
315
318
  {
316
319
  label: o("street2"),
317
320
  validationMessages: {
@@ -320,7 +323,7 @@ function at({
320
323
  }
321
324
  ),
322
325
  /* @__PURE__ */ e(
323
- oe,
326
+ re,
324
327
  {
325
328
  label: o("city"),
326
329
  validationMessages: {
@@ -329,7 +332,7 @@ function at({
329
332
  }
330
333
  ),
331
334
  /* @__PURE__ */ e(
332
- re,
335
+ ae,
333
336
  {
334
337
  label: o("state"),
335
338
  validationMessages: {
@@ -338,11 +341,11 @@ function at({
338
341
  portalContainer: k
339
342
  }
340
343
  ),
341
- /* @__PURE__ */ e(ae, { label: o("zip"), validationMessages: B }),
344
+ /* @__PURE__ */ e(se, { label: o("zip"), validationMessages: H }),
342
345
  /* @__PURE__ */ e(
343
346
  q,
344
347
  {
345
- CourtesyWithholding: se,
348
+ CourtesyWithholding: le,
346
349
  formHook: u,
347
350
  tHa: o
348
351
  }
@@ -359,17 +362,17 @@ function at({
359
362
  },
360
363
  gap: 20,
361
364
  children: [
362
- H ? /* @__PURE__ */ e(
363
- H,
365
+ B ? /* @__PURE__ */ e(
366
+ B,
364
367
  {
365
368
  label: t("columns.startDate"),
366
369
  description: t("startDateHelper"),
367
- validationMessages: he,
370
+ validationMessages: ge,
368
371
  portalContainer: k
369
372
  }
370
373
  ) : null,
371
374
  /* @__PURE__ */ e(
372
- le,
375
+ de,
373
376
  {
374
377
  label: o("street1"),
375
378
  validationMessages: {
@@ -378,7 +381,7 @@ function at({
378
381
  }
379
382
  ),
380
383
  /* @__PURE__ */ e(
381
- de,
384
+ ce,
382
385
  {
383
386
  label: o("street2"),
384
387
  validationMessages: {
@@ -387,7 +390,7 @@ function at({
387
390
  }
388
391
  ),
389
392
  /* @__PURE__ */ e(
390
- ce,
393
+ ue,
391
394
  {
392
395
  label: o("city"),
393
396
  validationMessages: {
@@ -396,7 +399,7 @@ function at({
396
399
  }
397
400
  ),
398
401
  /* @__PURE__ */ e(
399
- ue,
402
+ me,
400
403
  {
401
404
  label: o("state"),
402
405
  validationMessages: {
@@ -405,11 +408,11 @@ function at({
405
408
  portalContainer: k
406
409
  }
407
410
  ),
408
- /* @__PURE__ */ e(me, { label: o("zip"), validationMessages: B }),
411
+ /* @__PURE__ */ e(fe, { label: o("zip"), validationMessages: H }),
409
412
  /* @__PURE__ */ e(
410
413
  q,
411
414
  {
412
- CourtesyWithholding: fe,
415
+ CourtesyWithholding: he,
413
416
  formHook: m,
414
417
  tHa: o
415
418
  }
@@ -444,9 +447,9 @@ function at({
444
447
  {
445
448
  variant: "error",
446
449
  onClick: () => {
447
- ye();
450
+ Ce();
448
451
  },
449
- isLoading: _,
452
+ isLoading: J,
450
453
  children: t("deleteModalConfirmCta")
451
454
  }
452
455
  )
@@ -454,7 +457,7 @@ function at({
454
457
  children: /* @__PURE__ */ r(s, { flexDirection: "column", gap: 16, children: [
455
458
  /* @__PURE__ */ e(n.Heading, { as: "h2", children: t("deleteModalTitle") }),
456
459
  /* @__PURE__ */ e(n.Text, { variant: "supporting", children: Q ? /* @__PURE__ */ e(
457
- w,
460
+ L,
458
461
  {
459
462
  t,
460
463
  i18nKey: "deleteModalDescription",
@@ -473,6 +476,6 @@ function at({
473
476
  ] });
474
477
  }
475
478
  export {
476
- at as HomeAddressView
479
+ dt as HomeAddressView
477
480
  };
478
481
  //# sourceMappingURL=HomeAddressView.js.map