@gusto/embedded-react-sdk 0.54.0 → 0.54.1

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 (168) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/Common/Loading/Loading.d.ts +6 -1
  3. package/dist/components/Common/Loading/Loading.js +13 -12
  4. package/dist/components/Common/Loading/Loading.js.map +1 -1
  5. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  6. package/dist/components/Common/PayrollLoading/PayrollLoading.js +1 -1
  7. package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -1
  8. package/dist/components/Common/UI/Alert/Alert.js +8 -8
  9. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  10. package/dist/components/Common/UI/Alert/Alert.module.scss.js +18 -16
  11. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  12. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  13. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  14. package/dist/components/Common/UI/Menu/Menu.js +19 -18
  15. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  16. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
  20. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
  22. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  23. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
  24. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  25. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  26. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  27. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
  28. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
  29. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  30. package/dist/components/Company/Industry/Context.js +6 -8
  31. package/dist/components/Company/Industry/Context.js.map +1 -1
  32. package/dist/components/Company/Industry/Industry.js +2 -2
  33. package/dist/components/Company/Industry/Industry.js.map +1 -1
  34. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
  35. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  36. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
  37. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  38. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +20 -19
  39. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  40. package/dist/components/Company/OnboardingOverview/context.js +3 -5
  41. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  42. package/dist/components/Company/PaySchedule/PaySchedule.js +20 -19
  43. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  44. package/dist/components/Company/PaySchedule/PayScheduleForm.js +29 -28
  45. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  46. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.d.ts +1 -1
  47. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
  48. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js.map +1 -1
  49. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js +24 -21
  50. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js.map +1 -1
  51. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +11 -11
  52. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  53. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
  54. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  55. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
  56. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  57. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js +14 -13
  58. package/dist/components/Company/StateTaxes/TaxRateManagement/TaxRateHistorySection.js.map +1 -1
  59. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -5
  60. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  61. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js +22 -21
  62. package/dist/components/Contractor/ContractorList/management/ManagementContractorListView.js.map +1 -1
  63. package/dist/components/Contractor/Documents/shared/SignatureForm/useContractorSignatureForm/fields.js +8 -8
  64. package/dist/components/Contractor/Landing/Landing.js +30 -29
  65. package/dist/components/Contractor/Landing/Landing.js.map +1 -1
  66. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js +18 -17
  67. package/dist/components/Contractor/OnboardingSummary/OnboardingSummary.js.map +1 -1
  68. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/fields.js +1 -1
  69. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.d.ts +41 -0
  70. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +175 -0
  71. package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -0
  72. package/dist/components/Contractor/Payments/CreateHistoricalPayment/index.d.ts +1 -0
  73. package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.d.ts +18 -0
  74. package/dist/components/Contractor/Payments/{HistoricalPaymentAmounts → CreateHistoricalPayment}/useFormDictionary.js +37 -7
  75. package/dist/components/Contractor/Payments/CreateHistoricalPayment/useFormDictionary.js.map +1 -0
  76. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.d.ts +30 -0
  77. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +56 -0
  78. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -0
  79. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/index.d.ts +1 -0
  80. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.d.ts +9 -0
  81. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js +33 -0
  82. package/dist/components/Contractor/Payments/HistoricalPaymentSummary/useFormDictionary.js.map +1 -0
  83. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +46 -131
  84. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  85. package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.d.ts +9 -0
  86. package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js +36 -0
  87. package/dist/components/Contractor/Payments/PaymentSummary/useFormDictionary.js.map +1 -0
  88. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.d.ts +83 -0
  89. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js +124 -0
  90. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/PaymentSummaryBlock.js.map +1 -0
  91. package/dist/components/Contractor/Payments/shared/PaymentSummaryBlock/index.d.ts +1 -0
  92. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/fields.js +16 -16
  93. package/dist/components/Contractor/exports/contractorManagement.d.ts +2 -2
  94. package/dist/components/Contractor/exports/contractorManagement.js +20 -20
  95. package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
  96. package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
  97. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
  98. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
  99. package/dist/components/Employee/Documents/management/DocumentManager.js +2 -1
  100. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -1
  101. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  102. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  103. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
  104. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  105. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
  106. package/dist/components/Employee/Landing/Landing.js +31 -30
  107. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  108. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +59 -58
  109. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  110. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  111. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  112. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
  113. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
  114. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
  115. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
  116. package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
  117. package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
  118. package/dist/components/Flow/Flow.js +27 -20
  119. package/dist/components/Flow/Flow.js.map +1 -1
  120. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +44 -44
  121. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  122. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +108 -108
  123. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  124. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
  125. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  126. package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
  127. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  128. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +23 -23
  129. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  130. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +4 -11
  131. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js +8 -8
  132. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
  133. package/dist/i18n/I18n.js +7 -7
  134. package/dist/i18n/I18n.js.map +1 -1
  135. package/dist/i18n/en/Company.PaySchedule.json.js +5 -5
  136. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  137. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +20 -18
  138. package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -1
  139. package/dist/i18n/en/Contractor.ManagementContractorList.json.js +46 -44
  140. package/dist/i18n/en/Contractor.ManagementContractorList.json.js.map +1 -1
  141. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js +36 -0
  142. package/dist/i18n/en/Contractor.Payments.CreateHistoricalPayment.json.js.map +1 -0
  143. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js +48 -0
  144. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentSummary.json.js.map +1 -0
  145. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +7 -7
  146. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +29 -27
  147. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  148. package/dist/i18n/types.d.ts +219 -105
  149. package/dist/shared/constants.d.ts +12 -4
  150. package/dist/shared/constants.js +23 -19
  151. package/dist/shared/constants.js.map +1 -1
  152. package/dist/style.css +1 -1
  153. package/docs/guides/endpoint-inventory.json +30 -1
  154. package/package.json +17 -16
  155. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.d.ts +0 -33
  156. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js +0 -62
  157. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/HistoricalPaymentAmounts.js.map +0 -1
  158. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/index.d.ts +0 -1
  159. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.d.ts +0 -9
  160. package/dist/components/Contractor/Payments/HistoricalPaymentAmounts/useFormDictionary.js.map +0 -1
  161. package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.d.ts +0 -27
  162. package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js +0 -56
  163. package/dist/components/Contractor/Payments/HistoricalPaymentContractors/HistoricalPaymentContractors.js.map +0 -1
  164. package/dist/components/Contractor/Payments/HistoricalPaymentContractors/index.d.ts +0 -1
  165. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js +0 -36
  166. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentAmounts.json.js.map +0 -1
  167. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js +0 -18
  168. package/dist/i18n/en/Contractor.Payments.HistoricalPaymentContractors.json.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { useForm as Re, useFieldArray as Oe, useWatch as Me, FormProvider as xe } from "react-hook-form";
3
- import { useRef as ve, useMemo as w, useState as G } from "react";
1
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { useForm as Re, useFieldArray as Oe, useWatch as Me, FormProvider as Ae } from "react-hook-form";
3
+ import { useRef as xe, useMemo as w, useState as G } from "react";
4
4
  import { PayrollEmployeeCompensationsTypePaymentMethod as _ } from "@gusto/embedded-api/models/components/payrollemployeecompensationstype";
5
- import { useTranslation as Ae } from "react-i18next";
5
+ import { useTranslation as ve } from "react-i18next";
6
6
  import { z as s } from "zod";
7
7
  import { zodResolver as Se } from "@hookform/resolvers/zod";
8
8
  import d from "./PayrollEditEmployeePresentation.module.scss.js";
9
9
  import { TimeOffField as De, PayoutTimeOffField as Ie } from "./TimeOffField.js";
10
- import { Flex as y } from "../../Common/Flex/Flex.js";
11
- import { Grid as x } from "../../Common/Grid/Grid.js";
10
+ import { Flex as N } from "../../Common/Flex/Flex.js";
11
+ import { Grid as A } from "../../Common/Grid/Grid.js";
12
12
  import { EmptyData as Fe } from "../../Common/EmptyData/EmptyData.js";
13
13
  import { useComponentContext as _e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
14
14
  import { useI18n as Le } from "../../../i18n/I18n.js";
@@ -16,7 +16,7 @@ import { Form as Ue } from "../../Common/Form/Form.js";
16
16
  import { formatNumberAsCurrency as re, firstLastName as ke } from "../../../helpers/formattedStrings.js";
17
17
  import { getAdditionalEarningsCompensations as je, calculateGrossPay as se } from "../helpers.js";
18
18
  import { PayrollCategory as S, isOffCyclePayroll as ue } from "../payrollTypes.js";
19
- import { COMPENSATION_NAME_REIMBURSEMENT as v, HOURS_COMPENSATION_NAMES as ae, EXCLUDED_ADDITIONAL_EARNINGS as we, COMPENSATION_NAME_DOUBLE_OVERTIME as Ge, COMPENSATION_NAME_OVERTIME as He, COMPENSATION_NAME_REGULAR_HOURS as $e, COMPENSATION_NAME_CASH_TIPS as Be, COMPENSATION_NAME_COMMISSION as Ve, COMPENSATION_NAME_CORRECTION_PAYMENT as qe, COMPENSATION_NAME_PAYCHECK_TIPS as ze, COMPENSATION_NAME_BONUS as We } from "../../../shared/constants.js";
19
+ import { COMPENSATION_NAME_REIMBURSEMENT as x, HOURS_COMPENSATION_NAMES as ae, EXCLUDED_ADDITIONAL_EARNINGS as we, COMPENSATION_NAME_DOUBLE_OVERTIME as Ge, COMPENSATION_NAME_OVERTIME as He, COMPENSATION_NAME_REGULAR_HOURS as $e, COMPENSATION_NAME_CASH_TIPS as Be, COMPENSATION_NAME_COMMISSION as Ve, COMPENSATION_NAME_CORRECTION_PAYMENT as qe, COMPENSATION_NAME_PAYCHECK_TIPS as ze, COMPENSATION_NAME_BONUS as We } from "../../../shared/constants.js";
20
20
  import Ye from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
21
21
  import oe from "../../../assets/icons/plus-circle.svg.js";
22
22
  import Ke from "../../../assets/icons/trashcan.svg.js";
@@ -36,12 +36,12 @@ const Je = s.object({
36
36
  fixedCompensations: s.record(s.string(), s.string().optional()),
37
37
  reimbursements: s.array(Je),
38
38
  paymentMethod: s.enum(_).optional()
39
- }), me = (f, A, c, o, D = S.Regular) => {
39
+ }), me = (f, v, c, o, D = S.Regular) => {
40
40
  const C = {
41
- ...A,
41
+ ...v,
42
42
  paymentMethod: f.paymentMethod
43
43
  };
44
- C.hourlyCompensations = A?.hourlyCompensations?.map(
44
+ C.hourlyCompensations = v?.hourlyCompensations?.map(
45
45
  (r) => {
46
46
  const m = r.jobUuid && r.name ? f.hourlyCompensations[r.jobUuid]?.[r.name] : void 0;
47
47
  return m ? {
@@ -66,9 +66,9 @@ const Je = s.object({
66
66
  });
67
67
  const P = !ue(D), E = [];
68
68
  return Object.entries(f.fixedCompensations).forEach(([r, m]) => {
69
- if (r.toLowerCase() === v.toLowerCase() && P)
69
+ if (r.toLowerCase() === x.toLowerCase() && P)
70
70
  return;
71
- const l = A?.fixedCompensations?.find(
71
+ const l = v?.fixedCompensations?.find(
72
72
  (R) => R.name?.toLowerCase() === r.toLowerCase()
73
73
  );
74
74
  m !== void 0 && m !== "" && (l ? E.push({
@@ -86,9 +86,9 @@ const Je = s.object({
86
86
  uuid: r.uuid ?? null,
87
87
  recurring: r.recurring
88
88
  })) : C.reimbursements = [], C;
89
- }, An = ({
89
+ }, vn = ({
90
90
  onSave: f,
91
- onCancel: A,
91
+ onCancel: v,
92
92
  employee: c,
93
93
  employeeCompensation: o,
94
94
  isPending: D = !1,
@@ -99,16 +99,16 @@ const Je = s.object({
99
99
  withReimbursements: m = !0,
100
100
  hasDirectDepositSetup: L = !0
101
101
  }) => {
102
- const { Button: l, ButtonIcon: R, Heading: p, Text: $, TextInput: B } = _e(), { t: n } = Ae("Payroll.PayrollEditEmployee");
102
+ const { Button: l, ButtonIcon: R, Heading: p, Text: $, TextInput: B } = _e(), { t: n } = ve("Payroll.PayrollEditEmployee");
103
103
  Le("Payroll.PayrollEditEmployee");
104
104
  const h = c.jobs?.find((e) => e.primary), le = o?.hourlyCompensations?.some(
105
105
  (e) => e.jobUuid === h?.uuid
106
- ), O = h && le ? [h] : [], V = ve(null), b = Ye({
106
+ ), O = h && le ? [h] : [], V = xe(null), b = Ye({
107
107
  ref: V
108
108
  }).includes("small");
109
109
  o?.hourlyCompensations?.forEach((e) => {
110
- const i = c.jobs?.find((u) => u.uuid === e.jobUuid);
111
- i && !O.find((u) => u.uuid === i.uuid) && O.push(i);
110
+ const t = c.jobs?.find((u) => u.uuid === e.jobUuid);
111
+ t && !O.find((u) => u.uuid === t.uuid) && O.push(t);
112
112
  });
113
113
  const T = (o?.paidTimeOff || []).filter((e) => e.name), U = je({
114
114
  flsaStatus: h?.compensations?.[0]?.flsaStatus,
@@ -121,11 +121,11 @@ const Je = s.object({
121
121
  [m, I, o?.reimbursements]
122
122
  ), ce = w(
123
123
  () => o?.fixedCompensations?.find(
124
- (e) => e.name?.toLowerCase() === v.toLowerCase()
124
+ (e) => e.name?.toLowerCase() === x.toLowerCase()
125
125
  ),
126
126
  [o?.fixedCompensations]
127
- ), q = m && !I && !!h?.uuid, z = (e, i) => o?.hourlyCompensations?.find(
128
- (u) => u.jobUuid === e && u.name?.toLowerCase() === i.toLowerCase()
127
+ ), q = m && !I && !!h?.uuid, z = (e, t) => o?.hourlyCompensations?.find(
128
+ (u) => u.jobUuid === e && u.name?.toLowerCase() === t.toLowerCase()
129
129
  ), pe = (e) => {
130
130
  switch (e) {
131
131
  case $e:
@@ -149,7 +149,7 @@ const Je = s.object({
149
149
  return n("fixedCompensationNames.commission");
150
150
  case Be:
151
151
  return n("fixedCompensationNames.cashTips");
152
- case v:
152
+ case x:
153
153
  return n("fixedCompensationNames.reimbursement");
154
154
  default:
155
155
  return e;
@@ -157,30 +157,30 @@ const Je = s.object({
157
157
  }, fe = {
158
158
  hourlyCompensations: (() => {
159
159
  const e = {};
160
- return O.forEach((i) => {
160
+ return O.forEach((t) => {
161
161
  ae.forEach((u) => {
162
- const M = z(i.uuid, u);
163
- M && (e[i.uuid] || (e[i.uuid] = {}), e[i.uuid][M.name] = M.hours ? parseFloat(M.hours).toString() : "");
162
+ const M = z(t.uuid, u);
163
+ M && (e[t.uuid] || (e[t.uuid] = {}), e[t.uuid][M.name] = M.hours ? parseFloat(M.hours).toString() : "");
164
164
  });
165
165
  }), e;
166
166
  })(),
167
167
  timeOffCompensations: (() => {
168
168
  const e = {};
169
- return T.forEach((i) => {
170
- e[i.name] = i.hours ? parseFloat(i.hours).toString() : "";
169
+ return T.forEach((t) => {
170
+ e[t.name] = t.hours ? parseFloat(t.hours).toString() : "";
171
171
  }), e;
172
172
  })(),
173
173
  finalPayoutCompensations: (() => {
174
174
  const e = {};
175
- return T.forEach((i) => {
176
- e[i.name] = i.finalPayoutUnusedHoursInput ?? "0";
175
+ return T.forEach((t) => {
176
+ e[t.name] = t.finalPayoutUnusedHoursInput ?? "0";
177
177
  }), e;
178
178
  })(),
179
179
  fixedCompensations: (() => {
180
180
  const e = {};
181
- return U.forEach((i) => {
182
- e[i.name] = i.amount ?? "";
183
- }), q && (e[v] = ce?.amount ?? "0.00"), e;
181
+ return U.forEach((t) => {
182
+ e[t.name] = t.amount ?? "";
183
+ }), q && (e[x] = ce?.amount ?? "0.00"), e;
184
184
  })(),
185
185
  reimbursements: de.map((e) => ({
186
186
  uuid: e.uuid ?? null,
@@ -201,19 +201,19 @@ const Je = s.object({
201
201
  control: F.control,
202
202
  name: "reimbursements"
203
203
  }), ge = (e) => {
204
- const i = Y[e];
205
- i && (i.uuid ? Ce(e, { ...i, amount: "0" }) : be(e));
206
- }, k = Y.map((e, i) => ({ ...e, originalIndex: i })).filter((e) => parseFloat(e.amount || "0") !== 0), [K, j] = G(!1), [X, Q] = G(""), [Z, J] = G(""), ee = () => {
204
+ const t = Y[e];
205
+ t && (t.uuid ? Ce(e, { ...t, amount: "0" }) : be(e));
206
+ }, k = Y.map((e, t) => ({ ...e, originalIndex: t })).filter((e) => parseFloat(e.amount || "0") !== 0), [K, j] = G(!1), [X, Q] = G(""), [Z, J] = G(""), ee = () => {
207
207
  j(!1), Q(""), J("");
208
- }, Ne = () => {
209
- const e = Z.trim(), i = parseFloat(e || "0");
210
- Number.isNaN(i) || i <= 0 || (he({
208
+ }, ye = () => {
209
+ const e = Z.trim(), t = parseFloat(e || "0");
210
+ Number.isNaN(t) || t <= 0 || (he({
211
211
  uuid: null,
212
212
  description: X.trim(),
213
- amount: i.toFixed(2),
213
+ amount: t.toFixed(2),
214
214
  recurring: !1
215
215
  }), ee());
216
- }, ye = Qe({
216
+ }, Ne = Qe({
217
217
  data: k,
218
218
  columns: [
219
219
  {
@@ -234,27 +234,27 @@ const Je = s.object({
234
234
  ],
235
235
  itemMenu: (e) => {
236
236
  if (e.recurring) return null;
237
- const i = e.description.trim() || n("reimbursementUnnamedFallback");
238
- return /* @__PURE__ */ t(
237
+ const t = e.description.trim() || n("reimbursementUnnamedFallback");
238
+ return /* @__PURE__ */ i(
239
239
  R,
240
240
  {
241
241
  variant: "tertiary",
242
242
  onClick: () => {
243
243
  ge(e.originalIndex);
244
244
  },
245
- "aria-label": n("removeReimbursementLabel", { description: i }),
246
- children: /* @__PURE__ */ t(Ke, { "aria-hidden": !0 })
245
+ "aria-label": n("removeReimbursementLabel", { description: t }),
246
+ children: /* @__PURE__ */ i(Ke, { "aria-hidden": !0 })
247
247
  }
248
248
  );
249
249
  },
250
- emptyState: () => /* @__PURE__ */ t(Fe, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ t(
250
+ emptyState: () => /* @__PURE__ */ i(Fe, { title: n("reimbursementEmptyTitle"), children: /* @__PURE__ */ i(
251
251
  l,
252
252
  {
253
253
  variant: "secondary",
254
254
  onClick: () => {
255
255
  j(!0);
256
256
  },
257
- icon: /* @__PURE__ */ t(oe, { "aria-hidden": !0 }),
257
+ icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
258
258
  children: n("addReimbursementCta")
259
259
  }
260
260
  ) })
@@ -263,25 +263,25 @@ const Je = s.object({
263
263
  }), Ee = w(() => {
264
264
  try {
265
265
  const e = {};
266
- g.hourlyCompensations && Object.entries(g.hourlyCompensations).forEach(([N, te]) => {
267
- te && (e[N] = te);
266
+ g.hourlyCompensations && Object.entries(g.hourlyCompensations).forEach(([y, ie]) => {
267
+ ie && (e[y] = ie);
268
268
  });
269
- const i = (g.reimbursements ?? []).map((N) => ({
270
- uuid: N.uuid ?? null,
271
- description: N.description ?? "",
272
- amount: N.amount ?? "0",
273
- recurring: N.recurring
269
+ const t = (g.reimbursements ?? []).map((y) => ({
270
+ uuid: y.uuid ?? null,
271
+ description: y.description ?? "",
272
+ amount: y.amount ?? "0",
273
+ recurring: y.recurring
274
274
  })), u = {
275
275
  hourlyCompensations: e,
276
276
  timeOffCompensations: g.timeOffCompensations || {},
277
277
  finalPayoutCompensations: g.finalPayoutCompensations || {},
278
278
  fixedCompensations: g.fixedCompensations || {},
279
- reimbursements: i,
279
+ reimbursements: t,
280
280
  paymentMethod: g.paymentMethod
281
281
  }, M = me(
282
282
  u,
283
283
  o,
284
- (o?.paidTimeOff || []).filter((N) => N.name),
284
+ (o?.paidTimeOff || []).filter((y) => y.name),
285
285
  h?.uuid,
286
286
  r
287
287
  );
@@ -313,24 +313,24 @@ const Je = s.object({
313
313
  first_name: c.firstName,
314
314
  last_name: c.lastName
315
315
  }), Pe = (e) => {
316
- const i = me(
316
+ const t = me(
317
317
  e,
318
318
  o,
319
319
  T,
320
320
  h?.uuid,
321
321
  r
322
322
  );
323
- f(i);
324
- }, ne = re(Ee || 0), ie = /* @__PURE__ */ a(
325
- y,
323
+ f(t);
324
+ }, ne = re(Ee || 0), te = /* @__PURE__ */ a(
325
+ N,
326
326
  {
327
327
  flexDirection: b ? "row" : "column",
328
328
  justifyContent: b ? "flex-end" : "normal",
329
329
  alignItems: b ? "flex-start" : "stretch",
330
330
  gap: 12,
331
331
  children: [
332
- /* @__PURE__ */ t(l, { variant: "secondary", onClick: A, title: n("cancelCta"), children: n("cancelCta") }),
333
- /* @__PURE__ */ t(
332
+ /* @__PURE__ */ i(l, { variant: "secondary", onClick: v, title: n("cancelCta"), children: n("cancelCta") }),
333
+ /* @__PURE__ */ i(
334
334
  l,
335
335
  {
336
336
  onClick: F.handleSubmit(Pe),
@@ -343,52 +343,52 @@ const Je = s.object({
343
343
  }
344
344
  );
345
345
  return /* @__PURE__ */ a("div", { ref: V, className: d.container, children: [
346
- /* @__PURE__ */ t(
346
+ /* @__PURE__ */ i(
347
347
  "div",
348
348
  {
349
349
  className: `${d.headerSection} ${b ? "" : d.headerSectionSticky}`,
350
- children: /* @__PURE__ */ a(y, { justifyContent: "space-between", children: [
351
- /* @__PURE__ */ a(y, { flexDirection: "column", gap: b ? 8 : 2, children: [
352
- /* @__PURE__ */ t(p, { as: "h1", styledAs: b ? "h2" : "h4", children: n("pageTitle", { employeeName: Te }) }),
353
- b ? /* @__PURE__ */ a(y, { flexDirection: "column", gap: 6, children: [
354
- /* @__PURE__ */ t(p, { as: "h2", styledAs: "h3", children: ne }),
355
- /* @__PURE__ */ t($, { className: d.grossPayLabel, children: n("grossPayLabel") })
356
- ] }) : /* @__PURE__ */ t(p, { as: "h2", styledAs: "h6", className: d.grossPayLabel, children: n("grossPayLabelMobile", { grossPay: ne }) })
350
+ children: /* @__PURE__ */ a(N, { justifyContent: "space-between", children: [
351
+ /* @__PURE__ */ a(N, { flexDirection: "column", gap: b ? 8 : 2, children: [
352
+ /* @__PURE__ */ i(p, { as: "h1", styledAs: b ? "h2" : "h4", children: n("pageTitle", { employeeName: Te }) }),
353
+ b ? /* @__PURE__ */ a(N, { flexDirection: "column", gap: 6, children: [
354
+ /* @__PURE__ */ i(p, { as: "h2", styledAs: "h3", children: ne }),
355
+ /* @__PURE__ */ i($, { className: d.grossPayLabel, children: n("grossPayLabel") })
356
+ ] }) : /* @__PURE__ */ i(p, { as: "h2", styledAs: "h6", className: d.grossPayLabel, children: n("grossPayLabelMobile", { grossPay: ne }) })
357
357
  ] }),
358
- b && ie
358
+ b && te
359
359
  ] })
360
360
  }
361
361
  ),
362
- /* @__PURE__ */ a(xe, { ...F, children: [
362
+ /* @__PURE__ */ a(Ae, { ...F, children: [
363
363
  /* @__PURE__ */ a(Ue, { children: [
364
364
  O.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
365
- /* @__PURE__ */ t(p, { as: "h3", children: n("regularHoursTitle") }),
366
- O.map((e) => /* @__PURE__ */ a(y, { flexDirection: "column", gap: 8, children: [
367
- O.length > 1 && /* @__PURE__ */ t(p, { as: "h4", children: e.title }),
368
- /* @__PURE__ */ t(x, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: ae.map((i) => {
365
+ /* @__PURE__ */ i(p, { as: "h3", children: n("regularHoursTitle") }),
366
+ O.map((e) => /* @__PURE__ */ a(N, { flexDirection: "column", gap: 8, children: [
367
+ O.length > 1 && /* @__PURE__ */ i(p, { as: "h4", children: e.title }),
368
+ /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: ae.map((t) => {
369
369
  const u = z(
370
370
  e.uuid,
371
- i
371
+ t
372
372
  );
373
373
  if (u)
374
- return /* @__PURE__ */ t(
374
+ return /* @__PURE__ */ i(
375
375
  H,
376
376
  {
377
377
  type: "number",
378
378
  min: 0,
379
379
  adornmentEnd: n("hoursUnit"),
380
380
  isRequired: !0,
381
- label: pe(i),
381
+ label: pe(t),
382
382
  name: `hourlyCompensations.${e.uuid}.${u.name}`
383
383
  },
384
- i
384
+ t
385
385
  );
386
386
  }) })
387
387
  ] }, e.uuid))
388
388
  ] }),
389
389
  T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
390
- /* @__PURE__ */ t(p, { as: "h4", children: r === S.Dismissal ? n("timeOffTitleDismissal") : n("timeOffTitle") }),
391
- /* @__PURE__ */ t(x, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ t(
390
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: r === S.Dismissal ? n("timeOffTitleDismissal") : n("timeOffTitle") }),
391
+ /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ i(
392
392
  De,
393
393
  {
394
394
  timeOff: e,
@@ -398,11 +398,11 @@ const Je = s.object({
398
398
  )) })
399
399
  ] }),
400
400
  r === S.Dismissal && T.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
401
- /* @__PURE__ */ a(y, { flexDirection: "column", gap: 4, children: [
402
- /* @__PURE__ */ t(p, { as: "h4", children: n("finalPayoutTitle") }),
403
- /* @__PURE__ */ t($, { variant: "supporting", children: n("finalPayoutDescription") })
401
+ /* @__PURE__ */ a(N, { flexDirection: "column", gap: 4, children: [
402
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("finalPayoutTitle") }),
403
+ /* @__PURE__ */ i($, { variant: "supporting", children: n("finalPayoutDescription") })
404
404
  ] }),
405
- /* @__PURE__ */ t(x, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ t(
405
+ /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: T.map((e) => /* @__PURE__ */ i(
406
406
  Ie,
407
407
  {
408
408
  timeOff: e,
@@ -412,13 +412,13 @@ const Je = s.object({
412
412
  )) })
413
413
  ] }),
414
414
  U.length > 0 && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
415
- /* @__PURE__ */ t(p, { as: "h4", children: n("additionalEarningsTitle") }),
416
- /* @__PURE__ */ t(
417
- x,
415
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("additionalEarningsTitle") }),
416
+ /* @__PURE__ */ i(
417
+ A,
418
418
  {
419
419
  gridTemplateColumns: { base: "1fr", small: [320, 320], large: [320, 320, 320] },
420
420
  gap: 20,
421
- children: U.map((e) => /* @__PURE__ */ t(
421
+ children: U.map((e) => /* @__PURE__ */ i(
422
422
  H,
423
423
  {
424
424
  type: "number",
@@ -434,25 +434,25 @@ const Je = s.object({
434
434
  )
435
435
  ] }),
436
436
  q && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
437
- /* @__PURE__ */ t(p, { as: "h4", children: n("reimbursementTitle") }),
438
- /* @__PURE__ */ t(x, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ t(
437
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
438
+ /* @__PURE__ */ i(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: /* @__PURE__ */ i(
439
439
  H,
440
440
  {
441
441
  type: "number",
442
442
  min: 0,
443
443
  adornmentStart: "$",
444
444
  isRequired: !0,
445
- label: W(v),
446
- name: `fixedCompensations.${v}`
445
+ label: W(x),
446
+ name: `fixedCompensations.${x}`
447
447
  }
448
448
  ) })
449
449
  ] }),
450
450
  m && I && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
451
- /* @__PURE__ */ t(p, { as: "h4", children: n("reimbursementTitle") }),
452
- !(k.length === 0 && K) && /* @__PURE__ */ t(Ze, { label: n("reimbursementsTableLabel"), ...ye }),
453
- K ? /* @__PURE__ */ a(y, { flexDirection: "column", gap: 12, children: [
454
- /* @__PURE__ */ a(x, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: [
455
- /* @__PURE__ */ t(
451
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("reimbursementTitle") }),
452
+ !(k.length === 0 && K) && /* @__PURE__ */ i(Ze, { label: n("reimbursementsTableLabel"), ...Ne }),
453
+ K ? /* @__PURE__ */ a(N, { flexDirection: "column", gap: 12, children: [
454
+ /* @__PURE__ */ a(A, { gridTemplateColumns: { base: "1fr", small: [320, 320] }, gap: 20, children: [
455
+ /* @__PURE__ */ i(
456
456
  B,
457
457
  {
458
458
  name: "newReimbursementDescription",
@@ -462,7 +462,7 @@ const Je = s.object({
462
462
  onChange: Q
463
463
  }
464
464
  ),
465
- /* @__PURE__ */ t(
465
+ /* @__PURE__ */ i(
466
466
  B,
467
467
  {
468
468
  name: "newReimbursementAmount",
@@ -476,11 +476,11 @@ const Je = s.object({
476
476
  }
477
477
  )
478
478
  ] }),
479
- /* @__PURE__ */ a(y, { gap: 12, children: [
480
- /* @__PURE__ */ t(l, { onClick: Ne, children: n("saveReimbursementCta") }),
481
- /* @__PURE__ */ t(l, { variant: "secondary", onClick: ee, children: n("cancelReimbursementCta") })
479
+ /* @__PURE__ */ a(N, { gap: 12, children: [
480
+ /* @__PURE__ */ i(l, { onClick: ye, children: n("saveReimbursementCta") }),
481
+ /* @__PURE__ */ i(l, { variant: "secondary", onClick: ee, children: n("cancelReimbursementCta") })
482
482
  ] })
483
- ] }) : k.length > 0 && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
483
+ ] }) : k.length > 0 && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
484
484
  l,
485
485
  {
486
486
  variant: "secondary",
@@ -488,14 +488,14 @@ const Je = s.object({
488
488
  j(!0);
489
489
  },
490
490
  title: n("addReimbursementLink"),
491
- icon: /* @__PURE__ */ t(oe, { "aria-hidden": !0 }),
491
+ icon: /* @__PURE__ */ i(oe, { "aria-hidden": !0 }),
492
492
  children: n("addReimbursementLink")
493
493
  }
494
494
  ) })
495
495
  ] }),
496
496
  L && /* @__PURE__ */ a("div", { className: d.fieldGroup, children: [
497
- /* @__PURE__ */ t(p, { as: "h4", children: n("paymentMethodTitle") }),
498
- /* @__PURE__ */ t(
497
+ /* @__PURE__ */ i(p, { as: "h3", styledAs: "h4", children: n("paymentMethodTitle") }),
498
+ /* @__PURE__ */ i(
499
499
  Xe,
500
500
  {
501
501
  name: "paymentMethod",
@@ -516,11 +516,11 @@ const Je = s.object({
516
516
  )
517
517
  ] })
518
518
  ] }),
519
- !b && ie
519
+ !b && te
520
520
  ] })
521
521
  ] });
522
522
  };
523
523
  export {
524
- An as PayrollEditEmployeePresentation
524
+ vn as PayrollEditEmployeePresentation
525
525
  };
526
526
  //# sourceMappingURL=PayrollEditEmployeePresentation.js.map