@gusto/embedded-react-sdk 0.18.0 → 0.19.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 (156) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/assets/icons/icon-error-outline.svg.js +10 -0
  3. package/dist/assets/icons/icon-error-outline.svg.js.map +1 -0
  4. package/dist/assets/icons/icon-info-outline.svg.js +10 -0
  5. package/dist/assets/icons/icon-info-outline.svg.js.map +1 -0
  6. package/dist/assets/icons/icon-zap-fast.svg.js +10 -0
  7. package/dist/assets/icons/icon-zap-fast.svg.js.map +1 -0
  8. package/dist/components/Common/Fieldset/Fieldset.module.scss.js +1 -1
  9. package/dist/components/Common/PaginationControl/PaginationControl.js +6 -6
  10. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  11. package/dist/components/Common/RequirementsList/RequirementsList.js +19 -13
  12. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  13. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  14. package/dist/components/Common/UI/Badge/index.d.ts +2 -0
  15. package/dist/components/Common/UI/Banner/Banner.d.ts +3 -0
  16. package/dist/components/Common/UI/Banner/Banner.js +31 -0
  17. package/dist/components/Common/UI/Banner/Banner.js.map +1 -0
  18. package/dist/components/Common/UI/Banner/Banner.module.scss.js +14 -0
  19. package/dist/components/Common/UI/Banner/Banner.module.scss.js.map +1 -0
  20. package/dist/components/Common/UI/Banner/BannerTypes.d.ts +21 -0
  21. package/dist/components/Common/UI/Banner/BannerTypes.js +7 -0
  22. package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -0
  23. package/dist/components/Common/UI/Banner/index.d.ts +4 -0
  24. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  25. package/dist/components/Common/UI/List/List.module.scss.js +2 -2
  26. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  27. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js +13 -13
  28. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
  29. package/dist/components/Company/FederalTaxes/Form.js +29 -29
  30. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  31. package/dist/components/Company/FederalTaxes/Head.js +5 -5
  32. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  33. package/dist/components/Contractor/ContractorList/index.js +32 -32
  34. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  35. package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
  36. package/dist/components/Contractor/Submit/Submit.js +6 -6
  37. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  38. package/dist/components/Contractor/Submit/SubmitDone.js +8 -8
  39. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  40. package/dist/components/Employee/Compensation/Edit.js +16 -16
  41. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  42. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +3 -3
  43. package/dist/components/Employee/EmployeeList/List.js +23 -23
  44. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  45. package/dist/components/Employee/FederalTaxes/Head.js +1 -1
  46. package/dist/components/Employee/FederalTaxes/Head.js.map +1 -1
  47. package/dist/components/Employee/Landing/Landing.js +17 -16
  48. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  49. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +1 -1
  50. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  51. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  52. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  53. package/dist/components/Employee/Taxes/FederalHead.js +1 -1
  54. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  55. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +6 -0
  56. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +57 -0
  57. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -0
  58. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +8 -0
  59. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +79 -0
  60. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -0
  61. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/index.d.ts +2 -0
  62. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +7 -0
  63. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +25 -0
  64. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -0
  65. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +10 -0
  66. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +30 -0
  67. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -0
  68. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/index.d.ts +2 -0
  69. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +10 -0
  70. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +30 -0
  71. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -0
  72. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/index.d.ts +2 -0
  73. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +13 -0
  74. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +63 -0
  75. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -0
  76. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +3 -0
  77. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +1 -1
  78. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  79. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +1 -1
  80. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  81. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +60 -59
  82. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  83. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +30 -29
  84. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  85. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +75 -75
  86. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  87. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +41 -36
  88. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  89. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +25 -25
  90. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  91. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +109 -89
  92. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  93. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -1
  94. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +179 -147
  95. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  96. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.d.ts +8 -0
  97. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +49 -0
  98. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -0
  99. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +6 -0
  100. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js +18 -0
  101. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -0
  102. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +3 -0
  103. package/dist/components/Payroll/index.d.ts +1 -0
  104. package/dist/components/Payroll/index.js +8 -6
  105. package/dist/components/Payroll/index.js.map +1 -1
  106. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +54 -52
  107. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  108. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  109. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  110. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +27 -25
  111. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  112. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  113. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  114. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  115. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  116. package/dist/contexts/ThemeProvider/theme.js +5 -4
  117. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  118. package/dist/i18n/I18n.js +1 -1
  119. package/dist/i18n/I18n.js.map +1 -1
  120. package/dist/i18n/en/Company.BankAccount.json.js +1 -1
  121. package/dist/i18n/en/Company.DocumentList.json.js +16 -16
  122. package/dist/i18n/en/Company.FederalTaxes.json.js +22 -22
  123. package/dist/i18n/en/Contractor.ContractorList.json.js +8 -8
  124. package/dist/i18n/en/Contractor.Submit.json.js +6 -6
  125. package/dist/i18n/en/Employee.Compensation.json.js +8 -8
  126. package/dist/i18n/en/Employee.Deductions.json.js +51 -51
  127. package/dist/i18n/en/Employee.EmployeeList.json.js +6 -6
  128. package/dist/i18n/en/Employee.FederalTaxes.json.js +3 -3
  129. package/dist/i18n/en/Employee.HomeAddress.json.js +2 -2
  130. package/dist/i18n/en/Employee.OnboardingSummary.json.js +1 -1
  131. package/dist/i18n/en/Employee.PaymentMethod.json.js +11 -11
  132. package/dist/i18n/en/Employee.Taxes.json.js +2 -2
  133. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +14 -0
  134. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js.map +1 -0
  135. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +10 -0
  136. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -0
  137. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +3 -3
  138. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +4 -4
  139. package/dist/i18n/en/Payroll.PayrollList.json.js +7 -7
  140. package/dist/i18n/en/Payroll.PayrollOverview.json.js +35 -33
  141. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  142. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +7 -7
  143. package/dist/i18n/en/Payroll.WireInstructions.json.js +10 -0
  144. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -0
  145. package/dist/i18n/en/common.json.d.ts +1 -1
  146. package/dist/i18n/en/common.json.js +1 -1
  147. package/dist/shared/constants.d.ts +13 -0
  148. package/dist/shared/constants.js +56 -47
  149. package/dist/shared/constants.js.map +1 -1
  150. package/dist/style.css +1 -1
  151. package/dist/types/i18next.d.ts +113 -98
  152. package/package.json +9 -10
  153. package/dist/i18n/en/Company.AddBank.json.js +0 -28
  154. package/dist/i18n/en/Company.AddBank.json.js.map +0 -1
  155. package/dist/i18n/en/Payroll.PayrollSchedule.json.js +0 -27
  156. package/dist/i18n/en/Payroll.PayrollSchedule.json.js.map +0 -1
@@ -1,61 +1,67 @@
1
- import { jsx as t, jsxs as s, Fragment as T } from "react/jsx-runtime";
2
- import { useTranslation as ne, Trans as ae } from "react-i18next";
3
- import { useState as B, useRef as le } from "react";
4
- import { calculateTotalPayroll as ie } from "../helpers.js";
5
- import oe from "./PayrollOverviewPresentation.module.scss.js";
6
- import { Flex as m, FlexItem as R } from "../../Common/Flex/Flex.js";
7
- import { useContainerBreakpoints as se } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
- import { useComponentContext as de } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import { useI18n as ce } from "../../../i18n/I18n.js";
10
- import { useDateFormatter as me } from "../../../hooks/useDateFormatter.js";
11
- import ue from "../../../hooks/useNumberFormatter.js";
12
- import { firstLastName as w } from "../../../helpers/formattedStrings.js";
13
- import { PAYMENT_METHODS as be, FlsaStatus as W, compensationTypeLabels as H } from "../../../shared/constants.js";
14
- import ye from "../../../assets/icons/download-cloud.svg.js";
15
- import { useLoadingIndicator as pe } from "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
- import { DataView as y } from "../../Common/DataView/DataView.js";
17
- const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate, u.endDate) : { startDate: "", endDate: "" }, Se = ({
1
+ import { jsx as t, jsxs as s, Fragment as H } from "react/jsx-runtime";
2
+ import { useTranslation as se, Trans as de } from "react-i18next";
3
+ import { useState as W, useRef as ce } from "react";
4
+ import { calculateTotalPayroll as me } from "../helpers.js";
5
+ import ue from "./PayrollOverviewPresentation.module.scss.js";
6
+ import { Flex as m, FlexItem as F } from "../../Common/Flex/Flex.js";
7
+ import { useContainerBreakpoints as be } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
+ import { useComponentContext as pe } from "../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { useI18n as ye } from "../../../i18n/I18n.js";
10
+ import { useDateFormatter as he } from "../../../hooks/useDateFormatter.js";
11
+ import fe from "../../../hooks/useNumberFormatter.js";
12
+ import { firstLastName as E } from "../../../helpers/formattedStrings.js";
13
+ import { PAYMENT_METHODS as Te, FlsaStatus as j, compensationTypeLabels as x, PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as G } from "../../../shared/constants.js";
14
+ import ge from "../../../assets/icons/download-cloud.svg.js";
15
+ import { useLoadingIndicator as He } from "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
+ import { FastAchThresholdExceeded as xe } from "./SubmissionBlockers/FastAchThresholdExceeded.js";
17
+ import { GenericBlocker as Pe } from "./SubmissionBlockers/GenericBlocker.js";
18
+ import { DataView as p } from "../../Common/DataView/DataView.js";
19
+ const Ce = (u, P) => u?.startDate && u.endDate ? P.formatPayPeriod(u.startDate, u.endDate) : { startDate: "", endDate: "" }, Fe = ({
18
20
  onEdit: u,
19
- onSubmit: x,
20
- onCancel: Y,
21
- onPayrollReceipt: F,
22
- onPaystubDownload: j,
23
- employeeDetails: G,
21
+ onSubmit: P,
22
+ onCancel: K,
23
+ onPayrollReceipt: X,
24
+ onPaystubDownload: $,
25
+ employeeDetails: z,
24
26
  payrollData: i,
25
- bankAccount: X,
27
+ bankAccount: q,
26
28
  taxes: C,
27
- isSubmitting: p = !1,
28
- isProcessed: P,
29
- alerts: v = []
29
+ isSubmitting: y = !1,
30
+ isProcessed: D,
31
+ alerts: L = [],
32
+ submissionBlockers: h = [],
33
+ selectedUnblockOptions: v = {},
34
+ onUnblockOptionChange: O,
35
+ wireInConfirmationRequest: J
30
36
  }) => {
31
- const { Alert: E, Button: f, ButtonIcon: $, Dialog: z, Heading: D, Text: n, Tabs: K, LoadingSpinner: q } = de();
32
- ce("Payroll.PayrollOverview");
33
- const b = me(), { t: r } = ne("Payroll.PayrollOverview"), o = ue("currency"), [J, Q] = B("companyPays"), [L, O] = B(!1), { LoadingIndicator: Z } = pe(), M = le(null), d = se({ ref: M }).includes("small"), I = ie(i), ee = i.payrollStatusMeta?.expectedDebitTime ?? i.payrollDeadline, S = (e) => e.taxes?.reduce(
34
- (a, l) => l.employer ? a + l.amount : a,
37
+ const { Alert: S, Button: T, ButtonIcon: Q, Dialog: Z, Heading: N, Text: a, Tabs: ee, LoadingSpinner: te } = pe();
38
+ ye("Payroll.PayrollOverview");
39
+ const b = he(), { t: r } = se("Payroll.PayrollOverview"), o = fe("currency"), [re, ae] = W("companyPays"), [M, _] = W(!1), { LoadingIndicator: ne } = He(), A = ce(null), d = be({ ref: A }).includes("small"), I = me(i), le = i.payrollStatusMeta?.expectedDebitTime ?? i.payrollDeadline, V = (e) => e.taxes?.reduce(
40
+ (n, l) => l.employer ? n + l.amount : n,
35
41
  0
36
- ) ?? 0, U = (e) => e.benefits?.reduce(
37
- (a, l) => l.companyContribution ? a + l.companyContribution : a,
42
+ ) ?? 0, R = (e) => e.benefits?.reduce(
43
+ (n, l) => l.companyContribution ? n + l.companyContribution : n,
38
44
  0
39
45
  ) ?? 0, k = (e) => e.fixedCompensations?.length ? Number(
40
46
  e.fixedCompensations.find(
41
- (a) => a.name?.toLowerCase() === H.REIMBURSEMENT_NAME.toLowerCase()
47
+ (n) => n.name?.toLowerCase() === x.REIMBURSEMENT_NAME.toLowerCase()
42
48
  )?.amount || 0
43
- ) : 0, te = (e) => e.grossPay + k(e) + S(e) + U(e), c = new Map(G.map((e) => [e.uuid, e])), g = (e) => e.hourlyCompensations?.reduce(
44
- (a, l) => {
49
+ ) : 0, ie = (e) => e.grossPay + k(e) + V(e) + R(e), c = new Map(z.map((e) => [e.uuid, e])), g = (e) => e.hourlyCompensations?.reduce(
50
+ (n, l) => {
45
51
  if (typeof l.name > "u")
46
- return a;
47
- const h = l.name.toLowerCase(), N = a[h] ?? 0;
48
- return a[h] = N + Number(l.hours || 0), a;
52
+ return n;
53
+ const f = l.name.toLowerCase(), w = n[f] ?? 0;
54
+ return n[f] = w + Number(l.hours || 0), n;
49
55
  },
50
56
  {}
51
- ) || {}, A = (e) => e.paidTimeOff?.reduce((a, l) => a + Number(l.hours || 0), 0) ?? 0, V = i.employeeCompensations?.reduce(
52
- (e, a) => !a.excluded && a.paymentMethod === be.check ? e + 1 : e,
57
+ ) || {}, U = (e) => e.paidTimeOff?.reduce((n, l) => n + Number(l.hours || 0), 0) ?? 0, B = i.employeeCompensations?.reduce(
58
+ (e, n) => !n.excluded && n.paymentMethod === Te.check ? e + 1 : e,
53
59
  0
54
- ) ?? 0, _ = [
60
+ ) ?? 0, Y = [
55
61
  {
56
62
  key: "employeeName",
57
63
  title: r("tableHeaders.employees"),
58
- render: (e) => /* @__PURE__ */ t(n, { children: w({
64
+ render: (e) => /* @__PURE__ */ t(a, { children: E({
59
65
  first_name: c.get(e.employeeUuid)?.firstName,
60
66
  last_name: c.get(e.employeeUuid)?.lastName
61
67
  }) })
@@ -63,64 +69,64 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
63
69
  {
64
70
  key: "grossPay",
65
71
  title: r("tableHeaders.grossPay"),
66
- render: (e) => /* @__PURE__ */ t(n, { children: o(e.grossPay) })
72
+ render: (e) => /* @__PURE__ */ t(a, { children: o(e.grossPay) })
67
73
  },
68
74
  {
69
75
  key: "reimbursements",
70
76
  title: r("tableHeaders.reimbursements"),
71
- render: (e) => /* @__PURE__ */ t(n, { children: o(k(e)) })
77
+ render: (e) => /* @__PURE__ */ t(a, { children: o(k(e)) })
72
78
  },
73
79
  {
74
80
  key: "companyTaxes",
75
81
  title: r("tableHeaders.companyTaxes"),
76
- render: (e) => /* @__PURE__ */ t(n, { children: o(S(e)) })
82
+ render: (e) => /* @__PURE__ */ t(a, { children: o(V(e)) })
77
83
  },
78
84
  {
79
85
  key: "companyBenefits",
80
86
  title: r("tableHeaders.companyBenefits"),
81
- render: (e) => /* @__PURE__ */ t(n, { children: o(U(e)) })
87
+ render: (e) => /* @__PURE__ */ t(a, { children: o(R(e)) })
82
88
  },
83
89
  {
84
90
  key: "companyPays",
85
91
  title: r("tableHeaders.companyPays"),
86
- render: (e) => /* @__PURE__ */ t(n, { children: o(te(e)) })
92
+ render: (e) => /* @__PURE__ */ t(a, { children: o(ie(e)) })
87
93
  }
88
94
  ];
89
- P && _.push({
95
+ D && Y.push({
90
96
  key: "paystubs",
91
97
  title: r("tableHeaders.paystub"),
92
98
  render: (e) => /* @__PURE__ */ t(
93
- $,
99
+ Q,
94
100
  {
95
101
  "aria-label": r("downloadPaystubLabel"),
96
102
  variant: "tertiary",
97
103
  onClick: () => {
98
- e.employeeUuid && j(e.employeeUuid);
104
+ e.employeeUuid && $(e.employeeUuid);
99
105
  },
100
- children: /* @__PURE__ */ t(ye, {})
106
+ children: /* @__PURE__ */ t(ge, {})
101
107
  }
102
108
  )
103
109
  });
104
- const re = [
110
+ const oe = [
105
111
  {
106
112
  id: "companyPays",
107
113
  label: r("dataViews.companyPaysTab"),
108
114
  content: /* @__PURE__ */ t(
109
- y,
115
+ p,
110
116
  {
111
117
  label: r("dataViews.companyPaysTable"),
112
- columns: _,
118
+ columns: Y,
113
119
  data: i.employeeCompensations,
114
120
  footer: () => ({
115
- employeeName: /* @__PURE__ */ s(T, { children: [
116
- /* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsLabel") }),
117
- /* @__PURE__ */ t(n, { children: r("tableHeaders.footerTotalsDescription") })
121
+ employeeName: /* @__PURE__ */ s(H, { children: [
122
+ /* @__PURE__ */ t(a, { children: r("tableHeaders.footerTotalsLabel") }),
123
+ /* @__PURE__ */ t(a, { children: r("tableHeaders.footerTotalsDescription") })
118
124
  ] }),
119
- grossPay: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.grossPay ?? 0)) }),
120
- reimbursements: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.reimbursements ?? 0)) }),
121
- companyTaxes: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employerTaxes ?? 0)) }),
122
- companyBenefits: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.benefits ?? 0)) }),
123
- companyPays: /* @__PURE__ */ t(n, { children: o(I) })
125
+ grossPay: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.grossPay ?? 0)) }),
126
+ reimbursements: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.reimbursements ?? 0)) }),
127
+ companyTaxes: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.employerTaxes ?? 0)) }),
128
+ companyBenefits: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.benefits ?? 0)) }),
129
+ companyPays: /* @__PURE__ */ t(a, { children: o(I) })
124
130
  })
125
131
  }
126
132
  )
@@ -129,58 +135,58 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
129
135
  id: "hoursWorked",
130
136
  label: r("dataViews.hoursWorkedTab"),
131
137
  content: /* @__PURE__ */ t(
132
- y,
138
+ p,
133
139
  {
134
140
  label: r("dataViews.hoursWorkedTable"),
135
141
  columns: [
136
142
  {
137
143
  title: r("tableHeaders.employees"),
138
- render: (e) => /* @__PURE__ */ t(n, { children: w({
144
+ render: (e) => /* @__PURE__ */ t(a, { children: E({
139
145
  first_name: c.get(e.employeeUuid)?.firstName,
140
146
  last_name: c.get(e.employeeUuid)?.lastName
141
147
  }) })
142
148
  },
143
149
  {
144
150
  title: r("tableHeaders.compensationType"),
145
- render: (e) => /* @__PURE__ */ t(n, { children: c.get(e.employeeUuid)?.jobs?.reduce((a, l) => {
151
+ render: (e) => /* @__PURE__ */ t(a, { children: c.get(e.employeeUuid)?.jobs?.reduce((n, l) => {
146
152
  if (l.primary) {
147
- const h = l.compensations?.find(
148
- (N) => N.uuid === l.currentCompensationUuid
153
+ const f = l.compensations?.find(
154
+ (w) => w.uuid === l.currentCompensationUuid
149
155
  )?.flsaStatus;
150
- switch (h) {
151
- case W.EXEMPT:
156
+ switch (f) {
157
+ case j.EXEMPT:
152
158
  return r("compensationTypeLabels.exempt");
153
- case W.NONEXEMPT:
159
+ case j.NONEXEMPT:
154
160
  return r("compensationTypeLabels.nonexempt");
155
161
  default:
156
- return h ?? "";
162
+ return f ?? "";
157
163
  }
158
164
  }
159
- return a;
165
+ return n;
160
166
  }, "") })
161
167
  },
162
168
  {
163
169
  title: r("tableHeaders.regular"),
164
- render: (e) => /* @__PURE__ */ t(n, { children: g(e)[H.REGULAR_HOURS_NAME] || 0 })
170
+ render: (e) => /* @__PURE__ */ t(a, { children: g(e)[x.REGULAR_HOURS_NAME] || 0 })
165
171
  },
166
172
  {
167
173
  title: r("tableHeaders.overtime"),
168
- render: (e) => /* @__PURE__ */ t(n, { children: g(e)[H.OVERTIME_NAME] || 0 })
174
+ render: (e) => /* @__PURE__ */ t(a, { children: g(e)[x.OVERTIME_NAME] || 0 })
169
175
  },
170
176
  {
171
177
  title: r("tableHeaders.doubleOT"),
172
- render: (e) => /* @__PURE__ */ t(n, { children: g(e)[H.DOUBLE_OVERTIME_NAME] || 0 })
178
+ render: (e) => /* @__PURE__ */ t(a, { children: g(e)[x.DOUBLE_OVERTIME_NAME] || 0 })
173
179
  },
174
180
  {
175
181
  title: r("tableHeaders.timeOff"),
176
- render: (e) => /* @__PURE__ */ t(n, { children: A(e) })
182
+ render: (e) => /* @__PURE__ */ t(a, { children: U(e) })
177
183
  },
178
184
  {
179
185
  title: r("tableHeaders.totalHours"),
180
- render: (e) => /* @__PURE__ */ t(n, { children: Object.values(g(e)).reduce(
181
- (a, l) => a + l,
186
+ render: (e) => /* @__PURE__ */ t(a, { children: Object.values(g(e)).reduce(
187
+ (n, l) => n + l,
182
188
  0
183
- ) + A(e) })
189
+ ) + U(e) })
184
190
  }
185
191
  ],
186
192
  data: i.employeeCompensations
@@ -191,59 +197,59 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
191
197
  id: "employeeTakeHome",
192
198
  label: r("dataViews.employeeTakeHomeTab"),
193
199
  content: /* @__PURE__ */ t(
194
- y,
200
+ p,
195
201
  {
196
202
  label: r("dataViews.employeeTakeHomeTable"),
197
203
  columns: [
198
204
  {
199
205
  title: r("tableHeaders.employees"),
200
- render: (e) => /* @__PURE__ */ t(n, { children: w({
206
+ render: (e) => /* @__PURE__ */ t(a, { children: E({
201
207
  first_name: c.get(e.employeeUuid)?.firstName,
202
208
  last_name: c.get(e.employeeUuid)?.lastName
203
209
  }) })
204
210
  },
205
211
  {
206
212
  title: r("tableHeaders.paymentType"),
207
- render: (e) => /* @__PURE__ */ t(n, { children: e.paymentMethod ?? "" })
213
+ render: (e) => /* @__PURE__ */ t(a, { children: e.paymentMethod ?? "" })
208
214
  },
209
215
  {
210
216
  title: r("tableHeaders.grossPay"),
211
- render: (e) => /* @__PURE__ */ t(n, { children: o(e.grossPay ?? 0) })
217
+ render: (e) => /* @__PURE__ */ t(a, { children: o(e.grossPay ?? 0) })
212
218
  },
213
219
  {
214
220
  title: r("tableHeaders.deductions"),
215
- render: (e) => /* @__PURE__ */ t(n, { children: o(
221
+ render: (e) => /* @__PURE__ */ t(a, { children: o(
216
222
  e.deductions?.reduce(
217
- (a, l) => a + l.amount,
223
+ (n, l) => n + l.amount,
218
224
  0
219
225
  ) ?? 0
220
226
  ) })
221
227
  },
222
228
  {
223
229
  title: r("tableHeaders.reimbursements"),
224
- render: (e) => /* @__PURE__ */ t(n, { children: o(k(e)) })
230
+ render: (e) => /* @__PURE__ */ t(a, { children: o(k(e)) })
225
231
  },
226
232
  {
227
233
  title: r("tableHeaders.employeeTaxes"),
228
- render: (e) => /* @__PURE__ */ t(n, { children: o(
234
+ render: (e) => /* @__PURE__ */ t(a, { children: o(
229
235
  e.taxes?.reduce(
230
- (a, l) => l.employer ? a : a + l.amount,
236
+ (n, l) => l.employer ? n : n + l.amount,
231
237
  0
232
238
  ) ?? 0
233
239
  ) })
234
240
  },
235
241
  {
236
242
  title: r("tableHeaders.employeeBenefits"),
237
- render: (e) => /* @__PURE__ */ t(n, { children: o(
243
+ render: (e) => /* @__PURE__ */ t(a, { children: o(
238
244
  e.benefits?.reduce(
239
- (a, l) => a + (l.employeeDeduction ?? 0),
245
+ (n, l) => n + (l.employeeDeduction ?? 0),
240
246
  0
241
247
  ) ?? 0
242
248
  ) })
243
249
  },
244
250
  {
245
251
  title: r("tableHeaders.payment"),
246
- render: (e) => /* @__PURE__ */ t(n, { children: o(e.netPay ?? 0) })
252
+ render: (e) => /* @__PURE__ */ t(a, { children: o(e.netPay ?? 0) })
247
253
  }
248
254
  ],
249
255
  data: i.employeeCompensations
@@ -255,46 +261,46 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
255
261
  label: r("dataViews.taxesTab"),
256
262
  content: /* @__PURE__ */ s(m, { flexDirection: "column", gap: 32, children: [
257
263
  /* @__PURE__ */ t(
258
- y,
264
+ p,
259
265
  {
260
266
  label: r("dataViews.taxesTable"),
261
267
  columns: [
262
268
  {
263
269
  key: "taxDescription",
264
270
  title: r("tableHeaders.taxDescription"),
265
- render: (e) => /* @__PURE__ */ t(n, { children: e })
271
+ render: (e) => /* @__PURE__ */ t(a, { children: e })
266
272
  },
267
273
  {
268
274
  key: "byYourEmployees",
269
275
  title: r("tableHeaders.byYourEmployees"),
270
- render: (e) => /* @__PURE__ */ t(n, { children: o(C[e]?.employee ?? 0) })
276
+ render: (e) => /* @__PURE__ */ t(a, { children: o(C[e]?.employee ?? 0) })
271
277
  },
272
278
  {
273
279
  key: "byYourCompany",
274
280
  title: r("tableHeaders.byYourCompany"),
275
- render: (e) => /* @__PURE__ */ t(n, { children: o(C[e]?.employer ?? 0) })
281
+ render: (e) => /* @__PURE__ */ t(a, { children: o(C[e]?.employer ?? 0) })
276
282
  }
277
283
  ],
278
284
  footer: () => ({
279
- taxDescription: /* @__PURE__ */ t(n, { children: r("totalsLabel") }),
280
- byYourEmployees: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employeeTaxes ?? 0)) }),
281
- byYourCompany: /* @__PURE__ */ t(n, { children: o(Number(i.totals?.employerTaxes ?? 0)) })
285
+ taxDescription: /* @__PURE__ */ t(a, { children: r("totalsLabel") }),
286
+ byYourEmployees: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.employeeTaxes ?? 0)) }),
287
+ byYourCompany: /* @__PURE__ */ t(a, { children: o(Number(i.totals?.employerTaxes ?? 0)) })
282
288
  }),
283
289
  data: Object.keys(C)
284
290
  }
285
291
  ),
286
292
  /* @__PURE__ */ t(
287
- y,
293
+ p,
288
294
  {
289
295
  label: r("dataViews.debitedTable"),
290
296
  columns: [
291
297
  {
292
298
  title: r("tableHeaders.debitedByGusto"),
293
- render: ({ label: e }) => /* @__PURE__ */ t(n, { children: e })
299
+ render: ({ label: e }) => /* @__PURE__ */ t(a, { children: e })
294
300
  },
295
301
  {
296
302
  title: r("tableHeaders.taxesTotal"),
297
- render: ({ value: e }) => /* @__PURE__ */ t(n, { children: o(Number(e)) })
303
+ render: ({ value: e }) => /* @__PURE__ */ t(a, { children: o(Number(e)) })
298
304
  }
299
305
  ],
300
306
  data: [
@@ -314,7 +320,7 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
314
320
  ] })
315
321
  }
316
322
  ];
317
- return /* @__PURE__ */ t("div", { ref: M, className: oe.container, children: /* @__PURE__ */ s(m, { flexDirection: "column", alignItems: "stretch", children: [
323
+ return /* @__PURE__ */ t("div", { ref: A, className: ue.container, children: /* @__PURE__ */ s(m, { flexDirection: "column", alignItems: "stretch", children: [
318
324
  /* @__PURE__ */ s(
319
325
  m,
320
326
  {
@@ -323,54 +329,68 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
323
329
  alignItems: d ? "flex-start" : "stretch",
324
330
  gap: d ? 0 : 16,
325
331
  children: [
326
- /* @__PURE__ */ s(R, { flexGrow: 1, children: [
327
- /* @__PURE__ */ t(D, { as: "h1", children: r(P ? "summaryTitle" : "overviewTitle") }),
328
- /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
329
- ae,
332
+ /* @__PURE__ */ s(F, { flexGrow: 1, children: [
333
+ /* @__PURE__ */ t(N, { as: "h1", children: r(D ? "summaryTitle" : "overviewTitle") }),
334
+ /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(
335
+ de,
330
336
  {
331
337
  i18nKey: "pageSubtitle",
332
338
  t: r,
333
- components: { dateWrapper: /* @__PURE__ */ t(n, { weight: "bold", as: "span" }) },
334
- values: he(i.payPeriod, b)
339
+ components: { dateWrapper: /* @__PURE__ */ t(a, { weight: "bold", as: "span" }) },
340
+ values: Ce(i.payPeriod, b)
335
341
  }
336
342
  ) })
337
343
  ] }),
338
- /* @__PURE__ */ t(R, { flexGrow: d ? 1 : 0, children: /* @__PURE__ */ t(
344
+ /* @__PURE__ */ t(F, { flexGrow: d ? 1 : 0, children: /* @__PURE__ */ t(
339
345
  m,
340
346
  {
341
347
  flexDirection: d ? "row" : "column",
342
348
  justifyContent: d ? "flex-end" : "normal",
343
349
  alignItems: d ? "flex-start" : "stretch",
344
350
  gap: 12,
345
- children: P ? /* @__PURE__ */ s(T, { children: [
346
- /* @__PURE__ */ t(f, { onClick: F, variant: "secondary", isDisabled: p, children: r("payrollReceiptCta") }),
351
+ children: D ? /* @__PURE__ */ s(H, { children: [
352
+ /* @__PURE__ */ t(T, { onClick: X, variant: "secondary", isDisabled: y, children: r("payrollReceiptCta") }),
347
353
  /* @__PURE__ */ t(
348
- f,
354
+ T,
349
355
  {
350
356
  onClick: () => {
351
- O(!0);
357
+ _(!0);
352
358
  },
353
359
  variant: "error",
354
- isDisabled: p,
360
+ isDisabled: y,
355
361
  children: r("cancelCta")
356
362
  }
357
363
  )
358
- ] }) : /* @__PURE__ */ s(T, { children: [
359
- /* @__PURE__ */ t(f, { onClick: u, variant: "secondary", isDisabled: p, children: r("editCta") }),
360
- /* @__PURE__ */ t(f, { onClick: x, isDisabled: p, children: r("submitCta") })
364
+ ] }) : /* @__PURE__ */ s(H, { children: [
365
+ /* @__PURE__ */ t(T, { onClick: u, variant: "secondary", isDisabled: y, children: r("editCta") }),
366
+ /* @__PURE__ */ t(
367
+ T,
368
+ {
369
+ onClick: P,
370
+ isDisabled: y || h.length > 0 && (h.some(
371
+ (e) => !G.includes(
372
+ e.blockerType || ""
373
+ )
374
+ ) || h.some(
375
+ (e) => !v[e.blockerType || ""]
376
+ )),
377
+ children: r("submitCta")
378
+ }
379
+ )
361
380
  ] })
362
381
  }
363
382
  ) })
364
383
  ]
365
384
  }
366
385
  ),
367
- p ? /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ s(m, { flexDirection: "column", alignItems: "center", gap: 4, children: [
368
- /* @__PURE__ */ t(q, { size: "lg" }),
369
- /* @__PURE__ */ t(D, { as: "h4", children: r("loadingTitle") }),
370
- /* @__PURE__ */ t(n, { children: r("loadingDescription") })
371
- ] }) }) : /* @__PURE__ */ s(T, { children: [
372
- v.length > 0 && /* @__PURE__ */ t(m, { flexDirection: "column", gap: 16, children: v.map((e, a) => /* @__PURE__ */ t(
373
- E,
386
+ y ? /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ s(m, { flexDirection: "column", alignItems: "center", gap: 4, children: [
387
+ /* @__PURE__ */ t(te, { size: "lg" }),
388
+ /* @__PURE__ */ t(N, { as: "h4", children: r("loadingTitle") }),
389
+ /* @__PURE__ */ t(a, { children: r("loadingDescription") })
390
+ ] }) }) : /* @__PURE__ */ s(H, { children: [
391
+ J,
392
+ L.length > 0 && /* @__PURE__ */ t(m, { flexDirection: "column", gap: 16, children: L.map((e, n) => /* @__PURE__ */ t(
393
+ S,
374
394
  {
375
395
  label: e.title,
376
396
  status: e.type,
@@ -378,61 +398,73 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
378
398
  },
379
399
  `${e.type}-${e.title}`
380
400
  )) }),
381
- /* @__PURE__ */ t(D, { as: "h3", children: r("payrollSummaryTitle") }),
401
+ h.length > 0 && O && h.map((e) => {
402
+ const n = e.blockerType || "";
403
+ return G.includes(n) ? /* @__PURE__ */ t(
404
+ xe,
405
+ {
406
+ blocker: e,
407
+ selectedValue: v[n],
408
+ onUnblockOptionChange: O
409
+ },
410
+ n
411
+ ) : /* @__PURE__ */ t(Pe, { blocker: e }, n);
412
+ }),
413
+ /* @__PURE__ */ t(N, { as: "h3", children: r("payrollSummaryTitle") }),
382
414
  /* @__PURE__ */ t(
383
- y,
415
+ p,
384
416
  {
385
417
  label: r("payrollSummaryLabel"),
386
418
  columns: [
387
419
  {
388
420
  title: r("tableHeaders.totalPayroll"),
389
- render: () => /* @__PURE__ */ t(n, { children: o(I) })
421
+ render: () => /* @__PURE__ */ t(a, { children: o(I) })
390
422
  },
391
423
  {
392
424
  title: r("tableHeaders.debitAmount"),
393
- render: () => /* @__PURE__ */ t(n, { children: o(Number(i.totals?.companyDebit ?? 0)) })
425
+ render: () => /* @__PURE__ */ t(a, { children: o(Number(i.totals?.companyDebit ?? 0)) })
394
426
  },
395
427
  {
396
428
  title: r("tableHeaders.debitAccount"),
397
- render: () => /* @__PURE__ */ t(n, { children: X?.hiddenAccountNumber ?? "" })
429
+ render: () => /* @__PURE__ */ t(a, { children: q?.hiddenAccountNumber ?? "" })
398
430
  },
399
431
  {
400
432
  title: r("tableHeaders.debitDate"),
401
- render: () => /* @__PURE__ */ t(n, { children: b.formatShortWithYear(ee) })
433
+ render: () => /* @__PURE__ */ t(a, { children: b.formatShortWithYear(le) })
402
434
  },
403
435
  {
404
436
  title: r("tableHeaders.employeesPayDate"),
405
- render: () => /* @__PURE__ */ t(n, { children: b.formatShortWithYear(i.checkDate) })
437
+ render: () => /* @__PURE__ */ t(a, { children: b.formatShortWithYear(i.checkDate) })
406
438
  }
407
439
  ],
408
440
  data: [{}]
409
441
  }
410
442
  ),
411
- V > 0 && /* @__PURE__ */ t(
412
- E,
443
+ B > 0 && /* @__PURE__ */ t(
444
+ S,
413
445
  {
414
446
  status: "warning",
415
- label: r("alerts.checkPaymentWarning", { count: V }),
416
- children: /* @__PURE__ */ t(n, { children: r("alerts.checkPaymentWarningDescription") })
447
+ label: r("alerts.checkPaymentWarning", { count: B }),
448
+ children: /* @__PURE__ */ t(a, { children: r("alerts.checkPaymentWarningDescription") })
417
449
  }
418
450
  ),
419
451
  /* @__PURE__ */ t(
420
- K,
452
+ ee,
421
453
  {
422
- onSelectionChange: Q,
423
- selectedId: J,
454
+ onSelectionChange: ae,
455
+ selectedId: re,
424
456
  "aria-label": r("dataViews.label"),
425
- tabs: re
457
+ tabs: oe
426
458
  }
427
459
  ),
428
- L && /* @__PURE__ */ t(
429
- z,
460
+ M && /* @__PURE__ */ t(
461
+ Z,
430
462
  {
431
- isOpen: L,
463
+ isOpen: M,
432
464
  onClose: () => {
433
- O(!1);
465
+ _(!1);
434
466
  },
435
- onPrimaryActionClick: Y,
467
+ onPrimaryActionClick: K,
436
468
  shouldCloseOnBackdropClick: !0,
437
469
  primaryActionLabel: r("confirmCancelCta"),
438
470
  isDestructive: !0,
@@ -442,8 +474,8 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
442
474
  endDate: b.formatLongWithYear(i.payPeriod?.endDate)
443
475
  }),
444
476
  children: /* @__PURE__ */ s(m, { gap: 14, flexDirection: "column", children: [
445
- /* @__PURE__ */ t(n, { children: r("cancelDialogDescription") }),
446
- /* @__PURE__ */ t(n, { children: r("cancelDialogDescriptionDeadline", {
477
+ /* @__PURE__ */ t(a, { children: r("cancelDialogDescription") }),
478
+ /* @__PURE__ */ t(a, { children: r("cancelDialogDescriptionDeadline", {
447
479
  deadline: b.formatWithTime(i.payrollDeadline).time
448
480
  }) })
449
481
  ] })
@@ -453,6 +485,6 @@ const he = (u, x) => u?.startDate && u.endDate ? x.formatPayPeriod(u.startDate,
453
485
  ] }) });
454
486
  };
455
487
  export {
456
- Se as PayrollOverviewPresentation
488
+ Fe as PayrollOverviewPresentation
457
489
  };
458
490
  //# sourceMappingURL=PayrollOverviewPresentation.js.map