@gusto/embedded-react-sdk 0.55.1 → 0.55.3

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 (161) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/Common/FieldLayout/FieldLayout.js +6 -6
  3. package/dist/components/Common/Fieldset/Fieldset.js +6 -6
  4. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js +6 -6
  5. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  6. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  7. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +58 -49
  8. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
  9. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +14 -10
  10. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -1
  11. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +4 -0
  12. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -3
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -3
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -5
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  19. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -3
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
  22. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  23. package/dist/components/Company/DocumentSigner/DocumentList/List.js +11 -8
  24. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
  25. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  26. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  27. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -8
  28. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  29. package/dist/components/Company/Industry/Context.js +9 -6
  30. package/dist/components/Company/Industry/Context.js.map +1 -1
  31. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -3
  32. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  33. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -3
  34. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  35. package/dist/components/Company/OnboardingOverview/context.js +6 -3
  36. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  37. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -3
  38. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  39. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -3
  40. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  41. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +6 -3
  42. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  43. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +116 -116
  44. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  45. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
  46. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +19 -19
  47. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  48. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +16 -13
  49. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
  50. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  51. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  52. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +4 -0
  53. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  54. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  55. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  56. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  57. package/dist/components/Flow/Flow.js +1 -1
  58. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
  59. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  60. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +75 -71
  61. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  62. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +7 -0
  63. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +202 -165
  64. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  65. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -0
  66. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +88 -82
  67. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  68. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +1 -0
  69. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  70. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +73 -48
  71. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  72. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
  73. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +22 -20
  74. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  75. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  76. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -20
  77. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  78. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -0
  79. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +34 -26
  80. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  81. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +4 -0
  82. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -43
  83. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  84. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -0
  85. package/dist/components/Payroll/PayrollList/PayrollList.js +48 -47
  86. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  87. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  88. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +44 -43
  89. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  90. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +15 -1
  91. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +188 -172
  92. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  93. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
  94. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +110 -118
  95. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  96. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +22 -16
  97. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  98. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +58 -49
  99. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  100. package/dist/components/Payroll/PrintChecks/PrintChecks.d.ts +21 -0
  101. package/dist/components/Payroll/PrintChecks/PrintChecks.js +68 -0
  102. package/dist/components/Payroll/PrintChecks/PrintChecks.js.map +1 -0
  103. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.d.ts +9 -0
  104. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js +34 -0
  105. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js.map +1 -0
  106. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/index.d.ts +1 -0
  107. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.d.ts +48 -0
  108. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.js +26 -0
  109. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.js.map +1 -0
  110. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.d.ts +14 -0
  111. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js +47 -0
  112. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js.map +1 -0
  113. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/index.d.ts +1 -0
  114. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.d.ts +16 -0
  115. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js +144 -0
  116. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js.map +1 -0
  117. package/dist/components/Payroll/PrintChecks/PrintChecksForm/index.d.ts +1 -0
  118. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.d.ts +14 -0
  119. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js +39 -0
  120. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js.map +1 -0
  121. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/index.d.ts +1 -0
  122. package/dist/components/Payroll/PrintChecks/index.d.ts +2 -0
  123. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.d.ts +33 -0
  124. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.js +93 -0
  125. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.js.map +1 -0
  126. package/dist/components/Payroll/PrintChecks/types.d.ts +14 -0
  127. package/dist/components/Payroll/helpers.d.ts +0 -15
  128. package/dist/components/Payroll/helpers.js +13 -18
  129. package/dist/components/Payroll/helpers.js.map +1 -1
  130. package/dist/components/Payroll/index.d.ts +2 -0
  131. package/dist/components/Payroll/index.js +26 -24
  132. package/dist/components/Payroll/index.js.map +1 -1
  133. package/dist/components/Payroll/usePreparedPayrollData.js +15 -12
  134. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  135. package/dist/i18n/I18n.js +4 -0
  136. package/dist/i18n/I18n.js.map +1 -1
  137. package/dist/i18n/en/Company.DocumentList.json.js +34 -32
  138. package/dist/i18n/en/Company.DocumentList.json.js.map +1 -1
  139. package/dist/i18n/en/Employee.DocumentSigner.json.js +24 -22
  140. package/dist/i18n/en/Employee.DocumentSigner.json.js.map +1 -1
  141. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +9 -9
  142. package/dist/i18n/en/Payroll.PayrollOverview.json.js +36 -36
  143. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +2 -2
  144. package/dist/i18n/en/Payroll.PrintChecksBanner.json.js +14 -0
  145. package/dist/i18n/en/Payroll.PrintChecksBanner.json.js.map +1 -0
  146. package/dist/i18n/en/Payroll.PrintChecksFailure.json.js +12 -0
  147. package/dist/i18n/en/Payroll.PrintChecksFailure.json.js.map +1 -0
  148. package/dist/i18n/en/Payroll.PrintChecksForm.json.js +28 -0
  149. package/dist/i18n/en/Payroll.PrintChecksForm.json.js.map +1 -0
  150. package/dist/i18n/en/Payroll.PrintChecksSummary.json.js +14 -0
  151. package/dist/i18n/en/Payroll.PrintChecksSummary.json.js.map +1 -0
  152. package/dist/i18n/types.d.ts +376 -8
  153. package/dist/models/external.d.ts +3 -0
  154. package/dist/partner-hook-utils/form/buildFormSchema.js +60 -54
  155. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  156. package/dist/shared/constants.d.ts +28 -0
  157. package/dist/shared/constants.js +61 -50
  158. package/dist/shared/constants.js.map +1 -1
  159. package/dist/style.css +1 -1
  160. package/docs/guides/endpoint-inventory.json +26 -0
  161. package/package.json +6 -6
@@ -0,0 +1,14 @@
1
+ import { BaseComponentInterface } from '../../../Base';
2
+ import { OnEventType } from '../../../Base/useBase';
3
+ import { EventType } from '../../../../shared/constants';
4
+ interface PrintChecksSummaryProps extends BaseComponentInterface<'Payroll.PrintChecksSummary'> {
5
+ documentUrl?: string;
6
+ }
7
+ /** @internal */
8
+ export declare function PrintChecksSummary(props: PrintChecksSummaryProps): import("react").JSX.Element;
9
+ export declare namespace PrintChecksSummary {
10
+ var Footer: ({ onEvent }: {
11
+ onEvent: OnEventType<EventType, unknown>;
12
+ }) => import("react").JSX.Element;
13
+ }
14
+ export {};
@@ -0,0 +1,39 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { useTranslation as n } from "react-i18next";
3
+ import { BaseComponent as h } from "../../../Base/Base.js";
4
+ import "../../../Base/useBase.js";
5
+ import { useComponentContext as i } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import { useComponentDictionary as u, useI18n as c } from "../../../../i18n/I18n.js";
7
+ import { Flex as C } from "../../../Common/Flex/Flex.js";
8
+ import { ActionsLayout as d } from "../../../Common/ActionsLayout/ActionsLayout.js";
9
+ import { printChecksEvents as p } from "../../../../shared/constants.js";
10
+ function y(r) {
11
+ return /* @__PURE__ */ e(h, { ...r, children: /* @__PURE__ */ e(f, { ...r, children: r.children }) });
12
+ }
13
+ const f = ({ dictionary: r, documentUrl: o }) => {
14
+ u("Payroll.PrintChecksSummary", r), c("Payroll.PrintChecksSummary");
15
+ const { t } = n("Payroll.PrintChecksSummary"), { Heading: m, Text: s, Link: a } = i();
16
+ return /* @__PURE__ */ l(C, { flexDirection: "column", gap: 16, children: [
17
+ /* @__PURE__ */ e(m, { as: "h2", children: t("succeededTitle") }),
18
+ /* @__PURE__ */ e(s, { variant: "supporting", children: t("succeededDescription") }),
19
+ o && /* @__PURE__ */ e(a, { href: o, target: "_blank", rel: "noreferrer", children: t("viewChecksCta") })
20
+ ] });
21
+ }, P = ({ onEvent: r }) => {
22
+ c("Payroll.PrintChecksSummary");
23
+ const { t: o } = n("Payroll.PrintChecksSummary"), { Button: t } = i();
24
+ return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(
25
+ t,
26
+ {
27
+ variant: "secondary",
28
+ onClick: () => {
29
+ r(p.PRINT_CHECKS_CLOSE);
30
+ },
31
+ children: o("closeCta")
32
+ }
33
+ ) });
34
+ };
35
+ y.Footer = P;
36
+ export {
37
+ y as PrintChecksSummary
38
+ };
39
+ //# sourceMappingURL=PrintChecksSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrintChecksSummary.js","sources":["../../../../../src/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport type { OnEventType } from '@/components/Base/useBase'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { ActionsLayout, Flex } from '@/components/Common'\nimport { printChecksEvents, type EventType } from '@/shared/constants'\n\ninterface PrintChecksSummaryProps extends BaseComponentInterface<'Payroll.PrintChecksSummary'> {\n documentUrl?: string\n}\n\n/** @internal */\nexport function PrintChecksSummary(props: PrintChecksSummaryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ dictionary, documentUrl }: PrintChecksSummaryProps) => {\n useComponentDictionary('Payroll.PrintChecksSummary', dictionary)\n useI18n('Payroll.PrintChecksSummary')\n const { t } = useTranslation('Payroll.PrintChecksSummary')\n const { Heading, Text, Link } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('succeededTitle')}</Heading>\n <Text variant=\"supporting\">{t('succeededDescription')}</Text>\n {documentUrl && (\n <Link href={documentUrl} target=\"_blank\" rel=\"noreferrer\">\n {t('viewChecksCta')}\n </Link>\n )}\n </Flex>\n )\n}\n\nconst Footer = ({ onEvent }: { onEvent: OnEventType<EventType, unknown> }) => {\n useI18n('Payroll.PrintChecksSummary')\n const { t } = useTranslation('Payroll.PrintChecksSummary')\n const { Button } = useComponentContext()\n\n return (\n <ActionsLayout>\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(printChecksEvents.PRINT_CHECKS_CLOSE)\n }}\n >\n {t('closeCta')}\n </Button>\n </ActionsLayout>\n )\n}\nPrintChecksSummary.Footer = Footer\n"],"names":["PrintChecksSummary","props","jsx","BaseComponent","Root","dictionary","documentUrl","useComponentDictionary","useI18n","useTranslation","Heading","Text","Link","useComponentContext","jsxs","Flex","Footer","onEvent","t","Button","ActionsLayout","printChecksEvents"],"mappings":";;;;;;;;;AAaO,SAASA,EAAmBC,GAAgC;AACjE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,YAAAC,GAAY,aAAAC,QAA2C;AACrE,EAAAC,EAAuB,8BAA8BF,CAAU,GAC/DG,EAAQ,4BAA4B;AACpC,QAAM,EAAE,EAAA,IAAMC,EAAe,4BAA4B,GACnD,EAAE,SAAAC,GAAS,MAAAC,GAAM,MAAAC,EAAA,IAASC,EAAA;AAEhC,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAb,EAACQ,GAAA,EAAQ,IAAG,MAAM,UAAA,EAAE,gBAAgB,GAAE;AAAA,sBACrCC,GAAA,EAAK,SAAQ,cAAc,UAAA,EAAE,sBAAsB,GAAE;AAAA,IACrDL,KACC,gBAAAJ,EAACU,GAAA,EAAK,MAAMN,GAAa,QAAO,UAAS,KAAI,cAC1C,UAAA,EAAE,eAAe,EAAA,CACpB;AAAA,EAAA,GAEJ;AAEJ,GAEMU,IAAS,CAAC,EAAE,SAAAC,QAA4D;AAC5E,EAAAT,EAAQ,4BAA4B;AACpC,QAAM,EAAE,GAAAU,EAAA,IAAMT,EAAe,4BAA4B,GACnD,EAAE,QAAAU,EAAA,IAAWN,EAAA;AAEnB,2BACGO,GAAA,EACC,UAAA,gBAAAlB;AAAA,IAACiB;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,SAAS,MAAM;AACb,QAAAF,EAAQI,EAAkB,kBAAkB;AAAA,MAC9C;AAAA,MAEC,YAAE,UAAU;AAAA,IAAA;AAAA,EAAA,GAEjB;AAEJ;AACArB,EAAmB,SAASgB;"}
@@ -0,0 +1 @@
1
+ export { PrintChecksSummary } from './PrintChecksSummary';
@@ -0,0 +1,2 @@
1
+ export { PrintChecks } from './PrintChecks';
2
+ export type { PrintChecksProps } from './types';
@@ -0,0 +1,33 @@
1
+ import { printChecksEvents } from '../../../shared/constants';
2
+ /**
3
+ * Payload shapes for each print-checks state machine event.
4
+ *
5
+ * @internal
6
+ */
7
+ export type EventPayloads = {
8
+ /** Banner CTA pressed to begin the print-checks flow. */
9
+ [printChecksEvents.PRINT_CHECKS_START]: undefined;
10
+ /** Form submitted; a generate-and-poll cycle has started. */
11
+ [printChecksEvents.PRINT_CHECKS_GENERATE_START]: undefined;
12
+ /** Generation succeeded; carries the generated checks document URL. */
13
+ [printChecksEvents.PRINT_CHECKS_GENERATE_SUCCEEDED]: {
14
+ documentUrl: string | null;
15
+ };
16
+ /** Generation failed; carries the error message to surface. */
17
+ [printChecksEvents.PRINT_CHECKS_GENERATE_FAILED]: {
18
+ errorMessage: string | null;
19
+ };
20
+ /** User retried after a failure. */
21
+ [printChecksEvents.PRINT_CHECKS_RETRY]: undefined;
22
+ /** Form cancelled. */
23
+ [printChecksEvents.PRINT_CHECKS_CANCEL]: undefined;
24
+ /** Failure or summary screen closed. */
25
+ [printChecksEvents.PRINT_CHECKS_CLOSE]: undefined;
26
+ };
27
+ /** @internal */
28
+ export declare const printChecksMachine: {
29
+ banner: import('robot3').MachineState<any>;
30
+ form: import('robot3').MachineState<any>;
31
+ failure: import('robot3').MachineState<any>;
32
+ summary: import('robot3').MachineState<any>;
33
+ };
@@ -0,0 +1,93 @@
1
+ import { state as t, transition as n, reduce as r } from "robot3";
2
+ import { PrintChecksFormContextual as C, PrintChecksSummaryContextual as i, PrintChecksFailureContextual as m } from "./PrintChecksComponents.js";
3
+ import { printChecksEvents as o } from "../../../shared/constants.js";
4
+ const _ = {
5
+ banner: t(
6
+ n(
7
+ o.PRINT_CHECKS_START,
8
+ "form",
9
+ r((e) => ({
10
+ ...e,
11
+ component: C
12
+ }))
13
+ )
14
+ ),
15
+ form: t(
16
+ n(
17
+ o.PRINT_CHECKS_GENERATE_START,
18
+ "form",
19
+ r((e) => ({
20
+ ...e,
21
+ isGenerating: !0
22
+ }))
23
+ ),
24
+ n(
25
+ o.PRINT_CHECKS_GENERATE_SUCCEEDED,
26
+ "summary",
27
+ r(
28
+ (e, a) => ({
29
+ ...e,
30
+ component: i,
31
+ documentUrl: a.payload.documentUrl ?? void 0,
32
+ isGenerating: !1
33
+ })
34
+ )
35
+ ),
36
+ n(
37
+ o.PRINT_CHECKS_GENERATE_FAILED,
38
+ "failure",
39
+ r(
40
+ (e, a) => ({
41
+ ...e,
42
+ component: m,
43
+ errorMessage: a.payload.errorMessage ?? void 0,
44
+ isGenerating: !1
45
+ })
46
+ )
47
+ ),
48
+ n(
49
+ o.PRINT_CHECKS_CANCEL,
50
+ "banner",
51
+ r((e) => ({
52
+ ...e,
53
+ component: null,
54
+ isGenerating: !1
55
+ }))
56
+ )
57
+ ),
58
+ failure: t(
59
+ n(
60
+ o.PRINT_CHECKS_RETRY,
61
+ "form",
62
+ r((e) => ({
63
+ ...e,
64
+ component: C,
65
+ errorMessage: void 0
66
+ }))
67
+ ),
68
+ n(
69
+ o.PRINT_CHECKS_CLOSE,
70
+ "banner",
71
+ r((e) => ({
72
+ ...e,
73
+ component: null,
74
+ errorMessage: void 0
75
+ }))
76
+ )
77
+ ),
78
+ summary: t(
79
+ n(
80
+ o.PRINT_CHECKS_CLOSE,
81
+ "banner",
82
+ r((e) => ({
83
+ ...e,
84
+ component: null,
85
+ documentUrl: void 0
86
+ }))
87
+ )
88
+ )
89
+ };
90
+ export {
91
+ _ as printChecksMachine
92
+ };
93
+ //# sourceMappingURL=printChecksStateMachine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"printChecksStateMachine.js","sources":["../../../../src/components/Payroll/PrintChecks/printChecksStateMachine.tsx"],"sourcesContent":["import { state, transition, reduce } from 'robot3'\nimport type { PrintChecksContextInterface } from './PrintChecksComponents'\nimport {\n PrintChecksFormContextual,\n PrintChecksFailureContextual,\n PrintChecksSummaryContextual,\n} from './PrintChecksComponents'\nimport { printChecksEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n/**\n * Payload shapes for each print-checks state machine event.\n *\n * @internal\n */\nexport type EventPayloads = {\n /** Banner CTA pressed to begin the print-checks flow. */\n [printChecksEvents.PRINT_CHECKS_START]: undefined\n /** Form submitted; a generate-and-poll cycle has started. */\n [printChecksEvents.PRINT_CHECKS_GENERATE_START]: undefined\n /** Generation succeeded; carries the generated checks document URL. */\n [printChecksEvents.PRINT_CHECKS_GENERATE_SUCCEEDED]: {\n documentUrl: string | null\n }\n /** Generation failed; carries the error message to surface. */\n [printChecksEvents.PRINT_CHECKS_GENERATE_FAILED]: {\n errorMessage: string | null\n }\n /** User retried after a failure. */\n [printChecksEvents.PRINT_CHECKS_RETRY]: undefined\n /** Form cancelled. */\n [printChecksEvents.PRINT_CHECKS_CANCEL]: undefined\n /** Failure or summary screen closed. */\n [printChecksEvents.PRINT_CHECKS_CLOSE]: undefined\n}\n\n/** @internal */\nexport const printChecksMachine = {\n banner: state<MachineTransition>(\n transition(\n printChecksEvents.PRINT_CHECKS_START,\n 'form',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n component: PrintChecksFormContextual,\n })),\n ),\n ),\n form: state<MachineTransition>(\n transition(\n printChecksEvents.PRINT_CHECKS_GENERATE_START,\n 'form',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n isGenerating: true,\n })),\n ),\n transition(\n printChecksEvents.PRINT_CHECKS_GENERATE_SUCCEEDED,\n 'summary',\n reduce(\n (\n ctx: PrintChecksContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof printChecksEvents.PRINT_CHECKS_GENERATE_SUCCEEDED\n >,\n ): PrintChecksContextInterface => ({\n ...ctx,\n component: PrintChecksSummaryContextual,\n documentUrl: ev.payload.documentUrl ?? undefined,\n isGenerating: false,\n }),\n ),\n ),\n transition(\n printChecksEvents.PRINT_CHECKS_GENERATE_FAILED,\n 'failure',\n reduce(\n (\n ctx: PrintChecksContextInterface,\n ev: MachineEventType<\n EventPayloads,\n typeof printChecksEvents.PRINT_CHECKS_GENERATE_FAILED\n >,\n ): PrintChecksContextInterface => ({\n ...ctx,\n component: PrintChecksFailureContextual,\n errorMessage: ev.payload.errorMessage ?? undefined,\n isGenerating: false,\n }),\n ),\n ),\n transition(\n printChecksEvents.PRINT_CHECKS_CANCEL,\n 'banner',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n component: null,\n isGenerating: false,\n })),\n ),\n ),\n failure: state<MachineTransition>(\n transition(\n printChecksEvents.PRINT_CHECKS_RETRY,\n 'form',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n component: PrintChecksFormContextual,\n errorMessage: undefined,\n })),\n ),\n transition(\n printChecksEvents.PRINT_CHECKS_CLOSE,\n 'banner',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n component: null,\n errorMessage: undefined,\n })),\n ),\n ),\n summary: state<MachineTransition>(\n transition(\n printChecksEvents.PRINT_CHECKS_CLOSE,\n 'banner',\n reduce((ctx: PrintChecksContextInterface): PrintChecksContextInterface => ({\n ...ctx,\n component: null,\n documentUrl: undefined,\n })),\n ),\n ),\n}\n"],"names":["printChecksMachine","state","transition","printChecksEvents","reduce","ctx","PrintChecksFormContextual","ev","PrintChecksSummaryContextual","PrintChecksFailureContextual"],"mappings":";;;AAqCO,MAAMA,IAAqB;AAAA,EAChC,QAAQC;AAAA,IACNC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAWC;AAAA,MAAA,EACX;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,MAAML;AAAA,IACJC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,IAEJH;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OAIiC;AAAA,UACjC,GAAGF;AAAA,UACH,WAAWG;AAAA,UACX,aAAaD,EAAG,QAAQ,eAAe;AAAA,UACvC,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CACEC,GACAE,OAIiC;AAAA,UACjC,GAAGF;AAAA,UACH,WAAWI;AAAA,UACX,cAAcF,EAAG,QAAQ,gBAAgB;AAAA,UACzC,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAW;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,SAASJ;AAAA,IACPC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,IAEJJ;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAW;AAAA,QACX,cAAc;AAAA,MAAA,EACd;AAAA,IAAA;AAAA,EACJ;AAAA,EAEF,SAASJ;AAAA,IACPC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC,EAAO,CAACC,OAAmE;AAAA,QACzE,GAAGA;AAAA,QACH,WAAW;AAAA,QACX,aAAa;AAAA,MAAA,EACb;AAAA,IAAA;AAAA,EACJ;AAEJ;"}
@@ -0,0 +1,14 @@
1
+ import { BaseComponentInterface } from '../../Base';
2
+ /**
3
+ * Props for {@link PrintChecks}.
4
+ *
5
+ * @public
6
+ */
7
+ export interface PrintChecksProps extends Omit<BaseComponentInterface<never>, 'onEvent'> {
8
+ /** Identifier of the company that owns the payroll. */
9
+ companyId: string;
10
+ /** Identifier of the payroll to generate printable checks for. */
11
+ payrollId: string;
12
+ /** Callback invoked each time the component emits an event. */
13
+ onEvent?: BaseComponentInterface['onEvent'];
14
+ }
@@ -185,21 +185,6 @@ export declare const getAdditionalEarningsCompensations: ({ flsaStatus, existing
185
185
  fixedCompensationTypes?: PayrollFixedCompensationTypesType[];
186
186
  excludedTypes?: string[];
187
187
  }) => FixedCompensations[];
188
- /**
189
- * Returns whether any non-excluded employee compensation uses Direct Deposit.
190
- *
191
- * @remarks
192
- * When the input is empty or every compensation is excluded, returns `true` so callers don't gate UI on an
193
- * empty set.
194
- *
195
- * @param employeeCompensations - The employee compensations to inspect.
196
- * @returns `true` when at least one active compensation pays via Direct Deposit, or when the list is empty.
197
- * @internal
198
- */
199
- export declare const hasDirectDepositEmployees: (employeeCompensations?: Array<{
200
- paymentMethod?: string | null;
201
- excluded?: boolean;
202
- }>) => boolean;
203
188
  /**
204
189
  * Sums gross pay, employer taxes, reimbursements, and benefits from a payroll's totals.
205
190
  *
@@ -1,12 +1,12 @@
1
1
  import { OffCycleReasonType as v } from "@gusto/embedded-api/models/components/payrollshow";
2
2
  import { useCallback as E } from "react";
3
- import { useTranslation as x } from "react-i18next";
4
- import { PayrollCategory as S, isOffCyclePayroll as O } from "./payrollTypes.js";
3
+ import { useTranslation as S } from "react-i18next";
4
+ import { PayrollCategory as x, isOffCyclePayroll as O } from "./payrollTypes.js";
5
5
  import { formatPayRate as M } from "../../helpers/formattedStrings.js";
6
6
  import { useLocale as j } from "../../contexts/LocaleProvider/useLocale.js";
7
7
  import { FlsaStatus as L } from "../../shared/constants.js";
8
- import { MS_PER_HOUR as D } from "../../helpers/dateFormatting.js";
9
- const N = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.[0] || null, U = (e) => Math.round(e * 1e6) / 1e6, C = (e) => Math.round(e * 100) / 100, T = (e) => e.toLowerCase() === N, A = {
8
+ import { MS_PER_HOUR as P } from "../../helpers/dateFormatting.js";
9
+ const N = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.[0] || null, U = (e) => Math.round(e * 1e6) / 1e6, D = (e) => Math.round(e * 100) / 100, T = (e) => e.toLowerCase() === N, A = {
10
10
  Daily: 8,
11
11
  "Every week": 40,
12
12
  "Every other week": 80,
@@ -31,7 +31,7 @@ const N = "regular hours", p = (e) => e.jobs?.find((t) => t.primary) || e.jobs?.
31
31
  const s = parseFloat(o.rate), u = o.paymentUnit || "Hour";
32
32
  return M({ rate: s, paymentUnit: u, t, locale: r });
33
33
  }, ae = () => {
34
- const { t: e } = x("common"), { locale: t } = j();
34
+ const { t: e } = S("common"), { locale: t } = j();
35
35
  return E(
36
36
  (r) => W({ employee: r, t: e, locale: t }),
37
37
  [e, t]
@@ -73,7 +73,7 @@ const _ = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
73
73
  amount: r.toFixed(2)
74
74
  }), t;
75
75
  }, fe = (e) => {
76
- const t = C(e);
76
+ const t = D(e);
77
77
  return t % 1 === 0 ? `${t}.0` : t.toString();
78
78
  }, k = (e) => e.frequency && A[e.frequency] || 0, g = (e, t) => {
79
79
  if (!e.length) return null;
@@ -182,7 +182,7 @@ const _ = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
182
182
  (s) => T(s.name || "")
183
183
  );
184
184
  return n ? parseFloat(n.hours || "0") === r : !1;
185
- }, me = (e, t, r, n, o = S.Regular) => {
185
+ }, me = (e, t, r, n, o = x.Regular) => {
186
186
  if (e.excluded)
187
187
  return 0;
188
188
  const s = r ? new Date(r) : /* @__PURE__ */ new Date(), u = p(t);
@@ -223,7 +223,7 @@ const _ = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
223
223
  e,
224
224
  s
225
225
  ), F = d + y + w + b;
226
- return C(F);
226
+ return D(F);
227
227
  }, de = (e) => e === v.DismissedEmployee, V = {
228
228
  Bonus: "Bonus",
229
229
  Correction: "Correction",
@@ -252,25 +252,21 @@ const _ = (e) => e.paidTimeOff ? e.paidTimeOff.reduce((t, r) => t + parseFloat(r
252
252
  jobUuid: r
253
253
  });
254
254
  }), s.filter((u) => u.name && !o.includes(u.name)).sort((u, a) => (u.name || "").localeCompare(a.name || ""));
255
- }, ge = (e) => {
256
- if (!e || e.length === 0) return !0;
257
- const t = e.filter((r) => !r.excluded);
258
- return t.length === 0 ? !0 : t.some((r) => r.paymentMethod === "Direct Deposit");
259
- }, he = (e) => e.totals ? Number(e.totals.grossPay ?? 0) + Number(e.totals.employerTaxes ?? 0) + Number(e.totals.reimbursements ?? 0) + Number(e.totals.benefits ?? 0) : 0, P = (e) => {
255
+ }, ge = (e) => e.totals ? Number(e.totals.grossPay ?? 0) + Number(e.totals.employerTaxes ?? 0) + Number(e.totals.reimbursements ?? 0) + Number(e.totals.benefits ?? 0) : 0, C = (e) => {
260
256
  const t = e.getFullYear(), r = new Date(t, 2, 1);
261
257
  r.setDate(1 + (7 - r.getDay()) + 7);
262
258
  const n = new Date(t, 10, 1);
263
259
  return n.setDate(1 + (7 - n.getDay()) % 7), e >= r && e < n ? -7 : -8;
264
- }, De = (e) => {
260
+ }, he = (e) => {
265
261
  if (e.payrollStatusMeta?.cancellable === !1 || !e.processed || !e.payrollDeadline)
266
262
  return !1;
267
- const t = /* @__PURE__ */ new Date(), r = new Date(e.payrollDeadline), n = new Date(t.getTime() + P(t) * D), o = new Date(r.getTime() + P(r) * D), s = new Date(o);
263
+ const t = /* @__PURE__ */ new Date(), r = new Date(e.payrollDeadline), n = new Date(t.getTime() + C(t) * P), o = new Date(r.getTime() + C(r) * P), s = new Date(o);
268
264
  return s.setUTCHours(16, 0, 0, 0), !(n >= s);
269
265
  };
270
266
  export {
271
267
  me as calculateGrossPay,
272
- he as calculateTotalPayroll,
273
- De as canCancelPayroll,
268
+ ge as calculateTotalPayroll,
269
+ he as canCancelPayroll,
274
270
  ce as cleanupReimbursements,
275
271
  W as formatEmployeePayRate,
276
272
  fe as formatHoursDisplay,
@@ -281,7 +277,6 @@ export {
281
277
  ue as getRegularHours,
282
278
  le as getReimbursements,
283
279
  _ as getTotalPtoHours,
284
- ge as hasDirectDepositEmployees,
285
280
  de as isDismissalPayroll,
286
281
  ae as useFormatEmployeePayRate
287
282
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../src/components/Payroll/helpers.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport {\n type PayrollShowFixedCompensations,\n OffCycleReasonType,\n} from '@gusto/embedded-api/models/components/payrollshow'\nimport type {\n FixedCompensations,\n Reimbursements as Reimbursement,\n} from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollUpdateReimbursements } from '@gusto/embedded-api/models/components/payrollupdate'\nimport type { PayrollFixedCompensationTypesType } from '@gusto/embedded-api/models/components/payrollfixedcompensationtypestype'\nimport { useCallback } from 'react'\nimport type { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow as PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport type { Compensation, MinimumWages } from '@gusto/embedded-api/models/components/compensation'\nimport type { PayrollEmployeeCompensationsType } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { Payroll } from '@gusto/embedded-api/models/components/payrollshow'\nimport type { PayrollType } from './PayrollList/types'\nimport { PayrollCategory, isOffCyclePayroll } from './payrollTypes'\nimport { formatPayRate } from '@/helpers/formattedStrings'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { FlsaStatus } from '@/shared/constants'\nimport { MS_PER_HOUR } from '@/helpers/dateFormatting'\nconst REGULAR_HOURS_NAME = 'regular hours'\n\n/**\n * The compensation fields the payroll math helpers operate on.\n *\n * @remarks\n * These helpers run over both compensation representations the API returns: the\n * prepared (base) shape used when editing a payroll and the calculated (show)\n * shape rendered after calculation. The two are interchangeable for every field\n * read here and differ only on `deductions`, which no helper touches. Omitting\n * `deductions` lets a single input type accept either shape without a cast.\n *\n * @internal\n */\ntype EmployeeCompensationInput = Omit<PayrollEmployeeCompensationsType, 'deductions'>\n\n// Utility to get the primary job from an employee\nconst getPrimaryJob = (employee: Employee) => {\n return employee.jobs?.find(job => job.primary) || employee.jobs?.[0] || null\n}\n\nconst roundToSixDecimals = (value: number): number => {\n return Math.round(value * 1_000_000) / 1_000_000\n}\n\nconst roundToTwoDecimals = (value: number): number => {\n return Math.round(value * 100) / 100\n}\n\nconst isRegularHours = (compensationName: string): boolean => {\n return compensationName.toLowerCase() === REGULAR_HOURS_NAME\n}\n\nconst PAY_PERIOD_HOURS_MAPPINGS: Record<string, number> = {\n Daily: 8.0,\n 'Every week': 40.0,\n 'Every other week': 80.0,\n 'Twice per month': 86.666667,\n Monthly: 173.333333,\n Quarterly: 520.0,\n Semiannually: 1040.0,\n Annually: 2080.0,\n}\n\n/**\n * Formats an employee's primary-job pay rate into a localized display string.\n *\n * @remarks\n * Returns `null` when the employee has no jobs, the primary job has no compensations, or the rate is missing\n * or zero.\n *\n * @param args - The employee, translation function, and locale to format against.\n * @returns The formatted pay-rate string, or `null` when no usable rate is available.\n * @internal\n */\nexport const formatEmployeePayRate = ({\n employee,\n t,\n locale = 'en-US',\n}: {\n employee?: Employee\n t: TFunction\n locale?: string\n}) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return formatPayRate({ rate, paymentUnit, t, locale })\n}\n\n/**\n * Returns a memoized formatter that produces a localized pay-rate string from an employee's primary job.\n *\n * @returns A callback that takes an `Employee` and returns the formatted pay-rate string, or `null` when the\n * employee has no usable primary-job compensation.\n * @internal\n */\nexport const useFormatEmployeePayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (employee?: Employee) => {\n return formatEmployeePayRate({ employee, t, locale })\n },\n [t, locale],\n )\n}\n\n/**\n * Sums hourly-compensation rows named `'regular hours'`.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total regular hours worked, or `0` when none are recorded.\n * @internal\n */\nexport const getRegularHours = (compensation: EmployeeCompensationInput) => {\n if (!compensation.hourlyCompensations) return 0\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => hourlyCompensation.name?.toLowerCase() === 'regular hours')\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\n/**\n * Sums the overtime hours (multiplier greater than `1`) from an employee compensation.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total overtime hours, or `0` when the compensation is excluded or has none.\n * @internal\n */\nexport function getOvertimeHours(compensation: EmployeeCompensationInput) {\n if (!compensation.hourlyCompensations || compensation.excluded) {\n return 0\n }\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => Number(hourlyCompensation.compensationMultiplier) > 1)\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\n/**\n * Sums the paid-time-off hours from an employee compensation.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total PTO hours, or `0` when none are recorded.\n * @internal\n */\nexport const getTotalPtoHours = (compensation: EmployeeCompensationInput) => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n return compensation.paidTimeOff.reduce((sum, pto) => sum + parseFloat(pto.hours || '0'), 0)\n}\n\n/**\n * Sums fixed-compensation amounts excluding reimbursements and minimum-wage adjustments.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total additional earnings amount, or `0` when none qualify.\n * @internal\n */\nexport const getAdditionalEarnings = (compensation: EmployeeCompensationInput) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n return compensation.fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase() || ''\n const amount = parseFloat(fixedCompensation.amount || '0')\n return name !== 'reimbursement' && name !== 'minimum wage adjustment' && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\n/**\n * Returns the total reimbursement amount for an employee compensation.\n *\n * @remarks\n * Prefers the explicit `reimbursements` array when present; falls back to a fixed-compensation row named\n * `'Reimbursement'` for older payroll shapes.\n *\n * @param compensation - The employee compensation entry.\n * @returns The summed reimbursement amount, or `0` when none.\n * @internal\n */\nexport const getReimbursements = (compensation: EmployeeCompensationInput) => {\n if (compensation.reimbursements && compensation.reimbursements.length > 0) {\n return compensation.reimbursements.reduce(\n (sum, reimbursement) => sum + parseFloat(reimbursement.amount || '0'),\n 0,\n )\n }\n\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n const reimbursementComp = compensation.fixedCompensations.find(\n fixedCompensation => fixedCompensation.name?.toLowerCase() === 'reimbursement',\n )\n return reimbursementComp ? parseFloat(reimbursementComp.amount || '0') : 0\n}\n\n/**\n * Normalizes a reimbursement list for submission to the v2025-11-15 API.\n *\n * @remarks\n * - Drops named rows that would be no-ops on the server (zero amount with no existing uuid).\n * - Drops named rows with an existing uuid and zero amount — these are removals, and the backend's\n * `replace_itemized_reimbursements` deletes any persisted reimbursement whose uuid is omitted from the\n * incoming list.\n * - Consolidates multiple unnamed (description-less) rows into a single unnamed entry, since the API rejects\n * more than one unnamed reimbursement per employee.\n * - When the consolidated unnamed total is zero, sends no unnamed entry at all. The backend's full-replace\n * semantics then delete any persisted unnamed entry (unnamed entries never have uuids, so this is the only\n * way to remove them).\n * - Maps the read shape (`description: string | null`) to the write shape (`description?: string`), omitting\n * the field when there is no description.\n *\n * @param reimbursements - The reimbursements pulled from the prepared payroll.\n * @returns The normalized reimbursements ready to send on a payroll update.\n * @internal\n */\nexport const cleanupReimbursements = (\n reimbursements: Reimbursement[],\n): PayrollUpdateReimbursements[] => {\n const consolidated: PayrollUpdateReimbursements[] = []\n let unnamedTotal = 0\n\n reimbursements.forEach(reimbursement => {\n const amount = reimbursement.amount\n const numericAmount = parseFloat(amount || '0')\n const description = reimbursement.description?.trim() || ''\n const uuid = reimbursement.uuid ?? undefined\n\n if (description === '') {\n unnamedTotal += numericAmount\n return\n }\n\n if (numericAmount === 0 && !uuid) {\n return\n }\n\n consolidated.push({\n amount,\n description,\n ...(uuid ? { uuid } : {}),\n })\n })\n\n if (unnamedTotal > 0) {\n consolidated.push({\n amount: unnamedTotal.toFixed(2),\n })\n }\n\n return consolidated\n}\n\n/**\n * Formats an hours value for display, rounding to two decimals and ensuring whole numbers render with `.0`.\n *\n * @param hours - The hours value to format.\n * @returns A string like `'40.0'` or `'37.25'`.\n * @internal\n */\nexport const formatHoursDisplay = (hours: number): string => {\n const rounded = roundToTwoDecimals(hours)\n\n if (rounded % 1 === 0) {\n return `${rounded}.0`\n }\n\n return rounded.toString()\n}\n\nconst getHoursInPayPeriod = (paySchedule: PayScheduleObject): number => {\n if (!paySchedule.frequency) {\n return 0\n }\n\n return PAY_PERIOD_HOURS_MAPPINGS[paySchedule.frequency] || 0\n}\n\nconst getEffectiveCompensation = (\n compensations: Compensation[],\n effectiveDate: Date,\n): Compensation | null => {\n if (!compensations.length) return null\n\n const sorted = [...compensations].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst getEffectiveMinimumWage = (\n minimumWages: MinimumWages[],\n effectiveDate: Date,\n): MinimumWages | null => {\n if (!minimumWages.length) return null\n\n const sorted = [...minimumWages].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst isSalaried = (compensation: Compensation): boolean => {\n return compensation.flsaStatus === 'Exempt' || compensation.flsaStatus === 'Salaried Nonexempt'\n}\n\nconst getTotalTipCompensations = (fixedCompensations: PayrollShowFixedCompensations[]): number => {\n if (!fixedCompensations.length) return 0\n\n return fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase()\n const amount = parseFloat(fixedCompensation.amount || '0')\n return (name === 'paycheck tips' || name === 'cash tips') && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nconst calculateHourlyRate = (compensation: Compensation): number => {\n const rate = parseFloat(compensation.rate || '0')\n const paymentUnit = compensation.paymentUnit || 'Hour'\n\n switch (paymentUnit) {\n case 'Hour':\n return rate\n case 'Year':\n return rate / 2080 // 52 weeks * 40 hours\n case 'Month':\n return rate / 173.333333\n case 'Week':\n return rate / 40\n case 'Paycheck':\n return 0 // Paycheck rate is 0 for hourly calculation\n default:\n return rate\n }\n}\n\nconst getHourlyRateForJob = (employee: Employee, jobUuid: string, effectiveDate: Date): number => {\n const job = employee.jobs?.find(j => j.uuid === jobUuid)\n if (!job?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(job.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getPrimaryHourlyRate = (employee: Employee, effectiveDate: Date): number => {\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(primaryJob.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getTotalOutstandingPtoHours = (compensation: EmployeeCompensationInput): number => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n\n return compensation.paidTimeOff.reduce(\n (sum, paidTimeOff) => sum + parseFloat(paidTimeOff.finalPayoutUnusedHoursInput || '0'),\n 0,\n )\n}\n\nconst getPtoHours = (\n compensation: EmployeeCompensationInput,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const regularPtoHours = getTotalPtoHours(compensation)\n\n if (offCycle) {\n const outstandingPtoHours = getTotalOutstandingPtoHours(compensation)\n return regularPtoHours + outstandingPtoHours\n }\n\n if (isSalariedWithExpectedHours) {\n return Math.min(hoursInPayPeriod, regularPtoHours)\n }\n\n return regularPtoHours\n}\n\nconst calculateMinimumWageAdjustment = (\n primaryCompensation: Compensation,\n compensation: EmployeeCompensationInput,\n effectiveDate: Date,\n): number => {\n if (!primaryCompensation.adjustForMinimumWage) return 0\n\n const effectiveMinWage = getEffectiveMinimumWage(\n primaryCompensation.minimumWages || [],\n effectiveDate,\n )\n if (!effectiveMinWage) {\n return 0\n }\n\n const totalHours =\n compensation.hourlyCompensations?.reduce(\n (sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'),\n 0,\n ) || 0\n\n const hourlyRate = calculateHourlyRate(primaryCompensation)\n\n const totalTipCredit = (parseFloat(effectiveMinWage.wage || '0') - hourlyRate) * totalHours\n const totalTips = getTotalTipCompensations(compensation.fixedCompensations || [])\n\n return Math.max(0, totalTipCredit - totalTips)\n}\n\nconst calculateRegularPlusOvertimePay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n ptoHours: number,\n isOffCycle: boolean,\n): number => {\n if (!isOffCycle && isSalariedWithExpectedHours) {\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return primaryHourlyRate * (hoursInPayPeriod - ptoHours)\n }\n\n if (!compensation.hourlyCompensations || !employee.jobs) {\n return 0\n }\n\n const regularRatePay = compensation.hourlyCompensations.reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const hourlyRate = getHourlyRateForJob(employee, hc.jobUuid || '', effectiveDate)\n return sum + hours * hourlyRate\n }, 0)\n\n const totalHours = compensation.hourlyCompensations.reduce((sum, hc) => {\n return sum + parseFloat(hc.hours || '0')\n }, 0)\n\n if (totalHours === 0) return regularRatePay\n\n const overtimeWeightedRate = roundToSixDecimals(regularRatePay / totalHours)\n\n // Calculate overtime pay for non-regular hours\n const overtimePay = compensation.hourlyCompensations\n .filter(hc => !isRegularHours(hc.name || ''))\n .reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const multiplier = hc.compensationMultiplier || 1\n return sum + hours * overtimeWeightedRate * (multiplier - 1)\n }, 0)\n\n return regularRatePay + overtimePay\n}\n\nconst calculatePtoPay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return ptoHours * primaryHourlyRate\n}\n\nconst isSalariedWithPayPeriodExpectedHours = (\n compensation: EmployeeCompensationInput,\n isSalaried: boolean,\n hoursInPayPeriod: number,\n): boolean => {\n if (!isSalaried) return false\n\n const regularHourlyCompensation = compensation.hourlyCompensations?.find(hourlyCompensation =>\n isRegularHours(hourlyCompensation.name || ''),\n )\n\n if (!regularHourlyCompensation) return false\n\n const regularHours = parseFloat(regularHourlyCompensation.hours || '0')\n return regularHours === hoursInPayPeriod\n}\n\n/**\n * Calculates an employee's gross pay for a payroll, combining regular and overtime pay,\n * additional earnings, PTO pay, and any minimum-wage adjustment.\n *\n * @remarks\n * Returns `0` when the compensation is excluded or the employee has no primary job compensation effective\n * on the given date. The result is rounded to two decimal places.\n *\n * @param compensation - The employee compensation entry from the payroll.\n * @param employee - The employee record (used to look up jobs and effective compensations).\n * @param compensationEffectiveDateString - ISO date used to resolve the effective compensation; defaults to now.\n * @param paySchedule - The pay schedule, used to derive expected hours per pay period.\n * @param payrollCategory - The payroll category; off-cycle categories change how PTO hours are summed.\n * @returns The gross pay amount.\n * @internal\n */\nexport const calculateGrossPay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n compensationEffectiveDateString?: string,\n paySchedule?: PayScheduleObject,\n payrollCategory: PayrollCategory = PayrollCategory.Regular,\n): number => {\n if (compensation.excluded) {\n return 0\n }\n\n const compensationEffectiveDate = compensationEffectiveDateString\n ? new Date(compensationEffectiveDateString)\n : new Date()\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const primaryCompensation = getEffectiveCompensation(\n primaryJob.compensations,\n compensationEffectiveDate,\n )\n\n if (!primaryCompensation) {\n return 0\n }\n\n const salaried = isSalaried(primaryCompensation)\n const hoursInPayPeriod = paySchedule ? getHoursInPayPeriod(paySchedule) : 0\n\n const isSalariedWithExpectedHours = isSalariedWithPayPeriodExpectedHours(\n compensation,\n salaried,\n hoursInPayPeriod,\n )\n\n const offCycle = isOffCyclePayroll(payrollCategory)\n\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n\n const regularPlusOvertimePay = calculateRegularPlusOvertimePay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n ptoHours,\n offCycle,\n )\n\n const fixedPay = getAdditionalEarnings(compensation)\n const ptoPay = calculatePtoPay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const minimumWageAdjustment = calculateMinimumWageAdjustment(\n primaryCompensation,\n compensation,\n compensationEffectiveDate,\n )\n\n const total = regularPlusOvertimePay + fixedPay + ptoPay + minimumWageAdjustment\n return roundToTwoDecimals(total)\n}\n\n/**\n * Returns the high-level payroll type — `'External'`, `'Off-Cycle'`, or `'Regular'`.\n *\n * @param payroll - The payroll whose type to classify.\n * @returns The payroll type string.\n * @internal\n */\nexport const getPayrollType = (payroll: {\n external?: boolean\n offCycle?: boolean\n}): PayrollType => {\n if (payroll.external) return 'External'\n if (payroll.offCycle) return 'Off-Cycle'\n return 'Regular'\n}\n\n/**\n * Returns whether an off-cycle reason indicates a dismissal payroll.\n *\n * @param offCycleReason - The payroll's off-cycle reason string.\n * @returns `true` when the reason matches the dismissed-employee reason.\n * @internal\n */\nexport const isDismissalPayroll = (offCycleReason?: string | null): boolean =>\n offCycleReason === OffCycleReasonType.DismissedEmployee\n\nconst OFF_CYCLE_REASON_LABELS: Record<string, string> = {\n Bonus: 'Bonus',\n Correction: 'Correction',\n 'Transition from old pay schedule': 'Transition',\n 'Dismissed employee': 'Dismissal',\n 'Hired employee': 'New Hire',\n 'Benefit reversal': 'Benefit Reversal',\n 'Wage correction': 'Wage Correction',\n 'Tax reconciliation': 'Tax Reconciliation',\n Reversal: 'Reversal',\n 'Disability insurance distribution': 'Disability Insurance',\n}\n\n/**\n * Returns a human-readable label describing the payroll type, mapping off-cycle reasons to display strings.\n *\n * @param payroll - The payroll whose type to describe.\n * @returns `'External'`, `'Regular'`, `'Off-Cycle'`, or a label derived from the off-cycle reason\n * (e.g. `'Bonus'`, `'Dismissal'`).\n * @internal\n */\nexport const getPayrollTypeLabel = (payroll: {\n external?: boolean\n offCycle?: boolean\n offCycleReason?: string | null\n}): string => {\n if (payroll.external) return 'External'\n if (payroll.offCycle && payroll.offCycleReason) {\n return OFF_CYCLE_REASON_LABELS[payroll.offCycleReason] ?? payroll.offCycleReason\n }\n if (payroll.offCycle) return 'Off-Cycle'\n return 'Regular'\n}\n\n/**\n * Merges existing fixed compensations with placeholder entries for any compensation types the employee\n * doesn't yet have, then filters out excluded types and sorts the result alphabetically.\n *\n * @remarks\n * Owners (FLSA status `Owner`) never receive placeholder entries. Placeholders are added with `amount: '0.00'`\n * and the supplied `primaryJobUuid`.\n *\n * @param options - Inputs controlling which placeholder entries to add and which types to exclude.\n * @returns The merged, filtered, and sorted list of fixed compensations.\n * @internal\n */\nexport const getAdditionalEarningsCompensations = ({\n flsaStatus,\n existingFixedCompensations = [],\n primaryJobUuid,\n fixedCompensationTypes = [],\n excludedTypes = [],\n}: {\n flsaStatus: string | undefined\n existingFixedCompensations?: FixedCompensations[]\n primaryJobUuid?: string\n fixedCompensationTypes?: PayrollFixedCompensationTypesType[]\n excludedTypes?: string[]\n}): FixedCompensations[] => {\n const allFixedCompensations = [...existingFixedCompensations]\n\n if (flsaStatus !== FlsaStatus.OWNER && primaryJobUuid && fixedCompensationTypes.length > 0) {\n const compensationTypeNames = fixedCompensationTypes\n .map(type => type.name)\n .filter(Boolean) as string[]\n\n compensationTypeNames.forEach(compensationName => {\n const exists = allFixedCompensations.some(\n comp => comp.name?.toLowerCase() === compensationName.toLowerCase(),\n )\n\n if (!exists) {\n allFixedCompensations.push({\n name: compensationName,\n amount: '0.00',\n jobUuid: primaryJobUuid,\n })\n }\n })\n }\n\n // Filter and sort additional earnings (exclude specified types)\n return allFixedCompensations\n .filter(comp => comp.name && !excludedTypes.includes(comp.name))\n .sort((a, b) => (a.name || '').localeCompare(b.name || ''))\n}\n\n/**\n * Returns whether any non-excluded employee compensation uses Direct Deposit.\n *\n * @remarks\n * When the input is empty or every compensation is excluded, returns `true` so callers don't gate UI on an\n * empty set.\n *\n * @param employeeCompensations - The employee compensations to inspect.\n * @returns `true` when at least one active compensation pays via Direct Deposit, or when the list is empty.\n * @internal\n */\nexport const hasDirectDepositEmployees = (\n employeeCompensations?: Array<{ paymentMethod?: string | null; excluded?: boolean }>,\n): boolean => {\n if (!employeeCompensations || employeeCompensations.length === 0) return true\n const activeCompensations = employeeCompensations.filter(comp => !comp.excluded)\n if (activeCompensations.length === 0) return true\n return activeCompensations.some(comp => comp.paymentMethod === 'Direct Deposit')\n}\n\n/**\n * Sums gross pay, employer taxes, reimbursements, and benefits from a payroll's totals.\n *\n * @param payrollData - The payroll whose totals to sum.\n * @returns The total payroll cost, or `0` when `payrollData.totals` is missing.\n * @internal\n */\nexport const calculateTotalPayroll = (payrollData: Payroll) => {\n const totalPayroll = payrollData.totals\n ? Number(payrollData.totals.grossPay ?? 0) +\n Number(payrollData.totals.employerTaxes ?? 0) +\n Number(payrollData.totals.reimbursements ?? 0) +\n Number(payrollData.totals.benefits ?? 0)\n : 0\n\n return totalPayroll\n}\n\n/**\n * Converts a Date to Pacific Time considering Daylight Saving Time.\n * Returns the UTC offset in hours (e.g., -7 for PDT, -8 for PST).\n *\n * DST rules for Pacific Time:\n * - Starts: Second Sunday in March at 2:00 AM\n * - Ends: First Sunday in November at 2:00 AM\n */\nconst 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/**\n * Determines whether a payroll can be cancelled based on its status, deadline, and the 4:00 PM PT cutoff.\n *\n * @remarks\n * Returns `true` only when the payroll has been processed, `payrollStatusMeta.cancellable` is not explicitly `false`,\n * the payroll has a `payrollDeadline`, and the current time is before 4:00 PM Pacific Time on that deadline date.\n *\n * @param payroll - The payroll to evaluate.\n * @returns `true` if the payroll is still cancellable, `false` otherwise.\n * @internal\n */\nexport const canCancelPayroll = (payroll: Payroll): boolean => {\n if (payroll.payrollStatusMeta?.cancellable === false) {\n return false\n }\n\n if (!payroll.processed) {\n return false\n }\n\n if (!payroll.payrollDeadline) {\n return false\n }\n\n const now = new Date()\n const deadline = new Date(payroll.payrollDeadline)\n\n const nowInPT = new Date(now.getTime() + getPacificTimeOffset(now) * MS_PER_HOUR)\n const deadlineInPT = new Date(deadline.getTime() + getPacificTimeOffset(deadline) * MS_PER_HOUR)\n\n const cutoffTime = new Date(deadlineInPT)\n cutoffTime.setUTCHours(16, 0, 0, 0)\n\n if (nowInPT >= cutoffTime) {\n return false\n }\n\n return true\n}\n"],"names":["REGULAR_HOURS_NAME","getPrimaryJob","employee","job","roundToSixDecimals","value","roundToTwoDecimals","isRegularHours","compensationName","PAY_PERIOD_HOURS_MAPPINGS","formatEmployeePayRate","locale","primaryJob","jobCompensation","rate","paymentUnit","formatPayRate","useFormatEmployeePayRate","t","useTranslation","useLocale","useCallback","getRegularHours","compensation","hourlyCompensation","sum","getOvertimeHours","getTotalPtoHours","pto","getAdditionalEarnings","fixedCompensation","name","amount","getReimbursements","reimbursement","reimbursementComp","cleanupReimbursements","reimbursements","consolidated","unnamedTotal","numericAmount","description","uuid","formatHoursDisplay","hours","rounded","getHoursInPayPeriod","paySchedule","getEffectiveCompensation","compensations","effectiveDate","sorted","a","b","i","currentDateString","currentDate","getEffectiveMinimumWage","minimumWages","isSalaried","getTotalTipCompensations","fixedCompensations","calculateHourlyRate","getHourlyRateForJob","jobUuid","j","getPrimaryHourlyRate","getTotalOutstandingPtoHours","paidTimeOff","getPtoHours","isSalariedWithExpectedHours","hoursInPayPeriod","offCycle","regularPtoHours","outstandingPtoHours","calculateMinimumWageAdjustment","primaryCompensation","effectiveMinWage","totalHours","hourlyRate","totalTipCredit","totalTips","calculateRegularPlusOvertimePay","ptoHours","isOffCycle","regularRatePay","hc","overtimeWeightedRate","overtimePay","multiplier","calculatePtoPay","primaryHourlyRate","isSalariedWithPayPeriodExpectedHours","regularHourlyCompensation","calculateGrossPay","compensationEffectiveDateString","payrollCategory","PayrollCategory","compensationEffectiveDate","salaried","isOffCyclePayroll","regularPlusOvertimePay","fixedPay","ptoPay","minimumWageAdjustment","total","isDismissalPayroll","offCycleReason","OffCycleReasonType","OFF_CYCLE_REASON_LABELS","getPayrollTypeLabel","payroll","getAdditionalEarningsCompensations","flsaStatus","existingFixedCompensations","primaryJobUuid","fixedCompensationTypes","excludedTypes","allFixedCompensations","FlsaStatus","type","comp","hasDirectDepositEmployees","employeeCompensations","activeCompensations","calculateTotalPayroll","payrollData","getPacificTimeOffset","date","year","secondSundayMarch","firstSundayNovember","canCancelPayroll","now","deadline","n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,IAAIE,CAAW,GAEzFE,IAAa,IAAI,KAAKD,CAAY;AAGxC,SAFAC,EAAW,YAAY,IAAI,GAAG,GAAG,CAAC,GAE9B,EAAAH,KAAWG;AAKjB;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/components/Payroll/helpers.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport {\n type PayrollShowFixedCompensations,\n OffCycleReasonType,\n} from '@gusto/embedded-api/models/components/payrollshow'\nimport type {\n FixedCompensations,\n Reimbursements as Reimbursement,\n} from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { PayrollUpdateReimbursements } from '@gusto/embedded-api/models/components/payrollupdate'\nimport type { PayrollFixedCompensationTypesType } from '@gusto/embedded-api/models/components/payrollfixedcompensationtypestype'\nimport { useCallback } from 'react'\nimport type { TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport type { PayScheduleShow as PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleshow'\nimport type { Compensation, MinimumWages } from '@gusto/embedded-api/models/components/compensation'\nimport type { PayrollEmployeeCompensationsType } from '@gusto/embedded-api/models/components/payrollemployeecompensationstype'\nimport type { Payroll } from '@gusto/embedded-api/models/components/payrollshow'\nimport type { PayrollType } from './PayrollList/types'\nimport { PayrollCategory, isOffCyclePayroll } from './payrollTypes'\nimport { formatPayRate } from '@/helpers/formattedStrings'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { FlsaStatus } from '@/shared/constants'\nimport { MS_PER_HOUR } from '@/helpers/dateFormatting'\nconst REGULAR_HOURS_NAME = 'regular hours'\n\n/**\n * The compensation fields the payroll math helpers operate on.\n *\n * @remarks\n * These helpers run over both compensation representations the API returns: the\n * prepared (base) shape used when editing a payroll and the calculated (show)\n * shape rendered after calculation. The two are interchangeable for every field\n * read here and differ only on `deductions`, which no helper touches. Omitting\n * `deductions` lets a single input type accept either shape without a cast.\n *\n * @internal\n */\ntype EmployeeCompensationInput = Omit<PayrollEmployeeCompensationsType, 'deductions'>\n\n// Utility to get the primary job from an employee\nconst getPrimaryJob = (employee: Employee) => {\n return employee.jobs?.find(job => job.primary) || employee.jobs?.[0] || null\n}\n\nconst roundToSixDecimals = (value: number): number => {\n return Math.round(value * 1_000_000) / 1_000_000\n}\n\nconst roundToTwoDecimals = (value: number): number => {\n return Math.round(value * 100) / 100\n}\n\nconst isRegularHours = (compensationName: string): boolean => {\n return compensationName.toLowerCase() === REGULAR_HOURS_NAME\n}\n\nconst PAY_PERIOD_HOURS_MAPPINGS: Record<string, number> = {\n Daily: 8.0,\n 'Every week': 40.0,\n 'Every other week': 80.0,\n 'Twice per month': 86.666667,\n Monthly: 173.333333,\n Quarterly: 520.0,\n Semiannually: 1040.0,\n Annually: 2080.0,\n}\n\n/**\n * Formats an employee's primary-job pay rate into a localized display string.\n *\n * @remarks\n * Returns `null` when the employee has no jobs, the primary job has no compensations, or the rate is missing\n * or zero.\n *\n * @param args - The employee, translation function, and locale to format against.\n * @returns The formatted pay-rate string, or `null` when no usable rate is available.\n * @internal\n */\nexport const formatEmployeePayRate = ({\n employee,\n t,\n locale = 'en-US',\n}: {\n employee?: Employee\n t: TFunction\n locale?: string\n}) => {\n if (!employee?.jobs) {\n return null\n }\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return null\n }\n\n const jobCompensation = primaryJob.compensations[0]\n if (!jobCompensation) {\n return null\n }\n if (!jobCompensation.rate || parseFloat(jobCompensation.rate) === 0) {\n return null\n }\n\n const rate = parseFloat(jobCompensation.rate)\n const paymentUnit = jobCompensation.paymentUnit || 'Hour'\n\n return formatPayRate({ rate, paymentUnit, t, locale })\n}\n\n/**\n * Returns a memoized formatter that produces a localized pay-rate string from an employee's primary job.\n *\n * @returns A callback that takes an `Employee` and returns the formatted pay-rate string, or `null` when the\n * employee has no usable primary-job compensation.\n * @internal\n */\nexport const useFormatEmployeePayRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (employee?: Employee) => {\n return formatEmployeePayRate({ employee, t, locale })\n },\n [t, locale],\n )\n}\n\n/**\n * Sums hourly-compensation rows named `'regular hours'`.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total regular hours worked, or `0` when none are recorded.\n * @internal\n */\nexport const getRegularHours = (compensation: EmployeeCompensationInput) => {\n if (!compensation.hourlyCompensations) return 0\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => hourlyCompensation.name?.toLowerCase() === 'regular hours')\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\n/**\n * Sums the overtime hours (multiplier greater than `1`) from an employee compensation.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total overtime hours, or `0` when the compensation is excluded or has none.\n * @internal\n */\nexport function getOvertimeHours(compensation: EmployeeCompensationInput) {\n if (!compensation.hourlyCompensations || compensation.excluded) {\n return 0\n }\n\n return compensation.hourlyCompensations\n .filter(hourlyCompensation => Number(hourlyCompensation.compensationMultiplier) > 1)\n .reduce((sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'), 0)\n}\n\n/**\n * Sums the paid-time-off hours from an employee compensation.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total PTO hours, or `0` when none are recorded.\n * @internal\n */\nexport const getTotalPtoHours = (compensation: EmployeeCompensationInput) => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n return compensation.paidTimeOff.reduce((sum, pto) => sum + parseFloat(pto.hours || '0'), 0)\n}\n\n/**\n * Sums fixed-compensation amounts excluding reimbursements and minimum-wage adjustments.\n *\n * @param compensation - The employee compensation entry.\n * @returns The total additional earnings amount, or `0` when none qualify.\n * @internal\n */\nexport const getAdditionalEarnings = (compensation: EmployeeCompensationInput) => {\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n return compensation.fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase() || ''\n const amount = parseFloat(fixedCompensation.amount || '0')\n return name !== 'reimbursement' && name !== 'minimum wage adjustment' && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\n/**\n * Returns the total reimbursement amount for an employee compensation.\n *\n * @remarks\n * Prefers the explicit `reimbursements` array when present; falls back to a fixed-compensation row named\n * `'Reimbursement'` for older payroll shapes.\n *\n * @param compensation - The employee compensation entry.\n * @returns The summed reimbursement amount, or `0` when none.\n * @internal\n */\nexport const getReimbursements = (compensation: EmployeeCompensationInput) => {\n if (compensation.reimbursements && compensation.reimbursements.length > 0) {\n return compensation.reimbursements.reduce(\n (sum, reimbursement) => sum + parseFloat(reimbursement.amount || '0'),\n 0,\n )\n }\n\n if (!compensation.fixedCompensations) {\n return 0\n }\n\n const reimbursementComp = compensation.fixedCompensations.find(\n fixedCompensation => fixedCompensation.name?.toLowerCase() === 'reimbursement',\n )\n return reimbursementComp ? parseFloat(reimbursementComp.amount || '0') : 0\n}\n\n/**\n * Normalizes a reimbursement list for submission to the v2025-11-15 API.\n *\n * @remarks\n * - Drops named rows that would be no-ops on the server (zero amount with no existing uuid).\n * - Drops named rows with an existing uuid and zero amount — these are removals, and the backend's\n * `replace_itemized_reimbursements` deletes any persisted reimbursement whose uuid is omitted from the\n * incoming list.\n * - Consolidates multiple unnamed (description-less) rows into a single unnamed entry, since the API rejects\n * more than one unnamed reimbursement per employee.\n * - When the consolidated unnamed total is zero, sends no unnamed entry at all. The backend's full-replace\n * semantics then delete any persisted unnamed entry (unnamed entries never have uuids, so this is the only\n * way to remove them).\n * - Maps the read shape (`description: string | null`) to the write shape (`description?: string`), omitting\n * the field when there is no description.\n *\n * @param reimbursements - The reimbursements pulled from the prepared payroll.\n * @returns The normalized reimbursements ready to send on a payroll update.\n * @internal\n */\nexport const cleanupReimbursements = (\n reimbursements: Reimbursement[],\n): PayrollUpdateReimbursements[] => {\n const consolidated: PayrollUpdateReimbursements[] = []\n let unnamedTotal = 0\n\n reimbursements.forEach(reimbursement => {\n const amount = reimbursement.amount\n const numericAmount = parseFloat(amount || '0')\n const description = reimbursement.description?.trim() || ''\n const uuid = reimbursement.uuid ?? undefined\n\n if (description === '') {\n unnamedTotal += numericAmount\n return\n }\n\n if (numericAmount === 0 && !uuid) {\n return\n }\n\n consolidated.push({\n amount,\n description,\n ...(uuid ? { uuid } : {}),\n })\n })\n\n if (unnamedTotal > 0) {\n consolidated.push({\n amount: unnamedTotal.toFixed(2),\n })\n }\n\n return consolidated\n}\n\n/**\n * Formats an hours value for display, rounding to two decimals and ensuring whole numbers render with `.0`.\n *\n * @param hours - The hours value to format.\n * @returns A string like `'40.0'` or `'37.25'`.\n * @internal\n */\nexport const formatHoursDisplay = (hours: number): string => {\n const rounded = roundToTwoDecimals(hours)\n\n if (rounded % 1 === 0) {\n return `${rounded}.0`\n }\n\n return rounded.toString()\n}\n\nconst getHoursInPayPeriod = (paySchedule: PayScheduleObject): number => {\n if (!paySchedule.frequency) {\n return 0\n }\n\n return PAY_PERIOD_HOURS_MAPPINGS[paySchedule.frequency] || 0\n}\n\nconst getEffectiveCompensation = (\n compensations: Compensation[],\n effectiveDate: Date,\n): Compensation | null => {\n if (!compensations.length) return null\n\n const sorted = [...compensations].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst getEffectiveMinimumWage = (\n minimumWages: MinimumWages[],\n effectiveDate: Date,\n): MinimumWages | null => {\n if (!minimumWages.length) return null\n\n const sorted = [...minimumWages].sort(\n (a, b) =>\n (a.effectiveDate ? new Date(a.effectiveDate).getTime() : 0) -\n (b.effectiveDate ? new Date(b.effectiveDate).getTime() : 0),\n )\n\n for (let i = sorted.length - 1; i >= 0; i--) {\n const currentDateString = sorted[i]?.effectiveDate\n const currentDate = currentDateString ? new Date(currentDateString) : null\n if (currentDate && currentDate <= effectiveDate) {\n return sorted[i] || null\n }\n }\n\n return sorted[0] || null\n}\n\nconst isSalaried = (compensation: Compensation): boolean => {\n return compensation.flsaStatus === 'Exempt' || compensation.flsaStatus === 'Salaried Nonexempt'\n}\n\nconst getTotalTipCompensations = (fixedCompensations: PayrollShowFixedCompensations[]): number => {\n if (!fixedCompensations.length) return 0\n\n return fixedCompensations\n .filter(fixedCompensation => {\n const name = fixedCompensation.name?.toLowerCase()\n const amount = parseFloat(fixedCompensation.amount || '0')\n return (name === 'paycheck tips' || name === 'cash tips') && amount > 0\n })\n .reduce((sum, fixedCompensation) => sum + parseFloat(fixedCompensation.amount || '0'), 0)\n}\n\nconst calculateHourlyRate = (compensation: Compensation): number => {\n const rate = parseFloat(compensation.rate || '0')\n const paymentUnit = compensation.paymentUnit || 'Hour'\n\n switch (paymentUnit) {\n case 'Hour':\n return rate\n case 'Year':\n return rate / 2080 // 52 weeks * 40 hours\n case 'Month':\n return rate / 173.333333\n case 'Week':\n return rate / 40\n case 'Paycheck':\n return 0 // Paycheck rate is 0 for hourly calculation\n default:\n return rate\n }\n}\n\nconst getHourlyRateForJob = (employee: Employee, jobUuid: string, effectiveDate: Date): number => {\n const job = employee.jobs?.find(j => j.uuid === jobUuid)\n if (!job?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(job.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getPrimaryHourlyRate = (employee: Employee, effectiveDate: Date): number => {\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const compensation = getEffectiveCompensation(primaryJob.compensations, effectiveDate)\n return compensation ? calculateHourlyRate(compensation) : 0\n}\n\nconst getTotalOutstandingPtoHours = (compensation: EmployeeCompensationInput): number => {\n if (!compensation.paidTimeOff) {\n return 0\n }\n\n return compensation.paidTimeOff.reduce(\n (sum, paidTimeOff) => sum + parseFloat(paidTimeOff.finalPayoutUnusedHoursInput || '0'),\n 0,\n )\n}\n\nconst getPtoHours = (\n compensation: EmployeeCompensationInput,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const regularPtoHours = getTotalPtoHours(compensation)\n\n if (offCycle) {\n const outstandingPtoHours = getTotalOutstandingPtoHours(compensation)\n return regularPtoHours + outstandingPtoHours\n }\n\n if (isSalariedWithExpectedHours) {\n return Math.min(hoursInPayPeriod, regularPtoHours)\n }\n\n return regularPtoHours\n}\n\nconst calculateMinimumWageAdjustment = (\n primaryCompensation: Compensation,\n compensation: EmployeeCompensationInput,\n effectiveDate: Date,\n): number => {\n if (!primaryCompensation.adjustForMinimumWage) return 0\n\n const effectiveMinWage = getEffectiveMinimumWage(\n primaryCompensation.minimumWages || [],\n effectiveDate,\n )\n if (!effectiveMinWage) {\n return 0\n }\n\n const totalHours =\n compensation.hourlyCompensations?.reduce(\n (sum, hourlyCompensation) => sum + parseFloat(hourlyCompensation.hours || '0'),\n 0,\n ) || 0\n\n const hourlyRate = calculateHourlyRate(primaryCompensation)\n\n const totalTipCredit = (parseFloat(effectiveMinWage.wage || '0') - hourlyRate) * totalHours\n const totalTips = getTotalTipCompensations(compensation.fixedCompensations || [])\n\n return Math.max(0, totalTipCredit - totalTips)\n}\n\nconst calculateRegularPlusOvertimePay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n ptoHours: number,\n isOffCycle: boolean,\n): number => {\n if (!isOffCycle && isSalariedWithExpectedHours) {\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return primaryHourlyRate * (hoursInPayPeriod - ptoHours)\n }\n\n if (!compensation.hourlyCompensations || !employee.jobs) {\n return 0\n }\n\n const regularRatePay = compensation.hourlyCompensations.reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const hourlyRate = getHourlyRateForJob(employee, hc.jobUuid || '', effectiveDate)\n return sum + hours * hourlyRate\n }, 0)\n\n const totalHours = compensation.hourlyCompensations.reduce((sum, hc) => {\n return sum + parseFloat(hc.hours || '0')\n }, 0)\n\n if (totalHours === 0) return regularRatePay\n\n const overtimeWeightedRate = roundToSixDecimals(regularRatePay / totalHours)\n\n // Calculate overtime pay for non-regular hours\n const overtimePay = compensation.hourlyCompensations\n .filter(hc => !isRegularHours(hc.name || ''))\n .reduce((sum, hc) => {\n const hours = parseFloat(hc.hours || '0')\n const multiplier = hc.compensationMultiplier || 1\n return sum + hours * overtimeWeightedRate * (multiplier - 1)\n }, 0)\n\n return regularRatePay + overtimePay\n}\n\nconst calculatePtoPay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n effectiveDate: Date,\n isSalariedWithExpectedHours: boolean,\n hoursInPayPeriod: number,\n offCycle: boolean,\n): number => {\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const primaryHourlyRate = getPrimaryHourlyRate(employee, effectiveDate)\n return ptoHours * primaryHourlyRate\n}\n\nconst isSalariedWithPayPeriodExpectedHours = (\n compensation: EmployeeCompensationInput,\n isSalaried: boolean,\n hoursInPayPeriod: number,\n): boolean => {\n if (!isSalaried) return false\n\n const regularHourlyCompensation = compensation.hourlyCompensations?.find(hourlyCompensation =>\n isRegularHours(hourlyCompensation.name || ''),\n )\n\n if (!regularHourlyCompensation) return false\n\n const regularHours = parseFloat(regularHourlyCompensation.hours || '0')\n return regularHours === hoursInPayPeriod\n}\n\n/**\n * Calculates an employee's gross pay for a payroll, combining regular and overtime pay,\n * additional earnings, PTO pay, and any minimum-wage adjustment.\n *\n * @remarks\n * Returns `0` when the compensation is excluded or the employee has no primary job compensation effective\n * on the given date. The result is rounded to two decimal places.\n *\n * @param compensation - The employee compensation entry from the payroll.\n * @param employee - The employee record (used to look up jobs and effective compensations).\n * @param compensationEffectiveDateString - ISO date used to resolve the effective compensation; defaults to now.\n * @param paySchedule - The pay schedule, used to derive expected hours per pay period.\n * @param payrollCategory - The payroll category; off-cycle categories change how PTO hours are summed.\n * @returns The gross pay amount.\n * @internal\n */\nexport const calculateGrossPay = (\n compensation: EmployeeCompensationInput,\n employee: Employee,\n compensationEffectiveDateString?: string,\n paySchedule?: PayScheduleObject,\n payrollCategory: PayrollCategory = PayrollCategory.Regular,\n): number => {\n if (compensation.excluded) {\n return 0\n }\n\n const compensationEffectiveDate = compensationEffectiveDateString\n ? new Date(compensationEffectiveDateString)\n : new Date()\n\n const primaryJob = getPrimaryJob(employee)\n if (!primaryJob?.compensations) {\n return 0\n }\n\n const primaryCompensation = getEffectiveCompensation(\n primaryJob.compensations,\n compensationEffectiveDate,\n )\n\n if (!primaryCompensation) {\n return 0\n }\n\n const salaried = isSalaried(primaryCompensation)\n const hoursInPayPeriod = paySchedule ? getHoursInPayPeriod(paySchedule) : 0\n\n const isSalariedWithExpectedHours = isSalariedWithPayPeriodExpectedHours(\n compensation,\n salaried,\n hoursInPayPeriod,\n )\n\n const offCycle = isOffCyclePayroll(payrollCategory)\n\n const ptoHours = getPtoHours(\n compensation,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n\n const regularPlusOvertimePay = calculateRegularPlusOvertimePay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n ptoHours,\n offCycle,\n )\n\n const fixedPay = getAdditionalEarnings(compensation)\n const ptoPay = calculatePtoPay(\n compensation,\n employee,\n compensationEffectiveDate,\n isSalariedWithExpectedHours,\n hoursInPayPeriod,\n offCycle,\n )\n const minimumWageAdjustment = calculateMinimumWageAdjustment(\n primaryCompensation,\n compensation,\n compensationEffectiveDate,\n )\n\n const total = regularPlusOvertimePay + fixedPay + ptoPay + minimumWageAdjustment\n return roundToTwoDecimals(total)\n}\n\n/**\n * Returns the high-level payroll type — `'External'`, `'Off-Cycle'`, or `'Regular'`.\n *\n * @param payroll - The payroll whose type to classify.\n * @returns The payroll type string.\n * @internal\n */\nexport const getPayrollType = (payroll: {\n external?: boolean\n offCycle?: boolean\n}): PayrollType => {\n if (payroll.external) return 'External'\n if (payroll.offCycle) return 'Off-Cycle'\n return 'Regular'\n}\n\n/**\n * Returns whether an off-cycle reason indicates a dismissal payroll.\n *\n * @param offCycleReason - The payroll's off-cycle reason string.\n * @returns `true` when the reason matches the dismissed-employee reason.\n * @internal\n */\nexport const isDismissalPayroll = (offCycleReason?: string | null): boolean =>\n offCycleReason === OffCycleReasonType.DismissedEmployee\n\nconst OFF_CYCLE_REASON_LABELS: Record<string, string> = {\n Bonus: 'Bonus',\n Correction: 'Correction',\n 'Transition from old pay schedule': 'Transition',\n 'Dismissed employee': 'Dismissal',\n 'Hired employee': 'New Hire',\n 'Benefit reversal': 'Benefit Reversal',\n 'Wage correction': 'Wage Correction',\n 'Tax reconciliation': 'Tax Reconciliation',\n Reversal: 'Reversal',\n 'Disability insurance distribution': 'Disability Insurance',\n}\n\n/**\n * Returns a human-readable label describing the payroll type, mapping off-cycle reasons to display strings.\n *\n * @param payroll - The payroll whose type to describe.\n * @returns `'External'`, `'Regular'`, `'Off-Cycle'`, or a label derived from the off-cycle reason\n * (e.g. `'Bonus'`, `'Dismissal'`).\n * @internal\n */\nexport const getPayrollTypeLabel = (payroll: {\n external?: boolean\n offCycle?: boolean\n offCycleReason?: string | null\n}): string => {\n if (payroll.external) return 'External'\n if (payroll.offCycle && payroll.offCycleReason) {\n return OFF_CYCLE_REASON_LABELS[payroll.offCycleReason] ?? payroll.offCycleReason\n }\n if (payroll.offCycle) return 'Off-Cycle'\n return 'Regular'\n}\n\n/**\n * Merges existing fixed compensations with placeholder entries for any compensation types the employee\n * doesn't yet have, then filters out excluded types and sorts the result alphabetically.\n *\n * @remarks\n * Owners (FLSA status `Owner`) never receive placeholder entries. Placeholders are added with `amount: '0.00'`\n * and the supplied `primaryJobUuid`.\n *\n * @param options - Inputs controlling which placeholder entries to add and which types to exclude.\n * @returns The merged, filtered, and sorted list of fixed compensations.\n * @internal\n */\nexport const getAdditionalEarningsCompensations = ({\n flsaStatus,\n existingFixedCompensations = [],\n primaryJobUuid,\n fixedCompensationTypes = [],\n excludedTypes = [],\n}: {\n flsaStatus: string | undefined\n existingFixedCompensations?: FixedCompensations[]\n primaryJobUuid?: string\n fixedCompensationTypes?: PayrollFixedCompensationTypesType[]\n excludedTypes?: string[]\n}): FixedCompensations[] => {\n const allFixedCompensations = [...existingFixedCompensations]\n\n if (flsaStatus !== FlsaStatus.OWNER && primaryJobUuid && fixedCompensationTypes.length > 0) {\n const compensationTypeNames = fixedCompensationTypes\n .map(type => type.name)\n .filter(Boolean) as string[]\n\n compensationTypeNames.forEach(compensationName => {\n const exists = allFixedCompensations.some(\n comp => comp.name?.toLowerCase() === compensationName.toLowerCase(),\n )\n\n if (!exists) {\n allFixedCompensations.push({\n name: compensationName,\n amount: '0.00',\n jobUuid: primaryJobUuid,\n })\n }\n })\n }\n\n // Filter and sort additional earnings (exclude specified types)\n return allFixedCompensations\n .filter(comp => comp.name && !excludedTypes.includes(comp.name))\n .sort((a, b) => (a.name || '').localeCompare(b.name || ''))\n}\n\n/**\n * Sums gross pay, employer taxes, reimbursements, and benefits from a payroll's totals.\n *\n * @param payrollData - The payroll whose totals to sum.\n * @returns The total payroll cost, or `0` when `payrollData.totals` is missing.\n * @internal\n */\nexport const calculateTotalPayroll = (payrollData: Payroll) => {\n const totalPayroll = payrollData.totals\n ? Number(payrollData.totals.grossPay ?? 0) +\n Number(payrollData.totals.employerTaxes ?? 0) +\n Number(payrollData.totals.reimbursements ?? 0) +\n Number(payrollData.totals.benefits ?? 0)\n : 0\n\n return totalPayroll\n}\n\n/**\n * Converts a Date to Pacific Time considering Daylight Saving Time.\n * Returns the UTC offset in hours (e.g., -7 for PDT, -8 for PST).\n *\n * DST rules for Pacific Time:\n * - Starts: Second Sunday in March at 2:00 AM\n * - Ends: First Sunday in November at 2:00 AM\n */\nconst 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/**\n * Determines whether a payroll can be cancelled based on its status, deadline, and the 4:00 PM PT cutoff.\n *\n * @remarks\n * Returns `true` only when the payroll has been processed, `payrollStatusMeta.cancellable` is not explicitly `false`,\n * the payroll has a `payrollDeadline`, and the current time is before 4:00 PM Pacific Time on that deadline date.\n *\n * @param payroll - The payroll to evaluate.\n * @returns `true` if the payroll is still cancellable, `false` otherwise.\n * @internal\n */\nexport const canCancelPayroll = (payroll: Payroll): boolean => {\n if (payroll.payrollStatusMeta?.cancellable === false) {\n return false\n }\n\n if (!payroll.processed) {\n return false\n }\n\n if (!payroll.payrollDeadline) {\n return false\n }\n\n const now = new Date()\n const deadline = new Date(payroll.payrollDeadline)\n\n const nowInPT = new Date(now.getTime() + getPacificTimeOffset(now) * MS_PER_HOUR)\n const deadlineInPT = new Date(deadline.getTime() + getPacificTimeOffset(deadline) * MS_PER_HOUR)\n\n const cutoffTime = new Date(deadlineInPT)\n cutoffTime.setUTCHours(16, 0, 0, 0)\n\n if (nowInPT >= cutoffTime) {\n return false\n }\n\n return true\n}\n"],"names":["REGULAR_HOURS_NAME","getPrimaryJob","employee","job","roundToSixDecimals","value","roundToTwoDecimals","isRegularHours","compensationName","PAY_PERIOD_HOURS_MAPPINGS","formatEmployeePayRate","locale","primaryJob","jobCompensation","rate","paymentUnit","formatPayRate","useFormatEmployeePayRate","t","useTranslation","useLocale","useCallback","getRegularHours","compensation","hourlyCompensation","sum","getOvertimeHours","getTotalPtoHours","pto","getAdditionalEarnings","fixedCompensation","name","amount","getReimbursements","reimbursement","reimbursementComp","cleanupReimbursements","reimbursements","consolidated","unnamedTotal","numericAmount","description","uuid","formatHoursDisplay","hours","rounded","getHoursInPayPeriod","paySchedule","getEffectiveCompensation","compensations","effectiveDate","sorted","a","b","i","currentDateString","currentDate","getEffectiveMinimumWage","minimumWages","isSalaried","getTotalTipCompensations","fixedCompensations","calculateHourlyRate","getHourlyRateForJob","jobUuid","j","getPrimaryHourlyRate","getTotalOutstandingPtoHours","paidTimeOff","getPtoHours","isSalariedWithExpectedHours","hoursInPayPeriod","offCycle","regularPtoHours","outstandingPtoHours","calculateMinimumWageAdjustment","primaryCompensation","effectiveMinWage","totalHours","hourlyRate","totalTipCredit","totalTips","calculateRegularPlusOvertimePay","ptoHours","isOffCycle","regularRatePay","hc","overtimeWeightedRate","overtimePay","multiplier","calculatePtoPay","primaryHourlyRate","isSalariedWithPayPeriodExpectedHours","regularHourlyCompensation","calculateGrossPay","compensationEffectiveDateString","payrollCategory","PayrollCategory","compensationEffectiveDate","salaried","isOffCyclePayroll","regularPlusOvertimePay","fixedPay","ptoPay","minimumWageAdjustment","total","isDismissalPayroll","offCycleReason","OffCycleReasonType","OFF_CYCLE_REASON_LABELS","getPayrollTypeLabel","payroll","getAdditionalEarningsCompensations","flsaStatus","existingFixedCompensations","primaryJobUuid","fixedCompensationTypes","excludedTypes","allFixedCompensations","FlsaStatus","type","comp","calculateTotalPayroll","payrollData","getPacificTimeOffset","date","year","secondSundayMarch","firstSundayNovember","canCancelPayroll","now","deadline","nowInPT","MS_PER_HOUR","deadlineInPT","cutoffTime"],"mappings":";;;;;;;;AAwBA,MAAMA,IAAqB,iBAiBrBC,IAAgB,CAACC,MACdA,EAAS,MAAM,KAAK,CAAAC,MAAOA,EAAI,OAAO,KAAKD,EAAS,OAAO,CAAC,KAAK,MAGpEE,IAAqB,CAACC,MACnB,KAAK,MAAMA,IAAQ,GAAS,IAAI,KAGnCC,IAAqB,CAACD,MACnB,KAAK,MAAMA,IAAQ,GAAG,IAA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C,OAAOA,EAAY,OAAO,YAAY,CAAC,IACvC,GAaAC,IAAuB,CAACC,MAAuB;AACnD,QAAMC,IAAOD,EAAK,YAAA,GAEZE,IAAoB,IAAI,KAAKD,GAAM,GAAG,CAAC;AAC7C,EAAAC,EAAkB,QAAQ,KAAK,IAAIA,EAAkB,OAAA,KAAY,CAAC;AAElE,QAAMC,IAAsB,IAAI,KAAKF,GAAM,IAAI,CAAC;AAChD,SAAAE,EAAoB,QAAQ,KAAM,IAAIA,EAAoB,OAAA,KAAY,CAAE,GAE1DH,KAAQE,KAAqBF,IAAOG,IACnC,KAAK;AACtB,GAaaC,KAAmB,CAAClB,MAA8B;AAS7D,MARIA,EAAQ,mBAAmB,gBAAgB,MAI3C,CAACA,EAAQ,aAIT,CAACA,EAAQ;AACX,WAAO;AAGT,QAAMmB,wBAAU,KAAA,GACVC,IAAW,IAAI,KAAKpB,EAAQ,eAAe,GAE3CqB,IAAU,IAAI,KAAKF,EAAI,YAAYN,EAAqBM,CAAG,IAAIG,CAAW,GAC1EC,IAAe,IAAI,KAAKH,EAAS,YAAYP,EAAqBO,CAAQ,IAAIE,CAAW,GAEzFE,IAAa,IAAI,KAAKD,CAAY;AAGxC,SAFAC,EAAW,YAAY,IAAI,GAAG,GAAG,CAAC,GAE9B,EAAAH,KAAWG;AAKjB;"}
@@ -25,6 +25,8 @@ export { PayrollBlockerList, type ApiPayrollBlocker } from './PayrollBlocker';
25
25
  export type { PayrollBlockerListProps } from './PayrollBlocker/components/PayrollBlockerList';
26
26
  export { RecoveryCases } from './RecoveryCases/RecoveryCases';
27
27
  export type { RecoveryCasesProps } from './RecoveryCases/RecoveryCases';
28
+ export { PrintChecks } from './PrintChecks/PrintChecks';
29
+ export type { PrintChecksProps } from './PrintChecks';
28
30
  export type { OffCyclePayPeriodDateFormData, OffCyclePayrollDateType, } from './OffCyclePayPeriodDateForm';
29
31
  export { OffCycleCreation } from './OffCycleCreation';
30
32
  export type { OffCycleCreationProps, OffCycleCreationFormData } from './OffCycleCreation';