@gusto/embedded-react-sdk 0.14.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/assets/icons/feature-icon-check.svg.js +10 -0
  3. package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
  4. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  5. package/dist/components/Common/DataView/DataView.js +19 -18
  6. package/dist/components/Common/DataView/DataView.js.map +1 -1
  7. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +2 -0
  8. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +52 -0
  9. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -0
  10. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +44 -0
  11. package/dist/components/Common/FlowBreadcrumbs/index.d.ts +3 -0
  12. package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
  13. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  14. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
  15. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  16. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +38 -0
  17. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -0
  18. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +16 -0
  19. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js.map +1 -0
  20. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +27 -0
  21. package/dist/components/Common/UI/Breadcrumbs/index.d.ts +3 -0
  22. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  23. package/dist/components/Company/Locations/LocationsList/List.js +28 -26
  24. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  25. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
  26. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  27. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
  28. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  29. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +10 -10
  30. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  31. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +16 -10
  32. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  33. package/dist/components/Company/PaySchedule/_parts/Edit.js +6 -6
  34. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  35. package/dist/components/Contractor/ContractorList/index.js +59 -57
  36. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  37. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
  38. package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
  39. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  40. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +37 -37
  41. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  42. package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
  43. package/dist/components/Employee/EmployeeList/EmployeeList.js +11 -10
  44. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  45. package/dist/components/Employee/EmployeeList/List.js +45 -43
  46. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  47. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
  48. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  49. package/dist/components/Flow/Flow.js +44 -24
  50. package/dist/components/Flow/Flow.js.map +1 -1
  51. package/dist/components/Flow/useFlow.d.ts +10 -1
  52. package/dist/components/Flow/useFlow.js.map +1 -1
  53. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +1 -1
  54. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +16 -16
  55. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -1
  56. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +20 -20
  57. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  58. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +9 -9
  59. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  60. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +128 -94
  61. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  62. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  63. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +72 -76
  64. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  65. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +42 -42
  66. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  67. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
  68. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +20 -19
  69. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  70. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -3
  71. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +65 -45
  72. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  73. package/dist/components/Payroll/PayrollFlow/index.d.ts +1 -1
  74. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
  75. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +233 -96
  76. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  77. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
  78. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  79. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +12 -12
  80. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  81. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +8 -9
  82. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  83. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +83 -78
  84. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  85. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -2
  86. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +41 -45
  87. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  88. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -2
  89. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +118 -119
  90. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  91. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -2
  92. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +12 -26
  93. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  94. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -2
  95. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -44
  96. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  97. package/dist/components/Payroll/helpers.d.ts +2 -0
  98. package/dist/components/Payroll/helpers.js +38 -37
  99. package/dist/components/Payroll/helpers.js.map +1 -1
  100. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  101. package/dist/components/Payroll/usePreparedPayrollData.js +24 -18
  102. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  103. package/dist/components/index.d.ts +1 -1
  104. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +41 -39
  105. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  106. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  107. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  108. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  109. package/dist/helpers/breadcrumbHelpers.d.ts +33 -0
  110. package/dist/helpers/breadcrumbHelpers.js +46 -0
  111. package/dist/helpers/breadcrumbHelpers.js.map +1 -0
  112. package/dist/helpers/breadcrumbHelpers.test.d.ts +1 -0
  113. package/dist/i18n/I18n.d.ts +1 -1
  114. package/dist/i18n/I18n.js +32 -23
  115. package/dist/i18n/I18n.js.map +1 -1
  116. package/dist/i18n/en/Company.PaySchedule.json.js +2 -2
  117. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +28 -0
  118. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -0
  119. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +28 -24
  120. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
  121. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +28 -26
  122. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  123. package/dist/i18n/en/Payroll.PayrollFlow.json.js +8 -0
  124. package/dist/i18n/en/Payroll.PayrollFlow.json.js.map +1 -0
  125. package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
  126. package/dist/i18n/en/Payroll.PayrollLanding.json.js +2 -2
  127. package/dist/i18n/en/Payroll.PayrollOverview.json.js +60 -56
  128. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  129. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -12
  130. package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
  131. package/dist/index.js +1 -1
  132. package/dist/shared/constants.d.ts +3 -0
  133. package/dist/shared/constants.js +11 -9
  134. package/dist/shared/constants.js.map +1 -1
  135. package/dist/style.css +1 -1
  136. package/dist/types/i18next.d.ts +157 -150
  137. package/package.json +12 -12
  138. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
  139. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
  140. package/dist/i18n/en/Payroll.RunPayroll.json.js +0 -8
  141. package/dist/i18n/en/Payroll.RunPayroll.json.js.map +0 -1
  142. package/dist/i18n/en/PayrollBlocker.json.js +0 -24
  143. package/dist/i18n/en/PayrollBlocker.json.js.map +0 -1
@@ -1,82 +1,82 @@
1
- import { jsx as t, jsxs as s, Fragment as D } from "react/jsx-runtime";
2
- import { useTranslation as ne, Trans as ae } from "react-i18next";
1
+ import { jsx as t, jsxs as s, Fragment as x } from "react/jsx-runtime";
2
+ import { useTranslation as re, Trans as ne } from "react-i18next";
3
3
  import { useState as Y } from "react";
4
- import { Flex as d, FlexItem as j } from "../../Common/Flex/Flex.js";
4
+ import { calculateTotalPayroll as ae } from "../helpers.js";
5
+ import { Flex as c, FlexItem as W } from "../../Common/Flex/Flex.js";
5
6
  import "classnames";
6
- import { useComponentContext as ie } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- import { useI18n as le } from "../../../i18n/I18n.js";
7
+ import { useComponentContext as le } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import { useI18n as ie } from "../../../i18n/I18n.js";
8
9
  import { useLocale as oe } from "../../../contexts/LocaleProvider/useLocale.js";
9
10
  import { parseDateStringToLocal as y } from "../../../helpers/dateFormatting.js";
10
11
  import se from "../../Common/hooks/useNumberFormatter.js";
11
- import { firstLastName as S } from "../../../helpers/formattedStrings.js";
12
- import { PAYMENT_METHODS as de, FlsaStatus as W, compensationTypeLabels as P } from "../../../shared/constants.js";
12
+ import { firstLastName as O } from "../../../helpers/formattedStrings.js";
13
+ import { PAYMENT_METHODS as de, FlsaStatus as j, compensationTypeLabels as C } from "../../../shared/constants.js";
13
14
  import ce from "../../../assets/icons/download-cloud.svg.js";
14
15
  import { useLoadingIndicator as me } from "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
16
  import { DataView as b } from "../../Common/DataView/DataView.js";
16
17
  const ue = ({
17
18
  payPeriod: m,
18
- locale: g
19
+ locale: f
19
20
  }) => {
20
21
  if (m?.startDate && m.endDate) {
21
- const T = y(m.startDate), H = y(m.endDate);
22
- if (T && H) {
23
- const N = T.toLocaleDateString(g, {
22
+ const g = y(m.startDate), T = y(m.endDate);
23
+ if (g && T) {
24
+ const P = g.toLocaleDateString(f, {
24
25
  month: "long",
25
26
  day: "numeric"
26
- }), x = H.toLocaleDateString(g, {
27
+ }), L = T.toLocaleDateString(f, {
27
28
  month: "short",
28
29
  day: "numeric",
29
30
  year: "numeric"
30
31
  });
31
- return { startDate: N, endDate: x };
32
+ return { startDate: P, endDate: L };
32
33
  }
33
34
  }
34
35
  return { startDate: "", endDate: "" };
35
- }, we = ({
36
+ }, Ee = ({
36
37
  onEdit: m,
37
- onSubmit: g,
38
- onCancel: T,
39
- onPayrollReceipt: H,
40
- onPaystubDownload: N,
41
- onBack: x,
42
- employeeDetails: G,
43
- payrollData: i,
44
- bankAccount: X,
45
- taxes: k,
38
+ onSubmit: f,
39
+ onCancel: g,
40
+ onPayrollReceipt: T,
41
+ onPaystubDownload: P,
42
+ employeeDetails: L,
43
+ payrollData: l,
44
+ bankAccount: G,
45
+ taxes: N,
46
46
  isSubmitting: h = !1,
47
- isProcessed: L,
48
- alerts: O
47
+ isProcessed: k,
48
+ alerts: w
49
49
  }) => {
50
- const { Alert: M, Button: p, ButtonIcon: $, Dialog: z, Heading: w, Text: n, Tabs: K, LoadingSpinner: Z } = ie();
51
- le("Payroll.PayrollOverview");
52
- const { locale: u } = oe(), { t: r } = ne("Payroll.PayrollOverview"), o = se("currency"), [q, J] = Y("companyPays"), [U, A] = Y(!1), { LoadingIndicator: Q } = me(), V = i.totals ? Number(i.totals.grossPay ?? 0) + Number(i.totals.employerTaxes ?? 0) + Number(i.totals.reimbursements ?? 0) + Number(i.totals.benefits ?? 0) : 0, ee = i.payrollStatusMeta?.expectedDebitTime ? y(i.payrollStatusMeta.expectedDebitTime) : i.payrollDeadline, _ = (e) => e.taxes?.reduce(
53
- (a, l) => l.employer ? a + l.amount : a,
50
+ const { Alert: M, Button: H, ButtonIcon: X, Dialog: $, Heading: E, Text: n, Tabs: z, LoadingSpinner: K } = le();
51
+ ie("Payroll.PayrollOverview");
52
+ const { locale: u } = oe(), { t: r } = re("Payroll.PayrollOverview"), o = se("currency"), [Z, q] = Y("companyPays"), [U, A] = Y(!1), { LoadingIndicator: J } = me(), V = ae(l), Q = l.payrollStatusMeta?.expectedDebitTime ? y(l.payrollStatusMeta.expectedDebitTime) : l.payrollDeadline, _ = (e) => e.taxes?.reduce(
53
+ (a, i) => i.employer ? a + i.amount : a,
54
54
  0
55
55
  ) ?? 0, I = (e) => e.benefits?.reduce(
56
- (a, l) => l.companyContribution ? a + l.companyContribution : a,
56
+ (a, i) => i.companyContribution ? a + i.companyContribution : a,
57
57
  0
58
58
  ) ?? 0, v = (e) => e.fixedCompensations?.length ? Number(
59
59
  e.fixedCompensations.find(
60
- (a) => a.name?.toLowerCase() === P.REIMBURSEMENT_NAME.toLowerCase()
60
+ (a) => a.name?.toLowerCase() === C.REIMBURSEMENT_NAME.toLowerCase()
61
61
  )?.amount || 0
62
- ) : 0, te = (e) => e.grossPay + v(e) + _(e) + I(e), c = new Map(G.map((e) => [e.uuid, e])), C = (e) => e.hourlyCompensations?.reduce(
63
- (a, l) => {
64
- if (typeof l.name > "u")
62
+ ) : 0, ee = (e) => e.grossPay + v(e) + _(e) + I(e), d = new Map(L.map((e) => [e.uuid, e])), D = (e) => e.hourlyCompensations?.reduce(
63
+ (a, i) => {
64
+ if (typeof i.name > "u")
65
65
  return a;
66
- const f = l.name.toLowerCase(), E = a[f] ?? 0;
67
- return a[f] = E + Number(l.hours || 0), a;
66
+ const p = i.name.toLowerCase(), S = a[p] ?? 0;
67
+ return a[p] = S + Number(i.hours || 0), a;
68
68
  },
69
69
  {}
70
- ) || {}, B = (e) => e.paidTimeOff?.reduce((a, l) => a + Number(l.hours || 0), 0) ?? 0, R = i.employeeCompensations?.reduce(
70
+ ) || {}, B = (e) => e.paidTimeOff?.reduce((a, i) => a + Number(i.hours || 0), 0) ?? 0, R = l.employeeCompensations?.reduce(
71
71
  (e, a) => !a.excluded && a.paymentMethod === de.check ? e + 1 : e,
72
72
  0
73
73
  ) ?? 0, F = [
74
74
  {
75
75
  key: "employeeName",
76
76
  title: r("tableHeaders.employees"),
77
- render: (e) => /* @__PURE__ */ t(n, { children: S({
78
- first_name: c.get(e.employeeUuid)?.firstName,
79
- last_name: c.get(e.employeeUuid)?.lastName
77
+ render: (e) => /* @__PURE__ */ t(n, { children: O({
78
+ first_name: d.get(e.employeeUuid)?.firstName,
79
+ last_name: d.get(e.employeeUuid)?.lastName
80
80
  }) })
81
81
  },
82
82
  {
@@ -102,25 +102,25 @@ const ue = ({
102
102
  {
103
103
  key: "companyPays",
104
104
  title: r("tableHeaders.companyPays"),
105
- render: (e) => /* @__PURE__ */ t(n, { children: o(te(e)) })
105
+ render: (e) => /* @__PURE__ */ t(n, { children: o(ee(e)) })
106
106
  }
107
107
  ];
108
- L && F.push({
108
+ k && F.push({
109
109
  key: "paystubs",
110
110
  title: r("tableHeaders.paystub"),
111
111
  render: (e) => /* @__PURE__ */ t(
112
- $,
112
+ X,
113
113
  {
114
114
  "aria-label": r("downloadPaystubLabel"),
115
115
  variant: "tertiary",
116
116
  onClick: () => {
117
- e.employeeUuid && N(e.employeeUuid);
117
+ e.employeeUuid && P(e.employeeUuid);
118
118
  },
119
119
  children: /* @__PURE__ */ t(ce, {})
120
120
  }
121
121
  )
122
122
  });
123
- const re = [
123
+ const te = [
124
124
  {
125
125
  id: "companyPays",
126
126
  label: r("dataViews.companyPaysTab"),
@@ -129,16 +129,16 @@ const ue = ({
129
129
  {
130
130
  label: r("dataViews.companyPaysTable"),
131
131
  columns: F,
132
- data: i.employeeCompensations,
132
+ data: l.employeeCompensations,
133
133
  footer: () => ({
134
- employeeName: /* @__PURE__ */ s(D, { children: [
134
+ employeeName: /* @__PURE__ */ s(x, { children: [
135
135
  /* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsLabel") }),
136
136
  /* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsDescription") })
137
137
  ] }),
138
- grossPay: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.grossPay ?? 0)) }),
139
- reimbursements: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.reimbursements ?? 0)) }),
140
- companyTaxes: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employerTaxes ?? 0)) }),
141
- companyBenefits: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.benefits ?? 0)) }),
138
+ grossPay: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.grossPay ?? 0)) }),
139
+ reimbursements: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.reimbursements ?? 0)) }),
140
+ companyTaxes: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employerTaxes ?? 0)) }),
141
+ companyBenefits: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.benefits ?? 0)) }),
142
142
  companyPays: /* @__PURE__ */ t(n, { children: o(V) })
143
143
  })
144
144
  }
@@ -154,25 +154,25 @@ const ue = ({
154
154
  columns: [
155
155
  {
156
156
  title: r("tableHeaders.employees"),
157
- render: (e) => /* @__PURE__ */ t(n, { children: S({
158
- first_name: c.get(e.employeeUuid)?.firstName,
159
- last_name: c.get(e.employeeUuid)?.lastName
157
+ render: (e) => /* @__PURE__ */ t(n, { children: O({
158
+ first_name: d.get(e.employeeUuid)?.firstName,
159
+ last_name: d.get(e.employeeUuid)?.lastName
160
160
  }) })
161
161
  },
162
162
  {
163
163
  title: r("tableHeaders.compensationType"),
164
- render: (e) => /* @__PURE__ */ t(n, { children: c.get(e.employeeUuid)?.jobs?.reduce((a, l) => {
165
- if (l.primary) {
166
- const f = l.compensations?.find(
167
- (E) => E.uuid === l.currentCompensationUuid
164
+ render: (e) => /* @__PURE__ */ t(n, { children: d.get(e.employeeUuid)?.jobs?.reduce((a, i) => {
165
+ if (i.primary) {
166
+ const p = i.compensations?.find(
167
+ (S) => S.uuid === i.currentCompensationUuid
168
168
  )?.flsaStatus;
169
- switch (f) {
170
- case W.EXEMPT:
169
+ switch (p) {
170
+ case j.EXEMPT:
171
171
  return r("compensationTypeLabels.exempt");
172
- case W.NONEXEMPT:
172
+ case j.NONEXEMPT:
173
173
  return r("compensationTypeLabels.nonexempt");
174
174
  default:
175
- return f ?? "";
175
+ return p ?? "";
176
176
  }
177
177
  }
178
178
  return a;
@@ -180,15 +180,15 @@ const ue = ({
180
180
  },
181
181
  {
182
182
  title: r("tableHeaders.regular"),
183
- render: (e) => /* @__PURE__ */ t(n, { children: C(e)[P.REGULAR_HOURS_NAME] || 0 })
183
+ render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.REGULAR_HOURS_NAME] || 0 })
184
184
  },
185
185
  {
186
186
  title: r("tableHeaders.overtime"),
187
- render: (e) => /* @__PURE__ */ t(n, { children: C(e)[P.OVERTIME_NAME] || 0 })
187
+ render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.OVERTIME_NAME] || 0 })
188
188
  },
189
189
  {
190
190
  title: r("tableHeaders.doubleOT"),
191
- render: (e) => /* @__PURE__ */ t(n, { children: C(e)[P.DOUBLE_OVERTIME_NAME] || 0 })
191
+ render: (e) => /* @__PURE__ */ t(n, { children: D(e)[C.DOUBLE_OVERTIME_NAME] || 0 })
192
192
  },
193
193
  {
194
194
  title: r("tableHeaders.timeOff"),
@@ -196,13 +196,13 @@ const ue = ({
196
196
  },
197
197
  {
198
198
  title: r("tableHeaders.totalHours"),
199
- render: (e) => /* @__PURE__ */ t(n, { children: Object.values(C(e)).reduce(
200
- (a, l) => a + l,
199
+ render: (e) => /* @__PURE__ */ t(n, { children: Object.values(D(e)).reduce(
200
+ (a, i) => a + i,
201
201
  0
202
202
  ) + B(e) })
203
203
  }
204
204
  ],
205
- data: i.employeeCompensations
205
+ data: l.employeeCompensations
206
206
  }
207
207
  )
208
208
  },
@@ -216,9 +216,9 @@ const ue = ({
216
216
  columns: [
217
217
  {
218
218
  title: r("tableHeaders.employees"),
219
- render: (e) => /* @__PURE__ */ t(n, { children: S({
220
- first_name: c.get(e.employeeUuid)?.firstName,
221
- last_name: c.get(e.employeeUuid)?.lastName
219
+ render: (e) => /* @__PURE__ */ t(n, { children: O({
220
+ first_name: d.get(e.employeeUuid)?.firstName,
221
+ last_name: d.get(e.employeeUuid)?.lastName
222
222
  }) })
223
223
  },
224
224
  {
@@ -233,7 +233,7 @@ const ue = ({
233
233
  title: r("tableHeaders.deductions"),
234
234
  render: (e) => /* @__PURE__ */ t(n, { children: o(
235
235
  e.deductions?.reduce(
236
- (a, l) => a + l.amount,
236
+ (a, i) => a + i.amount,
237
237
  0
238
238
  ) ?? 0
239
239
  ) })
@@ -246,7 +246,7 @@ const ue = ({
246
246
  title: r("tableHeaders.employeeTaxes"),
247
247
  render: (e) => /* @__PURE__ */ t(n, { children: o(
248
248
  e.taxes?.reduce(
249
- (a, l) => l.employer ? a : a + l.amount,
249
+ (a, i) => i.employer ? a : a + i.amount,
250
250
  0
251
251
  ) ?? 0
252
252
  ) })
@@ -255,7 +255,7 @@ const ue = ({
255
255
  title: r("tableHeaders.employeeBenefits"),
256
256
  render: (e) => /* @__PURE__ */ t(n, { children: o(
257
257
  e.benefits?.reduce(
258
- (a, l) => a + (l.employeeDeduction ?? 0),
258
+ (a, i) => a + (i.employeeDeduction ?? 0),
259
259
  0
260
260
  ) ?? 0
261
261
  ) })
@@ -265,14 +265,14 @@ const ue = ({
265
265
  render: (e) => /* @__PURE__ */ t(n, { children: o(e.netPay ?? 0) })
266
266
  }
267
267
  ],
268
- data: i.employeeCompensations
268
+ data: l.employeeCompensations
269
269
  }
270
270
  )
271
271
  },
272
272
  {
273
273
  id: "taxes",
274
274
  label: r("dataViews.taxesTab"),
275
- content: /* @__PURE__ */ s(d, { flexDirection: "column", gap: 32, children: [
275
+ content: /* @__PURE__ */ s(c, { flexDirection: "column", gap: 32, children: [
276
276
  /* @__PURE__ */ t(
277
277
  b,
278
278
  {
@@ -286,20 +286,20 @@ const ue = ({
286
286
  {
287
287
  key: "byYourEmployees",
288
288
  title: r("tableHeaders.byYourEmployees"),
289
- render: (e) => /* @__PURE__ */ t(n, { children: o(k[e]?.employee ?? 0) })
289
+ render: (e) => /* @__PURE__ */ t(n, { children: o(N[e]?.employee ?? 0) })
290
290
  },
291
291
  {
292
292
  key: "byYourCompany",
293
293
  title: r("tableHeaders.byYourCompany"),
294
- render: (e) => /* @__PURE__ */ t(n, { children: o(k[e]?.employer ?? 0) })
294
+ render: (e) => /* @__PURE__ */ t(n, { children: o(N[e]?.employer ?? 0) })
295
295
  }
296
296
  ],
297
297
  footer: () => ({
298
298
  taxDescription: /* @__PURE__ */ t(n, { children: r("totalsLabel") }),
299
- byYourEmployees: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employeeTaxes ?? 0)) }),
300
- byYourCompany: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employerTaxes ?? 0)) })
299
+ byYourEmployees: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employeeTaxes ?? 0)) }),
300
+ byYourCompany: /* @__PURE__ */ t(n, { children: o(Number(l.totals?.employerTaxes ?? 0)) })
301
301
  }),
302
- data: Object.keys(k)
302
+ data: Object.keys(N)
303
303
  }
304
304
  ),
305
305
  /* @__PURE__ */ t(
@@ -317,41 +317,40 @@ const ue = ({
317
317
  }
318
318
  ],
319
319
  data: [
320
- { label: r("directDepositLabel"), value: i.totals?.netPayDebit || "0" },
320
+ { label: r("directDepositLabel"), value: l.totals?.netPayDebit || "0" },
321
321
  {
322
322
  label: r("reimbursementLabel"),
323
- value: i.totals?.reimbursementDebit || "0"
323
+ value: l.totals?.reimbursementDebit || "0"
324
324
  },
325
325
  {
326
326
  label: r("garnishmentsLabel"),
327
- value: i.totals?.childSupportDebit || "0"
327
+ value: l.totals?.childSupportDebit || "0"
328
328
  },
329
- { label: r("taxesLabel"), value: i.totals?.taxDebit || "0" }
329
+ { label: r("taxesLabel"), value: l.totals?.taxDebit || "0" }
330
330
  ]
331
331
  }
332
332
  )
333
333
  ] })
334
334
  }
335
335
  ];
336
- return /* @__PURE__ */ s(d, { flexDirection: "column", alignItems: "stretch", children: [
337
- x && /* @__PURE__ */ t(d, { justifyContent: "flex-end", children: /* @__PURE__ */ t(p, { onClick: x, variant: "secondary", children: r("backButton") }) }),
338
- /* @__PURE__ */ s(d, { justifyContent: "space-between", children: [
339
- /* @__PURE__ */ s(j, { flexGrow: 1, children: [
340
- /* @__PURE__ */ t(w, { as: "h1", children: r(L ? "summaryTitle" : "overviewTitle") }),
336
+ return /* @__PURE__ */ s(c, { flexDirection: "column", alignItems: "stretch", children: [
337
+ /* @__PURE__ */ s(c, { justifyContent: "space-between", children: [
338
+ /* @__PURE__ */ s(W, { flexGrow: 1, children: [
339
+ /* @__PURE__ */ t(E, { as: "h1", children: r(k ? "summaryTitle" : "overviewTitle") }),
341
340
  /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
342
- ae,
341
+ ne,
343
342
  {
344
343
  i18nKey: "pageSubtitle",
345
344
  t: r,
346
345
  components: { dateWrapper: /* @__PURE__ */ t(n, { weight: "bold", as: "span" }) },
347
- values: ue({ payPeriod: i.payPeriod, locale: u })
346
+ values: ue({ payPeriod: l.payPeriod, locale: u })
348
347
  }
349
348
  ) })
350
349
  ] }),
351
- /* @__PURE__ */ t(j, { flexGrow: 1, children: /* @__PURE__ */ t(d, { justifyContent: "flex-end", children: L ? /* @__PURE__ */ s(D, { children: [
352
- /* @__PURE__ */ t(p, { onClick: H, variant: "secondary", isDisabled: h, children: r("payrollReceiptCta") }),
350
+ /* @__PURE__ */ t(W, { flexGrow: 1, children: /* @__PURE__ */ t(c, { justifyContent: "flex-end", children: k ? /* @__PURE__ */ s(x, { children: [
351
+ /* @__PURE__ */ t(H, { onClick: T, variant: "secondary", isDisabled: h, children: r("payrollReceiptCta") }),
353
352
  /* @__PURE__ */ t(
354
- p,
353
+ H,
355
354
  {
356
355
  onClick: () => {
357
356
  A(!0);
@@ -361,18 +360,18 @@ const ue = ({
361
360
  children: r("cancelCta")
362
361
  }
363
362
  )
364
- ] }) : /* @__PURE__ */ s(D, { children: [
365
- /* @__PURE__ */ t(p, { onClick: m, variant: "secondary", isDisabled: h, children: r("editCta") }),
366
- /* @__PURE__ */ t(p, { onClick: g, isDisabled: h, children: r("submitCta") })
363
+ ] }) : /* @__PURE__ */ s(x, { children: [
364
+ /* @__PURE__ */ t(H, { onClick: m, variant: "secondary", isDisabled: h, children: r("editCta") }),
365
+ /* @__PURE__ */ t(H, { onClick: f, isDisabled: h, children: r("submitCta") })
367
366
  ] }) }) })
368
367
  ] }),
369
- h ? /* @__PURE__ */ t(Q, { children: /* @__PURE__ */ s(d, { flexDirection: "column", alignItems: "center", gap: 4, children: [
370
- /* @__PURE__ */ t(Z, { size: "lg" }),
371
- /* @__PURE__ */ t(w, { as: "h4", children: r("loadingTitle") }),
368
+ h ? /* @__PURE__ */ t(J, { children: /* @__PURE__ */ s(c, { flexDirection: "column", alignItems: "center", gap: 4, children: [
369
+ /* @__PURE__ */ t(K, { size: "lg" }),
370
+ /* @__PURE__ */ t(E, { as: "h4", children: r("loadingTitle") }),
372
371
  /* @__PURE__ */ t(n, { children: r("loadingDescription") })
373
- ] }) }) : /* @__PURE__ */ s(D, { children: [
374
- O?.length && /* @__PURE__ */ t(d, { flexDirection: "column", gap: 16, children: O.map((e, a) => /* @__PURE__ */ t(M, { label: e.title, status: e.type, children: e.content ?? null }, `${e.type}-${e.title}`)) }),
375
- /* @__PURE__ */ t(w, { as: "h3", children: r("payrollSummaryTitle") }),
372
+ ] }) }) : /* @__PURE__ */ s(x, { children: [
373
+ w?.length && w.length > 0 && /* @__PURE__ */ t(c, { flexDirection: "column", gap: 16, children: w.map((e, a) => /* @__PURE__ */ t(M, { label: e.title, status: e.type, children: e.content ?? null }, `${e.type}-${e.title}`)) }),
374
+ /* @__PURE__ */ t(E, { as: "h3", children: r("payrollSummaryTitle") }),
376
375
  /* @__PURE__ */ t(
377
376
  b,
378
377
  {
@@ -384,15 +383,15 @@ const ue = ({
384
383
  },
385
384
  {
386
385
  title: r("tableHeaders.debitAmount"),
387
- render: () => /* @__PURE__ */ t(n, { children: o(Number(i.totals?.companyDebit ?? 0)) })
386
+ render: () => /* @__PURE__ */ t(n, { children: o(Number(l.totals?.companyDebit ?? 0)) })
388
387
  },
389
388
  {
390
389
  title: r("tableHeaders.debitAccount"),
391
- render: () => /* @__PURE__ */ t(n, { children: X?.hiddenAccountNumber ?? "" })
390
+ render: () => /* @__PURE__ */ t(n, { children: G?.hiddenAccountNumber ?? "" })
392
391
  },
393
392
  {
394
393
  title: r("tableHeaders.debitDate"),
395
- render: () => /* @__PURE__ */ t(n, { children: ee?.toLocaleString(u, {
394
+ render: () => /* @__PURE__ */ t(n, { children: Q?.toLocaleString(u, {
396
395
  month: "short",
397
396
  day: "numeric",
398
397
  year: "numeric"
@@ -400,7 +399,7 @@ const ue = ({
400
399
  },
401
400
  {
402
401
  title: r("tableHeaders.employeesPayDate"),
403
- render: () => /* @__PURE__ */ t(n, { children: y(i.checkDate)?.toLocaleDateString(u, {
402
+ render: () => /* @__PURE__ */ t(n, { children: y(l.checkDate)?.toLocaleDateString(u, {
404
403
  month: "short",
405
404
  day: "numeric",
406
405
  year: "numeric"
@@ -419,45 +418,45 @@ const ue = ({
419
418
  }
420
419
  ),
421
420
  /* @__PURE__ */ t(
422
- K,
421
+ z,
423
422
  {
424
- onSelectionChange: J,
425
- selectedId: q,
423
+ onSelectionChange: q,
424
+ selectedId: Z,
426
425
  "aria-label": r("dataViews.label"),
427
- tabs: re
426
+ tabs: te
428
427
  }
429
428
  ),
430
429
  U && /* @__PURE__ */ t(
431
- z,
430
+ $,
432
431
  {
433
432
  isOpen: U,
434
433
  onClose: () => {
435
434
  A(!1);
436
435
  },
437
- onPrimaryActionClick: T,
436
+ onPrimaryActionClick: g,
438
437
  shouldCloseOnBackdropClick: !0,
439
438
  primaryActionLabel: r("confirmCancelCta"),
440
439
  isDestructive: !0,
441
440
  closeActionLabel: r("declineCancelCta"),
442
441
  title: r("cancelDialogTitle", {
443
442
  startDate: y(
444
- i.payPeriod?.startDate ?? ""
443
+ l.payPeriod?.startDate ?? ""
445
444
  )?.toLocaleDateString(u, {
446
445
  month: "long",
447
446
  day: "numeric"
448
447
  }),
449
448
  endDate: y(
450
- i.payPeriod?.endDate ?? ""
449
+ l.payPeriod?.endDate ?? ""
451
450
  )?.toLocaleDateString(u, {
452
451
  month: "long",
453
452
  day: "numeric",
454
453
  year: "numeric"
455
454
  })
456
455
  }),
457
- children: /* @__PURE__ */ s(d, { gap: 14, flexDirection: "column", children: [
456
+ children: /* @__PURE__ */ s(c, { gap: 14, flexDirection: "column", children: [
458
457
  /* @__PURE__ */ t(n, { children: r("cancelDialogDescription") }),
459
458
  /* @__PURE__ */ t(n, { children: r("cancelDialogDescriptionDeadline", {
460
- deadline: (i.payrollDeadline ?? "").toLocaleString(u, {
459
+ deadline: (l.payrollDeadline ?? "").toLocaleString(u, {
461
460
  month: "short",
462
461
  day: "numeric",
463
462
  year: "numeric",
@@ -473,6 +472,6 @@ const ue = ({
473
472
  ] });
474
473
  };
475
474
  export {
476
- we as PayrollOverviewPresentation
475
+ Ee as PayrollOverviewPresentation
477
476
  };
478
477
  //# sourceMappingURL=PayrollOverviewPresentation.js.map