@gusto/embedded-react-sdk 0.40.0 → 0.41.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 (356) hide show
  1. package/CHANGELOG.md +51 -42
  2. package/dist/components/Base/Base.js +3 -2
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/Form/Form.d.ts +1 -1
  5. package/dist/components/Common/Form/Form.js +15 -5
  6. package/dist/components/Common/Form/Form.js.map +1 -1
  7. package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
  8. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  9. package/dist/components/Common/SignatureForm/SignatureFormActions.js +13 -10
  10. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  11. package/dist/components/Common/SignatureForm/SignatureFormFields.js +13 -10
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  14. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
  16. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
  18. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -6
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +3 -2
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
  34. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  36. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  37. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  38. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  39. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -7
  40. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  42. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
  44. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
  46. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
  48. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  49. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
  50. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  51. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +10 -8
  52. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  54. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +80 -61
  56. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/index.d.ts +1 -1
  58. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.d.ts +7 -6
  59. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +54 -54
  60. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
  61. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  62. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/FederalTaxes.js +9 -7
  64. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/Form.js +3 -2
  66. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  68. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  69. package/dist/components/Company/Industry/Actions.js +7 -5
  70. package/dist/components/Company/Industry/Actions.js.map +1 -1
  71. package/dist/components/Company/Industry/Context.js +7 -6
  72. package/dist/components/Company/Industry/Context.js.map +1 -1
  73. package/dist/components/Company/Industry/Edit.js +12 -10
  74. package/dist/components/Company/Industry/Edit.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
  76. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/Form.js +5 -4
  78. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  79. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -2
  80. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  82. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  84. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationsList/List.js +10 -8
  86. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -6
  88. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  90. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  91. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
  92. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  93. package/dist/components/Company/OnboardingOverview/Completed.js +6 -5
  94. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  95. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
  96. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  97. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +4 -2
  98. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  99. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  100. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  101. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +6 -1
  102. package/dist/components/Company/PaySchedule/PaySchedule.js +31 -148
  103. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/PayScheduleComponents.d.ts +10 -0
  105. package/dist/components/Company/PaySchedule/PayScheduleComponents.js +26 -0
  106. package/dist/components/Company/PaySchedule/PayScheduleComponents.js.map +1 -0
  107. package/dist/components/Company/PaySchedule/PayScheduleForm.d.ts +8 -0
  108. package/dist/components/Company/PaySchedule/PayScheduleForm.js +199 -0
  109. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -0
  110. package/dist/components/Company/PaySchedule/{_parts/Edit.module.scss.js → PayScheduleForm.module.scss.js} +1 -1
  111. package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js.map +1 -0
  112. package/dist/components/Company/PaySchedule/PayScheduleList.d.ts +8 -0
  113. package/dist/components/Company/PaySchedule/PayScheduleList.js +103 -0
  114. package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -0
  115. package/dist/components/Company/PaySchedule/{_parts/List.module.scss.js → PayScheduleList.module.scss.js} +1 -1
  116. package/dist/components/Company/PaySchedule/PayScheduleList.module.scss.js.map +1 -0
  117. package/dist/components/Company/PaySchedule/payScheduleStateMachine.d.ts +6 -0
  118. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js +49 -0
  119. package/dist/components/Company/PaySchedule/payScheduleStateMachine.js.map +1 -0
  120. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
  121. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  122. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  123. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
  125. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  126. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
  127. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  128. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  129. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  130. package/dist/components/Contractor/Address/Address.js +4 -2
  131. package/dist/components/Contractor/Address/Address.js.map +1 -1
  132. package/dist/components/Contractor/Address/Form.js +7 -6
  133. package/dist/components/Contractor/Address/Form.js.map +1 -1
  134. package/dist/components/Contractor/Address/useAddress.js +6 -5
  135. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  136. package/dist/components/Contractor/ContractorList/index.js +3 -2
  137. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  138. package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -2
  139. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  140. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -4
  141. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  142. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  143. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  144. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  145. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  146. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
  147. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  148. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +3 -2
  149. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  150. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +3 -2
  151. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  152. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -2
  153. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  154. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
  155. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  156. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +14 -13
  157. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
  159. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  160. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
  161. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  162. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  163. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  164. package/dist/components/Contractor/Submit/Submit.js +3 -2
  165. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  166. package/dist/components/Employee/Compensation/Actions.js +6 -5
  167. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  168. package/dist/components/Employee/Compensation/Edit.js +23 -22
  169. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  170. package/dist/components/Employee/Compensation/List.js +25 -23
  171. package/dist/components/Employee/Compensation/List.js.map +1 -1
  172. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +3 -2
  173. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  174. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +3 -2
  175. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  176. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +3 -2
  177. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  178. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -6
  179. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  180. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
  181. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  182. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  183. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  184. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +11 -9
  185. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  186. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  187. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  188. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  189. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  190. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +8 -7
  191. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  192. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +11 -10
  193. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +13 -11
  195. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  197. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  198. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
  199. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  200. package/dist/components/Employee/FederalTaxes/Actions.js +8 -6
  201. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  202. package/dist/components/Employee/FederalTaxes/FederalForm.js +6 -4
  203. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  204. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  205. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  206. package/dist/components/Employee/Landing/Landing.js +7 -6
  207. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  208. package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
  209. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  210. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  211. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  212. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +7 -6
  213. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  214. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  215. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  216. package/dist/components/Employee/PaymentMethod/Split.js +4 -3
  217. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  218. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  219. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  220. package/dist/components/Employee/Profile/AdminProfile.js +124 -126
  221. package/dist/components/Employee/Profile/AdminProfile.js.map +1 -1
  222. package/dist/components/Employee/Profile/EmployeeProfile.js +8 -8
  223. package/dist/components/Employee/StateTaxes/Actions.js +10 -8
  224. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  225. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  226. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  227. package/dist/components/Employee/Taxes/Actions.js +10 -8
  228. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  229. package/dist/components/Employee/Taxes/FederalForm.js +6 -4
  230. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  231. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  232. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  233. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +3 -2
  234. package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
  235. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +9 -8
  236. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
  237. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
  238. package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
  239. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js +3 -2
  240. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +1 -1
  241. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js +35 -34
  242. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +1 -1
  243. package/dist/components/Flow/Flow.js +12 -11
  244. package/dist/components/Flow/Flow.js.map +1 -1
  245. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +18 -17
  246. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  247. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +8 -7
  248. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  249. package/dist/components/InformationRequests/InformationRequests.js +3 -2
  250. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  251. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
  252. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  253. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +9 -8
  254. package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
  255. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
  256. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  257. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +19 -18
  258. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  259. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +12 -10
  260. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  261. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +8 -6
  262. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  263. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +4 -2
  264. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  265. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +8 -7
  266. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  267. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +3 -2
  268. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  269. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +3 -2
  270. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  271. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -4
  272. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  273. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  274. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  275. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +13 -12
  276. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  277. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
  278. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  279. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +3 -2
  280. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  281. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
  282. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  283. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +3 -2
  284. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  285. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +1 -0
  286. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  287. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
  288. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  289. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +3 -2
  290. package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
  291. package/dist/components/Payroll/usePreparedPayrollData.js +7 -6
  292. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  293. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -12
  294. package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -1
  295. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +3 -2
  296. package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
  297. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +3 -2
  298. package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -1
  299. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +24 -22
  300. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  301. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +3 -2
  302. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  303. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +12 -10
  304. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  305. package/dist/i18n/en/Company.PaySchedule.json.js +15 -13
  306. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  307. package/dist/index.d.ts +1 -1
  308. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +18 -15
  309. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  310. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +24 -21
  311. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  312. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +18 -15
  313. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  314. package/dist/partner-hook-utils/form/fields/SelectHookField.js +20 -17
  315. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  316. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +19 -16
  317. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  318. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +25 -22
  319. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  320. package/dist/style.css +1 -1
  321. package/dist/types/i18next.d.ts +9 -0
  322. package/docs/reference/endpoint-inventory.json +16 -35
  323. package/package.json +6 -6
  324. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
  325. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js +0 -20
  326. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +0 -1
  327. package/dist/components/Company/DocumentSigner/SignatureForm/Form.d.ts +0 -1
  328. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js +0 -20
  329. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +0 -1
  330. package/dist/components/Company/DocumentSigner/SignatureForm/Head.d.ts +0 -1
  331. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js +0 -35
  332. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +0 -1
  333. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
  334. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js +0 -20
  335. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +0 -1
  336. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
  337. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +0 -22
  338. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
  339. package/dist/components/Company/PaySchedule/_parts/Actions.d.ts +0 -1
  340. package/dist/components/Company/PaySchedule/_parts/Actions.js +0 -62
  341. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +0 -1
  342. package/dist/components/Company/PaySchedule/_parts/Edit.d.ts +0 -1
  343. package/dist/components/Company/PaySchedule/_parts/Edit.js +0 -134
  344. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +0 -1
  345. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js.map +0 -1
  346. package/dist/components/Company/PaySchedule/_parts/Head.d.ts +0 -1
  347. package/dist/components/Company/PaySchedule/_parts/Head.js +0 -47
  348. package/dist/components/Company/PaySchedule/_parts/Head.js.map +0 -1
  349. package/dist/components/Company/PaySchedule/_parts/List.d.ts +0 -1
  350. package/dist/components/Company/PaySchedule/_parts/List.js +0 -57
  351. package/dist/components/Company/PaySchedule/_parts/List.js.map +0 -1
  352. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +0 -1
  353. package/dist/components/Company/PaySchedule/_parts/index.d.ts +0 -5
  354. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -39
  355. package/dist/components/Company/PaySchedule/usePaySchedule.js +0 -30
  356. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +0 -1
@@ -1,153 +1,36 @@
1
- import { jsx as a, jsxs as z } from "react/jsx-runtime";
2
- import { useForm as G, FormProvider as K } from "react-hook-form";
3
- import { zodResolver as J } from "@hookform/resolvers/zod";
4
- import { useState as q, useEffect as T } from "react";
5
- import { usePaySchedulesGetPreview as Q } from "@gusto/embedded-api/react-query/paySchedulesGetPreview";
6
- import { usePaySchedulesUpdateMutation as W } from "@gusto/embedded-api/react-query/paySchedulesUpdate";
7
- import { usePaySchedulesGetAllSuspense as X } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
8
- import { usePaySchedulesCreateMutation as Z } from "@gusto/embedded-api/react-query/paySchedulesCreate";
9
- import { RFCDate as i } from "@gusto/embedded-api/types/rfcdate";
10
- import { PayScheduleSchema as $, PayScheduleProvider as V } from "./usePaySchedule.js";
11
- import { useCompanyPaymentSpeed as ee } from "../../../hooks/useCompanyPaymentSpeed.js";
12
- import { Form as oe } from "../../Common/Form/Form.js";
13
- import { BaseComponent as re } from "../../Base/Base.js";
14
- import { useBase as te } from "../../Base/useBase.js";
15
- import { Flex as ae } from "../../Common/Flex/Flex.js";
16
- import { useI18n as ne, useComponentDictionary as ce } from "../../../i18n/I18n.js";
17
- import { componentEvents as p } from "../../../shared/constants.js";
18
- import { formatDateToStringDate as l } from "../../../helpers/dateFormatting.js";
19
- import { normalizeErrorKeyForForm as ie } from "../../../helpers/formattedStrings.js";
20
- import { Head as de } from "./_parts/Head.js";
21
- import { List as se } from "./_parts/List.js";
22
- import { Edit as me } from "./_parts/Edit.js";
23
- import { Actions as ye } from "./_parts/Actions.js";
24
- const Re = ({
25
- companyId: n,
26
- defaultValues: m,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useMemo as u } from "react";
3
+ import { createMachine as l } from "robot3";
4
+ import { usePaySchedulesGetAllSuspense as p } from "@gusto/embedded-api/react-query/paySchedulesGetAll";
5
+ import { payScheduleStateMachine as h } from "./payScheduleStateMachine.js";
6
+ import { PayScheduleListContextual as S, PayScheduleFormContextual as d } from "./PayScheduleComponents.js";
7
+ import { BaseComponent as f } from "../../Base/Base.js";
8
+ import { useBase as y } from "../../Base/useBase.js";
9
+ import { useI18n as C, useComponentDictionary as P } from "../../../i18n/I18n.js";
10
+ import { Flow as x } from "../../Flow/Flow.js";
11
+ const L = ({
12
+ companyId: e,
13
+ defaultValues: o,
27
14
  dictionary: t,
28
- ...y
29
- }) => (ne("Company.PaySchedule"), ce("Company.PaySchedule", t), /* @__PURE__ */ a(re, { ...y, children: /* @__PURE__ */ a(Pe, { companyId: n, defaultValues: m, children: y.children }) })), Pe = ({ companyId: n, children: m, defaultValues: t }) => {
30
- const { baseSubmitHandler: y, onEvent: f, error: O, setError: U } = te(), { data: w } = X({
31
- companyId: n
32
- }), { paymentSpeedDays: H } = ee(n), [d, P] = q(
33
- w.paySchedules?.length === 0 ? "ADD_PAY_SCHEDULE" : "LIST_PAY_SCHEDULES"
34
- ), [E, Y] = q(null), g = {
35
- frequency: t?.frequency ?? "Every week",
36
- anchorPayDate: t?.anchorPayDate ? new Date(t.anchorPayDate) : void 0,
37
- anchorEndOfPayPeriod: t?.anchorEndOfPayPeriod ? new Date(t.anchorEndOfPayPeriod) : void 0,
38
- day1: t?.day1 ?? void 0,
39
- day2: t?.day2 ?? void 0,
40
- customName: t?.customName ?? "",
41
- customTwicePerMonth: "false"
42
- }, v = Z(), A = W(), D = G({
43
- resolver: J($),
44
- defaultValues: g
45
- }), { watch: M, setValue: S, reset: s, clearErrors: N, setError: _ } = D, u = O?.fieldErrors;
46
- T(() => {
47
- u && u.length > 0 && u.forEach((o) => {
48
- const r = ie(o.field);
49
- _(r, { message: o.message });
50
- });
51
- }, [_, u]);
52
- const e = M(), C = e.anchorPayDate && l(e.anchorPayDate) || "", L = e.anchorEndOfPayPeriod && l(e.anchorEndOfPayPeriod) || "", { data: R, isLoading: F } = Q(
53
- {
54
- companyId: n,
55
- frequency: e.frequency,
56
- ...C && { anchorPayDate: new i(C) },
57
- ...L && {
58
- anchorEndOfPayPeriod: new i(L)
59
- },
60
- day1: e.day1 ?? void 0,
61
- day2: e.day2 ?? void 0
62
- },
63
- {
64
- enabled: !!(e.anchorPayDate && e.anchorEndOfPayPeriod && (d === "ADD_PAY_SCHEDULE" || d === "EDIT_PAY_SCHEDULE"))
65
- }
15
+ ...n
16
+ }) => (C("Company.PaySchedule"), P("Company.PaySchedule", t), /* @__PURE__ */ r(f, { ...n, children: /* @__PURE__ */ r(M, { companyId: e, defaultValues: o }) }));
17
+ function M({ companyId: e, defaultValues: o }) {
18
+ const { onEvent: t } = y(), { data: n } = p({ companyId: e }), m = (n.paySchedules?.length ?? 0) > 0, c = m ? "listSchedules" : "addSchedule", i = m ? S : d, a = u(
19
+ () => l(
20
+ c,
21
+ h,
22
+ (s) => ({
23
+ ...s,
24
+ component: i,
25
+ companyId: e,
26
+ defaultValues: o
27
+ })
28
+ ),
29
+ [e, o, c, i]
66
30
  );
67
- T(() => {
68
- e.frequency === "Twice per month" && e.day1 === 15 && e.day2 === 31 && e.customTwicePerMonth === void 0 ? S("customTwicePerMonth", "1st15th") : e.frequency === "Twice per month" && e.customTwicePerMonth === void 0 && S("customTwicePerMonth", "custom");
69
- }, [e.frequency, e.day1, e.day2, S, e.customTwicePerMonth]);
70
- const b = () => {
71
- P("ADD_PAY_SCHEDULE"), s({});
72
- }, x = () => {
73
- P("LIST_PAY_SCHEDULES"), s({}), N(), U(null);
74
- }, B = (o) => {
75
- s({
76
- frequency: o.frequency,
77
- anchorPayDate: o.anchorPayDate ? new Date(o.anchorPayDate.toString()) : void 0,
78
- anchorEndOfPayPeriod: o.anchorEndOfPayPeriod ? new Date(o.anchorEndOfPayPeriod.toString()) : void 0,
79
- day1: o.day1 ?? void 0,
80
- day2: o.day2 ?? void 0,
81
- customName: o.customName ?? ""
82
- }), Y(o), P("EDIT_PAY_SCHEDULE");
83
- }, I = () => {
84
- f(p.PAY_SCHEDULE_DONE);
85
- }, j = async (o) => {
86
- await y(o, async (r) => {
87
- const h = (c) => c && l(c) || "";
88
- if (d === "ADD_PAY_SCHEDULE") {
89
- const c = await v.mutateAsync({
90
- request: {
91
- companyId: n,
92
- payScheduleCreateRequest: {
93
- frequency: r.frequency,
94
- anchorPayDate: new i(h(r.anchorPayDate)),
95
- anchorEndOfPayPeriod: new i(h(r.anchorEndOfPayPeriod)),
96
- customName: r.customName,
97
- day1: r.day1,
98
- day2: r.day2
99
- }
100
- }
101
- });
102
- f(p.PAY_SCHEDULE_CREATED, c), s();
103
- } else if (d === "EDIT_PAY_SCHEDULE") {
104
- const c = E?.version, k = await A.mutateAsync({
105
- request: {
106
- payScheduleId: E?.uuid,
107
- companyId: n,
108
- payScheduleUpdateRequest: {
109
- frequency: r.frequency,
110
- anchorPayDate: new i(h(r.anchorPayDate)),
111
- anchorEndOfPayPeriod: new i(h(r.anchorEndOfPayPeriod)),
112
- customName: r.customName,
113
- day1: r.day1,
114
- day2: r.day2,
115
- version: c
116
- }
117
- }
118
- });
119
- f(p.PAY_SCHEDULE_UPDATED, k), s();
120
- }
121
- P("LIST_PAY_SCHEDULES");
122
- });
123
- };
124
- return /* @__PURE__ */ a(
125
- V,
126
- {
127
- value: {
128
- companyId: n,
129
- handleAdd: b,
130
- handleEdit: B,
131
- handleCancel: x,
132
- handleContinue: I,
133
- mode: d,
134
- isPending: v.isPending || A.isPending,
135
- paySchedules: w.paySchedules,
136
- payPeriodPreview: R?.paySchedulePreview?.payPeriods,
137
- payPreviewLoading: F,
138
- currentPaySchedule: E,
139
- paymentSpeedDays: H
140
- },
141
- children: /* @__PURE__ */ a("span", { "data-testid": "pay-schedule-edit-form", children: /* @__PURE__ */ a(K, { ...D, children: /* @__PURE__ */ a(oe, { onSubmit: D.handleSubmit(j), children: m || /* @__PURE__ */ z(ae, { flexDirection: "column", children: [
142
- /* @__PURE__ */ a(de, {}),
143
- /* @__PURE__ */ a(se, {}),
144
- /* @__PURE__ */ a(me, {}),
145
- /* @__PURE__ */ a(ye, {})
146
- ] }) }) }) })
147
- }
148
- );
149
- };
31
+ return /* @__PURE__ */ r(x, { machine: a, onEvent: t });
32
+ }
150
33
  export {
151
- Re as PaySchedule
34
+ L as PaySchedule
152
35
  };
153
36
  //# sourceMappingURL=PaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import type { SubmitHandler } from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useEffect, useState } from 'react'\nimport { usePaySchedulesGetPreview } from '@gusto/embedded-api/react-query/paySchedulesGetPreview'\nimport { usePaySchedulesUpdateMutation } from '@gusto/embedded-api/react-query/paySchedulesUpdate'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport { usePaySchedulesCreateMutation } from '@gusto/embedded-api/react-query/paySchedulesCreate'\nimport type { PaySchedule as PayScheduleType } from '@gusto/embedded-api/models/components/payschedule'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport type { MODE, PayScheduleInputs, PayScheduleOutputs } from './usePaySchedule'\nimport {\n PayScheduleProvider,\n PayScheduleSchema,\n type PayScheduleDefaultValues,\n} from './usePaySchedule'\nimport { Actions, Edit, Head, List } from './_parts'\nimport { useCompanyPaymentSpeed } from '@/hooks/useCompanyPaymentSpeed'\nimport { Form } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\nimport { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues}>\n {props.children}\n </Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, children, defaultValues }: PayScheduleProps) => {\n const { baseSubmitHandler, onEvent, error, setError: setBaseError } = useBase()\n\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({\n companyId,\n })\n\n const { paymentSpeedDays } = useCompanyPaymentSpeed(companyId)\n\n const [mode, setMode] = useState<MODE>(\n paySchedules.paySchedules?.length === 0 ? 'ADD_PAY_SCHEDULE' : 'LIST_PAY_SCHEDULES',\n )\n const [currentPaySchedule, setCurrentPaySchedule] = useState<PayScheduleType | null>(null)\n const transformedDefaultValues: PayScheduleInputs = {\n frequency: defaultValues?.frequency ?? 'Every week',\n anchorPayDate: defaultValues?.anchorPayDate ? new Date(defaultValues.anchorPayDate) : undefined,\n anchorEndOfPayPeriod: defaultValues?.anchorEndOfPayPeriod\n ? new Date(defaultValues.anchorEndOfPayPeriod)\n : undefined,\n day1: defaultValues?.day1 ?? undefined,\n day2: defaultValues?.day2 ?? undefined,\n customName: defaultValues?.customName ?? '',\n customTwicePerMonth: 'false',\n }\n\n const createPayScheduleMutation = usePaySchedulesCreateMutation()\n const updatePayScheduleMutation = usePaySchedulesUpdateMutation()\n\n const formMethods = useForm<PayScheduleInputs, unknown, PayScheduleOutputs>({\n resolver: zodResolver(PayScheduleSchema),\n defaultValues: transformedDefaultValues,\n })\n const { watch, setValue, reset, clearErrors, setError } = formMethods\n\n const fieldErrors = error?.fieldErrors\n useEffect(() => {\n if (fieldErrors && fieldErrors.length > 0) {\n fieldErrors.forEach(fieldError => {\n const key = normalizeErrorKeyForForm(fieldError.field)\n setError(key as keyof PayScheduleInputs, { message: fieldError.message })\n })\n }\n }, [setError, fieldErrors])\n\n const allValues = watch()\n\n const formattedAnchorPayDate = allValues.anchorPayDate\n ? formatDateToStringDate(allValues.anchorPayDate) || ''\n : ''\n const formattedAnchorEndOfPayPeriod = allValues.anchorEndOfPayPeriod\n ? formatDateToStringDate(allValues.anchorEndOfPayPeriod) || ''\n : ''\n\n const { data: payPreviewData, isLoading } = usePaySchedulesGetPreview(\n {\n companyId,\n frequency: allValues.frequency,\n ...(formattedAnchorPayDate && { anchorPayDate: new RFCDate(formattedAnchorPayDate) }),\n ...(formattedAnchorEndOfPayPeriod && {\n anchorEndOfPayPeriod: new RFCDate(formattedAnchorEndOfPayPeriod),\n }),\n day1: allValues.day1 ?? undefined,\n day2: allValues.day2 ?? undefined,\n } as Parameters<typeof usePaySchedulesGetPreview>[0],\n {\n enabled: Boolean(\n allValues.anchorPayDate &&\n allValues.anchorEndOfPayPeriod &&\n (mode === 'ADD_PAY_SCHEDULE' || mode === 'EDIT_PAY_SCHEDULE'),\n ),\n },\n )\n\n // Set the custom_twice_per_month value based on the frequency and day_1 and day_2 values as it is not set by the API call\n useEffect(() => {\n if (\n allValues.frequency === 'Twice per month' &&\n allValues.day1 === 15 &&\n allValues.day2 === 31 &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `1st15th`)\n } else if (\n allValues.frequency === 'Twice per month' &&\n allValues.customTwicePerMonth === undefined\n ) {\n setValue('customTwicePerMonth', `custom`)\n }\n }, [allValues.frequency, allValues.day1, allValues.day2, setValue, allValues.customTwicePerMonth])\n\n const handleAdd = () => {\n setMode('ADD_PAY_SCHEDULE')\n reset({})\n }\n const handleCancel = () => {\n setMode('LIST_PAY_SCHEDULES')\n reset({})\n clearErrors()\n setBaseError(null)\n }\n const handleEdit = (schedule: PayScheduleType) => {\n reset({\n frequency: schedule.frequency as PayScheduleInputs['frequency'],\n anchorPayDate: schedule.anchorPayDate\n ? new Date(schedule.anchorPayDate.toString())\n : undefined,\n anchorEndOfPayPeriod: schedule.anchorEndOfPayPeriod\n ? new Date(schedule.anchorEndOfPayPeriod.toString())\n : undefined,\n day1: schedule.day1 ?? undefined,\n day2: schedule.day2 ?? undefined,\n customName: schedule.customName ?? '',\n })\n setCurrentPaySchedule(schedule)\n setMode('EDIT_PAY_SCHEDULE')\n }\n const handleContinue = () => {\n onEvent(componentEvents.PAY_SCHEDULE_DONE)\n }\n const onSubmit: SubmitHandler<PayScheduleOutputs> = async data => {\n await baseSubmitHandler(data, async payload => {\n const formatPayloadDate = (date: Date | undefined): string => {\n return date ? formatDateToStringDate(date) || '' : ''\n }\n\n if (mode === 'ADD_PAY_SCHEDULE') {\n const createPayScheduleResponse = await createPayScheduleMutation.mutateAsync({\n request: {\n companyId,\n payScheduleCreateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(formatPayloadDate(payload.anchorPayDate)),\n anchorEndOfPayPeriod: new RFCDate(formatPayloadDate(payload.anchorEndOfPayPeriod)),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_CREATED, createPayScheduleResponse)\n reset()\n } else if (mode === 'EDIT_PAY_SCHEDULE') {\n const version = currentPaySchedule?.version\n const updatePayScheduleResponse = await updatePayScheduleMutation.mutateAsync({\n request: {\n payScheduleId: currentPaySchedule?.uuid as string,\n companyId,\n payScheduleUpdateRequest: {\n frequency: payload.frequency,\n anchorPayDate: new RFCDate(formatPayloadDate(payload.anchorPayDate)),\n anchorEndOfPayPeriod: new RFCDate(formatPayloadDate(payload.anchorEndOfPayPeriod)),\n customName: payload.customName,\n day1: payload.day1,\n day2: payload.day2,\n version: version as string,\n },\n },\n })\n onEvent(componentEvents.PAY_SCHEDULE_UPDATED, updatePayScheduleResponse)\n reset()\n }\n setMode('LIST_PAY_SCHEDULES')\n })\n }\n\n return (\n <PayScheduleProvider\n value={{\n companyId,\n handleAdd,\n handleEdit,\n handleCancel,\n handleContinue,\n mode,\n isPending: createPayScheduleMutation.isPending || updatePayScheduleMutation.isPending,\n paySchedules: paySchedules.paySchedules,\n payPeriodPreview: payPreviewData?.paySchedulePreview?.payPeriods,\n payPreviewLoading: isLoading,\n currentPaySchedule,\n paymentSpeedDays,\n }}\n >\n <span data-testid=\"pay-schedule-edit-form\">\n <FormProvider {...formMethods}>\n <Form onSubmit={formMethods.handleSubmit(onSubmit)}>\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Edit />\n <Actions />\n </Flex>\n )}\n </Form>\n </FormProvider>\n </span>\n </PayScheduleProvider>\n )\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","children","baseSubmitHandler","onEvent","error","setBaseError","useBase","paySchedules","usePaySchedulesGetAllSuspense","paymentSpeedDays","useCompanyPaymentSpeed","mode","setMode","useState","currentPaySchedule","setCurrentPaySchedule","transformedDefaultValues","createPayScheduleMutation","usePaySchedulesCreateMutation","updatePayScheduleMutation","usePaySchedulesUpdateMutation","formMethods","useForm","zodResolver","PayScheduleSchema","watch","setValue","reset","clearErrors","setError","fieldErrors","useEffect","fieldError","key","normalizeErrorKeyForForm","allValues","formattedAnchorPayDate","formatDateToStringDate","formattedAnchorEndOfPayPeriod","payPreviewData","isLoading","usePaySchedulesGetPreview","RFCDate","handleAdd","handleCancel","handleEdit","schedule","handleContinue","componentEvents","onSubmit","data","payload","formatPayloadDate","date","createPayScheduleResponse","version","updatePayScheduleResponse","PayScheduleProvider","FormProvider","Form","jsxs","Flex","Head","List","Edit","Actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAMA,KAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,GAAQ,qBAAqB,GAC7BC,GAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,IAAA,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PaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/PaySchedule.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { createMachine } from 'robot3'\nimport { usePaySchedulesGetAllSuspense } from '@gusto/embedded-api/react-query/paySchedulesGetAll'\nimport type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport { payScheduleStateMachine } from './payScheduleStateMachine'\nimport type { PayScheduleContextInterface } from './PayScheduleComponents'\nimport { PayScheduleFormContextual, PayScheduleListContextual } from './PayScheduleComponents'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { useComponentDictionary } from '@/i18n/I18n'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype PayScheduleDefaultFields = {\n [K in keyof Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >]: NonNullable<PayScheduleCreateUpdate[K]>\n}\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<Partial<PayScheduleDefaultFields>>\n\ninterface PayScheduleProps extends CommonComponentInterface<'Company.PaySchedule'> {\n companyId: string\n defaultValues?: PayScheduleDefaultValues\n}\n\nexport const PaySchedule = ({\n companyId,\n defaultValues,\n dictionary,\n ...props\n}: PayScheduleProps & BaseComponentInterface) => {\n useI18n('Company.PaySchedule')\n useComponentDictionary('Company.PaySchedule', dictionary)\n return (\n <BaseComponent {...props}>\n <Root companyId={companyId} defaultValues={defaultValues} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultValues }: PayScheduleProps) {\n const { onEvent } = useBase()\n const { data: paySchedules } = usePaySchedulesGetAllSuspense({ companyId })\n\n const hasSchedules = (paySchedules.paySchedules?.length ?? 0) > 0\n const initialState = hasSchedules ? 'listSchedules' : 'addSchedule'\n const initialComponent = hasSchedules ? PayScheduleListContextual : PayScheduleFormContextual\n\n const machine = useMemo(\n () =>\n createMachine(\n initialState,\n payScheduleStateMachine,\n (initialContext: PayScheduleContextInterface) => ({\n ...initialContext,\n component: initialComponent,\n companyId,\n defaultValues,\n }),\n ),\n [companyId, defaultValues, initialState, initialComponent],\n )\n\n return <Flow machine={machine} onEvent={onEvent} />\n}\n"],"names":["PaySchedule","companyId","defaultValues","dictionary","props","useI18n","useComponentDictionary","jsx","BaseComponent","Root","onEvent","useBase","paySchedules","usePaySchedulesGetAllSuspense","hasSchedules","initialState","initialComponent","PayScheduleListContextual","PayScheduleFormContextual","machine","useMemo","createMachine","payScheduleStateMachine","initialContext","Flow"],"mappings":";;;;;;;;;;AA4BO,MAAMA,IAAc,CAAC;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,OACEC,EAAQ,qBAAqB,GAC7BC,EAAuB,uBAAuBH,CAAU,GAEtD,gBAAAI,EAACC,KAAe,GAAGJ,GACjB,4BAACK,GAAA,EAAK,WAAAR,GAAsB,eAAAC,GAA8B,EAAA,CAC5D;AAIJ,SAASO,EAAK,EAAE,WAAAR,GAAW,eAAAC,KAAmC;AAC5D,QAAM,EAAE,SAAAQ,EAAA,IAAYC,EAAA,GACd,EAAE,MAAMC,EAAA,IAAiBC,EAA8B,EAAE,WAAAZ,GAAW,GAEpEa,KAAgBF,EAAa,cAAc,UAAU,KAAK,GAC1DG,IAAeD,IAAe,kBAAkB,eAChDE,IAAmBF,IAAeG,IAA4BC,GAE9DC,IAAUC;AAAA,IACd,MACEC;AAAA,MACEN;AAAA,MACAO;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWP;AAAA,QACX,WAAAf;AAAA,QACA,eAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACD,GAAWC,GAAea,GAAcC,CAAgB;AAAA,EAAA;AAG3D,SAAO,gBAAAT,EAACiB,GAAA,EAAK,SAAAL,GAAkB,SAAAT,EAAA,CAAkB;AACnD;"}
@@ -0,0 +1,10 @@
1
+ import { PayScheduleDefaultValues } from './PaySchedule';
2
+ import { FlowContextInterface } from '../../Flow/useFlow';
3
+ export interface PayScheduleContextInterface extends FlowContextInterface {
4
+ companyId: string;
5
+ payScheduleId?: string;
6
+ defaultValues?: PayScheduleDefaultValues;
7
+ component: React.ComponentType | null;
8
+ }
9
+ export declare function PayScheduleListContextual(): import("react/jsx-runtime").JSX.Element;
10
+ export declare function PayScheduleFormContextual(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { PayScheduleList as a } from "./PayScheduleList.js";
3
+ import { PayScheduleForm as c } from "./PayScheduleForm.js";
4
+ import { useFlow as n } from "../../Flow/useFlow.js";
5
+ import { ensureRequired as r } from "../../../helpers/ensureRequired.js";
6
+ function f() {
7
+ const { companyId: o, onEvent: e } = n();
8
+ return /* @__PURE__ */ t(a, { onEvent: e, companyId: r(o) });
9
+ }
10
+ function s() {
11
+ const { companyId: o, payScheduleId: e, defaultValues: m, onEvent: u } = n();
12
+ return /* @__PURE__ */ t(
13
+ c,
14
+ {
15
+ companyId: r(o),
16
+ payScheduleId: e,
17
+ defaultValues: m,
18
+ onEvent: u
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ s as PayScheduleFormContextual,
24
+ f as PayScheduleListContextual
25
+ };
26
+ //# sourceMappingURL=PayScheduleComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayScheduleComponents.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleComponents.tsx"],"sourcesContent":["import type { PayScheduleDefaultValues } from './PaySchedule'\nimport { PayScheduleList } from './PayScheduleList'\nimport { PayScheduleForm } from './PayScheduleForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport interface PayScheduleContextInterface extends FlowContextInterface {\n companyId: string\n payScheduleId?: string\n defaultValues?: PayScheduleDefaultValues\n component: React.ComponentType | null\n}\n\nexport function PayScheduleListContextual() {\n const { companyId, onEvent } = useFlow<PayScheduleContextInterface>()\n return <PayScheduleList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function PayScheduleFormContextual() {\n const { companyId, payScheduleId, defaultValues, onEvent } =\n useFlow<PayScheduleContextInterface>()\n\n return (\n <PayScheduleForm\n companyId={ensureRequired(companyId)}\n payScheduleId={payScheduleId}\n defaultValues={defaultValues}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["PayScheduleListContextual","companyId","onEvent","useFlow","PayScheduleList","ensureRequired","PayScheduleFormContextual","payScheduleId","defaultValues","jsx","PayScheduleForm"],"mappings":";;;;;AAaO,SAASA,IAA4B;AAC1C,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYC,EAAA;AAC/B,2BAAQC,GAAA,EAAgB,SAAAF,GAAkB,WAAWG,EAAeJ,CAAS,GAAG;AAClF;AAEO,SAASK,IAA4B;AAC1C,QAAM,EAAE,WAAAL,GAAW,eAAAM,GAAe,eAAAC,GAAe,SAAAN,EAAA,IAC/CC,EAAA;AAEF,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWL,EAAeJ,CAAS;AAAA,MACnC,eAAAM;AAAA,MACA,eAAAC;AAAA,MACA,SAAAN;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,8 @@
1
+ import { UsePayScheduleFormProps } from './shared/usePayScheduleForm';
2
+ import { EventType } from '../../../shared/constants';
3
+ import { OnEventType } from '../../Base/useBase';
4
+ interface PayScheduleFormProps extends UsePayScheduleFormProps {
5
+ onEvent: OnEventType<EventType, unknown>;
6
+ }
7
+ export declare function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,199 @@
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import { useState as w } from "react";
3
+ import { useTranslation as C } from "react-i18next";
4
+ import { usePayScheduleForm as q } from "./shared/usePayScheduleForm/usePayScheduleForm.js";
5
+ import l from "./PayScheduleForm.module.scss.js";
6
+ import { BaseBoundaries as F, BaseLayout as h } from "../../Base/Base.js";
7
+ import "../../Base/useBase.js";
8
+ import { SDKFormProvider as E } from "../../../partner-hook-utils/form/SDKFormProvider.js";
9
+ import { Form as M } from "../../Common/Form/Form.js";
10
+ import { Flex as m } from "../../Common/Flex/Flex.js";
11
+ import { Grid as x } from "../../Common/Grid/Grid.js";
12
+ import "classnames";
13
+ import { ActionsLayout as N } from "../../Common/ActionsLayout/ActionsLayout.js";
14
+ import { useComponentContext as R } from "../../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import { useDateFormatter as T } from "../../../hooks/useDateFormatter.js";
16
+ import { componentEvents as p } from "../../../shared/constants.js";
17
+ import { TextInputField as O } from "../../Common/Fields/TextInputField/TextInputField.js";
18
+ import { SelectField as A } from "../../Common/Fields/SelectField/SelectField.js";
19
+ import { RadioGroupField as L } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
20
+ import { NumberInputField as f } from "../../Common/Fields/NumberInputField/NumberInputField.js";
21
+ import { DatePickerField as P } from "../../Common/Fields/DatePickerField/DatePickerField.js";
22
+ function ie({ onEvent: d, ...u }) {
23
+ return /* @__PURE__ */ r(F, { componentName: "Company.PayScheduleForm", children: /* @__PURE__ */ r(k, { onEvent: d, ...u }) });
24
+ }
25
+ function k({ onEvent: d, ...u }) {
26
+ const { t: e } = C("Company.PaySchedule"), i = R(), v = T(), a = q(u), [o, D] = w(0);
27
+ if (a.isLoading)
28
+ return /* @__PURE__ */ r(h, { isLoading: !0, error: a.errorHandling.errors });
29
+ const g = async () => {
30
+ const t = await a.actions.onSubmit();
31
+ t && d(
32
+ t.mode === "create" ? p.PAY_SCHEDULE_CREATED : p.PAY_SCHEDULE_UPDATED,
33
+ { paySchedule: t.data }
34
+ );
35
+ }, { Fields: y } = a.form, { paymentSpeedDays: b, payPreviewLoading: S } = a.data, n = a.data.payPeriodPreview ?? void 0;
36
+ return /* @__PURE__ */ r(h, { error: a.errorHandling.errors, children: /* @__PURE__ */ r(E, { formHookResult: a, children: /* @__PURE__ */ r(M, { onSubmit: () => void g(), children: /* @__PURE__ */ s(m, { flexDirection: "column", children: [
37
+ /* @__PURE__ */ r(m, { justifyContent: "space-between", flexDirection: "column", gap: 4, children: /* @__PURE__ */ r("header", { children: /* @__PURE__ */ r(i.Heading, { as: "h2", children: a.status.mode === "create" ? e("headings.addPaySchedule") : e("headings.editPaySchedule") }) }) }),
38
+ /* @__PURE__ */ r("div", { className: l.payScheduleContainer, children: /* @__PURE__ */ s(x, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
39
+ /* @__PURE__ */ r("div", { className: l.payScheduleForm, children: /* @__PURE__ */ s(m, { flexDirection: "column", children: [
40
+ /* @__PURE__ */ r(
41
+ O,
42
+ {
43
+ name: "customName",
44
+ label: e("labels.name"),
45
+ isRequired: !0,
46
+ errorMessage: e("validations.name")
47
+ }
48
+ ),
49
+ /* @__PURE__ */ r(
50
+ A,
51
+ {
52
+ name: "frequency",
53
+ label: e("labels.frequency"),
54
+ options: [
55
+ { value: "Every week", label: e("frequencies.everyWeek") },
56
+ { value: "Every other week", label: e("frequencies.everyOtherWeek") },
57
+ { value: "Twice per month", label: e("frequencies.twicePerMonth") },
58
+ { value: "Monthly", label: e("frequencies.monthly") }
59
+ ],
60
+ isRequired: !0,
61
+ errorMessage: e("validations.frequency")
62
+ }
63
+ ),
64
+ y.CustomTwicePerMonth !== void 0 && /* @__PURE__ */ r(
65
+ L,
66
+ {
67
+ name: "customTwicePerMonth",
68
+ label: e("labels.frequencyOptions"),
69
+ description: e("descriptions.frequencyOptionsDescription"),
70
+ options: [
71
+ { value: "1st15th", label: e("frequencyOptions.15thAndLast") },
72
+ { value: "custom", label: e("frequencyOptions.custom") }
73
+ ]
74
+ }
75
+ ),
76
+ /* @__PURE__ */ r(
77
+ P,
78
+ {
79
+ name: "anchorPayDate",
80
+ label: e("labels.firstPayDate"),
81
+ description: e("descriptions.anchorPayDateDescription", {
82
+ count: b
83
+ }),
84
+ isRequired: !0,
85
+ errorMessage: e("validations.firstPayDate"),
86
+ minDate: /* @__PURE__ */ new Date()
87
+ }
88
+ ),
89
+ /* @__PURE__ */ r(
90
+ P,
91
+ {
92
+ name: "anchorEndOfPayPeriod",
93
+ label: e("labels.firstPayPeriodEndDate"),
94
+ description: e("descriptions.anchorEndOfPayPeriodDescription"),
95
+ isRequired: !0,
96
+ errorMessage: e("validations.firstPayPeriodEndDate")
97
+ }
98
+ ),
99
+ /* @__PURE__ */ r("div", { className: y.Day1 !== void 0 ? "" : l.visuallyHidden, children: /* @__PURE__ */ r(
100
+ f,
101
+ {
102
+ name: "day1",
103
+ label: e("labels.firstPayDayOfTheMonth"),
104
+ isRequired: !0,
105
+ errorMessage: e("validations.firstPayDayOfTheMonth")
106
+ }
107
+ ) }),
108
+ /* @__PURE__ */ r("div", { className: y.Day2 !== void 0 ? "" : l.visuallyHidden, children: /* @__PURE__ */ r(
109
+ f,
110
+ {
111
+ name: "day2",
112
+ label: e("labels.lastPayDayOfTheMonth"),
113
+ isRequired: !0,
114
+ errorMessage: e("validations.lastPayDayOfTheMonth")
115
+ }
116
+ ) })
117
+ ] }) }),
118
+ /* @__PURE__ */ r(m, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: n && n[o] ? /* @__PURE__ */ s("div", { className: l.calendarContainer, children: [
119
+ !S && /* @__PURE__ */ r(
120
+ i.Select,
121
+ {
122
+ label: e("labels.preview"),
123
+ isRequired: !0,
124
+ options: n.map((t, c) => ({
125
+ value: String(c),
126
+ label: v.formatPayPeriodRange(
127
+ t.startDate.toString(),
128
+ t.endDate.toString()
129
+ )
130
+ })),
131
+ value: String(o),
132
+ onChange: (t) => {
133
+ const c = Number(t);
134
+ isNaN(c) || D(c);
135
+ }
136
+ }
137
+ ),
138
+ /* @__PURE__ */ r(
139
+ i.CalendarPreview,
140
+ {
141
+ dateRange: {
142
+ start: new Date(
143
+ n[o].startDate.toString()
144
+ ),
145
+ end: new Date(
146
+ n[o].endDate.toString()
147
+ ),
148
+ label: e("payPreview.payPeriod") || "Pay Period"
149
+ },
150
+ highlightDates: [
151
+ {
152
+ date: new Date(
153
+ n[o].checkDate.toString()
154
+ ),
155
+ highlightColor: "primary",
156
+ label: e("payPreview.payday") || "Payday"
157
+ },
158
+ {
159
+ date: new Date(
160
+ n[o].runPayrollBy.toString()
161
+ ),
162
+ highlightColor: "secondary",
163
+ label: e("payPreview.payrollDeadline") || "Payroll Deadline"
164
+ }
165
+ ]
166
+ },
167
+ o
168
+ )
169
+ ] }) : /* @__PURE__ */ r("div", { className: l.calendarContainer, children: /* @__PURE__ */ r(
170
+ i.Alert,
171
+ {
172
+ status: "info",
173
+ label: e("previewAlert.title", "Pay Schedule Preview"),
174
+ children: /* @__PURE__ */ r(i.Text, { children: e(
175
+ "previewAlert.description",
176
+ "Complete all the required fields on the left to see a preview of your pay schedule."
177
+ ) })
178
+ }
179
+ ) }) })
180
+ ] }) }),
181
+ /* @__PURE__ */ s(N, { children: [
182
+ /* @__PURE__ */ r(
183
+ i.Button,
184
+ {
185
+ variant: "secondary",
186
+ onClick: () => {
187
+ d(p.CANCEL);
188
+ },
189
+ children: e("actions.cancel")
190
+ }
191
+ ),
192
+ /* @__PURE__ */ r(i.Button, { type: "submit", isLoading: a.status.isPending, children: e("actions.save") })
193
+ ] })
194
+ ] }) }) }) });
195
+ }
196
+ export {
197
+ ie as PayScheduleForm
198
+ };
199
+ //# sourceMappingURL=PayScheduleForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayScheduleForm.js","sources":["../../../../src/components/Company/PaySchedule/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { usePayScheduleForm } from './shared/usePayScheduleForm'\nimport type { UsePayScheduleFormProps } from './shared/usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { BaseBoundaries, BaseLayout } from '@/components/Base'\nimport { SDKFormProvider } from '@/partner-hook-utils/form/SDKFormProvider'\nimport { Form } from '@/components/Common/Form'\nimport {\n Flex,\n Grid,\n TextInputField,\n SelectField,\n RadioGroupField,\n DatePickerField,\n NumberInputField,\n ActionsLayout,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface PayScheduleFormProps extends UsePayScheduleFormProps {\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function PayScheduleForm({ onEvent, ...hookProps }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"Company.PayScheduleForm\">\n <PayScheduleFormRoot onEvent={onEvent} {...hookProps} />\n </BaseBoundaries>\n )\n}\n\nfunction PayScheduleFormRoot({ onEvent, ...hookProps }: PayScheduleFormProps) {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n { paySchedule: result.data },\n )\n }\n }\n\n const { Fields } = paySchedule.form\n const { paymentSpeedDays, payPreviewLoading } = paySchedule.data\n const payPeriodPreview = paySchedule.data.payPeriodPreview ?? undefined\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form onSubmit={() => void handleSubmit()}>\n <Flex flexDirection=\"column\">\n <Flex justifyContent=\"space-between\" flexDirection=\"column\" gap={4}>\n <header>\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create'\n ? t('headings.addPaySchedule')\n : t('headings.editPaySchedule')}\n </Components.Heading>\n </header>\n </Flex>\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <TextInputField\n name=\"customName\"\n label={t('labels.name')}\n isRequired\n errorMessage={t('validations.name')}\n />\n <SelectField\n name=\"frequency\"\n label={t('labels.frequency')}\n options={[\n { value: 'Every week', label: t('frequencies.everyWeek') },\n { value: 'Every other week', label: t('frequencies.everyOtherWeek') },\n { value: 'Twice per month', label: t('frequencies.twicePerMonth') },\n { value: 'Monthly', label: t('frequencies.monthly') },\n ]}\n isRequired\n errorMessage={t('validations.frequency')}\n />\n {Fields.CustomTwicePerMonth !== undefined && (\n <RadioGroupField\n name=\"customTwicePerMonth\"\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n options={[\n { value: '1st15th', label: t('frequencyOptions.15thAndLast') },\n { value: 'custom', label: t('frequencyOptions.custom') },\n ]}\n />\n )}\n <DatePickerField\n name=\"anchorPayDate\"\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n isRequired\n errorMessage={t('validations.firstPayDate')}\n minDate={new Date()}\n />\n <DatePickerField\n name=\"anchorEndOfPayPeriod\"\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n isRequired\n errorMessage={t('validations.firstPayPeriodEndDate')}\n />\n <div className={Fields.Day1 !== undefined ? '' : style.visuallyHidden}>\n <NumberInputField\n name=\"day1\"\n label={t('labels.firstPayDayOfTheMonth')}\n isRequired\n errorMessage={t('validations.firstPayDayOfTheMonth')}\n />\n </div>\n <div className={Fields.Day2 !== undefined ? '' : style.visuallyHidden}>\n <NumberInputField\n name=\"day2\"\n label={t('labels.lastPayDayOfTheMonth')}\n isRequired\n errorMessage={t('validations.lastPayDayOfTheMonth')}\n />\n </div>\n </Flex>\n </div>\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && payPeriodPreview[selectedPayPeriodIndex] ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(\n payPeriodPreview[selectedPayPeriodIndex].startDate.toString(),\n ),\n end: new Date(\n payPeriodPreview[selectedPayPeriodIndex].endDate.toString(),\n ),\n label: t('payPreview.payPeriod') || 'Pay Period',\n }}\n highlightDates={[\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].checkDate.toString(),\n ),\n highlightColor: 'primary',\n label: t('payPreview.payday') || 'Payday',\n },\n {\n date: new Date(\n payPeriodPreview[selectedPayPeriodIndex].runPayrollBy.toString(),\n ),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline') || 'Payroll Deadline',\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title', 'Pay Schedule Preview')}\n >\n <Components.Text>\n {t(\n 'previewAlert.description',\n 'Complete all the required fields on the left to see a preview of your pay schedule.',\n )}\n </Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(componentEvents.CANCEL)\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('actions.save')}\n </Components.Button>\n </ActionsLayout>\n </Flex>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n"],"names":["PayScheduleForm","onEvent","hookProps","jsx","BaseBoundaries","PayScheduleFormRoot","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","handleSubmit","result","componentEvents","Fields","paymentSpeedDays","payPreviewLoading","payPeriodPreview","SDKFormProvider","Form","jsxs","Flex","style","Grid","TextInputField","SelectField","RadioGroupField","DatePickerField","NumberInputField","period","index","value","numericValue","ActionsLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BO,SAASA,GAAgB,EAAE,SAAAC,GAAS,GAAGC,KAAmC;AAC/E,SACE,gBAAAC,EAACC,KAAe,eAAc,2BAC5B,4BAACC,GAAA,EAAoB,SAAAJ,GAAmB,GAAGC,EAAA,CAAW,EAAA,CACxD;AAEJ;AAEA,SAASG,EAAoB,EAAE,SAAAJ,GAAS,GAAGC,KAAmC;AAC5E,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAcC,EAAmBX,CAAS,GAC1C,CAACY,GAAwBC,CAAyB,IAAIC,EAAS,CAAC;AAEtE,MAAIJ,EAAY;AACd,6BAAQK,GAAA,EAAW,WAAS,IAAC,OAAOL,EAAY,cAAc,QAAQ;AAGxE,QAAMM,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAMP,EAAY,QAAQ,SAAA;AACzC,IAAIO,KACFlB;AAAA,MACEkB,EAAO,SAAS,WACZC,EAAgB,uBAChBA,EAAgB;AAAA,MACpB,EAAE,aAAaD,EAAO,KAAA;AAAA,IAAK;A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,GACF,GACF;AAEJ;"}
@@ -11,4 +11,4 @@ export {
11
11
  e as payScheduleForm,
12
12
  n as visuallyHidden
13
13
  };
14
- //# sourceMappingURL=Edit.module.scss.js.map
14
+ //# sourceMappingURL=PayScheduleForm.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PayScheduleForm.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,8 @@
1
+ import { EventType } from '../../../shared/constants';
2
+ import { OnEventType } from '../../Base/useBase';
3
+ interface PayScheduleListProps {
4
+ companyId: string;
5
+ onEvent: OnEventType<EventType, unknown>;
6
+ }
7
+ export declare function PayScheduleList({ companyId, onEvent }: PayScheduleListProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};