@gusto/embedded-react-sdk 0.44.1 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +7 -7
  3. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
  4. package/dist/components/Common/UI/Alert/Alert.js +24 -23
  5. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  6. package/dist/components/Common/UI/Alert/Alert.module.scss.js +16 -14
  7. package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
  8. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +8 -0
  9. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  10. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +38 -38
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -20
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/Head.js +12 -9
  15. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +25 -25
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -20
  19. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  20. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -22
  21. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  22. package/dist/components/Company/BankAccount/BankAccountForm/Head.js +11 -8
  23. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  24. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -20
  25. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  26. package/dist/components/Company/BankAccount/BankAccountList/Head.js +44 -39
  27. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  28. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -20
  29. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  30. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +28 -28
  31. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  32. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -9
  33. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  34. package/dist/components/Company/FederalTaxes/Head.js +7 -6
  35. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  36. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -28
  37. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  38. package/dist/components/Company/Industry/Context.js +7 -23
  39. package/dist/components/Company/Industry/Context.js.map +1 -1
  40. package/dist/components/Company/Industry/Head.js +10 -9
  41. package/dist/components/Company/Industry/Head.js.map +1 -1
  42. package/dist/components/Company/Industry/IndustrySelect.js +22 -19
  43. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  44. package/dist/components/Company/Locations/LocationForm/Head.js +9 -8
  45. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  46. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -20
  47. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  48. package/dist/components/Company/Locations/LocationsList/Head.js +11 -10
  49. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  50. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -11
  51. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  52. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -20
  53. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  54. package/dist/components/Company/OnboardingOverview/context.js +4 -20
  55. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  56. package/dist/components/Company/PaySchedule/PayScheduleList.js +18 -18
  57. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
  58. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -20
  59. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  60. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -20
  61. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  62. package/dist/components/Contractor/Address/useAddress.js +6 -22
  63. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  64. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +1 -1
  65. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  66. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +7 -7
  67. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  68. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -2
  69. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  70. package/dist/components/Contractor/Profile/useContractorProfile.js +42 -52
  71. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  72. package/dist/components/Employee/Compensation/index.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/{Compensation.d.ts → onboarding/Compensation.d.ts} +3 -3
  74. package/dist/components/Employee/Compensation/onboarding/Compensation.js +88 -0
  75. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -0
  76. package/dist/components/Employee/Compensation/{CompensationFlowComponents.d.ts → onboarding/CompensationFlowComponents.d.ts} +3 -3
  77. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js +59 -0
  78. package/dist/components/Employee/Compensation/onboarding/CompensationFlowComponents.js.map +1 -0
  79. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +21 -0
  80. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +249 -0
  81. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -0
  82. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js +8 -0
  83. package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.module.scss.js.map +1 -0
  84. package/dist/components/Employee/Compensation/onboarding/EditCompensation/index.d.ts +3 -0
  85. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsList.d.ts +1 -1
  86. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js +43 -0
  87. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsList.js.map +1 -0
  88. package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.js +10 -10
  89. package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -0
  90. package/dist/components/Employee/Compensation/{compensationStateMachine.js → onboarding/compensationStateMachine.js} +1 -1
  91. package/dist/components/Employee/Compensation/onboarding/compensationStateMachine.js.map +1 -0
  92. package/dist/components/Employee/Compensation/onboarding/index.d.ts +2 -0
  93. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.d.ts +9 -0
  94. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js +10 -0
  95. package/dist/components/Employee/Compensation/shared/derivePrimaryFlsaStatus.js.map +1 -0
  96. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +7 -0
  97. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +41 -35
  98. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
  99. package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +0 -2
  100. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +24 -3
  101. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +193 -181
  102. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
  103. package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +0 -2
  104. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +8 -0
  105. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +14 -13
  106. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -1
  107. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +19 -2
  108. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +133 -130
  109. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  110. package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
  111. package/dist/components/Employee/Dashboard/BasicDetailsView.js +87 -65
  112. package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
  113. package/dist/components/Employee/Dashboard/CompensationCard.d.ts +13 -0
  114. package/dist/components/Employee/Dashboard/Dashboard.js +89 -109
  115. package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
  116. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +15 -0
  117. package/dist/components/Employee/Dashboard/DashboardComponents.js +120 -25
  118. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  119. package/dist/components/Employee/Dashboard/DocumentsView.d.ts +11 -0
  120. package/dist/components/Employee/Dashboard/DocumentsView.js +24 -17
  121. package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
  122. package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +9 -17
  123. package/dist/components/Employee/Dashboard/JobAndPayView.js +495 -114
  124. package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
  125. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.d.ts +10 -0
  126. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js +64 -0
  127. package/dist/components/Employee/Dashboard/PendingChangesReviewModal.js.map +1 -0
  128. package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
  129. package/dist/components/Employee/Dashboard/TaxesView.js +82 -60
  130. package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
  131. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +7 -0
  132. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +227 -40
  133. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  134. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +50 -0
  135. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +57 -0
  136. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -0
  137. package/dist/components/Employee/Dashboard/getPendingCompensationChanges.test.d.ts +1 -0
  138. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +7 -4
  139. package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -1
  140. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +14 -8
  141. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +60 -36
  142. package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
  143. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.d.ts +8 -0
  144. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js +61 -0
  145. package/dist/components/Employee/Dashboard/usePendingChangeDetailRenderer.js.map +1 -0
  146. package/dist/components/Employee/Deductions/Deductions.d.ts +2 -8
  147. package/dist/components/Employee/Deductions/Deductions.js +25 -52
  148. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  149. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.d.ts +9 -0
  150. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js +137 -0
  151. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportFormView.js.map +1 -0
  152. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +9 -5
  153. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +97 -94
  154. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  155. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.d.ts +18 -0
  156. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +137 -0
  157. package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -0
  158. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +10 -5
  159. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +57 -77
  160. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  161. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +5 -5
  162. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +29 -39
  163. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  164. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +8 -6
  165. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  166. package/dist/components/Employee/Deductions/{DeductionsComponents.d.ts → deductionsContextualComponents.d.ts} +7 -8
  167. package/dist/components/Employee/Deductions/deductionsContextualComponents.js +74 -0
  168. package/dist/components/Employee/Deductions/deductionsContextualComponents.js.map +1 -0
  169. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.d.ts +7 -0
  170. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js +31 -0
  171. package/dist/components/Employee/Deductions/shared/DeleteDeductionDialog.js.map +1 -0
  172. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.d.ts +7 -0
  173. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js +10 -0
  174. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.js.map +1 -0
  175. package/dist/components/Employee/Deductions/shared/formatDeductionAmount.test.d.ts +1 -0
  176. package/dist/components/Employee/Deductions/shared/index.d.ts +7 -0
  177. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +63 -0
  178. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +64 -0
  179. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -0
  180. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.d.ts +36 -0
  181. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +39 -0
  182. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js.map +1 -0
  183. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/index.d.ts +4 -0
  184. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +62 -0
  185. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +208 -0
  186. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -0
  187. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +63 -0
  188. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js +52 -0
  189. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.js.map +1 -0
  190. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.d.ts +25 -0
  191. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +36 -0
  192. package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js.map +1 -0
  193. package/dist/components/Employee/Deductions/shared/useDeductionForm/index.d.ts +4 -0
  194. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +64 -0
  195. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js +203 -0
  196. package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -0
  197. package/dist/components/Employee/Deductions/shared/useDeductionsList.d.ts +22 -0
  198. package/dist/components/Employee/Deductions/shared/useDeductionsList.js +50 -0
  199. package/dist/components/Employee/Deductions/shared/useDeductionsList.js.map +1 -0
  200. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.d.ts +13 -0
  201. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js +17 -0
  202. package/dist/components/Employee/Deductions/shared/useDeleteDeduction.js.map +1 -0
  203. package/dist/components/Employee/Deductions/stateMachine.d.ts +4 -5
  204. package/dist/components/Employee/Deductions/stateMachine.js +67 -89
  205. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  206. package/dist/components/Employee/Documents/management/DocumentManager.d.ts +6 -0
  207. package/dist/components/Employee/Documents/management/DocumentManager.js +60 -0
  208. package/dist/components/Employee/Documents/management/DocumentManager.js.map +1 -0
  209. package/dist/components/Employee/Documents/management/index.d.ts +3 -0
  210. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.js +3 -3
  211. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -0
  212. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.d.ts +1 -1
  213. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/DocumentList.js +5 -5
  214. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  215. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.js +1 -1
  216. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Head.js.map +1 -0
  217. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.js +3 -3
  218. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -0
  219. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +8 -0
  220. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  221. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.d.ts +1 -1
  222. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentSigner.js +5 -5
  223. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -0
  224. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.d.ts +1 -1
  225. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibility.js +4 -4
  226. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -0
  227. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.js +11 -11
  228. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -0
  229. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -0
  230. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts +1 -0
  231. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/countries.js.map +1 -0
  232. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.d.ts +1 -1
  233. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.js +11 -11
  234. package/dist/components/Employee/Documents/onboarding/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -0
  235. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.d.ts +2 -2
  236. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/documentSignerStateMachine.js +8 -8
  237. package/dist/components/Employee/Documents/onboarding/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  238. package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.js +1 -1
  239. package/dist/components/Employee/Documents/onboarding/DocumentSigner/stateMachine.js.map +1 -0
  240. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.d.ts +3 -3
  241. package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocuments.js +6 -6
  242. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -0
  243. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js +117 -0
  244. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -0
  245. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.d.ts +1 -1
  246. package/dist/components/Employee/{DocumentSigner → Documents/shared}/SignatureForm/SignatureForm.js +11 -11
  247. package/dist/components/Employee/Documents/shared/SignatureForm/SignatureForm.js.map +1 -0
  248. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js.map +1 -0
  249. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
  250. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
  251. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +89 -82
  252. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -1
  253. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +37 -35
  254. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
  255. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
  256. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
  257. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  258. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +38 -39
  259. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  260. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +29 -27
  261. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  262. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -1
  263. package/dist/components/Employee/PaymentMethod/management/ListView.d.ts +8 -0
  264. package/dist/components/Employee/PaymentMethod/management/ListView.js +138 -0
  265. package/dist/components/Employee/PaymentMethod/management/ListView.js.map +1 -0
  266. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.d.ts +11 -0
  267. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js +49 -0
  268. package/dist/components/Employee/PaymentMethod/management/PaymentMethod.js.map +1 -0
  269. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.d.ts +8 -0
  270. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js +23 -0
  271. package/dist/components/Employee/PaymentMethod/management/PaymentMethodComponents.js.map +1 -0
  272. package/dist/components/Employee/PaymentMethod/management/index.d.ts +4 -0
  273. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.d.ts +5 -0
  274. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js +75 -0
  275. package/dist/components/Employee/PaymentMethod/management/paymentMethodStateMachine.js.map +1 -0
  276. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.d.ts +8 -0
  277. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +66 -0
  278. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -0
  279. package/dist/components/Employee/PaymentMethod/onboarding/ListView.d.ts +9 -0
  280. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +168 -0
  281. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js.map +1 -0
  282. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.d.ts +11 -0
  283. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js +44 -0
  284. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethod.js.map +1 -0
  285. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.d.ts +8 -0
  286. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js +23 -0
  287. package/dist/components/Employee/PaymentMethod/onboarding/PaymentMethodComponents.js.map +1 -0
  288. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.d.ts +8 -0
  289. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js +97 -0
  290. package/dist/components/Employee/PaymentMethod/onboarding/SplitView.js.map +1 -0
  291. package/dist/components/Employee/PaymentMethod/onboarding/index.d.ts +2 -0
  292. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.d.ts +5 -0
  293. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js +75 -0
  294. package/dist/components/Employee/PaymentMethod/onboarding/paymentMethodStateMachine.js.map +1 -0
  295. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.d.ts +9 -0
  296. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js +31 -0
  297. package/dist/components/Employee/PaymentMethod/shared/DeleteBankAccountDialog.js.map +1 -0
  298. package/dist/components/Employee/PaymentMethod/shared/index.d.ts +7 -0
  299. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.d.ts +15 -0
  300. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +22 -0
  301. package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js.map +1 -0
  302. package/dist/components/Employee/PaymentMethod/shared/useBankForm/index.d.ts +5 -0
  303. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.d.ts +37 -0
  304. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js +105 -0
  305. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankForm.js.map +1 -0
  306. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +39 -0
  307. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js +26 -0
  308. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.js.map +1 -0
  309. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.d.ts +13 -0
  310. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js +19 -0
  311. package/dist/components/Employee/PaymentMethod/shared/useDeleteBankAccount.js.map +1 -0
  312. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.d.ts +6 -0
  313. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js +9 -0
  314. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/fields.js.map +1 -0
  315. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/index.d.ts +5 -0
  316. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.d.ts +31 -0
  317. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js +94 -0
  318. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodForm.js.map +1 -0
  319. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.d.ts +31 -0
  320. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js +22 -0
  321. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodForm/usePaymentMethodFormSchema.js.map +1 -0
  322. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.d.ts +20 -0
  323. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js +68 -0
  324. package/dist/components/Employee/PaymentMethod/shared/usePaymentMethodList.js.map +1 -0
  325. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.d.ts +6 -0
  326. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js +9 -0
  327. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/fields.js.map +1 -0
  328. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/index.d.ts +6 -0
  329. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +48 -0
  330. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +46 -0
  331. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -0
  332. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.d.ts +65 -0
  333. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js +209 -0
  334. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsForm.js.map +1 -0
  335. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +53 -0
  336. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js +93 -0
  337. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.js.map +1 -0
  338. package/dist/components/Employee/Profile/onboarding/AdminProfile.js +88 -87
  339. package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -1
  340. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -2
  341. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  342. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +19 -17
  343. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
  344. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js +8 -0
  345. package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.module.scss.js.map +1 -0
  346. package/dist/components/Employee/Taxes/FederalForm.js +27 -26
  347. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  348. package/dist/components/Employee/Taxes/FederalHead.js +13 -10
  349. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  350. package/dist/components/Employee/Taxes/StateForm.js +17 -14
  351. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  352. package/dist/components/Employee/Taxes/Taxes.js +75 -69
  353. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  354. package/dist/components/Employee/Taxes/useTaxes.js +4 -20
  355. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  356. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +26 -26
  357. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
  358. package/dist/components/Employee/exports/employeeManagement.d.ts +4 -1
  359. package/dist/components/Employee/exports/employeeManagement.js +22 -18
  360. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  361. package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
  362. package/dist/components/Employee/exports/employeeOnboarding.js +4 -4
  363. package/dist/components/Employee/index.d.ts +4 -4
  364. package/dist/components/Employee/index.js +5 -5
  365. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +26 -34
  366. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  367. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  368. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  369. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +1 -1
  370. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +71 -54
  371. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  372. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +1 -1
  373. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  374. package/dist/components/Payroll/usePreparedPayrollData.js +22 -36
  375. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  376. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +84 -82
  377. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -1
  378. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +1 -1
  379. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +49 -48
  380. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  381. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +1 -0
  382. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +39 -37
  383. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
  384. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +31 -31
  385. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  386. package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +1 -0
  387. package/dist/components/TimeOff/PolicyList/PolicyList.js +27 -27
  388. package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
  389. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +50 -50
  390. package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  391. package/dist/components/TimeOff/PolicySettings/PolicySettings.d.ts +1 -0
  392. package/dist/components/TimeOff/PolicySettings/PolicySettings.js +66 -41
  393. package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  394. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.d.ts +1 -1
  395. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +59 -48
  396. package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  397. package/dist/components/TimeOff/PolicySettings/PolicySettingsTypes.d.ts +3 -0
  398. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +34 -33
  399. package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  400. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -0
  401. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +69 -61
  402. package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  403. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +119 -75
  404. package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  405. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +72 -61
  406. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  407. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
  408. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +103 -84
  409. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  410. package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
  411. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +51 -49
  412. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
  413. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
  414. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +78 -59
  415. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
  416. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +8 -0
  417. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js.map +1 -0
  418. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +6 -2
  419. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +209 -154
  420. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
  421. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +3 -1
  422. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +36 -34
  423. package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
  424. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +136 -134
  425. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
  426. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +6 -6
  427. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +1 -1
  428. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +63 -65
  429. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
  430. package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +1 -0
  431. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +50 -49
  432. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
  433. package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +4 -4
  434. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +1 -1
  435. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +66 -55
  436. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  437. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +1 -0
  438. package/dist/contexts/ApiProvider/ApiProvider.js +33 -39
  439. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  440. package/dist/contexts/ApiProvider/createSdkQueryClient.d.ts +17 -0
  441. package/dist/contexts/ApiProvider/createSdkQueryClient.js +14 -0
  442. package/dist/contexts/ApiProvider/createSdkQueryClient.js.map +1 -0
  443. package/dist/helpers/dateFormatting.js +52 -56
  444. package/dist/helpers/dateFormatting.js.map +1 -1
  445. package/dist/helpers/formattedStrings.d.ts +12 -0
  446. package/dist/helpers/formattedStrings.js +55 -33
  447. package/dist/helpers/formattedStrings.js.map +1 -1
  448. package/dist/hooks/useClientPagination/useClientPagination.d.ts +44 -0
  449. package/dist/hooks/useClientPagination/useClientPagination.js +69 -0
  450. package/dist/hooks/useClientPagination/useClientPagination.js.map +1 -0
  451. package/dist/hooks/useClientPagination/useClientPagination.test.d.ts +1 -0
  452. package/dist/i18n/I18n.js +6 -5
  453. package/dist/i18n/I18n.js.map +1 -1
  454. package/dist/i18n/en/Company.PaySchedule.json.js +22 -20
  455. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  456. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +8 -6
  457. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
  458. package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +9 -9
  459. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +6 -4
  460. package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -1
  461. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +17 -15
  462. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
  463. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +10 -8
  464. package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -1
  465. package/dist/i18n/en/Employee.Dashboard.json.js +16 -12
  466. package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
  467. package/dist/i18n/en/Employee.Deductions.json.js +104 -76
  468. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  469. package/dist/i18n/en/Employee.DocumentManager.json.js +12 -0
  470. package/dist/i18n/en/Employee.DocumentManager.json.js.map +1 -0
  471. package/dist/i18n/en/Employee.PaymentMethod.json.js +76 -64
  472. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  473. package/dist/i18n/en/common.json.d.ts +7 -0
  474. package/dist/i18n/en/common.json.js +19 -17
  475. package/dist/i18n/en/common.json.js.map +1 -1
  476. package/dist/index.d.ts +16 -6
  477. package/dist/index.js +138 -112
  478. package/dist/index.js.map +1 -1
  479. package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +2 -1
  480. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +20 -18
  481. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  482. package/dist/shared/constants.d.ts +8 -2
  483. package/dist/shared/constants.js +11 -8
  484. package/dist/shared/constants.js.map +1 -1
  485. package/dist/style.css +1 -1
  486. package/dist/test-utils/assertions.d.ts +20 -0
  487. package/dist/types/i18next.d.ts +140 -4
  488. package/dist/types/sdkError.js +58 -47
  489. package/dist/types/sdkError.js.map +1 -1
  490. package/docs/reference/endpoint-inventory.json +980 -1170
  491. package/package.json +33 -22
  492. package/dist/components/Employee/Compensation/Compensation.js +0 -87
  493. package/dist/components/Employee/Compensation/Compensation.js.map +0 -1
  494. package/dist/components/Employee/Compensation/CompensationFlowComponents.js +0 -61
  495. package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +0 -1
  496. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +0 -14
  497. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +0 -128
  498. package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +0 -1
  499. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +0 -17
  500. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +0 -224
  501. package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +0 -1
  502. package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +0 -5
  503. package/dist/components/Employee/Compensation/JobsList/JobsList.js +0 -47
  504. package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +0 -1
  505. package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +0 -1
  506. package/dist/components/Employee/Compensation/compensationSchema.d.ts +0 -29
  507. package/dist/components/Employee/Compensation/compensationSchema.js +0 -63
  508. package/dist/components/Employee/Compensation/compensationSchema.js.map +0 -1
  509. package/dist/components/Employee/Compensation/compensationStateMachine.js.map +0 -1
  510. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +0 -15
  511. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +0 -27
  512. package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +0 -1
  513. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +0 -13
  514. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +0 -26
  515. package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +0 -1
  516. package/dist/components/Employee/Deductions/Actions.d.ts +0 -1
  517. package/dist/components/Employee/Deductions/DeductionsComponents.js +0 -31
  518. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +0 -1
  519. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +0 -39
  520. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -237
  521. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  522. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -22
  523. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -162
  524. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  525. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +0 -34
  526. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +0 -168
  527. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +0 -1
  528. package/dist/components/Employee/Deductions/Head.d.ts +0 -1
  529. package/dist/components/Employee/Deductions/useDeductions.d.ts +0 -30
  530. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +0 -1
  531. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +0 -1
  532. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +0 -1
  533. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +0 -1
  534. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +0 -24
  535. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +0 -1
  536. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +0 -1
  537. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +0 -1
  538. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +0 -1
  539. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +0 -1
  540. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/countries.js.map +0 -1
  541. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +0 -1
  542. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +0 -1
  543. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +0 -1
  544. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +0 -1
  545. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +0 -1
  546. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +0 -1
  547. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +0 -1
  548. package/dist/components/Employee/EmployeeDocuments/EmployeeDocuments.js.map +0 -1
  549. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +0 -115
  550. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +0 -1
  551. package/dist/components/Employee/PaymentMethod/Actions.d.ts +0 -1
  552. package/dist/components/Employee/PaymentMethod/Actions.js +0 -20
  553. package/dist/components/Employee/PaymentMethod/Actions.js.map +0 -1
  554. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +0 -13
  555. package/dist/components/Employee/PaymentMethod/BankAccount.js +0 -13
  556. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +0 -1
  557. package/dist/components/Employee/PaymentMethod/BankAccountEdit.d.ts +0 -1
  558. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +0 -58
  559. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +0 -1
  560. package/dist/components/Employee/PaymentMethod/BankAccountsList.d.ts +0 -1
  561. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +0 -51
  562. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +0 -1
  563. package/dist/components/Employee/PaymentMethod/Head.d.ts +0 -1
  564. package/dist/components/Employee/PaymentMethod/Head.js +0 -13
  565. package/dist/components/Employee/PaymentMethod/Head.js.map +0 -1
  566. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +0 -9
  567. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +0 -183
  568. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +0 -1
  569. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +0 -10
  570. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +0 -38
  571. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +0 -1
  572. package/dist/components/Employee/PaymentMethod/Split.d.ts +0 -1
  573. package/dist/components/Employee/PaymentMethod/Split.js +0 -175
  574. package/dist/components/Employee/PaymentMethod/Split.js.map +0 -1
  575. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +0 -54
  576. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +0 -68
  577. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +0 -1
  578. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/JobsListPresentation.d.ts +0 -0
  579. /package/dist/components/Employee/Compensation/{JobsList → onboarding/JobsList}/index.d.ts +0 -0
  580. /package/dist/components/Employee/Compensation/{compensationStateMachine.d.ts → onboarding/compensationStateMachine.d.ts} +0 -0
  581. /package/dist/components/Employee/{DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.test.d.ts → Compensation/shared/derivePrimaryFlsaStatus.test.d.ts} +0 -0
  582. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  583. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/Head.d.ts +0 -0
  584. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/List.d.ts +0 -0
  585. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  586. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +0 -0
  587. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +0 -0
  588. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/EmploymentEligibilitySchema.js +0 -0
  589. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.d.ts +0 -0
  590. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/countries.js +0 -0
  591. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/EmploymentEligibility/index.d.ts +0 -0
  592. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js +0 -0
  593. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/I9SignatureForm/I9SignatureForm.module.scss.js.map +0 -0
  594. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/index.d.ts +0 -0
  595. /package/dist/components/Employee/{DocumentSigner → Documents/onboarding/DocumentSigner}/stateMachine.d.ts +0 -0
  596. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/EmployeeDocumentsPresentation.d.ts +0 -0
  597. /package/dist/components/Employee/{EmployeeDocuments → Documents/onboarding/EmployeeDocuments}/index.d.ts +0 -0
  598. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.d.ts +0 -0
  599. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/fields.js +0 -0
  600. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/index.d.ts +0 -0
  601. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -0
  602. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/signEmployeeFormSchema.js +0 -0
  603. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +0 -0
  604. /package/dist/components/Employee/{DocumentSigner → Documents}/shared/useSignEmployeeForm/useSignEmployeeForm.js +0 -0
@@ -1,86 +1,97 @@
1
- import { jsx as n, jsxs as g, Fragment as P } from "react/jsx-runtime";
2
- import { useTranslation as b } from "react-i18next";
3
- import { EmployeeTable as E } from "../EmployeeTable/EmployeeTable.js";
1
+ import { jsx as i, jsxs as P, Fragment as b } from "react/jsx-runtime";
2
+ import { useTranslation as S } from "react-i18next";
3
+ import { EmployeeTable as D } from "../EmployeeTable/EmployeeTable.js";
4
4
  import "classnames";
5
5
  import "../../../../shared/constants.js";
6
- import { useComponentContext as D } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- import { useI18n as S } from "../../../../i18n/I18n.js";
8
- import { DetailViewLayout as L } from "../../../Common/DetailViewLayout/DetailViewLayout.js";
9
- const x = "employees";
10
- function B({
6
+ import { EmptyData as L } from "../../../Common/EmptyData/EmptyData.js";
7
+ import { useComponentContext as O } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
+ import { useI18n as T } from "../../../../i18n/I18n.js";
9
+ import x from "../../../../assets/icons/plus-circle.svg.js";
10
+ import { DetailViewLayout as A } from "../../../Common/DetailViewLayout/DetailViewLayout.js";
11
+ const v = "employees";
12
+ function w({
11
13
  title: l,
12
- subtitle: r,
14
+ subtitle: m,
13
15
  onBack: c,
14
- backLabel: m,
15
- actions: s,
16
- firstTab: o,
16
+ backLabel: s,
17
+ actions: p,
18
+ firstTab: a,
17
19
  selectedTabId: d,
18
20
  onTabChange: h,
19
- employees: e,
20
- removeDialog: i,
21
- successAlert: a,
22
- onDismissAlert: p
21
+ employees: t,
22
+ onAddEmployee: n,
23
+ removeDialog: o,
24
+ successAlert: r,
25
+ onDismissAlert: u
23
26
  }) {
24
- S("Company.TimeOff.PolicyDetail");
25
- const { t } = b("Company.TimeOff.PolicyDetail"), { Alert: u, Dialog: C, Box: f } = D(), y = [
27
+ T("Company.TimeOff.PolicyDetail");
28
+ const { t: e } = S("Company.TimeOff.PolicyDetail"), { Alert: y, Dialog: C, Button: f } = O(), E = t.emptyState ?? (n ? () => /* @__PURE__ */ i(L, { title: e("emptyEmployees.title"), children: /* @__PURE__ */ i(
29
+ f,
26
30
  {
27
- id: o.id,
28
- label: o.label,
29
- content: o.content
31
+ variant: "secondary",
32
+ icon: /* @__PURE__ */ i(x, { "aria-hidden": !0 }),
33
+ onClick: n,
34
+ children: e("emptyEmployees.addEmployeeCta")
35
+ }
36
+ ) }) : void 0), g = [
37
+ {
38
+ id: a.id,
39
+ label: a.label,
40
+ content: a.content
30
41
  },
31
42
  {
32
- id: x,
33
- label: t("tabs.employees"),
34
- content: /* @__PURE__ */ n(f, { withPadding: !1, children: /* @__PURE__ */ n(
35
- E,
43
+ id: v,
44
+ label: e("tabs.employees"),
45
+ content: /* @__PURE__ */ i(
46
+ D,
36
47
  {
37
- data: e.data,
38
- searchValue: e.searchValue,
39
- onSearchChange: e.onSearchChange,
40
- onSearchClear: e.onSearchClear,
41
- searchPlaceholder: e.searchPlaceholder,
42
- itemMenu: e.itemMenu,
43
- pagination: e.pagination,
44
- isFetching: e.isFetching,
45
- emptyState: e.emptyState,
46
- additionalColumns: e.additionalColumns,
47
- hideJobTitle: e.hideJobTitle
48
+ data: t.data,
49
+ searchValue: t.searchValue,
50
+ onSearchChange: t.onSearchChange,
51
+ onSearchClear: t.onSearchClear,
52
+ searchPlaceholder: t.searchPlaceholder,
53
+ itemMenu: t.itemMenu,
54
+ pagination: t.pagination,
55
+ isFetching: t.isFetching,
56
+ emptyState: E,
57
+ additionalColumns: t.additionalColumns,
58
+ hideJobTitle: t.hideJobTitle
48
59
  }
49
- ) })
60
+ )
50
61
  }
51
62
  ];
52
- return /* @__PURE__ */ g(P, { children: [
53
- a && /* @__PURE__ */ n(u, { status: "success", label: a, onDismiss: p }),
54
- /* @__PURE__ */ n(
55
- L,
63
+ return /* @__PURE__ */ P(b, { children: [
64
+ r && /* @__PURE__ */ i(y, { status: "success", label: r, onDismiss: u }),
65
+ /* @__PURE__ */ i(
66
+ A,
56
67
  {
57
68
  title: l,
58
- subtitle: r,
69
+ subtitle: m,
59
70
  onBack: c,
60
- backLabel: m,
61
- actions: s,
62
- tabs: y,
71
+ backLabel: s,
72
+ actions: p,
73
+ tabs: g,
63
74
  selectedTabId: d,
64
75
  onTabChange: h
65
76
  }
66
77
  ),
67
- /* @__PURE__ */ n(
78
+ /* @__PURE__ */ i(
68
79
  C,
69
80
  {
70
- isOpen: i.isOpen,
71
- onClose: i.onClose,
72
- onPrimaryActionClick: i.onConfirm,
73
- isPrimaryActionLoading: i.isPending,
81
+ isOpen: o.isOpen,
82
+ onClose: o.onClose,
83
+ onPrimaryActionClick: o.onConfirm,
84
+ isPrimaryActionLoading: o.isPending,
74
85
  isDestructive: !0,
75
- title: t("removeEmployeeDialog.title", { name: i.employeeName }),
76
- primaryActionLabel: t("removeEmployeeDialog.confirmCta"),
77
- closeActionLabel: t("removeEmployeeDialog.cancelCta"),
78
- children: t("removeEmployeeDialog.description", { name: i.employeeName })
86
+ title: e("removeEmployeeDialog.title", { name: o.employeeName }),
87
+ primaryActionLabel: e("removeEmployeeDialog.confirmCta"),
88
+ closeActionLabel: e("removeEmployeeDialog.cancelCta"),
89
+ children: e("removeEmployeeDialog.description", { name: o.employeeName })
79
90
  }
80
91
  )
81
92
  ] });
82
93
  }
83
94
  export {
84
- B as PolicyDetailLayout
95
+ w as PolicyDetailLayout
85
96
  };
86
97
  //# sourceMappingURL=PolicyDetailLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PolicyDetailLayout.js","sources":["../../../../../src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { EmployeeTableItem } from '../EmployeeTable/EmployeeTableTypes'\nimport { EmployeeTable } from '../EmployeeTable/EmployeeTable'\nimport type { PolicyDetailLayoutProps } from './PolicyDetailLayoutTypes'\nimport { DetailViewLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nconst EMPLOYEES_TAB_ID = 'employees'\n\nexport function PolicyDetailLayout<T extends EmployeeTableItem>({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n firstTab,\n selectedTabId,\n onTabChange,\n employees,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: PolicyDetailLayoutProps<T>) {\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Alert, Dialog, Box } = useComponentContext()\n\n const tabs = [\n {\n id: firstTab.id,\n label: firstTab.label,\n content: firstTab.content,\n },\n {\n id: EMPLOYEES_TAB_ID,\n label: t('tabs.employees'),\n content: (\n <Box withPadding={false}>\n <EmployeeTable<T>\n data={employees.data}\n searchValue={employees.searchValue}\n onSearchChange={employees.onSearchChange}\n onSearchClear={employees.onSearchClear}\n searchPlaceholder={employees.searchPlaceholder}\n itemMenu={employees.itemMenu}\n pagination={employees.pagination}\n isFetching={employees.isFetching}\n emptyState={employees.emptyState}\n additionalColumns={employees.additionalColumns}\n hideJobTitle={employees.hideJobTitle}\n />\n </Box>\n ),\n },\n ]\n\n return (\n <>\n {successAlert && <Alert status=\"success\" label={successAlert} onDismiss={onDismissAlert} />}\n\n <DetailViewLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n tabs={tabs}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n />\n\n <Dialog\n isOpen={removeDialog.isOpen}\n onClose={removeDialog.onClose}\n onPrimaryActionClick={removeDialog.onConfirm}\n isPrimaryActionLoading={removeDialog.isPending}\n isDestructive\n title={t('removeEmployeeDialog.title', { name: removeDialog.employeeName })}\n primaryActionLabel={t('removeEmployeeDialog.confirmCta')}\n closeActionLabel={t('removeEmployeeDialog.cancelCta')}\n >\n {t('removeEmployeeDialog.description', { name: removeDialog.employeeName })}\n </Dialog>\n </>\n )\n}\n"],"names":["EMPLOYEES_TAB_ID","PolicyDetailLayout","title","subtitle","onBack","backLabel","actions","firstTab","selectedTabId","onTabChange","employees","removeDialog","successAlert","onDismissAlert","useI18n","useTranslation","Alert","Dialog","Box","useComponentContext","tabs","js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,MAACI;AAAA,MAAA;AAAA,QACC,OAAAvB;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,QACA,WAAAC;AAAA,QACA,SAAAC;AAAA,QACA,MAAAc;AAAA,QACA,eAAAZ;AAAA,QACA,aAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAY;AAAA,MAACJ;AAAA,MAAA;AAAA,QACC,QAAQN,EAAa;AAAA,QACrB,SAASA,EAAa;AAAA,QACtB,sBAAsBA,EAAa;AAAA,QACnC,wBAAwBA,EAAa;AAAA,QACrC,eAAa;AAAA,QACb,OAAO,EAAE,8BAA8B,EAAE,MAAMA,EAAa,cAAc;AAAA,QAC1E,oBAAoB,EAAE,iCAAiC;AAAA,QACvD,kBAAkB,EAAE,gCAAgC;AAAA,QAEnD,YAAE,oCAAoC,EAAE,MAAMA,EAAa,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAC5E,GACF;AAEJ;"}
1
+ {"version":3,"file":"PolicyDetailLayout.js","sources":["../../../../../src/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { EmployeeTableItem } from '../EmployeeTable/EmployeeTableTypes'\nimport { EmployeeTable } from '../EmployeeTable/EmployeeTable'\nimport type { PolicyDetailLayoutProps } from './PolicyDetailLayoutTypes'\nimport { DetailViewLayout, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport PlusCircleIcon from '@/assets/icons/plus-circle.svg?react'\n\nconst EMPLOYEES_TAB_ID = 'employees'\n\nexport function PolicyDetailLayout<T extends EmployeeTableItem>({\n title,\n subtitle,\n onBack,\n backLabel,\n actions,\n firstTab,\n selectedTabId,\n onTabChange,\n employees,\n onAddEmployee,\n removeDialog,\n successAlert,\n onDismissAlert,\n}: PolicyDetailLayoutProps<T>) {\n useI18n('Company.TimeOff.PolicyDetail')\n const { t } = useTranslation('Company.TimeOff.PolicyDetail')\n const { Alert, Dialog, Button } = useComponentContext()\n\n const emptyEmployeesState =\n employees.emptyState ??\n (onAddEmployee\n ? () => (\n <EmptyData title={t('emptyEmployees.title')}>\n <Button\n variant=\"secondary\"\n icon={<PlusCircleIcon aria-hidden />}\n onClick={onAddEmployee}\n >\n {t('emptyEmployees.addEmployeeCta')}\n </Button>\n </EmptyData>\n )\n : undefined)\n\n const tabs = [\n {\n id: firstTab.id,\n label: firstTab.label,\n content: firstTab.content,\n },\n {\n id: EMPLOYEES_TAB_ID,\n label: t('tabs.employees'),\n content: (\n <EmployeeTable<T>\n data={employees.data}\n searchValue={employees.searchValue}\n onSearchChange={employees.onSearchChange}\n onSearchClear={employees.onSearchClear}\n searchPlaceholder={employees.searchPlaceholder}\n itemMenu={employees.itemMenu}\n pagination={employees.pagination}\n isFetching={employees.isFetching}\n emptyState={emptyEmployeesState}\n additionalColumns={employees.additionalColumns}\n hideJobTitle={employees.hideJobTitle}\n />\n ),\n },\n ]\n\n return (\n <>\n {successAlert && <Alert status=\"success\" label={successAlert} onDismiss={onDismissAlert} />}\n\n <DetailViewLayout\n title={title}\n subtitle={subtitle}\n onBack={onBack}\n backLabel={backLabel}\n actions={actions}\n tabs={tabs}\n selectedTabId={selectedTabId}\n onTabChange={onTabChange}\n />\n\n <Dialog\n isOpen={removeDialog.isOpen}\n onClose={removeDialog.onClose}\n onPrimaryActionClick={removeDialog.onConfirm}\n isPrimaryActionLoading={removeDialog.isPending}\n isDestructive\n title={t('removeEmployeeDialog.title', { name: removeDialog.employeeName })}\n primaryActionLabel={t('removeEmployeeDialog.confirmCta')}\n closeActionLabel={t('removeEmployeeDialog.cancelCta')}\n >\n {t('removeEmployeeDialog.description', { name: removeDialog.employeeName })}\n </Dialog>\n </>\n )\n}\n"],"names":["EMPLOYEES_TAB_ID","PolicyDetailLayout","title","subtitle","onBack","backLabel","actions","firstTab","selectedTabId","onTabChange","employees","onAddEmployee","removeDialog","successAlert","onDismissAlert","useI18n","t","useTranslation","Alert","Dialog","Button","useComponentContext","emptyEmployeesState","EmptyData","jsx","PlusCircleIcon","tabs","EmployeeTable","jsxs","Fragment","DetailViewLayout"],"mappings":";;;;;;;;;;AASA,MAAMA,IAAmB;AAElB,SAASC,EAAgD;AAAA,EAC9D,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,GAA+B;AAC7B,EAAAC,EAAQ,8BAA8B;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,8BAA8B,GACrD,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,EAAA,IAAWC,EAAA,GAE5BC,IACJZ,EAAU,eACTC,IACG,wBACGY,GAAA,EAAU,OAAOP,EAAE,sBAAsB,GACxC,UAAA,gBAAAQ;AAAA,IAACJ;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAM,gBAAAI,EAACC,GAAA,EAAe,eAAW,GAAA,CAAC;AAAA,MAClC,SAASd;AAAA,MAER,YAAE,+BAA+B;AAAA,IAAA;AAAA,EAAA,GAEtC,IAEF,SAEAe,IAAO;AAAA,IACX;AAAA,MACE,IAAInB,EAAS;AAAA,MACb,OAAOA,EAAS;AAAA,MAChB,SAASA,EAAS;AAAA,IAAA;AAAA,IAEpB;AAAA,MACE,IAAIP;AAAA,MACJ,OAAOgB,EAAE,gBAAgB;AAAA,MACzB,SACE,gBAAAQ;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAMjB,EAAU;AAAA,UAChB,aAAaA,EAAU;AAAA,UACvB,gBAAgBA,EAAU;AAAA,UAC1B,eAAeA,EAAU;AAAA,UACzB,mBAAmBA,EAAU;AAAA,UAC7B,UAAUA,EAAU;AAAA,UACpB,YAAYA,EAAU;AAAA,UACtB,YAAYA,EAAU;AAAA,UACtB,YAAYY;AAAA,UACZ,mBAAmBZ,EAAU;AAAA,UAC7B,cAAcA,EAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1B;AAAA,EAEJ;AAGF,SACE,gBAAAkB,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAhB,uBAAiBK,GAAA,EAAM,QAAO,WAAU,OAAOL,GAAc,WAAWC,GAAgB;AAAA,IAEzF,gBAAAU;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAA5B;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,QACA,WAAAC;AAAA,QACA,SAAAC;AAAA,QACA,MAAAoB;AAAA,QACA,eAAAlB;AAAA,QACA,aAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGF,gBAAAe;AAAA,MAACL;AAAA,MAAA;AAAA,QACC,QAAQP,EAAa;AAAA,QACrB,SAASA,EAAa;AAAA,QACtB,sBAAsBA,EAAa;AAAA,QACnC,wBAAwBA,EAAa;AAAA,QACrC,eAAa;AAAA,QACb,OAAOI,EAAE,8BAA8B,EAAE,MAAMJ,EAAa,cAAc;AAAA,QAC1E,oBAAoBI,EAAE,iCAAiC;AAAA,QACvD,kBAAkBA,EAAE,gCAAgC;AAAA,QAEnD,YAAE,oCAAoC,EAAE,MAAMJ,EAAa,cAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAC5E,GACF;AAEJ;"}
@@ -21,6 +21,7 @@ export interface PolicyDetailLayoutProps<T extends EmployeeTableItem> {
21
21
  selectedTabId: string;
22
22
  onTabChange: (id: string) => void;
23
23
  employees: Pick<EmployeeTableProps<T>, 'data' | 'searchValue' | 'onSearchChange' | 'onSearchClear' | 'searchPlaceholder' | 'itemMenu' | 'pagination' | 'isFetching' | 'emptyState' | 'additionalColumns' | 'hideJobTitle'>;
24
+ onAddEmployee?: () => void;
24
25
  removeDialog: RemoveDialogState;
25
26
  successAlert?: string;
26
27
  onDismissAlert?: () => void;
@@ -1,49 +1,43 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { QueryClient as H, QueryClientProvider as b } from "@tanstack/react-query";
3
- import { GustoEmbeddedProvider as g } from "@gusto/embedded-api/react-query/_context";
4
- import { GustoEmbeddedCore as E } from "@gusto/embedded-api/core";
5
- import { SDKHooks as R } from "@gusto/embedded-api/hooks/hooks";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { QueryClientProvider as E } from "@tanstack/react-query";
3
+ import { GustoEmbeddedProvider as R } from "@gusto/embedded-api/react-query/_context";
4
+ import { GustoEmbeddedCore as q } from "@gusto/embedded-api/core";
5
+ import { SDKHooks as C } from "@gusto/embedded-api/hooks/hooks";
6
6
  import { useMemo as a } from "react";
7
- import { apiVersionHook as q } from "./apiVersionHook.js";
8
- function A({
9
- url: f,
10
- headers: s,
7
+ import { apiVersionHook as b } from "./apiVersionHook.js";
8
+ import { createSdkQueryClient as g } from "./createSdkQueryClient.js";
9
+ function G({
10
+ url: s,
11
+ headers: i,
11
12
  hooks: e,
12
- children: d,
13
- queryClient: i
13
+ children: m,
14
+ queryClient: f
14
15
  }) {
15
- const m = a(() => {
16
- const r = new E({
17
- serverURL: f
18
- }), t = r._options.hooks || new R();
19
- if (t.registerBeforeRequestHook(q), s) {
20
- const o = {
21
- beforeRequest: (y, n) => (new Headers(s).forEach((u, l) => {
22
- u && n.headers.set(l, u);
16
+ const d = a(() => {
17
+ const t = new q({
18
+ serverURL: s
19
+ }), o = t._options.hooks || new C();
20
+ if (o.registerBeforeRequestHook(b), i) {
21
+ const r = {
22
+ beforeRequest: (k, n) => (new Headers(i).forEach((c, H) => {
23
+ c && n.headers.set(H, c);
23
24
  }), n)
24
25
  };
25
- t.registerBeforeRequestHook(o);
26
+ o.registerBeforeRequestHook(r);
26
27
  }
27
- return e?.beforeCreateRequest && e.beforeCreateRequest.forEach((o) => {
28
- t.registerBeforeCreateRequestHook(o);
29
- }), e?.beforeRequest && e.beforeRequest.forEach((o) => {
30
- t.registerBeforeRequestHook(o);
31
- }), e?.afterSuccess && e.afterSuccess.forEach((o) => {
32
- t.registerAfterSuccessHook(o);
33
- }), e?.afterError && e.afterError.forEach((o) => {
34
- t.registerAfterErrorHook(o);
35
- }), r._options.hooks || (r._options.hooks = t), r;
36
- }, [f, s, e]), p = a(() => {
37
- if (i)
38
- return i;
39
- const r = new H(), t = async () => {
40
- await r.invalidateQueries({ queryKey: ["@gusto/embedded-api"] });
41
- };
42
- return r.setQueryDefaults(["@gusto/embedded-api"], { retry: !1 }), r.setMutationDefaults(["@gusto/embedded-api"], { onSuccess: t, retry: !1 }), r;
43
- }, [i]);
44
- return /* @__PURE__ */ c(b, { client: p, children: /* @__PURE__ */ c(g, { client: m, children: d }) });
28
+ return e?.beforeCreateRequest && e.beforeCreateRequest.forEach((r) => {
29
+ o.registerBeforeCreateRequestHook(r);
30
+ }), e?.beforeRequest && e.beforeRequest.forEach((r) => {
31
+ o.registerBeforeRequestHook(r);
32
+ }), e?.afterSuccess && e.afterSuccess.forEach((r) => {
33
+ o.registerAfterSuccessHook(r);
34
+ }), e?.afterError && e.afterError.forEach((r) => {
35
+ o.registerAfterErrorHook(r);
36
+ }), t._options.hooks || (t._options.hooks = o), t;
37
+ }, [s, i, e]), p = a(() => f ?? g(), [f]);
38
+ return /* @__PURE__ */ u(E, { client: p, children: /* @__PURE__ */ u(R, { client: d, children: m }) });
45
39
  }
46
40
  export {
47
- A as ApiProvider
41
+ G as ApiProvider
48
42
  };
49
43
  //# sourceMappingURL=ApiProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\nexport interface ApiProviderProps {\n url: string\n headers?: HeadersInit\n hooks?: SDKHooks\n children: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n if (queryClientFromProps) {\n return queryClientFromProps\n }\n\n // Create and configure a new QueryClient for internal SDK use\n const client = new QueryClient()\n\n const onSuccess = async () => {\n await client.invalidateQueries({ queryKey: ['@gusto/embedded-api'] })\n }\n client.setQueryDefaults(['@gusto/embedded-api'], { retry: false })\n client.setMutationDefaults(['@gusto/embedded-api'], { onSuccess, retry: false })\n\n return client\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","QueryClient","onSuccess","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;AAgBO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAI9C,QAFAD,EAAS,0BAA0BE,CAAc,GAE7CV,GAAS;AACX,YAAMW,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQb,CAAO,EAC3B,QAAQ,CAACc,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAL,EAAS,0BAA0BG,CAAiB;AAAA,IACtD;AAEA,WAAIV,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAe,MAAQ;AACxC,MAAAR,EAAS,gCAAgCQ,CAAI;AAAA,IAC/C,CAAC,GAGCf,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAe,MAAQ;AAClC,MAAAR,EAAS,0BAA0BQ,CAAI;AAAA,IACzC,CAAC,GAGCf,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAe,MAAQ;AACjC,MAAAR,EAAS,yBAAyBQ,CAAI;AAAA,IACxC,CAAC,GAGCf,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAe,MAAQ;AAC/B,MAAAR,EAAS,uBAAuBQ,CAAI;AAAA,IACtC,CAAC,GAGEV,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBgB,IAAcZ,EAAQ,MAAM;AAChC,QAAIF;AACF,aAAOA;AAIT,UAAMG,IAAS,IAAIY,EAAA,GAEbC,IAAY,YAAY;AAC5B,YAAMb,EAAO,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,GAAG;AAAA,IACtE;AACA,WAAAA,EAAO,iBAAiB,CAAC,qBAAqB,GAAG,EAAE,OAAO,IAAO,GACjEA,EAAO,oBAAoB,CAAC,qBAAqB,GAAG,EAAE,WAAAa,GAAW,OAAO,IAAO,GAExEb;AAAA,EACT,GAAG,CAACH,CAAoB,CAAC;AAEzB,SACE,gBAAAiB,EAACC,KAAoB,QAAQJ,GAC3B,4BAACK,GAAA,EAAsB,QAAQlB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
1
+ {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\nexport interface ApiProviderProps {\n url: string\n headers?: HeadersInit\n hooks?: SDKHooks\n children: React.ReactNode\n queryClient?: QueryClient\n}\n\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;AAiBO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf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from '@tanstack/react-query';
2
+ /**
3
+ * Creates a QueryClient pre-configured with the SDK's defaults for queries and
4
+ * mutations under the `['@gusto/embedded-api']` key:
5
+ *
6
+ * - `retry: false` on both queries and mutations.
7
+ * - On any successful mutation, all SDK queries are invalidated so the next
8
+ * read sees fresh data.
9
+ *
10
+ * `ApiProvider` uses this when no `queryClient` prop is supplied. `GustoTestProvider`
11
+ * uses it so tests faithfully replicate production mutation/refetch behavior.
12
+ *
13
+ * Partners who supply their own `QueryClient` to `ApiProvider` are responsible
14
+ * for configuring equivalent defaults if they want mutations to invalidate
15
+ * cached reads.
16
+ */
17
+ export declare function createSdkQueryClient(): QueryClient;
@@ -0,0 +1,14 @@
1
+ import { QueryClient as t } from "@tanstack/react-query";
2
+ function a() {
3
+ const e = new t();
4
+ return e.setQueryDefaults(["@gusto/embedded-api"], { retry: !1 }), e.setMutationDefaults(["@gusto/embedded-api"], {
5
+ retry: !1,
6
+ onSuccess: async () => {
7
+ await e.invalidateQueries({ queryKey: ["@gusto/embedded-api"] });
8
+ }
9
+ }), e;
10
+ }
11
+ export {
12
+ a as createSdkQueryClient
13
+ };
14
+ //# sourceMappingURL=createSdkQueryClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSdkQueryClient.js","sources":["../../../src/contexts/ApiProvider/createSdkQueryClient.ts"],"sourcesContent":["import { QueryClient } from '@tanstack/react-query'\n\n/**\n * Creates a QueryClient pre-configured with the SDK's defaults for queries and\n * mutations under the `['@gusto/embedded-api']` key:\n *\n * - `retry: false` on both queries and mutations.\n * - On any successful mutation, all SDK queries are invalidated so the next\n * read sees fresh data.\n *\n * `ApiProvider` uses this when no `queryClient` prop is supplied. `GustoTestProvider`\n * uses it so tests faithfully replicate production mutation/refetch behavior.\n *\n * Partners who supply their own `QueryClient` to `ApiProvider` are responsible\n * for configuring equivalent defaults if they want mutations to invalidate\n * cached reads.\n */\nexport function createSdkQueryClient(): QueryClient {\n const client = new QueryClient()\n client.setQueryDefaults(['@gusto/embedded-api'], { retry: false })\n client.setMutationDefaults(['@gusto/embedded-api'], {\n retry: false,\n onSuccess: async () => {\n await client.invalidateQueries({ queryKey: ['@gusto/embedded-api'] })\n },\n })\n return client\n}\n"],"names":["createSdkQueryClient","client","QueryClient"],"mappings":";AAiBO,SAASA,IAAoC;AAClD,QAAMC,IAAS,IAAIC,EAAA;AACnB,SAAAD,EAAO,iBAAiB,CAAC,qBAAqB,GAAG,EAAE,OAAO,IAAO,GACjEA,EAAO,oBAAoB,CAAC,qBAAqB,GAAG;AAAA,IAClD,OAAO;AAAA,IACP,WAAW,YAAY;AACrB,YAAMA,EAAO,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,GAAG;AAAA,IACtE;AAAA,EAAA,CACD,GACMA;AACT;"}
@@ -4,40 +4,40 @@ const s = (t) => {
4
4
  if (/^\d{4}-\d{2}-\d{2}$/.test(t)) {
5
5
  const n = t.split("-");
6
6
  if (n.length !== 3) return null;
7
- const r = n.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 = n.map(Number), o = r[0], a = r[1], i = r[2];
8
+ return o === void 0 || a === void 0 || i === void 0 || isNaN(o) || isNaN(a) || isNaN(i) || a < 1 || a > 12 || i < 1 || i > 31 ? null : new Date(o, a - 1, i);
9
9
  }
10
10
  const e = new Date(t);
11
11
  return isNaN(e.getTime()) ? null : e;
12
12
  }
13
13
  return t instanceof Date ? isNaN(t.getTime()) ? null : t : null;
14
- }, u = (t) => (e, n) => {
14
+ }, c = (t) => (e, n) => {
15
15
  const r = s(e);
16
16
  return r ? r.toLocaleDateString(n, t) : "";
17
- }, g = u({
17
+ }, h = c({
18
18
  weekday: "short",
19
19
  month: "short",
20
20
  day: "numeric"
21
- }), h = u({
21
+ }), f = c({
22
22
  weekday: "short",
23
23
  month: "short",
24
24
  day: "numeric",
25
25
  year: "numeric"
26
- }), y = u({
26
+ }), y = c({
27
27
  month: "short",
28
28
  day: "numeric"
29
- }), S = u({
29
+ }), S = c({
30
30
  month: "short",
31
31
  day: "numeric",
32
32
  year: "numeric"
33
- }), N = u({
33
+ }), N = c({
34
34
  month: "long",
35
35
  day: "numeric"
36
- }), T = u({
36
+ }), w = c({
37
37
  month: "long",
38
38
  day: "numeric",
39
39
  year: "numeric"
40
- }), w = (t, e) => {
40
+ }), T = (t, e) => {
41
41
  const n = s(t);
42
42
  if (!n) return { time: "", date: "" };
43
43
  const r = n.toLocaleTimeString(e, {
@@ -51,98 +51,94 @@ const s = (t) => {
51
51
  day: "numeric"
52
52
  });
53
53
  return { time: r, date: o };
54
- }, L = (t, e, n) => {
54
+ }, M = (t, e, n) => {
55
55
  const r = s(t), o = s(e);
56
56
  if (!r || !o)
57
57
  return { startDate: "", endDate: "" };
58
- const i = r.toLocaleDateString(n, {
58
+ const a = r.toLocaleDateString(n, {
59
59
  month: "long",
60
60
  day: "numeric"
61
- }), a = o.toLocaleDateString(n, {
61
+ }), i = o.toLocaleDateString(n, {
62
62
  month: "short",
63
63
  day: "numeric",
64
64
  year: "numeric"
65
65
  });
66
- return { startDate: i, endDate: a };
67
- }, M = (t, e, n, r) => {
68
- const o = s(t), i = s(e);
69
- if (!o || !i) return "";
70
- const a = r?.useShortMonth ? "short" : "long", c = o.toLocaleDateString(n, {
71
- month: a,
66
+ return { startDate: a, endDate: i };
67
+ }, $ = (t, e, n, r) => {
68
+ const o = s(t), a = s(e);
69
+ if (!o || !a) return "";
70
+ const i = r?.useShortMonth ? "short" : "long", u = o.toLocaleDateString(n, {
71
+ month: i,
72
72
  day: "numeric"
73
- }), l = i.toLocaleDateString(n, {
74
- month: a,
73
+ }), D = a.toLocaleDateString(n, {
74
+ month: i,
75
75
  day: "numeric",
76
76
  year: "numeric"
77
77
  });
78
- return `${c}–${l}`;
79
- }, p = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0] || null, W = (t) => {
78
+ return `${u}–${D}`;
79
+ }, L = (t) => {
80
+ if (isNaN(t.getTime()))
81
+ return null;
82
+ const e = String(t.getFullYear()).padStart(4, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
83
+ return `${e}-${n}-${r}`;
84
+ }, F = (t) => {
80
85
  if (!t) return "";
81
86
  const e = s(t);
82
87
  if (!e) return "";
83
88
  const n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
84
89
  return `${n}-${r}-${o}`;
85
- }, $ = (t) => {
86
- if (!t || isNaN(t.getTime()))
87
- return null;
88
- const e = t.toISOString(), [n] = e.split("T");
89
- if (!n) return null;
90
- const r = n.split("-");
91
- if (r.length !== 3) return null;
92
- const o = r.map(Number), i = o[0], a = o[1], c = o[2];
93
- return isNaN(i) || isNaN(a) || isNaN(c) || a < 1 || a > 12 || c < 1 || c > 31 ? null : new Date(i, a - 1, c);
94
- }, m = 1e3 * 60 * 60, d = m * 24, F = (t) => {
90
+ }, W = (t) => !t || isNaN(t.getTime()) ? null : new Date(t.getFullYear(), t.getMonth(), t.getDate()), m = 1e3 * 60 * 60, d = m * 24, Y = (t) => {
95
91
  const e = s(t);
96
92
  if (!e) return null;
97
93
  const n = /* @__PURE__ */ new Date();
98
94
  return (e.getTime() - n.getTime()) / m;
99
- }, P = (t) => {
95
+ }, k = (t) => {
100
96
  const e = s(t);
101
97
  if (!e) return null;
102
98
  const n = /* @__PURE__ */ new Date();
103
99
  return (e.getTime() - n.getTime()) / d;
104
- }, D = (t) => {
100
+ }, g = (t) => {
105
101
  const e = t.getDay();
106
102
  return e === 0 || e === 6;
107
- }, f = (t, e) => {
103
+ }, l = (t, e) => {
108
104
  const n = new Date(t);
109
105
  return n.setDate(n.getDate() + e), n;
110
- }, k = (t, e) => {
106
+ }, p = (t, e) => {
111
107
  let n = new Date(t);
112
108
  n.setHours(0, 0, 0, 0);
113
109
  let r = 0;
114
110
  for (; r < e; )
115
- n = f(n, 1), D(n) || r++;
111
+ n = l(n, 1), g(n) || r++;
116
112
  return n;
117
113
  };
118
- function Y(t, e) {
114
+ function P(t, e) {
119
115
  if (!(t == null || e == null))
120
116
  return `${String(t).padStart(2, "0")}-${String(e).padStart(2, "0")}`;
121
117
  }
122
- function b(t) {
118
+ function R(t) {
123
119
  return new Date(2023, t, 0).getDate();
124
120
  }
125
121
  export {
126
122
  m as MS_PER_HOUR,
127
- k as addBusinessDays,
128
- f as addDays,
123
+ p as addBusinessDays,
124
+ l as addDays,
129
125
  N as formatDateLong,
130
- T as formatDateLongWithYear,
126
+ w as formatDateLongWithYear,
131
127
  y as formatDateShort,
132
- g as formatDateShortWithWeekday,
133
- h as formatDateShortWithWeekdayAndYear,
128
+ h as formatDateShortWithWeekday,
129
+ f as formatDateShortWithWeekdayAndYear,
134
130
  S as formatDateShortWithYear,
135
- p as formatDateToStringDate,
136
- w as formatDateWithTime,
137
- Y as formatMonthDay,
138
- L as formatPayPeriod,
139
- M as formatPayPeriodRange,
140
- b as getDaysInMonth,
141
- P as getDaysUntil,
142
- F as getHoursUntil,
143
- D as isWeekend,
144
- $ as normalizeDateToLocal,
131
+ L as formatDateToStringDate,
132
+ T as formatDateWithTime,
133
+ P as formatMonthDay,
134
+ M as formatPayPeriod,
135
+ $ as formatPayPeriodRange,
136
+ R as getDaysInMonth,
137
+ k as getDaysUntil,
138
+ Y as getHoursUntil,
139
+ g as isWeekend,
140
+ W as normalizeDateToLocal,
145
141
  s as normalizeToDate,
146
- W as normalizeToISOString
142
+ F as normalizeToISOString
147
143
  };
148
144
  //# 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 * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local\n * time, so the calendar date is preserved regardless of the runtime timezone.\n *\n * Unlike `formatDateToStringDate` (which reads UTC), this function reads the\n * local year/month/day — safe for dates parsed from locale-format strings\n * (e.g. \"4/16/1998\") or ISO strings, both of which `normalizeToDate` lands at\n * local midnight.\n *\n * Returns `''` for null, undefined, empty, or unparseable input.\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\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\n/** Formats numeric month and day as a zero-padded `MM-DD` string. */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/** Returns the number of days in a given month (1-indexed). Uses a non-leap year so February always returns 28. */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\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","normalizeToISOString","value","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"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;A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AACzD,QAAMC,IAAS,IAAI,KAAKnC,CAAI;AAC5B,SAAAmC,EAAO,QAAQA,EAAO,QAAA,IAAYD,CAAI,GAC/BC;AACT,GAEaC,IAAkB,CAACvB,GAAiBwB,MAA+B;AAC9E,MAAIC,IAAc,IAAI,KAAKzB,CAAS;AACpC,EAAAyB,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;AAGO,SAASE,EAAe9C,GAAgBC,GAAkC;AAC/E,MAAI,EAAAD,KAAS,QAAQC,KAAO;AAC5B,WAAO,GAAG,OAAOD,CAAK,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOC,CAAG,EAAE,SAAS,GAAG,GAAG,CAAC;AAC1E;AAGO,SAAS8C,EAAe/C,GAAuB;AACpD,SAAO,IAAI,KAAK,MAAMA,GAAO,CAAC,EAAE,QAAA;AAClC;"}
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 const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local\n * time, so the calendar date is preserved regardless of the runtime timezone.\n *\n * Unlike `formatDateToStringDate` (which reads UTC), this function reads the\n * local year/month/day — safe for dates parsed from locale-format strings\n * (e.g. \"4/16/1998\") or ISO strings, both of which `normalizeToDate` lands at\n * local midnight.\n *\n * Returns `''` for null, undefined, empty, or unparseable input.\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\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 return new Date(date.getFullYear(), date.getMonth(), date.getDate())\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\n/** Formats numeric month and day as a zero-padded `MM-DD` string. */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/** Returns the number of days in a given month (1-indexed). Uses a non-leap year so February always returns 28. */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\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","normalizeToISOString","value","normalizeDateToLocal","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"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,GAEYK,IAAoCL,EAAoB;AAAA,EACnE,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AACR,CAAC,GAEYM,IAAkBN,EAAoB;AAAA,EACjD,OAAO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ale?: string;
23
23
  }) => string;
24
24
  export declare const useFormatPayRate: () => (rate: number, paymentUnit: string) => string;
25
+ /**
26
+ * Formats a compensation rate as-is, without annualizing weekly or monthly
27
+ * values. Use this for displaying compensation card data where the stored rate
28
+ * should be shown directly (e.g. "$950 per week", "$3,500 per month").
29
+ */
30
+ export declare const formatCompensationRate: ({ rate, paymentUnit, t, locale, }: {
31
+ rate: number;
32
+ paymentUnit: string;
33
+ t: TFunction;
34
+ locale?: string;
35
+ }) => string;
36
+ export declare const useFormatCompensationRate: () => (rate: number, paymentUnit: string) => string;
25
37
  export declare function createMarkup(dirty: string): {
26
38
  __html: string;
27
39
  };