@gusto/embedded-react-sdk 0.33.0 → 0.34.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.d.ts +5 -0
  3. package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +34 -0
  4. package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -0
  5. package/dist/components/Common/Fields/MultiSelectComboBoxField/index.d.ts +2 -0
  6. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +1 -7
  7. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
  8. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  9. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
  11. package/dist/components/Common/UI/Menu/Menu.js +2 -3
  12. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  13. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.d.ts +2 -0
  14. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +127 -0
  15. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -0
  16. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +16 -0
  17. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -0
  18. package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/MultiSelectComboBoxTypes.d.ts +6 -5
  19. package/dist/components/Common/index.d.ts +1 -0
  20. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  21. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -17
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +4 -30
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +2 -26
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -6
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  34. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -7
  37. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +6 -5
  38. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  39. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  40. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -7
  42. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -5
  43. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  44. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  45. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  46. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  47. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  48. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  49. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  50. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  51. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  52. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  53. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +7 -13
  54. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  55. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  56. package/dist/components/Company/Industry/Context.js +7 -6
  57. package/dist/components/Company/Industry/Context.js.map +1 -1
  58. package/dist/components/Company/Locations/LocationForm/Form.d.ts +7 -20
  59. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  60. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  61. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
  62. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  63. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  64. package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
  65. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  66. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  67. package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
  68. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  69. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -5
  70. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  71. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  72. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  73. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  74. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  75. package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
  76. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  77. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  78. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  79. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  80. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  81. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +7 -18
  82. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  83. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  84. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  85. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  86. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  87. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  88. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  89. package/dist/components/Contractor/Address/Address.js +2 -2
  90. package/dist/components/Contractor/Address/Form.js +7 -8
  91. package/dist/components/Contractor/Address/Form.js.map +1 -1
  92. package/dist/components/Contractor/Address/useAddress.d.ts +1 -13
  93. package/dist/components/Contractor/Address/useAddress.js +6 -5
  94. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  95. package/dist/components/Contractor/ContractorList/index.js +17 -17
  96. package/dist/components/Contractor/ContractorList/useContractorList.js +4 -4
  97. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  98. package/dist/components/Contractor/NewHireReport/NewHireReport.d.ts +5 -15
  99. package/dist/components/Contractor/NewHireReport/NewHireReport.js +28 -28
  100. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  101. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  102. package/dist/components/Contractor/PaymentMethod/PaymentMethod.d.ts +7 -20
  103. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.d.ts +5 -6
  104. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  105. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +3 -3
  106. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  107. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
  108. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  109. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentFormSchema.d.ts +19 -67
  110. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +12 -13
  111. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  112. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -17
  113. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  114. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
  115. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +27 -26
  116. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  117. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +76 -44
  118. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  119. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +1 -1
  120. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
  121. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
  122. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  123. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +1 -1
  124. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
  125. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +7 -6
  126. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  127. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +3 -1
  128. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +28 -22
  129. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  130. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +3 -1
  131. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +66 -54
  132. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  133. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +3 -2
  134. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  135. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  136. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +54 -120
  137. package/dist/components/Contractor/Profile/useContractorProfile.js +50 -49
  138. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  139. package/dist/components/Contractor/Submit/Submit.js +1 -1
  140. package/dist/components/Employee/Compensation/Edit.js +14 -14
  141. package/dist/components/Employee/Compensation/useCompensation.d.ts +17 -44
  142. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +4 -22
  143. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +62 -61
  144. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  145. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +4 -22
  146. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +36 -35
  147. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  148. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +5 -27
  149. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +48 -47
  150. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  151. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  152. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
  153. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  154. package/dist/components/Employee/Deductions/useDeductions.d.ts +7 -26
  155. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  156. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  157. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  158. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  159. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  160. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +21 -20
  161. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
  162. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +5 -29
  163. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js +8 -8
  164. package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.js.map +1 -1
  165. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +9 -76
  166. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +7 -7
  167. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  168. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  169. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  170. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.d.ts +1 -5
  171. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
  172. package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
  173. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  174. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  175. package/dist/components/Employee/EmployeeList/Head.js +3 -2
  176. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  177. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  178. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  179. package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +7 -33
  180. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  181. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  182. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  183. package/dist/components/Employee/Landing/Landing.js +8 -8
  184. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  185. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +5 -14
  186. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  187. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +5 -6
  188. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  189. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  190. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +12 -68
  191. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +19 -17
  192. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  193. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +17 -82
  194. package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -33
  195. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  196. package/dist/components/Employee/Profile/HomeAddress.d.ts +11 -66
  197. package/dist/components/Employee/Profile/HomeAddress.js +9 -10
  198. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  199. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +15 -64
  200. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +32 -29
  201. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  202. package/dist/components/Employee/Profile/Profile.js +2 -5
  203. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  204. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +8 -37
  205. package/dist/components/Employee/Profile/SelfPersonalDetails.js +22 -19
  206. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
  207. package/dist/components/Employee/Profile/useProfile.js +4 -3
  208. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  209. package/dist/components/Employee/StateTaxes/StateForm.d.ts +1 -5
  210. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  211. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  212. package/dist/components/Employee/Taxes/FederalForm.d.ts +7 -33
  213. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  214. package/dist/components/Employee/Taxes/StateForm.d.ts +1 -5
  215. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  216. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  217. package/dist/components/Flow/Flow.js +3 -2
  218. package/dist/components/Flow/Flow.js.map +1 -1
  219. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -16
  220. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  221. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
  222. package/dist/components/InformationRequests/InformationRequests.js +1 -1
  223. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +1 -11
  224. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -10
  225. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  226. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +6 -9
  227. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  228. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +84 -56
  229. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  230. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  231. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +57 -22
  232. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  233. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +5 -0
  234. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -1
  235. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +2 -22
  236. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +1 -1
  237. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +3 -2
  238. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  239. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
  240. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +38 -39
  241. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  242. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +5 -5
  243. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  244. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -12
  245. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +66 -67
  246. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  247. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +18 -17
  248. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  249. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
  250. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  251. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +3 -2
  252. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  253. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
  254. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  255. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +8 -7
  256. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  257. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  258. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  259. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +1 -1
  260. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
  261. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
  262. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  263. package/dist/components/Payroll/usePreparedPayrollData.js +27 -26
  264. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  265. package/dist/contexts/ApiProvider/ApiProvider.js +26 -25
  266. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  267. package/dist/contexts/ApiProvider/apiVersionHook.d.ts +2 -0
  268. package/dist/contexts/ApiProvider/apiVersionHook.js +7 -0
  269. package/dist/contexts/ApiProvider/apiVersionHook.js.map +1 -0
  270. package/dist/contexts/ApiProvider/apiVersionHook.test.d.ts +1 -0
  271. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +60 -58
  272. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  273. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  274. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  275. package/dist/contexts/ThemeProvider/ThemeProvider.js +23 -23
  276. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  277. package/dist/helpers/validations.d.ts +2 -2
  278. package/dist/i18n/I18n.js +15 -15
  279. package/dist/i18n/I18n.js.map +1 -1
  280. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +42 -40
  281. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -1
  282. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +9 -9
  283. package/dist/i18n/en/Payroll.EmployeeSelection.json.js +10 -0
  284. package/dist/i18n/en/Payroll.EmployeeSelection.json.js.map +1 -0
  285. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +10 -8
  286. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  287. package/dist/style.css +1 -1
  288. package/dist/types/i18next.d.ts +11 -1
  289. package/docs/reference/endpoint-inventory.json +4 -0
  290. package/package.json +11 -10
  291. package/dist/components/Common/MultiSelectComboBox/MultiSelectComboBox.d.ts +0 -2
  292. /package/dist/components/Common/{MultiSelectComboBox → UI/MultiSelectComboBox}/index.d.ts +0 -0
@@ -1,37 +1,38 @@
1
- import { jsx as e, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
2
  import { useTranslation as h } from "react-i18next";
3
3
  import { usePaySchedule as y } from "../usePaySchedule.js";
4
4
  import o from "./List.module.scss.js";
5
5
  import { Flex as s } from "../../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
+ import "../../../../shared/constants.js";
7
8
  import { HamburgerMenu as f } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
8
9
  import S from "../../../../assets/icons/pencil.svg.js";
9
10
  import { useComponentContext as v } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
11
  import { VisuallyHidden as g } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
12
  import { useDataView as L } from "../../../Common/DataView/useDataView.js";
12
13
  import { DataView as C } from "../../../Common/DataView/DataView.js";
13
- const B = () => {
14
- const { t: n } = h("Company.PaySchedule"), r = v(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
14
+ const F = () => {
15
+ const { t: r } = h("Company.PaySchedule"), n = v(), { paySchedules: m, mode: c, handleEdit: l } = y(), { ...d } = L({
15
16
  data: m || [],
16
17
  columns: [
17
18
  {
18
- title: n("payScheduleList.name"),
19
+ title: r("payScheduleList.name"),
19
20
  key: "customName",
20
21
  render: (t) => {
21
22
  const a = !!t.name;
22
23
  let i = a ? t.name : t.customName;
23
24
  i && i.length > 1 ? i = i.charAt(0).toUpperCase() + i.slice(1) : i = t.customName;
24
- const u = t.customName;
25
- return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ p("div", { className: o.content, children: [
25
+ const p = t.customName;
26
+ return /* @__PURE__ */ e(s, { flexDirection: "column", gap: 0, children: /* @__PURE__ */ u("div", { className: o.content, children: [
26
27
  /* @__PURE__ */ e("div", { children: i }),
27
- a && /* @__PURE__ */ e("div", { children: u })
28
+ a && /* @__PURE__ */ e("div", { children: p })
28
29
  ] }) });
29
30
  }
30
31
  },
31
32
  {
32
- title: /* @__PURE__ */ e(g, { children: n("payScheduleList.active") }),
33
+ title: /* @__PURE__ */ e(g, { children: r("payScheduleList.active") }),
33
34
  key: "active",
34
- render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(r.Badge, { status: "success", children: n("payScheduleList.active") }) : /* @__PURE__ */ e(r.Badge, { status: "info", children: n("payScheduleList.inactive") }) }) })
35
+ render: (t) => /* @__PURE__ */ e(s, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ e("div", { className: o.content, children: t.active ? /* @__PURE__ */ e(n.Badge, { status: "success", children: r("payScheduleList.active") }) : /* @__PURE__ */ e(n.Badge, { status: "info", children: r("payScheduleList.inactive") }) }) })
35
36
  }
36
37
  ],
37
38
  itemMenu: (t) => /* @__PURE__ */ e(
@@ -40,7 +41,7 @@ const B = () => {
40
41
  triggerLabel: "Actions",
41
42
  items: [
42
43
  {
43
- label: n("payScheduleList.edit"),
44
+ label: r("payScheduleList.edit"),
44
45
  onClick: () => {
45
46
  l(t);
46
47
  },
@@ -53,6 +54,6 @@ const B = () => {
53
54
  return c !== "LIST_PAY_SCHEDULES" ? null : /* @__PURE__ */ e(C, { label: "test", ...d });
54
55
  };
55
56
  export {
56
- B as List
57
+ F as List
57
58
  };
58
59
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAA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esContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport styles from './List.module.scss'\nimport { useDataView, DataView, Flex, VisuallyHidden } from '@/components/Common'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const Components = useComponentContext()\n const { paySchedules, mode, handleEdit } = usePaySchedule()\n\n const { ...dataViewProps } = useDataView({\n data: paySchedules || [],\n columns: [\n {\n title: t('payScheduleList.name'),\n key: 'customName',\n render: schedule => {\n const hasName = !!schedule.name\n let displayName = hasName ? schedule.name : schedule.customName\n if (displayName && displayName.length > 1) {\n displayName = displayName.charAt(0).toUpperCase() + displayName.slice(1)\n } else {\n displayName = schedule.customName\n }\n const displayFrequency = schedule.customName\n return (\n <Flex flexDirection={'column'} gap={0}>\n <div className={styles.content}>\n <div>{displayName}</div>\n {hasName && <div>{displayFrequency}</div>}\n </div>\n </Flex>\n )\n },\n },\n {\n title: <VisuallyHidden>{t('payScheduleList.active')}</VisuallyHidden>,\n key: 'active',\n render: schedule => (\n <Flex alignItems={'center'} justifyContent={'center'}>\n <div className={styles.content}>\n {schedule.active ? (\n <Components.Badge status=\"success\">{t('payScheduleList.active')}</Components.Badge>\n ) : (\n <Components.Badge status=\"info\">{t('payScheduleList.inactive')}</Components.Badge>\n )}\n </div>\n </Flex>\n ),\n },\n ],\n itemMenu: schedule => {\n return (\n <HamburgerMenu\n triggerLabel=\"Actions\"\n items={[\n {\n label: t('payScheduleList.edit'),\n onClick: () => {\n handleEdit(schedule)\n },\n icon: <PencilSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST_PAY_SCHEDULES') {\n return null\n }\n\n return <DataView label=\"test\" {...dataViewProps} />\n}\n"],"names":["List","t","useTranslation","Components","useComponentContext","paySchedules","mode","handleEdit","usePaySchedule","dataViewProps","useDataView","schedule","hasName","displayName","displayFrequency","jsx","Flex","jsxs","styles","VisuallyHidden","HamburgerMenu","PencilSvg","DataView"],"mappings":";;;;;;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,MAAAC,GAAM,YAAAC,EAAA,IAAeC,EAAA,GAErC,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAML,KAAgB,CAAA;AAAA,IACtB,SAAS;AAAA,MACP;AAAA,QACE,OAAOJ,EAAE,sBAAsB;AAAA,QAC/B,KAAK;AAAA,QACL,QAAQ,CAAAU,MAAY;AAClB,gBAAMC,IAAU,CAAC,CAACD,EAAS;AAC3B,cAAIE,IAAcD,IAAUD,EAAS,OAAOA,EAAS;AACrD,UAAIE,KAAeA,EAAY,SAAS,IACtCA,IAAcA,EAAY,OAAO,CAAC,EAAE,gBAAgBA,EAAY,MAAM,CAAC,IAEvEA,IAAcF,EAAS;AAEzB,gBAAMG,IAAmBH,EAAS;AAClC,iBACE,gBAAAI,EAACC,GAAA,EAAK,eAAe,UAAU,KAAK,GAClC,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAO,SACrB,UAAA;AAAA,YAAA,gBAAAH,EAAC,SAAK,UAAAF,EAAA,CAAY;AAAA,YACjBD,KAAW,gBAAAG,EAAC,OAAA,EAAK,UAAAD,EAAA,CAAiB;AAAA,UAAA,EAAA,CACrC,EAAA,CACF;AAAA,QAEJ;AAAA,MAAA;AAAA,MAEF;AAAA,QACE,OAAO,gBAAAC,EAACI,GAAA,EAAgB,UAAAlB,EAAE,wBAAwB,GAAE;AAAA,QACpD,KAAK;AAAA,QACL,QAAQ,CAAAU,MACN,gBAAAI,EAACC,GAAA,EAAK,YAAY,UAAU,gBAAgB,UAC1C,UAAA,gBAAAD,EAAC,SAAI,WAAWG,EAAO,SACpB,UAAAP,EAAS,SACR,gBAAAI,EAACZ,EAAW,OAAX,EAAiB,QAAO,WAAW,UAAAF,EAAE,wBAAwB,EAAA,CAAE,IAEhE,gBAAAc,EAACZ,EAAW,OAAX,EAAiB,QAAO,QAAQ,UAAAF,EAAE,0BAA0B,GAAE,GAEnE,EAAA,CACF;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEF,UAAU,CAAAU,MAEN,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,cAAa;AAAA,QACb,OAAO;AAAA,UACL;AAAA,YACE,OAAOnB,EAAE,sBAAsB;AAAA,YAC/B,SAAS,MAAM;AACb,cAAAM,EAAWI,CAAQ;AAAA,YACrB;AAAA,YACA,MAAM,gBAAAI,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,UAAA;AAAA,QAC/B;AAAA,MACF;AAAA,IAAA;AAAA,EAGN,CACD;AAED,SAAIf,MAAS,uBACJ,OAGF,gBAAAS,EAACO,GAAA,EAAS,OAAM,QAAQ,GAAGb,GAAe;AACnD;"}
@@ -18,30 +18,19 @@ type PayScheduleContextType = {
18
18
  payPreviewLoading?: boolean;
19
19
  };
20
20
  export declare const PayScheduleSchema: z.ZodObject<{
21
- frequency: z.ZodEnum<["Every week", "Every other week", "Twice per month", "Monthly"]>;
21
+ frequency: z.ZodEnum<{
22
+ "Every week": "Every week";
23
+ "Every other week": "Every other week";
24
+ "Twice per month": "Twice per month";
25
+ Monthly: "Monthly";
26
+ }>;
22
27
  anchorPayDate: z.ZodOptional<z.ZodDate>;
23
28
  anchorEndOfPayPeriod: z.ZodOptional<z.ZodDate>;
24
29
  day1: z.ZodOptional<z.ZodNumber>;
25
30
  day2: z.ZodOptional<z.ZodNumber>;
26
31
  customName: z.ZodOptional<z.ZodString>;
27
32
  customTwicePerMonth: z.ZodOptional<z.ZodString>;
28
- }, "strip", z.ZodTypeAny, {
29
- frequency: "Every week" | "Every other week" | "Twice per month" | "Monthly";
30
- anchorPayDate?: Date | undefined;
31
- anchorEndOfPayPeriod?: Date | undefined;
32
- day1?: number | undefined;
33
- day2?: number | undefined;
34
- customName?: string | undefined;
35
- customTwicePerMonth?: string | undefined;
36
- }, {
37
- frequency: "Every week" | "Every other week" | "Twice per month" | "Monthly";
38
- anchorPayDate?: Date | undefined;
39
- anchorEndOfPayPeriod?: Date | undefined;
40
- day1?: number | undefined;
41
- day2?: number | undefined;
42
- customName?: string | undefined;
43
- customTwicePerMonth?: string | undefined;
44
- }>;
33
+ }, z.core.$strip>;
45
34
  export type PayScheduleInputs = z.input<typeof PayScheduleSchema>;
46
35
  export type PayScheduleOutputs = z.output<typeof PayScheduleSchema>;
47
36
  export type PayScheduleDefaultValues = RequireAtLeastOne<Partial<Pick<PayScheduleCreateUpdate, 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'>>>;
@@ -10,10 +10,11 @@ import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
14
  import "dompurify";
14
15
  import "../../../contexts/LocaleProvider/useLocale.js";
15
16
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
16
- const x = o.object({
17
+ const S = o.object({
17
18
  frequency: o.enum(["Every week", "Every other week", "Twice per month", "Monthly"]),
18
19
  anchorPayDate: o.date().optional(),
19
20
  anchorEndOfPayPeriod: o.date().optional(),
@@ -21,10 +22,10 @@ const x = o.object({
21
22
  day2: o.number().min(1).max(31).optional(),
22
23
  customName: o.string().optional(),
23
24
  customTwicePerMonth: o.string().optional()
24
- }), [S, f] = t("PayScheduleContext");
25
+ }), [f, w] = t("PayScheduleContext");
25
26
  export {
26
- f as PayScheduleProvider,
27
- x as PayScheduleSchema,
28
- S as usePaySchedule
27
+ w as PayScheduleProvider,
28
+ S as PayScheduleSchema,
29
+ f as usePaySchedule
29
30
  };
30
31
  //# sourceMappingURL=usePaySchedule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
1
+ {"version":3,"file":"usePaySchedule.js","sources":["../../../../src/components/Company/PaySchedule/usePaySchedule.ts"],"sourcesContent":["import type { PayScheduleCreateUpdate } from '@gusto/embedded-api/models/components/payschedulecreateupdate'\nimport type { PayScheduleList } from '@gusto/embedded-api/models/components/payschedulelist'\nimport type { PayScheduleObject as PayScheduleType } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayPeriods } from '@gusto/embedded-api/models/operations/getv1companiescompanyidpayschedulespreview'\nimport { z } from 'zod'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\nimport { createCompoundContext } from '@/components/Base'\n\nexport type MODE =\n | 'LIST_PAY_SCHEDULES'\n | 'ADD_PAY_SCHEDULE'\n | 'EDIT_PAY_SCHEDULE'\n | 'PREVIEW_PAY_SCHEDULE'\n\ntype PayScheduleContextType = {\n companyId: string\n handleAdd: () => void\n handleEdit: (schedule: PayScheduleType) => void\n handleCancel: () => void\n handleContinue: () => void\n mode: MODE\n paySchedules: PayScheduleList[] | undefined | null\n currentPaySchedule: PayScheduleType | undefined | null\n payPeriodPreview?: PayPeriods[]\n payPreviewLoading?: boolean\n}\n\nexport const PayScheduleSchema = z.object({\n frequency: z.enum(['Every week', 'Every other week', 'Twice per month', 'Monthly']),\n anchorPayDate: z.date().optional(),\n anchorEndOfPayPeriod: z.date().optional(),\n day1: z.number().min(1).max(31).optional(),\n day2: z.number().min(1).max(31).optional(),\n customName: z.string().optional(),\n customTwicePerMonth: z.string().optional(),\n})\n\nexport type PayScheduleInputs = z.input<typeof PayScheduleSchema>\nexport type PayScheduleOutputs = z.output<typeof PayScheduleSchema>\n\nexport type PayScheduleDefaultValues = RequireAtLeastOne<\n Partial<\n Pick<\n PayScheduleCreateUpdate,\n 'anchorPayDate' | 'anchorEndOfPayPeriod' | 'day1' | 'day2' | 'customName' | 'frequency'\n >\n >\n>\n\nconst [usePaySchedule, PayScheduleProvider] =\n createCompoundContext<PayScheduleContextType>('PayScheduleContext')\nexport { usePaySchedule, PayScheduleProvider }\n"],"names":["PayScheduleSchema","z","usePaySchedule","PayScheduleProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AA2BO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,WAAWA,EAAE,KAAK,CAAC,cAAc,oBAAoB,mBAAmB,SAAS,CAAC;AAAA,EAClF,eAAeA,EAAE,KAAA,EAAO,SAAA;AAAA,EACxB,sBAAsBA,EAAE,KAAA,EAAO,SAAA;AAAA,EAC/B,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,MAAMA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAA;AAAA,EAChC,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,qBAAqBA,EAAE,OAAA,EAAS,SAAA;AAClC,CAAC,GAcK,CAACC,GAAgBC,CAAmB,IACxCC,EAA8C,oBAAoB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodTypeAny>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodTypeAny> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n const isPercentField =\n requirement.metadata?.type === 'tax_rate' || requirement.metadata?.type === 'percent'\n\n if (requirement.metadata?.type === 'radio') {\n requirementValues[requirementKey] = requirement.value ?? undefined\n } else {\n requirementValues[requirementKey] = requirement.value ? String(requirement.value) : ''\n }\n\n let fieldSchema: z.ZodTypeAny = z.string().optional()\n\n const validation = requirement.metadata?.validation\n\n if (validation) {\n if (isPercentField && validation.type === 'one_of') {\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string()\n .optional()\n .refine(val => !val || oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean().optional()\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([reqKey, value]) => ({\n key: reqKey,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","isPercentField","fieldSchema","z","validation","oneOfValues","val","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","reqKey","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,SAASA,GAAeC,GAAqD;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,OAAAC,GAAO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H,GAEMC,IAAe,MAAM;AACzB,IAAAzC,EAAQwC,EAAgB,MAAM;AAAA,EAChC;AAEA,SACE,gBAAAhD,EAAC,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAL,EAACkD,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAApC,EAACmD,GAAA,EAAS,UAAUd,EAAQ,aAAaG,CAAQ,GAC/C,UAAA,gBAAAxC;AAAA,IAACoD;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,sBAAArC,GAAsB,WAAWE,GAAiB,OAAAb,GAAO,cAAA6C,EAAA;AAAA,MAElE,UAAA,gBAAAjD,EAACqD,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA/C,KAGC,gBAAAgD,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAvD,EAACwD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodType>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodType> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n const isPercentField =\n requirement.metadata?.type === 'tax_rate' || requirement.metadata?.type === 'percent'\n\n if (requirement.metadata?.type === 'radio') {\n requirementValues[requirementKey] = requirement.value ?? undefined\n } else {\n requirementValues[requirementKey] = requirement.value ? String(requirement.value) : ''\n }\n\n let fieldSchema: z.ZodType = z.string().optional()\n\n const validation = requirement.metadata?.validation\n\n if (validation) {\n if (isPercentField && validation.type === 'one_of') {\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string()\n .optional()\n .refine(val => !val || oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean().optional()\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([reqKey, value]) => ({\n key: reqKey,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","isPercentField","fieldSchema","z","validation","oneOfValues","val","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","reqKey","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,SAASA,GAAeC,GAAqD;AAClF,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,OAAAC,GAAO,WAAAC,GAAW,UAAAC,KAAiC;AAC5E,EAAAC,EAAQ,oBAAoB;AAC5B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,EAAE,GAAAC,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,MAAAC,MAASC,EAA8B,EAAE,aAAaX,GAAW,OAAAC,GAAO,GAC1EW,IAAuBF,EAAK,sBAE5B,EAAE,aAAaG,GAAgB,WAAWC,EAAA,IAC9CC,EAAA,GAGI,EAAE,eAAAC,GAAe,eAAAC,EAAA,IAAkBC,EAAQ,MAAM;AACrD,UAAMC,IAAsE,CAAA,GACtEC,IACJ,CAAA;AAGF,WAAAR,EAAqB,iBAAiB,QAAQ,CAAAS,MAAkB;AAC9D,UAAI,CAACA,EAAe,IAAK;AAEzB,YAAMC,IAAoBD,EAAe,KACnCE,IAA8C,CAAA,GAC9CC,IAA2E,CAAA;AAEjF,MAAAH,EAAe,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AAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;"}
@@ -9,12 +9,13 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = t("StateTaxesFormContext");
16
+ const [d, u] = t("StateTaxesFormContext");
16
17
  export {
17
- d as StateTaxesFormProvider,
18
- c as useStateTaxesForm
18
+ u as StateTaxesFormProvider,
19
+ d as useStateTaxesForm
19
20
  };
20
21
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/context.ts"],"sourcesContent":["import type { TaxRequirementsState } from '@gusto/embedded-api/models/components/taxrequirementsstate'\nimport { createCompoundContext } from '@/components/Base'\n\ninterface StateTaxFormContext {\n isPending: boolean\n state: string\n stateTaxRequirements: TaxRequirementsState\n handleCancel: () => void\n}\n\nconst [useStateTaxesForm, StateTaxesFormProvider] =\n createCompoundContext<StateTaxFormContext>('StateTaxesFormContext')\n\nexport { useStateTaxesForm, StateTaxesFormProvider }\n"],"names":["useStateTaxesForm","StateTaxesFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAA2C,uBAAuB;"}
@@ -9,12 +9,13 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import "../../../../contexts/LocaleProvider/useLocale.js";
14
15
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = t("StateTaxesListContext");
16
+ const [d, u] = t("StateTaxesListContext");
16
17
  export {
17
- d as StateTaxesListProvider,
18
- c as useStateTaxesList
18
+ u as StateTaxesListProvider,
19
+ d as useStateTaxesList
19
20
  };
20
21
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/context.ts"],"sourcesContent":["import type { ResponseBody } from '@gusto/embedded-api/models/operations/getv1companiescompanyuuidtaxrequirements'\nimport { createCompoundContext } from '@/components/Base'\n\ntype StateTaxesListContextType = {\n isPending: boolean\n stateTaxRequirements: ResponseBody[]\n handleContinue: () => void\n handleChange: (state: string) => void\n}\n\nconst [useStateTaxesList, StateTaxesListProvider] =\n createCompoundContext<StateTaxesListContextType>('StateTaxesListContext')\n\nexport { useStateTaxesList, StateTaxesListProvider }\n"],"names":["useStateTaxesList","StateTaxesListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAmBC,CAAsB,IAC9CC,EAAiD,uBAAuB;"}
@@ -11,13 +11,13 @@ import { Actions as B } from "./Actions.js";
11
11
  import { Form as N } from "../../Common/Form/Form.js";
12
12
  import { useComponentDictionary as j, useI18n as q } from "../../../i18n/I18n.js";
13
13
  import { Flex as w } from "../../Common/Flex/Flex.js";
14
- import "react-i18next";
15
14
  import "classnames";
15
+ import { contractorEvents as d } from "../../../shared/constants.js";
16
+ import "react-i18next";
16
17
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
17
18
  import "react";
18
19
  import { BaseComponent as G } from "../../Base/Base.js";
19
20
  import { useBase as H } from "../../Base/useBase.js";
20
- import { contractorEvents as d } from "../../../shared/constants.js";
21
21
  function mt(r) {
22
22
  return /* @__PURE__ */ t(G, { ...r, children: /* @__PURE__ */ t(M, { ...r, children: r.children }) });
23
23
  }
@@ -1,15 +1,14 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { useTranslation as s } from "react-i18next";
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as i } from "react-i18next";
3
3
  import { STATES_ABBR as o } from "../../../shared/constants.js";
4
4
  import { Grid as l } from "../../Common/Grid/Grid.js";
5
- import "classnames";
5
+ import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
6
6
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
7
  import "react";
8
- import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
9
8
  import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
10
- function T() {
11
- const { t: e } = s("Contractor.Address");
12
- return /* @__PURE__ */ i(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
9
+ function R() {
10
+ const { t: e } = i("Contractor.Address");
11
+ return /* @__PURE__ */ s(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
13
12
  /* @__PURE__ */ r(
14
13
  t,
15
14
  {
@@ -47,6 +46,6 @@ function T() {
47
46
  ] });
48
47
  }
49
48
  export {
50
- T as Form
49
+ R as Form
51
50
  };
52
51
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../src/components/Contractor/Address/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { TextInputField, SelectField, Grid } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\n\nexport function Form() {\n const { t } = useTranslation('Contractor.Address')\n\n return (\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('street1')}\n isRequired\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2')} />\n <TextInputField\n name=\"city\"\n label={t('city')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map(stateAbbr => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common', defaultValue: stateAbbr }),\n value: stateAbbr,\n }))}\n label={t('state')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField name=\"zip\" label={t('zip')} isRequired errorMessage={t('validations.zip')} />\n </Grid>\n )\n}\n"],"names":["Form","t","useTranslation","jsxs","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB;AAEjD,SACE,gBAAAC,EAACC,GAAA,EAAK,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA,GAAK,KAAK,IACtE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,SAAS;AAAA,QAClB,YAAU;AAAA,QACV,cAAcA,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEtCK,GAAA,EAAe,MAAK,WAAU,OAAOL,EAAE,SAAS,GAAG;AAAA,IACpD,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,MAAM;AAAA,QACf,YAAU;AAAA,QACV,cAAcA,EAAE,kBAAkB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEpC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASC,EAAY,IAAI,CAAAC,OAAc;AAAA,UACrC,OAAOR,EAAE,cAAcQ,CAAS,IAAI,EAAE,IAAI,UAAU,cAAcA,GAAW;AAAA,UAC7E,OAAOA;AAAA,QAAA,EACP;AAAA,QACF,OAAOR,EAAE,OAAO;AAAA,QAChB,aAAaA,EAAE,kBAAkB;AAAA,QACjC,cAAcA,EAAE,mBAAmB;AAAA,QACnC,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI,EAACC,GAAA,EAAe,MAAK,OAAM,OAAOL,EAAE,KAAK,GAAG,YAAU,IAAC,cAAcA,EAAE,iBAAiB,EAAA,CAAG;AAAA,EAAA,GAC7F;AAEJ;"}
@@ -15,19 +15,7 @@ export declare const AddressFormSchema: z.ZodObject<{
15
15
  city: z.ZodString;
16
16
  state: z.ZodString;
17
17
  zip: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- street1: string;
20
- city: string;
21
- state: string;
22
- zip: string;
23
- street2?: string | undefined;
24
- }, {
25
- street1: string;
26
- city: string;
27
- state: string;
28
- zip: string;
29
- street2?: string | undefined;
30
- }>;
18
+ }, z.core.$strip>;
31
19
  export type AddressFormValues = z.infer<typeof AddressFormSchema>;
32
20
  declare const useAddress: () => AddressContextType, AddressProvider: import('react').Provider<AddressContextType | null>;
33
21
  export { useAddress, AddressProvider };
@@ -10,21 +10,22 @@ import "../../Base/useBase.js";
10
10
  import "../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
13
14
  import "dompurify";
14
15
  import "../../../contexts/LocaleProvider/useLocale.js";
15
16
  import { createCompoundContext as r } from "../../Base/createCompoundContext.js";
16
- const u = t.object({
17
+ const z = t.object({
17
18
  street1: t.string().min(1),
18
19
  street2: t.string().optional(),
19
20
  city: t.string().min(1),
20
21
  state: t.string().min(1),
21
22
  zip: t.string().min(1)
22
- }), [z, b] = r(
23
+ }), [b, h] = r(
23
24
  "ContractorAddressContext"
24
25
  );
25
26
  export {
26
- u as AddressFormSchema,
27
- b as AddressProvider,
28
- z as useAddress
27
+ z as AddressFormSchema,
28
+ h as AddressProvider,
29
+ b as useAddress
29
30
  };
30
31
  //# sourceMappingURL=useAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
1
+ {"version":3,"file":"useAddress.js","sources":["../../../../src/components/Contractor/Address/useAddress.ts"],"sourcesContent":["import type { Contractor, ContractorType } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorAddress } from '@gusto/embedded-api/models/components/contractoraddress'\nimport { z } from 'zod'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport interface AddressContextType {\n contractor?: Contractor\n contractorType?: ContractorType\n address?: ContractorAddress\n isPending: boolean\n}\n\nexport type AddressDefaultValues = RequireAtLeastOne<\n Pick<ContractorAddress, 'street1' | 'street2' | 'city' | 'state' | 'zip'>\n>\n\nexport const AddressFormSchema = z.object({\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: z.string().min(1),\n})\n\nexport type AddressFormValues = z.infer<typeof AddressFormSchema>\n\nconst [useAddress, AddressProvider] = createCompoundContext<AddressContextType>(\n 'ContractorAddressContext',\n)\n\nexport { useAddress, AddressProvider }\n"],"names":["AddressFormSchema","z","useAddress","AddressProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAiBO,MAAMA,IAAoBC,EAAE,OAAO;AAAA,EACxC,SAASA,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKA,EAAE,OAAA,EAAS,IAAI,CAAC;AACvB,CAAC,GAIK,CAACC,GAAYC,CAAe,IAAIC;AAAA,EACpC;AACF;"}
@@ -4,17 +4,17 @@ import { useContractorsDeleteMutation as w } from "@gusto/embedded-api/react-que
4
4
  import { useContractors as H } from "./useContractorList.js";
5
5
  import { Flex as f } from "../../Common/Flex/Flex.js";
6
6
  import "classnames";
7
- import { EmptyData as k } from "../../Common/EmptyData/EmptyData.js";
7
+ import { CONTRACTOR_TYPE as k, componentEvents as m } from "../../../shared/constants.js";
8
+ import { EmptyData as U } from "../../Common/EmptyData/EmptyData.js";
8
9
  import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
9
- import { HamburgerMenu as U } from "../../Common/HamburgerMenu/HamburgerMenu.js";
10
- import { firstLastName as j } from "../../../helpers/formattedStrings.js";
11
- import M from "../../../assets/icons/pencil.svg.js";
10
+ import { HamburgerMenu as j } from "../../Common/HamburgerMenu/HamburgerMenu.js";
11
+ import { firstLastName as M } from "../../../helpers/formattedStrings.js";
12
+ import V from "../../../assets/icons/pencil.svg.js";
12
13
  import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
13
- import { ContractorOnboardingStatusBadge as V } from "../../Common/OnboardingStatusBadge/index.js";
14
- import { useI18n as F } from "../../../i18n/I18n.js";
15
- import { BaseComponent as q } from "../../Base/Base.js";
16
- import { useBase as G } from "../../Base/useBase.js";
17
- import { CONTRACTOR_TYPE as Y, componentEvents as m } from "../../../shared/constants.js";
14
+ import { ContractorOnboardingStatusBadge as F } from "../../Common/OnboardingStatusBadge/index.js";
15
+ import { useI18n as q } from "../../../i18n/I18n.js";
16
+ import { BaseComponent as G } from "../../Base/Base.js";
17
+ import { useBase as Y } from "../../Base/useBase.js";
18
18
  import z from "../../../assets/icons/trashcan.svg.js";
19
19
  import { useDataView as J } from "../../Common/DataView/useDataView.js";
20
20
  import { DataView as K } from "../../Common/DataView/DataView.js";
@@ -27,14 +27,14 @@ function Q({ count: o, handleAdd: a }) {
27
27
  }
28
28
  function W({ handleAdd: o }) {
29
29
  const { Button: a } = u(), { t: r } = d("Contractor.ContractorList");
30
- return /* @__PURE__ */ t(k, { title: r("emptyTableTitle"), description: r("emptyTableDescription"), children: /* @__PURE__ */ t(h, { justifyContent: "center", children: /* @__PURE__ */ t(a, { onClick: o, children: r("addContractorCta") }) }) });
30
+ return /* @__PURE__ */ t(U, { title: r("emptyTableTitle"), description: r("emptyTableDescription"), children: /* @__PURE__ */ t(h, { justifyContent: "center", children: /* @__PURE__ */ t(a, { onClick: o, children: r("addContractorCta") }) }) });
31
31
  }
32
32
  function Tt(o) {
33
- return /* @__PURE__ */ t(q, { ...o, children: /* @__PURE__ */ t(X, { ...o, children: o.children }) });
33
+ return /* @__PURE__ */ t(G, { ...o, children: /* @__PURE__ */ t(X, { ...o, children: o.children }) });
34
34
  }
35
35
  function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
36
- F("Contractor.ContractorList");
37
- const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } = G(), { Alert: T, Button: P } = u(), {
36
+ q("Contractor.ContractorList");
37
+ const { t: n } = d("Contractor.ContractorList"), { onEvent: s, baseSubmitHandler: g } = Y(), { Alert: T, Button: P } = u(), {
38
38
  contractors: L,
39
39
  totalCount: C,
40
40
  handleNextPage: N,
@@ -49,12 +49,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
49
49
  columns: [
50
50
  {
51
51
  title: n("listHeaders.name"),
52
- render: (e) => e.type === Y.BUSINESS ? e.businessName : j({ first_name: e.firstName, last_name: e.lastName })
52
+ render: (e) => e.type === k.BUSINESS ? e.businessName : M({ first_name: e.firstName, last_name: e.lastName })
53
53
  },
54
54
  {
55
55
  title: n("listHeaders.status"),
56
56
  render: ({ onboarded: e, onboardingStatus: c }) => /* @__PURE__ */ t(
57
- V,
57
+ F,
58
58
  {
59
59
  onboarded: e,
60
60
  onboardingStatus: c
@@ -64,12 +64,12 @@ function X({ companyId: o, className: a, dictionary: r, successMessage: i }) {
64
64
  ],
65
65
  data: L,
66
66
  itemMenu: (e) => /* @__PURE__ */ t(
67
- U,
67
+ j,
68
68
  {
69
69
  items: [
70
70
  {
71
71
  label: n("editCta"),
72
- icon: /* @__PURE__ */ t(M, { "aria-hidden": !0 }),
72
+ icon: /* @__PURE__ */ t(V, { "aria-hidden": !0 }),
73
73
  onClick: () => {
74
74
  _(e.uuid);
75
75
  }
@@ -1,9 +1,9 @@
1
1
  import { useContractorsListSuspense as a } from "@gusto/embedded-api/react-query/contractorsList";
2
- import { usePagination as c } from "../../../hooks/usePagination/usePagination.js";
2
+ import { usePagination as i } from "../../../hooks/usePagination/usePagination.js";
3
3
  function u({ companyUuid: t }) {
4
- const { currentPage: r, itemsPerPage: e, getPaginationProps: o } = c(), {
5
- data: { httpMeta: s, contractorList: n }
6
- } = a({ companyUuid: t, page: r, per: e });
4
+ const { currentPage: e, itemsPerPage: r, getPaginationProps: o } = i(), {
5
+ data: { httpMeta: s, contractors: n }
6
+ } = a({ companyUuid: t, page: e, per: r });
7
7
  return {
8
8
  contractors: n,
9
9
  ...o(s.response.headers)
@@ -1 +1 @@
1
- {"version":3,"file":"useContractorList.js","sources":["../../../../src/components/Contractor/ContractorList/useContractorList.ts"],"sourcesContent":["import { type Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\nexport interface ContractorListContext {\n contractors: Contractor[]\n}\n\nexport interface useContractorsArgs {\n companyUuid: string\n}\n\nexport function useContractors({ companyUuid }: useContractorsArgs) {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const {\n data: { httpMeta, contractorList: contractors },\n } = useContractorsListSuspense({ companyUuid, page: currentPage, per: itemsPerPage })\n\n return {\n contractors: contractors!,\n ...getPaginationProps(httpMeta.response.headers),\n }\n}\n"],"names":["useContractors","companyUuid","currentPage","itemsPerPage","getPaginationProps","usePagination","httpMeta","contractors","useContractorsListSuspense"],"mappings":";;AAYO,SAASA,EAAe,EAAE,aAAAC,KAAmC;AAClE,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAA,GAEpD;AAAA,IACJ,MAAM,EAAE,UAAAC,GAAU,gBAAgBC,EAAA;AAAA,EAAY,IAC5CC,EAA2B,EAAE,aAAAP,GAAa,MAAMC,GAAa,KAAKC,GAAc;AAEpF,SAAO;AAAA,IACL,aAAAI;AAAA,IACA,GAAGH,EAAmBE,EAAS,SAAS,OAAO;AAAA,EAAA;AAEnD;"}
1
+ {"version":3,"file":"useContractorList.js","sources":["../../../../src/components/Contractor/ContractorList/useContractorList.ts"],"sourcesContent":["import { type Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport { useContractorsListSuspense } from '@gusto/embedded-api/react-query/contractorsList'\nimport { usePagination } from '@/hooks/usePagination/usePagination'\n\nexport interface ContractorListContext {\n contractors: Contractor[]\n}\n\nexport interface useContractorsArgs {\n companyUuid: string\n}\n\nexport function useContractors({ companyUuid }: useContractorsArgs) {\n const { currentPage, itemsPerPage, getPaginationProps } = usePagination()\n\n const {\n data: { httpMeta, contractors },\n } = useContractorsListSuspense({ companyUuid, page: currentPage, per: itemsPerPage })\n\n return {\n contractors: contractors!,\n ...getPaginationProps(httpMeta.response.headers),\n }\n}\n"],"names":["useContractors","companyUuid","currentPage","itemsPerPage","getPaginationProps","usePagination","httpMeta","contractors","useContractorsListSuspense"],"mappings":";;AAYO,SAASA,EAAe,EAAE,aAAAC,KAAmC;AAClE,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,oBAAAC,EAAA,IAAuBC,EAAA,GAEpD;AAAA,IACJ,MAAM,EAAE,UAAAC,GAAU,aAAAC,EAAA;AAAA,EAAY,IAC5BC,EAA2B,EAAE,aAAAP,GAAa,MAAMC,GAAa,KAAKC,GAAc;AAEpF,SAAO;AAAA,IACL,aAAAI;AAAA,IACA,GAAGH,EAAmBE,EAAS,SAAS,OAAO;AAAA,EAAA;AAEnD;"}
@@ -1,21 +1,11 @@
1
1
  import { default as z } from 'zod';
2
2
  import { NewHireReportProps } from './types';
3
- declare const NewHireReportSchema: z.ZodUnion<[z.ZodObject<{
4
- fileNewHireReport: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
3
+ declare const NewHireReportSchema: z.ZodUnion<readonly [z.ZodObject<{
4
+ fileNewHireReport: z.ZodBoolean;
5
5
  state: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- state: string;
8
- fileNewHireReport: boolean;
9
- }, {
10
- state: string;
11
- fileNewHireReport: boolean;
12
- }>, z.ZodObject<{
13
- fileNewHireReport: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
14
- }, "strip", z.ZodTypeAny, {
15
- fileNewHireReport: boolean;
16
- }, {
17
- fileNewHireReport: boolean;
18
- }>]>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ fileNewHireReport: z.ZodBoolean;
8
+ }, z.core.$strip>]>;
19
9
  export type NewHireReportSchemaInputs = z.input<typeof NewHireReportSchema>;
20
10
  export declare function NewHireReport(props: NewHireReportProps): import("react/jsx-runtime").JSX.Element;
21
11
  export {};