@gusto/embedded-react-sdk 0.23.1 → 0.24.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 (213) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/components/Common/PayrollLoading/PayrollLoading.d.ts +2 -0
  3. package/dist/components/Common/PayrollLoading/PayrollLoading.js +19 -0
  4. package/dist/components/Common/PayrollLoading/PayrollLoading.js.map +1 -0
  5. package/dist/components/Common/PayrollLoading/PayrollLoadingTypes.d.ts +5 -0
  6. package/dist/components/Common/PayrollLoading/index.d.ts +3 -0
  7. package/dist/components/Common/SignatureForm/SignatureForm.js +11 -12
  8. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  9. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
  11. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  12. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  13. package/dist/components/Common/index.d.ts +1 -0
  14. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  15. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  16. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  21. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  22. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  24. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  25. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -6
  27. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  28. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  29. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  30. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -6
  31. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  32. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  33. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  34. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  35. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  36. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  37. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  38. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  39. package/dist/components/Company/FederalTaxes/Form.js +3 -4
  40. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  41. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
  42. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  43. package/dist/components/Company/Industry/Context.js +6 -7
  44. package/dist/components/Company/Industry/Context.js.map +1 -1
  45. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  46. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
  47. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  48. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  49. package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
  50. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  51. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  52. package/dist/components/Company/OnboardingOverview/Completed.js +2 -3
  53. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  54. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  55. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  56. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  57. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  58. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  59. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  60. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  61. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -9
  62. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  63. package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
  64. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  65. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  66. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  67. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  68. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  69. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  70. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  71. package/dist/components/Contractor/Address/Address.js +2 -2
  72. package/dist/components/Contractor/Address/Form.js +1 -1
  73. package/dist/components/Contractor/Address/useAddress.js +5 -6
  74. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  75. package/dist/components/Contractor/ContractorList/index.js +17 -17
  76. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  77. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  78. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +13 -14
  79. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  80. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  81. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +9 -10
  82. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  83. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -3
  84. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  85. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +12 -13
  86. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  87. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  88. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  89. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  90. package/dist/components/Contractor/Submit/Submit.js +1 -1
  91. package/dist/components/Employee/Compensation/Edit.js +14 -14
  92. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
  93. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  94. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -12
  95. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  96. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
  97. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  98. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  99. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  100. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  101. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  102. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  103. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  104. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  105. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  106. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  107. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  108. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  109. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  110. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  111. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  112. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  113. package/dist/components/Employee/FederalTaxes/FederalForm.js +9 -7
  114. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  115. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  116. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  117. package/dist/components/Employee/Landing/Landing.js +8 -8
  118. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  119. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  120. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  121. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  122. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  123. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  124. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  125. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  126. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  127. package/dist/components/Employee/Profile/useProfile.js +3 -4
  128. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  129. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  130. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  131. package/dist/components/Employee/Taxes/FederalForm.js +8 -6
  132. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  133. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  134. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  135. package/dist/components/Flow/Flow.js +2 -3
  136. package/dist/components/Flow/Flow.js.map +1 -1
  137. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +4 -4
  138. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +26 -21
  139. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  140. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  141. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -1
  142. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +8 -1
  143. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +6 -7
  144. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  145. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +2 -3
  146. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  147. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +2 -1
  148. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +56 -54
  149. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  150. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -1
  151. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +90 -91
  152. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  153. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +2 -1
  154. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +33 -31
  155. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  156. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -1
  157. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +72 -71
  158. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  159. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +8 -9
  160. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  161. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
  162. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +24 -18
  163. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  164. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -0
  165. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +77 -51
  166. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  167. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +17 -18
  168. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  169. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +4 -1
  170. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +29 -21
  171. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  172. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +5 -0
  173. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +36 -26
  174. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  175. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +16 -17
  176. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  177. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +4 -1
  178. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +70 -60
  179. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  180. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  181. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +237 -232
  182. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  183. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -3
  184. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  185. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +2 -1
  186. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +25 -15
  187. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  188. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +2 -1
  189. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +152 -138
  190. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  191. package/dist/components/Payroll/index.d.ts +1 -0
  192. package/dist/components/Payroll/usePreparedPayrollData.js +5 -6
  193. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  194. package/dist/contexts/ApiProvider/ApiProvider.d.ts +3 -1
  195. package/dist/contexts/ApiProvider/ApiProvider.js +26 -18
  196. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  197. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  198. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  199. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  200. package/dist/contexts/GustoProvider/GustoProvider.d.ts +2 -0
  201. package/dist/contexts/GustoProvider/GustoProvider.js +12 -11
  202. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  203. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +24 -14
  204. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  205. package/dist/i18n/en/common.json.d.ts +1 -0
  206. package/dist/i18n/en/common.json.js +1 -1
  207. package/dist/index.d.ts +1 -0
  208. package/dist/shared/constants.d.ts +1 -1
  209. package/dist/shared/constants.js +6 -5
  210. package/dist/shared/constants.js.map +1 -1
  211. package/dist/style.css +1 -1
  212. package/dist/types/i18next.d.ts +1 -0
  213. package/package.json +5 -5
@@ -4,7 +4,6 @@ import { getPayrollType as I, calculateTotalPayroll as L } from "../helpers.js";
4
4
  import j from "./PayrollHistoryPresentation.module.scss.js";
5
5
  import { Flex as c } from "../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
- import "../../../shared/constants.js";
8
7
  import { HamburgerMenu as V } from "../../Common/HamburgerMenu/HamburgerMenu.js";
9
8
  import { useComponentContext as Y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
10
9
  import { formatNumberAsCurrency as q } from "../../../helpers/formattedStrings.js";
@@ -15,7 +14,7 @@ import W from "../../../assets/icons/icon-file-outline.svg.js";
15
14
  import _ from "../../../assets/icons/icon-receipt-outline.svg.js";
16
15
  import { PayrollStatusBadges as z } from "../PayrollStatusBadges/PayrollStatusBadges.js";
17
16
  import { DataView as E } from "../../Common/DataView/DataView.js";
18
- const ue = ({
17
+ const de = ({
19
18
  payrollHistory: y,
20
19
  wireInRequests: g,
21
20
  selectedTimeFilter: P,
@@ -23,7 +22,7 @@ const ue = ({
23
22
  onViewSummary: w,
24
23
  onViewReceipt: b,
25
24
  onCancelPayroll: C,
26
- cancelDialogItem: i,
25
+ cancelDialogItem: a,
27
26
  onCancelDialogOpen: F,
28
27
  onCancelDialogClose: T,
29
28
  isLoading: v = !1
@@ -38,7 +37,7 @@ const ue = ({
38
37
  if (e.payrollStatusMeta?.cancellable === !1)
39
38
  return !1;
40
39
  if (e.processed && e.payrollDeadline) {
41
- const o = /* @__PURE__ */ new Date(), n = new Date(e.payrollDeadline), a = h(o), s = new Date(o.getTime() + a * 60 * 60 * 1e3), m = new Date(
40
+ const o = /* @__PURE__ */ new Date(), n = new Date(e.payrollDeadline), i = h(o), s = new Date(o.getTime() + i * 60 * 60 * 1e3), m = new Date(
42
41
  n.getTime() + h(n) * 60 * 60 * 1e3
43
42
  );
44
43
  if (s.toDateString() === m.toDateString()) {
@@ -51,27 +50,27 @@ const ue = ({
51
50
  }, h = (e) => {
52
51
  const o = e.getFullYear(), n = new Date(o, 2, 1);
53
52
  n.setDate(1 + (7 - n.getDay()) + 7);
54
- const a = new Date(o, 10, 1);
55
- return a.setDate(1 + (7 - a.getDay()) % 7), e >= n && e < a ? -7 : -8;
53
+ const i = new Date(o, 10, 1);
54
+ return i.setDate(1 + (7 - i.getDay()) % 7), e >= n && e < i ? -7 : -8;
56
55
  }, O = (e) => {
57
56
  const o = e.payrollDeadline;
58
57
  if (!o) return "";
59
- const n = new Date(o), a = "America/New_York", s = new Intl.DateTimeFormat("en-US", {
58
+ const n = new Date(o), i = "America/New_York", s = new Intl.DateTimeFormat("en-US", {
60
59
  weekday: "short",
61
60
  month: "short",
62
61
  day: "numeric",
63
- timeZone: a
62
+ timeZone: i
64
63
  }), m = new Intl.DateTimeFormat("en-US", {
65
64
  hour: "numeric",
66
65
  minute: "2-digit",
67
66
  timeZoneName: "short",
68
- timeZone: a
67
+ timeZone: i
69
68
  }), D = s.format(n);
70
69
  return `${m.format(n)} on ${D}`;
71
70
  }, R = (e) => {
72
71
  F(e);
73
72
  }, M = () => {
74
- i && C(i);
73
+ a && C(a);
75
74
  }, N = (e) => {
76
75
  const o = e.payrollUuid || e.uuid, n = [
77
76
  {
@@ -168,23 +167,23 @@ const ue = ({
168
167
  /* @__PURE__ */ r(
169
168
  k,
170
169
  {
171
- isOpen: !!i,
170
+ isOpen: !!a,
172
171
  onClose: T,
173
172
  onPrimaryActionClick: M,
174
173
  isDestructive: !0,
175
174
  isPrimaryActionLoading: v,
176
175
  primaryActionLabel: t("cancelDialog.primaryAction"),
177
176
  closeActionLabel: t("cancelDialog.secondaryAction"),
178
- title: i ? t("cancelDialog.title", {
177
+ title: a ? t("cancelDialog.title", {
179
178
  payPeriod: u.formatPayPeriodRange(
180
- i.payPeriod?.startDate,
181
- i.payPeriod?.endDate
179
+ a.payPeriod?.startDate,
180
+ a.payPeriod?.endDate
182
181
  )
183
182
  }) : "",
184
- children: i && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
183
+ children: a && /* @__PURE__ */ d(c, { flexDirection: "column", gap: 16, children: [
185
184
  /* @__PURE__ */ r(l, { children: t("cancelDialog.body") }),
186
- i.payrollDeadline && /* @__PURE__ */ r(l, { children: t("cancelDialog.deadline", {
187
- deadline: O(i)
185
+ a.payrollDeadline && /* @__PURE__ */ r(l, { children: t("cancelDialog.deadline", {
186
+ deadline: O(a)
188
187
  }) })
189
188
  ] })
190
189
  }
@@ -192,6 +191,6 @@ const ue = ({
192
191
  ] });
193
192
  };
194
193
  export {
195
- ue as PayrollHistoryPresentation
194
+ de as PayrollHistoryPresentation
196
195
  };
197
196
  //# sourceMappingURL=PayrollHistoryPresentation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollHistoryPresentation.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Payroll } from '@gusto/embedded-api/models/components/payroll'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollType, calculateTotalPayroll } from '../helpers'\nimport type { TimeFilterOption } from './PayrollHistory'\nimport styles from './PayrollHistoryPresentation.module.scss'\nimport type { MenuItem } from '@/components/Common/UI/Menu/MenuTypes'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport TrashcanIcon from '@/assets/icons/trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\nimport ReceiptIcon from '@/assets/icons/icon-receipt-outline.svg?react'\n\ninterface PayrollHistoryPresentationProps {\n payrollHistory: Payroll[]\n wireInRequests: WireInRequest[]\n selectedTimeFilter: TimeFilterOption\n onTimeFilterChange: (value: TimeFilterOption) => void\n onViewSummary: (payrollId: string) => void\n onViewReceipt: (payrollId: string) => void\n onCancelPayroll: (item: Payroll) => void\n cancelDialogItem: Payroll | null\n onCancelDialogOpen: (item: Payroll) => void\n onCancelDialogClose: () => void\n isLoading?: boolean\n}\n\nexport const PayrollHistoryPresentation = ({\n payrollHistory,\n wireInRequests,\n selectedTimeFilter,\n onTimeFilterChange,\n onViewSummary,\n onViewReceipt,\n onCancelPayroll,\n cancelDialogItem,\n onCancelDialogOpen,\n onCancelDialogClose,\n isLoading = false,\n}: PayrollHistoryPresentationProps) => {\n const { Heading, Text, Select, Dialog } = useComponentContext()\n useI18n('Payroll.PayrollHistory')\n const { t } = useTranslation('Payroll.PayrollHistory')\n const dateFormatter = useDateFormatter()\n\n const timeFilterOptions = [\n { value: '3months', label: t('timeFilter.options.3months') },\n { value: '6months', label: t('timeFilter.options.6months') },\n { value: 'year', label: t('timeFilter.options.year') },\n ]\n\n const canCancelPayroll = (item: Payroll) => {\n if (item.payrollStatusMeta?.cancellable === false) {\n return false\n }\n\n if (item.processed && item.payrollDeadline) {\n const now = new Date()\n const deadline = new Date(item.payrollDeadline)\n\n const ptOffset = getPacificTimeOffset(now)\n const nowInPT = new Date(now.getTime() + ptOffset * 60 * 60 * 1000)\n const deadlineInPT = new Date(\n deadline.getTime() + getPacificTimeOffset(deadline) * 60 * 60 * 1000,\n )\n\n const isSameDay = nowInPT.toDateString() === deadlineInPT.toDateString()\n if (isSameDay) {\n const cutoffTime = new Date(deadlineInPT)\n cutoffTime.setHours(15, 30, 0, 0)\n\n if (nowInPT > cutoffTime) {\n return false\n }\n }\n }\n\n return true\n }\n\n const getPacificTimeOffset = (date: Date): number => {\n const year = date.getFullYear()\n\n const secondSundayMarch = new Date(year, 2, 1)\n secondSundayMarch.setDate(1 + (7 - secondSundayMarch.getDay()) + 7)\n\n const firstSundayNovember = new Date(year, 10, 1)\n firstSundayNovember.setDate(1 + ((7 - firstSundayNovember.getDay()) % 7))\n\n const isDST = date >= secondSundayMarch && date < firstSundayNovember\n return isDST ? -7 : -8\n }\n\n const formatDeadlineForDialog = (item: Payroll): string => {\n const deadline = item.payrollDeadline\n if (!deadline) return ''\n\n const deadlineDate = new Date(deadline)\n const timeZone = 'America/New_York'\n\n const formatter = new Intl.DateTimeFormat('en-US', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n })\n\n const timeFormatter = new Intl.DateTimeFormat('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n timeZone,\n })\n\n const dateStr = formatter.format(deadlineDate)\n const timeStr = timeFormatter.format(deadlineDate)\n\n return `${timeStr} on ${dateStr}`\n }\n\n const handleCancelClick = (item: Payroll) => {\n onCancelDialogOpen(item)\n }\n\n const handleConfirmCancel = () => {\n if (cancelDialogItem) {\n onCancelPayroll(cancelDialogItem)\n }\n }\n\n const getMenuItems = (item: Payroll): MenuItem[] => {\n const payrollId = item.payrollUuid || item.uuid!\n const items: MenuItem[] = [\n {\n label: t('menu.viewSummary'),\n icon: <FileIcon aria-hidden />,\n onClick: () => {\n onViewSummary(payrollId)\n },\n },\n {\n label: t('menu.viewReceipt'),\n icon: <ReceiptIcon aria-hidden />,\n onClick: () => {\n onViewReceipt(payrollId)\n },\n },\n ]\n\n if (canCancelPayroll(item)) {\n items.push({\n label: t('menu.cancelPayroll'),\n icon: <TrashcanIcon aria-hidden />,\n onClick: () => {\n handleCancelClick(item)\n },\n 'data-destructive': 'true',\n })\n }\n\n return items\n }\n\n if (payrollHistory.length === 0) {\n return (\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={24}>\n <Heading as=\"h3\">{t('emptyState.title')}</Heading>\n <Text>{t('emptyState.description')}</Text>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Flex\n flexDirection={{ base: 'column', medium: 'row' }}\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n gap={{ base: 12, medium: 24 }}\n >\n <Flex>\n <Heading as=\"h2\">{t('title')}</Heading>\n </Flex>\n <div className={styles.timeFilterContainer}>\n <Select\n value={selectedTimeFilter}\n onChange={(value: string) => {\n onTimeFilterChange(value as TimeFilterOption)\n }}\n options={timeFilterOptions}\n label={t('timeFilter.placeholder')}\n shouldVisuallyHideLabel\n isRequired\n />\n </div>\n </Flex>\n\n <DataView\n label={t('dataView.label')}\n columns={[\n {\n title: t('columns.payPeriod'),\n render: (item: Payroll) => (\n <Text>\n {dateFormatter.formatPayPeriodRange(\n item.payPeriod?.startDate,\n item.payPeriod?.endDate,\n )}\n </Text>\n ),\n },\n {\n title: t('columns.type'),\n render: (item: Payroll) => <Text>{getPayrollType(item)}</Text>,\n },\n {\n title: t('columns.payDate'),\n render: (item: Payroll) => (\n <Text>{dateFormatter.formatShortWithYear(item.checkDate)}</Text>\n ),\n },\n {\n title: t('columns.status'),\n render: (item: Payroll) => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === item.payrollUuid,\n )\n return <PayrollStatusBadges payroll={item} wireInRequest={wireInRequest} />\n },\n },\n {\n title: t('columns.totalPayroll'),\n render: (item: Payroll) => (\n <Text weight=\"semibold\">{formatNumberAsCurrency(calculateTotalPayroll(item))}</Text>\n ),\n },\n ]}\n data={payrollHistory}\n itemMenu={(item: Payroll) => <HamburgerMenu items={getMenuItems(item)} />}\n />\n\n <Dialog\n isOpen={!!cancelDialogItem}\n onClose={onCancelDialogClose}\n onPrimaryActionClick={handleConfirmCancel}\n isDestructive\n isPrimaryActionLoading={isLoading}\n primaryActionLabel={t('cancelDialog.primaryAction')}\n closeActionLabel={t('cancelDialog.secondaryAction')}\n title={\n cancelDialogItem\n ? t('cancelDialog.title', {\n payPeriod: dateFormatter.formatPayPeriodRange(\n cancelDialogItem.payPeriod?.startDate,\n cancelDialogItem.payPeriod?.endDate,\n ),\n })\n : ''\n }\n >\n {cancelDialogItem && (\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('cancelDialog.body')}</Text>\n {cancelDialogItem.payrollDeadline && (\n <Text>\n {t('cancelDialog.deadline', {\n deadline: formatDeadlineForDialog(cancelDialogItem),\n })}\n </Text>\n )}\n </Flex>\n )}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["PayrollHistoryPresentation","payrollHistory","wireInRequests","selectedTimeFilter","onTimeFilterChange","onViewSummary","onViewReceipt","onCancelPayroll","cancelDialogItem","onCancelDialogOpen","onCancelDialogClose","isLoading","Heading","Text","Select","Dialog","useComponentContext","useI18n","useTranslation","dateFormatter","useDateFormatter","timeFilterOptions","canCancelPayroll","item","now","deadline","ptOffset","getPacificTimeOffset","nowInPT","deadlineInPT","cutoffTime","date","year","secondSundayMarch","firstSundayNovember","formatDeadlineForDialog","deadlineDate","timeZone","formatter","timeFormatter","dateStr","handleCancelClick","handleConfirmCancel","getMenuItems","payrollId","items","jsx","FileIcon","ReceiptIcon","TrashcanIcon","Flex","jsxs","styles","value","DataView","getPayrollType","wireInRequest","wire","PayrollStatusBadges","formatNumberAsCurrency","calculateTotalPayroll","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;;AAgCO,MAAMA,KAA6B,CAAC;AAAA,EACzC,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAA;AAC1C,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAg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EH,IACI,EAAE,sBAAsB;AAAA,UACtB,WAAWW,EAAc;AAAA,YACvBX,EAAiB,WAAW;AAAA,YAC5BA,EAAiB,WAAW;AAAA,UAAA;AAAA,QAC9B,CACD,IACD;AAAA,QAGL,eACC,gBAAA2C,EAACD,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,UAAA,gBAAAJ,EAACjC,GAAA,EAAM,UAAA,EAAE,mBAAmB,EAAA,CAAE;AAAA,UAC7BL,EAAiB,mBAChB,gBAAAsC,EAACjC,GAAA,EACE,YAAE,yBAAyB;AAAA,YAC1B,UAAUsB,EAAwB3B,CAAgB;AAAA,UAAA,CACnD,EAAA,CACH;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
1
+ {"version":3,"file":"PayrollHistoryPresentation.js","sources":["../../../../src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Payroll } from '@gusto/embedded-api/models/components/payroll'\nimport type { WireInRequest } from '@gusto/embedded-api/models/components/wireinrequest'\nimport { PayrollStatusBadges } from '../PayrollStatusBadges'\nimport { getPayrollType, calculateTotalPayroll } from '../helpers'\nimport type { TimeFilterOption } from './PayrollHistory'\nimport styles from './PayrollHistoryPresentation.module.scss'\nimport type { MenuItem } from '@/components/Common/UI/Menu/MenuTypes'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { formatNumberAsCurrency } from '@/helpers/formattedStrings'\nimport { useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport TrashcanIcon from '@/assets/icons/trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\nimport ReceiptIcon from '@/assets/icons/icon-receipt-outline.svg?react'\n\ninterface PayrollHistoryPresentationProps {\n payrollHistory: Payroll[]\n wireInRequests: WireInRequest[]\n selectedTimeFilter: TimeFilterOption\n onTimeFilterChange: (value: TimeFilterOption) => void\n onViewSummary: (payrollId: string) => void\n onViewReceipt: (payrollId: string) => void\n onCancelPayroll: (item: Payroll) => void\n cancelDialogItem: Payroll | null\n onCancelDialogOpen: (item: Payroll) => void\n onCancelDialogClose: () => void\n isLoading?: boolean\n}\n\nexport const PayrollHistoryPresentation = ({\n payrollHistory,\n wireInRequests,\n selectedTimeFilter,\n onTimeFilterChange,\n onViewSummary,\n onViewReceipt,\n onCancelPayroll,\n cancelDialogItem,\n onCancelDialogOpen,\n onCancelDialogClose,\n isLoading = false,\n}: PayrollHistoryPresentationProps) => {\n const { Heading, Text, Select, Dialog } = useComponentContext()\n useI18n('Payroll.PayrollHistory')\n const { t } = useTranslation('Payroll.PayrollHistory')\n const dateFormatter = useDateFormatter()\n\n const timeFilterOptions = [\n { value: '3months', label: t('timeFilter.options.3months') },\n { value: '6months', label: t('timeFilter.options.6months') },\n { value: 'year', label: t('timeFilter.options.year') },\n ]\n\n const canCancelPayroll = (item: Payroll) => {\n if (item.payrollStatusMeta?.cancellable === false) {\n return false\n }\n\n if (item.processed && item.payrollDeadline) {\n const now = new Date()\n const deadline = new Date(item.payrollDeadline)\n\n const ptOffset = getPacificTimeOffset(now)\n const nowInPT = new Date(now.getTime() + ptOffset * 60 * 60 * 1000)\n const deadlineInPT = new Date(\n deadline.getTime() + getPacificTimeOffset(deadline) * 60 * 60 * 1000,\n )\n\n const isSameDay = nowInPT.toDateString() === deadlineInPT.toDateString()\n if (isSameDay) {\n const cutoffTime = new Date(deadlineInPT)\n cutoffTime.setHours(15, 30, 0, 0)\n\n if (nowInPT > cutoffTime) {\n return false\n }\n }\n }\n\n return true\n }\n\n const getPacificTimeOffset = (date: Date): number => {\n const year = date.getFullYear()\n\n const secondSundayMarch = new Date(year, 2, 1)\n secondSundayMarch.setDate(1 + (7 - secondSundayMarch.getDay()) + 7)\n\n const firstSundayNovember = new Date(year, 10, 1)\n firstSundayNovember.setDate(1 + ((7 - firstSundayNovember.getDay()) % 7))\n\n const isDST = date >= secondSundayMarch && date < firstSundayNovember\n return isDST ? -7 : -8\n }\n\n const formatDeadlineForDialog = (item: Payroll): string => {\n const deadline = item.payrollDeadline\n if (!deadline) return ''\n\n const deadlineDate = new Date(deadline)\n const timeZone = 'America/New_York'\n\n const formatter = new Intl.DateTimeFormat('en-US', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n timeZone,\n })\n\n const timeFormatter = new Intl.DateTimeFormat('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n timeZone,\n })\n\n const dateStr = formatter.format(deadlineDate)\n const timeStr = timeFormatter.format(deadlineDate)\n\n return `${timeStr} on ${dateStr}`\n }\n\n const handleCancelClick = (item: Payroll) => {\n onCancelDialogOpen(item)\n }\n\n const handleConfirmCancel = () => {\n if (cancelDialogItem) {\n onCancelPayroll(cancelDialogItem)\n }\n }\n\n const getMenuItems = (item: Payroll): MenuItem[] => {\n const payrollId = item.payrollUuid || item.uuid!\n const items: MenuItem[] = [\n {\n label: t('menu.viewSummary'),\n icon: <FileIcon aria-hidden />,\n onClick: () => {\n onViewSummary(payrollId)\n },\n },\n {\n label: t('menu.viewReceipt'),\n icon: <ReceiptIcon aria-hidden />,\n onClick: () => {\n onViewReceipt(payrollId)\n },\n },\n ]\n\n if (canCancelPayroll(item)) {\n items.push({\n label: t('menu.cancelPayroll'),\n icon: <TrashcanIcon aria-hidden />,\n onClick: () => {\n handleCancelClick(item)\n },\n 'data-destructive': 'true',\n })\n }\n\n return items\n }\n\n if (payrollHistory.length === 0) {\n return (\n <Flex flexDirection=\"column\" alignItems=\"center\" gap={24}>\n <Heading as=\"h3\">{t('emptyState.title')}</Heading>\n <Text>{t('emptyState.description')}</Text>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Flex\n flexDirection={{ base: 'column', medium: 'row' }}\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n gap={{ base: 12, medium: 24 }}\n >\n <Flex>\n <Heading as=\"h2\">{t('title')}</Heading>\n </Flex>\n <div className={styles.timeFilterContainer}>\n <Select\n value={selectedTimeFilter}\n onChange={(value: string) => {\n onTimeFilterChange(value as TimeFilterOption)\n }}\n options={timeFilterOptions}\n label={t('timeFilter.placeholder')}\n shouldVisuallyHideLabel\n isRequired\n />\n </div>\n </Flex>\n\n <DataView\n label={t('dataView.label')}\n columns={[\n {\n title: t('columns.payPeriod'),\n render: (item: Payroll) => (\n <Text>\n {dateFormatter.formatPayPeriodRange(\n item.payPeriod?.startDate,\n item.payPeriod?.endDate,\n )}\n </Text>\n ),\n },\n {\n title: t('columns.type'),\n render: (item: Payroll) => <Text>{getPayrollType(item)}</Text>,\n },\n {\n title: t('columns.payDate'),\n render: (item: Payroll) => (\n <Text>{dateFormatter.formatShortWithYear(item.checkDate)}</Text>\n ),\n },\n {\n title: t('columns.status'),\n render: (item: Payroll) => {\n const wireInRequest = wireInRequests.find(\n wire => wire.paymentUuid === item.payrollUuid,\n )\n return <PayrollStatusBadges payroll={item} wireInRequest={wireInRequest} />\n },\n },\n {\n title: t('columns.totalPayroll'),\n render: (item: Payroll) => (\n <Text weight=\"semibold\">{formatNumberAsCurrency(calculateTotalPayroll(item))}</Text>\n ),\n },\n ]}\n data={payrollHistory}\n itemMenu={(item: Payroll) => <HamburgerMenu items={getMenuItems(item)} />}\n />\n\n <Dialog\n isOpen={!!cancelDialogItem}\n onClose={onCancelDialogClose}\n onPrimaryActionClick={handleConfirmCancel}\n isDestructive\n isPrimaryActionLoading={isLoading}\n primaryActionLabel={t('cancelDialog.primaryAction')}\n closeActionLabel={t('cancelDialog.secondaryAction')}\n title={\n cancelDialogItem\n ? t('cancelDialog.title', {\n payPeriod: dateFormatter.formatPayPeriodRange(\n cancelDialogItem.payPeriod?.startDate,\n cancelDialogItem.payPeriod?.endDate,\n ),\n })\n : ''\n }\n >\n {cancelDialogItem && (\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('cancelDialog.body')}</Text>\n {cancelDialogItem.payrollDeadline && (\n <Text>\n {t('cancelDialog.deadline', {\n deadline: formatDeadlineForDialog(cancelDialogItem),\n })}\n </Text>\n )}\n </Flex>\n )}\n </Dialog>\n </Flex>\n )\n}\n"],"names":["PayrollHistoryPresentation","payrollHistory","wireInRequests","selectedTimeFilter","onTimeFilterChange","onViewSummary","onViewReceipt","onCancelPayroll","cancelDialogItem","onCancelDialogOpen","onCancelDialogClose","isLoading","Heading","Text","Select","Dialog","useComponentContext","useI18n","useTranslation","dateFormatter","useDateFormatter","timeFilterOptions","canCancelPayroll","item","now","deadline","ptOffset","getPacificTimeOffset","nowInPT","deadlineInPT","cutoffTime","date","year","secondSundayMarch","firstSundayNovember","formatDeadlineForDialog","deadlineDate","timeZone","formatter","timeFormatter","dateStr","handleCancelClick","handleConfirmCancel","getMenuItems","payrollId","items","jsx","FileIcon","ReceiptIcon","TrashcanIcon","Flex","jsxs","styles","value","DataView","getPayrollType","wireInRequest","wire","PayrollStatusBadges","formatNumberAsCurrency","calculateTotalPayroll","HamburgerMenu"],"mappings":";;;;;;;;;;;;;;;;AAgCO,MAAMA,KAA6B,CAAC;AAAA,EACzC,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAAuC;AACrC,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAA;AAC1C,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,EAAA,IAAMC,EAAe,wBAAwB,GAC/CC,IAAgBC,EAAA,GAEhBC,IAAoB;AAAA,IACxB,EAAE,OAAO,WAAW,OAAO,EA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AiB,WAAW;AAAA,YAC5BA,EAAiB,WAAW;AAAA,UAAA;AAAA,QAC9B,CACD,IACD;AAAA,QAGL,eACC,gBAAA2C,EAACD,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,UAAA,gBAAAJ,EAACjC,GAAA,EAAM,UAAA,EAAE,mBAAmB,EAAA,CAAE;AAAA,UAC7BL,EAAiB,mBAChB,gBAAAsC,EAACjC,GAAA,EACE,YAAE,yBAAyB;AAAA,YAC1B,UAAUsB,EAAwB3B,CAAgB;AAAA,UAAA,CACnD,EAAA,CACH;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
@@ -1,8 +1,11 @@
1
+ import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
1
2
  import { PayrollLandingFlowProps } from './PayrollLandingFlowComponents';
2
3
  import { BaseComponentInterface } from '../../Base/Base';
3
4
  interface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
4
5
  companyId: string;
6
+ withReimbursements?: boolean;
7
+ ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
5
8
  }
6
9
  export declare function PayrollLanding(props: PayrollLandingProps): import("react/jsx-runtime").JSX.Element;
7
- export declare function PayrollLandingFlow({ companyId, onEvent, dictionary }: PayrollLandingFlowProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function PayrollLandingFlow({ companyId, onEvent, dictionary, withReimbursements, ConfirmWireDetailsComponent, }: PayrollLandingFlowProps): import("react/jsx-runtime").JSX.Element;
8
11
  export {};
@@ -1,33 +1,41 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { useMemo as e } from "react";
3
- import { createMachine as m } from "robot3";
4
- import { payrollLandingMachine as l } from "./payrollLandingStateMachine.js";
5
- import { PayrollLandingTabsContextual as p } from "./PayrollLandingFlowComponents.js";
6
- import { Flow as c } from "../../Flow/Flow.js";
7
- import { BaseComponent as f } from "../../Base/Base.js";
8
- import { useComponentDictionary as u } from "../../../i18n/I18n.js";
9
- function C(o) {
10
- return /* @__PURE__ */ r(f, { ...o, children: /* @__PURE__ */ r(s, { ...o }) });
3
+ import { createMachine as c } from "robot3";
4
+ import { payrollLandingMachine as p } from "./payrollLandingStateMachine.js";
5
+ import { PayrollLandingTabsContextual as f } from "./PayrollLandingFlowComponents.js";
6
+ import { Flow as u } from "../../Flow/Flow.js";
7
+ import { BaseComponent as y } from "../../Base/Base.js";
8
+ import { useComponentDictionary as d } from "../../../i18n/I18n.js";
9
+ function T(o) {
10
+ return /* @__PURE__ */ r(y, { ...o, children: /* @__PURE__ */ r(g, { ...o }) });
11
11
  }
12
- function s({ companyId: o, onEvent: n, dictionary: t }) {
13
- u("Payroll.PayrollLanding", t);
14
- const a = e(
15
- () => m(
12
+ function g({
13
+ companyId: o,
14
+ onEvent: t,
15
+ dictionary: l,
16
+ withReimbursements: n = !0,
17
+ ConfirmWireDetailsComponent: a
18
+ }) {
19
+ d("Payroll.PayrollLanding", l);
20
+ const i = e(
21
+ () => c(
16
22
  "tabs",
17
- l,
18
- (i) => ({
19
- ...i,
20
- component: p,
23
+ p,
24
+ (m) => ({
25
+ ...m,
26
+ component: f,
21
27
  companyId: o,
22
- selectedTab: "run-payroll"
28
+ selectedTab: "run-payroll",
29
+ withReimbursements: n,
30
+ ConfirmWireDetailsComponent: a
23
31
  })
24
32
  ),
25
- [o]
33
+ [o, n, a]
26
34
  );
27
- return /* @__PURE__ */ r(c, { onEvent: n, machine: a });
35
+ return /* @__PURE__ */ r(u, { onEvent: t, machine: i });
28
36
  }
29
37
  export {
30
- C as PayrollLanding,
31
- s as PayrollLandingFlow
38
+ T as PayrollLanding,
39
+ g as PayrollLandingFlow
32
40
  };
33
41
  //# sourceMappingURL=PayrollLanding.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { payrollLandingMachine } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n}\n\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nexport function PayrollLandingFlow({ companyId, onEvent, dictionary }: PayrollLandingFlowProps) {\n useComponentDictionary('Payroll.PayrollLanding', dictionary)\n\n const machine = useMemo(\n () =>\n createMachine(\n 'tabs',\n payrollLandingMachine,\n (initialContext: PayrollLandingFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingTabsContextual,\n companyId,\n selectedTab: 'run-payroll',\n }),\n ),\n [companyId],\n )\n\n return <Flow onEvent={onEvent} machine={machine} />\n}\n"],"names":["PayrollLanding","props","jsx","BaseComponent","PayrollLandingFlow","companyId","onEvent","dictionary","useComponentDictionary","machine","useMemo","createMachine","payrollLandingMachine","initialContext","PayrollLandingTabsContextual","Flow"],"mappings":";;;;;;;;AAiBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAoB,GAAGH,GAAO,EAAA,CACjC;AAEJ;AAEO,SAASG,EAAmB,EAAE,WAAAC,GAAW,SAAAC,GAAS,YAAAC,KAAuC;AAC9F,EAAAC,EAAuB,0BAA0BD,CAAU;AAE3D,QAAME,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAwD;AAAA,QACvD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAT;AAAA,QACA,aAAa;AAAA,MAAA;AAAA,IACf;AAAA,IAEJ,CAACA,CAAS;AAAA,EAAA;AAGZ,SAAO,gBAAAH,EAACa,GAAA,EAAK,SAAAT,GAAkB,SAAAG,EAAA,CAAkB;AACnD;"}
1
+ {"version":3,"file":"PayrollLanding.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLanding.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport type { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport { payrollLandingMachine } from './payrollLandingStateMachine'\nimport {\n PayrollLandingTabsContextual,\n type PayrollLandingFlowContextInterface,\n type PayrollLandingFlowProps,\n} from './PayrollLandingFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface PayrollLandingProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport function PayrollLanding(props: PayrollLandingProps) {\n return (\n <BaseComponent {...props}>\n <PayrollLandingFlow {...props} />\n </BaseComponent>\n )\n}\n\nexport function PayrollLandingFlow({\n companyId,\n onEvent,\n dictionary,\n withReimbursements = true,\n ConfirmWireDetailsComponent,\n}: PayrollLandingFlowProps) {\n useComponentDictionary('Payroll.PayrollLanding', dictionary)\n\n const machine = useMemo(\n () =>\n createMachine(\n 'tabs',\n payrollLandingMachine,\n (initialContext: PayrollLandingFlowContextInterface) => ({\n ...initialContext,\n component: PayrollLandingTabsContextual,\n companyId,\n selectedTab: 'run-payroll',\n withReimbursements,\n ConfirmWireDetailsComponent,\n }),\n ),\n [companyId, withReimbursements, ConfirmWireDetailsComponent],\n )\n\n return <Flow onEvent={onEvent} machine={machine} />\n}\n"],"names":["PayrollLanding","props","jsx","BaseComponent","PayrollLandingFlow","companyId","onEvent","dictionary","withReimbursements","ConfirmWireDetailsComponent","useComponentDictionary","machine","useMemo","createMachine","payrollLandingMachine","initialContext","PayrollLandingTabsContextual","Flow"],"mappings":";;;;;;;;AAoBO,SAASA,EAAeC,GAA4B;AACzD,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAoB,GAAGH,GAAO,EAAA,CACjC;AAEJ;AAEO,SAASG,EAAmB;AAAA,EACjC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,oBAAAC,IAAqB;AAAA,EACrB,6BAAAC;AACF,GAA4B;AAC1B,EAAAC,EAAuB,0BAA0BH,CAAU;AAE3D,QAAMI,IAAUC;AAAA,IACd,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAwD;AAAA,QACvD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAX;AAAA,QACA,aAAa;AAAA,QACb,oBAAAG;AAAA,QACA,6BAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACJ,GAAWG,GAAoBC,CAA2B;AAAA,EAAA;AAG7D,SAAO,gBAAAP,EAACe,GAAA,EAAK,SAAAX,GAAkB,SAAAK,EAAA,CAAkB;AACnD;"}
@@ -1,7 +1,10 @@
1
+ import { ConfirmWireDetailsComponentType } from '../ConfirmWireDetails/ConfirmWireDetails';
1
2
  import { BaseComponentInterface } from '../../Base/Base';
2
3
  import { FlowContextInterface } from '../../Flow/useFlow';
3
4
  export interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {
4
5
  companyId: string;
6
+ withReimbursements?: boolean;
7
+ ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
5
8
  }
6
9
  export interface PayrollLandingFlowContextInterface extends FlowContextInterface {
7
10
  component: (() => React.JSX.Element) | null;
@@ -9,6 +12,8 @@ export interface PayrollLandingFlowContextInterface extends FlowContextInterface
9
12
  payrollUuid?: string;
10
13
  previousState?: 'tabs' | 'overview';
11
14
  selectedTab?: string;
15
+ withReimbursements: boolean;
16
+ ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType;
12
17
  }
13
18
  export declare function PayrollLandingTabsContextual(): import("react/jsx-runtime").JSX.Element;
14
19
  export declare function PayrollLandingReceiptsContextual(): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
- import { jsx as t, jsxs as y } from "react/jsx-runtime";
2
- import { useState as c } from "react";
3
- import { useTranslation as u } from "react-i18next";
4
- import { PayrollHistory as d } from "../PayrollHistory/PayrollHistory.js";
5
- import { PayrollList as f } from "../PayrollList/PayrollList.js";
6
- import { PayrollOverview as b } from "../PayrollOverview/PayrollOverview.js";
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { useTranslation as d } from "react-i18next";
4
+ import { PayrollHistory as f } from "../PayrollHistory/PayrollHistory.js";
5
+ import { PayrollList as b } from "../PayrollList/PayrollList.js";
6
+ import { PayrollOverview as C } from "../PayrollOverview/PayrollOverview.js";
7
7
  import { PayrollReceipts as P } from "../PayrollReceipts/PayrollReceipts.js";
8
8
  import { ConfirmWireDetails as I } from "../ConfirmWireDetails/ConfirmWireDetails.js";
9
- import { useFlow as e } from "../../Flow/useFlow.js";
9
+ import { useFlow as m } from "../../Flow/useFlow.js";
10
10
  import { useI18n as x } from "../../../i18n/I18n.js";
11
11
  import { useComponentContext as g } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
12
  import { ensureRequired as n } from "../../../helpers/ensureRequired.js";
@@ -15,46 +15,56 @@ function U() {
15
15
  const {
16
16
  companyId: o,
17
17
  onEvent: r,
18
- selectedTab: l = "run-payroll"
19
- } = e(), [i, m] = c(l), { Tabs: p } = g();
18
+ selectedTab: e = "run-payroll",
19
+ ConfirmWireDetailsComponent: l = I
20
+ } = m(), [a, s] = u(e), { Tabs: p } = g();
20
21
  x("Payroll.PayrollLanding");
21
- const { t: a } = u("Payroll.PayrollLanding"), s = [
22
+ const { t: i } = d("Payroll.PayrollLanding"), y = [
22
23
  {
23
24
  id: "run-payroll",
24
- label: a("tabs.runPayroll"),
25
- content: /* @__PURE__ */ t(f, { companyId: n(o), onEvent: r })
25
+ label: i("tabs.runPayroll"),
26
+ content: /* @__PURE__ */ t(b, { companyId: n(o), onEvent: r })
26
27
  },
27
28
  {
28
29
  id: "payroll-history",
29
- label: a("tabs.payrollHistory"),
30
- content: /* @__PURE__ */ t(d, { companyId: n(o), onEvent: r })
30
+ label: i("tabs.payrollHistory"),
31
+ content: /* @__PURE__ */ t(f, { companyId: n(o), onEvent: r })
31
32
  }
32
33
  ];
33
- return /* @__PURE__ */ y(v, { flexDirection: "column", gap: 32, children: [
34
- /* @__PURE__ */ t(I, { companyId: n(o), onEvent: r }),
34
+ return /* @__PURE__ */ c(v, { flexDirection: "column", gap: 32, children: [
35
+ /* @__PURE__ */ t(l, { companyId: n(o), onEvent: r }),
35
36
  /* @__PURE__ */ t(
36
37
  p,
37
38
  {
38
- tabs: s,
39
- selectedId: i,
40
- onSelectionChange: m,
41
- "aria-label": a("aria.tabNavigation")
39
+ tabs: y,
40
+ selectedId: a,
41
+ onSelectionChange: s,
42
+ "aria-label": i("aria.tabNavigation")
42
43
  }
43
44
  )
44
45
  ] });
45
46
  }
46
47
  function q() {
47
- const { payrollUuid: o, onEvent: r } = e();
48
- return /* @__PURE__ */ t(P, { onEvent: r, payrollId: n(o) });
48
+ const { payrollUuid: o, onEvent: r, withReimbursements: e } = m();
49
+ return /* @__PURE__ */ t(
50
+ P,
51
+ {
52
+ onEvent: r,
53
+ payrollId: n(o),
54
+ withReimbursements: e
55
+ }
56
+ );
49
57
  }
50
58
  function N() {
51
- const { companyId: o, payrollUuid: r, onEvent: l } = e();
59
+ const { companyId: o, payrollUuid: r, onEvent: e, withReimbursements: l, ConfirmWireDetailsComponent: a } = m();
52
60
  return /* @__PURE__ */ t(
53
- b,
61
+ C,
54
62
  {
55
- onEvent: l,
63
+ onEvent: e,
56
64
  companyId: n(o),
57
- payrollId: n(r)
65
+ payrollId: n(r),
66
+ withReimbursements: l,
67
+ ConfirmWireDetailsComponent: a
58
68
  }
59
69
  );
60
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport { ConfirmWireDetails } from '../ConfirmWireDetails/ConfirmWireDetails'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport { Flex } from '@/components/Common/Flex/Flex'\n\nexport interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n}\n\nexport interface PayrollLandingFlowContextInterface extends FlowContextInterface {\n component: (() => React.JSX.Element) | null\n companyId: string\n payrollUuid?: string\n previousState?: 'tabs' | 'overview'\n selectedTab?: string\n}\n\nexport function PayrollLandingTabsContextual() {\n const {\n companyId,\n onEvent,\n selectedTab = 'run-payroll',\n } = useFlow<PayrollLandingFlowContextInterface>()\n const [currentTab, setCurrentTab] = useState(selectedTab)\n const { Tabs } = useComponentContext()\n\n useI18n('Payroll.PayrollLanding')\n const { t } = useTranslation('Payroll.PayrollLanding')\n\n const tabs = [\n {\n id: 'run-payroll',\n label: t('tabs.runPayroll'),\n content: <PayrollList companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n {\n id: 'payroll-history',\n label: t('tabs.payrollHistory'),\n content: <PayrollHistory companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <ConfirmWireDetails companyId={ensureRequired(companyId)} onEvent={onEvent} />\n <Tabs\n tabs={tabs}\n selectedId={currentTab}\n onSelectionChange={setCurrentTab}\n aria-label={t('aria.tabNavigation')}\n />\n </Flex>\n )\n}\n\nexport function PayrollLandingReceiptsContextual() {\n const { payrollUuid, onEvent } = useFlow<PayrollLandingFlowContextInterface>()\n\n return <PayrollReceipts onEvent={onEvent} payrollId={ensureRequired(payrollUuid)} />\n}\n\nexport function PayrollLandingOverviewContextual() {\n const { companyId, payrollUuid, onEvent } = useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n />\n )\n}\n"],"names":["PayrollLandingTabsContextual","companyId","onEvent","selectedTab","useFlow","currentTab","setCurrentTab","useState","Tabs","useComponentContext","useI18n","t","useTranslation","tabs","jsx","PayrollList","ensureRequired","PayrollHistory","jsxs","Flex","ConfirmWireDetails","PayrollLandingReceiptsContextual","payrollUuid","PayrollReceipts","PayrollLandingOverviewContextual","PayrollOverview"],"mappings":";;;;;;;;;;;;;AA2BO,SAASA,IAA+B;AAC7C,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,EAAA,IACZC,EAAA,GACE,CAACC,GAAYC,CAAa,IAAIC,EAASJ,CAAW,GAClD,EAAE,MAAAK,EAAA,IAASC,EAAA;AAEjB,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAE/CC,IAAO;AAAA,IACX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOF,EAAE,iBAAiB;AAAA,MAC1B,SAAS,gBAAAG,EAACC,GAAA,EAAY,WAAWC,EAAef,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,IAEhF;AAAA,MACE,IAAI;AAAA,MACJ,OAAOS,EAAE,qBAAqB;AAAA,MAC9B,SAAS,gBAAAG,EAACG,GAAA,EAAe,WAAWD,EAAef,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,EACnF;AAGF,SACE,gBAAAgB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAL,EAACM,GAAA,EAAmB,WAAWJ,EAAef,CAAS,GAAG,SAAAC,GAAkB;AAAA,IAC5E,gBAAAY;AAAA,MAACN;AAAA,MAAA;AAAA,QACC,MAAAK;AAAA,QACA,YAAYR;AAAA,QACZ,mBAAmBC;AAAA,QACnB,cAAYK,EAAE,oBAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,GACF;AAEJ;AAEO,SAASU,IAAmC;AACjD,QAAM,EAAE,aAAAC,GAAa,SAAApB,EAAA,IAAYE,EAAA;AAEjC,2BAAQmB,GAAA,EAAgB,SAAArB,GAAkB,WAAWc,EAAeM,CAAW,GAAG;AACpF;AAEO,SAASE,IAAmC;AACjD,QAAM,EAAE,WAAAvB,GAAW,aAAAqB,GAAa,SAAApB,EAAA,IAAYE,EAAA;AAE5C,SACE,gBAAAU;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,SAAAvB;AAAA,MACA,WAAWc,EAAef,CAAS;AAAA,MACnC,WAAWe,EAAeM,CAAW;AAAA,IAAA;AAAA,EAAA;AAG3C;"}
1
+ {"version":3,"file":"PayrollLandingFlowComponents.js","sources":["../../../../src/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { PayrollHistory } from '../PayrollHistory/PayrollHistory'\nimport { PayrollList } from '../PayrollList/PayrollList'\nimport { PayrollOverview } from '../PayrollOverview/PayrollOverview'\nimport { PayrollReceipts } from '../PayrollReceipts/PayrollReceipts'\nimport {\n ConfirmWireDetails,\n type ConfirmWireDetailsComponentType,\n} from '../ConfirmWireDetails/ConfirmWireDetails'\nimport type { BaseComponentInterface } from '@/components/Base/Base'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\nimport { Flex } from '@/components/Common/Flex/Flex'\n\nexport interface PayrollLandingFlowProps extends BaseComponentInterface<'Payroll.PayrollLanding'> {\n companyId: string\n withReimbursements?: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport interface PayrollLandingFlowContextInterface extends FlowContextInterface {\n component: (() => React.JSX.Element) | null\n companyId: string\n payrollUuid?: string\n previousState?: 'tabs' | 'overview'\n selectedTab?: string\n withReimbursements: boolean\n ConfirmWireDetailsComponent?: ConfirmWireDetailsComponentType\n}\n\nexport function PayrollLandingTabsContextual() {\n const {\n companyId,\n onEvent,\n selectedTab = 'run-payroll',\n ConfirmWireDetailsComponent = ConfirmWireDetails,\n } = useFlow<PayrollLandingFlowContextInterface>()\n const [currentTab, setCurrentTab] = useState(selectedTab)\n const { Tabs } = useComponentContext()\n\n useI18n('Payroll.PayrollLanding')\n const { t } = useTranslation('Payroll.PayrollLanding')\n\n const tabs = [\n {\n id: 'run-payroll',\n label: t('tabs.runPayroll'),\n content: <PayrollList companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n {\n id: 'payroll-history',\n label: t('tabs.payrollHistory'),\n content: <PayrollHistory companyId={ensureRequired(companyId)} onEvent={onEvent} />,\n },\n ]\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <ConfirmWireDetailsComponent companyId={ensureRequired(companyId)} onEvent={onEvent} />\n <Tabs\n tabs={tabs}\n selectedId={currentTab}\n onSelectionChange={setCurrentTab}\n aria-label={t('aria.tabNavigation')}\n />\n </Flex>\n )\n}\n\nexport function PayrollLandingReceiptsContextual() {\n const { payrollUuid, onEvent, withReimbursements } = useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollReceipts\n onEvent={onEvent}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n />\n )\n}\n\nexport function PayrollLandingOverviewContextual() {\n const { companyId, payrollUuid, onEvent, withReimbursements, ConfirmWireDetailsComponent } =\n useFlow<PayrollLandingFlowContextInterface>()\n\n return (\n <PayrollOverview\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n payrollId={ensureRequired(payrollUuid)}\n withReimbursements={withReimbursements}\n ConfirmWireDetailsComponent={ConfirmWireDetailsComponent}\n />\n )\n}\n"],"names":["PayrollLandingTabsContextual","companyId","onEvent","selectedTab","ConfirmWireDetailsComponent","ConfirmWireDetails","useFlow","currentTab","setCurrentTab","useState","Tabs","useComponentContext","useI18n","t","useTranslation","tabs","jsx","PayrollList","ensureRequired","PayrollHistory","jsxs","Flex","PayrollLandingReceiptsContextual","payrollUuid","withReimbursements","PayrollReceipts","PayrollLandingOverviewContextual","PayrollOverview"],"mappings":";;;;;;;;;;;;;AAkCO,SAASA,IAA+B;AAC7C,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,6BAAAC,IAA8BC;AAAA,EAAA,IAC5BC,EAAA,GACE,CAACC,GAAYC,CAAa,IAAIC,EAASN,CAAW,GAClD,EAAE,MAAAO,EAAA,IAASC,EAAA;AAEjB,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAE/CC,IAAO;AAAA,IACX;AAAA,MACE,IAAI;AAAA,MACJ,OAAOF,EAAE,iBAAiB;AAAA,MAC1B,SAAS,gBAAAG,EAACC,GAAA,EAAY,WAAWC,EAAejB,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,IAEhF;AAAA,MACE,IAAI;AAAA,MACJ,OAAOW,EAAE,qBAAqB;AAAA,MAC9B,SAAS,gBAAAG,EAACG,GAAA,EAAe,WAAWD,EAAejB,CAAS,GAAG,SAAAC,EAAA,CAAkB;AAAA,IAAA;AAAA,EACnF;AAGF,SACE,gBAAAkB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAL,EAACZ,GAAA,EAA4B,WAAWc,EAAejB,CAAS,GAAG,SAAAC,GAAkB;AAAA,IACrF,gBAAAc;AAAA,MAACN;AAAA,MAAA;AAAA,QACC,MAAAK;AAAA,QACA,YAAYR;AAAA,QACZ,mBAAmBC;AAAA,QACnB,cAAYK,EAAE,oBAAoB;AAAA,MAAA;AAAA,IAAA;AAAA,EACpC,GACF;AAEJ;AAEO,SAASS,IAAmC;AACjD,QAAM,EAAE,aAAAC,GAAa,SAAArB,GAAS,oBAAAsB,EAAA,IAAuBlB,EAAA;AAErD,SACE,gBAAAU;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,SAAAvB;AAAA,MACA,WAAWgB,EAAeK,CAAW;AAAA,MACrC,oBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAASE,IAAmC;AACjD,QAAM,EAAE,WAAAzB,GAAW,aAAAsB,GAAa,SAAArB,GAAS,oBAAAsB,GAAoB,6BAAApB,EAAA,IAC3DE,EAAA;AAEF,SACE,gBAAAU;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,SAAAzB;AAAA,MACA,WAAWgB,EAAejB,CAAS;AAAA,MACnC,WAAWiB,EAAeK,CAAW;AAAA,MACrC,oBAAAC;AAAA,MACA,6BAAApB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -6,7 +6,6 @@ import { getPayrollType as V } from "../helpers.js";
6
6
  import C from "./PayrollListPresentation.module.scss.js";
7
7
  import { Flex as i } from "../../Common/Flex/Flex.js";
8
8
  import "classnames";
9
- import "../../../shared/constants.js";
10
9
  import { HamburgerMenu as q } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
10
  import { useComponentContext as E } from "../../../contexts/ComponentAdapter/useComponentContext.js";
12
11
  import { useI18n as $ } from "../../../i18n/I18n.js";
@@ -16,7 +15,7 @@ import J from "../../../assets/icons/feature-icon-check.svg.js";
16
15
  import { useContainerBreakpoints as K } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
17
16
  import { PayrollStatusBadges as Q } from "../PayrollStatusBadges/PayrollStatusBadges.js";
18
17
  import { DataView as X } from "../../Common/DataView/DataView.js";
19
- const gt = ({
18
+ const Dt = ({
20
19
  onRunPayroll: x,
21
20
  onSubmitPayroll: L,
22
21
  onSkipPayroll: A,
@@ -29,7 +28,7 @@ const gt = ({
29
28
  blockers: y,
30
29
  wireInRequests: M
31
30
  }) => {
32
- const { Button: h, Dialog: O, Heading: T, Text: n, Alert: W } = E();
31
+ const { Button: h, Dialog: O, Heading: T, Text: o, Alert: W } = E();
33
32
  $("Payroll.PayrollList");
34
33
  const { t: e } = Y("Payroll.PayrollList"), s = G(), D = j(null), B = K({ ref: D }).includes("small"), [m, g] = N({
35
34
  isOpen: !1,
@@ -50,10 +49,10 @@ const gt = ({
50
49
  }, R = () => {
51
50
  m.payrollId && (A({ payrollUuid: m.payrollId }), P());
52
51
  }, S = (t, l) => {
53
- const a = s.formatShort(t), o = s.formatShortWithYear(l);
52
+ const a = s.formatShort(t), n = s.formatShortWithYear(l);
54
53
  return {
55
54
  startDate: a,
56
- endDate: o,
55
+ endDate: n,
57
56
  fullPeriod: s.formatPayPeriodRange(t, l, { useShortMonth: !0 })
58
57
  };
59
58
  };
@@ -82,7 +81,7 @@ const gt = ({
82
81
  {
83
82
  emptyState: () => /* @__PURE__ */ u(i, { flexDirection: "column", alignItems: "center", gap: 24, children: [
84
83
  /* @__PURE__ */ r(J, {}),
85
- /* @__PURE__ */ r(n, { children: e("emptyState") })
84
+ /* @__PURE__ */ r(o, { children: e("emptyState") })
86
85
  ] }),
87
86
  data: w,
88
87
  columns: [
@@ -93,27 +92,27 @@ const gt = ({
93
92
  t?.endDate
94
93
  );
95
94
  return /* @__PURE__ */ u(i, { flexDirection: "column", gap: 0, children: [
96
- /* @__PURE__ */ u(n, { children: [
95
+ /* @__PURE__ */ u(o, { children: [
97
96
  l,
98
97
  " - ",
99
98
  a
100
99
  ] }),
101
- /* @__PURE__ */ r(n, { variant: "supporting", children: p.find((o) => o.uuid === t?.payScheduleUuid)?.name || p.find((o) => o.uuid === t?.payScheduleUuid)?.customName })
100
+ /* @__PURE__ */ r(o, { variant: "supporting", children: p.find((n) => n.uuid === t?.payScheduleUuid)?.name || p.find((n) => n.uuid === t?.payScheduleUuid)?.customName })
102
101
  ] });
103
102
  },
104
103
  title: e("tableHeaders.0")
105
104
  },
106
105
  {
107
- render: (t) => /* @__PURE__ */ r(n, { children: e(`type.${V(t)}`) }),
106
+ render: (t) => /* @__PURE__ */ r(o, { children: e(`type.${V(t)}`) }),
108
107
  title: e("tableHeaders.1")
109
108
  },
110
109
  {
111
- render: ({ checkDate: t }) => /* @__PURE__ */ r(n, { children: s.formatShortWithWeekdayAndYear(t) }),
110
+ render: ({ checkDate: t }) => /* @__PURE__ */ r(o, { children: s.formatShortWithWeekdayAndYear(t) }),
112
111
  title: e("tableHeaders.2")
113
112
  },
114
113
  {
115
114
  title: e("tableHeaders.3"),
116
- render: ({ payrollDeadline: t }) => /* @__PURE__ */ r(n, { children: s.formatShortWithWeekdayAndYear(t) })
115
+ render: ({ payrollDeadline: t }) => /* @__PURE__ */ r(o, { children: s.formatShortWithWeekdayAndYear(t) })
117
116
  },
118
117
  {
119
118
  title: e("tableHeaders.4"),
@@ -126,7 +125,7 @@ const gt = ({
126
125
  },
127
126
  {
128
127
  title: "",
129
- render: ({ payrollUuid: t, calculatedAt: l, processed: a, payPeriod: o }) => {
128
+ render: ({ payrollUuid: t, calculatedAt: l, processed: a, payPeriod: n }) => {
130
129
  if (a)
131
130
  return null;
132
131
  const d = f === t, c = l ? /* @__PURE__ */ r(
@@ -134,7 +133,7 @@ const gt = ({
134
133
  {
135
134
  isLoading: d,
136
135
  onClick: () => {
137
- L({ payrollUuid: t, payPeriod: o });
136
+ L({ payrollUuid: t, payPeriod: n });
138
137
  },
139
138
  title: e("submitPayrollCta"),
140
139
  variant: "secondary",
@@ -145,7 +144,7 @@ const gt = ({
145
144
  {
146
145
  isLoading: d,
147
146
  onClick: () => {
148
- x({ payrollUuid: t, payPeriod: o });
147
+ x({ payrollUuid: t, payPeriod: n });
149
148
  },
150
149
  title: e("runPayrollTitle"),
151
150
  variant: "secondary",
@@ -160,14 +159,14 @@ const gt = ({
160
159
  itemMenu: ({ payrollUuid: t, processed: l, payPeriod: a }) => {
161
160
  if (l)
162
161
  return null;
163
- const o = f === t, { fullPeriod: d } = S(
162
+ const n = f === t, { fullPeriod: d } = S(
164
163
  a?.startDate,
165
164
  a?.endDate
166
165
  ), c = z(/* @__PURE__ */ new Date()), k = c ? new Date(c) : null, b = a?.startDate ? new Date(a.startDate) : null;
167
166
  return y.length === 0 && k && b && k >= b ? /* @__PURE__ */ r(
168
167
  q,
169
168
  {
170
- isLoading: o,
169
+ isLoading: n,
171
170
  menuLabel: e("payrollMenuLabel"),
172
171
  items: [
173
172
  {
@@ -198,6 +197,6 @@ const gt = ({
198
197
  ] }) });
199
198
  };
200
199
  export {
201
- gt as PayrollListPresentation
200
+ Dt as PayrollListPresentation
202
201
  };
203
202
  //# sourceMappingURL=PayrollListPresentation.js.map