@gusto/embedded-react-sdk 0.31.0 → 0.31.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/icons/icon-arrow-right.svg.js +10 -0
  3. package/dist/assets/icons/icon-arrow-right.svg.js.map +1 -0
  4. package/dist/components/Base/Base.js +12 -13
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/DataView/DataView.js +1 -1
  7. package/dist/components/Common/DocumentList/DocumentList.js +1 -1
  8. package/dist/components/Common/DocumentViewer/DocumentViewer.js +1 -1
  9. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +1 -1
  10. package/dist/components/Common/RequirementsList/RequirementsList.js +1 -1
  11. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  12. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
  14. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormActions.js +2 -3
  16. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  17. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
  18. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  19. package/dist/components/Common/UI/Box/Box.d.ts +2 -0
  20. package/dist/components/Common/UI/Box/Box.js +13 -0
  21. package/dist/components/Common/UI/Box/Box.js.map +1 -0
  22. package/dist/components/Common/UI/Box/Box.module.scss.js +12 -0
  23. package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -0
  24. package/dist/components/Common/UI/Box/BoxTypes.d.ts +15 -0
  25. package/dist/components/Common/UI/Box/index.d.ts +2 -0
  26. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  27. package/dist/components/Common/UI/Dialog/Dialog.js +1 -1
  28. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  29. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  30. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  31. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  32. package/dist/components/Common/UI/Modal/Modal.js +1 -1
  33. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  34. package/dist/components/Common/UI/Tabs/Tabs.js +1 -1
  35. package/dist/components/Common/UI/TextInput/TextInput.js +30 -28
  36. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  37. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  38. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  40. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -4
  42. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  47. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  48. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  52. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  53. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  54. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/TitleSelect.js +4 -6
  56. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  58. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  60. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -7
  62. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  63. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  64. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  65. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
  66. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  67. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
  68. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  69. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -7
  70. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  72. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  73. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
  74. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  75. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  76. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  77. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
  78. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  79. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  80. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  81. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  82. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  83. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
  84. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  85. package/dist/components/Company/FederalTaxes/Form.js +3 -5
  86. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  87. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
  88. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  89. package/dist/components/Company/Industry/Actions.js +7 -8
  90. package/dist/components/Company/Industry/Actions.js.map +1 -1
  91. package/dist/components/Company/Industry/Context.js +6 -7
  92. package/dist/components/Company/Industry/Context.js.map +1 -1
  93. package/dist/components/Company/Industry/Edit.js +2 -3
  94. package/dist/components/Company/Industry/Edit.js.map +1 -1
  95. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  96. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  97. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  98. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  99. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  100. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  101. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  102. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  103. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  104. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  105. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -4
  107. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  108. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  109. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  110. package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
  111. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  112. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +37 -28
  113. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  114. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
  115. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  116. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  117. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  118. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  119. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  120. package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
  121. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  122. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  123. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
  124. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  125. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  126. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  127. package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
  128. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  132. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  134. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  135. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  136. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  137. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  138. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  139. package/dist/components/Company/index.js +20 -20
  140. package/dist/components/Contractor/Address/Address.js +6 -8
  141. package/dist/components/Contractor/Address/Address.js.map +1 -1
  142. package/dist/components/Contractor/Address/Form.js +1 -1
  143. package/dist/components/Contractor/Address/useAddress.js +5 -6
  144. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  145. package/dist/components/Contractor/ContractorList/index.js +31 -32
  146. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  147. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  148. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  149. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +11 -12
  150. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  151. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  152. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  153. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -4
  154. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  155. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
  156. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  157. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  158. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -9
  159. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  160. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
  161. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +0 -1
  163. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  164. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -4
  165. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  166. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  167. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  168. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
  169. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  170. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -4
  171. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  172. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  173. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  174. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  175. package/dist/components/Contractor/Submit/Submit.js +20 -21
  176. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  177. package/dist/components/Employee/Compensation/Actions.js +12 -13
  178. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  179. package/dist/components/Employee/Compensation/Edit.js +16 -17
  180. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  181. package/dist/components/Employee/Compensation/List.js +22 -23
  182. package/dist/components/Employee/Compensation/List.js.map +1 -1
  183. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -11
  184. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  185. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -12
  186. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  187. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
  188. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  189. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
  190. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  191. package/dist/components/Employee/Deductions/stateMachine.js +1 -1
  192. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +5 -6
  193. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
  195. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  197. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  198. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  199. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  200. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +25 -37
  201. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  202. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +47 -45
  203. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  204. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +146 -109
  205. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  206. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  207. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  209. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.d.ts +1 -0
  211. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/stateMachine.js +34 -22
  213. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  214. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -4
  215. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  216. package/dist/components/Employee/EmployeeList/Actions.js +6 -7
  217. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  218. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  219. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  221. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/List.js +2 -3
  223. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  224. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  225. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  226. package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
  227. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  228. package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -12
  229. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  230. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
  231. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  232. package/dist/components/Employee/Landing/Landing.js +49 -45
  233. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  234. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  235. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  236. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  237. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
  238. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  239. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  240. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  241. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
  242. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  244. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
  246. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  247. package/dist/components/Employee/Profile/Actions.js +5 -6
  248. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  249. package/dist/components/Employee/Profile/AdminPersonalDetails.js +8 -9
  250. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  251. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  252. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  253. package/dist/components/Employee/Profile/useProfile.js +3 -4
  254. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  255. package/dist/components/Employee/StateTaxes/Actions.js +5 -6
  256. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  257. package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
  258. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  259. package/dist/components/Employee/Taxes/Actions.js +6 -7
  260. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  261. package/dist/components/Employee/Taxes/FederalForm.js +13 -14
  262. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  263. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  264. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  265. package/dist/components/Employee/index.js +22 -22
  266. package/dist/components/Flow/Flow.js +7 -9
  267. package/dist/components/Flow/Flow.js.map +1 -1
  268. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -17
  269. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  270. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.d.ts +0 -1
  271. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +36 -43
  272. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  273. package/dist/components/InformationRequests/InformationRequests.d.ts +1 -2
  274. package/dist/components/InformationRequests/InformationRequests.js +37 -46
  275. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  276. package/dist/components/InformationRequests/index.js +4 -4
  277. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -10
  278. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  279. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +23 -21
  280. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  281. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.d.ts +2 -0
  282. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +70 -0
  283. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -0
  284. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +2 -0
  285. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +25 -0
  286. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -0
  287. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +13 -0
  288. package/dist/components/Payroll/OffCycleCreation/index.d.ts +3 -0
  289. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +2 -0
  290. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +50 -0
  291. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -0
  292. package/dist/components/Payroll/OffCycleDeductionsSetting/index.d.ts +3 -0
  293. package/dist/components/Payroll/OffCycleDeductionsSetting/types.d.ts +11 -0
  294. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +1 -2
  295. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +36 -0
  296. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -0
  297. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +12 -0
  298. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js.map +1 -0
  299. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +0 -4
  300. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +48 -0
  301. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -0
  302. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +18 -0
  303. package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -0
  304. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +26 -27
  305. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -1
  306. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +3 -3
  307. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +18 -18
  308. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  309. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.d.ts +2 -0
  310. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModalTypes.d.ts +8 -0
  311. package/dist/components/Payroll/OffCycleTaxWithholdingModal/index.d.ts +3 -0
  312. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.d.ts +2 -0
  313. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +17 -0
  314. package/dist/components/Payroll/OffCycleTaxWithholdingTable/index.d.ts +3 -0
  315. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.d.ts +3 -8
  316. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +38 -39
  317. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  318. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +25 -33
  319. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  320. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +1 -0
  321. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +22 -19
  322. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  323. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +26 -26
  324. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  325. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  326. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
  327. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  328. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +15 -17
  329. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  330. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +32 -32
  331. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  332. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +18 -20
  333. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  334. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +2 -3
  335. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  336. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +1 -1
  337. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
  338. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  339. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -4
  340. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  341. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -4
  342. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  343. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -12
  344. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  345. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -5
  346. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  347. package/dist/components/Payroll/index.d.ts +4 -0
  348. package/dist/components/Payroll/index.js +22 -18
  349. package/dist/components/Payroll/index.js.map +1 -1
  350. package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
  351. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  352. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  353. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  354. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
  355. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  356. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  357. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  358. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  359. package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
  360. package/dist/contexts/ThemeProvider/theme.js +1 -0
  361. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  362. package/dist/helpers/dateFormatting.js +61 -45
  363. package/dist/helpers/dateFormatting.js.map +1 -1
  364. package/dist/hooks/useOverflowDetection/useOverflowDetection.js +5 -6
  365. package/dist/i18n/I18n.js +7 -7
  366. package/dist/i18n/I18n.js.map +1 -1
  367. package/dist/i18n/en/Employee.EmployeeDocuments.json.js +1 -1
  368. package/dist/i18n/en/Employee.I9SignatureForm.json.js +83 -65
  369. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
  370. package/dist/i18n/en/Employee.Landing.json.js +7 -9
  371. package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
  372. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +14 -0
  373. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -0
  374. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js +12 -0
  375. package/dist/i18n/en/Payroll.OffCycleDeductionsSetting.json.js.map +1 -0
  376. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +18 -0
  377. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js.map +1 -0
  378. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +21 -19
  379. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  380. package/dist/shared/constants.d.ts +4 -0
  381. package/dist/shared/constants.js +6 -4
  382. package/dist/shared/constants.js.map +1 -1
  383. package/dist/style.css +1 -1
  384. package/dist/types/i18next.d.ts +72 -2
  385. package/package.json +19 -7
  386. package/dist/components/Employee/Landing/Landing.module.scss.js +0 -8
  387. package/dist/components/Employee/Landing/Landing.module.scss.js.map +0 -1
@@ -1,44 +1,44 @@
1
- const s = (t) => {
1
+ const i = (t) => {
2
2
  if (!t) return null;
3
3
  if (typeof t == "string") {
4
4
  if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
5
5
  const e = t.split("-");
6
6
  if (e.length !== 3) return null;
7
- const r = e.map(Number), o = r[0], i = r[1], a = r[2];
8
- return o === void 0 || i === void 0 || a === void 0 || isNaN(o) || isNaN(i) || isNaN(a) || i < 1 || i > 12 || a < 1 || a > 31 ? null : new Date(o, i - 1, a);
7
+ const r = e.map(Number), o = r[0], s = r[1], a = r[2];
8
+ return o === void 0 || s === void 0 || a === void 0 || isNaN(o) || isNaN(s) || isNaN(a) || s < 1 || s > 12 || a < 1 || a > 31 ? null : new Date(o, s - 1, a);
9
9
  }
10
10
  const n = new Date(t);
11
11
  return isNaN(n.getTime()) ? null : n;
12
12
  }
13
13
  return t instanceof Date ? isNaN(t.getTime()) ? null : t : null;
14
- }, c = (t) => (n, e) => {
15
- const r = s(n);
14
+ }, m = (t) => (n, e) => {
15
+ const r = i(n);
16
16
  return r ? r.toLocaleDateString(e, t) : "";
17
- }, h = c({
17
+ }, f = m({
18
18
  weekday: "short",
19
19
  month: "short",
20
20
  day: "numeric"
21
- }), d = c({
21
+ }), g = m({
22
22
  weekday: "short",
23
23
  month: "short",
24
24
  day: "numeric",
25
25
  year: "numeric"
26
- }), f = c({
26
+ }), y = m({
27
27
  month: "short",
28
28
  day: "numeric"
29
- }), g = c({
29
+ }), N = m({
30
30
  month: "short",
31
31
  day: "numeric",
32
32
  year: "numeric"
33
- }), y = c({
33
+ }), S = m({
34
34
  month: "long",
35
35
  day: "numeric"
36
- }), N = c({
36
+ }), T = m({
37
37
  month: "long",
38
38
  day: "numeric",
39
39
  year: "numeric"
40
- }), S = (t, n) => {
41
- const e = s(t);
40
+ }), w = (t, n) => {
41
+ const e = i(t);
42
42
  if (!e) return { time: "", date: "" };
43
43
  const r = e.toLocaleTimeString(n, {
44
44
  hour: "numeric",
@@ -51,11 +51,11 @@ const s = (t) => {
51
51
  day: "numeric"
52
52
  });
53
53
  return { time: r, date: o };
54
- }, T = (t, n, e) => {
55
- const r = s(t), o = s(n);
54
+ }, L = (t, n, e) => {
55
+ const r = i(t), o = i(n);
56
56
  if (!r || !o)
57
57
  return { startDate: "", endDate: "" };
58
- const i = r.toLocaleDateString(e, {
58
+ const s = r.toLocaleDateString(e, {
59
59
  month: "long",
60
60
  day: "numeric"
61
61
  }), a = o.toLocaleDateString(e, {
@@ -63,54 +63,70 @@ const s = (t) => {
63
63
  day: "numeric",
64
64
  year: "numeric"
65
65
  });
66
- return { startDate: i, endDate: a };
67
- }, w = (t, n, e, r) => {
68
- const o = s(t), i = s(n);
69
- if (!o || !i) return "";
70
- const a = r?.useShortMonth ? "short" : "long", m = o.toLocaleDateString(e, {
66
+ return { startDate: s, endDate: a };
67
+ }, W = (t, n, e, r) => {
68
+ const o = i(t), s = i(n);
69
+ if (!o || !s) return "";
70
+ const a = r?.useShortMonth ? "short" : "long", c = o.toLocaleDateString(e, {
71
71
  month: a,
72
72
  day: "numeric"
73
- }), l = i.toLocaleDateString(e, {
73
+ }), l = s.toLocaleDateString(e, {
74
74
  month: a,
75
75
  day: "numeric",
76
76
  year: "numeric"
77
77
  });
78
- return `${m}–${l}`;
79
- }, L = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0] || null, M = (t) => {
78
+ return `${c}–${l}`;
79
+ }, M = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0] || null, P = (t) => {
80
80
  if (!t || isNaN(t.getTime()))
81
81
  return null;
82
82
  const n = t.toISOString(), [e] = n.split("T");
83
83
  if (!e) return null;
84
84
  const r = e.split("-");
85
85
  if (r.length !== 3) return null;
86
- const o = r.map(Number), i = o[0], a = o[1], m = o[2];
87
- return isNaN(i) || isNaN(a) || isNaN(m) || a < 1 || a > 12 || m < 1 || m > 31 ? null : new Date(i, a - 1, m);
88
- }, u = 1e3 * 60 * 60, D = u * 24, P = (t) => {
89
- const n = s(t);
86
+ const o = r.map(Number), s = o[0], a = o[1], c = o[2];
87
+ return isNaN(s) || isNaN(a) || isNaN(c) || a < 1 || a > 12 || c < 1 || c > 31 ? null : new Date(s, a - 1, c);
88
+ }, u = 1e3 * 60 * 60, d = u * 24, k = (t) => {
89
+ const n = i(t);
90
90
  if (!n) return null;
91
91
  const e = /* @__PURE__ */ new Date();
92
92
  return (n.getTime() - e.getTime()) / u;
93
- }, W = (t) => {
94
- const n = s(t);
93
+ }, F = (t) => {
94
+ const n = i(t);
95
95
  if (!n) return null;
96
96
  const e = /* @__PURE__ */ new Date();
97
- return (n.getTime() - e.getTime()) / D;
97
+ return (n.getTime() - e.getTime()) / d;
98
+ }, D = (t) => {
99
+ const n = t.getDay();
100
+ return n === 0 || n === 6;
101
+ }, h = (t, n) => {
102
+ const e = new Date(t);
103
+ return e.setDate(e.getDate() + n), e;
104
+ }, b = (t, n) => {
105
+ let e = new Date(t);
106
+ e.setHours(0, 0, 0, 0);
107
+ let r = 0;
108
+ for (; r < n; )
109
+ e = h(e, 1), D(e) || r++;
110
+ return e;
98
111
  };
99
112
  export {
100
113
  u as MS_PER_HOUR,
101
- y as formatDateLong,
102
- N as formatDateLongWithYear,
103
- f as formatDateShort,
104
- h as formatDateShortWithWeekday,
105
- d as formatDateShortWithWeekdayAndYear,
106
- g as formatDateShortWithYear,
107
- L as formatDateToStringDate,
108
- S as formatDateWithTime,
109
- T as formatPayPeriod,
110
- w as formatPayPeriodRange,
111
- W as getDaysUntil,
112
- P as getHoursUntil,
113
- M as normalizeDateToLocal,
114
- s as normalizeToDate
114
+ b as addBusinessDays,
115
+ h as addDays,
116
+ S as formatDateLong,
117
+ T as formatDateLongWithYear,
118
+ y as formatDateShort,
119
+ f as formatDateShortWithWeekday,
120
+ g as formatDateShortWithWeekdayAndYear,
121
+ N as formatDateShortWithYear,
122
+ M as formatDateToStringDate,
123
+ w as formatDateWithTime,
124
+ L as formatPayPeriod,
125
+ W as formatPayPeriodRange,
126
+ F as getDaysUntil,
127
+ k as getHoursUntil,
128
+ D as isWeekend,
129
+ P as normalizeDateToLocal,
130
+ i as normalizeToDate
115
131
  };
116
132
  //# sourceMappingURL=dateFormatting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\nexport const isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil"],"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C7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BJ;AACtB;"}
1
+ {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\nexport const isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addBusinessDays","businessDays","currentDate","daysAdded"],"mappings":"AAMO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;AAEA,UAAMC,IAAa,IAAI,KAAKN,CAAS;AACrC,WAAO,MAAMM,EAAW,QAAA,CAAS,IAAI,OAAOA;AAAA,EAC9C;AAEA,SAAIN,aAAqB,OAChB,MAAMA,EAAU,QAAA,CAAS,IAAI,OAAOA,IAGtC;AACT,GAKMO,IACJ,CAACC,MACD,CAACR,GAAkCS,MAA4B;AAC7D,QAAMC,IAAOX,EAAgBC,CAAS;AACtC,SAAKU,IACEA,EAAK,mBAAmBD,GAAQD,CAAO,IAD5B;AAEpB,GAEWG,IAA6BJ,EAAoB;AAAA,EAC5D,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AACP,CAAC,GAEY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IAEpBE,IAAgB,CAACC,MAAmD;AAC/E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BL;AACtB,GAEaM,IAAe,CAACH,MAAmD;AAC9E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BJ;AACtB,GAEaM,IAAY,CAAC9B,MAAwB;AAChD,QAAML,IAAMK,EAAK,OAAA;AACjB,SAAOL,MAAQ,KAAKA,MAAQ;AAC9B,GAEaoC,IAAU,CAAC/B,GAAYgC,MAAuB;AACzD,QAAMC,IAAS,IAAI,KAAKjC,CAAI;AAC5B,SAAAiC,EAAO,QAAQA,EAAO,QAAA,IAAYD,CAAI,GAC/BC;AACT,GAEaC,IAAkB,CAACrB,GAAiBsB,MAA+B;AAC9E,MAAIC,IAAc,IAAI,KAAKvB,CAAS;AACpC,EAAAuB,EAAY,SAAS,GAAG,GAAG,GAAG,CAAC;AAC/B,MAAIC,IAAY;AAEhB,SAAOA,IAAYF;AACjB,IAAAC,IAAcL,EAAQK,GAAa,CAAC,GAC/BN,EAAUM,CAAW,KACxBC;AAIJ,SAAOD;AACT;"}
@@ -1,13 +1,13 @@
1
- import { useState as f, useRef as a, useEffect as v } from "react";
2
- const O = 10, w = ({
1
+ import { useState as f, useRef as v, useEffect as O } from "react";
2
+ const a = 10, w = ({
3
3
  ref: c,
4
- debounceTimeout: o = O
4
+ debounceTimeout: o = a
5
5
  }) => {
6
- const [u, i] = f(!1), e = a(null), s = (t) => {
6
+ const [u, i] = f(!1), e = v(null), s = (t) => {
7
7
  const r = t.scrollHeight > t.clientHeight;
8
8
  i(r);
9
9
  };
10
- return v(() => {
10
+ return O(() => {
11
11
  const t = (n) => {
12
12
  e.current && clearTimeout(e.current), e.current = setTimeout(() => {
13
13
  if (n.length >= 1 && n[0]) {
@@ -22,7 +22,6 @@ const O = 10, w = ({
22
22
  }, [o]), u;
23
23
  };
24
24
  export {
25
- w as default,
26
25
  w as useOverflowDetection
27
26
  };
28
27
  //# sourceMappingURL=useOverflowDetection.js.map
package/dist/i18n/I18n.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import p from "../_virtual/dynamic-import-helper.js";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { LRUCache as y } from "../helpers/LRUCache.js";
4
- const C = "common", i = new y(50), c = ({ lng: e = "en", ns: o }) => {
4
+ const f = "common", i = new y(50), c = ({ lng: e = "en", ns: o }) => {
5
5
  let r = !0, n = !1, t;
6
6
  const m = (async () => {
7
7
  try {
8
- t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Payments.CreatePayment.json": () => import("./en/Contractor.Payments.CreatePayment.json.js"), "./en/Contractor.Payments.PaymentHistory.json": () => import("./en/Contractor.Payments.PaymentHistory.json.js"), "./en/Contractor.Payments.PaymentStatement.json": () => import("./en/Contractor.Payments.PaymentStatement.json.js"), "./en/Contractor.Payments.PaymentSummary.json": () => import("./en/Contractor.Payments.PaymentSummary.json.js"), "./en/Contractor.Payments.PaymentsList.json": () => import("./en/Contractor.Payments.PaymentsList.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeDocuments.json": () => import("./en/Employee.EmployeeDocuments.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.EmploymentEligibility.json": () => import("./en/Employee.EmploymentEligibility.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.I9SignatureForm.json": () => import("./en/Employee.I9SignatureForm.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/InformationRequests.InformationRequestForm.json": () => import("./en/InformationRequests.InformationRequestForm.json.js"), "./en/InformationRequests.InformationRequestList.json": () => import("./en/InformationRequests.InformationRequestList.json.js"), "./en/InformationRequests.json": () => import("./en/InformationRequests.json.js"), "./en/Payroll.Common.json": () => import("./en/Payroll.Common.json.js"), "./en/Payroll.ConfirmWireDetailsBanner.json": () => import("./en/Payroll.ConfirmWireDetailsBanner.json.js"), "./en/Payroll.ConfirmWireDetailsForm.json": () => import("./en/Payroll.ConfirmWireDetailsForm.json.js"), "./en/Payroll.OffCycle.json": () => import("./en/Payroll.OffCycle.json.js"), "./en/Payroll.OffCyclePayPeriodDateForm.json": () => import("./en/Payroll.OffCyclePayPeriodDateForm.json.js"), "./en/Payroll.OffCycleReasonSelection.json": () => import("./en/Payroll.OffCycleReasonSelection.json.js"), "./en/Payroll.PayrollBlocker.json": () => import("./en/Payroll.PayrollBlocker.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollFlow.json": () => import("./en/Payroll.PayrollFlow.json.js"), "./en/Payroll.PayrollHistory.json": () => import("./en/Payroll.PayrollHistory.json.js"), "./en/Payroll.PayrollLanding.json": () => import("./en/Payroll.PayrollLanding.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollReceipts.json": () => import("./en/Payroll.PayrollReceipts.json.js"), "./en/Payroll.RecoveryCasesList.json": () => import("./en/Payroll.RecoveryCasesList.json.js"), "./en/Payroll.RecoveryCasesResubmit.json": () => import("./en/Payroll.RecoveryCasesResubmit.json.js"), "./en/Payroll.WireInstructions.json": () => import("./en/Payroll.WireInstructions.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${e}/${o}.json`, 3)).default, r = !1;
8
+ t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Payments.CreatePayment.json": () => import("./en/Contractor.Payments.CreatePayment.json.js"), "./en/Contractor.Payments.PaymentHistory.json": () => import("./en/Contractor.Payments.PaymentHistory.json.js"), "./en/Contractor.Payments.PaymentStatement.json": () => import("./en/Contractor.Payments.PaymentStatement.json.js"), "./en/Contractor.Payments.PaymentSummary.json": () => import("./en/Contractor.Payments.PaymentSummary.json.js"), "./en/Contractor.Payments.PaymentsList.json": () => import("./en/Contractor.Payments.PaymentsList.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeDocuments.json": () => import("./en/Employee.EmployeeDocuments.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.EmploymentEligibility.json": () => import("./en/Employee.EmploymentEligibility.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.I9SignatureForm.json": () => import("./en/Employee.I9SignatureForm.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/InformationRequests.InformationRequestForm.json": () => import("./en/InformationRequests.InformationRequestForm.json.js"), "./en/InformationRequests.InformationRequestList.json": () => import("./en/InformationRequests.InformationRequestList.json.js"), "./en/InformationRequests.json": () => import("./en/InformationRequests.json.js"), "./en/Payroll.Common.json": () => import("./en/Payroll.Common.json.js"), "./en/Payroll.ConfirmWireDetailsBanner.json": () => import("./en/Payroll.ConfirmWireDetailsBanner.json.js"), "./en/Payroll.ConfirmWireDetailsForm.json": () => import("./en/Payroll.ConfirmWireDetailsForm.json.js"), "./en/Payroll.OffCycle.json": () => import("./en/Payroll.OffCycle.json.js"), "./en/Payroll.OffCycleCreation.json": () => import("./en/Payroll.OffCycleCreation.json.js"), "./en/Payroll.OffCycleDeductionsSetting.json": () => import("./en/Payroll.OffCycleDeductionsSetting.json.js"), "./en/Payroll.OffCyclePayPeriodDateForm.json": () => import("./en/Payroll.OffCyclePayPeriodDateForm.json.js"), "./en/Payroll.OffCycleReasonSelection.json": () => import("./en/Payroll.OffCycleReasonSelection.json.js"), "./en/Payroll.OffCycleTaxWithholding.json": () => import("./en/Payroll.OffCycleTaxWithholding.json.js"), "./en/Payroll.PayrollBlocker.json": () => import("./en/Payroll.PayrollBlocker.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollFlow.json": () => import("./en/Payroll.PayrollFlow.json.js"), "./en/Payroll.PayrollHistory.json": () => import("./en/Payroll.PayrollHistory.json.js"), "./en/Payroll.PayrollLanding.json": () => import("./en/Payroll.PayrollLanding.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollReceipts.json": () => import("./en/Payroll.PayrollReceipts.json.js"), "./en/Payroll.RecoveryCasesList.json": () => import("./en/Payroll.RecoveryCasesList.json.js"), "./en/Payroll.RecoveryCasesResubmit.json": () => import("./en/Payroll.RecoveryCasesResubmit.json.js"), "./en/Payroll.WireInstructions.json": () => import("./en/Payroll.WireInstructions.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${e}/${o}.json`, 3)).default, r = !1;
9
9
  } catch {
10
10
  n = !0, r = !1;
11
11
  }
@@ -17,7 +17,7 @@ const C = "common", i = new y(50), c = ({ lng: e = "en", ns: o }) => {
17
17
  throw new Error(`Error loading translation for component: ${o}`);
18
18
  return t;
19
19
  };
20
- }, d = (e) => {
20
+ }, C = (e) => {
21
21
  const { i18n: o } = a();
22
22
  if (!e) return;
23
23
  const r = Array.isArray(e) ? e : [e];
@@ -36,15 +36,15 @@ const C = "common", i = new y(50), c = ({ lng: e = "en", ns: o }) => {
36
36
  );
37
37
  }
38
38
  }
39
- }, f = (e, o) => {
39
+ }, d = (e, o) => {
40
40
  const { i18n: r } = a();
41
41
  if (o)
42
42
  for (const n in o)
43
43
  r.addResourceBundle(n, e, o[n], !0, !0);
44
44
  };
45
45
  export {
46
- C as defaultNS,
47
- f as useComponentDictionary,
48
- d as useI18n
46
+ f as defaultNS,
47
+ d as useComponentDictionary,
48
+ C as useI18n
49
49
  };
50
50
  //# sourceMappingURL=I18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (\n namespaces:\n | keyof CustomTypeOptions['resources']\n | Array<keyof CustomTypeOptions['resources']>\n | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(\n i18nInstance.resolvedLanguage ?? 'en',\n ns,\n resource,\n true,\n false,\n ) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","namespaces","i18nInstance","useTranslation","nsMap","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;;AAKO,MAAMA,IAAY,UAGnBC,IAAgB,IAAIC,EAAS,EAAE,GAO/BC,IAAe,CAAC,EAAE,KAAAC,IAAM,MAAM,IAAAC,QAAuC;AACzE,MAAIC,IAAY,IACZC,IAAU,IACVC;AAaJ,QAAMC,KAXkB,YAAY;AAClC,QAAI;AAGF,MAAAD,KAFe,MAAME,2kLAAA,KAAAN,CAAA,IAAAC,CAAA,SAAA,CAAA,GAEH,SAClBC,IAAY;AAAA,IACd,QAAc;AACZ,MAAAC,IAAU,IACVD,IAAY;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEhE,WAAOG;AAAA,EAEX;AACF,GAMaG,IAAU,CACrBC,MAIG;AAEH,QAAM,EAAE,MAAMC,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACF,EAAY;AACjB,QAAMG,IAAQ,MAAM,QAAQH,CAAU,IAAIA,IAAa,CAACA,CAAU;AAClE,aAAWP,KAAMU,GAAO;AACtB,UAAMC,IAAM,GAAGH,EAAa,gBAAgB,IAAIR,CAAE;AAElD,IAAIJ,EAAc,IAAIe,CAAG,MAAM,QAE7Bf,EAAc,IAAIe,GAAKb,EAAa,EAAE,KAAKU,EAAa,kBAAkB,IAAAR,EAAA,CAAQ,CAAC;AAGrF,UAAMY,IAAiBhB,EAAc,IAAIe,CAAG;AAC5C,QAAIC,GAAgB;AAClB,YAAMT,IAAWS,EAAA;AACjB,MAAAJ,EAAa;AAAA,QACXA,EAAa,oBAAoB;AAAA,QACjCR;AAAA,QACAG;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AACF,GAGaU,IAAyB,CACpCb,GACAG,MACG;AACH,QAAM,EAAE,MAAMK,EAAA,IAAiBC,EAAA;AAC/B,MAAIN;AACF,eAAWW,KAAQX;AACjB,MAAAK,EAAa,kBAAkBM,GAAMd,GAAIG,EAASW,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
1
+ {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (\n namespaces:\n | keyof CustomTypeOptions['resources']\n | Array<keyof CustomTypeOptions['resources']>\n | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(\n i18nInstance.resolvedLanguage ?? 'en',\n ns,\n resource,\n true,\n false,\n ) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","namespaces","i18nInstance","useTranslation","nsMap","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;;AAKO,MAAMA,IAAY,UAGnBC,IAAgB,IAAIC,EAAS,EAAE,GAO/BC,IAAe,CAAC,EAAE,KAAAC,IAAM,MAAM,IAAAC,QAAuC;AACzE,MAAIC,IAAY,IACZC,IAAU,IACVC;AAaJ,QAAMC,KAXkB,YAAY;AAClC,QAAI;AAGF,MAAAD,KAFe,MAAME,g4LAAA,KAAAN,CAAA,IAAAC,CAAA,SAAA,CAAA,GAEH,SAClBC,IAAY;AAAA,IACd,QAAc;AACZ,MAAAC,IAAU,IACVD,IAAY;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEhE,WAAOG;AAAA,EAEX;AACF,GAMaG,IAAU,CACrBC,MAIG;AAEH,QAAM,EAAE,MAAMC,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACF,EAAY;AACjB,QAAMG,IAAQ,MAAM,QAAQH,CAAU,IAAIA,IAAa,CAACA,CAAU;AAClE,aAAWP,KAAMU,GAAO;AACtB,UAAMC,IAAM,GAAGH,EAAa,gBAAgB,IAAIR,CAAE;AAElD,IAAIJ,EAAc,IAAIe,CAAG,MAAM,QAE7Bf,EAAc,IAAIe,GAAKb,EAAa,EAAE,KAAKU,EAAa,kBAAkB,IAAAR,EAAA,CAAQ,CAAC;AAGrF,UAAMY,IAAiBhB,EAAc,IAAIe,CAAG;AAC5C,QAAIC,GAAgB;AAClB,YAAMT,IAAWS,EAAA;AACjB,MAAAJ,EAAa;AAAA,QACXA,EAAa,oBAAoB;AAAA,QACjCR;AAAA,QACAG;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AACF,GAGaU,IAAyB,CACpCb,GACAG,MACG;AACH,QAAM,EAAE,MAAMK,EAAA,IAAiBC,EAAA;AAC/B,MAAIN;AACF,eAAWW,KAAQX;AACjB,MAAAK,EAAa,kBAAkBM,GAAMd,GAAIG,EAASW,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
@@ -1,4 +1,4 @@
1
- const e = { title: "Employee documents", description: "During onboarding, employees will sign these documents.", documentsIncludedLabel: "We automatically include", taxWithholdingLabel: "Tax withholding (Form W-4)", taxWithholdingDescription: "Record employee federal withholding allowance", directDepositLabel: "Direct deposit authorization", directDepositDescription: "Lets you pay the employee via direct deposit", includeI9Heading: "Include form I-9?", includeI9Label: "Employment eligibility (Form I-9)", includeI9Description: "Verifies the employee's identity and work eligibility (must be completed onsite).", alerts: { includedTitle: "Verifying Form I-9 remotely?", includedDescription: `The federal government requires remote verification through a video call. You'll need to complete the verification process outside this application. <Link href="https://support.gusto.com/article/100165395100000/Complete-Form-I-9-and-E-Verify-for-new-hires" target="_blank">Read the instructions</Link>.`, includedDescription2: "To avoid duplicate I-9 forms, deselect “employment eligibility” above.", notIncludedTitle: "Have you completed the form I-9 already?", notIncludedDescription: 'If you are verifying the employee’s identity in person, select Form I-9 above. If verifying remotely, read <Link href="https://support.gusto.com/article/100165395100000/Complete-Form-I-9-and-E-Verify-for-new-hires" target="_blank">these instructions</Link> .' } }, i = { title: "Employee documents", description: "You will sign all these forms for your employee manually.", employmentEligibilityLabel: "Employment eligibility (Form I-9)", employmentEligibilityDescription: "Verifies the employee's identity and work eligibility (must be completed onsite).", taxWithholdingLabel: "Tax withholding (Form W-4)", taxWithholdingDescription: "Record employee federal withholding allowance", directDepositLabel: "Direct deposit authorization", directDepositDescription: "Lets you pay the employee via direct deposit", alertTitle: "The government requires you to have Form I-9 and Form W-2 completed and signed." }, t = "Continue", o = {
1
+ const e = { title: "Employee documents", description: "During onboarding, employees will sign these documents.", documentsIncludedLabel: "We automatically include", taxWithholdingLabel: "Tax withholding (Form W-4)", taxWithholdingDescription: "Record employee federal withholding allowance", directDepositLabel: "Direct deposit authorization", directDepositDescription: "Lets you pay the employee via direct deposit", includeI9Heading: "Include form I-9?", includeI9Label: "Employment eligibility (Form I-9)", includeI9Description: "Verifies the employee's identity and work eligibility (must be completed onsite).", alerts: { includedTitle: "Verifying Form I-9 remotely?", includedDescription: `The federal government requires remote verification through a video call. You'll need to complete the verification process outside this application. <Link href="https://support.gusto.com/article/100165395100000/Complete-Form-I-9-and-E-Verify-for-new-hires" target="_blank">Read the instructions</Link>.`, includedDescription2: "To avoid duplicate I-9 forms, deselect “employment eligibility” above.", notIncludedTitle: "Have you completed the form I-9 already?", notIncludedDescription: 'If you are verifying the employee’s identity in person, select Form I-9 above. If verifying remotely, read <Link href="https://support.gusto.com/article/100165395100000/Complete-Form-I-9-and-E-Verify-for-new-hires" target="_blank">these instructions</Link> .' } }, i = { title: "Employee documents", description: "You will sign all these forms for your employee manually.", employmentEligibilityLabel: "Employment eligibility (Form I-9)", employmentEligibilityDescription: "Verifies the employee's identity and work eligibility (must be completed onsite).", taxWithholdingLabel: "Tax withholding (Form W-4)", taxWithholdingDescription: "Record employee federal withholding allowance", directDepositLabel: "Direct deposit authorization", directDepositDescription: "Lets you pay the employee via direct deposit", alertTitle: "The government requires you to have Form I-9 and Form W-4 completed and signed." }, t = "Continue", o = {
2
2
  selfOnboarding: e,
3
3
  notSelfOnboarding: i,
4
4
  continueCta: t
@@ -1,78 +1,96 @@
1
- const e = "Sign I-9 document", r = "Form I-9 records your authorization to work in the United States. <viewFormLink>View form.</viewFormLink>", t = "View document", o = "Download document", a = "Signature", n = "Type your full, legal name.", i = "Signature is required", s = "I agree to electronically sign this form and confirm all information entered is correct to the best of my knowledge. I am aware that federal law provides for imprisonment and/or fines for false statements or use of false documents in connection with the completion of this form.", p = "You must agree to sign electronically", c = "Did you use a preparer/translator?", l = "No, I completed this myself", m = "Yes, I used a preparer/translator", u = "Your preparer/translator needs to complete the section below.", d = "Preparer and/or translator certification", f = "First name", g = "First name is required", S = "Last name", y = "Last name is required", L = "Street 1", w = "Street address is required", h = "Street 2 (optional)", b = "City", C = "City is required", E = "State", I = "State is required", V = "Zip", q = "Zip is required", F = "Signature", v = "Type your full, legal name.", N = "Signature is required", k = "I agree to electronically sign this form and confirm all information entered is correct to the best of my knowledge. I am aware that federal law provides for imprisonment and/or fines for false statements or use of false documents in connection with the completion of this form.", D = "You must agree to sign electronically", Y = "Add preparer", Z = "Remove preparer", P = "Cancel", T = "Sign", x = {
1
+ const e = "Sign I-9 document", t = "Form I-9 records your authorization to work in the United States. <viewFormLink>View form.</viewFormLink>", r = "View document", i = "Download document", n = "Signature", o = "Type your full, legal name.", a = "Signature is required", s = "I agree to electronically sign this form and confirm all information entered is correct to the best of my knowledge. I am aware that federal law provides for imprisonment and/or fines for false statements or use of false documents in connection with the completion of this form.", c = "You must agree to sign electronically", l = "Did you use a preparer/translator?", p = "No, I completed this myself", u = "Yes, I used a preparer/translator", d = "Your preparer/translator needs to complete the section below.", m = "Preparer and/or translator certification", h = "First name", f = "First name is required", g = "Last name", y = "Last name is required", b = "Street 1", S = "Street address is required", w = "Street 2 (optional)", z = "City", L = "City is required", A = "State", C = "State is required", B = "Zip", I = "Zip is required", k = "Signature", v = "Type your full, legal name.", E = "Signature is required", _ = "I agree to electronically sign this form and confirm all information entered is correct to the best of my knowledge. I am aware that federal law provides for imprisonment and/or fines for false statements or use of false documents in connection with the completion of this form.", q = "You must agree to sign electronically", D = "Add preparer", Y = "Remove preparer", F = "Cancel", U = "Sign", N = "You indicated that you are a citizen of the United States. If this is not accurate, make sure you have selected the correct eligibility status.", T = "You indicated that you are a lawful permanent resident. If this is not accurate, make sure you have selected the correct eligibility status.", Z = "You indicated that you are a noncitizen national. If this is not accurate, make sure you have selected the correct eligibility status.", P = "You indicated that you are a noncitizen authorized to work. If this is not accurate, make sure you have selected the correct eligibility status.", V = "A citizen is someone who was born or naturalized in the U.S. or born abroad to U.S. citizen parent(s) or who has derived citizenship through a parent's naturalization based on legal requirements.", x = "A lawful permanent resident is someone who is not a US citizen and who resides under legally recognized and lawfully recorded permanent residence as an immigrant.", Q = "A noncitizen national is someone born in American Samoa, certain former citizens of the former Trust Territory of the Pacific Islands, and certain children of noncitizen nationals born abroad.", R = "A noncitizen authorized to work includes anyone who is authorized to work in the United States but is not a US citizen, US national or lawful permanent resident.", j = "Change eligibility status", G = {
2
2
  title: e,
3
- description: r,
4
- viewDocumentCta: t,
5
- downloadInstructions: o,
6
- signatureLabel: a,
7
- signatureDescription: n,
8
- signatureError: i,
3
+ description: t,
4
+ viewDocumentCta: r,
5
+ downloadInstructions: i,
6
+ signatureLabel: n,
7
+ signatureDescription: o,
8
+ signatureError: a,
9
9
  confirmationLabel: s,
10
- confirmationError: p,
11
- preparerQuestion: c,
12
- preparerNo: l,
13
- preparerYes: m,
14
- preparerNote: u,
15
- preparerSectionTitle: d,
16
- preparerFirstNameLabel: f,
17
- preparerFirstNameError: g,
18
- preparerLastNameLabel: S,
10
+ confirmationError: c,
11
+ preparerQuestion: l,
12
+ preparerNo: p,
13
+ preparerYes: u,
14
+ preparerNote: d,
15
+ preparerSectionTitle: m,
16
+ preparerFirstNameLabel: h,
17
+ preparerFirstNameError: f,
18
+ preparerLastNameLabel: g,
19
19
  preparerLastNameError: y,
20
- preparerStreet1Label: L,
21
- preparerStreet1Error: w,
22
- preparerStreet2Label: h,
23
- preparerCityLabel: b,
24
- preparerCityError: C,
25
- preparerStateLabel: E,
26
- preparerStateError: I,
20
+ preparerStreet1Label: b,
21
+ preparerStreet1Error: S,
22
+ preparerStreet2Label: w,
23
+ preparerCityLabel: z,
24
+ preparerCityError: L,
25
+ preparerStateLabel: A,
26
+ preparerStateError: C,
27
27
  preparerZipLabel: "Zip",
28
- preparerZipError: q,
29
- preparerSignatureLabel: F,
28
+ preparerZipError: I,
29
+ preparerSignatureLabel: k,
30
30
  preparerSignatureDescription: v,
31
- preparerSignatureError: N,
32
- preparerConfirmationLabel: k,
33
- preparerConfirmationError: D,
34
- addPreparerCta: Y,
35
- removePreparerCta: Z,
36
- cancelCta: P,
37
- signCta: T
31
+ preparerSignatureError: E,
32
+ preparerConfirmationLabel: _,
33
+ preparerConfirmationError: q,
34
+ addPreparerCta: D,
35
+ removePreparerCta: Y,
36
+ cancelCta: F,
37
+ signCta: U,
38
+ eligibilityAlertLabel_citizen: N,
39
+ eligibilityAlertLabel_permanent_resident: T,
40
+ eligibilityAlertLabel_noncitizen: Z,
41
+ eligibilityAlertLabel_alien: P,
42
+ eligibilityAlertDescription_citizen: V,
43
+ eligibilityAlertDescription_permanent_resident: x,
44
+ eligibilityAlertDescription_noncitizen: Q,
45
+ eligibilityAlertDescription_alien: R,
46
+ eligibilityAlertChangeStatusCta: j
38
47
  };
39
48
  export {
40
- Y as addPreparerCta,
41
- P as cancelCta,
42
- p as confirmationError,
49
+ D as addPreparerCta,
50
+ F as cancelCta,
51
+ c as confirmationError,
43
52
  s as confirmationLabel,
44
- x as default,
45
- r as description,
46
- o as downloadInstructions,
47
- C as preparerCityError,
48
- b as preparerCityLabel,
49
- D as preparerConfirmationError,
50
- k as preparerConfirmationLabel,
51
- g as preparerFirstNameError,
52
- f as preparerFirstNameLabel,
53
+ G as default,
54
+ t as description,
55
+ i as downloadInstructions,
56
+ j as eligibilityAlertChangeStatusCta,
57
+ R as eligibilityAlertDescription_alien,
58
+ V as eligibilityAlertDescription_citizen,
59
+ Q as eligibilityAlertDescription_noncitizen,
60
+ x as eligibilityAlertDescription_permanent_resident,
61
+ P as eligibilityAlertLabel_alien,
62
+ N as eligibilityAlertLabel_citizen,
63
+ Z as eligibilityAlertLabel_noncitizen,
64
+ T as eligibilityAlertLabel_permanent_resident,
65
+ L as preparerCityError,
66
+ z as preparerCityLabel,
67
+ q as preparerConfirmationError,
68
+ _ as preparerConfirmationLabel,
69
+ f as preparerFirstNameError,
70
+ h as preparerFirstNameLabel,
53
71
  y as preparerLastNameError,
54
- S as preparerLastNameLabel,
55
- l as preparerNo,
56
- u as preparerNote,
57
- c as preparerQuestion,
58
- d as preparerSectionTitle,
72
+ g as preparerLastNameLabel,
73
+ p as preparerNo,
74
+ d as preparerNote,
75
+ l as preparerQuestion,
76
+ m as preparerSectionTitle,
59
77
  v as preparerSignatureDescription,
60
- N as preparerSignatureError,
61
- F as preparerSignatureLabel,
62
- I as preparerStateError,
63
- E as preparerStateLabel,
64
- w as preparerStreet1Error,
65
- L as preparerStreet1Label,
66
- h as preparerStreet2Label,
67
- m as preparerYes,
68
- q as preparerZipError,
69
- V as preparerZipLabel,
70
- Z as removePreparerCta,
71
- T as signCta,
72
- n as signatureDescription,
73
- i as signatureError,
74
- a as signatureLabel,
78
+ E as preparerSignatureError,
79
+ k as preparerSignatureLabel,
80
+ C as preparerStateError,
81
+ A as preparerStateLabel,
82
+ S as preparerStreet1Error,
83
+ b as preparerStreet1Label,
84
+ w as preparerStreet2Label,
85
+ u as preparerYes,
86
+ I as preparerZipError,
87
+ B as preparerZipLabel,
88
+ Y as removePreparerCta,
89
+ U as signCta,
90
+ o as signatureDescription,
91
+ a as signatureError,
92
+ n as signatureLabel,
75
93
  e as title,
76
- t as viewDocumentCta
94
+ r as viewDocumentCta
77
95
  };
78
96
  //# sourceMappingURL=Employee.I9SignatureForm.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Employee.I9SignatureForm.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Employee.I9SignatureForm.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,18 +1,16 @@
1
- const t = "Hi, {{firstName}}. Welcome to {{companyName}}!", o = "Let's get you onboarded so you can get paid.", e = "What you'll need:", n = { personalInfo: "Your personal information (home address, SSN)", taxInfo: "Tax withholding information (we'll help you figure this one out)", bankInfo: "Your bank information (account and routing numbers)" }, a = "Let's get started", s = "This process usually takes about 8 minutes.", i = {
1
+ const t = "Hi, {{firstName}}. Welcome to {{companyName}}!", o = "Let's get you onboarded so you can get paid. This process usually takes about 8 minutes.", n = "What you'll need:", e = { personalInfo: "Your personal information (home address, SSN)", taxInfo: "Tax withholding information (we'll help you figure this one out)", bankInfo: "Your bank information (account and routing numbers)" }, a = "Let's get started", s = {
2
2
  landingSubtitle: t,
3
3
  landingDescription: o,
4
- stepsSubtitle: e,
5
- steps: n,
6
- getStartedCta: a,
7
- getStartedDescription: s
4
+ stepsSubtitle: n,
5
+ steps: e,
6
+ getStartedCta: a
8
7
  };
9
8
  export {
10
- i as default,
9
+ s as default,
11
10
  a as getStartedCta,
12
- s as getStartedDescription,
13
11
  o as landingDescription,
14
12
  t as landingSubtitle,
15
- n as steps,
16
- e as stepsSubtitle
13
+ e as steps,
14
+ n as stepsSubtitle
17
15
  };
18
16
  //# sourceMappingURL=Employee.Landing.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Employee.Landing.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Employee.Landing.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,14 @@
1
+ const e = "New Off-Cycle Payroll", o = "Configure your off-cycle payroll details below.", l = "Continue", r = { missingPayrollId: "Off-cycle payroll was created but no payroll ID was returned" }, t = {
2
+ pageTitle: e,
3
+ pageDescription: o,
4
+ continueCta: l,
5
+ errors: r
6
+ };
7
+ export {
8
+ l as continueCta,
9
+ t as default,
10
+ r as errors,
11
+ o as pageDescription,
12
+ e as pageTitle
13
+ };
14
+ //# sourceMappingURL=Payroll.OffCycleCreation.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payroll.OffCycleCreation.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,12 @@
1
+ const e = "Deductions and contributions", n = "Employers often block deductions and contributions from certain checks (i.e. bonus checks), since they are calculated on a per-pay-period basis. Deductions and contributions include loan repayments, garnishments, benefits, etc. Taxes will be included regardless of what is chosen.", t = { include: { label: "Make all the regular deductions and contributions." }, skip: { label: "Block all deductions and contributions, except 401(k). Taxes will be included." } }, i = {
2
+ title: e,
3
+ description: n,
4
+ options: t
5
+ };
6
+ export {
7
+ i as default,
8
+ n as description,
9
+ t as options,
10
+ e as title
11
+ };
12
+ //# sourceMappingURL=Payroll.OffCycleDeductionsSetting.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payroll.OffCycleDeductionsSetting.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}